10 from itertools import zip_longest |
10 from itertools import zip_longest |
11 import os |
11 import os |
12 |
12 |
13 from PyQt6.QtWidgets import QGraphicsTextItem |
13 from PyQt6.QtWidgets import QGraphicsTextItem |
14 |
14 |
15 import Utilities |
15 from eric7 import Preferences, Utilities |
16 import Preferences |
|
17 |
16 |
18 from .UMLDiagramBuilder import UMLDiagramBuilder |
17 from .UMLDiagramBuilder import UMLDiagramBuilder |
19 |
18 |
20 |
19 |
21 class UMLClassDiagramBuilder(UMLDiagramBuilder): |
20 class UMLClassDiagramBuilder(UMLDiagramBuilder): |
79 """ |
78 """ |
80 Public method to build the class shapes of the class diagram. |
79 Public method to build the class shapes of the class diagram. |
81 |
80 |
82 The algorithm is borrowed from Boa Constructor. |
81 The algorithm is borrowed from Boa Constructor. |
83 """ |
82 """ |
84 import Utilities.ModuleParser |
83 from eric7.Utilities import ModuleParser |
85 |
84 |
86 self.allClasses = {} |
85 self.allClasses = {} |
87 self.allModules = {} |
86 self.allModules = {} |
88 |
87 |
89 try: |
88 try: |
90 extensions = Preferences.getPython("Python3Extensions") + [".rb"] |
89 extensions = Preferences.getPython("Python3Extensions") + [".rb"] |
91 module = Utilities.ModuleParser.readModule( |
90 module = ModuleParser.readModule( |
92 self.file, extensions=extensions, caching=False |
91 self.file, extensions=extensions, caching=False |
93 ) |
92 ) |
94 except ImportError: |
93 except ImportError: |
95 ct = QGraphicsTextItem(None) |
94 ct = QGraphicsTextItem(None) |
96 ct.setHtml( |
95 ct.setHtml( |