Project/Project.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 3056
9986ec0e559a
parent 3010
befeff46ec0f
child 3058
0a02c433f52d
--- a/Project/Project.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Project/Project.py	Fri Oct 18 23:00:41 2013 +0200
@@ -21,8 +21,8 @@
 import copy
 import zipfile
 
-from PyQt4.QtCore import QFile, QFileInfo, pyqtSignal, QCryptographicHash, QIODevice, \
-    QByteArray, QObject, Qt
+from PyQt4.QtCore import QFile, QFileInfo, pyqtSignal, QCryptographicHash, \
+    QIODevice, QByteArray, QObject, Qt
 from PyQt4.QtGui import QCursor, QLineEdit, QToolBar, QDialog, QInputDialog, \
     QApplication, QMenu, QAction
 from PyQt4.Qsci import QsciScintilla
@@ -46,8 +46,8 @@
     
     @signal dirty(int) emitted when the dirty state changes
     @signal projectLanguageAdded(str) emitted after a new language was added
-    @signal projectLanguageAddedByCode(str) emitted after a new language was added.
-            The language code is sent by this signal.
+    @signal projectLanguageAddedByCode(str) emitted after a new language was
+        added. The language code is sent by this signal.
     @signal projectLanguageRemoved(str) emitted after a language was removed
     @signal projectFormAdded(str) emitted after a new form was added
     @signal projectFormRemoved(str) emitted after a form was removed
@@ -56,40 +56,43 @@
     @signal projectSourceRemoved(str) emitted after a source was removed
     @signal projectInterfaceAdded(str) emitted after a new IDL file was added
     @signal projectInterfaceRemoved(str) emitted after a IDL file was removed
-    @signal projectResourceAdded(str) emitted after a new resource file was added
+    @signal projectResourceAdded(str) emitted after a new resource file was
+        added
     @signal projectResourceRemoved(str) emitted after a resource was removed
     @signal projectOthersAdded(str) emitted after a file or directory was added
-            to the OTHERS project data area
+        to the OTHERS project data area
     @signal projectOthersRemoved(str) emitted after a file was removed from the
-            OTHERS project data area
-    @signal projectAboutToBeCreated() emitted just before the project will be created
-    @signal newProjectHooks() emitted after a new project was generated but before
-            the newProject() signal is sent
+        OTHERS project data area
+    @signal projectAboutToBeCreated() emitted just before the project will be
+        created
+    @signal newProjectHooks() emitted after a new project was generated but
+        before the newProject() signal is sent
     @signal newProject() emitted after a new project was generated
     @signal sourceFile(str) emitted after a project file was read to
-            open the main script
-    @signal projectOpenedHooks() emitted after a project file was read but before the
-            projectOpened() signal is sent
+        open the main script
+    @signal projectOpenedHooks() emitted after a project file was read but
+        before the projectOpened() signal is sent
     @signal projectOpened() emitted after a project file was read
-    @signal projectClosedHooks() emitted after a project file was closed but before the
-            projectClosed() signal is sent
+    @signal projectClosedHooks() emitted after a project file was closed but
+        before the projectClosed() signal is sent
     @signal projectClosed() emitted after a project was closed
     @signal projectFileRenamed(str, str) emitted after a file of the project
-            has been renamed
-    @signal projectPropertiesChanged() emitted after the project properties were changed
-    @signal directoryRemoved(str) emitted after a directory has been removed from
-            the project
+        has been renamed
+    @signal projectPropertiesChanged() emitted after the project properties
+        were changed
+    @signal directoryRemoved(str) emitted after a directory has been removed
+        from the project
     @signal prepareRepopulateItem(str) emitted before an item of the model is
-            repopulated
+        repopulated
     @signal completeRepopulateItem(str) emitted after an item of the model was
-            repopulated
-    @signal vcsStatusMonitorStatus(str, str) emitted to signal the status of the
-            monitoring thread (ok, nok, op, off) and a status message
+        repopulated
+    @signal vcsStatusMonitorStatus(str, str) emitted to signal the status of
+        the monitoring thread (ok, nok, op, off) and a status message
     @signal reinitVCS() emitted after the VCS has been reinitialized
-    @signal showMenu(str, QMenu) emitted when a menu is about to be shown. The name
-            of the menu and a reference to the menu are given.
-    @signal lexerAssociationsChanged() emitted after the lexer associations have been
-            changed
+    @signal showMenu(str, QMenu) emitted when a menu is about to be shown. The
+        name of the menu and a reference to the menu are given.
+    @signal lexerAssociationsChanged() emitted after the lexer associations
+        have been changed
     @signal projectChanged() emitted to signal a change of the project
     """
     dirty = pyqtSignal(int)
@@ -243,8 +246,10 @@
         self.__projectTypes["Other"] = self.trUtf8("Other")
         
         self.__projectProgLanguages = {
-            "Python2": ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "Console", "Other"],
-            "Python3": ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "Console", "Other"],
+            "Python2": ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin",
+                        "Console", "Other"],
+            "Python3": ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin",
+                        "Console", "Other"],
             "Ruby": ["Qt4", "Qt4C", "Console", "Other"],
         }
         
@@ -253,15 +258,18 @@
             self.__projectTypes["PySide"] = self.trUtf8("PySide GUI")
             self.__projectTypes["PySideC"] = self.trUtf8("PySide Console")
             if pyside2:
-                self.__projectProgLanguages["Python2"].extend(["PySide", "PySideC"])
+                self.__projectProgLanguages["Python2"].extend(
+                    ["PySide", "PySideC"])
             if pyside3:
-                self.__projectProgLanguages["Python3"].extend(["PySide", "PySideC"])
+                self.__projectProgLanguages["Python3"].extend(
+                    ["PySide", "PySideC"])
         
     def getProjectTypes(self, progLanguage=""):
         """
         Public method to get the list of supported project types.
         
-        @param progLanguage programming language to get project types for (string)
+        @param progLanguage programming language to get project types for
+            (string)
         @return reference to the dictionary of project types.
         """
         if progLanguage and progLanguage in self.__projectProgLanguages:
@@ -296,8 +304,8 @@
         @param description more verbose type name (display string) (string)
         @keyparam fileTypeCallback reference to a method returning a dictionary
             of filetype associations.
-        @keyparam binaryTranslationsCallback reference to a method returning the
-            name of the binary translation file given the name of the raw
+        @keyparam binaryTranslationsCallback reference to a method returning
+            the name of the binary translation file given the name of the raw
             translation file
         @keyparam lexerAssociationCallback reference to a method returning the
             lexer type to be used for syntax highlighting given the name of
@@ -310,8 +318,9 @@
                 if progLanguage not in self.__projectProgLanguages:
                     E5MessageBox.critical(self.ui,
                         self.trUtf8("Registering Project Type"),
-                        self.trUtf8("""<p>The Programming Language <b>{0}</b> is not"""
-                                    """ supported.</p>""")\
+                        self.trUtf8(
+                            """<p>The Programming Language <b>{0}</b> is not"""
+                            """ supported.</p>""")\
                             .format(progLanguage)
                     )
                     return
@@ -319,9 +328,10 @@
                 if type_ in self.__projectProgLanguages[progLanguage]:
                     E5MessageBox.critical(self.ui,
                         self.trUtf8("Registering Project Type"),
-                        self.trUtf8("""<p>The Project type <b>{0}</b> is already"""
-                                    """ registered with Programming Language"""
-                                    """ <b>{1}</b>.</p>""")\
+                        self.trUtf8(
+                            """<p>The Project type <b>{0}</b> is already"""
+                            """ registered with Programming Language"""
+                            """ <b>{1}</b>.</p>""")\
                             .format(type_, progLanguage)
                     )
                     return
@@ -336,7 +346,8 @@
             self.__projectTypes[type_] = description
             self.__fileTypeCallbacks[type_] = fileTypeCallback
             self.__lexerAssociationCallbacks[type_] = lexerAssociationCallback
-            self.__binaryTranslationsCallbacks[type_] = binaryTranslationsCallback
+            self.__binaryTranslationsCallbacks[type_] = \
+                binaryTranslationsCallback
             if progLanguages:
                 for progLanguage in progLanguages:
                     self.__projectProgLanguages[progLanguage].append(type_)
@@ -374,7 +385,8 @@
         self.translationsRoot = ""  # the translations prefix
         self.name = ""
         self.opened = False
-        self.subdirs = [""]  # record the project dir as a relative path (i.e. empty path)
+        self.subdirs = [""]  # record the project dir as a relative path
+                             # (i.e. empty path)
         self.otherssubdirs = []
         self.vcs = None
         self.vcsRequested = False
@@ -423,13 +435,14 @@
         Public method to get data out of the project data store.
         
         @param category category of the data to get (string, one of
-            PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS, DOCUMENTATIONPARMS
-            or OTHERTOOLSPARMS)
+            PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS,
+            DOCUMENTATIONPARMS or OTHERTOOLSPARMS)
         @param key key of the data entry to get (string).
         @return a copy of the requested data or None
         """
-        if category in ["PROJECTTYPESPECIFICDATA", "CHECKERSPARMS", "PACKAGERSPARMS",
-                        "DOCUMENTATIONPARMS", "OTHERTOOLSPARMS"] and \
+        if category in ["PROJECTTYPESPECIFICDATA", "CHECKERSPARMS",
+                        "PACKAGERSPARMS", "DOCUMENTATIONPARMS",
+                        "OTHERTOOLSPARMS"] and \
            key in self.pdata[category]:
             return copy.deepcopy(self.pdata[category][key])
         else:
@@ -440,14 +453,15 @@
         Public method to store data in the project data store.
         
         @param category category of the data to get (string, one of
-            PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS, DOCUMENTATIONPARMS
-            or OTHERTOOLSPARMS)
+            PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS,
+            DOCUMENTATIONPARMS or OTHERTOOLSPARMS)
         @param key key of the data entry to get (string).
         @param data data to be stored
         @return flag indicating success (boolean)
         """
-        if category not in ["PROJECTTYPESPECIFICDATA", "CHECKERSPARMS", "PACKAGERSPARMS",
-                            "DOCUMENTATIONPARMS", "OTHERTOOLSPARMS"]:
+        if category not in ["PROJECTTYPESPECIFICDATA", "CHECKERSPARMS",
+                            "PACKAGERSPARMS", "DOCUMENTATIONPARMS",
+                            "OTHERTOOLSPARMS"]:
             return False
         
         # test for changes of data and save them in the project
@@ -471,7 +485,8 @@
         
     def initFileTypes(self):
         """
