Graphics/UMLClassDiagram.py

changeset 1845
d481279d882b
parent 1509
c0b5e693b0eb
child 2024
717b72b32420
child 2029
51e8278f2c3d
equal deleted inserted replaced
1844:0388a36b5fcf 1845:d481279d882b
10 import itertools 10 import itertools
11 11
12 from PyQt4.QtGui import QGraphicsTextItem 12 from PyQt4.QtGui import QGraphicsTextItem
13 13
14 import Utilities.ModuleParser 14 import Utilities.ModuleParser
15 import Preferences
15 16
16 from .UMLDialog import UMLDialog 17 from .UMLDialog import UMLDialog
17 from .ClassItem import ClassItem, ClassModel 18 from .ClassItem import ClassItem, ClassModel
18 from .AssociationItem import AssociationItem, Generalisation 19 from .AssociationItem import AssociationItem, Generalisation
19 from . import GraphicsUtilities 20 from . import GraphicsUtilities
61 Private method to build the class shapes of the class diagram. 62 Private method to build the class shapes of the class diagram.
62 63
63 The algorithm is borrowed from Boa Constructor. 64 The algorithm is borrowed from Boa Constructor.
64 """ 65 """
65 try: 66 try:
66 module = Utilities.ModuleParser.readModule(self.file) 67 extensions = Preferences.getPython("PythonExtensions") + \
68 Preferences.getPython("Python3Extensions") + ['.rb']
69 module = Utilities.ModuleParser.readModule(self.file, extensions=extensions)
67 except ImportError: 70 except ImportError:
68 ct = QGraphicsTextItem(None, self.scene) 71 ct = QGraphicsTextItem(None, self.scene)
69 ct.setHtml( 72 ct.setHtml(
70 self.trUtf8("The module <b>'{0}'</b> could not be found.") 73 self.trUtf8("The module <b>'{0}'</b> could not be found.")
71 .format(self.file)) 74 .format(self.file))

eric ide

mercurial