Sun, 06 May 2012 11:23:54 +0200
Merged remote changes.
--- a/Graphics/ApplicationDiagram.py Sun May 06 11:22:33 2012 +0200 +++ b/Graphics/ApplicationDiagram.py Sun May 06 11:23:54 2012 +0200 @@ -19,6 +19,8 @@ import Utilities.ModuleParser import Utilities +import Preferences + class ApplicationDiagram(UMLDialog): """ @@ -52,6 +54,8 @@ @return dictionary of modules contained in the application. """ + extensions = Preferences.getPython("PythonExtensions") + \ + Preferences.getPython("Python3Extensions") + ['.rb'] moduleDict = {} mods = self.project.pdata["SOURCES"] modules = [] @@ -71,7 +75,7 @@ if module.endswith("__init__.py"): continue try: - mod = Utilities.ModuleParser.readModule(module) + mod = Utilities.ModuleParser.readModule(module, extensions=extensions) except ImportError: continue else:
--- a/Graphics/ImportsDiagram.py Sun May 06 11:22:33 2012 +0200 +++ b/Graphics/ImportsDiagram.py Sun May 06 11:23:54 2012 +0200 @@ -64,6 +64,8 @@ @return dictionary of modules contained in the package. """ + extensions = Preferences.getPython("PythonExtensions") + \ + Preferences.getPython("Python3Extensions") moduleDict = {} modules = [] for ext in Preferences.getPython("PythonExtensions") + \ @@ -83,7 +85,8 @@ QApplication.processEvents() prog = prog + 1 try: - mod = Utilities.ModuleParser.readModule(module, caching=False) + mod = Utilities.ModuleParser.readModule(module, extensions=extensions, + caching=False) except ImportError: continue else:
--- a/Graphics/PackageDiagram.py Sun May 06 11:22:33 2012 +0200 +++ b/Graphics/PackageDiagram.py Sun May 06 11:23:54 2012 +0200 @@ -68,6 +68,8 @@ ['*{0}'.format(ext) for ext in Preferences.getPython("PythonExtensions")] + \ ['*{0}'.format(ext) for ext in Preferences.getPython("Python3Extensions")] + \ ['*.rb'] + extensions = Preferences.getPython("PythonExtensions") + \ + Preferences.getPython("Python3Extensions") + ['.rb'] moduleDict = {} modules = [] @@ -85,7 +87,7 @@ QApplication.processEvents() prog += 1 try: - mod = Utilities.ModuleParser.readModule(module) + mod = Utilities.ModuleParser.readModule(module, extensions=extensions) except ImportError: continue else:
--- a/Graphics/UMLClassDiagram.py Sun May 06 11:22:33 2012 +0200 +++ b/Graphics/UMLClassDiagram.py Sun May 06 11:23:54 2012 +0200 @@ -12,6 +12,7 @@ from PyQt4.QtGui import QGraphicsTextItem import Utilities.ModuleParser +import Preferences from .UMLDialog import UMLDialog from .ClassItem import ClassItem, ClassModel @@ -63,7 +64,9 @@ The algorithm is borrowed from Boa Constructor. """ try: - module = Utilities.ModuleParser.readModule(self.file) + extensions = Preferences.getPython("PythonExtensions") + \ + Preferences.getPython("Python3Extensions") + ['.rb'] + module = Utilities.ModuleParser.readModule(self.file, extensions=extensions) except ImportError: ct = QGraphicsTextItem(None, self.scene) ct.setHtml(
--- a/Project/CreateDialogCodeDialog.py Sun May 06 11:22:33 2012 +0200 +++ b/Project/CreateDialogCodeDialog.py Sun May 06 11:23:54 2012 +0200 @@ -78,7 +78,13 @@ return try: - self.__module = ModuleParser.readModule(self.srcFile, caching=False) + splitExt = os.path.splitext(self.srcFile) + if len(splitExt) == 2: + exts = [splitExt[1]] + else: + exts = None + self.__module = ModuleParser.readModule(self.srcFile, extensions=exts, + caching=False) except ImportError: pass