-        Public method to initialize the filetype associations with default values.
+        Public method to initialize the filetype associations with default
+        values.
         """
         self.pdata["FILETYPES"] = {}
         if self.pdata["MIXEDLANGUAGE"][0]:
@@ -481,7 +496,8 @@
         for ext in self.sourceExtensions[sourceKey]:
             self.pdata["FILETYPES"]["*{0}".format(ext)] = "SOURCES"
         self.pdata["FILETYPES"]["*.idl"] = "INTERFACES"
-        if self.pdata["PROJECTTYPE"][0] in ["Qt4", "PyQt5", "E4Plugin", "PySide"]:
+        if self.pdata["PROJECTTYPE"][0] in ["Qt4", "PyQt5", "E4Plugin",
+                                            "PySide"]:
             self.pdata["FILETYPES"]["*.ui"] = "FORMS"
             self.pdata["FILETYPES"]["*.ui.h"] = "FORMS"
         if self.pdata["PROJECTTYPE"][0] in ["Qt4", "Qt4C", "E4Plugin",
@@ -494,8 +510,10 @@
             self.pdata["FILETYPES"]["*.ts"] = "TRANSLATIONS"
             self.pdata["FILETYPES"]["*.qm"] = "TRANSLATIONS"
         try:
-            if self.__fileTypeCallbacks[self.pdata["PROJECTTYPE"][0]] is not None:
-                ftypes = self.__fileTypeCallbacks[self.pdata["PROJECTTYPE"][0]]()
+            if self.__fileTypeCallbacks[
+                    self.pdata["PROJECTTYPE"][0]] is not None:
+                ftypes = \
+                    self.__fileTypeCallbacks[self.pdata["PROJECTTYPE"][0]]()
                 self.pdata["FILETYPES"].update(ftypes)
         except KeyError:
             pass
@@ -503,7 +521,8 @@
         
     def updateFileTypes(self):
         """
-        Public method to update the filetype associations with new default values.
+        Public method to update the filetype associations with new default
+        values.
         """
         if self.pdata["PROJECTTYPE"][0] in ["Qt4", "Qt4C", "E4Plugin",
                                             "PyQt5", "PyQt5C",
@@ -513,8 +532,10 @@
             if "*.qm" not in self.pdata["FILETYPES"]:
                 self.pdata["FILETYPES"]["*.qm"] = "TRANSLATIONS"
         try:
-            if self.__fileTypeCallbacks[self.pdata["PROJECTTYPE"][0]] is not None:
-                ftypes = self.__fileTypeCallbacks[self.pdata["PROJECTTYPE"][0]]()
+            if self.__fileTypeCallbacks[
+                    self.pdata["PROJECTTYPE"][0]] is not None:
+                ftypes = \
+                    self.__fileTypeCallbacks[self.pdata["PROJECTTYPE"][0]]()
                 for pattern, ftype in list(ftypes.items()):
                     if pattern not in self.pdata["FILETYPES"]:
                         self.pdata["FILETYPES"][pattern] = ftype
@@ -651,7 +672,8 @@
             QApplication.restoreOverrideCursor()
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Read project file"),
-                self.trUtf8("<p>The project file <b>{0}</b> could not be read.</p>")\
+                self.trUtf8(
+                    "<p>The project file <b>{0}</b> could not be read.</p>")\
                     .format(fn))
             return False
         
@@ -666,7 +688,8 @@
                 self.translationsRoot = \
                     self.pdata["TRANSLATIONPATTERN"][0].split("%language%")[0]
             elif len(self.pdata["MAINSCRIPT"]) == 1:
-                self.translationsRoot = os.path.splitext(self.pdata["MAINSCRIPT"][0])[0]
+                self.translationsRoot = os.path.splitext(
+                    self.pdata["MAINSCRIPT"][0])[0]
             if os.path.isdir(os.path.join(self.ppath, self.translationsRoot)):
                 dn = self.translationsRoot
             else:
@@ -676,7 +699,8 @@
                 
             self.name = os.path.splitext(os.path.basename(fn))[0]
             
-            # check, if the files of the project still exist in the project directory
+            # check, if the files of the project still exist in the
+            # project directory
             self.__checkFilesExist("SOURCES")
             self.__checkFilesExist("FORMS")
             self.__checkFilesExist("INTERFACES")
@@ -716,15 +740,17 @@
         Private method to save the project infos to a project file.
         
         @param fn optional filename of the project file to be written (string).
-                If fn is None, the filename stored in the project object
-                is used. This is the 'save' action. If fn is given, this filename
-                is used instead of the one in the project object. This is the
-                'save as' action.
+            If fn is None, the filename stored in the project object
+            is used. This is the 'save' action. If fn is given, this filename
+            is used instead of the one in the project object. This is the
+            'save as' action.
         @return flag indicating success
         """
         if self.vcs is not None:
-            self.pdata["VCSOPTIONS"] = [copy.deepcopy(self.vcs.vcsGetOptions())]
-            self.pdata["VCSOTHERDATA"] = [copy.deepcopy(self.vcs.vcsGetOtherData())]
+            self.pdata["VCSOPTIONS"] = [
+                copy.deepcopy(self.vcs.vcsGetOptions())]
+            self.pdata["VCSOTHERDATA"] = [
+                copy.deepcopy(self.vcs.vcsGetOtherData())]
         
         if not self.pdata["HASH"][0]:
             hash = str(QCryptographicHash.hash(
@@ -739,13 +765,15 @@
         f = QFile(fn)
         if f.open(QIODevice.WriteOnly):
             from E5XML.ProjectWriter import ProjectWriter
-            ProjectWriter(f, os.path.splitext(os.path.basename(fn))[0]).writeXML()
+            ProjectWriter(f, os.path.splitext(
+                os.path.basename(fn))[0]).writeXML()
             res = True
         else:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Save project file"),
-                self.trUtf8("<p>The project file <b>{0}</b> could not be written.</p>")\
-                    .format(fn))
+                self.trUtf8(
+                    "<p>The project file <b>{0}</b> could not be"
+                    " written.</p>").format(fn))
             res = False
         
         if res:
@@ -761,7 +789,7 @@
         
     def __readUserProperties(self):
         """
-        Private method to read in the user specific project file (.e4q)
+        Private method to read in the user specific project file (.e4q).
         """
         if self.pfile is None:
             return
@@ -778,8 +806,9 @@
             else:
                 E5MessageBox.critical(self.ui,
                     self.trUtf8("Read user project properties"),
-                    self.trUtf8("<p>The user specific project properties file <b>{0}</b>"
-                        " could not be read.</p>").format(fn))
+                    self.trUtf8(
+                        "<p>The user specific project properties file"
+                        " <b>{0}</b> could not be read.</p>").format(fn))
         
     def __writeUserProperties(self):
         """
@@ -794,12 +823,14 @@
         f = QFile(fn)
         if f.open(QIODevice.WriteOnly):
             from E5XML.UserProjectWriter import UserProjectWriter
-            UserProjectWriter(f, os.path.splitext(os.path.basename(fn))[0]).writeXML()
+            UserProjectWriter(
+                f, os.path.splitext(os.path.basename(fn))[0]).writeXML()
             f.close()
         else:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Save user project properties"),
-                self.trUtf8("<p>The user specific project properties file <b>{0}</b>"
+                self.trUtf8(
+                    "<p>The user specific project properties file <b>{0}</b>"
                     " could not be written.</p>").format(fn))
         
     def __showContextMenuSession(self):
@@ -814,12 +845,14 @@
             fn = os.path.join(self.getProjectManagementDir(),
                               '{0}.e4s'.format(fn))
             enable = os.path.exists(fn)
-        self.sessActGrp.findChild(QAction, "project_load_session").setEnabled(enable)
-        self.sessActGrp.findChild(QAction, "project_delete_session").setEnabled(enable)
+        self.sessActGrp.findChild(
+            QAction, "project_load_session").setEnabled(enable)
+        self.sessActGrp.findChild(
+            QAction, "project_delete_session").setEnabled(enable)
         
     def __readSession(self, quiet=False, indicator=""):
         """
-        Private method to read in the project session file (.e4s)
+        Private method to read in the project session file (.e4s).
         
         @param quiet flag indicating quiet operations.
                 If this flag is true, no errors are reported.
@@ -846,7 +879,8 @@
             if not quiet:
                 E5MessageBox.critical(self.ui,
                     self.trUtf8("Read project session"),
-                    self.trUtf8("<p>The project session file <b>{0}</b> could not be"
+                    self.trUtf8(
+                        "<p>The project session file <b>{0}</b> could not be"
                         " read.</p>").format(fn))
         
     def __writeSession(self, quiet=False, indicator=""):
@@ -871,13 +905,15 @@
         f = QFile(fn)
         if f.open(QIODevice.WriteOnly):
             from E5XML.SessionWriter import SessionWriter
-            SessionWriter(f, os.path.splitext(os.path.basename(fn))[0]).writeXML()
+            SessionWriter(
+                f, os.path.splitext(os.path.basename(fn))[0]).writeXML()
             f.close()
         else:
             if not quiet:
                 E5MessageBox.critical(self.ui,
                     self.trUtf8("Save project session"),
-                    self.trUtf8("<p>The project session file <b>{0}</b> could not be"
+                    self.trUtf8(
+                        "<p>The project session file <b>{0}</b> could not be"
                         " written.</p>").format(fn))
         
     def __deleteSession(self):
@@ -892,19 +928,21 @@
             
         fname, ext = os.path.splitext(os.path.basename(self.pfile))
         
-        for fn in [os.path.join(self.getProjectManagementDir(), "{0}.e4s".format(fname))]:
+        for fn in [os.path.join(
+                self.getProjectManagementDir(), "{0}.e4s".format(fname))]:
             if os.path.exists(fn):
                 try:
                     os.remove(fn)
                 except OSError:
                     E5MessageBox.critical(self.ui,
                         self.trUtf8("Delete project session"),
-                        self.trUtf8("<p>The project session file <b>{0}</b> could not be"
-                            " deleted.</p>").format(fn))
+                        self.trUtf8(
+                            "<p>The project session file <b>{0}</b> could"
+                            " not be deleted.</p>").format(fn))
         
     def __readTasks(self):
         """
-        Private method to read in the project tasks file (.e4t)
+        Private method to read in the project tasks file (.e4t).
         """
         if self.pfile is None:
             E5MessageBox.critical(self.ui,
@@ -925,7 +963,8 @@
         else:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Read tasks"),
-                self.trUtf8("<p>The tasks file <b>{0}</b> could not be read.</p>")\
+                self.trUtf8(
+                    "<p>The tasks file <b>{0}</b> could not be read.</p>")\
                     .format(fn))
         
     def writeTasks(self):
@@ -943,12 +982,14 @@
         if not ok:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Save tasks"),
-                self.trUtf8("<p>The tasks file <b>{0}</b> could not be written.</p>")
+                self.trUtf8(
+                    "<p>The tasks file <b>{0}</b> could not be written.</p>")
                     .format(fn))
             return
         
         from E5XML.TasksWriter import TasksWriter
