Graphics/ApplicationDiagram.py

changeset 1845
d481279d882b
parent 1509
c0b5e693b0eb
child 2025
8bb085c59cd2
child 2303
0ed4ed026c16
equal deleted inserted replaced
1844:0388a36b5fcf 1845:d481279d882b
16 from .PackageItem import PackageItem, PackageModel 16 from .PackageItem import PackageItem, PackageModel
17 from .AssociationItem import AssociationItem, Imports 17 from .AssociationItem import AssociationItem, Imports
18 18
19 import Utilities.ModuleParser 19 import Utilities.ModuleParser
20 import Utilities 20 import Utilities
21
22 import Preferences
21 23
22 24
23 class ApplicationDiagram(UMLDialog): 25 class ApplicationDiagram(UMLDialog):
24 """ 26 """
25 Class implementing a dialog showing an imports diagram of the application. 27 Class implementing a dialog showing an imports diagram of the application.
50 """ 52 """
51 Private method to build a dictionary of modules contained in the application. 53 Private method to build a dictionary of modules contained in the application.
52 54
53 @return dictionary of modules contained in the application. 55 @return dictionary of modules contained in the application.
54 """ 56 """
57 extensions = Preferences.getPython("PythonExtensions") + \
58 Preferences.getPython("Python3Extensions") + ['.rb']
55 moduleDict = {} 59 moduleDict = {}
56 mods = self.project.pdata["SOURCES"] 60 mods = self.project.pdata["SOURCES"]
57 modules = [] 61 modules = []
58 for module in mods: 62 for module in mods:
59 modules.append(Utilities.normabsjoinpath(self.project.ppath, module)) 63 modules.append(Utilities.normabsjoinpath(self.project.ppath, module))
69 QApplication.processEvents() 73 QApplication.processEvents()
70 prog += 1 74 prog += 1
71 if module.endswith("__init__.py"): 75 if module.endswith("__init__.py"):
72 continue 76 continue
73 try: 77 try:
74 mod = Utilities.ModuleParser.readModule(module) 78 mod = Utilities.ModuleParser.readModule(module, extensions=extensions)
75 except ImportError: 79 except ImportError:
76 continue 80 continue
77 else: 81 else:
78 name = mod.name 82 name = mod.name
79 moduleDict[name] = mod 83 moduleDict[name] = mod

eric ide

mercurial