Sat, 15 May 2010 15:29:39 +0200
Changed code to improve development on multiple platforms.
--- a/APIs/Python3/eric5.api Sat May 15 10:19:07 2010 +0200 +++ b/APIs/Python3/eric5.api Sat May 15 15:29:39 2010 +0200 @@ -946,7 +946,7 @@ eric5.DocumentationTools.Config.eric5docColorParameterNames?7 eric5.DocumentationTools.Config.eric5docDefaultColors?7 eric5.DocumentationTools.IndexGenerator.IndexGenerator.remember?4(file, moduleDocument, basename="") -eric5.DocumentationTools.IndexGenerator.IndexGenerator.writeIndices?4(basename = "") +eric5.DocumentationTools.IndexGenerator.IndexGenerator.writeIndices?4(basename = "", newline = None) eric5.DocumentationTools.IndexGenerator.IndexGenerator?1(outputDir, colors, stylesheet = None) eric5.DocumentationTools.ModuleDocumentor.ModuleDocument.description?4() eric5.DocumentationTools.ModuleDocumentor.ModuleDocument.genDocument?4() @@ -963,7 +963,7 @@ eric5.DocumentationTools.QtHelpGenerator.HelpHelpFile?7 eric5.DocumentationTools.QtHelpGenerator.HelpProject?7 eric5.DocumentationTools.QtHelpGenerator.HelpProjectFile?7 -eric5.DocumentationTools.QtHelpGenerator.QtHelpGenerator.generateFiles?4(basename = "") +eric5.DocumentationTools.QtHelpGenerator.QtHelpGenerator.generateFiles?4(basename = "", newline = None) eric5.DocumentationTools.QtHelpGenerator.QtHelpGenerator.remember?4(file, moduleDocument, basename="") eric5.DocumentationTools.QtHelpGenerator.QtHelpGenerator?1(htmlDir, outputDir, namespace, virtualFolder, filterName, filterAttributes, title, createCollection) eric5.DocumentationTools.TemplatesListsStyle.authorInfoTemplate?7 @@ -1402,6 +1402,7 @@ eric5.E5XML.ProjectHandler.ProjectHandler.startCxfreezeParams?4(attrs) eric5.E5XML.ProjectHandler.ProjectHandler.startDocumentProject?4() eric5.E5XML.ProjectHandler.ProjectHandler.startDocumentationParams?4(attrs) +eric5.E5XML.ProjectHandler.ProjectHandler.startEol?4(attrs) eric5.E5XML.ProjectHandler.ProjectHandler.startEric4ApiParams?4(attrs) eric5.E5XML.ProjectHandler.ProjectHandler.startEric4DocParams?4(attrs) eric5.E5XML.ProjectHandler.ProjectHandler.startFiletypeAssociation?4(attrs) @@ -4170,12 +4171,14 @@ eric5.Project.Project.Project.deleteDirectory?4(dn) eric5.Project.Project.Project.deleteFile?4(fn) eric5.Project.Project.Project.deleteLanguageFile?4(langFile) +eric5.Project.Project.Project.eols?7 eric5.Project.Project.Project.getAbsoluteUniversalPath?4(fn) eric5.Project.Project.Project.getActions?4() eric5.Project.Project.Project.getData?4(category, key) eric5.Project.Project.Project.getDebugProperty?4(key) eric5.Project.Project.Project.getDefaultSourceExtension?4() eric5.Project.Project.Project.getEditorLexerAssoc?4(filename) +eric5.Project.Project.Project.getEolString?4() eric5.Project.Project.Project.getFiles?4(start) eric5.Project.Project.Project.getHash?4() eric5.Project.Project.Project.getMainScript?4(normalized = False) @@ -4242,6 +4245,7 @@ eric5.Project.Project.Project.stopStatusMonitor?4() eric5.Project.Project.Project.unregisterProjectType?4(type_) eric5.Project.Project.Project.updateFileTypes?4() +eric5.Project.Project.Project.useSystemEol?4() eric5.Project.Project.Project.userKeynames?7 eric5.Project.Project.Project?1(parent = None, filename = None) eric5.Project.ProjectBaseBrowser.ProjectBaseBrowser._collapseAllDirs?5() @@ -4563,7 +4567,7 @@ eric5.QScintilla.Editor.Editor.removeClone?4(editor) eric5.QScintilla.Editor.Editor.revertToUnmodified?4() eric5.QScintilla.Editor.Editor.saveFile?4(saveas = False, path = None) -eric5.QScintilla.Editor.Editor.saveFileAs?4(path = None) +eric5.QScintilla.Editor.Editor.saveFileAs?4(path = None, toProject = False) eric5.QScintilla.Editor.Editor.selectCurrentWord?4() eric5.QScintilla.Editor.Editor.selectWord?4(line, index) eric5.QScintilla.Editor.Editor.sendSharedEdit?4() @@ -4571,7 +4575,6 @@ eric5.QScintilla.Editor.Editor.setAutoCompletionHook?4(func) eric5.QScintilla.Editor.Editor.setAutoSpellChecking?4() eric5.QScintilla.Editor.Editor.setCallTipHook?4(func) -eric5.QScintilla.Editor.Editor.setEolModeByEolString?4(eolStr) eric5.QScintilla.Editor.Editor.setLanguage?4(filename, initTextDisplay = True, propagate = True, pyname = "") eric5.QScintilla.Editor.Editor.setMonospaced?4(on) eric5.QScintilla.Editor.Editor.setNoName?4(noName)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DTDs/Project-5.1.dtd Sat May 15 15:29:39 2010 +0200 @@ -0,0 +1,170 @@ +<!-- This is the DTD for eric5's project file version 5.1 --> + +<!-- This is a copy of the Basic DTD --> +<!ELEMENT int (#PCDATA)> +<!ELEMENT long (#PCDATA)> +<!ELEMENT float (#PCDATA)> +<!ELEMENT complex (#PCDATA)> +<!ELEMENT bool (#PCDATA)> +<!ELEMENT string (#PCDATA)> +<!ELEMENT bytes (#PCDATA)> +<!ELEMENT bytearray (#PCDATA)> +<!ELEMENT none EMPTY> + +<!ELEMENT pickle (#PCDATA)> +<!ATTLIST pickle + method CDATA #REQUIRED + encoding CDATA #REQUIRED> + +<!ELEMENT key (int | long | float | complex | string | bytes)> +<!ELEMENT value (int | long | float | complex | bool | string | bytes | + bytearray | none | dict | tuple | list | set | frozenset | pickle)> + +<!ELEMENT dict (key, value)*> + +<!ELEMENT tuple (int | long | float | complex | bool | string | bytes | + bytearray | none | dict | tuple | list | set | frozenset | pickle)*> + +<!ELEMENT list (int | long | float | complex | bool | string | bytes | + bytearray | none | dict | tuple | list | set | frozenset | pickle)*> + +<!ELEMENT set (int | long | float | complex | bool | string | bytes | + bytearray | none | dict | tuple | list | set | frozenset | pickle)*> + +<!ELEMENT frozenset (int | long | float | complex | bool | string | bytes | + bytearray | none | dict | tuple | list | set | frozenset | pickle)*> +<!-- End of the Basic DTD --> + +<!ELEMENT ProgLanguage (#PCDATA)> +<!ATTLIST ProgLanguage + mixed CDATA #REQUIRED> + +<!ELEMENT ProjectType (#PCDATA)> + +<!ELEMENT Description (#PCDATA)> + +<!ELEMENT Version (#PCDATA)> + +<!ELEMENT Author (#PCDATA)> + +<!ELEMENT Email (#PCDATA)> + +<!ELEMENT TranslationPattern (#PCDATA)> + +<!ELEMENT TranslationsBinPath (#PCDATA)> + +<!ELEMENT Source (#PCDATA)> + +<!ELEMENT Sources (Source*)> + +<!ELEMENT Form (#PCDATA)> + +<!ELEMENT Forms (Form*)> + +<!ELEMENT Translation (#PCDATA)> + +<!ELEMENT Translations (Translation*)> + +<!ELEMENT TranslationException (#PCDATA)> + +<!ELEMENT TranslationExceptions (TranslationException*)> + +<!ELEMENT Resource (#PCDATA)> + +<!ELEMENT Resources (Resource*)> + +<!ELEMENT Interface (#PCDATA)> + +<!ELEMENT Interfaces (Interface*)> + +<!ELEMENT Other (#PCDATA)> + +<!ELEMENT Others (Other*)> + +<!ELEMENT MainScript (#PCDATA)> + +<!ELEMENT VcsType (#PCDATA)> +<!ELEMENT VcsOptions (dict)> +<!ELEMENT VcsOtherData (dict)> + +<!ELEMENT Vcs (VcsType?, + VcsOptions?, + VcsOtherData?)> + +<!ELEMENT FiletypeAssociation EMPTY> +<!ATTLIST FiletypeAssociation + pattern CDATA #REQUIRED + type CDATA #REQUIRED> + +<!ELEMENT FiletypeAssociations (FiletypeAssociation*)> + +<!ELEMENT LexerAssociation EMPTY> +<!ATTLIST LexerAssociation + pattern CDATA #REQUIRED + lexer CDATA #REQUIRED> + +<!ELEMENT LexerAssociations (LexerAssociation*)> + +<!ELEMENT ProjectTypeSpecificData (dict)> + +<!ELEMENT ProjectTypeSpecific (ExtraData?)> + +<!ELEMENT DocumentationParams (dict)> + +<!ELEMENT Documentation (DocumentationParams?)> + +<!ELEMENT PackagersParams (dict)> + +<!ELEMENT Packagers (PackagersParams?)> + +<!ELEMENT CheckersParams (dict)> + +<!ELEMENT Checkers (CheckersParams?)> + +<!ELEMENT OtherToolsParams (dict)> + +<!ELEMENT OtherTools (OtherToolsParams?)> + +<!ELEMENT Language (#PCDATA)> + +<!ELEMENT ProjectWordList (#PCDATA)> + +<!ELEMENT ProjectExcludeList (#PCDATA)> + +<!ELEMENT Hash (#PCDATA)> + +<!ELEMENT Eol EMPTY> +<!ATTLIST Eol + index CDATA #REQUIRED> + +<!ELEMENT Project (Language, + ProjectWordList?, + ProjectExcludeList?, + Hash, + ProgLanguage, + ProjectType, + Description?, + Version?, + Author?, + Email?, + TranslationPattern?, + TranslationsBinPath?, + Eol?, + Sources, + Forms, + Translations, + TranslationExceptions?, + Resources, + Interfaces, + Others, + MainScript?, + Vcs, + FiletypeAssociations, + LexerAssociations?, + Extra?, + Documentation?, + Packagers?, + Checkers?, + OtherTools?)> +<!ATTLIST Project + version CDATA #REQUIRED>
--- a/Documentation/Help/source.qhp Sat May 15 10:19:07 2010 +0200 +++ b/Documentation/Help/source.qhp Sat May 15 15:29:39 2010 +0200 @@ -1039,6 +1039,7 @@ <keyword name="ProjectHandler.startCxfreezeParams" id="ProjectHandler.startCxfreezeParams" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.startCxfreezeParams" /> <keyword name="ProjectHandler.startDocumentProject" id="ProjectHandler.startDocumentProject" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.startDocumentProject" /> <keyword name="ProjectHandler.startDocumentationParams" id="ProjectHandler.startDocumentationParams" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.startDocumentationParams" /> + <keyword name="ProjectHandler.startEol" id="ProjectHandler.startEol" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.startEol" /> <keyword name="ProjectHandler.startEric4ApiParams" id="ProjectHandler.startEric4ApiParams" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.startEric4ApiParams" /> <keyword name="ProjectHandler.startEric4DocParams" id="ProjectHandler.startEric4DocParams" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.startEric4DocParams" /> <keyword name="ProjectHandler.startFiletypeAssociation" id="ProjectHandler.startFiletypeAssociation" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.startFiletypeAssociation" /> @@ -4559,6 +4560,7 @@ <keyword name="Project.getDebugProperty" id="Project.getDebugProperty" ref="eric5.Project.Project.html#Project.getDebugProperty" /> <keyword name="Project.getDefaultSourceExtension" id="Project.getDefaultSourceExtension" ref="eric5.Project.Project.html#Project.getDefaultSourceExtension" /> <keyword name="Project.getEditorLexerAssoc" id="Project.getEditorLexerAssoc" ref="eric5.Project.Project.html#Project.getEditorLexerAssoc" /> + <keyword name="Project.getEolString" id="Project.getEolString" ref="eric5.Project.Project.html#Project.getEolString" /> <keyword name="Project.getFiles" id="Project.getFiles" ref="eric5.Project.Project.html#Project.getFiles" /> <keyword name="Project.getHash" id="Project.getHash" ref="eric5.Project.Project.html#Project.getHash" /> <keyword name="Project.getMainScript" id="Project.getMainScript" ref="eric5.Project.Project.html#Project.getMainScript" /> @@ -4624,6 +4626,7 @@ <keyword name="Project.stopStatusMonitor" id="Project.stopStatusMonitor" ref="eric5.Project.Project.html#Project.stopStatusMonitor" /> <keyword name="Project.unregisterProjectType" id="Project.unregisterProjectType" ref="eric5.Project.Project.html#Project.unregisterProjectType" /> <keyword name="Project.updateFileTypes" id="Project.updateFileTypes" ref="eric5.Project.Project.html#Project.updateFileTypes" /> + <keyword name="Project.useSystemEol" id="Project.useSystemEol" ref="eric5.Project.Project.html#Project.useSystemEol" /> <keyword name="AddDirectoryDialog (Module)" id="AddDirectoryDialog (Module)" ref="eric5.Project.AddDirectoryDialog.html" /> <keyword name="AddDirectoryDialog" id="AddDirectoryDialog" ref="eric5.Project.AddDirectoryDialog.html#AddDirectoryDialog" /> <keyword name="AddDirectoryDialog (Constructor)" id="AddDirectoryDialog (Constructor)" ref="eric5.Project.AddDirectoryDialog.html#AddDirectoryDialog.__init__" /> @@ -5800,7 +5803,6 @@ <keyword name="Editor.setAutoCompletionHook" id="Editor.setAutoCompletionHook" ref="eric5.QScintilla.Editor.html#Editor.setAutoCompletionHook" /> <keyword name="Editor.setAutoSpellChecking" id="Editor.setAutoSpellChecking" ref="eric5.QScintilla.Editor.html#Editor.setAutoSpellChecking" /> <keyword name="Editor.setCallTipHook" id="Editor.setCallTipHook" ref="eric5.QScintilla.Editor.html#Editor.setCallTipHook" /> - <keyword name="Editor.setEolModeByEolString" id="Editor.setEolModeByEolString" ref="eric5.QScintilla.Editor.html#Editor.setEolModeByEolString" /> <keyword name="Editor.setLanguage" id="Editor.setLanguage" ref="eric5.QScintilla.Editor.html#Editor.setLanguage" /> <keyword name="Editor.setMonospaced" id="Editor.setMonospaced" ref="eric5.QScintilla.Editor.html#Editor.setMonospaced" /> <keyword name="Editor.setNoName" id="Editor.setNoName" ref="eric5.QScintilla.Editor.html#Editor.setNoName" /> @@ -6029,6 +6031,7 @@ <keyword name="QtHelpGenerator (Module)" id="QtHelpGenerator (Module)" ref="eric5.DocumentationTools.QtHelpGenerator.html" /> <keyword name="QtHelpGenerator" id="QtHelpGenerator" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator" /> <keyword name="QtHelpGenerator (Constructor)" id="QtHelpGenerator (Constructor)" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.__init__" /> + <keyword name="QtHelpGenerator.__convertEol" id="QtHelpGenerator.__convertEol" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.__convertEol" /> <keyword name="QtHelpGenerator.__generateSections" id="QtHelpGenerator.__generateSections" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.__generateSections" /> <keyword name="QtHelpGenerator.generateFiles" id="QtHelpGenerator.generateFiles" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.generateFiles" /> <keyword name="QtHelpGenerator.remember" id="QtHelpGenerator.remember" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.remember" />
--- a/Documentation/Source/eric5.DocumentationTools.APIGenerator.html Sat May 15 10:19:07 2010 +0200 +++ b/Documentation/Source/eric5.DocumentationTools.APIGenerator.html Sat May 15 15:29:39 2010 +0200 @@ -148,7 +148,7 @@ <dt><i>newStyle</i></dt> <dd> flag indicating the api generation for QScintilla 1.7 and - newer (boolean) + newer (boolean) (ignored) </dd><dt><i>basePackage</i></dt> <dd> name of the base package (string)
--- a/Documentation/Source/eric5.DocumentationTools.IndexGenerator.html Sat May 15 10:19:07 2010 +0200 +++ b/Documentation/Source/eric5.DocumentationTools.IndexGenerator.html Sat May 15 15:29:39 2010 +0200 @@ -86,7 +86,7 @@ </dd> </dl><a NAME="IndexGenerator.__writeIndex" ID="IndexGenerator.__writeIndex"></a> <h4>IndexGenerator.__writeIndex</h4> -<b>__writeIndex</b>(<i>packagename, package</i>) +<b>__writeIndex</b>(<i>packagename, package, newline = None</i>) <p> Private method to generate an index file for a package. </p><dl> @@ -96,6 +96,9 @@ </dd><dt><i>package</i></dt> <dd> A dictionary with information about the package. +</dd><dt><i>newline</i></dt> +<dd> +newline character to be used (string) </dd> </dl><dl> <dt>Returns:</dt> @@ -123,7 +126,7 @@ </dd> </dl><a NAME="IndexGenerator.writeIndices" ID="IndexGenerator.writeIndices"></a> <h4>IndexGenerator.writeIndices</h4> -<b>writeIndices</b>(<i>basename = ""</i>) +<b>writeIndices</b>(<i>basename = "", newline = None</i>) <p> Public method to generate all index files. </p><dl> @@ -132,6 +135,9 @@ The basename of the file hierarchy to be documented. The basename is stripped off the filename if it starts with the basename. +</dd><dt><i>newline</i></dt> +<dd> +newline character to be used (string) </dd> </dl> <div align="right"><a href="#top">Up</a></div>
--- a/Documentation/Source/eric5.DocumentationTools.QtHelpGenerator.html Sat May 15 10:19:07 2010 +0200 +++ b/Documentation/Source/eric5.DocumentationTools.QtHelpGenerator.html Sat May 15 15:29:39 2010 +0200 @@ -57,6 +57,9 @@ <td><a href="#QtHelpGenerator.__init__">QtHelpGenerator</a></td> <td>Constructor</td> </tr><tr> +<td><a href="#QtHelpGenerator.__convertEol">__convertEol</a></td> +<td>Private method to convert the newline characters.</td> +</tr><tr> <td><a href="#QtHelpGenerator.__generateSections">__generateSections</a></td> <td>Private method to generate the sections part.</td> </tr><tr> @@ -99,6 +102,24 @@ flag indicating the generation of the collection files (boolean) </dd> +</dl><a NAME="QtHelpGenerator.__convertEol" ID="QtHelpGenerator.__convertEol"></a> +<h4>QtHelpGenerator.__convertEol</h4> +<b>__convertEol</b>(<i>txt, newline</i>) +<p> + Private method to convert the newline characters. +</p><dl> +<dt><i>txt</i></dt> +<dd> +text to be converted (string) +</dd><dt><i>newline</i></dt> +<dd> +newline character to be used (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +converted text (string) +</dd> </dl><a NAME="QtHelpGenerator.__generateSections" ID="QtHelpGenerator.__generateSections"></a> <h4>QtHelpGenerator.__generateSections</h4> <b>__generateSections</b>(<i>package, level</i>) @@ -119,7 +140,7 @@ </dd> </dl><a NAME="QtHelpGenerator.generateFiles" ID="QtHelpGenerator.generateFiles"></a> <h4>QtHelpGenerator.generateFiles</h4> -<b>generateFiles</b>(<i>basename = ""</i>) +<b>generateFiles</b>(<i>basename = "", newline = None</i>) <p> Public method to generate all index files. </p><dl> @@ -128,6 +149,9 @@ The basename of the file hierarchy to be documented. The basename is stripped off the filename if it starts with the basename. +</dd><dt><i>newline</i></dt> +<dd> +newline character to be used (string) </dd> </dl><a NAME="QtHelpGenerator.remember" ID="QtHelpGenerator.remember"></a> <h4>QtHelpGenerator.remember</h4>
--- a/Documentation/Source/eric5.E5XML.ProjectHandler.html Sat May 15 10:19:07 2010 +0200 +++ b/Documentation/Source/eric5.E5XML.ProjectHandler.html Sat May 15 15:29:39 2010 +0200 @@ -183,6 +183,9 @@ <td><a href="#ProjectHandler.startDocumentationParams">startDocumentationParams</a></td> <td>Handler method for the "DocumentationParams" start tag.</td> </tr><tr> +<td><a href="#ProjectHandler.startEol">startEol</a></td> +<td>Handler method for the "Eol" start tag.</td> +</tr><tr> <td><a href="#ProjectHandler.startEric4ApiParams">startEric4ApiParams</a></td> <td>Handler method for the "Eric4ApiParams" start tag.</td> </tr><tr> @@ -496,6 +499,16 @@ <dd> list of tag attributes </dd> +</dl><a NAME="ProjectHandler.startEol" ID="ProjectHandler.startEol"></a> +<h4>ProjectHandler.startEol</h4> +<b>startEol</b>(<i>attrs</i>) +<p> + Handler method for the "Eol" start tag. +</p><dl> +<dt><i>attrs</i></dt> +<dd> +list of tag attributes +</dd> </dl><a NAME="ProjectHandler.startEric4ApiParams" ID="ProjectHandler.startEric4ApiParams"></a> <h4>ProjectHandler.startEric4ApiParams</h4> <b>startEric4ApiParams</b>(<i>attrs</i>)
--- a/Documentation/Source/eric5.Project.Project.html Sat May 15 10:19:07 2010 +0200 +++ b/Documentation/Source/eric5.Project.Project.html Sat May 15 15:29:39 2010 +0200 @@ -143,7 +143,7 @@ QObject <h3>Class Attributes</h3> <table> -<tr><td>dbgKeynames</td></tr><tr><td>keynames</td></tr><tr><td>userKeynames</td></tr> +<tr><td>dbgKeynames</td></tr><tr><td>eols</td></tr><tr><td>keynames</td></tr><tr><td>userKeynames</td></tr> </table> <h3>Methods</h3> <table> @@ -409,6 +409,9 @@ <td><a href="#Project.getEditorLexerAssoc">getEditorLexerAssoc</a></td> <td>Public method to retrieve a lexer association.</td> </tr><tr> +<td><a href="#Project.getEolString">getEolString</a></td> +<td>Public method to get the EOL-string to be used by the project.</td> +</tr><tr> <td><a href="#Project.getFiles">getFiles</a></td> <td>Public method to get all files starting with a common prefix.</td> </tr><tr> @@ -603,6 +606,9 @@ </tr><tr> <td><a href="#Project.updateFileTypes">updateFileTypes</a></td> <td>Public method to update the filetype associations with new default values.</td> +</tr><tr> +<td><a href="#Project.useSystemEol">useSystemEol</a></td> +<td>Public method to check, if the project uses the system eol setting.</td> </tr> </table> <a NAME="Project.__init__" ID="Project.__init__"></a> @@ -1455,6 +1461,16 @@ <dd> the requested lexer language (string) </dd> +</dl><a NAME="Project.getEolString" ID="Project.getEolString"></a> +<h4>Project.getEolString</h4> +<b>getEolString</b>(<i></i>) +<p> + Public method to get the EOL-string to be used by the project. +</p><dl> +<dt>Returns:</dt> +<dd> +eol string (string) +</dd> </dl><a NAME="Project.getFiles" ID="Project.getFiles"></a> <h4>Project.getFiles</h4> <b>getFiles</b>(<i>start</i>) @@ -2245,7 +2261,17 @@ <b>updateFileTypes</b>(<i></i>) <p> Public method to update the filetype associations with new default values. -</p> +</p><a NAME="Project.useSystemEol" ID="Project.useSystemEol"></a> +<h4>Project.useSystemEol</h4> +<b>useSystemEol</b>(<i></i>) +<p> + Public method to check, if the project uses the system eol setting. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating the usage of system eol (boolean) +</dd> +</dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html> \ No newline at end of file
--- a/Documentation/Source/eric5.QScintilla.Editor.html Sat May 15 10:19:07 2010 +0200 +++ b/Documentation/Source/eric5.QScintilla.Editor.html Sat May 15 15:29:39 2010 +0200 @@ -860,9 +860,6 @@ <td><a href="#Editor.setCallTipHook">setCallTipHook</a></td> <td>Public method to set a calltip hook.</td> </tr><tr> -<td><a href="#Editor.setEolModeByEolString">setEolModeByEolString</a></td> -<td>Public method to set the eol mode given the eol string.</td> -</tr><tr> <td><a href="#Editor.setLanguage">setLanguage</a></td> <td>Public method to set a lexer language.</td> </tr><tr> @@ -2932,13 +2929,16 @@ </dd> </dl><a NAME="Editor.saveFileAs" ID="Editor.saveFileAs"></a> <h4>Editor.saveFileAs</h4> -<b>saveFileAs</b>(<i>path = None</i>) +<b>saveFileAs</b>(<i>path = None, toProject = False</i>) <p> Public slot to save a file with a new name. </p><dl> <dt><i>path</i></dt> <dd> directory to save the file in (string) +</dd><dt><i>toProject=</i></dt> +<dd> +flag indicating a save to project operation (boolean) </dd> </dl><dl> <dt>Returns:</dt> @@ -3011,16 +3011,6 @@ left of the cursor. It should return the possible calltips as a list of strings. </dd> -</dl><a NAME="Editor.setEolModeByEolString" ID="Editor.setEolModeByEolString"></a> -<h4>Editor.setEolModeByEolString</h4> -<b>setEolModeByEolString</b>(<i>eolStr</i>) -<p> - Public method to set the eol mode given the eol string. -</p><dl> -<dt><i>eolStr</i></dt> -<dd> -eol string (string) -</dd> </dl><a NAME="Editor.setLanguage" ID="Editor.setLanguage"></a> <h4>Editor.setLanguage</h4> <b>setLanguage</b>(<i>filename, initTextDisplay = True, propagate = True, pyname = ""</i>)
--- a/DocumentationTools/APIGenerator.py Sat May 15 10:19:07 2010 +0200 +++ b/DocumentationTools/APIGenerator.py Sat May 15 15:29:39 2010 +0200 @@ -27,23 +27,19 @@ Method to generate the source code documentation. @param newStyle flag indicating the api generation for QScintilla 1.7 and - newer (boolean) + newer (boolean) (ignored) @param basePackage name of the base package (string) @param includePrivate flag indicating to include private methods/functions (boolean) @return The API information. (string) """ self.includePrivate = includePrivate - self.newStyle = newStyle - if self.newStyle: - modulePath = self.module.name.split('.') - if modulePath[-1] == '__init__': - del modulePath[-1] - if basePackage: - modulePath[0] = basePackage - self.moduleName = "%s." % '.'.join(modulePath) - else: - self.moduleName = "" + modulePath = self.module.name.split('.') + if modulePath[-1] == '__init__': + del modulePath[-1] + if basePackage: + modulePath[0] = basePackage + self.moduleName = "%s." % '.'.join(modulePath) self.api = [] self.__addGlobalsAPI() self.__addClassesAPI() @@ -64,10 +60,7 @@ """ Private method to generate the api section for global variables. """ - if self.newStyle: - moduleNameStr = "%s" % self.moduleName - else: - moduleNameStr = "" + moduleNameStr = "%s" % self.moduleName for globalName in sorted(self.module.globals.keys()): if not self.__isPrivate(self.module.globals[globalName]): @@ -109,10 +102,7 @@ (self.moduleName, _class.name, id, ', '.join(_class.methods['__init__'].parameters[1:]))) - if self.newStyle: - classNameStr = "%s%s." % (self.moduleName, className) - else: - classNameStr = "" + classNameStr = "%s%s." % (self.moduleName, className) for method in methods: if not self.__isPrivate(_class.methods[method]): if _class.methods[method].isPublic(): @@ -132,10 +122,7 @@ @param classname Name of the class containing the class variables. (string) """ _class = self.module.classes[className] - if self.newStyle: - classNameStr = "%s%s." % (self.moduleName, className) - else: - classNameStr = "" + classNameStr = "%s%s." % (self.moduleName, className) for variable in sorted(_class.globals.keys()): if not self.__isPrivate(_class.globals[variable]): if _class.globals[variable].isPublic():
--- a/DocumentationTools/IndexGenerator.py Sat May 15 10:19:07 2010 +0200 +++ b/DocumentationTools/IndexGenerator.py Sat May 15 15:29:39 2010 +0200 @@ -106,12 +106,13 @@ elt["modules"][moduleDocument.name()] = \ moduleDocument.shortDescription() - def __writeIndex(self, packagename, package): + def __writeIndex(self, packagename, package, newline = None): """ Private method to generate an index file for a package. @param packagename The name of the package. (string) @param package A dictionary with information about the package. + @param newline newline character to be used (string) @return The name of the generated index file. """ if packagename == "00index": @@ -172,19 +173,20 @@ } + \ self.footerTemplate - f = open(filename, "w", encoding = "utf-8") + f = open(filename, "w", encoding = "utf-8", newline = newline) f.write(doc) f.close() return filename - def writeIndices(self, basename = ""): + def writeIndices(self, basename = "", newline = None): """ Public method to generate all index files. @param basename The basename of the file hierarchy to be documented. The basename is stripped off the filename if it starts with the basename. + @param newline newline character to be used (string) """ if not self.remembered: sys.stderr.write("No index to generate.\n") @@ -198,7 +200,7 @@ try: if basename: package = package.replace(basename,"") - out = self.__writeIndex(package, element) + out = self.__writeIndex(package, element, newline) except IOError as v: sys.stderr.write("%s error: %s\n" % (package, v[1])) else:
--- a/DocumentationTools/QtHelpGenerator.py Sat May 15 10:19:07 2010 +0200 +++ b/DocumentationTools/QtHelpGenerator.py Sat May 15 15:29:39 2010 +0200 @@ -167,19 +167,40 @@ joinext("index-%s" % package, ".html")) for subpack in sorted(self.packages[package]["subpackages"]): s += self.__generateSections(subpack, level + 1) + s += '\n' for mod in sorted(self.packages[package]["modules"]): s += indent1 + '<section title="%s" ref="%s" />\n' % \ (mod, joinext(mod, ".html")) - s += indent + '</section>\n' + s += indent + '</section>' return s - def generateFiles(self, basename = ""): + def __convertEol(self, txt, newline): + """ + Private method to convert the newline characters. + + @param txt text to be converted (string) + @param newline newline character to be used (string) + @return converted text (string) + """ + # step 1: normalize eol to '\n' + txt = txt.replace("\r\n", "\n").replace("\r", "\n") + + # step 2: convert to the target eol + if newline is None: + return txt.replace("\n", os.linesep) + elif newline in ["\r", "\r\n"]: + return txt.replace("\n", newline) + else: + return txt + + def generateFiles(self, basename = "", newline = None): """ Public method to generate all index files. @param basename The basename of the file hierarchy to be documented. The basename is stripped off the filename if it starts with the basename. + @param newline newline character to be used (string) """ if not self.remembered: sys.stderr.write("No QtHelp to generate.\n") @@ -210,8 +231,9 @@ "files" : files, } + txt = self.__convertEol(HelpProject % helpAttribs, newline) f = codecs.open(os.path.join(self.outputDir, HelpProjectFile), 'w', 'utf-8') - f.write(HelpProject % helpAttribs) + f.write(txt) f.close() if self.createCollection and \ @@ -219,10 +241,11 @@ collectionAttribs = { "helpfile" : HelpHelpFile, } - + + txt = self.__convertEol(HelpCollection % collectionAttribs, newline) f = codecs.open(os.path.join(self.outputDir, HelpCollectionProjectFile), 'w', 'utf-8') - f.write(HelpCollection % collectionAttribs) + f.write(txt) f.close() sys.stdout.write("QtHelp files written.\n")
--- a/E5XML/Config.py Sat May 15 10:19:07 2010 +0200 +++ b/E5XML/Config.py Sat May 15 15:29:39 2010 +0200 @@ -11,7 +11,7 @@ multiProjectFileFormatVersion = "4.2" # version number of the project file -projectFileFormatVersion = "5.0" +projectFileFormatVersion = "5.1" # version number of the user project file userProjectFileFormatVersion = "4.0"
--- a/E5XML/ProjectHandler.py Sat May 15 10:19:07 2010 +0200 +++ b/E5XML/ProjectHandler.py Sat May 15 15:29:39 2010 +0200 @@ -71,6 +71,7 @@ 'PackagersParams' : (self.startPackagersParams, self.endPackagersParams), 'CheckersParams' : (self.startCheckersParams, self.endCheckersParams), 'OtherToolsParams' : (self.startOtherToolsParams, self.endOtherToolsParams), + 'Eol' : (self.startEol, self.defaultEndElement), # parameters kept for backward compatibility 'UIType' : (self.defaultStartElement, self.endUIType), 'TranslationPrefix' : (self.startTranslationPrefix, @@ -517,6 +518,15 @@ if pattern: self.project.pdata["LEXERASSOCS"][pattern] = lexer + def startEol(self, attrs): + """ + Handler method for the "Eol" start tag. + + @param attrs list of tag attributes + """ + index = int(attrs.get("index", "0")) + self.project.pdata["EOL"] = [index] + def __buildPath(self): """ Private method to assemble a path.
--- a/E5XML/ProjectWriter.py Sat May 15 10:19:07 2010 +0200 +++ b/E5XML/ProjectWriter.py Sat May 15 15:29:39 2010 +0200 @@ -62,8 +62,8 @@ if len(self.pdata["SPELLEXCLUDES"][0]) > 0: self._write(" <ProjectExcludeList>%s</ProjectExcludeList>" % \ Utilities.fromNativeSeparators(self.pdata["SPELLEXCLUDES"][0])) - - # do the hash + + # do the hash self._write(' <Hash>%s</Hash>' % self.pdata["HASH"][0]) # do the programming language @@ -95,6 +95,10 @@ self._write(" <TranslationsBinPath>%s</TranslationsBinPath>" % \ Utilities.fromNativeSeparators(self.pdata["TRANSLATIONSBINPATH"][0])) + # do the eol setting + if self.pdata["EOL"] and self.pdata["EOL"][0]: + self._write(' <Eol index="%d" />' % self.pdata["EOL"][0]) + # do the sources self._write(" <Sources>") for name in self.pdata["SOURCES"]:
--- a/Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.py Sat May 15 10:19:07 2010 +0200 +++ b/Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.py Sat May 15 15:29:39 2010 +0200 @@ -53,12 +53,13 @@ if parms is not None: for key, value in list(parms.items()): self.parameters[key] = parms[key] + self.parameters['outputFile'] = \ + Utilities.toNativeSeparators(self.parameters['outputFile']) self.outputFileCompleter = E5FileCompleter(self.outputFileEdit) self.ignoreDirCompleter = E5DirCompleter(self.ignoreDirEdit) self.recursionCheckBox.setChecked(self.parameters['useRecursion']) - self.oldStyleCheckBox.setChecked(not self.parameters['newStyle']) self.includePrivateCheckBox.setChecked(self.parameters['includePrivate']) self.outputFileEdit.setText(self.parameters['outputFile']) self.baseEdit.setText(self.parameters['basePackage']) @@ -80,7 +81,6 @@ """ self.defaults = { 'useRecursion' : False, - 'newStyle' : True, 'includePrivate' : False, 'outputFile' : '', 'basePackage' : '', @@ -117,7 +117,8 @@ # 2. the commandline options if self.parameters['outputFile'] != self.defaults['outputFile']: - parms['outputFile'] = self.parameters['outputFile'] + parms['outputFile'] = Utilities.fromNativeSeparators( + self.project.getRelativePath(self.parameters['outputFile'])) args.append('-o') if os.path.isabs(self.parameters['outputFile']): args.append(self.parameters['outputFile']) @@ -144,9 +145,6 @@ for ext in self.parameters['sourceExtensions']: args.append('-t') args.append(ext) - if self.parameters['newStyle'] != self.defaults['newStyle']: - parms['newStyle'] = self.parameters['newStyle'] - args.append('--oldstyle') if self.parameters['includePrivate'] != self.defaults['includePrivate']: parms['includePrivate'] = self.parameters['includePrivate'] args.append('-p') @@ -235,7 +233,6 @@ It saves the values in the parameters dictionary. """ self.parameters['useRecursion'] = self.recursionCheckBox.isChecked() - self.parameters['newStyle'] = not self.oldStyleCheckBox.isChecked() self.parameters['includePrivate'] = self.includePrivateCheckBox.isChecked() outfile = self.outputFileEdit.text() if outfile != '': @@ -258,4 +255,4 @@ self.parameters['languages'].append(itm.text()) # call the accept slot of the base class - QDialog.accept(self) \ No newline at end of file + QDialog.accept(self)
--- a/Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.ui Sat May 15 10:19:07 2010 +0200 +++ b/Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.ui Sat May 15 15:29:39 2010 +0200 @@ -1,7 +1,8 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>EricapiConfigDialog</class> - <widget class="QDialog" name="EricapiConfigDialog" > - <property name="geometry" > + <widget class="QDialog" name="EricapiConfigDialog"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> @@ -9,41 +10,41 @@ <height>600</height> </rect> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Ericapi Configuration</string> </property> - <property name="sizeGripEnabled" > + <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QVBoxLayout" name="verticalLayout_2" > + <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <layout class="QGridLayout" > - <item row="0" column="1" > - <widget class="QLineEdit" name="outputFileEdit" > - <property name="toolTip" > + <layout class="QGridLayout"> + <item row="0" column="1"> + <widget class="QLineEdit" name="outputFileEdit"> + <property name="toolTip"> <string>Enter an output filename</string> </property> - <property name="whatsThis" > - <string><b>Output Filename</b><p>Enter the filename of the output file. A '%L' placeholder is replaced by the language of the API file.</p></string> + <property name="whatsThis"> + <string><b>Output Filename</b><p>Enter the filename of the output file. A '%L' placeholder is replaced by the language of the API file.</p></string> </property> </widget> </item> - <item row="0" column="2" > - <widget class="QPushButton" name="outputFileButton" > - <property name="focusPolicy" > + <item row="0" column="2"> + <widget class="QPushButton" name="outputFileButton"> + <property name="focusPolicy"> <enum>Qt::NoFocus</enum> </property> - <property name="toolTip" > + <property name="toolTip"> <string>Press to open a file selection dialog</string> </property> - <property name="text" > + <property name="text"> <string>...</string> </property> </widget> </item> - <item row="0" column="0" > - <widget class="QLabel" name="TextLabel6" > - <property name="text" > + <item row="0" column="0"> + <widget class="QLabel" name="TextLabel6"> + <property name="text"> <string>Output File:</string> </property> </widget> @@ -51,23 +52,23 @@ </layout> </item> <item> - <widget class="QGroupBox" name="groupBox_2" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QGroupBox" name="groupBox_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>1</verstretch> </sizepolicy> </property> - <property name="title" > + <property name="title"> <string>Languages</string> </property> - <layout class="QVBoxLayout" name="verticalLayout" > + <layout class="QVBoxLayout" name="verticalLayout"> <item> - <widget class="QListWidget" name="languagesList" > - <property name="toolTip" > + <widget class="QListWidget" name="languagesList"> + <property name="toolTip"> <string>Select the languages of the APIs to generate</string> </property> - <property name="selectionMode" > + <property name="selectionMode"> <enum>QAbstractItemView::ExtendedSelection</enum> </property> </widget> @@ -76,17 +77,17 @@ </widget> </item> <item> - <layout class="QHBoxLayout" > + <layout class="QHBoxLayout"> <item> - <widget class="QLabel" name="textLabel1_3" > - <property name="text" > + <widget class="QLabel" name="textLabel1_3"> + <property name="text"> <string>Additional source extensions:</string> </property> </widget> </item> <item> - <widget class="QLineEdit" name="sourceExtEdit" > - <property name="toolTip" > + <widget class="QLineEdit" name="sourceExtEdit"> + <property name="toolTip"> <string>Enter additional source extensions separated by a comma</string> </property> </widget> @@ -94,16 +95,16 @@ </layout> </item> <item> - <layout class="QGridLayout" > - <item row="0" column="2" > + <layout class="QGridLayout"> + <item row="0" column="1"> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeType" > + <property name="sizeType"> <enum>QSizePolicy::Expanding</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>31</width> <height>20</height> @@ -111,32 +112,22 @@ </property> </spacer> </item> - <item row="0" column="1" > - <widget class="QCheckBox" name="oldStyleCheckBox" > - <property name="toolTip" > - <string>Select to generate API files for QScintilla prior to 1.7</string> - </property> - <property name="text" > - <string>Generate old style API files</string> - </property> - </widget> - </item> - <item row="0" column="0" > - <widget class="QCheckBox" name="recursionCheckBox" > - <property name="toolTip" > + <item row="0" column="0"> + <widget class="QCheckBox" name="recursionCheckBox"> + <property name="toolTip"> <string>Select to recurse into subdirectories</string> </property> - <property name="text" > + <property name="text"> <string>Recurse into subdirectories</string> </property> </widget> </item> - <item row="1" column="0" colspan="3" > - <widget class="QCheckBox" name="includePrivateCheckBox" > - <property name="toolTip" > + <item row="1" column="0" colspan="2"> + <widget class="QCheckBox" name="includePrivateCheckBox"> + <property name="toolTip"> <string>Select to include private classes, methods and functions in the API file</string> </property> - <property name="text" > + <property name="text"> <string>Include private classes, methods and functions</string> </property> </widget> @@ -144,17 +135,17 @@ </layout> </item> <item> - <layout class="QHBoxLayout" > + <layout class="QHBoxLayout"> <item> - <widget class="QLabel" name="label" > - <property name="text" > + <widget class="QLabel" name="label"> + <property name="text"> <string>Base package name:</string> </property> </widget> </item> <item> - <widget class="QLineEdit" name="baseEdit" > - <property name="toolTip" > + <widget class="QLineEdit" name="baseEdit"> + <property name="toolTip"> <string>Enter the name of the base package</string> </property> </widget> @@ -162,17 +153,17 @@ </layout> </item> <item> - <layout class="QHBoxLayout" > + <layout class="QHBoxLayout"> <item> - <widget class="QLabel" name="label_2" > - <property name="text" > + <widget class="QLabel" name="label_2"> + <property name="text"> <string>Exclude Files:</string> </property> </widget> </item> <item> - <widget class="QLineEdit" name="excludeFilesEdit" > - <property name="toolTip" > + <widget class="QLineEdit" name="excludeFilesEdit"> + <property name="toolTip"> <string>Enter filename patterns of files to be excluded separated by a comma</string> </property> </widget> @@ -180,60 +171,60 @@ </layout> </item> <item> - <widget class="QGroupBox" name="groupBox" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QGroupBox" name="groupBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>2</verstretch> </sizepolicy> </property> - <property name="title" > + <property name="title"> <string>Exclude Directories</string> </property> - <layout class="QGridLayout" > - <item row="1" column="2" > - <widget class="QLineEdit" name="ignoreDirEdit" > - <property name="toolTip" > + <layout class="QGridLayout"> + <item row="1" column="2"> + <widget class="QLineEdit" name="ignoreDirEdit"> + <property name="toolTip"> <string>Enter a directory basename to be ignored</string> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QPushButton" name="addButton" > - <property name="toolTip" > + <item row="1" column="1"> + <widget class="QPushButton" name="addButton"> + <property name="toolTip"> <string>Press to add the entered directory to the list</string> </property> - <property name="text" > + <property name="text"> <string>Add</string> </property> </widget> </item> - <item row="1" column="0" > - <widget class="QPushButton" name="deleteButton" > - <property name="toolTip" > + <item row="1" column="0"> + <widget class="QPushButton" name="deleteButton"> + <property name="toolTip"> <string>Press to delete the selected directory from the list</string> </property> - <property name="text" > + <property name="text"> <string>Delete</string> </property> </widget> </item> - <item row="1" column="3" > - <widget class="QPushButton" name="ignoreDirButton" > - <property name="focusPolicy" > + <item row="1" column="3"> + <widget class="QPushButton" name="ignoreDirButton"> + <property name="focusPolicy"> <enum>Qt::NoFocus</enum> </property> - <property name="toolTip" > + <property name="toolTip"> <string>Press to open a directory selection dialog</string> </property> - <property name="text" > + <property name="text"> <string>...</string> </property> </widget> </item> - <item row="0" column="0" colspan="4" > - <widget class="QListWidget" name="ignoreDirsList" > - <property name="toolTip" > + <item row="0" column="0" colspan="4"> + <widget class="QListWidget" name="ignoreDirsList"> + <property name="toolTip"> <string>List of directory basenames to be ignored</string> </property> </widget> @@ -242,25 +233,24 @@ </widget> </item> <item> - <widget class="QDialogButtonBox" name="buttonBox" > - <property name="orientation" > + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="standardButtons" > + <property name="standardButtons"> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> </property> </widget> </item> </layout> </widget> - <layoutdefault spacing="6" margin="6" /> + <layoutdefault spacing="6" margin="6"/> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> <tabstops> <tabstop>outputFileEdit</tabstop> <tabstop>languagesList</tabstop> <tabstop>sourceExtEdit</tabstop> <tabstop>recursionCheckBox</tabstop> - <tabstop>oldStyleCheckBox</tabstop> <tabstop>includePrivateCheckBox</tabstop> <tabstop>baseEdit</tabstop> <tabstop>excludeFilesEdit</tabstop> @@ -273,48 +263,16 @@ <resources/> <connections> <connection> - <sender>oldStyleCheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>label</receiver> - <slot>setDisabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>195</x> - <y>80</y> - </hint> - <hint type="destinationlabel" > - <x>84</x> - <y>108</y> - </hint> - </hints> - </connection> - <connection> - <sender>oldStyleCheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>baseEdit</receiver> - <slot>setDisabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>266</x> - <y>83</y> - </hint> - <hint type="destinationlabel" > - <x>266</x> - <y>109</y> - </hint> - </hints> - </connection> - <connection> <sender>buttonBox</sender> <signal>accepted()</signal> <receiver>EricapiConfigDialog</receiver> <slot>accept()</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>41</x> <y>477</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>41</x> <y>497</y> </hint> @@ -326,11 +284,11 @@ <receiver>EricapiConfigDialog</receiver> <slot>reject()</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>113</x> <y>480</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>113</x> <y>501</y> </hint>
--- a/Plugins/DocumentationPlugins/Ericdoc/EricdocConfigDialog.py Sat May 15 10:19:07 2010 +0200 +++ b/Plugins/DocumentationPlugins/Ericdoc/EricdocConfigDialog.py Sat May 15 15:29:39 2010 +0200 @@ -71,6 +71,15 @@ self.colors[key] = parms[key] else: self.parameters[key] = parms[key] + self.parameters['outputDirectory'] = \ + Utilities.toNativeSeparators(self.parameters['outputDirectory']) + self.parameters['qtHelpOutputDirectory'] = \ + Utilities.toNativeSeparators(self.parameters['qtHelpOutputDirectory']) + self.parameters['cssFile'] = \ + Utilities.toNativeSeparators(self.parameters['cssFile']) + if self.parameters['cssFile'].startswith("%PYTHON%"): + self.parameters['cssFile'] = self.parameters['cssFile'].replace( + "%PYTHON%", Utilities.getPythonModulesDirectory()) self.ppath = project.getProjectPath() self.project = project @@ -151,7 +160,8 @@ # 2. the commandline options # 2a. general commandline options if self.parameters['outputDirectory'] != self.defaults['outputDirectory']: - parms['outputDirectory'] = self.parameters['outputDirectory'] + parms['outputDirectory'] = Utilities.fromNativeSeparators( + self.project.getRelativePath(self.parameters['outputDirectory'])) args.append('-o') if os.path.isabs(self.parameters['outputDirectory']): args.append(self.parameters['outputDirectory']) @@ -183,7 +193,11 @@ # 2b. style commandline options if self.parameters['cssFile'] != self.defaults['cssFile']: - parms['cssFile'] = self.parameters['cssFile'] + cssFile = self.project.getRelativePath(self.parameters['cssFile']) + if cssFile.startswith(Utilities.getPythonModulesDirectory()): + cssFile = cssFile.replace( + Utilities.getPythonModulesDirectory(), "%PYTHON%") + parms['cssFile'] = Utilities.fromNativeSeparators(cssFile) args.append('-c') if os.path.isabs(self.parameters['cssFile']): args.append(self.parameters['cssFile']) @@ -201,7 +215,8 @@ args.append('--create-qhp') if self.parameters['qtHelpOutputDirectory'] != \ self.defaults['qtHelpOutputDirectory']: - parms['qtHelpOutputDirectory'] = self.parameters['qtHelpOutputDirectory'] + parms['qtHelpOutputDirectory'] = Utilities.fromNativeSeparators( + self.project.getRelativePath(self.parameters['qtHelpOutputDirectory'])) if os.path.isabs(self.parameters['outputDirectory']): args.append("--qhp-outdir=%s" % self.parameters['qtHelpOutputDirectory']) else: @@ -507,4 +522,4 @@ self.qtHelpGenerateCollectionCheckBox.isChecked() # call the accept slot of the base class - QDialog.accept(self) \ No newline at end of file + QDialog.accept(self)
--- a/Plugins/PluginEricapi.py Sat May 15 10:19:07 2010 +0200 +++ b/Plugins/PluginEricapi.py Sat May 15 15:29:39 2010 +0200 @@ -139,6 +139,11 @@ """ Private slot to perform the eric5-api api generation. """ + eolTranslation = { + '\r' : 'cr', + '\n' : 'lf', + '\r\n' : 'crlf', + } project = e5App().getObject("Project") parms = project.getData('DOCUMENTATIONPARMS', "ERIC4API") dlg = EricapiConfigDialog(project, parms) @@ -146,14 +151,18 @@ args, parms = dlg.generateParameters() project.setData('DOCUMENTATIONPARMS', "ERIC4API", parms) + # add parameter for the eol setting + if not project.useSystemEol(): + args.append("--eol=%s" % eolTranslation[project.getEolString()]) + # now do the call dia = EricapiExecDialog("Ericapi") res = dia.start(args, project.ppath) if res: dia.exec_() - + outputFileName = parms['outputFile'] - + # add output files to the project data, if they aren't in already for progLanguage in parms['languages']: if "%L" in outputFileName: @@ -169,4 +178,4 @@ if outfile not in project.pdata['OTHERS']: project.pdata['OTHERS'].append(outfile) project.setDirty(True) - project.othersAdded(outfile) \ No newline at end of file + project.othersAdded(outfile)
--- a/Plugins/PluginEricdoc.py Sat May 15 10:19:07 2010 +0200 +++ b/Plugins/PluginEricdoc.py Sat May 15 15:29:39 2010 +0200 @@ -139,6 +139,11 @@ """ Private slot to perform the eric5-doc api documentation generation. """ + eolTranslation = { + '\r' : 'cr', + '\n' : 'lf', + '\r\n' : 'crlf', + } project = e5App().getObject("Project") parms = project.getData('DOCUMENTATIONPARMS', "ERIC4DOC") dlg = EricdocConfigDialog(project, parms) @@ -146,6 +151,10 @@ args, parms = dlg.generateParameters() project.setData('DOCUMENTATIONPARMS', "ERIC4DOC", parms) + # add parameter for the eol setting + if not project.useSystemEol(): + args.append("--eol=%s" % eolTranslation[project.getEolString()]) + # now do the call dia = EricdocExecDialog("Ericdoc") res = dia.start(args, project.ppath) @@ -173,4 +182,4 @@ if outdir not in project.pdata['OTHERS']: project.pdata['OTHERS'].append(outdir) project.setDirty(True) - project.othersAdded(outdir) \ No newline at end of file + project.othersAdded(outdir)
--- a/Project/CreateDialogCodeDialog.py Sat May 15 10:19:07 2010 +0200 +++ b/Project/CreateDialogCodeDialog.py Sat May 15 15:29:39 2010 +0200 @@ -393,7 +393,12 @@ # write the new code try: - srcFile = open(self.filenameEdit.text(), 'w', encoding = "utf-8") + if self.project.useSystemEol(): + newline = None + else: + newline = self.project.getEolString() + srcFile = open(self.filenameEdit.text(), 'w', encoding = "utf-8", + newline = newline) srcFile.write("".join(sourceImpl)) srcFile.close() except IOError as why:
--- a/Project/Project.py Sat May 15 10:19:07 2010 +0200 +++ b/Project/Project.py Sat May 15 15:29:39 2010 +0200 @@ -120,7 +120,7 @@ "SOURCES", "FORMS", "RESOURCES", "TRANSLATIONS", "TRANSLATIONPATTERN", "TRANSLATIONSBINPATH", "TRANSLATIONEXCEPTIONS", - "MAINSCRIPT", + "MAINSCRIPT", "EOL", "VCS", "VCSOPTIONS", "VCSOTHERDATA", "OTHERS", "INTERFACES", "FILETYPES", "LEXERASSOCS", @@ -144,6 +144,8 @@ "VCSOVERRIDE", "VCSSTATUSMONITORINTERVAL", ] + eols = [os.linesep, "\n", "\r", "\r\n"] + def __init__(self, parent = None, filename = None): """ Constructor @@ -318,6 +320,7 @@ self.pdata["PACKAGERSPARMS"] = {} self.pdata["DOCUMENTATIONPARMS"] = {} self.pdata["OTHERTOOLSPARMS"] = {} + self.pdata["EOL"] = [0] self.__initDebugProperties() @@ -752,6 +755,10 @@ @return flag indicating success (boolean) """ try: + if self.pdata["EOL"][0] == 0: + newline = None + else: + newline = self.getEolString() if fn.lower().endswith("e4pz"): try: import gzip @@ -761,9 +768,9 @@ self.trUtf8("""Compressed project files not supported.""" """ The compression library is missing.""")) return False - f = io.StringIO() + f = io.StringIO(newline = newline) else: - f = open(fn, "w", encoding = "utf-8") + f = open(fn, "w", encoding = "utf-8", newline = newline) ProjectWriter(f, os.path.splitext(os.path.basename(fn))[0]).writeXML() @@ -3224,6 +3231,22 @@ fn = os.path.join(self.ppath, Utilities.toNativeSeparators(fn)) return fn + def getEolString(self): + """ + Public method to get the EOL-string to be used by the project. + + @return eol string (string) + """ + return self.eols[self.pdata["EOL"][0]] + + def useSystemEol(self): + """ + Public method to check, if the project uses the system eol setting. + + @return flag indicating the usage of system eol (boolean) + """ + return self.pdata["EOL"][0] == 0 + def isProjectFile(self, fn): """ Public method used to check, if the passed in filename belongs to the project. @@ -4465,7 +4488,11 @@ # write the file try: - pkglistFile = open(pkglist, "w", encoding = "utf-8") + if self.pdata["EOL"][0] == 0: + newline = None + else: + newline = self.getEolString() + pkglistFile = open(pkglist, "w", encoding = "utf-8", newline = newline) pkglistFile.write("\n".join(lst)) pkglistFile.close() except IOError as why:
--- a/Project/ProjectFormsBrowser.py Sat May 15 10:19:07 2010 +0200 +++ b/Project/ProjectFormsBrowser.py Sat May 15 15:29:39 2010 +0200 @@ -611,7 +611,11 @@ if exitStatus == QProcess.NormalExit and exitCode == 0 and self.buf: ofn = os.path.join(self.project.ppath, self.compiledFile) try: - f = open(ofn, "w", encoding = "utf-8") + if self.project.useSystemEol(): + newline = None + else: + newline = self.project.getEolString() + f = open(ofn, "w", encoding = "utf-8", newline = newline) for line in self.buf.splitlines(): f.write(line + "\n") f.close()
--- a/Project/ProjectOthersBrowser.py Sat May 15 10:19:07 2010 +0200 +++ b/Project/ProjectOthersBrowser.py Sat May 15 15:29:39 2010 +0200 @@ -8,7 +8,6 @@ the other categories. """ -import os import mimetypes from PyQt4.QtCore import *
--- a/Project/ProjectResourcesBrowser.py Sat May 15 10:19:07 2010 +0200 +++ b/Project/ProjectResourcesBrowser.py Sat May 15 15:29:39 2010 +0200 @@ -416,7 +416,11 @@ return try: - rcfile = open(fname, 'w', encoding = "utf-8") + if self.project.useSystemEol(): + newline = None + else: + newline = self.project.getEolString() + rcfile = open(fname, 'w', encoding = "utf-8", newline = newline) rcfile.write('<!DOCTYPE RCC>\n') rcfile.write('<RCC version="1.0">\n') rcfile.write('<qresource>\n') @@ -426,8 +430,9 @@ except IOError as e: QMessageBox.critical(self, self.trUtf8("New Resource"), - self.trUtf8("<p>The new resource file <b>{0}</b> could not be created.<br>" - "Problem: {1}</p>").format(fname, str(e))) + self.trUtf8("<p>The new resource file <b>{0}</b> could not" + " be created.<br>Problem: {1}</p>")\ + .format(fname, str(e))) return self.project.appendFile(fname) @@ -505,7 +510,11 @@ if exitStatus == QProcess.NormalExit and exitCode == 0 and self.buf: ofn = os.path.join(self.project.ppath, self.compiledFile) try: - f = open(ofn, "w", encoding = "utf-8") + if self.project.useSystemEol(): + newline = None + else: + newline = self.project.getEolString() + f = open(ofn, "w", encoding = "utf-8", newline = newline) for line in self.buf.splitlines(): f.write(line + "\n") f.close()
--- a/Project/PropertiesDialog.py Sat May 15 10:19:07 2010 +0200 +++ b/Project/PropertiesDialog.py Sat May 15 15:29:39 2010 +0200 @@ -95,6 +95,10 @@ self.descriptionEdit.setPlainText(self.project.pdata["DESCRIPTION"][0]) except LookupError: pass + try: + self.eolComboBox.setCurrentIndex(self.project.pdata["EOL"][0]) + except IndexError: + pass self.vcsLabel.show() if self.project.vcs is not None: vcsSystemsDict = e5App().getObject("PluginManager")\ @@ -251,6 +255,7 @@ projectType = self.getProjectType() if projectType is not None: self.project.pdata["PROJECTTYPE"] = [projectType] + self.project.pdata["EOL"] = [self.eolComboBox.currentIndex()] if self.spellPropertiesDlg is not None: self.spellPropertiesDlg.storeData()
--- a/Project/PropertiesDialog.ui Sat May 15 10:19:07 2010 +0200 +++ b/Project/PropertiesDialog.ui Sat May 15 15:29:39 2010 +0200 @@ -1,283 +1,321 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>PropertiesDialog</class> - <widget class="QDialog" name="PropertiesDialog" > - <property name="geometry" > + <widget class="QDialog" name="PropertiesDialog"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>600</width> - <height>529</height> + <height>559</height> </rect> </property> - <property name="maximumSize" > + <property name="maximumSize"> <size> <width>16777215</width> <height>16777215</height> </size> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Project Properties</string> </property> - <property name="whatsThis" > - <string><b>Project Properties Dialog</b> -<p>This dialog is used to show and edit the projects properties.</p> -<p>If the project is controlled by a version control system, the "Show Repository Info" button displays information about the repository.</p></string> + <property name="whatsThis"> + <string><b>Project Properties Dialog</b> +<p>This dialog is used to show and edit the projects properties.</p> +<p>If the project is controlled by a version control system, the "Show Repository Info" button displays information about the repository.</p></string> </property> - <property name="sizeGripEnabled" > + <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QVBoxLayout" name="verticalLayout" > + <layout class="QVBoxLayout" name="verticalLayout"> <item> - <layout class="QGridLayout" name="gridLayout" > - <item row="0" column="0" > - <widget class="QLabel" name="nameLabel" > - <property name="text" > + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="nameLabel"> + <property name="text"> <string>Project &Name:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>nameEdit</cstring> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QLineEdit" name="nameEdit" > - <property name="toolTip" > + <item row="0" column="1"> + <widget class="QLineEdit" name="nameEdit"> + <property name="toolTip"> <string>Enter the project name</string> </property> - <property name="whatsThis" > - <string><b>Project Name</b> -<p>Enter the project name</p></string> + <property name="whatsThis"> + <string><b>Project Name</b> +<p>Enter the project name</p></string> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QPushButton" name="spellPropertiesButton" > - <property name="toolTip" > + <item row="1" column="1"> + <widget class="QPushButton" name="spellPropertiesButton"> + <property name="toolTip"> <string>Press to edit the spell checking properties</string> </property> - <property name="text" > + <property name="text"> <string>Spell Checking Properties...</string> </property> </widget> </item> - <item row="2" column="0" > - <widget class="QLabel" name="textLabel1" > - <property name="text" > + <item row="2" column="0"> + <widget class="QLabel" name="textLabel1"> + <property name="text"> <string>&Progr. Language:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>languageComboBox</cstring> </property> </widget> </item> - <item row="2" column="1" > - <widget class="QComboBox" name="languageComboBox" > - <property name="toolTip" > + <item row="2" column="1"> + <widget class="QComboBox" name="languageComboBox"> + <property name="toolTip"> <string>Select the project's programming language</string> </property> </widget> </item> - <item row="3" column="1" > - <widget class="QCheckBox" name="mixedLanguageCheckBox" > - <property name="toolTip" > + <item row="3" column="1"> + <widget class="QCheckBox" name="mixedLanguageCheckBox"> + <property name="toolTip"> <string>Select, if the project uses other programming languages as well</string> </property> - <property name="text" > + <property name="text"> <string>Mi&xed programming languages</string> </property> - <property name="shortcut" > + <property name="shortcut"> <string>Alt+X</string> </property> </widget> </item> - <item row="4" column="0" > - <widget class="QLabel" name="textLabel1_2" > - <property name="text" > + <item row="4" column="0"> + <widget class="QLabel" name="textLabel1_2"> + <property name="text"> <string>Project &Type:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>projectTypeComboBox</cstring> </property> </widget> </item> - <item row="4" column="1" > - <widget class="QComboBox" name="projectTypeComboBox" > - <property name="toolTip" > + <item row="4" column="1"> + <widget class="QComboBox" name="projectTypeComboBox"> + <property name="toolTip"> <string>Select the type of the project</string> </property> </widget> </item> - <item row="5" column="0" > - <widget class="QLabel" name="dirLabel" > - <property name="text" > + <item row="5" column="0"> + <widget class="QLabel" name="dirLabel"> + <property name="text"> <string>Project &Directory:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>dirEdit</cstring> </property> </widget> </item> - <item row="5" column="1" > - <widget class="QLineEdit" name="dirEdit" > - <property name="toolTip" > + <item row="5" column="1"> + <widget class="QLineEdit" name="dirEdit"> + <property name="toolTip"> <string>Enter the project directory</string> </property> - <property name="whatsThis" > - <string><b>Project Directory</b> -<p>Enter the project directory. You may select it - with a dialog by pressing the button to the right.</p></string> + <property name="whatsThis"> + <string><b>Project Directory</b> +<p>Enter the project directory. You may select it + with a dialog by pressing the button to the right.</p></string> </property> </widget> </item> - <item row="5" column="2" > - <widget class="QPushButton" name="dirButton" > - <property name="toolTip" > + <item row="5" column="2"> + <widget class="QPushButton" name="dirButton"> + <property name="toolTip"> <string>Show directory selection dialog</string> </property> - <property name="whatsThis" > - <string><b>Project Directory</b> -<p>Select a project directory via a directory selection dialog.</p></string> + <property name="whatsThis"> + <string><b>Project Directory</b> +<p>Select a project directory via a directory selection dialog.</p></string> </property> - <property name="text" > + <property name="text"> <string>...</string> </property> </widget> </item> - <item row="6" column="0" > - <widget class="QLabel" name="versionLabel" > - <property name="text" > + <item row="6" column="0"> + <widget class="QLabel" name="versionLabel"> + <property name="text"> <string>&Version No.:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>versionEdit</cstring> </property> </widget> </item> - <item row="6" column="1" > - <widget class="QLineEdit" name="versionEdit" > - <property name="toolTip" > + <item row="6" column="1"> + <widget class="QLineEdit" name="versionEdit"> + <property name="toolTip"> <string>Enter the version number</string> </property> - <property name="whatsThis" > - <string><b>Version No.</b> -<p>Enter the version no.</p></string> + <property name="whatsThis"> + <string><b>Version No.</b> +<p>Enter the version no.</p></string> </property> </widget> </item> - <item row="7" column="0" > - <widget class="QLabel" name="mainscriptLabel" > - <property name="text" > + <item row="7" column="0"> + <widget class="QLabel" name="mainscriptLabel"> + <property name="text"> <string>&Main Script:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>mainscriptEdit</cstring> </property> </widget> </item> - <item row="7" column="1" > - <widget class="QLineEdit" name="mainscriptEdit" > - <property name="toolTip" > + <item row="7" column="1"> + <widget class="QLineEdit" name="mainscriptEdit"> + <property name="toolTip"> <string>Enter the main script</string> </property> - <property name="whatsThis" > - <string><b>Main Script</b> -<p>Enter the main script of the project. You may select it - with a dialog by pressing the button to the right.</p></string> + <property name="whatsThis"> + <string><b>Main Script</b> +<p>Enter the main script of the project. You may select it + with a dialog by pressing the button to the right.</p></string> </property> </widget> </item> - <item row="7" column="2" > - <widget class="QPushButton" name="mainscriptButton" > - <property name="toolTip" > + <item row="7" column="2"> + <widget class="QPushButton" name="mainscriptButton"> + <property name="toolTip"> <string>Show file selection dialog</string> </property> - <property name="whatsThis" > - <string><b>Main Script</b> -<p>Select the projects main script via a file selection dialog.</p></string> + <property name="whatsThis"> + <string><b>Main Script</b> +<p>Select the projects main script via a file selection dialog.</p></string> </property> - <property name="text" > + <property name="text"> <string>...</string> </property> </widget> </item> - <item row="8" column="1" > - <widget class="QPushButton" name="transPropertiesButton" > - <property name="toolTip" > + <item row="8" column="1"> + <widget class="QPushButton" name="transPropertiesButton"> + <property name="toolTip"> <string>Press to edit the translations properties</string> </property> - <property name="text" > + <property name="text"> <string>Translations Properties...</string> </property> </widget> </item> - <item row="9" column="0" > - <widget class="QLabel" name="authorLabel" > - <property name="text" > + <item row="9" column="0"> + <widget class="QLabel" name="eolLabel"> + <property name="text"> + <string>End of &Line Character:</string> + </property> + <property name="buddy"> + <cstring>eolComboBox</cstring> + </property> + </widget> + </item> + <item row="9" column="1"> + <widget class="QComboBox" name="eolComboBox"> + <property name="toolTip"> + <string>Select the end of line character to be used by the project</string> + </property> + <item> + <property name="text"> + <string>System</string> + </property> + </item> + <item> + <property name="text"> + <string>Unix</string> + </property> + </item> + <item> + <property name="text"> + <string>Macintosh</string> + </property> + </item> + <item> + <property name="text"> + <string>Windows/DOS</string> + </property> + </item> + </widget> + </item> + <item row="10" column="0"> + <widget class="QLabel" name="authorLabel"> + <property name="text"> <string>&Author:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>authorEdit</cstring> </property> </widget> </item> - <item row="9" column="1" > - <widget class="QLineEdit" name="authorEdit" > - <property name="toolTip" > + <item row="10" column="1"> + <widget class="QLineEdit" name="authorEdit"> + <property name="toolTip"> <string>Enter authors name</string> </property> - <property name="whatsThis" > - <string><b>Author</b> -<p>Enter the name of the author.</p></string> + <property name="whatsThis"> + <string><b>Author</b> +<p>Enter the name of the author.</p></string> </property> </widget> </item> - <item row="10" column="0" > - <widget class="QLabel" name="emailLabel" > - <property name="text" > + <item row="11" column="0"> + <widget class="QLabel" name="emailLabel"> + <property name="text"> <string>&Email:</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>emailEdit</cstring> </property> </widget> </item> - <item row="10" column="1" > - <widget class="QLineEdit" name="emailEdit" > - <property name="toolTip" > + <item row="11" column="1"> + <widget class="QLineEdit" name="emailEdit"> + <property name="toolTip"> <string>Enter authors email</string> </property> - <property name="whatsThis" > - <string><b>Email</b> -<p>Enter the email address of the author</p></string> + <property name="whatsThis"> + <string><b>Email</b> +<p>Enter the email address of the author</p></string> </property> </widget> </item> - <item row="11" column="0" > - <widget class="QLabel" name="descriptionLabel" > - <property name="text" > + <item row="12" column="0"> + <widget class="QLabel" name="descriptionLabel"> + <property name="text"> <string>&Description:</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignTop</set> </property> - <property name="buddy" > + <property name="buddy"> <cstring>descriptionEdit</cstring> </property> </widget> </item> - <item row="11" column="1" > - <widget class="QTextEdit" name="descriptionEdit" > - <property name="toolTip" > + <item row="12" column="1"> + <widget class="QTextEdit" name="descriptionEdit"> + <property name="toolTip"> <string>Enter description</string> </property> - <property name="whatsThis" > - <string><b>Description</b> -<p>Enter a short description for the project.</p></string> + <property name="whatsThis"> + <string><b>Description</b> +<p>Enter a short description for the project.</p></string> </property> - <property name="tabChangesFocus" > + <property name="tabChangesFocus"> <bool>true</bool> </property> - <property name="acceptRichText" > + <property name="acceptRichText"> <bool>false</bool> </property> </widget> @@ -285,29 +323,29 @@ </layout> </item> <item> - <layout class="QHBoxLayout" name="_2" > + <layout class="QHBoxLayout" name="_2"> <item> - <widget class="QLabel" name="vcsLabel" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > + <widget class="QLabel" name="vcsLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string/> </property> </widget> </item> <item> - <widget class="QPushButton" name="vcsInfoButton" > - <property name="toolTip" > + <widget class="QPushButton" name="vcsInfoButton"> + <property name="toolTip"> <string>Press to show information about the repository</string> </property> - <property name="text" > + <property name="text"> <string>Show &Repository Info</string> </property> - <property name="shortcut" > + <property name="shortcut"> <string>Alt+R</string> </property> </widget> @@ -315,18 +353,18 @@ </layout> </item> <item> - <widget class="QDialogButtonBox" name="buttonBox" > - <property name="orientation" > + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="standardButtons" > + <property name="standardButtons"> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> </property> </widget> </item> </layout> </widget> - <layoutdefault spacing="6" margin="6" /> + <layoutdefault spacing="6" margin="6"/> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> <tabstops> <tabstop>nameEdit</tabstop> @@ -340,6 +378,7 @@ <tabstop>mainscriptEdit</tabstop> <tabstop>mainscriptButton</tabstop> <tabstop>transPropertiesButton</tabstop> + <tabstop>eolComboBox</tabstop> <tabstop>authorEdit</tabstop> <tabstop>emailEdit</tabstop> <tabstop>descriptionEdit</tabstop> @@ -354,11 +393,11 @@ <receiver>PropertiesDialog</receiver> <slot>accept()</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>57</x> <y>511</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>57</x> <y>529</y> </hint> @@ -370,11 +409,11 @@ <receiver>PropertiesDialog</receiver> <slot>reject()</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>143</x> <y>516</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>145</x> <y>531</y> </hint>
--- a/QScintilla/Editor.py Sat May 15 10:19:07 2010 +0200 +++ b/QScintilla/Editor.py Sat May 15 15:29:39 2010 +0200 @@ -2415,14 +2415,18 @@ self.lastModified = QFileInfo(fn).lastModified() return (False, None) - def saveFileAs(self, path = None): + def saveFileAs(self, path = None, toProject = False): """ Public slot to save a file with a new name. @param path directory to save the file in (string) + @keyparam toProject flag indicating a save to project operation (boolean) @return tuple of two values (boolean, string) giving a success indicator and the name of the saved file """ + if toProject: + self.setEolModeByEolString(self.project.getEolString()) + self.convertEols(self.eolMode()) return self.saveFile(True, path) def handleRenamed(self, fn): @@ -3342,9 +3346,14 @@ """ Private method to configure the eol mode of the editor. """ - eolMode = Preferences.getEditor("EOLMode") - eolMode = QsciScintilla.EolMode(eolMode) - self.setEolMode(eolMode) + if self.fileName and \ + self.project.isOpen() and \ + self.project.isProjectFile(self.fileName): + self.setEolModeByEolString(self.project.getEolString()) + else: + eolMode = Preferences.getEditor("EOLMode") + eolMode = QsciScintilla.EolMode(eolMode) + self.setEolMode(eolMode) self.__eolChanged() def __setAutoCompletion(self): @@ -5256,6 +5265,9 @@ pwl, pel = self.project.getProjectDictionaries() self.__setSpellingLanguage(self.project.getProjectSpellLanguage(), pwl = pwl, pel = pel) + + self.setEolModeByEolString(self.project.getEolString()) + self.convertEols(self.eolMode()) def addedToProject(self): """ @@ -5265,7 +5277,7 @@ pwl, pel = self.project.getProjectDictionaries() self.__setSpellingLanguage(self.project.getProjectSpellLanguage(), pwl = pwl, pel = pel) - self.connect(project, SIGNAL("projectPropertiesChanged"), + self.connect(self.project, SIGNAL("projectPropertiesChanged"), self.__projectPropertiesChanged) #######################################################################
--- a/ViewManager/ViewManager.py Sat May 15 10:19:07 2010 +0200 +++ b/ViewManager/ViewManager.py Sat May 15 15:29:39 2010 +0200 @@ -3524,7 +3524,7 @@ pro = e5App().getObject("Project") path = pro.ppath if ed: - ok, newName = ed.saveFileAs(path) + ok, newName = ed.saveFileAs(path, toProject = True) if ok: self.setEditorName(ed, newName) pro.appendFile(newName)
--- a/changelog Sat May 15 10:19:07 2010 +0200 +++ b/changelog Sat May 15 15:29:39 2010 +0200 @@ -6,8 +6,9 @@ - added code to configure the zoom factor a file is opened with - added code to update the file browser window (mostly) automatically - added code to update the Others tab of the project browser (mostly) automatically -- added a menu to the highlighting styles config page to change individual - aspects of a font only +- added a menu to the highlighting styles config page to change individual + aspects of a font only +- changed code to improve development on multiple platforms Version 5.0-snapshot-20100508: - bug fixes
--- a/eric5-api.py Sat May 15 10:19:07 2010 +0200 +++ b/eric5-api.py Sat May 15 15:29:39 2010 +0200 @@ -43,15 +43,22 @@ print() print("Options:") print() - print(" -b name or --base name") + print(" -b name or --base=name") print(" Use the given name as the name of the base package.") + print(" -e eol-type or --eol=eol-type") + print(" Use the given eol type to terminate lines.") + print(" Valid values are 'cr', 'lf' and 'crlf'.") + print(" --exclude-file=pattern") + print(" Specify a filename pattern of files to be excluded.") + print(" This option may be repeated multiple times.") print(" -h or --help") print(" Show this help and exit.") + print(" -l language or --language=language") + print(" Generate an API file for the given programming language.") + print(" Supported programming languages are:") print(" -o filename or --output=filename") print(" Write the API information to the named file. A '%L' placeholder") print(" is replaced by the language of the API file (see --language).") - print(" --oldstyle") - print(" Generate API files for QScintilla prior to 1.7.") print(" -p or --private") print(" Include private methods and functions.") print(" -R, -r or --recursive") @@ -64,12 +71,6 @@ print(" -x directory or --exclude=directory") print(" Specify a directory basename to be excluded.") print(" This option may be repeated multiple times.") - print(" --exclude-file=pattern") - print(" Specify a filename pattern of files to be excluded.") - print(" This option may be repeated multiple times.") - print(" -l language or --language=language") - print(" Generate an API file for the given programming language.") - print(" Supported programming languages are:") for lang in sorted(DocumentationTools.supportedExtensionsDictForApis.keys()): print(" * %s" % lang) print(" The default is 'Python'.") @@ -99,9 +100,9 @@ import getopt try: - opts, args = getopt.getopt(sys.argv[1:], "b:hl:o:pRrt:Vx:", - ["base=", "exclude=", "exclude-file=", "extension=", "help", - "language=", "oldstyle", "output=", "private", "recursive", + opts, args = getopt.getopt(sys.argv[1:], "b:e:hl:o:pRrt:Vx:", + ["base=", "eol=", "exclude=", "exclude-file=", "extension=", "help", + "language=", "output=", "private", "recursive", "version", ]) except getopt.error: usage() @@ -111,11 +112,11 @@ excludePatterns = [] outputFileName = "" recursive = False - newStyle = True basePackage = "" includePrivate = False progLanguages = [] extensions = [] + newline = None for k, v in opts: if k in ["-o", "--output"]: @@ -134,19 +135,25 @@ if not v.startswith("."): v = ".%s" % v extensions.append(v) - elif k in ["--oldstyle"]: - newStyle = False elif k in ["-b", "--base"]: basePackage = v elif k in ["-p", "--private"]: includePrivate = True elif k in ["-l", "--language"]: if v not in progLanguages: - if v not in list(DocumentationTools.supportedExtensionsDictForApis.keys()): + if v not in \ + list(DocumentationTools.supportedExtensionsDictForApis.keys()): sys.stderr.write("Wrong language given: %s. Aborting\n" % v) sys.exit(1) else: progLanguages.append(v) + elif k in ["-e", "--eol"]: + if v.lower() == "cr": + newline = '\r' + elif v.lower() == "lf": + newline = '\n' + elif v.lower() == "crlf": + newline = '\r\n' if not args: usage() @@ -232,7 +239,7 @@ module = Utilities.ModuleParser.readModule(file, basename = basename, inpackage = inpackage) apiGenerator = APIGenerator(module) - api = apiGenerator.genAPI(newStyle, basePackage, includePrivate) + api = apiGenerator.genAPI(True, basePackage, includePrivate) except IOError as v: sys.stderr.write("%s error: %s\n" % (file, v[1])) continue @@ -249,8 +256,8 @@ if outdir and not os.path.exists(outdir): os.makedirs(outdir) try: - out = open(outputFile, "w", encoding = "utf-8") - out.write("\n".join(sorted(apis))) + out = open(outputFile, "w", encoding = "utf-8", newline = newline) + out.write("\n".join(sorted(apis)) + "\n") out.close() except IOError as v: sys.stderr.write("%s error: %s\n" % (outputFile, v[1]))
--- a/eric5-doc.py Sat May 15 10:19:07 2010 +0200 +++ b/eric5-doc.py Sat May 15 15:29:39 2010 +0200 @@ -52,6 +52,12 @@ print(" Specify a CSS style sheet file to be used.") print(" -e or --noempty") print(" Don't include empty modules.") + print(" --eol=eol-type") + print(" Use the given eol type to terminate lines.") + print(" Valid values are 'cr', 'lf' and 'crlf'.") + print(" --exclude-file=pattern") + print(" Specify a filename pattern of files to be excluded.") + print(" This option may be repeated multiple times.") print(" -h or --help") print(" Show this help and exit.") print(" -i or --noindex") @@ -68,9 +74,6 @@ print(" -x directory or --exclude=directory") print(" Specify a directory basename to be excluded.") print(" This option may be repeated multiple times.") - print(" --exclude-file=pattern") - print(" Specify a filename pattern of files to be excluded.") - print(" This option may be repeated multiple times.") print() print(" --body-color=color") print(" Specify the text color.") @@ -136,7 +139,7 @@ opts, args = getopt.getopt(sys.argv[1:], "c:ehio:Rrt:Vx:", ["exclude=", "extension=", "help", "noindex", "noempty", "outdir=", "recursive", "style-sheet=", "version", - "exclude-file=", + "exclude-file=", "eol=", "body-color=", "body-background-color=", "l1header-color=", "l1header-background-color=", "l2header-color=", "l2header-background-color=", @@ -156,6 +159,8 @@ recursive = False doIndex = True noempty = False + newline = None + stylesheetFile = "" colors = eric5docDefaultColors.copy() @@ -191,6 +196,13 @@ if not v.startswith("."): v = ".%s" % v supportedExtensions.append(v) + elif k == "--eol": + if v.lower() == "cr": + newline = '\r' + elif v.lower() == "lf": + newline = '\n' + elif v.lower() == "crlf": + newline = '\r\n' elif k == "--body-color": colors['BodyColor'] = v @@ -362,7 +374,7 @@ # generate output try: - out = open(f, "w", encoding = "utf-8") + out = open(f, "w", encoding = "utf-8", newline = newline) out.write(doc) out.close() except IOError as v: @@ -376,11 +388,11 @@ # write index files if doIndex: - indexGenerator.writeIndices(basename) + indexGenerator.writeIndices(basename, newline = newline) # generate the QtHelp files if qtHelpCreation: - qtHelpGenerator.generateFiles() + qtHelpGenerator.generateFiles(newline = newline) sys.exit(0)
--- a/eric5.e4p Sat May 15 10:19:07 2010 +0200 +++ b/eric5.e4p Sat May 15 15:29:39 2010 +0200 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE Project SYSTEM "Project-5.0.dtd"> +<!DOCTYPE Project SYSTEM "Project-5.1.dtd"> <!-- eric5 project file for project eric5 --> -<Project version="5.0"> +<Project version="5.1"> <Language>en_US</Language> <ProjectWordList>Dictionaries/words.dic</ProjectWordList> <ProjectExcludeList>Dictionaries/excludes.dic</ProjectExcludeList> @@ -13,6 +13,7 @@ <Author>Detlev Offenbach</Author> <Email>detlev@die-offenbachs.de</Email> <TranslationPattern>i18n/eric5_%language%.ts</TranslationPattern> + <Eol index="1" /> <Sources> <Source>__init__.py</Source> <Source>Preferences/__init__.py</Source> @@ -1244,13 +1245,16 @@ <string>Styles</string> <string>CodeTemplates</string> <string>.ropeproject</string> - <string>.svn</string> - <string>_svn</string> - <string>.eric4project</string> - <string>_eric4project</string> <string>patches</string> <string>Dictionaries</string> <string>coverage</string> + <string>.eric5project</string> + <string>_eric5project</string> + <string>_ropeproject</string> + <string>.hg</string> + <string>_hg</string> + <string>.directory</string> + <string>.issues</string> </list> </value> <key> @@ -1358,15 +1362,16 @@ <string>Styles</string> <string>CodeTemplates</string> <string>.ropeproject</string> - <string>.svn</string> - <string>_svn</string> - <string>.eric4project</string> - <string>_eric4project</string> <string>patches</string> <string>Dictionaries</string> <string>coverage</string> <string>.eric5project</string> <string>_eric5project</string> + <string>_ropeproject</string> + <string>.hg</string> + <string>_hg</string> + <string>.directory</string> + <string>.issues</string> </list> </value> <key> @@ -1444,4 +1449,4 @@ </dict> </DocumentationParams> </Documentation> -</Project> +</Project> \ No newline at end of file