-        TasksWriter(f, True, os.path.splitext(os.path.basename(fn))[0]).writeXML()
+        TasksWriter(
+            f, True, os.path.splitext(os.path.basename(fn))[0]).writeXML()
         f.close()
         
     def __showContextMenuDebugger(self):
@@ -963,14 +1004,14 @@
             fn = os.path.join(self.getProjectManagementDir(),
                               '{0}.e4d'.format(fn))
             enable = os.path.exists(fn)
-        self.dbgActGrp.findChild(QAction, "project_debugger_properties_load")\
-            .setEnabled(enable)
-        self.dbgActGrp.findChild(QAction, "project_debugger_properties_delete")\
-            .setEnabled(enable)
+        self.dbgActGrp.findChild(
+            QAction, "project_debugger_properties_load").setEnabled(enable)
+        self.dbgActGrp.findChild(
+            QAction, "project_debugger_properties_delete").setEnabled(enable)
         
     def __readDebugProperties(self, quiet=False):
         """
-        Private method to read in the project debugger properties file (.e4d)
+        Private method to read in the project debugger properties file (.e4d).
         
         @param quiet flag indicating quiet operations.
                 If this flag is true, no errors are reported.
@@ -995,12 +1036,13 @@
             if not quiet:
                 E5MessageBox.critical(self.ui,
                     self.trUtf8("Read debugger properties"),
-                    self.trUtf8("<p>The project debugger properties file <b>{0}</b> could"
-                                " not be read.</p>").format(fn))
+                    self.trUtf8(
+                        "<p>The project debugger properties file <b>{0}</b>"
+                        " could not be read.</p>").format(fn))
         
     def __writeDebugProperties(self, quiet=False):
         """
-        Private method to write the project debugger properties file (.e4d)
+        Private method to write the project debugger properties file (.e4d).
         
         @param quiet flag indicating quiet operations.
                 If this flag is true, no errors are reported.
@@ -1018,20 +1060,20 @@
         f = QFile(fn)
         if f.open(QIODevice.WriteOnly):
             from E5XML.DebuggerPropertiesWriter import DebuggerPropertiesWriter
