12 import time |
12 import time |
13 from itertools import zip_longest |
13 from itertools import zip_longest |
14 |
14 |
15 from PyQt6.QtWidgets import QApplication, QGraphicsTextItem |
15 from PyQt6.QtWidgets import QApplication, QGraphicsTextItem |
16 |
16 |
17 from EricWidgets.EricProgressDialog import EricProgressDialog |
17 from eric7.EricWidgets.EricProgressDialog import EricProgressDialog |
18 |
18 |
19 from .UMLDiagramBuilder import UMLDiagramBuilder |
19 from .UMLDiagramBuilder import UMLDiagramBuilder |
20 |
20 |
21 import Utilities |
21 from eric7 import Preferences, Utilities |
22 import Preferences |
|
23 |
22 |
24 |
23 |
25 class PackageDiagramBuilder(UMLDiagramBuilder): |
24 class PackageDiagramBuilder(UMLDiagramBuilder): |
26 """ |
25 """ |
27 Class implementing a builder for UML like class diagrams of a package. |
26 Class implementing a builder for UML like class diagrams of a package. |
117 progress.setValue(prog) |
116 progress.setValue(prog) |
118 if time.monotonic() - now > 0.01: |
117 if time.monotonic() - now > 0.01: |
119 QApplication.processEvents() |
118 QApplication.processEvents() |
120 now = time.monotonic() |
119 now = time.monotonic() |
121 try: |
120 try: |
122 mod = Utilities.ModuleParser.readModule( |
121 mod = ModuleParser.readModule( |
123 module, extensions=extensions, caching=False |
122 module, extensions=extensions, caching=False |
124 ) |
123 ) |
125 except ImportError: |
124 except ImportError: |
126 continue |
125 continue |
127 else: |
126 else: |
189 progress.setValue(prog) |
188 progress.setValue(prog) |
190 if time.monotonic() - now > 0.01: |
189 if time.monotonic() - now > 0.01: |
191 QApplication.processEvents() |
190 QApplication.processEvents() |
192 now = time.monotonic() |
191 now = time.monotonic() |
193 try: |
192 try: |
194 mod = Utilities.ModuleParser.readModule( |
193 mod = ModuleParser.readModule( |
195 module, extensions=extensions, caching=False |
194 module, extensions=extensions, caching=False |
196 ) |
195 ) |
197 except ImportError: |
196 except ImportError: |
198 continue |
197 continue |
199 else: |
198 else: |