-            DebuggerPropertiesWriter(f, os.path.splitext(os.path.basename(fn))[0])\
-                .writeXML()
+            DebuggerPropertiesWriter(
+                f, os.path.splitext(os.path.basename(fn))[0]).writeXML()
             f.close()
         else:
             if not quiet:
                 E5MessageBox.critical(self.ui,
                     self.trUtf8("Save debugger properties"),
-                    self.trUtf8("<p>The project debugger properties file <b>{0}</b> could"
-                                " not be written.</p>")
-                        .format(fn))
+                    self.trUtf8(
+                        "<p>The project debugger properties file <b>{0}</b>"
+                        " could not be written.</p>").format(fn))
         
     def __deleteDebugProperties(self):
         """
-        Private method to delete the project debugger properties file (.e4d)
+        Private method to delete the project debugger properties file (.e4d).
         """
         if self.pfile is None:
             E5MessageBox.critical(self.ui,
@@ -1041,15 +1083,17 @@
             
         fname, ext = os.path.splitext(os.path.basename(self.pfile))
         
-        for fn in [os.path.join(self.getProjectManagementDir(), "{0}.e4d".format(fname))]:
+        for fn in [os.path.join(self.getProjectManagementDir(),
+                                "{0}.e4d".format(fname))]:
             if os.path.exists(fn):
                 try:
                     os.remove(fn)
                 except OSError:
                     E5MessageBox.critical(self.ui,
                         self.trUtf8("Delete debugger properties"),
-                        self.trUtf8("<p>The project debugger properties file <b>{0}</b>"
-                                    " could not be deleted.</p>")
+                        self.trUtf8(
+                            "<p>The project debugger properties file"
+                            " <b>{0}</b> could not be deleted.</p>")
                             .format(fn))
         
     def __initDebugProperties(self):
@@ -1108,8 +1152,8 @@
             should be cleared (boolean)
         @keyparam tracePython flag to indicate if the Python library should be
             traced as well (boolean)
-        @keyparam autoContinue flag indicating, that the debugger should not stop
-            at the first executable line (boolean)
+        @keyparam autoContinue flag indicating, that the debugger should not
+            stop at the first executable line (boolean)
         """
         self.dbgCmdline = argv
         self.dbgWd = wd
@@ -1142,7 +1186,8 @@
            self.pdata["TRANSLATIONPATTERN"][0] == '':
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Add Language"),
-                self.trUtf8("You have to specify a translation pattern first."))
+                self.trUtf8(
+                    "You have to specify a translation pattern first."))
             return
         
         from .AddLanguageDialog import AddLanguageDialog
@@ -1150,23 +1195,25 @@
         if dlg.exec_() == QDialog.Accepted:
             lang = dlg.getSelectedLanguage()
             if self.pdata["PROJECTTYPE"][0] in \
-                    ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]:
-                langFile = self.pdata["TRANSLATIONPATTERN"][0].replace("%language%", lang)
+                    ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide",
+                     "PySideC"]:
+                langFile = self.pdata["TRANSLATIONPATTERN"][0]\
+                    .replace("%language%", lang)
                 self.appendFile(langFile)
             self.projectLanguageAddedByCode.emit(lang)
         
     def __binaryTranslationFile(self, langFile):
         """
-        Private method to calculate the filename of the binary translations file
-        given the name of the raw translations file.
+        Private method to calculate the filename of the binary translations
+        file given the name of the raw translations file.
         
         @param langFile name of the raw translations file (string)
         @return name of the binary translations file (string)
         """
         qmFile = ""
         try:
-            if self.__binaryTranslationsCallbacks[self.pdata["PROJECTTYPE"][0]] \
-               is not None:
+            if self.__binaryTranslationsCallbacks[
+                    self.pdata["PROJECTTYPE"][0]] is not None:
                 qmFile = self.__binaryTranslationsCallbacks[
                     self.pdata["PROJECTTYPE"][0]](langFile)
         except KeyError:
@@ -1233,7 +1280,8 @@
         except IOError:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Delete translation"),
-                self.trUtf8("<p>The selected translation file <b>{0}</b> could not be"
+                self.trUtf8(
+                    "<p>The selected translation file <b>{0}</b> could not be"
                     " deleted.</p>").format(langFile))
             return
         
@@ -1252,8 +1300,9 @@
             except IOError:
                 E5MessageBox.critical(self.ui,
                     self.trUtf8("Delete translation"),
-                    self.trUtf8("<p>The selected translation file <b>{0}</b> could not be"
-                        " deleted.</p>").format(qmFile))
+                    self.trUtf8(
+                        "<p>The selected translation file <b>{0}</b> could"
+                        " not be deleted.</p>").format(qmFile))
                 return
         
     def appendFile(self, fn, isSourceFile=False, updateModel=True):
@@ -1262,8 +1311,9 @@
         
         @param fn filename to be added to the project (string)
         @param isSourceFile flag indicating that this is a source file
-                even if it doesn't have the source extension (boolean)
-        @param updateModel flag indicating an update of the model is requested (boolean)
+            even if it doesn't have the source extension (boolean)
+        @param updateModel flag indicating an update of the model is
+            requested (boolean)
         """
         dirty = False
         
@@ -1283,7 +1333,8 @@
             if fnmatch.fnmatch(bfn, '*.ts') or fnmatch.fnmatch(bfn, '*.qm'):
                 filetype = "TRANSLATIONS"
             else:
-                for pattern in reversed(sorted(self.pdata["FILETYPES"].keys())):
+                for pattern in reversed(
+                        sorted(self.pdata["FILETYPES"].keys())):
                     if fnmatch.fnmatch(bfn, pattern):
                         filetype = self.pdata["FILETYPES"][pattern]
                         break
@@ -1312,7 +1363,8 @@
                 if newfn not in self.pdata["INTERFACES"]:
                     self.pdata["INTERFACES"].append(newfn)
                     self.projectInterfaceAdded.emit(newfn)
-                    updateModel and self.__model.addNewItem("INTERFACES", newfn)
+                    updateModel and \
+                        self.__model.addNewItem("INTERFACES", newfn)
                     dirty = True
                 else:
                     updateModel and self.repopulateItem(newfn)
@@ -1372,7 +1424,8 @@
                             if os.path.exists(targetfile):
                                 res = E5MessageBox.yesNo(self.ui,
                                     self.trUtf8("Add file"),
-                                    self.trUtf8("<p>The file <b>{0}</b> already"
+                                    self.trUtf8(
+                                        "<p>The file <b>{0}</b> already"
                                         " exists.</p><p>Overwrite it?</p>")
                                         .format(targetfile),
                                     icon=E5MessageBox.Warning)
@@ -1383,8 +1436,10 @@
                         except IOError as why:
                             E5MessageBox.critical(self.ui,
                                 self.trUtf8("Add file"),
-                                self.trUtf8("<p>The selected file <b>{0}</b> could not be"
-                                    " added to <b>{1}</b>.</p><p>Reason: {2}</p>")
+                                self.trUtf8(
+                                    "<p>The selected file <b>{0}</b> could"
+                                    " not be added to <b>{1}</b>.</p>"
+                                    "<p>Reason: {2}</p>")
                                     .format(fn, target, str(why)))
                             continue
                     
@@ -1396,7 +1451,8 @@
         
     def __addSingleDirectory(self, filetype, source, target, quiet=False):
         """
-        Private method used to add all files of a single directory to the project.
+        Private method used to add all files of a single directory to the
+        project.
         
         @param filetype type of files to add (string)
         @param source source directory (string)
@@ -1425,13 +1481,15 @@
                         " any files belonging to the selected category.</p>"))
             return
         
-        if not Utilities.samepath(target, source) and not os.path.isdir(target):
+        if not Utilities.samepath(target, source) and \
+                not os.path.isdir(target):
             try:
                 os.makedirs(target)
             except IOError as why:
                 E5MessageBox.critical(self.ui,
                     self.trUtf8("Add directory"),
-                    self.trUtf8("<p>The target directory <b>{0}</b> could not be"
+                    self.trUtf8(
+                        "<p>The target directory <b>{0}</b> could not be"
                         " created.</p><p>Reason: {1}</p>")
                         .format(target, str(why)))
                 return
@@ -1447,12 +1505,14 @@
                     if os.path.exists(targetfile):
                         res = E5MessageBox.yesNo(self.ui,
                             self.trUtf8("Add directory"),
-                            self.trUtf8("<p>The file <b>{0}</b> already exists.</p>"
-                                        "<p>Overwrite it?</p>")
+                            self.trUtf8(
+                                "<p>The file <b>{0}</b> already exists.</p>"
+                                "<p>Overwrite it?</p>")
                                 .format(targetfile),
                             icon=E5MessageBox.Warning)
                         if not res:
-                            continue  # don't overwrite, carry on with next file
+                            continue  # don't overwrite, carry on
+                                      # with next file
                             
                     shutil.copy(file, target)
                 except EnvironmentError:
@@ -1491,7 +1551,8 @@
         if startdir is None:
             startdir = self.ppath
         from .AddDirectoryDialog import AddDirectoryDialog
-        dlg = AddDirectoryDialog(self, filter, self.parent(), startdir=startdir)
+        dlg = AddDirectoryDialog(
+            self, filter, self.parent(), startdir=startdir)
         if dlg.exec_() == QDialog.Accepted:
             filetype, source, target, recursive = dlg.getData()
             if target == '':
@@ -1569,7 +1630,8 @@
         
     def addSourceDir(self):
         """
-        Public slot to add all source files of a directory to the current project.
+        Public slot to add all source files of a directory to the current
+        project.
         """
         self.addDirectory('source')
         
@@ -1581,13 +1643,15 @@
         
     def addIdlDir(self):
         """
-        Public slot to add all IDL interfaces of a directory to the current project.
+        Public slot to add all IDL interfaces of a directory to the current
+        project.
         """
         self.addDirectory('interface')
         
     def addResourceDir(self):
         """
-        Public slot to add all Qt resource files of a directory to the current project.
+        Public slot to add all Qt resource files of a directory to the current
+        project.
         """
         self.addDirectory('resource')
         
@@ -1650,7 +1714,8 @@
         except OSError as msg:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Rename File"),
-                self.trUtf8("""<p>The file <b>{0}</b> could not be renamed.<br />"""
+                self.trUtf8(
+                    """<p>The file <b>{0}</b> could not be renamed.<br />"""
                     """Reason: {1}</p>""").format(oldfn, str(msg)))
             return False
 
@@ -1690,6 +1755,7 @@
         Public method to get all files starting with a common prefix.
         
         @param start prefix (string)
+        @return list of files starting with a common prefix (list of strings)
         """
         filelist = []
         start = self.getRelativePath(start)
@@ -1712,7 +1778,8 @@
             for entry in self.pdata[key][:]:
                 if entry.startswith(olddn):
                     entry = entry.replace(olddn, newdn)
-                    self.appendFile(os.path.join(self.ppath, entry), key == "SOURCES")
+                    self.appendFile(os.path.join(self.ppath, entry),
+                                    key == "SOURCES")
         self.setDirty(True)
         
     def moveDirectory(self, olddn, newdn):
@@ -1753,7 +1820,8 @@
         The file is not deleted from the project directory.
         
         @param fn filename to be removed from the project
-        @param updateModel flag indicating an update of the model is requested (boolean)
+        @param updateModel flag indicating an update of the model is
+            requested (boolean)
         """
         fn = self.getRelativePath(fn)
         dirty = True
@@ -1799,7 +1867,8 @@
             dn2 = dn + os.sep
         else:
             dn2 = dn
-        for key in ["SOURCES", "FORMS", "INTERFACES", "RESOURCES", "TRANSLATIONS", ]:
+        for key in ["SOURCES", "FORMS", "INTERFACES", "RESOURCES",
+                    "TRANSLATIONS", ]:
             for entry in self.pdata[key][:]:
                 if entry.startswith(dn2):
                     self.pdata[key].remove(entry)
@@ -1829,14 +1898,16 @@
                 if os.path.isfile(fn2):
                     os.remove(fn2)
                 pat = os.path.join(
-                    self.ppath, head, "__pycache__", "{0}.*{1}".format(tail, ext))
+                    self.ppath, head,
+                    "__pycache__", "{0}.*{1}".format(tail, ext))
                 for f in glob.glob(pat):
                     os.remove(f)
         except EnvironmentError:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Delete file"),
-                self.trUtf8("<p>The selected file <b>{0}</b> could not be deleted.</p>")
-                    .format(fn))
+                self.trUtf8(
+                    "<p>The selected file <b>{0}</b> could not be"
+                    " deleted.</p>").format(fn))
             return False
         
         self.removeFile(fn)
@@ -1918,7 +1989,8 @@
             self.menuDiagramAct.setEnabled(True)
             self.menuApidocAct.setEnabled(True)
             self.menuPackagersAct.setEnabled(True)
-            self.pluginGrp.setEnabled(self.pdata["PROJECTTYPE"][0] == "E4Plugin")
+            self.pluginGrp.setEnabled(
+                self.pdata["PROJECTTYPE"][0] == "E4Plugin")
             self.addLanguageAct.setEnabled(
                 len(self.pdata["TRANSLATIONPATTERN"]) > 0 and \
                 self.pdata["TRANSLATIONPATTERN"][0] != '')
@@ -1926,7 +1998,8 @@
             self.projectAboutToBeCreated.emit()
             
             hash = str(QCryptographicHash.hash(
-                QByteArray(self.ppath.encode("utf-8")), QCryptographicHash.Sha1).toHex(),
+                QByteArray(self.ppath.encode("utf-8")),
+                QCryptographicHash.Sha1).toHex(),
                 encoding="utf-8")
             self.pdata["HASH"] = [hash]
             
@@ -1937,22 +2010,26 @@
                 except EnvironmentError:
                     E5MessageBox.critical(self.ui,
                         self.trUtf8("Create project directory"),
-                        self.trUtf8("<p>The project directory <b>{0}</b> could not"
+                        self.trUtf8(
+                            "<p>The project directory <b>{0}</b> could not"
                             " be created.</p>")
                             .format(self.ppath))
                     self.vcs = self.initVCS()
                     return
                 # create an empty __init__.py file to make it a Python package
                 # (only for Python and Python3)
-                if self.pdata["PROGLANGUAGE"][0] in ["Python", "Python2", "Python3"]:
+                if self.pdata["PROGLANGUAGE"][0] in \
+                        ["Python", "Python2", "Python3"]:
                     fn = os.path.join(self.ppath, "__init__.py")
                     f = open(fn, "w", encoding="utf-8")
                     f.close()
                     self.appendFile(fn, True)
                 # create an empty main script file, if a name was given
-                if len(self.pdata["MAINSCRIPT"]) and self.pdata["MAINSCRIPT"][0]:
+                if len(self.pdata["MAINSCRIPT"]) and \
+                        self.pdata["MAINSCRIPT"][0]:
                     if not os.path.isabs(self.pdata["MAINSCRIPT"][0]):
-                        ms = os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0])
+                        ms = os.path.join(
+                            self.ppath, self.pdata["MAINSCRIPT"][0])
                     else:
                         ms = self.pdata["MAINSCRIPT"][0]
                     f = open(ms, "w")
@@ -1964,7 +2041,8 @@
                 if not os.path.isdir(tpd):
                     os.makedirs(tpd)
                 if self.pdata["TRANSLATIONSBINPATH"]:
-                    tpd = os.path.join(self.ppath, self.pdata["TRANSLATIONSBINPATH"][0])
+                    tpd = os.path.join(
+                        self.ppath, self.pdata["TRANSLATIONSBINPATH"][0])
                     if not os.path.isdir(tpd):
                         os.makedirs(tpd)
                 
@@ -1989,7 +2067,8 @@
                         except IOError as err:
                             E5MessageBox.critical(self.ui,
                                 self.trUtf8("Create main script"),
-                                self.trUtf8("<p>The mainscript <b>{0}</b> could not"
+                                self.trUtf8(
+                                    "<p>The mainscript <b>{0}</b> could not"
                                     " be created.<br/>Reason: {1}</p>")
                                     .format(self.ppath, str(err)))
                     self.appendFile(ms)
@@ -2005,7 +2084,8 @@
                     self.newProjectAddFiles(ms)
                 # create an empty __init__.py file to make it a Python package
                 # if none exists (only for Python and Python3)
-                if self.pdata["PROGLANGUAGE"][0] in ["Python", "Python2", "Python3"]:
+                if self.pdata["PROGLANGUAGE"][0] in \
+                        ["Python", "Python2", "Python3"]:
                     fn = os.path.join(self.ppath, "__init__.py")
                     if not os.path.exists(fn):
                         f = open(fn, "w", encoding="utf-8")
@@ -2047,7 +2127,8 @@
                             # edit VCS command options
                             vcores = E5MessageBox.yesNo(self.ui,
                                 self.trUtf8("New Project"),
-                                self.trUtf8("""Would you like to edit the VCS"""
+                                self.trUtf8(
+                                    """Would you like to edit the VCS"""
                                     """ command options?"""))
                             if vcores:
                                 from VCS.CommandOptionsDialog import \
@@ -2059,7 +2140,8 @@
                             if res == 0:
                                 apres = E5MessageBox.yesNo(self.ui,
                                     self.trUtf8("New project"),
-                                    self.trUtf8("Shall the project file be added"
+                                    self.trUtf8(
+                                        "Shall the project file be added"
                                         " to the repository?"),
                                     yesDefault=True)
                                 if apres:
@@ -2071,7 +2153,8 @@
                         break
             
             # put the project under VCS control
-            if self.vcs is None and self.vcsSoftwareAvailable() and self.vcsRequested:
+            if self.vcs is None and self.vcsSoftwareAvailable() and \
+                    self.vcsRequested:
                 vcsSystemsDict = e5App().getObject("PluginManager")\
                     .getPluginDisplayStrings("version_control")
                 vcsSystemsDisplay = [self.trUtf8("None")]
@@ -2081,11 +2164,12 @@
                 vcsSelected, ok = QInputDialog.getItem(
                     None,
                     self.trUtf8("New Project"),
-                    self.trUtf8("Select version control system for the project"),
+                    self.trUtf8(
+                        "Select version control system for the project"),
                     vcsSystemsDisplay,
                     0, False)
                 if ok and vcsSelected != self.trUtf8("None"):
-                    for vcsSystem, vcsSystemDisplay in list(vcsSystemsDict.items()):
+                    for vcsSystem, vcsSystemDisplay in vcsSystemsDict.items():
                         if vcsSystemDisplay == vcsSelected:
                             break
                     else:
@@ -2106,8 +2190,9 @@
                     # edit VCS command options
                     vcores = E5MessageBox.yesNo(self.ui,
                         self.trUtf8("New Project"),
-                        self.trUtf8("""Would you like to edit the VCS command"""
-                                    """ options?"""))
+                        self.trUtf8(
+                            """Would you like to edit the VCS command"""
+                            """ options?"""))
                     if vcores:
                         codlg = vcsCommandOptionsDialog(self.vcs)
                         if codlg.exec_() == QDialog.Accepted:
@@ -2154,7 +2239,8 @@
             if "%language%" in pattern:
                 pattern = pattern.replace("%language%", "*")
             else:
-                tpd = self.pdata["TRANSLATIONPATTERN"][0].split("%language%")[0]
+                tpd = self.pdata["TRANSLATIONPATTERN"][0].split(
+                    "%language%")[0]
         else:
             pattern = "*.ts"
         tslist.extend(Utilities.direntries(tpd, True, pattern))
@@ -2168,14 +2254,16 @@
                                  os.path.basename(tslist[0]).split('_')[0]
                 self.pdata["TRANSLATIONPATTERN"] = \
                     [os.path.join(os.path.dirname(tslist[0]),
-                     "{0}_%language%{1}".format(os.path.basename(tslist[0]).split('_')[0],
+                     "{0}_%language%{1}".format(
+                        os.path.basename(tslist[0]).split('_')[0],
                         os.path.splitext(tslist[0])[1]))]
             else:
                 pattern, ok = QInputDialog.getText(
                     None,
                     self.trUtf8("Translation Pattern"),
-                    self.trUtf8("Enter the path pattern for translation files "
-                                "(use '%language%' in place of the language code):"),
+                    self.trUtf8(
+                        "Enter the path pattern for translation files "
+                        "(use '%language%' in place of the language code):"),
                     QLineEdit.Normal,
                     tslist[0])
                 if pattern:
@@ -2183,7 +2271,8 @@
             if self.pdata["TRANSLATIONPATTERN"]:
                 self.pdata["TRANSLATIONPATTERN"][0] = \
                     self.getRelativePath(self.pdata["TRANSLATIONPATTERN"][0])
-                pattern = self.pdata["TRANSLATIONPATTERN"][0].replace("%language%", "*")
+                pattern = self.pdata["TRANSLATIONPATTERN"][0]\
+                    .replace("%language%", "*")
                 for ts in tslist:
                     if fnmatch.fnmatch(ts, pattern):
                         self.pdata["TRANSLATIONS"].append(ts)
@@ -2191,7 +2280,8 @@
                 if self.pdata["TRANSLATIONSBINPATH"]:
                     tpd = os.path.join(self.ppath,
                                        self.pdata["TRANSLATIONSBINPATH"][0])
-                    pattern = os.path.basename(self.pdata["TRANSLATIONPATTERN"][0])\
+                    pattern = os.path.basename(
+                        self.pdata["TRANSLATIONPATTERN"][0])\
                         .replace("%language%", "*")
                     pattern = self.__binaryTranslationFile(pattern)
                     qmlist = Utilities.direntries(tpd, True, pattern)
@@ -2200,10 +2290,13 @@
                         self.projectLanguageAdded.emit(qm)
             if len(self.pdata["MAINSCRIPT"]) == 0 or \
                len(self.pdata["MAINSCRIPT"][0]) == 0:
-                if self.pdata["PROGLANGUAGE"][0] in ["Python", "Python2", "Python3"]:
-                    self.pdata["MAINSCRIPT"] = ['{0}.py'.format(mainscriptname)]
+                if self.pdata["PROGLANGUAGE"][0] in \
+                        ["Python", "Python2", "Python3"]:
+                    self.pdata["MAINSCRIPT"] = [
+                        '{0}.py'.format(mainscriptname)]
                 elif self.pdata["PROGLANGUAGE"][0] == "Ruby":
-                    self.pdata["MAINSCRIPT"] = ['{0}.rb'.format(mainscriptname)]
+                    self.pdata["MAINSCRIPT"] = [
+                        '{0}.rb'.format(mainscriptname)]
         self.setDirty(True)
         QApplication.restoreOverrideCursor()
     
@@ -2240,13 +2333,15 @@
                 self.subdirs.append(tp)
             
             if self.pdata["TRANSLATIONSBINPATH"]:
-                tp = os.path.join(self.ppath, self.pdata["TRANSLATIONSBINPATH"][0])
+                tp = os.path.join(
+                    self.ppath, self.pdata["TRANSLATIONSBINPATH"][0])
                 if not os.path.isdir(tp):
                     os.makedirs(tp)
                 if tp != self.ppath and tp not in self.subdirs:
                     self.subdirs.append(tp)
             
-            self.pluginGrp.setEnabled(self.pdata["PROJECTTYPE"][0] == "E4Plugin")
+            self.pluginGrp.setEnabled(
+                self.pdata["PROJECTTYPE"][0] == "E4Plugin")
             
             self.__model.projectPropertiesChanged()
             self.projectPropertiesChanged.emit()
@@ -2256,8 +2351,8 @@
         Private slot to display the user specific properties dialog.
         """
         vcsSystem = self.pdata["VCS"] and self.pdata["VCS"][0] or None
-        vcsSystemOverride = \
-            self.pudata["VCSOVERRIDE"] and self.pudata["VCSOVERRIDE"][0] or None
+        vcsSystemOverride = self.pudata["VCSOVERRIDE"] and \
+            self.pudata["VCSOVERRIDE"][0] or None
         
         from .UserPropertiesDialog import UserPropertiesDialog
         dlg = UserPropertiesDialog(self)
@@ -2282,8 +2377,10 @@
                 # start the VCS monitor thread
                 if self.vcs is not None:
                     self.vcs.startStatusMonitor(self)
-                    self.vcs.vcsStatusMonitorData.connect(self.__model.changeVCSStates)
-                    self.vcs.vcsStatusMonitorStatus.connect(self.__statusMonitorStatus)
+                    self.vcs.vcsStatusMonitorData.connect(
+                        self.__model.changeVCSStates)
+                    self.vcs.vcsStatusMonitorStatus.connect(
+                        self.__statusMonitorStatus)
                     self.vcs.vcsStatusChanged.connect(self.__vcsStatusChanged)
                 self.reinitVCS.emit()
             
@@ -2319,7 +2416,8 @@
         """
         Public method to retrieve a lexer association.
         
-        @param filename filename used to determine the associated lexer language (string)
+        @param filename filename used to determine the associated lexer
+            language (string)
         @return the requested lexer language (string)
         """
         # try user settings first
@@ -2354,7 +2452,8 @@
             fn = E5FileDialog.getOpenFileName(
                 self.parent(),
                 self.trUtf8("Open project"),
-                Preferences.getMultiProject("Workspace") or Utilities.getHomeDir(),
+                Preferences.getMultiProject("Workspace") or \
+                    Utilities.getHomeDir(),
                 self.trUtf8("Project Files (*.e4p)"))
         
         QApplication.processEvents()
@@ -2390,23 +2489,28 @@
                         # check, if project is version controlled
                         pluginManager = e5App().getObject("PluginManager")
                         for indicator, vcsData in \
-                                list(pluginManager.getVcsSystemIndicators().items()):
-                            if os.path.exists(os.path.join(self.ppath, indicator)):
+                                pluginManager.getVcsSystemIndicators().items():
+                            if os.path.exists(
+                                    os.path.join(self.ppath, indicator)):
                                 if len(vcsData) > 1:
                                     vcsList = []
-                                    for vcsSystemStr, vcsSystemDisplay in vcsData:
+                                    for vcsSystemStr, vcsSystemDisplay in \
+                                            vcsData:
                                         vcsList.append(vcsSystemDisplay)
                                     QApplication.restoreOverrideCursor()
                                     res, vcs_ok = QInputDialog.getItem(
                                         None,
                                         self.trUtf8("New Project"),
-                                        self.trUtf8("Select Version Control System"),
+                                        self.trUtf8(
+                                            "Select Version Control System"),
                                         vcsList,
                                         0, False)
-                                    QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
+                                    QApplication.setOverrideCursor(
+                                        QCursor(Qt.WaitCursor))
                                     QApplication.processEvents()
                                     if vcs_ok:
-                                        for vcsSystemStr, vcsSystemDisplay in vcsData:
+                                        for vcsSystemStr, vcsSystemDisplay in \
+                                                vcsData:
                                             if res == vcsSystemDisplay:
                                                 vcsSystem = vcsSystemStr
                                                 break
@@ -2420,7 +2524,8 @@
                                 self.vcs = self.initVCS()
                                 self.setDirty(True)
                     if self.vcs is not None and \
-                       self.vcs.vcsRegisteredState(self.ppath) != self.vcs.canBeCommitted:
+                           (self.vcs.vcsRegisteredState(self.ppath) != 
+                            self.vcs.canBeCommitted):
                         self.pdata["VCS"] = ['None']
                         self.vcs = self.initVCS()
                     self.closeAct.setEnabled(True)
@@ -2439,7 +2544,8 @@
                     self.menuDiagramAct.setEnabled(True)
                     self.menuApidocAct.setEnabled(True)
                     self.menuPackagersAct.setEnabled(True)
-                    self.pluginGrp.setEnabled(self.pdata["PROJECTTYPE"][0] == "E4Plugin")
+                    self.pluginGrp.setEnabled(
+                        self.pdata["PROJECTTYPE"][0] == "E4Plugin")
                     self.addLanguageAct.setEnabled(
                         len(self.pdata["TRANSLATIONPATTERN"]) > 0 and \
                         self.pdata["TRANSLATIONPATTERN"][0] != '')
@@ -2461,7 +2567,8 @@
                         # open the main script
                         if len(self.pdata["MAINSCRIPT"]) == 1:
                             self.sourceFile.emit(
-                                os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0]))
+                                os.path.join(
+                                    self.ppath, self.pdata["MAINSCRIPT"][0]))
                         
                         # open a project session file being quiet about errors
                         if reopen:
@@ -2469,7 +2576,8 @@
                         elif Preferences.getProject("AutoLoadSession"):
                             self.__readSession(quiet=True)
                     
-                    # open a project debugger properties file being quiet about errors
+                    # open a project debugger properties file being quiet
+                    # about errors
                     if Preferences.getProject("AutoLoadDbgProperties"):
                         self.__readDebugProperties(True)
                     
@@ -2706,7 +2814,8 @@
         if reportSyntaxErrors and filesWithSyntaxErrors > 0:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Syntax errors detected"),
-                self.trUtf8("""The project contains %n file(s) with syntax errors.""",
+                self.trUtf8(
+                    """The project contains %n file(s) with syntax errors.""",
                     "", filesWithSyntaxErrors)
             )
             return False
@@ -2736,7 +2845,8 @@
         if reportSyntaxErrors and filesWithSyntaxErrors > 0:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Syntax errors detected"),
-                self.trUtf8("""The project contains %n file(s) with syntax errors.""",
+                self.trUtf8(
+                    """The project contains %n file(s) with syntax errors.""",
                     "", filesWithSyntaxErrors)
             )
             return False
@@ -2747,7 +2857,8 @@
         """
         Public method to return the main script filename.
         
-        @param normalized flag indicating a normalized filename is wanted (boolean)
+        @param normalized flag indicating a normalized filename is wanted
+            (boolean)
         @return filename of the projects main script (string)
         """
         if len(self.pdata["MAINSCRIPT"]):
@@ -2762,11 +2873,13 @@
         """
         Public method to return the source script files.
         
-        @param normalized flag indicating a normalized filename is wanted (boolean)
+        @param normalized flag indicating a normalized filename is wanted
+            (boolean)
         @return list of the projects scripts (list of string)
         """
         if normalized:
-            return [os.path.join(self.ppath, fn) for fn in self.pdata["SOURCES"]]
+            return [os.path.join(self.ppath, fn) for fn in 
+                    self.pdata["SOURCES"]]
         else:
             return self.pdata["SOURCES"]
         
@@ -2865,12 +2978,15 @@
         Public method to check, if a path starts with the project path.
         
         @param path path to be checked (string)
+        @return flag indicating that the path starts with the project path
+            (boolean)
         """
         if self.ppath:
             if path == self.ppath:
                 return True
-            elif Utilities.normcasepath(Utilities.toNativeSeparators(path)).startswith(
-                 Utilities.normcasepath(Utilities.toNativeSeparators(self.ppath + "/"))):
+            elif Utilities.normcasepath(Utilities.toNativeSeparators(path))\
+                    .startswith(Utilities.normcasepath(
+                    Utilities.toNativeSeparators(self.ppath + "/"))):
                 return True
             else:
                 return False
@@ -3000,7 +3116,8 @@
         
     def isProjectFile(self, fn):
         """
-        Public method used to check, if the passed in filename belongs to the project.
+        Public method used to check, if the passed in filename belongs to the
+        project.
         
         @param fn filename to be checked (string)
         @return flag indicating membership (boolean)
@@ -3014,7 +3131,8 @@
         
     def __checkProjectFileGroup(self, fn, group):
         """
-        Private method to check, if a file is in a specific file group of the project.
+        Private method to check, if a file is in a specific file group of the
+        project.
         
         @param fn filename to be checked (string)
         @param group group to check (string)
@@ -3044,8 +3162,8 @@
         
     def isProjectSource(self, fn):
         """
-        Public method used to check, if the passed in filename belongs to the project
-        sources.
+        Public method used to check, if the passed in filename belongs to the
+        project sources.
         
         @param fn filename to be checked (string)
         @return flag indicating membership (boolean)
@@ -3054,8 +3172,8 @@
         
     def isProjectForm(self, fn):
         """
-        Public method used to check, if the passed in filename belongs to the project
-        forms.
+        Public method used to check, if the passed in filename belongs to the
+        project forms.
         
         @param fn filename to be checked (string)
         @return flag indicating membership (boolean)
@@ -3064,8 +3182,8 @@
         
     def isProjectInterface(self, fn):
         """
-        Public method used to check, if the passed in filename belongs to the project
-        interfaces.
+        Public method used to check, if the passed in filename belongs to the
+        project interfaces.
         
         @param fn filename to be checked (string)
         @return flag indicating membership (boolean)
@@ -3074,8 +3192,8 @@
         
     def isProjectResource(self, fn):
         """
-        Public method used to check, if the passed in filename belongs to the project
-        resources.
+        Public method used to check, if the passed in filename belongs to the
+        project resources.
         
         @param fn filename to be checked (string)
         @return flag indicating membership (boolean)
@@ -3140,7 +3258,8 @@
         self.saveasAct = E5Action(self.trUtf8('Save project as'),
                 UI.PixmapCache.getIcon("projectSaveAs.png"),
                 self.trUtf8('Save &as...'), 0, 0, self, 'project_save_as')
-        self.saveasAct.setStatusTip(self.trUtf8('Save the current project to a new file'))
+        self.saveasAct.setStatusTip(self.trUtf8(
+            'Save the current project to a new file'))
         self.saveasAct.setWhatsThis(self.trUtf8(
             """<b>Save as</b>"""
             """<p>This saves the current project to a new file.</p>"""
@@ -3154,7 +3273,8 @@
                 UI.PixmapCache.getIcon("fileMisc.png"),
                 self.trUtf8('Add &files...'), 0, 0,
                 self.actGrp2, 'project_add_file')
-        self.addFilesAct.setStatusTip(self.trUtf8('Add files to the current project'))
+        self.addFilesAct.setStatusTip(self.trUtf8(
+            'Add files to the current project'))
         self.addFilesAct.setWhatsThis(self.trUtf8(
             """<b>Add files...</b>"""
             """<p>This opens a dialog for adding files"""
@@ -3164,10 +3284,11 @@
         self.addFilesAct.triggered[()].connect(self.addFiles)
         self.actions.append(self.addFilesAct)
 
-        self.addDirectoryAct = E5Action(self.trUtf8('Add directory to project'),
-                UI.PixmapCache.getIcon("dirOpen.png"),
-                self.trUtf8('Add directory...'), 0, 0,
-                self.actGrp2, 'project_add_directory')
+        self.addDirectoryAct = E5Action(
+            self.trUtf8('Add directory to project'),
+            UI.PixmapCache.getIcon("dirOpen.png"),
+            self.trUtf8('Add directory...'), 0, 0,
+            self.actGrp2, 'project_add_directory')
         self.addDirectoryAct.setStatusTip(
             self.trUtf8('Add a directory to the current project'))
         self.addDirectoryAct.setWhatsThis(self.trUtf8(
@@ -3178,10 +3299,11 @@
         self.addDirectoryAct.triggered[()].connect(self.addDirectory)
         self.actions.append(self.addDirectoryAct)
 
-        self.addLanguageAct = E5Action(self.trUtf8('Add translation to project'),
-                UI.PixmapCache.getIcon("linguist4.png"),
-                self.trUtf8('Add &translation...'), 0, 0,
-                self.actGrp2, 'project_add_translation')
+        self.addLanguageAct = E5Action(
+            self.trUtf8('Add translation to project'),
+            UI.PixmapCache.getIcon("linguist4.png"),
+            self.trUtf8('Add &translation...'), 0, 0,
+            self.actGrp2, 'project_add_translation')
         self.addLanguageAct.setStatusTip(
             self.trUtf8('Add a translation to the current project'))
         self.addLanguageAct.setWhatsThis(self.trUtf8(
@@ -3195,18 +3317,20 @@
         act = E5Action(self.trUtf8('Search new files'),
                 self.trUtf8('Searc&h new files...'), 0, 0,
                 self.actGrp2, 'project_search_new_files')
-        act.setStatusTip(self.trUtf8('Search new files in the project directory.'))
+        act.setStatusTip(self.trUtf8(
+            'Search new files in the project directory.'))
         act.setWhatsThis(self.trUtf8(
             """<b>Search new files...</b>"""
-            """<p>This searches for new files (sources, *.ui, *.idl) in the project"""
-            """ directory and registered subdirectories.</p>"""
+            """<p>This searches for new files (sources, *.ui, *.idl) in"""
+            """ the project directory and registered subdirectories.</p>"""
         ))
         act.triggered[()].connect(self.__searchNewFiles)
         self.actions.append(act)
 
         self.propsAct = E5Action(self.trUtf8('Project properties'),
                 UI.PixmapCache.getIcon("projectProps.png"),
-                self.trUtf8('&Properties...'), 0, 0, self, 'project_properties')
+                self.trUtf8('&Properties...'), 0, 0, self,
+                'project_properties')
         self.propsAct.setStatusTip(self.trUtf8('Show the project properties'))
         self.propsAct.setWhatsThis(self.trUtf8(
             """<b>Properties...</b>"""
@@ -3217,12 +3341,14 @@
 
         self.userPropsAct = E5Action(self.trUtf8('User project properties'),
                 UI.PixmapCache.getIcon("projectUserProps.png"),
-                self.trUtf8('&User Properties...'), 0, 0, self, 'project_user_properties')
+                self.trUtf8('&User Properties...'), 0, 0, self,
+                'project_user_properties')
         self.userPropsAct.setStatusTip(self.trUtf8(
             'Show the user specific project properties'))
         self.userPropsAct.setWhatsThis(self.trUtf8(
             """<b>User Properties...</b>"""
-            """<p>This shows a dialog to edit the user specific project properties.</p>"""
+            """<p>This shows a dialog to edit the user specific project"""
+            """ properties.</p>"""
         ))
         self.userPropsAct.triggered[()].connect(self.__showUserProperties)
         self.actions.append(self.userPropsAct)
@@ -3234,24 +3360,27 @@
             self.trUtf8('Show the project filetype associations'))
         self.filetypesAct.setWhatsThis(self.trUtf8(
             """<b>Filetype Associations...</b>"""
-            """<p>This shows a dialog to edit the filetype associations of the project."""
-            """ These associations determine the type (source, form, interface"""
-            """ or others) with a filename pattern. They are used when adding a file"""
-            """ to the project and when performing a search for new files.</p>"""
+            """<p>This shows a dialog to edit the filetype associations of"""
+            """ the project. These associations determine the type"""
+            """ (source, form, interface or others) with a filename"""
+            """ pattern. They are used when adding a file to the project"""
+            """ and when performing a search for new files.</p>"""
         ))
-        self.filetypesAct.triggered[()].connect(self.__showFiletypeAssociations)
+        self.filetypesAct.triggered[()].connect(
+            self.__showFiletypeAssociations)
         self.actions.append(self.filetypesAct)
 
         self.lexersAct = E5Action(self.trUtf8('Lexer Associations'),
                 self.trUtf8('Lexer Associations...'), 0, 0,
                 self, 'project_lexer_associatios')
-        self.lexersAct.setStatusTip(
-            self.trUtf8('Show the project lexer associations (overriding defaults)'))
+        self.lexersAct.setStatusTip(self.trUtf8(
+            'Show the project lexer associations (overriding defaults)'))
         self.lexersAct.setWhatsThis(self.trUtf8(
             """<b>Lexer Associations...</b>"""
-            """<p>This shows a dialog to edit the lexer associations of the project."""
-            """ These associations override the global lexer associations. Lexers"""
-            """ are used to highlight the editor text.</p>"""
+            """<p>This shows a dialog to edit the lexer associations of"""
+            """ the project. These associations override the global lexer"""
+            """ associations. Lexers are used to highlight the editor"""
+            """ text.</p>"""
         ))
         self.lexersAct.triggered[()].connect(self.__showLexerAssociations)
         self.actions.append(self.lexersAct)
@@ -3264,7 +3393,8 @@
         act.setStatusTip(self.trUtf8('Show the debugger properties'))
         act.setWhatsThis(self.trUtf8(
             """<b>Debugger Properties...</b>"""
-            """<p>This shows a dialog to edit project specific debugger settings.</p>"""
+            """<p>This shows a dialog to edit project specific debugger"""
+            """ settings.</p>"""
         ))
         act.triggered[()].connect(self.__showDebugProperties)
         self.actions.append(act)
@@ -3370,7 +3500,8 @@
             self.trUtf8('Show some code metrics for the project.'))
         self.codeMetricsAct.setWhatsThis(self.trUtf8(
             """<b>Code Metrics...</b>"""
-            """<p>This shows some code metrics for all Python files in the project.</p>"""
+            """<p>This shows some code metrics for all Python files in"""
+            """ the project.</p>"""
         ))
         self.codeMetricsAct.triggered[()].connect(self.__showCodeMetrics)
         self.actions.append(self.codeMetricsAct)
@@ -3382,8 +3513,8 @@
             self.trUtf8('Show code coverage information for the project.'))
         self.codeCoverageAct.setWhatsThis(self.trUtf8(
             """<b>Code Coverage...</b>"""
-            """<p>This shows the code coverage information for all Python files"""
-            """ in the project.</p>"""
+            """<p>This shows the code coverage information for all Python"""
+            """ files in the project.</p>"""
         ))
         self.codeCoverageAct.triggered[()].connect(self.__showCodeCoverage)
         self.actions.append(self.codeCoverageAct)
@@ -3402,16 +3533,18 @@
 
         self.graphicsGrp = createActionGroup(self)
 
-        self.applicationDiagramAct = E5Action(self.trUtf8('Application Diagram'),
-                self.trUtf8('&Application Diagram...'), 0, 0,
-                self.graphicsGrp, 'project_application_diagram')
+        self.applicationDiagramAct = E5Action(
+            self.trUtf8('Application Diagram'),
+            self.trUtf8('&Application Diagram...'), 0, 0,
+            self.graphicsGrp, 'project_application_diagram')
         self.applicationDiagramAct.setStatusTip(
             self.trUtf8('Show a diagram of the project.'))
         self.applicationDiagramAct.setWhatsThis(self.trUtf8(
             """<b>Application Diagram...</b>"""
             """<p>This shows a diagram of the project.</p>"""
         ))
-        self.applicationDiagramAct.triggered[()].connect(self.handleApplicationDiagram)
+        self.applicationDiagramAct.triggered[()].connect(
+            self.handleApplicationDiagram)
         self.actions.append(self.applicationDiagramAct)
 
         self.loadDiagramAct = E5Action(self.trUtf8('Load Diagram'),
@@ -3436,8 +3569,9 @@
             self.trUtf8('Create an initial PKGLIST file for an eric5 plugin.'))
         self.pluginPkgListAct.setWhatsThis(self.trUtf8(
             """<b>Create Package List</b>"""
-            """<p>This creates an initial list of files to include in an eric5 """
-            """plugin archive. The list is created from the project file.</p>"""
+            """<p>This creates an initial list of files to include in an"""
+            """ eric5 plugin archive. The list is created from the project"""
+            """ file.</p>"""
         ))
         self.pluginPkgListAct.triggered[()].connect(self.__pluginCreatePkgList)
         self.actions.append(self.pluginPkgListAct)
@@ -3450,27 +3584,29 @@
             self.trUtf8('Create an eric5 plugin archive file.'))
         self.pluginArchiveAct.setWhatsThis(self.trUtf8(
             """<b>Create Plugin Archive</b>"""
-            """<p>This creates an eric5 plugin archive file using the list of files """
-            """given in the PKGLIST file. The archive name is built from the main """
-            """script name.</p>"""
+            """<p>This creates an eric5 plugin archive file using the list"""
+            """ of files given in the PKGLIST file. The archive name is"""
+            """ built from the main script name.</p>"""
         ))
         self.pluginArchiveAct.triggered[()].connect(self.__pluginCreateArchive)
         self.actions.append(self.pluginArchiveAct)
     
-        self.pluginSArchiveAct = E5Action(self.trUtf8('Create Plugin Archive (Snapshot)'),
-                UI.PixmapCache.getIcon("pluginArchiveSnapshot.png"),
-                self.trUtf8('Create Plugin Archive (&Snapshot)'), 0, 0,
-                self.pluginGrp, 'project_plugin_sarchive')
-        self.pluginSArchiveAct.setStatusTip(
-            self.trUtf8('Create an eric5 plugin archive file (snapshot release).'))
+        self.pluginSArchiveAct = E5Action(
+            self.trUtf8('Create Plugin Archive (Snapshot)'),
+            UI.PixmapCache.getIcon("pluginArchiveSnapshot.png"),
+            self.trUtf8('Create Plugin Archive (&Snapshot)'), 0, 0,
+            self.pluginGrp, 'project_plugin_sarchive')
+        self.pluginSArchiveAct.setStatusTip(self.trUtf8(
+            'Create an eric5 plugin archive file (snapshot release).'))
         self.pluginSArchiveAct.setWhatsThis(self.trUtf8(
             """<b>Create Plugin Archive (Snapshot)</b>"""
-            """<p>This creates an eric5 plugin archive file using the list of files """
-            """given in the PKGLIST file. The archive name is built from the main """
-            """script name. The version entry of the main script is modified to """
-            """reflect a snapshot release.</p>"""
+            """<p>This creates an eric5 plugin archive file using the list"""
+            """ of files given in the PKGLIST file. The archive name is"""
+            """ built from the main script name. The version entry of the"""
+            """ main script is modified to reflect a snapshot release.</p>"""
         ))
-        self.pluginSArchiveAct.triggered[()].connect(self.__pluginCreateSnapshotArchive)
+        self.pluginSArchiveAct.triggered[()].connect(
+            self.__pluginCreateSnapshotArchive)
         self.actions.append(self.pluginSArchiveAct)
 
         self.closeAct.setEnabled(False)
@@ -3605,7 +3741,8 @@
         """
         Public slot to initialize the project toolbar.
         
-        @param toolbarManager reference to a toolbar manager object (E5ToolBarManager)
+        @param toolbarManager reference to a toolbar manager object
+            (E5ToolBarManager)
         @return the toolbar generated (QToolBar)
         """
         tb = QToolBar(self.trUtf8("Project"), self.ui)
@@ -3676,7 +3813,8 @@
         
     def __openRecent(self, act):
         """
-        Private method to open a project from the list of rencently opened projects.
+        Private method to open a project from the list of rencently opened
+        projects.
         
         @param act reference to the action that triggered (QAction)
         """
@@ -3722,7 +3860,8 @@
             except OSError:
                 newSources = []
             if self.pdata["TRANSLATIONPATTERN"]:
-                pattern = self.pdata["TRANSLATIONPATTERN"][0].replace("%language%", "*")
+                pattern = self.pdata["TRANSLATIONPATTERN"][0]\
+                    .replace("%language%", "*")
             else:
                 pattern = "*.ts"
             binpattern = self.__binaryTranslationFile(pattern)
@@ -3737,7 +3876,8 @@
                     continue
                 
                 # set fn to project relative name
-                # then reset ns to fully qualified name for insertion, possibly.
+                # then reset ns to fully qualified name for insertion,
+                # possibly.
                 if dir == "":
                     fn = ns
                 else:
@@ -3754,22 +3894,29 @@
                 
                 filetype = ""
                 bfn = os.path.basename(fn)
-                for pattern in reversed(sorted(self.pdata["FILETYPES"].keys())):
+                for pattern in reversed(
+                        sorted(self.pdata["FILETYPES"].keys())):
                     if fnmatch.fnmatch(bfn, pattern):
                         filetype = self.pdata["FILETYPES"][pattern]
                         break
                 
-                if (filetype == "SOURCES" and fn not in self.pdata["SOURCES"]) or \
-                   (filetype == "FORMS" and fn not in self.pdata["FORMS"]) or \
-                   (filetype == "INTERFACES" and fn not in self.pdata["INTERFACES"]) or \
-                   (filetype == "RESOURCES" and fn not in self.pdata["RESOURCES"]) or \
+                if (filetype == "SOURCES" and 
+                    fn not in self.pdata["SOURCES"]) or \
+                   (filetype == "FORMS" and 
+                    fn not in self.pdata["FORMS"]) or \
+                   (filetype == "INTERFACES" and 
+                    fn not in self.pdata["INTERFACES"]) or \
+                   (filetype == "RESOURCES" and 
+                    fn not in self.pdata["RESOURCES"]) or \
                    (filetype == "OTHERS" and fn not in self.pdata["OTHERS"]):
                     if autoInclude and AI:
                         self.appendFile(ns)
                     else:
                         newFiles.append(ns)
-                elif filetype == "TRANSLATIONS" and fn not in self.pdata["TRANSLATIONS"]:
-                    if fnmatch.fnmatch(ns, pattern) or fnmatch.fnmatch(ns, binpattern):
+                elif filetype == "TRANSLATIONS" and \
+                        fn not in self.pdata["TRANSLATIONS"]:
+                    if fnmatch.fnmatch(ns, pattern) or \
+                            fnmatch.fnmatch(ns, binpattern):
                         if autoInclude and AI:
                             self.appendFile(ns)
                         else:
@@ -3805,10 +3952,12 @@
         
     def othersAdded(self, fn, updateModel=True):
         """
-        Public slot to be called, if something was added to the OTHERS project data area.
+        Public slot to be called, if something was added to the OTHERS project
+        data area.
         
         @param fn filename or directory name added (string)
-        @param updateModel flag indicating an update of the model is requested (boolean)
+        @param updateModel flag indicating an update of the model is requested
+            (boolean)
         """
         self.projectOthersAdded.emit(fn)
         updateModel and self.__model.addNewItem("OTHERS", fn)
@@ -3876,7 +4025,8 @@
         Public method used to instantiate a vcs system.
         
         @param vcsSystem type of VCS to be used (string)
-        @param nooverride flag indicating to ignore an override request (boolean)
+        @param nooverride flag indicating to ignore an override request
+            (boolean)
         @return a reference to the vcs object
         """
         vcs = None
@@ -3915,8 +4065,9 @@
                     QApplication.restoreOverrideCursor()
                     E5MessageBox.critical(self.ui,
                         self.trUtf8("Version Control System"),
-                        self.trUtf8("<p>The selected VCS <b>{0}</b> could not be found."
-                                    "<br/>Reverting override.</p><p>{1}</p>")\
+                        self.trUtf8(
+                            "<p>The selected VCS <b>{0}</b> could not be"
+                            " found. <br/>Reverting override.</p><p>{1}</p>")
                             .format(vcsSystem, msg))
                     self.pudata["VCSOVERRIDE"] = []
                     return self.initVCS(nooverride=True)
@@ -3924,9 +4075,10 @@
                 QApplication.restoreOverrideCursor()
                 E5MessageBox.critical(self.ui,
                     self.trUtf8("Version Control System"),
-                    self.trUtf8("<p>The selected VCS <b>{0}</b> could not be found.<br/>"
-                                "Disabling version control.</p><p>{1}</p>")\
-                        .format(vcsSystem, msg))
+                    self.trUtf8(
+                        "<p>The selected VCS <b>{0}</b> could not be"
+                        " found.<br/>Disabling version control.</p>"
+                        "<p>{1}</p>").format(vcsSystem, msg))
                 vcs = None
                 if forProject:
                     self.pdata["VCS"][0] = 'None'
@@ -4032,7 +4184,8 @@
 
     def __showCodeCoverage(self):
         """
-        Private slot used to show the code coverage information for the project files.
+        Private slot used to show the code coverage information for the
+        project files.
         """
         fn = self.getMainScript(True)
         if fn is None:
@@ -4174,7 +4327,8 @@
         """
         from Graphics.UMLDialog import UMLDialog
         self.loadedDiagram = None
-        loadedDiagram = UMLDialog(UMLDialog.NoDiagram, self, parent=self.parent())
+        loadedDiagram = UMLDialog(UMLDialog.NoDiagram,
+                                  self, parent=self.parent())
         if loadedDiagram.load():
             self.loadedDiagram = loadedDiagram
             self.loadedDiagram.show(fromFile=True)
@@ -4284,8 +4438,8 @@
         
         # build the list of entries
         lst_ = []
-        for key in \
-            ["SOURCES", "FORMS", "RESOURCES", "TRANSLATIONS", "INTERFACES", "OTHERS"]:
+        for key in ["SOURCES", "FORMS", "RESOURCES", "TRANSLATIONS",
+                    "INTERFACES", "OTHERS"]:
             lst_.extend(self.pdata[key])
         lst = []
         for entry in lst_:
@@ -4306,14 +4460,16 @@
             else:
                 newline = self.getEolString()
             pkglistFile = open(pkglist, "w", encoding="utf-8", newline=newline)
-            pkglistFile.write("\n".join([Utilities.fromNativeSeparators(f) for f in lst]))
+            pkglistFile.write(
+                "\n".join([Utilities.fromNativeSeparators(f) for f in lst]))
             pkglistFile.write("\n")  # ensure the file ends with an empty line
             pkglistFile.close()
         except IOError as why:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Create Package List"),
-                self.trUtf8("""<p>The file <b>PKGLIST</b> could not be created.</p>"""
-                            """<p>Reason: {0}</p>""").format(str(why)))
+                self.trUtf8(
+                    """<p>The file <b>PKGLIST</b> could not be created.</p>"""
+                    """<p>Reason: {0}</p>""").format(str(why)))
             return
         
         if not "PKGLIST" in self.pdata["OTHERS"]:
@@ -4337,8 +4493,9 @@
            len(self.pdata["MAINSCRIPT"][0]) == 0:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Create Plugin Archive"),
-                self.trUtf8("""The project does not have a main script defined. """
-                            """Aborting..."""))
+                self.trUtf8(
+                    """The project does not have a main script defined. """
+                    """Aborting..."""))
             return
         
         try:
@@ -4349,42 +4506,48 @@
         except IOError as why:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Create Plugin Archive"),
-                self.trUtf8("""<p>The file <b>PKGLIST</b> could not be read.</p>"""
-                            """<p>Reason: {0}</p>""").format(str(why)))
+                self.trUtf8(
+                    """<p>The file <b>PKGLIST</b> could not be read.</p>"""
+                    """<p>Reason: {0}</p>""").format(str(why)))
             return
         
-        archive = \
-            os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0].replace(".py", ".zip"))
+        archive = os.path.join(
+            self.ppath, self.pdata["MAINSCRIPT"][0].replace(".py", ".zip"))
         try:
             archiveFile = zipfile.ZipFile(archive, "w")
         except IOError as why:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Create Plugin Archive"),
-                self.trUtf8("""<p>The eric5 plugin archive file <b>{0}</b> could """
-                            """not be created.</p>"""
-                            """<p>Reason: {1}</p>""").format(archive, str(why)))
+                self.trUtf8(
+                    """<p>The eric5 plugin archive file <b>{0}</b> could """
+                    """not be created.</p>"""
+                    """<p>Reason: {1}</p>""").format(archive, str(why)))
             return
         
         for name in names:
             if name:
                 try:
-                    self.__createZipDirEntries(os.path.split(name)[0], archiveFile)
+                    self.__createZipDirEntries(
+                        os.path.split(name)[0], archiveFile)
                     if snapshot and name == self.pdata["MAINSCRIPT"][0]:
                         snapshotSource, version = self.__createSnapshotSource(
-                            os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0]))
+                            os.path.join(self.ppath,
+                                         self.pdata["MAINSCRIPT"][0]))
                         archiveFile.writestr(name, snapshotSource)
                     else:
                         archiveFile.write(os.path.join(self.ppath, name), name)
                         if name == self.pdata["MAINSCRIPT"][0]:
                             version = self.__pluginExtractVersion(
-                                os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0]))
+                                os.path.join(self.ppath,
+                                             self.pdata["MAINSCRIPT"][0]))
                 except OSError as why:
                     E5MessageBox.critical(self.ui,
                         self.trUtf8("Create Plugin Archive"),
-                        self.trUtf8("""<p>The file <b>{0}</b> could not be stored """
-                                    """in the archive. Ignoring it.</p>"""
-                                    """<p>Reason: {1}</p>""")\
-                                    .format(os.path.join(self.ppath, name), str(why)))
+                        self.trUtf8(
+                            """<p>The file <b>{0}</b> could not be stored """
+                            """in the archive. Ignoring it.</p>"""
+                            """<p>Reason: {1}</p>""")\
+                            .format(os.path.join(self.ppath, name), str(why)))
         archiveFile.writestr("VERSION", version.encode("utf-8"))
         archiveFile.close()
         
@@ -4392,16 +4555,19 @@
             self.appendFile(archive)
         
         if self.ui.notificationsEnabled():
-            self.ui.showNotification(UI.PixmapCache.getPixmap("pluginArchive48.png"),
+            self.ui.showNotification(
+                UI.PixmapCache.getPixmap("pluginArchive48.png"),
                 self.trUtf8("Create Plugin Archive"),
-                self.trUtf8("""<p>The eric5 plugin archive file <b>{0}</b> was """
-                            """created successfully.</p>""")\
+                self.trUtf8(
+                    """<p>The eric5 plugin archive file <b>{0}</b> was """
+                    """created successfully.</p>""")\
                     .format(os.path.basename(archive)))
         else:
             E5MessageBox.information(self.ui,
                 self.trUtf8("Create Plugin Archive"),
-                self.trUtf8("""<p>The eric5 plugin archive file <b>{0}</b> was """
-                            """created successfully.</p>""").format(archive))
+                self.trUtf8(
+                    """<p>The eric5 plugin archive file <b>{0}</b> was """
+                    """created successfully.</p>""").format(archive))
     
     def __pluginCreateSnapshotArchive(self):
         """
@@ -4445,7 +4611,8 @@
                 self.trUtf8("Create Plugin Archive"),
                 self.trUtf8("""<p>The plugin file <b>{0}</b> could """
                             """not be read.</p>"""
-                            """<p>Reason: {1}</p>""").format(filename, str(why)))
+                            """<p>Reason: {1}</p>""")
+                            .format(filename, str(why)))
             return b"", ""
         
         lineno = 0
@@ -4453,9 +4620,10 @@
             if sourcelines[lineno].startswith("version = "):
                 # found the line to modify
                 datestr = time.strftime("%Y%m%d")
-                lineend = sourcelines[lineno].replace(sourcelines[lineno].rstrip(), "")
-                sversion = "{0}-snapshot-{1}".format(
-                    sourcelines[lineno].replace("version = ", "").strip()[1:-1],
+                lineend = sourcelines[lineno]\
+                    .replace(sourcelines[lineno].rstrip(), "")
+                sversion = "{0}-snapshot-{1}".format(sourcelines[lineno]\
+                    .replace("version = ", "").strip()[1:-1],
                     datestr)
                 sourcelines[lineno] = '{0} + "-snapshot-{1}"{2}'.format(
                     sourcelines[lineno].rstrip(), datestr, lineend)
@@ -4480,9 +4648,10 @@
         except (IOError, UnicodeError) as why:
             E5MessageBox.critical(self.ui,
                 self.trUtf8("Create Plugin Archive"),
-                self.trUtf8("""<p>The plugin file <b>{0}</b> could """
-                            """not be read.</p>"""
-                            """<p>Reason: {1}</p>""").format(filename, str(why)))
+                self.trUtf8(
+                    """<p>The plugin file <b>{0}</b> could """
+                    """not be read.</p> <p>Reason: {1}</p>""")
+                    .format(filename, str(why)))
             return ""
         
         for sourceline in sourcelines:

eric ide

mercurial