Refactored the UML graphics code.

Sun, 09 Sep 2012 17:40:32 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 09 Sep 2012 17:40:32 +0200
changeset 2031
c36c2eb62a75
parent 2030
db11a2fe9bbc
child 2032
704593d042fe

Refactored the UML graphics code.

APIs/Python3/eric5.api file | annotate | diff | comparison | revisions
APIs/Python3/eric5.bas file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.ApplicationDiagram.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.ApplicationDiagramBuilder.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.AssociationItem.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.ClassItem.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.ImportsDiagram.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.ImportsDiagramBuilder.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.ModuleItem.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.PackageDiagram.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.PackageDiagramBuilder.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.PackageItem.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.UMLClassDiagram.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.UMLClassDiagramBuilder.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.UMLDiagramBuilder.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.UMLDialog.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.UMLGraphicsView.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Graphics.UMLItem.html file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Utilities.__init__.html file | annotate | diff | comparison | revisions
Documentation/Source/index-eric5.Graphics.html file | annotate | diff | comparison | revisions
Graphics/ApplicationDiagram.py file | annotate | diff | comparison | revisions
Graphics/ApplicationDiagramBuilder.py file | annotate | diff | comparison | revisions
Graphics/ImportsDiagram.py file | annotate | diff | comparison | revisions
Graphics/ImportsDiagramBuilder.py file | annotate | diff | comparison | revisions
Graphics/PackageDiagram.py file | annotate | diff | comparison | revisions
Graphics/PackageDiagramBuilder.py file | annotate | diff | comparison | revisions
Graphics/UMLClassDiagram.py file | annotate | diff | comparison | revisions
Graphics/UMLClassDiagramBuilder.py file | annotate | diff | comparison | revisions
Graphics/UMLDiagramBuilder.py file | annotate | diff | comparison | revisions
Graphics/UMLDialog.py file | annotate | diff | comparison | revisions
Graphics/UMLGraphicsView.py file | annotate | diff | comparison | revisions
Project/Project.py file | annotate | diff | comparison | revisions
Project/ProjectSourcesBrowser.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
eric5.e4p file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric5.api	Sun Sep 09 14:46:59 2012 +0200
+++ b/APIs/Python3/eric5.api	Sun Sep 09 17:40:32 2012 +0200
@@ -1615,8 +1615,10 @@
 eric5.Globals.settingsNameGlobal?7
 eric5.Globals.settingsNameOrganization?7
 eric5.Globals.settingsNameRecent?7
-eric5.Graphics.ApplicationDiagram.ApplicationDiagram.relayout?4()
-eric5.Graphics.ApplicationDiagram.ApplicationDiagram?1(project, parent=None, name=None, noModules=False)
+eric5.Graphics.ApplicationDiagramBuilder.ApplicationDiagramBuilder.buildDiagram?4()
+eric5.Graphics.ApplicationDiagramBuilder.ApplicationDiagramBuilder?1(dialog, view, project, noModules=False)
+eric5.Graphics.AssociationItem.AssociationItem.buildAssociationItemDataString?4()
+eric5.Graphics.AssociationItem.AssociationItem.parseAssociationItemDataString?4(data)
 eric5.Graphics.AssociationItem.AssociationItem.unassociate?4()
 eric5.Graphics.AssociationItem.AssociationItem.widgetMoved?4()
 eric5.Graphics.AssociationItem.AssociationItem?1(itemA, itemB, type=Normal, topToBottom=False, parent=None)
@@ -1633,8 +1635,10 @@
 eric5.Graphics.AssociationItem.SouthEast?7
 eric5.Graphics.AssociationItem.SouthWest?7
 eric5.Graphics.AssociationItem.West?7
+eric5.Graphics.ClassItem.ClassItem.buildItemDataString?4()
 eric5.Graphics.ClassItem.ClassItem.isExternal?4()
 eric5.Graphics.ClassItem.ClassItem.paint?4(painter, option, widget=None)
+eric5.Graphics.ClassItem.ClassItem.parseItemDataString?4(data)
 eric5.Graphics.ClassItem.ClassItem.setModel?4(model)
 eric5.Graphics.ClassItem.ClassItem?1(model=None, external=False, x=0, y=0, rounded=False, noAttrs=False, parent=None, scene=None)
 eric5.Graphics.ClassItem.ClassModel.addAttribute?4(attribute)
@@ -1645,18 +1649,22 @@
 eric5.Graphics.ClassItem.ClassModel?1(name, methods=[], attributes=[])
 eric5.Graphics.GraphicsUtilities._buildChildrenLists?5(routes)
 eric5.Graphics.GraphicsUtilities.sort?4(nodes, routes, noRecursion=False)
-eric5.Graphics.ImportsDiagram.ImportsDiagram.relayout?4()
-eric5.Graphics.ImportsDiagram.ImportsDiagram?1(project, package, parent=None, name=None, showExternalImports=False)
+eric5.Graphics.ImportsDiagramBuilder.ImportsDiagramBuilder.buildDiagram?4()
+eric5.Graphics.ImportsDiagramBuilder.ImportsDiagramBuilder?1(dialog, view, project, package, showExternalImports=False)
+eric5.Graphics.ModuleItem.ModuleItem.buildItemDataString?4()
 eric5.Graphics.ModuleItem.ModuleItem.paint?4(painter, option, widget=None)
+eric5.Graphics.ModuleItem.ModuleItem.parseItemDataString?4(data)
 eric5.Graphics.ModuleItem.ModuleItem.setModel?4(model)
 eric5.Graphics.ModuleItem.ModuleItem?1(model=None, x=0, y=0, rounded=False, parent=None, scene=None)
 eric5.Graphics.ModuleItem.ModuleModel.addClass?4(classname)
 eric5.Graphics.ModuleItem.ModuleModel.getClasses?4()
 eric5.Graphics.ModuleItem.ModuleModel.getName?4()
 eric5.Graphics.ModuleItem.ModuleModel?1(name, classlist=[])
-eric5.Graphics.PackageDiagram.PackageDiagram.relayout?4()
-eric5.Graphics.PackageDiagram.PackageDiagram?1(project, package, parent=None, name=None, noAttrs=False)
+eric5.Graphics.PackageDiagramBuilder.PackageDiagramBuilder.buildDiagram?4()
+eric5.Graphics.PackageDiagramBuilder.PackageDiagramBuilder?1(dialog, view, project, package, noAttrs=False)
+eric5.Graphics.PackageItem.PackageItem.buildItemDataString?4()
 eric5.Graphics.PackageItem.PackageItem.paint?4(painter, option, widget=None)
+eric5.Graphics.PackageItem.PackageItem.parseItemDataString?4(data)
 eric5.Graphics.PackageItem.PackageItem.setModel?4(model)
 eric5.Graphics.PackageItem.PackageItem?1(model=None, x=0, y=0, rounded=False, noModules=False, parent=None, scene=None)
 eric5.Graphics.PackageItem.PackageModel.addModule?4(modulename)
@@ -1674,29 +1682,44 @@
 eric5.Graphics.SvgDiagram.SvgDiagram.getDiagramName?4()
 eric5.Graphics.SvgDiagram.SvgDiagram.wheelEvent?4(evt)
 eric5.Graphics.SvgDiagram.SvgDiagram?1(svgFile, parent=None, name=None)
-eric5.Graphics.UMLClassDiagram.UMLClassDiagram.relayout?4()
-eric5.Graphics.UMLClassDiagram.UMLClassDiagram?1(project, file, parent=None, name=None, noAttrs=False)
-eric5.Graphics.UMLDialog.UMLDialog.setDiagramName?4(name)
+eric5.Graphics.UMLClassDiagramBuilder.UMLClassDiagramBuilder.buildDiagram?4()
+eric5.Graphics.UMLClassDiagramBuilder.UMLClassDiagramBuilder?1(dialog, view, project, file, noAttrs=False)
+eric5.Graphics.UMLDiagramBuilder.UMLDiagramBuilder.buildDiagram?4()
+eric5.Graphics.UMLDiagramBuilder.UMLDiagramBuilder.parsePersistenceData?4(data)
+eric5.Graphics.UMLDiagramBuilder.UMLDiagramBuilder?1(dialog, view, project)
+eric5.Graphics.UMLDialog.UMLDialog.ApplicationDiagram?7
+eric5.Graphics.UMLDialog.UMLDialog.ClassDiagram?7
+eric5.Graphics.UMLDialog.UMLDialog.ImportsDiagram?7
+eric5.Graphics.UMLDialog.UMLDialog.PackageDiagram?7
+eric5.Graphics.UMLDialog.UMLDialog.diagramTypeToString?4(diagramType)
 eric5.Graphics.UMLDialog.UMLDialog.show?4()
-eric5.Graphics.UMLDialog.UMLDialog?1(buildFunction=None, diagramName="Unnamed", parent=None, name=None)
+eric5.Graphics.UMLDialog.UMLDialog?1(diagramType, project, path, parent=None, **kwargs)
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.autoAdjustSceneSize?4(limit=False)
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.event?4(evt)
-eric5.Graphics.UMLGraphicsView.UMLGraphicsView.filteredItems?4(items)
+eric5.Graphics.UMLGraphicsView.UMLGraphicsView.filteredItems?4(items, itemType=UMLItem)
+eric5.Graphics.UMLGraphicsView.UMLGraphicsView.findItem?4(id)
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.gestureEvent?4(evt)
+eric5.Graphics.UMLGraphicsView.UMLGraphicsView.getItemId?4()
+eric5.Graphics.UMLGraphicsView.UMLGraphicsView.getPersistenceData?4()
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.initToolBar?4()
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.relayout?7
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.selectItem?4(item)
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.selectItems?4(items)
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.setDiagramName?4(name)
+eric5.Graphics.UMLGraphicsView.UMLGraphicsView.setPersistenceData?4(data)
 eric5.Graphics.UMLGraphicsView.UMLGraphicsView.wheelEvent?4(evt)
-eric5.Graphics.UMLGraphicsView.UMLGraphicsView?1(scene, diagramName="Unnamed", parent=None, name=None)
+eric5.Graphics.UMLGraphicsView.UMLGraphicsView?1(scene, diagramType, parent=None)
 eric5.Graphics.UMLItem.UMLItem.addAssociation?4(assoc)
 eric5.Graphics.UMLItem.UMLItem.adjustAssociations?4()
+eric5.Graphics.UMLItem.UMLItem.buildItemDataString?4()
+eric5.Graphics.UMLItem.UMLItem.getId?4()
 eric5.Graphics.UMLItem.UMLItem.itemChange?4(change, value)
 eric5.Graphics.UMLItem.UMLItem.moveBy?4(dx, dy)
 eric5.Graphics.UMLItem.UMLItem.paint?4(painter, option, widget=None)
+eric5.Graphics.UMLItem.UMLItem.parseItemDataString?4(data)
 eric5.Graphics.UMLItem.UMLItem.removeAssociation?4(assoc)
 eric5.Graphics.UMLItem.UMLItem.removeAssociations?4()
+eric5.Graphics.UMLItem.UMLItem.setId?4(id)
 eric5.Graphics.UMLItem.UMLItem.setPos?4(x, y)
 eric5.Graphics.UMLItem.UMLItem.setSize?4(width, height)
 eric5.Graphics.UMLItem.UMLItem?1(x=0, y=0, rounded=False, parent=None)
@@ -7685,6 +7708,7 @@
 eric5.Utilities.setConfigDir?4(d)
 eric5.Utilities.splitPath?4(name)
 eric5.Utilities.supportedCodecs?7
+eric5.Utilities.toBool?4(dataStr)
 eric5.Utilities.toNativeSeparators?4(path)
 eric5.Utilities.uic.compileUiDir?4(dir, recurse = False, map = None, ** compileUi_args)
 eric5.Utilities.uic.compileUiFiles?4(dir, recurse=False)
--- a/APIs/Python3/eric5.bas	Sun Sep 09 14:46:59 2012 +0200
+++ b/APIs/Python3/eric5.bas	Sun Sep 09 17:40:32 2012 +0200
@@ -20,7 +20,7 @@
 AddFoundFilesDialog QDialog Ui_AddFoundFilesDialog
 AddLanguageDialog QDialog Ui_AddLanguageDialog
 AddProjectDialog QDialog Ui_AddProjectDialog
-ApplicationDiagram UMLDialog
+ApplicationDiagramBuilder UMLDiagramBuilder
 ApplicationPage ConfigurationPageBase Ui_ApplicationPage
 Argument Binding
 ArgumentsError RuntimeError
@@ -338,7 +338,7 @@
 ImportShadowedByLoopVar Message
 ImportStarUsed Message
 Importation Binding
-ImportsDiagram UMLDialog
+ImportsDiagramBuilder UMLDiagramBuilder
 InputDialogWizard QObject
 InputDialogWizardDialog QDialog Ui_InputDialogWizardDialog
 InsertBookmarksCommand RemoveBookmarksCommand
@@ -422,7 +422,7 @@
 OpenSearchReader QXmlStreamReader
 OpenSearchWriter QXmlStreamWriter
 OperaImporter BookmarksImporter
-PackageDiagram UMLDialog
+PackageDiagramBuilder UMLDiagramBuilder
 PackageItem UMLItem
 PageScreenDialog QDialog Ui_PageScreenDialog
 PageThumbnailer QObject
@@ -652,7 +652,8 @@
 TrayStarter QSystemTrayIcon
 TrayStarterPage ConfigurationPageBase Ui_TrayStarterPage
 UIPreviewer QMainWindow
-UMLClassDiagram UMLDialog
+UMLClassDiagramBuilder UMLDiagramBuilder
+UMLDiagramBuilder QObject
 UMLDialog QMainWindow
 UMLGraphicsView E5GraphicsView
 UMLItem QGraphicsRectItem
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Help/source.qhp	Sun Sep 09 17:40:32 2012 +0200
@@ -172,17 +172,18 @@
             <section title="eric5.Globals.__init__" ref="eric5.Globals.__init__.html" />
           </section>
           <section title="eric5.Graphics" ref="index-eric5.Graphics.html">
-            <section title="eric5.Graphics.ApplicationDiagram" ref="eric5.Graphics.ApplicationDiagram.html" />
+            <section title="eric5.Graphics.ApplicationDiagramBuilder" ref="eric5.Graphics.ApplicationDiagramBuilder.html" />
             <section title="eric5.Graphics.AssociationItem" ref="eric5.Graphics.AssociationItem.html" />
             <section title="eric5.Graphics.ClassItem" ref="eric5.Graphics.ClassItem.html" />
             <section title="eric5.Graphics.GraphicsUtilities" ref="eric5.Graphics.GraphicsUtilities.html" />
-            <section title="eric5.Graphics.ImportsDiagram" ref="eric5.Graphics.ImportsDiagram.html" />
+            <section title="eric5.Graphics.ImportsDiagramBuilder" ref="eric5.Graphics.ImportsDiagramBuilder.html" />
             <section title="eric5.Graphics.ModuleItem" ref="eric5.Graphics.ModuleItem.html" />
-            <section title="eric5.Graphics.PackageDiagram" ref="eric5.Graphics.PackageDiagram.html" />
+            <section title="eric5.Graphics.PackageDiagramBuilder" ref="eric5.Graphics.PackageDiagramBuilder.html" />
             <section title="eric5.Graphics.PackageItem" ref="eric5.Graphics.PackageItem.html" />
             <section title="eric5.Graphics.PixmapDiagram" ref="eric5.Graphics.PixmapDiagram.html" />
             <section title="eric5.Graphics.SvgDiagram" ref="eric5.Graphics.SvgDiagram.html" />
-            <section title="eric5.Graphics.UMLClassDiagram" ref="eric5.Graphics.UMLClassDiagram.html" />
+            <section title="eric5.Graphics.UMLClassDiagramBuilder" ref="eric5.Graphics.UMLClassDiagramBuilder.html" />
+            <section title="eric5.Graphics.UMLDiagramBuilder" ref="eric5.Graphics.UMLDiagramBuilder.html" />
             <section title="eric5.Graphics.UMLDialog" ref="eric5.Graphics.UMLDialog.html" />
             <section title="eric5.Graphics.UMLGraphicsView" ref="eric5.Graphics.UMLGraphicsView.html" />
             <section title="eric5.Graphics.UMLItem" ref="eric5.Graphics.UMLItem.html" />
@@ -1272,14 +1273,13 @@
       <keyword name="AddProjectDialog.on_fileButton_clicked" id="AddProjectDialog.on_fileButton_clicked" ref="eric5.MultiProject.AddProjectDialog.html#AddProjectDialog.on_fileButton_clicked" />
       <keyword name="AddProjectDialog.on_filenameEdit_textChanged" id="AddProjectDialog.on_filenameEdit_textChanged" ref="eric5.MultiProject.AddProjectDialog.html#AddProjectDialog.on_filenameEdit_textChanged" />
       <keyword name="AddProjectDialog.on_nameEdit_textChanged" id="AddProjectDialog.on_nameEdit_textChanged" ref="eric5.MultiProject.AddProjectDialog.html#AddProjectDialog.on_nameEdit_textChanged" />
-      <keyword name="ApplicationDiagram" id="ApplicationDiagram" ref="eric5.Graphics.ApplicationDiagram.html#ApplicationDiagram" />
-      <keyword name="ApplicationDiagram (Constructor)" id="ApplicationDiagram (Constructor)" ref="eric5.Graphics.ApplicationDiagram.html#ApplicationDiagram.__init__" />
-      <keyword name="ApplicationDiagram (Module)" id="ApplicationDiagram (Module)" ref="eric5.Graphics.ApplicationDiagram.html" />
-      <keyword name="ApplicationDiagram.__addPackage" id="ApplicationDiagram.__addPackage" ref="eric5.Graphics.ApplicationDiagram.html#ApplicationDiagram.__addPackage" />
-      <keyword name="ApplicationDiagram.__buildModulesDict" id="ApplicationDiagram.__buildModulesDict" ref="eric5.Graphics.ApplicationDiagram.html#ApplicationDiagram.__buildModulesDict" />
-      <keyword name="ApplicationDiagram.__buildPackages" id="ApplicationDiagram.__buildPackages" ref="eric5.Graphics.ApplicationDiagram.html#ApplicationDiagram.__buildPackages" />
-      <keyword name="ApplicationDiagram.__createAssociations" id="ApplicationDiagram.__createAssociations" ref="eric5.Graphics.ApplicationDiagram.html#ApplicationDiagram.__createAssociations" />
-      <keyword name="ApplicationDiagram.relayout" id="ApplicationDiagram.relayout" ref="eric5.Graphics.ApplicationDiagram.html#ApplicationDiagram.relayout" />
+      <keyword name="ApplicationDiagramBuilder" id="ApplicationDiagramBuilder" ref="eric5.Graphics.ApplicationDiagramBuilder.html#ApplicationDiagramBuilder" />
+      <keyword name="ApplicationDiagramBuilder (Constructor)" id="ApplicationDiagramBuilder (Constructor)" ref="eric5.Graphics.ApplicationDiagramBuilder.html#ApplicationDiagramBuilder.__init__" />
+      <keyword name="ApplicationDiagramBuilder (Module)" id="ApplicationDiagramBuilder (Module)" ref="eric5.Graphics.ApplicationDiagramBuilder.html" />
+      <keyword name="ApplicationDiagramBuilder.__addPackage" id="ApplicationDiagramBuilder.__addPackage" ref="eric5.Graphics.ApplicationDiagramBuilder.html#ApplicationDiagramBuilder.__addPackage" />
+      <keyword name="ApplicationDiagramBuilder.__buildModulesDict" id="ApplicationDiagramBuilder.__buildModulesDict" ref="eric5.Graphics.ApplicationDiagramBuilder.html#ApplicationDiagramBuilder.__buildModulesDict" />
+      <keyword name="ApplicationDiagramBuilder.__createAssociations" id="ApplicationDiagramBuilder.__createAssociations" ref="eric5.Graphics.ApplicationDiagramBuilder.html#ApplicationDiagramBuilder.__createAssociations" />
+      <keyword name="ApplicationDiagramBuilder.buildDiagram" id="ApplicationDiagramBuilder.buildDiagram" ref="eric5.Graphics.ApplicationDiagramBuilder.html#ApplicationDiagramBuilder.buildDiagram" />
       <keyword name="ApplicationPage" id="ApplicationPage" ref="eric5.Preferences.ConfigurationPages.ApplicationPage.html#ApplicationPage" />
       <keyword name="ApplicationPage (Constructor)" id="ApplicationPage (Constructor)" ref="eric5.Preferences.ConfigurationPages.ApplicationPage.html#ApplicationPage.__init__" />
       <keyword name="ApplicationPage (Module)" id="ApplicationPage (Module)" ref="eric5.Preferences.ConfigurationPages.ApplicationPage.html" />
@@ -1306,6 +1306,8 @@
       <keyword name="AssociationItem.__findRectIntersectionPoint" id="AssociationItem.__findRectIntersectionPoint" ref="eric5.Graphics.AssociationItem.html#AssociationItem.__findRectIntersectionPoint" />
       <keyword name="AssociationItem.__mapRectFromItem" id="AssociationItem.__mapRectFromItem" ref="eric5.Graphics.AssociationItem.html#AssociationItem.__mapRectFromItem" />
       <keyword name="AssociationItem.__updateEndPoint" id="AssociationItem.__updateEndPoint" ref="eric5.Graphics.AssociationItem.html#AssociationItem.__updateEndPoint" />
+      <keyword name="AssociationItem.buildAssociationItemDataString" id="AssociationItem.buildAssociationItemDataString" ref="eric5.Graphics.AssociationItem.html#AssociationItem.buildAssociationItemDataString" />
+      <keyword name="AssociationItem.parseAssociationItemDataString" id="AssociationItem.parseAssociationItemDataString" ref="eric5.Graphics.AssociationItem.html#AssociationItem.parseAssociationItemDataString" />
       <keyword name="AssociationItem.unassociate" id="AssociationItem.unassociate" ref="eric5.Graphics.AssociationItem.html#AssociationItem.unassociate" />
       <keyword name="AssociationItem.widgetMoved" id="AssociationItem.widgetMoved" ref="eric5.Graphics.AssociationItem.html#AssociationItem.widgetMoved" />
       <keyword name="AsyncFile" id="AsyncFile" ref="eric5.DebugClients.Python.AsyncFile.html#AsyncFile" />
@@ -1982,8 +1984,10 @@
       <keyword name="ClassItem (Module)" id="ClassItem (Module)" ref="eric5.Graphics.ClassItem.html" />
       <keyword name="ClassItem.__calculateSize" id="ClassItem.__calculateSize" ref="eric5.Graphics.ClassItem.html#ClassItem.__calculateSize" />
       <keyword name="ClassItem.__createTexts" id="ClassItem.__createTexts" ref="eric5.Graphics.ClassItem.html#ClassItem.__createTexts" />
+      <keyword name="ClassItem.buildItemDataString" id="ClassItem.buildItemDataString" ref="eric5.Graphics.ClassItem.html#ClassItem.buildItemDataString" />
       <keyword name="ClassItem.isExternal" id="ClassItem.isExternal" ref="eric5.Graphics.ClassItem.html#ClassItem.isExternal" />
       <keyword name="ClassItem.paint" id="ClassItem.paint" ref="eric5.Graphics.ClassItem.html#ClassItem.paint" />
+      <keyword name="ClassItem.parseItemDataString" id="ClassItem.parseItemDataString" ref="eric5.Graphics.ClassItem.html#ClassItem.parseItemDataString" />
       <keyword name="ClassItem.setModel" id="ClassItem.setModel" ref="eric5.Graphics.ClassItem.html#ClassItem.setModel" />
       <keyword name="ClassModel" id="ClassModel" ref="eric5.Graphics.ClassItem.html#ClassModel" />
       <keyword name="ClassModel (Constructor)" id="ClassModel (Constructor)" ref="eric5.Graphics.ClassItem.html#ClassModel.__init__" />
@@ -6223,14 +6227,13 @@
       <keyword name="Importation" id="Importation" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Importation" />
       <keyword name="Importation (Constructor)" id="Importation (Constructor)" ref="eric5.Utilities.py3flakes.checker.html#Importation.__init__" />
       <keyword name="Importation (Constructor)" id="Importation (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Importation.__init__" />
-      <keyword name="ImportsDiagram" id="ImportsDiagram" ref="eric5.Graphics.ImportsDiagram.html#ImportsDiagram" />
-      <keyword name="ImportsDiagram (Constructor)" id="ImportsDiagram (Constructor)" ref="eric5.Graphics.ImportsDiagram.html#ImportsDiagram.__init__" />
-      <keyword name="ImportsDiagram (Module)" id="ImportsDiagram (Module)" ref="eric5.Graphics.ImportsDiagram.html" />
-      <keyword name="ImportsDiagram.__addModule" id="ImportsDiagram.__addModule" ref="eric5.Graphics.ImportsDiagram.html#ImportsDiagram.__addModule" />
-      <keyword name="ImportsDiagram.__buildImports" id="ImportsDiagram.__buildImports" ref="eric5.Graphics.ImportsDiagram.html#ImportsDiagram.__buildImports" />
-      <keyword name="ImportsDiagram.__buildModulesDict" id="ImportsDiagram.__buildModulesDict" ref="eric5.Graphics.ImportsDiagram.html#ImportsDiagram.__buildModulesDict" />
-      <keyword name="ImportsDiagram.__createAssociations" id="ImportsDiagram.__createAssociations" ref="eric5.Graphics.ImportsDiagram.html#ImportsDiagram.__createAssociations" />
-      <keyword name="ImportsDiagram.relayout" id="ImportsDiagram.relayout" ref="eric5.Graphics.ImportsDiagram.html#ImportsDiagram.relayout" />
+      <keyword name="ImportsDiagramBuilder" id="ImportsDiagramBuilder" ref="eric5.Graphics.ImportsDiagramBuilder.html#ImportsDiagramBuilder" />
+      <keyword name="ImportsDiagramBuilder (Constructor)" id="ImportsDiagramBuilder (Constructor)" ref="eric5.Graphics.ImportsDiagramBuilder.html#ImportsDiagramBuilder.__init__" />
+      <keyword name="ImportsDiagramBuilder (Module)" id="ImportsDiagramBuilder (Module)" ref="eric5.Graphics.ImportsDiagramBuilder.html" />
+      <keyword name="ImportsDiagramBuilder.__addModule" id="ImportsDiagramBuilder.__addModule" ref="eric5.Graphics.ImportsDiagramBuilder.html#ImportsDiagramBuilder.__addModule" />
+      <keyword name="ImportsDiagramBuilder.__buildModulesDict" id="ImportsDiagramBuilder.__buildModulesDict" ref="eric5.Graphics.ImportsDiagramBuilder.html#ImportsDiagramBuilder.__buildModulesDict" />
+      <keyword name="ImportsDiagramBuilder.__createAssociations" id="ImportsDiagramBuilder.__createAssociations" ref="eric5.Graphics.ImportsDiagramBuilder.html#ImportsDiagramBuilder.__createAssociations" />
+      <keyword name="ImportsDiagramBuilder.buildDiagram" id="ImportsDiagramBuilder.buildDiagram" ref="eric5.Graphics.ImportsDiagramBuilder.html#ImportsDiagramBuilder.buildDiagram" />
       <keyword name="IndexGenerator" id="IndexGenerator" ref="eric5.DocumentationTools.IndexGenerator.html#IndexGenerator" />
       <keyword name="IndexGenerator (Constructor)" id="IndexGenerator (Constructor)" ref="eric5.DocumentationTools.IndexGenerator.html#IndexGenerator.__init__" />
       <keyword name="IndexGenerator (Module)" id="IndexGenerator (Module)" ref="eric5.DocumentationTools.IndexGenerator.html" />
@@ -6801,7 +6804,9 @@
       <keyword name="ModuleItem (Module)" id="ModuleItem (Module)" ref="eric5.Graphics.ModuleItem.html" />
       <keyword name="ModuleItem.__calculateSize" id="ModuleItem.__calculateSize" ref="eric5.Graphics.ModuleItem.html#ModuleItem.__calculateSize" />
       <keyword name="ModuleItem.__createTexts" id="ModuleItem.__createTexts" ref="eric5.Graphics.ModuleItem.html#ModuleItem.__createTexts" />
+      <keyword name="ModuleItem.buildItemDataString" id="ModuleItem.buildItemDataString" ref="eric5.Graphics.ModuleItem.html#ModuleItem.buildItemDataString" />
       <keyword name="ModuleItem.paint" id="ModuleItem.paint" ref="eric5.Graphics.ModuleItem.html#ModuleItem.paint" />
+      <keyword name="ModuleItem.parseItemDataString" id="ModuleItem.parseItemDataString" ref="eric5.Graphics.ModuleItem.html#ModuleItem.parseItemDataString" />
       <keyword name="ModuleItem.setModel" id="ModuleItem.setModel" ref="eric5.Graphics.ModuleItem.html#ModuleItem.setModel" />
       <keyword name="ModuleModel" id="ModuleModel" ref="eric5.Graphics.ModuleItem.html#ModuleModel" />
       <keyword name="ModuleModel (Constructor)" id="ModuleModel (Constructor)" ref="eric5.Graphics.ModuleItem.html#ModuleModel.__init__" />
@@ -7134,23 +7139,24 @@
       <keyword name="PDFRender.startPage" id="PDFRender.startPage" ref="eric5.QScintilla.Exporters.ExporterPDF.html#PDFRender.startPage" />
       <keyword name="PDFStyle" id="PDFStyle" ref="eric5.QScintilla.Exporters.ExporterPDF.html#PDFStyle" />
       <keyword name="PDFStyle (Constructor)" id="PDFStyle (Constructor)" ref="eric5.QScintilla.Exporters.ExporterPDF.html#PDFStyle.__init__" />
-      <keyword name="PackageDiagram" id="PackageDiagram" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram" />
-      <keyword name="PackageDiagram (Constructor)" id="PackageDiagram (Constructor)" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.__init__" />
-      <keyword name="PackageDiagram (Module)" id="PackageDiagram (Module)" ref="eric5.Graphics.PackageDiagram.html" />
-      <keyword name="PackageDiagram.__addExternalClass" id="PackageDiagram.__addExternalClass" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.__addExternalClass" />
-      <keyword name="PackageDiagram.__addLocalClass" id="PackageDiagram.__addLocalClass" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.__addLocalClass" />
-      <keyword name="PackageDiagram.__arrangeClasses" id="PackageDiagram.__arrangeClasses" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.__arrangeClasses" />
-      <keyword name="PackageDiagram.__buildClasses" id="PackageDiagram.__buildClasses" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.__buildClasses" />
-      <keyword name="PackageDiagram.__buildModulesDict" id="PackageDiagram.__buildModulesDict" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.__buildModulesDict" />
-      <keyword name="PackageDiagram.__createAssociations" id="PackageDiagram.__createAssociations" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.__createAssociations" />
-      <keyword name="PackageDiagram.__getCurrentShape" id="PackageDiagram.__getCurrentShape" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.__getCurrentShape" />
-      <keyword name="PackageDiagram.relayout" id="PackageDiagram.relayout" ref="eric5.Graphics.PackageDiagram.html#PackageDiagram.relayout" />
+      <keyword name="PackageDiagramBuilder" id="PackageDiagramBuilder" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder" />
+      <keyword name="PackageDiagramBuilder (Constructor)" id="PackageDiagramBuilder (Constructor)" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder.__init__" />
+      <keyword name="PackageDiagramBuilder (Module)" id="PackageDiagramBuilder (Module)" ref="eric5.Graphics.PackageDiagramBuilder.html" />
+      <keyword name="PackageDiagramBuilder.__addExternalClass" id="PackageDiagramBuilder.__addExternalClass" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder.__addExternalClass" />
+      <keyword name="PackageDiagramBuilder.__addLocalClass" id="PackageDiagramBuilder.__addLocalClass" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder.__addLocalClass" />
+      <keyword name="PackageDiagramBuilder.__arrangeClasses" id="PackageDiagramBuilder.__arrangeClasses" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder.__arrangeClasses" />
+      <keyword name="PackageDiagramBuilder.__buildModulesDict" id="PackageDiagramBuilder.__buildModulesDict" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder.__buildModulesDict" />
+      <keyword name="PackageDiagramBuilder.__createAssociations" id="PackageDiagramBuilder.__createAssociations" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder.__createAssociations" />
+      <keyword name="PackageDiagramBuilder.__getCurrentShape" id="PackageDiagramBuilder.__getCurrentShape" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder.__getCurrentShape" />
+      <keyword name="PackageDiagramBuilder.buildDiagram" id="PackageDiagramBuilder.buildDiagram" ref="eric5.Graphics.PackageDiagramBuilder.html#PackageDiagramBuilder.buildDiagram" />
       <keyword name="PackageItem" id="PackageItem" ref="eric5.Graphics.PackageItem.html#PackageItem" />
       <keyword name="PackageItem (Constructor)" id="PackageItem (Constructor)" ref="eric5.Graphics.PackageItem.html#PackageItem.__init__" />
       <keyword name="PackageItem (Module)" id="PackageItem (Module)" ref="eric5.Graphics.PackageItem.html" />
       <keyword name="PackageItem.__calculateSize" id="PackageItem.__calculateSize" ref="eric5.Graphics.PackageItem.html#PackageItem.__calculateSize" />
       <keyword name="PackageItem.__createTexts" id="PackageItem.__createTexts" ref="eric5.Graphics.PackageItem.html#PackageItem.__createTexts" />
+      <keyword name="PackageItem.buildItemDataString" id="PackageItem.buildItemDataString" ref="eric5.Graphics.PackageItem.html#PackageItem.buildItemDataString" />
       <keyword name="PackageItem.paint" id="PackageItem.paint" ref="eric5.Graphics.PackageItem.html#PackageItem.paint" />
+      <keyword name="PackageItem.parseItemDataString" id="PackageItem.parseItemDataString" ref="eric5.Graphics.PackageItem.html#PackageItem.parseItemDataString" />
       <keyword name="PackageItem.setModel" id="PackageItem.setModel" ref="eric5.Graphics.PackageItem.html#PackageItem.setModel" />
       <keyword name="PackageModel" id="PackageModel" ref="eric5.Graphics.PackageItem.html#PackageModel" />
       <keyword name="PackageModel (Constructor)" id="PackageModel (Constructor)" ref="eric5.Graphics.PackageItem.html#PackageModel.__init__" />
@@ -10606,20 +10612,26 @@
       <keyword name="UIPreviewer.__whatsThis" id="UIPreviewer.__whatsThis" ref="eric5.Tools.UIPreviewer.html#UIPreviewer.__whatsThis" />
       <keyword name="UIPreviewer.eventFilter" id="UIPreviewer.eventFilter" ref="eric5.Tools.UIPreviewer.html#UIPreviewer.eventFilter" />
       <keyword name="UIPreviewer.show" id="UIPreviewer.show" ref="eric5.Tools.UIPreviewer.html#UIPreviewer.show" />
-      <keyword name="UMLClassDiagram" id="UMLClassDiagram" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram" />
-      <keyword name="UMLClassDiagram (Constructor)" id="UMLClassDiagram (Constructor)" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram.__init__" />
-      <keyword name="UMLClassDiagram (Module)" id="UMLClassDiagram (Module)" ref="eric5.Graphics.UMLClassDiagram.html" />
-      <keyword name="UMLClassDiagram.__addExternalClass" id="UMLClassDiagram.__addExternalClass" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram.__addExternalClass" />
-      <keyword name="UMLClassDiagram.__addLocalClass" id="UMLClassDiagram.__addLocalClass" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram.__addLocalClass" />
-      <keyword name="UMLClassDiagram.__arrangeClasses" id="UMLClassDiagram.__arrangeClasses" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram.__arrangeClasses" />
-      <keyword name="UMLClassDiagram.__buildClasses" id="UMLClassDiagram.__buildClasses" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram.__buildClasses" />
-      <keyword name="UMLClassDiagram.__createAssociations" id="UMLClassDiagram.__createAssociations" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram.__createAssociations" />
-      <keyword name="UMLClassDiagram.__getCurrentShape" id="UMLClassDiagram.__getCurrentShape" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram.__getCurrentShape" />
-      <keyword name="UMLClassDiagram.relayout" id="UMLClassDiagram.relayout" ref="eric5.Graphics.UMLClassDiagram.html#UMLClassDiagram.relayout" />
+      <keyword name="UMLClassDiagramBuilder" id="UMLClassDiagramBuilder" ref="eric5.Graphics.UMLClassDiagramBuilder.html#UMLClassDiagramBuilder" />
+      <keyword name="UMLClassDiagramBuilder (Constructor)" id="UMLClassDiagramBuilder (Constructor)" ref="eric5.Graphics.UMLClassDiagramBuilder.html#UMLClassDiagramBuilder.__init__" />
+      <keyword name="UMLClassDiagramBuilder (Module)" id="UMLClassDiagramBuilder (Module)" ref="eric5.Graphics.UMLClassDiagramBuilder.html" />
+      <keyword name="UMLClassDiagramBuilder.__addExternalClass" id="UMLClassDiagramBuilder.__addExternalClass" ref="eric5.Graphics.UMLClassDiagramBuilder.html#UMLClassDiagramBuilder.__addExternalClass" />
+      <keyword name="UMLClassDiagramBuilder.__addLocalClass" id="UMLClassDiagramBuilder.__addLocalClass" ref="eric5.Graphics.UMLClassDiagramBuilder.html#UMLClassDiagramBuilder.__addLocalClass" />
+      <keyword name="UMLClassDiagramBuilder.__arrangeClasses" id="UMLClassDiagramBuilder.__arrangeClasses" ref="eric5.Graphics.UMLClassDiagramBuilder.html#UMLClassDiagramBuilder.__arrangeClasses" />
+      <keyword name="UMLClassDiagramBuilder.__createAssociations" id="UMLClassDiagramBuilder.__createAssociations" ref="eric5.Graphics.UMLClassDiagramBuilder.html#UMLClassDiagramBuilder.__createAssociations" />
+      <keyword name="UMLClassDiagramBuilder.__getCurrentShape" id="UMLClassDiagramBuilder.__getCurrentShape" ref="eric5.Graphics.UMLClassDiagramBuilder.html#UMLClassDiagramBuilder.__getCurrentShape" />
+      <keyword name="UMLClassDiagramBuilder.buildDiagram" id="UMLClassDiagramBuilder.buildDiagram" ref="eric5.Graphics.UMLClassDiagramBuilder.html#UMLClassDiagramBuilder.buildDiagram" />
+      <keyword name="UMLDiagramBuilder" id="UMLDiagramBuilder" ref="eric5.Graphics.UMLDiagramBuilder.html#UMLDiagramBuilder" />
+      <keyword name="UMLDiagramBuilder (Constructor)" id="UMLDiagramBuilder (Constructor)" ref="eric5.Graphics.UMLDiagramBuilder.html#UMLDiagramBuilder.__init__" />
+      <keyword name="UMLDiagramBuilder (Module)" id="UMLDiagramBuilder (Module)" ref="eric5.Graphics.UMLDiagramBuilder.html" />
+      <keyword name="UMLDiagramBuilder.buildDiagram" id="UMLDiagramBuilder.buildDiagram" ref="eric5.Graphics.UMLDiagramBuilder.html#UMLDiagramBuilder.buildDiagram" />
+      <keyword name="UMLDiagramBuilder.parsePersistenceData" id="UMLDiagramBuilder.parsePersistenceData" ref="eric5.Graphics.UMLDiagramBuilder.html#UMLDiagramBuilder.parsePersistenceData" />
       <keyword name="UMLDialog" id="UMLDialog" ref="eric5.Graphics.UMLDialog.html#UMLDialog" />
       <keyword name="UMLDialog (Constructor)" id="UMLDialog (Constructor)" ref="eric5.Graphics.UMLDialog.html#UMLDialog.__init__" />
       <keyword name="UMLDialog (Module)" id="UMLDialog (Module)" ref="eric5.Graphics.UMLDialog.html" />
-      <keyword name="UMLDialog.setDiagramName" id="UMLDialog.setDiagramName" ref="eric5.Graphics.UMLDialog.html#UMLDialog.setDiagramName" />
+      <keyword name="UMLDialog.__diagramBuilder" id="UMLDialog.__diagramBuilder" ref="eric5.Graphics.UMLDialog.html#UMLDialog.__diagramBuilder" />
+      <keyword name="UMLDialog.__relayout" id="UMLDialog.__relayout" ref="eric5.Graphics.UMLDialog.html#UMLDialog.__relayout" />
+      <keyword name="UMLDialog.diagramTypeToString" id="UMLDialog.diagramTypeToString" ref="eric5.Graphics.UMLDialog.html#UMLDialog.diagramTypeToString" />
       <keyword name="UMLDialog.show" id="UMLDialog.show" ref="eric5.Graphics.UMLDialog.html#UMLDialog.show" />
       <keyword name="UMLGraphicsView" id="UMLGraphicsView" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView" />
       <keyword name="UMLGraphicsView (Constructor)" id="UMLGraphicsView (Constructor)" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__init__" />
@@ -10635,6 +10647,8 @@
       <keyword name="UMLGraphicsView.__printDiagram" id="UMLGraphicsView.__printDiagram" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__printDiagram" />
       <keyword name="UMLGraphicsView.__printPreviewDiagram" id="UMLGraphicsView.__printPreviewDiagram" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__printPreviewDiagram" />
       <keyword name="UMLGraphicsView.__relayout" id="UMLGraphicsView.__relayout" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__relayout" />
+      <keyword name="UMLGraphicsView.__save" id="UMLGraphicsView.__save" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__save" />
+      <keyword name="UMLGraphicsView.__saveAs" id="UMLGraphicsView.__saveAs" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__saveAs" />
       <keyword name="UMLGraphicsView.__saveImage" id="UMLGraphicsView.__saveImage" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__saveImage" />
       <keyword name="UMLGraphicsView.__sceneChanged" id="UMLGraphicsView.__sceneChanged" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__sceneChanged" />
       <keyword name="UMLGraphicsView.__setSize" id="UMLGraphicsView.__setSize" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.__setSize" />
@@ -10642,22 +10656,30 @@
       <keyword name="UMLGraphicsView.autoAdjustSceneSize" id="UMLGraphicsView.autoAdjustSceneSize" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.autoAdjustSceneSize" />
       <keyword name="UMLGraphicsView.event" id="UMLGraphicsView.event" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.event" />
       <keyword name="UMLGraphicsView.filteredItems" id="UMLGraphicsView.filteredItems" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.filteredItems" />
+      <keyword name="UMLGraphicsView.findItem" id="UMLGraphicsView.findItem" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.findItem" />
       <keyword name="UMLGraphicsView.gestureEvent" id="UMLGraphicsView.gestureEvent" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.gestureEvent" />
+      <keyword name="UMLGraphicsView.getItemId" id="UMLGraphicsView.getItemId" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.getItemId" />
+      <keyword name="UMLGraphicsView.getPersistenceData" id="UMLGraphicsView.getPersistenceData" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.getPersistenceData" />
       <keyword name="UMLGraphicsView.initToolBar" id="UMLGraphicsView.initToolBar" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.initToolBar" />
       <keyword name="UMLGraphicsView.selectItem" id="UMLGraphicsView.selectItem" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.selectItem" />
       <keyword name="UMLGraphicsView.selectItems" id="UMLGraphicsView.selectItems" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.selectItems" />
       <keyword name="UMLGraphicsView.setDiagramName" id="UMLGraphicsView.setDiagramName" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.setDiagramName" />
+      <keyword name="UMLGraphicsView.setPersistenceData" id="UMLGraphicsView.setPersistenceData" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.setPersistenceData" />
       <keyword name="UMLGraphicsView.wheelEvent" id="UMLGraphicsView.wheelEvent" ref="eric5.Graphics.UMLGraphicsView.html#UMLGraphicsView.wheelEvent" />
       <keyword name="UMLItem" id="UMLItem" ref="eric5.Graphics.UMLItem.html#UMLItem" />
       <keyword name="UMLItem (Constructor)" id="UMLItem (Constructor)" ref="eric5.Graphics.UMLItem.html#UMLItem.__init__" />
       <keyword name="UMLItem (Module)" id="UMLItem (Module)" ref="eric5.Graphics.UMLItem.html" />
       <keyword name="UMLItem.addAssociation" id="UMLItem.addAssociation" ref="eric5.Graphics.UMLItem.html#UMLItem.addAssociation" />
       <keyword name="UMLItem.adjustAssociations" id="UMLItem.adjustAssociations" ref="eric5.Graphics.UMLItem.html#UMLItem.adjustAssociations" />
+      <keyword name="UMLItem.buildItemDataString" id="UMLItem.buildItemDataString" ref="eric5.Graphics.UMLItem.html#UMLItem.buildItemDataString" />
+      <keyword name="UMLItem.getId" id="UMLItem.getId" ref="eric5.Graphics.UMLItem.html#UMLItem.getId" />
       <keyword name="UMLItem.itemChange" id="UMLItem.itemChange" ref="eric5.Graphics.UMLItem.html#UMLItem.itemChange" />
       <keyword name="UMLItem.moveBy" id="UMLItem.moveBy" ref="eric5.Graphics.UMLItem.html#UMLItem.moveBy" />
       <keyword name="UMLItem.paint" id="UMLItem.paint" ref="eric5.Graphics.UMLItem.html#UMLItem.paint" />
+      <keyword name="UMLItem.parseItemDataString" id="UMLItem.parseItemDataString" ref="eric5.Graphics.UMLItem.html#UMLItem.parseItemDataString" />
       <keyword name="UMLItem.removeAssociation" id="UMLItem.removeAssociation" ref="eric5.Graphics.UMLItem.html#UMLItem.removeAssociation" />
       <keyword name="UMLItem.removeAssociations" id="UMLItem.removeAssociations" ref="eric5.Graphics.UMLItem.html#UMLItem.removeAssociations" />
+      <keyword name="UMLItem.setId" id="UMLItem.setId" ref="eric5.Graphics.UMLItem.html#UMLItem.setId" />
       <keyword name="UMLItem.setPos" id="UMLItem.setPos" ref="eric5.Graphics.UMLItem.html#UMLItem.setPos" />
       <keyword name="UMLItem.setSize" id="UMLItem.setSize" ref="eric5.Graphics.UMLItem.html#UMLItem.setSize" />
       <keyword name="UMLSceneSizeDialog" id="UMLSceneSizeDialog" ref="eric5.Graphics.UMLSceneSizeDialog.html#UMLSceneSizeDialog" />
@@ -12263,6 +12285,7 @@
       <keyword name="thread_list_all" id="thread_list_all" ref="eric5.DebugClients.Ruby.Debuggee.html#thread_list_all" />
       <keyword name="timeString" id="timeString" ref="eric5.Helpviewer.Download.DownloadUtilities.html#timeString" />
       <keyword name="toBool" id="toBool" ref="eric5.Preferences.__init__.html#toBool" />
+      <keyword name="toBool" id="toBool" ref="eric5.Utilities.__init__.html#toBool" />
       <keyword name="toByteArray" id="toByteArray" ref="eric5.Preferences.__init__.html#toByteArray" />
       <keyword name="toDict" id="toDict" ref="eric5.Preferences.__init__.html#toDict" />
       <keyword name="toList" id="toList" ref="eric5.Preferences.__init__.html#toList" />
@@ -12454,17 +12477,18 @@
       <file>eric5.E5XML.XMLStreamReaderBase.html</file>
       <file>eric5.E5XML.XMLStreamWriterBase.html</file>
       <file>eric5.Globals.__init__.html</file>
-      <file>eric5.Graphics.ApplicationDiagram.html</file>
+      <file>eric5.Graphics.ApplicationDiagramBuilder.html</file>
       <file>eric5.Graphics.AssociationItem.html</file>
       <file>eric5.Graphics.ClassItem.html</file>
       <file>eric5.Graphics.GraphicsUtilities.html</file>
-      <file>eric5.Graphics.ImportsDiagram.html</file>
+      <file>eric5.Graphics.ImportsDiagramBuilder.html</file>
       <file>eric5.Graphics.ModuleItem.html</file>
-      <file>eric5.Graphics.PackageDiagram.html</file>
+      <file>eric5.Graphics.PackageDiagramBuilder.html</file>
       <file>eric5.Graphics.PackageItem.html</file>
       <file>eric5.Graphics.PixmapDiagram.html</file>
       <file>eric5.Graphics.SvgDiagram.html</file>
-      <file>eric5.Graphics.UMLClassDiagram.html</file>
+      <file>eric5.Graphics.UMLClassDiagramBuilder.html</file>
+      <file>eric5.Graphics.UMLDiagramBuilder.html</file>
       <file>eric5.Graphics.UMLDialog.html</file>
       <file>eric5.Graphics.UMLGraphicsView.html</file>
       <file>eric5.Graphics.UMLItem.html</file>
--- a/Documentation/Source/eric5.Graphics.ApplicationDiagram.html	Sun Sep 09 14:46:59 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html><head>
-<title>eric5.Graphics.ApplicationDiagram</title>
-<style>
-body {
-    background: #EDECE6;
-    margin: 0em 1em 10em 1em;
-    color: black;
-}
-
-h1 { color: white; background: #85774A; }
-h2 { color: white; background: #85774A; }
-h3 { color: white; background: #9D936E; }
-h4 { color: white; background: #9D936E; }
-    
-a { color: #BA6D36; }
-
-</style>
-</head>
-<body><a NAME="top" ID="top"></a>
-<h1>eric5.Graphics.ApplicationDiagram</h1>
-<p>
-Module implementing a dialog showing an imports diagram of the application.
-</p>
-<h3>Global Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Classes</h3>
-<table>
-<tr>
-<td><a href="#ApplicationDiagram">ApplicationDiagram</a></td>
-<td>Class implementing a dialog showing an imports diagram of the application.</td>
-</tr>
-</table>
-<h3>Functions</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<hr /><hr />
-<a NAME="ApplicationDiagram" ID="ApplicationDiagram"></a>
-<h2>ApplicationDiagram</h2>
-<p>
-    Class implementing a dialog showing an imports diagram of the application.
-</p>
-<h3>Derived from</h3>
-UMLDialog
-<h3>Class Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Class Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Methods</h3>
-<table>
-<tr>
-<td><a href="#ApplicationDiagram.__init__">ApplicationDiagram</a></td>
-<td>Constructor</td>
-</tr><tr>
-<td><a href="#ApplicationDiagram.__addPackage">__addPackage</a></td>
-<td>Private method to add a package to the diagram.</td>
-</tr><tr>
-<td><a href="#ApplicationDiagram.__buildModulesDict">__buildModulesDict</a></td>
-<td>Private method to build a dictionary of modules contained in the application.</td>
-</tr><tr>
-<td><a href="#ApplicationDiagram.__buildPackages">__buildPackages</a></td>
-<td>Private method to build the packages shapes of the diagram.</td>
-</tr><tr>
-<td><a href="#ApplicationDiagram.__createAssociations">__createAssociations</a></td>
-<td>Private method to generate the associations between the package shapes.</td>
-</tr><tr>
-<td><a href="#ApplicationDiagram.relayout">relayout</a></td>
-<td>Method to relayout the diagram.</td>
-</tr>
-</table>
-<h3>Static Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<a NAME="ApplicationDiagram.__init__" ID="ApplicationDiagram.__init__"></a>
-<h4>ApplicationDiagram (Constructor)</h4>
-<b>ApplicationDiagram</b>(<i>project, parent=None, name=None, noModules=False</i>)
-<p>
-        Constructor
-</p><dl>
-<dt><i>project</i></dt>
-<dd>
-reference to the project object
-</dd><dt><i>parent</i></dt>
-<dd>
-parent widget of the view (QWidget)
-</dd><dt><i>name</i></dt>
-<dd>
-name of the view widget (string)
-</dd><dt><i>noModules=</i></dt>
-<dd>
-flag indicating, that no module names should be
-            shown (boolean)
-</dd>
-</dl><a NAME="ApplicationDiagram.__addPackage" ID="ApplicationDiagram.__addPackage"></a>
-<h4>ApplicationDiagram.__addPackage</h4>
-<b>__addPackage</b>(<i>name, modules, x, y</i>)
-<p>
-        Private method to add a package to the diagram.
-</p><dl>
-<dt><i>name</i></dt>
-<dd>
-package name to be shown (string)
-</dd><dt><i>modules</i></dt>
-<dd>
-list of module names contained in the package
-            (list of strings)
-</dd><dt><i>x</i></dt>
-<dd>
-x-coordinate (float)
-</dd><dt><i>y</i></dt>
-<dd>
-y-coordinate (float)
-</dd>
-</dl><a NAME="ApplicationDiagram.__buildModulesDict" ID="ApplicationDiagram.__buildModulesDict"></a>
-<h4>ApplicationDiagram.__buildModulesDict</h4>
-<b>__buildModulesDict</b>(<i></i>)
-<p>
-        Private method to build a dictionary of modules contained in the application.
-</p><dl>
-<dt>Returns:</dt>
-<dd>
-dictionary of modules contained in the application.
-</dd>
-</dl><a NAME="ApplicationDiagram.__buildPackages" ID="ApplicationDiagram.__buildPackages"></a>
-<h4>ApplicationDiagram.__buildPackages</h4>
-<b>__buildPackages</b>(<i></i>)
-<p>
-        Private method to build the packages shapes of the diagram.
-</p><a NAME="ApplicationDiagram.__createAssociations" ID="ApplicationDiagram.__createAssociations"></a>
-<h4>ApplicationDiagram.__createAssociations</h4>
-<b>__createAssociations</b>(<i>shapes</i>)
-<p>
-        Private method to generate the associations between the package shapes.
-</p><dl>
-<dt><i>shapes</i></dt>
-<dd>
-list of shapes
-</dd>
-</dl><a NAME="ApplicationDiagram.relayout" ID="ApplicationDiagram.relayout"></a>
-<h4>ApplicationDiagram.relayout</h4>
-<b>relayout</b>(<i></i>)
-<p>
-        Method to relayout the diagram.
-</p>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-</body></html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric5.Graphics.ApplicationDiagramBuilder.html	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
+'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html><head>
+<title>eric5.Graphics.ApplicationDiagramBuilder</title>
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric5.Graphics.ApplicationDiagramBuilder</h1>
+<p>
+Module implementing a dialog showing an imports diagram of the application.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#ApplicationDiagramBuilder">ApplicationDiagramBuilder</a></td>
+<td>Class implementing a builder for imports diagrams of the application.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr /><hr />
+<a NAME="ApplicationDiagramBuilder" ID="ApplicationDiagramBuilder"></a>
+<h2>ApplicationDiagramBuilder</h2>
+<p>
+    Class implementing a builder for imports diagrams of the application.
+</p>
+<h3>Derived from</h3>
+UMLDiagramBuilder
+<h3>Class Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#ApplicationDiagramBuilder.__init__">ApplicationDiagramBuilder</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#ApplicationDiagramBuilder.__addPackage">__addPackage</a></td>
+<td>Private method to add a package to the diagram.</td>
+</tr><tr>
+<td><a href="#ApplicationDiagramBuilder.__buildModulesDict">__buildModulesDict</a></td>
+<td>Private method to build a dictionary of modules contained in the application.</td>
+</tr><tr>
+<td><a href="#ApplicationDiagramBuilder.__createAssociations">__createAssociations</a></td>
+<td>Private method to generate the associations between the package shapes.</td>
+</tr><tr>
+<td><a href="#ApplicationDiagramBuilder.buildDiagram">buildDiagram</a></td>
+<td>Public method to build the packages shapes of the diagram.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="ApplicationDiagramBuilder.__init__" ID="ApplicationDiagramBuilder.__init__"></a>
+<h4>ApplicationDiagramBuilder (Constructor)</h4>
+<b>ApplicationDiagramBuilder</b>(<i>dialog, view, project, noModules=False</i>)
+<p>
+        Constructor
+</p><dl>
+<dt><i>dialog</i></dt>
+<dd>
+reference to the UML dialog (UMLDialog)
+</dd><dt><i>view</i></dt>
+<dd>
+reference to the view object (UMLGraphicsView)
+</dd><dt><i>project</i></dt>
+<dd>
+reference to the project object (Project)
+</dd><dt><i>noModules=</i></dt>
+<dd>
+flag indicating, that no module names should be
+            shown (boolean)
+</dd>
+</dl><a NAME="ApplicationDiagramBuilder.__addPackage" ID="ApplicationDiagramBuilder.__addPackage"></a>
+<h4>ApplicationDiagramBuilder.__addPackage</h4>
+<b>__addPackage</b>(<i>name, modules, x, y</i>)
+<p>
+        Private method to add a package to the diagram.
+</p><dl>
+<dt><i>name</i></dt>
+<dd>
+package name to be shown (string)
+</dd><dt><i>modules</i></dt>
+<dd>
+list of module names contained in the package
+            (list of strings)
+</dd><dt><i>x</i></dt>
+<dd>
+x-coordinate (float)
+</dd><dt><i>y</i></dt>
+<dd>
+y-coordinate (float)
+</dd>
+</dl><a NAME="ApplicationDiagramBuilder.__buildModulesDict" ID="ApplicationDiagramBuilder.__buildModulesDict"></a>
+<h4>ApplicationDiagramBuilder.__buildModulesDict</h4>
+<b>__buildModulesDict</b>(<i></i>)
+<p>
+        Private method to build a dictionary of modules contained in the application.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+dictionary of modules contained in the application.
+</dd>
+</dl><a NAME="ApplicationDiagramBuilder.__createAssociations" ID="ApplicationDiagramBuilder.__createAssociations"></a>
+<h4>ApplicationDiagramBuilder.__createAssociations</h4>
+<b>__createAssociations</b>(<i>shapes</i>)
+<p>
+        Private method to generate the associations between the package shapes.
+</p><dl>
+<dt><i>shapes</i></dt>
+<dd>
+list of shapes
+</dd>
+</dl><a NAME="ApplicationDiagramBuilder.buildDiagram" ID="ApplicationDiagramBuilder.buildDiagram"></a>
+<h4>ApplicationDiagramBuilder.buildDiagram</h4>
+<b>buildDiagram</b>(<i></i>)
+<p>
+        Public method to build the packages shapes of the diagram.
+</p>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file
--- a/Documentation/Source/eric5.Graphics.AssociationItem.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/eric5.Graphics.AssociationItem.html	Sun Sep 09 17:40:32 2012 +0200
@@ -56,7 +56,10 @@
 </table>
 <h3>Class Methods</h3>
 <table>
-<tr><td>None</td></tr>
+<tr>
+<td><a href="#AssociationItem.parseAssociationItemDataString">parseAssociationItemDataString</a></td>
+<td>Class method to parse the given persistence data.</td>
+</tr>
 </table>
 <h3>Methods</h3>
 <table>
@@ -88,6 +91,9 @@
 <td><a href="#AssociationItem.__updateEndPoint">__updateEndPoint</a></td>
 <td>Private method to update an endpoint.</td>
 </tr><tr>
+<td><a href="#AssociationItem.buildAssociationItemDataString">buildAssociationItemDataString</a></td>
+<td>Public method to build a string to persist the specific item data.</td>
+</tr><tr>
 <td><a href="#AssociationItem.unassociate">unassociate</a></td>
 <td>Public method to unassociate from the widgets.</td>
 </tr><tr>
@@ -99,7 +105,24 @@
 <table>
 <tr><td>None</td></tr>
 </table>
-<a NAME="AssociationItem.__init__" ID="AssociationItem.__init__"></a>
+<a NAME="AssociationItem.parseAssociationItemDataString" ID="AssociationItem.parseAssociationItemDataString"></a>
+<h4>AssociationItem.parseAssociationItemDataString (class method)</h4>
+<b>parseAssociationItemDataString</b>(<i>data</i>)
+<p>
+        Class method to parse the given persistence data.
+</p><dl>
+<dt><i>data</i></dt>
+<dd>
+persisted data to be parsed (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+tuple with the IDs of the source and destination items,
+            the association type and a flag indicating to associate from top
+            to bottom (integer, integer, integer, boolean)
+</dd>
+</dl><a NAME="AssociationItem.__init__" ID="AssociationItem.__init__"></a>
 <h4>AssociationItem (Constructor)</h4>
 <b>AssociationItem</b>(<i>itemA, itemB, type=Normal, topToBottom=False, parent=None</i>)
 <p>
@@ -300,6 +323,19 @@
 <dd>
 flag indicating update for itemA is done (boolean)
 </dd>
+</dl><a NAME="AssociationItem.buildAssociationItemDataString" ID="AssociationItem.buildAssociationItemDataString"></a>
+<h4>AssociationItem.buildAssociationItemDataString</h4>
+<b>buildAssociationItemDataString</b>(<i></i>)
+<p>
+        Public method to build a string to persist the specific item data.
+</p><p>
+        This string should be built like "attribute=value" with pairs separated
+        by ", ". value must not contain ", " or newlines.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+persistence data (string)
+</dd>
 </dl><a NAME="AssociationItem.unassociate" ID="AssociationItem.unassociate"></a>
 <h4>AssociationItem.unassociate</h4>
 <b>unassociate</b>(<i></i>)
--- a/Documentation/Source/eric5.Graphics.ClassItem.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/eric5.Graphics.ClassItem.html	Sun Sep 09 17:40:32 2012 +0200
@@ -70,12 +70,18 @@
 <td><a href="#ClassItem.__createTexts">__createTexts</a></td>
 <td>Private method to create the text items of the class item.</td>
 </tr><tr>
+<td><a href="#ClassItem.buildItemDataString">buildItemDataString</a></td>
+<td>Public method to build a string to persist the specific item data.</td>
+</tr><tr>
 <td><a href="#ClassItem.isExternal">isExternal</a></td>
 <td>Method returning the external state.</td>
 </tr><tr>
 <td><a href="#ClassItem.paint">paint</a></td>
 <td>Public method to paint the item in local coordinates.</td>
 </tr><tr>
+<td><a href="#ClassItem.parseItemDataString">parseItemDataString</a></td>
+<td>Public method to parse the given persistence data.</td>
+</tr><tr>
 <td><a href="#ClassItem.setModel">setModel</a></td>
 <td>Method to set the class model.</td>
 </tr>
@@ -125,7 +131,21 @@
 <b>__createTexts</b>(<i></i>)
 <p>
         Private method to create the text items of the class item.
-</p><a NAME="ClassItem.isExternal" ID="ClassItem.isExternal"></a>
+</p><a NAME="ClassItem.buildItemDataString" ID="ClassItem.buildItemDataString"></a>
+<h4>ClassItem.buildItemDataString</h4>
+<b>buildItemDataString</b>(<i></i>)
+<p>
+        Public method to build a string to persist the specific item data.
+</p><p>
+        This string must start with ", " and should be built like
+        "attribute=value" with pairs separated by ", ". value must not contain ", "
+        or newlines.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+persistence data (string)
+</dd>
+</dl><a NAME="ClassItem.isExternal" ID="ClassItem.isExternal"></a>
 <h4>ClassItem.isExternal</h4>
 <b>isExternal</b>(<i></i>)
 <p>
@@ -151,6 +171,16 @@
 <dd>
 optional reference to the widget painted on (QWidget)
 </dd>
+</dl><a NAME="ClassItem.parseItemDataString" ID="ClassItem.parseItemDataString"></a>
+<h4>ClassItem.parseItemDataString</h4>
+<b>parseItemDataString</b>(<i>data</i>)
+<p>
+        Public method to parse the given persistence data.
+</p><dl>
+<dt><i>data</i></dt>
+<dd>
+persisted data to be parsed (string)
+</dd>
 </dl><a NAME="ClassItem.setModel" ID="ClassItem.setModel"></a>
 <h4>ClassItem.setModel</h4>
 <b>setModel</b>(<i>model</i>)
--- a/Documentation/Source/eric5.Graphics.ImportsDiagram.html	Sun Sep 09 14:46:59 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html><head>
-<title>eric5.Graphics.ImportsDiagram</title>
-<style>
-body {
-    background: #EDECE6;
-    margin: 0em 1em 10em 1em;
-    color: black;
-}
-
-h1 { color: white; background: #85774A; }
-h2 { color: white; background: #85774A; }
-h3 { color: white; background: #9D936E; }
-h4 { color: white; background: #9D936E; }
-    
-a { color: #BA6D36; }
-
-</style>
-</head>
-<body><a NAME="top" ID="top"></a>
-<h1>eric5.Graphics.ImportsDiagram</h1>
-<p>
-Module implementing a dialog showing an imports diagram of a package.
-</p>
-<h3>Global Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Classes</h3>
-<table>
-<tr>
-<td><a href="#ImportsDiagram">ImportsDiagram</a></td>
-<td>Class implementing a dialog showing an imports diagram of a package.</td>
-</tr>
-</table>
-<h3>Functions</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<hr /><hr />
-<a NAME="ImportsDiagram" ID="ImportsDiagram"></a>
-<h2>ImportsDiagram</h2>
-<p>
-    Class implementing a dialog showing an imports diagram of a package.
-</p><p>
-    Note: Only package internal imports are show in order to maintain
-    some readability.
-</p>
-<h3>Derived from</h3>
-UMLDialog
-<h3>Class Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Class Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Methods</h3>
-<table>
-<tr>
-<td><a href="#ImportsDiagram.__init__">ImportsDiagram</a></td>
-<td>Constructor</td>
-</tr><tr>
-<td><a href="#ImportsDiagram.__addModule">__addModule</a></td>
-<td>Private method to add a module to the diagram.</td>
-</tr><tr>
-<td><a href="#ImportsDiagram.__buildImports">__buildImports</a></td>
-<td>Private method to build the modules shapes of the diagram.</td>
-</tr><tr>
-<td><a href="#ImportsDiagram.__buildModulesDict">__buildModulesDict</a></td>
-<td>Private method to build a dictionary of modules contained in the package.</td>
-</tr><tr>
-<td><a href="#ImportsDiagram.__createAssociations">__createAssociations</a></td>
-<td>Private method to generate the associations between the module shapes.</td>
-</tr><tr>
-<td><a href="#ImportsDiagram.relayout">relayout</a></td>
-<td>Method to relayout the diagram.</td>
-</tr>
-</table>
-<h3>Static Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<a NAME="ImportsDiagram.__init__" ID="ImportsDiagram.__init__"></a>
-<h4>ImportsDiagram (Constructor)</h4>
-<b>ImportsDiagram</b>(<i>project, package, parent=None, name=None, showExternalImports=False</i>)
-<p>
-        Constructor
-</p><dl>
-<dt><i>project</i></dt>
-<dd>
-reference to the project object
-</dd><dt><i>package</i></dt>
-<dd>
-name of a python package to show the import
-            relationships (string)
-</dd><dt><i>parent</i></dt>
-<dd>
-parent widget of the view (QWidget)
-</dd><dt><i>name</i></dt>
-<dd>
-name of the view widget (string)
-</dd><dt><i>showExternalImports=</i></dt>
-<dd>
-flag indicating to show exports from outside
-            the package (boolean)
-</dd>
-</dl><a NAME="ImportsDiagram.__addModule" ID="ImportsDiagram.__addModule"></a>
-<h4>ImportsDiagram.__addModule</h4>
-<b>__addModule</b>(<i>name, classes, x, y</i>)
-<p>
-        Private method to add a module to the diagram.
-</p><dl>
-<dt><i>name</i></dt>
-<dd>
-module name to be shown (string)
-</dd><dt><i>classes</i></dt>
-<dd>
-list of class names contained in the module
-            (list of strings)
-</dd><dt><i>x</i></dt>
-<dd>
-x-coordinate (float)
-</dd><dt><i>y</i></dt>
-<dd>
-y-coordinate (float)
-</dd>
-</dl><a NAME="ImportsDiagram.__buildImports" ID="ImportsDiagram.__buildImports"></a>
-<h4>ImportsDiagram.__buildImports</h4>
-<b>__buildImports</b>(<i></i>)
-<p>
-        Private method to build the modules shapes of the diagram.
-</p><a NAME="ImportsDiagram.__buildModulesDict" ID="ImportsDiagram.__buildModulesDict"></a>
-<h4>ImportsDiagram.__buildModulesDict</h4>
-<b>__buildModulesDict</b>(<i></i>)
-<p>
-        Private method to build a dictionary of modules contained in the package.
-</p><dl>
-<dt>Returns:</dt>
-<dd>
-dictionary of modules contained in the package.
-</dd>
-</dl><a NAME="ImportsDiagram.__createAssociations" ID="ImportsDiagram.__createAssociations"></a>
-<h4>ImportsDiagram.__createAssociations</h4>
-<b>__createAssociations</b>(<i>shapes</i>)
-<p>
-        Private method to generate the associations between the module shapes.
-</p><dl>
-<dt><i>shapes</i></dt>
-<dd>
-list of shapes
-</dd>
-</dl><a NAME="ImportsDiagram.relayout" ID="ImportsDiagram.relayout"></a>
-<h4>ImportsDiagram.relayout</h4>
-<b>relayout</b>(<i></i>)
-<p>
-        Method to relayout the diagram.
-</p>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-</body></html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric5.Graphics.ImportsDiagramBuilder.html	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
+'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html><head>
+<title>eric5.Graphics.ImportsDiagramBuilder</title>
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric5.Graphics.ImportsDiagramBuilder</h1>
+<p>
+Module implementing a dialog showing an imports diagram of a package.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#ImportsDiagramBuilder">ImportsDiagramBuilder</a></td>
+<td>Class implementing a builder for imports diagrams of a package.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr /><hr />
+<a NAME="ImportsDiagramBuilder" ID="ImportsDiagramBuilder"></a>
+<h2>ImportsDiagramBuilder</h2>
+<p>
+    Class implementing a builder for imports diagrams of a package.
+</p><p>
+    Note: Only package internal imports are shown in order to maintain
+    some readability.
+</p>
+<h3>Derived from</h3>
+UMLDiagramBuilder
+<h3>Class Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#ImportsDiagramBuilder.__init__">ImportsDiagramBuilder</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#ImportsDiagramBuilder.__addModule">__addModule</a></td>
+<td>Private method to add a module to the diagram.</td>
+</tr><tr>
+<td><a href="#ImportsDiagramBuilder.__buildModulesDict">__buildModulesDict</a></td>
+<td>Private method to build a dictionary of modules contained in the package.</td>
+</tr><tr>
+<td><a href="#ImportsDiagramBuilder.__createAssociations">__createAssociations</a></td>
+<td>Private method to generate the associations between the module shapes.</td>
+</tr><tr>
+<td><a href="#ImportsDiagramBuilder.buildDiagram">buildDiagram</a></td>
+<td>Public method to build the modules shapes of the diagram.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="ImportsDiagramBuilder.__init__" ID="ImportsDiagramBuilder.__init__"></a>
+<h4>ImportsDiagramBuilder (Constructor)</h4>
+<b>ImportsDiagramBuilder</b>(<i>dialog, view, project, package, showExternalImports=False</i>)
+<p>
+        Constructor
+</p><dl>
+<dt><i>dialog</i></dt>
+<dd>
+reference to the UML dialog (UMLDialog)
+</dd><dt><i>view</i></dt>
+<dd>
+reference to the view object (UMLGraphicsView)
+</dd><dt><i>project</i></dt>
+<dd>
+reference to the project object (Project)
+</dd><dt><i>package</i></dt>
+<dd>
+name of a python package to show the import
+            relationships (string)
+</dd><dt><i>showExternalImports=</i></dt>
+<dd>
+flag indicating to show exports from outside
+            the package (boolean)
+</dd>
+</dl><a NAME="ImportsDiagramBuilder.__addModule" ID="ImportsDiagramBuilder.__addModule"></a>
+<h4>ImportsDiagramBuilder.__addModule</h4>
+<b>__addModule</b>(<i>name, classes, x, y</i>)
+<p>
+        Private method to add a module to the diagram.
+</p><dl>
+<dt><i>name</i></dt>
+<dd>
+module name to be shown (string)
+</dd><dt><i>classes</i></dt>
+<dd>
+list of class names contained in the module
+            (list of strings)
+</dd><dt><i>x</i></dt>
+<dd>
+x-coordinate (float)
+</dd><dt><i>y</i></dt>
+<dd>
+y-coordinate (float)
+</dd>
+</dl><a NAME="ImportsDiagramBuilder.__buildModulesDict" ID="ImportsDiagramBuilder.__buildModulesDict"></a>
+<h4>ImportsDiagramBuilder.__buildModulesDict</h4>
+<b>__buildModulesDict</b>(<i></i>)
+<p>
+        Private method to build a dictionary of modules contained in the package.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+dictionary of modules contained in the package.
+</dd>
+</dl><a NAME="ImportsDiagramBuilder.__createAssociations" ID="ImportsDiagramBuilder.__createAssociations"></a>
+<h4>ImportsDiagramBuilder.__createAssociations</h4>
+<b>__createAssociations</b>(<i>shapes</i>)
+<p>
+        Private method to generate the associations between the module shapes.
+</p><dl>
+<dt><i>shapes</i></dt>
+<dd>
+list of shapes
+</dd>
+</dl><a NAME="ImportsDiagramBuilder.buildDiagram" ID="ImportsDiagramBuilder.buildDiagram"></a>
+<h4>ImportsDiagramBuilder.buildDiagram</h4>
+<b>buildDiagram</b>(<i></i>)
+<p>
+        Public method to build the modules shapes of the diagram.
+</p>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file
--- a/Documentation/Source/eric5.Graphics.ModuleItem.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/eric5.Graphics.ModuleItem.html	Sun Sep 09 17:40:32 2012 +0200
@@ -70,9 +70,15 @@
 <td><a href="#ModuleItem.__createTexts">__createTexts</a></td>
 <td>Private method to create the text items of the module item.</td>
 </tr><tr>
+<td><a href="#ModuleItem.buildItemDataString">buildItemDataString</a></td>
+<td>Public method to build a string to persist the specific item data.</td>
+</tr><tr>
 <td><a href="#ModuleItem.paint">paint</a></td>
 <td>Public method to paint the item in local coordinates.</td>
 </tr><tr>
+<td><a href="#ModuleItem.parseItemDataString">parseItemDataString</a></td>
+<td>Public method to parse the given persistence data.</td>
+</tr><tr>
 <td><a href="#ModuleItem.setModel">setModel</a></td>
 <td>Method to set the module model.</td>
 </tr>
@@ -116,7 +122,21 @@
 <b>__createTexts</b>(<i></i>)
 <p>
         Private method to create the text items of the module item.
-</p><a NAME="ModuleItem.paint" ID="ModuleItem.paint"></a>
+</p><a NAME="ModuleItem.buildItemDataString" ID="ModuleItem.buildItemDataString"></a>
+<h4>ModuleItem.buildItemDataString</h4>
+<b>buildItemDataString</b>(<i></i>)
+<p>
+        Public method to build a string to persist the specific item data.
+</p><p>
+        This string must start with ", " and should be built like
+        "attribute=value" with pairs separated by ", ". value must not contain ", "
+        or newlines.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+persistence data (string)
+</dd>
+</dl><a NAME="ModuleItem.paint" ID="ModuleItem.paint"></a>
 <h4>ModuleItem.paint</h4>
 <b>paint</b>(<i>painter, option, widget=None</i>)
 <p>
@@ -132,6 +152,16 @@
 <dd>
 optional reference to the widget painted on (QWidget)
 </dd>
+</dl><a NAME="ModuleItem.parseItemDataString" ID="ModuleItem.parseItemDataString"></a>
+<h4>ModuleItem.parseItemDataString</h4>
+<b>parseItemDataString</b>(<i>data</i>)
+<p>
+        Public method to parse the given persistence data.
+</p><dl>
+<dt><i>data</i></dt>
+<dd>
+persisted data to be parsed (string)
+</dd>
 </dl><a NAME="ModuleItem.setModel" ID="ModuleItem.setModel"></a>
 <h4>ModuleItem.setModel</h4>
 <b>setModel</b>(<i>model</i>)
--- a/Documentation/Source/eric5.Graphics.PackageDiagram.html	Sun Sep 09 14:46:59 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html><head>
-<title>eric5.Graphics.PackageDiagram</title>
-<style>
-body {
-    background: #EDECE6;
-    margin: 0em 1em 10em 1em;
-    color: black;
-}
-
-h1 { color: white; background: #85774A; }
-h2 { color: white; background: #85774A; }
-h3 { color: white; background: #9D936E; }
-h4 { color: white; background: #9D936E; }
-    
-a { color: #BA6D36; }
-
-</style>
-</head>
-<body><a NAME="top" ID="top"></a>
-<h1>eric5.Graphics.PackageDiagram</h1>
-<p>
-Module implementing a dialog showing a UML like class diagram of a package.
-</p>
-<h3>Global Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Classes</h3>
-<table>
-<tr>
-<td><a href="#PackageDiagram">PackageDiagram</a></td>
-<td>Class implementing a dialog showing a UML like class diagram of a package.</td>
-</tr>
-</table>
-<h3>Functions</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<hr /><hr />
-<a NAME="PackageDiagram" ID="PackageDiagram"></a>
-<h2>PackageDiagram</h2>
-<p>
-    Class implementing a dialog showing a UML like class diagram of a package.
-</p>
-<h3>Derived from</h3>
-UMLDialog
-<h3>Class Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Class Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Methods</h3>
-<table>
-<tr>
-<td><a href="#PackageDiagram.__init__">PackageDiagram</a></td>
-<td>Constructor</td>
-</tr><tr>
-<td><a href="#PackageDiagram.__addExternalClass">__addExternalClass</a></td>
-<td>Private method to add a class defined outside the module.</td>
-</tr><tr>
-<td><a href="#PackageDiagram.__addLocalClass">__addLocalClass</a></td>
-<td>Private method to add a class defined in the module.</td>
-</tr><tr>
-<td><a href="#PackageDiagram.__arrangeClasses">__arrangeClasses</a></td>
-<td>Private method to arrange the shapes on the canvas.</td>
-</tr><tr>
-<td><a href="#PackageDiagram.__buildClasses">__buildClasses</a></td>
-<td>Private method to build the class shapes of the package diagram.</td>
-</tr><tr>
-<td><a href="#PackageDiagram.__buildModulesDict">__buildModulesDict</a></td>
-<td>Private method to build a dictionary of modules contained in the package.</td>
-</tr><tr>
-<td><a href="#PackageDiagram.__createAssociations">__createAssociations</a></td>
-<td>Private method to generate the associations between the class shapes.</td>
-</tr><tr>
-<td><a href="#PackageDiagram.__getCurrentShape">__getCurrentShape</a></td>
-<td>Private method to get the named shape.</td>
-</tr><tr>
-<td><a href="#PackageDiagram.relayout">relayout</a></td>
-<td>Method to relayout the diagram.</td>
-</tr>
-</table>
-<h3>Static Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<a NAME="PackageDiagram.__init__" ID="PackageDiagram.__init__"></a>
-<h4>PackageDiagram (Constructor)</h4>
-<b>PackageDiagram</b>(<i>project, package, parent=None, name=None, noAttrs=False</i>)
-<p>
-        Constructor
-</p><dl>
-<dt><i>project</i></dt>
-<dd>
-reference to the project object
-</dd><dt><i>package</i></dt>
-<dd>
-name of a python package to be shown (string)
-</dd><dt><i>parent</i></dt>
-<dd>
-parent widget of the view (QWidget)
-</dd><dt><i>name</i></dt>
-<dd>
-name of the view widget (string)
-</dd><dt><i>noAttrs=</i></dt>
-<dd>
-flag indicating, that no attributes should be shown (boolean)
-</dd>
-</dl><a NAME="PackageDiagram.__addExternalClass" ID="PackageDiagram.__addExternalClass"></a>
-<h4>PackageDiagram.__addExternalClass</h4>
-<b>__addExternalClass</b>(<i>_class, x, y</i>)
-<p>
-        Private method to add a class defined outside the module.
-</p><p>
-        If the canvas is too small to take the shape, it
-        is enlarged.
-</p><dl>
-<dt><i>_class</i></dt>
-<dd>
-class to be shown (string)
-</dd><dt><i>x</i></dt>
-<dd>
-x-coordinate (float)
-</dd><dt><i>y</i></dt>
-<dd>
-y-coordinate (float)
-</dd>
-</dl><a NAME="PackageDiagram.__addLocalClass" ID="PackageDiagram.__addLocalClass"></a>
-<h4>PackageDiagram.__addLocalClass</h4>
-<b>__addLocalClass</b>(<i>className, _class, x, y, isRbModule=False</i>)
-<p>
-        Private method to add a class defined in the module.
-</p><dl>
-<dt><i>className</i></dt>
-<dd>
-name of the class to be as a dictionary key (string)
-</dd><dt><i>_class</i></dt>
-<dd>
-class to be shown (ModuleParser.Class)
-</dd><dt><i>x</i></dt>
-<dd>
-x-coordinate (float)
-</dd><dt><i>y</i></dt>
-<dd>
-y-coordinate (float)
-</dd><dt><i>isRbModule</i></dt>
-<dd>
-flag indicating a Ruby module (boolean)
-</dd>
-</dl><a NAME="PackageDiagram.__arrangeClasses" ID="PackageDiagram.__arrangeClasses"></a>
-<h4>PackageDiagram.__arrangeClasses</h4>
-<b>__arrangeClasses</b>(<i>nodes, routes, whiteSpaceFactor=1.2</i>)
-<p>
-        Private method to arrange the shapes on the canvas.
-</p><p>
-        The algorithm is borrowed from Boa Constructor.
-</p><a NAME="PackageDiagram.__buildClasses" ID="PackageDiagram.__buildClasses"></a>
-<h4>PackageDiagram.__buildClasses</h4>
-<b>__buildClasses</b>(<i></i>)
-<p>
-        Private method to build the class shapes of the package diagram.
-</p><p>
-        The algorithm is borrowed from Boa Constructor.
-</p><a NAME="PackageDiagram.__buildModulesDict" ID="PackageDiagram.__buildModulesDict"></a>
-<h4>PackageDiagram.__buildModulesDict</h4>
-<b>__buildModulesDict</b>(<i></i>)
-<p>
-        Private method to build a dictionary of modules contained in the package.
-</p><dl>
-<dt>Returns:</dt>
-<dd>
-dictionary of modules contained in the package.
-</dd>
-</dl><a NAME="PackageDiagram.__createAssociations" ID="PackageDiagram.__createAssociations"></a>
-<h4>PackageDiagram.__createAssociations</h4>
-<b>__createAssociations</b>(<i>routes</i>)
-<p>
-        Private method to generate the associations between the class shapes.
-</p><dl>
-<dt><i>routes</i></dt>
-<dd>
-list of relationsships
-</dd>
-</dl><a NAME="PackageDiagram.__getCurrentShape" ID="PackageDiagram.__getCurrentShape"></a>
-<h4>PackageDiagram.__getCurrentShape</h4>
-<b>__getCurrentShape</b>(<i>name</i>)
-<p>
-        Private method to get the named shape.
-</p><dl>
-<dt><i>name</i></dt>
-<dd>
-name of the shape (string)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-shape (QCanvasItem)
-</dd>
-</dl><a NAME="PackageDiagram.relayout" ID="PackageDiagram.relayout"></a>
-<h4>PackageDiagram.relayout</h4>
-<b>relayout</b>(<i></i>)
-<p>
-        Method to relayout the diagram.
-</p>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-</body></html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric5.Graphics.PackageDiagramBuilder.html	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
+'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html><head>
+<title>eric5.Graphics.PackageDiagramBuilder</title>
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric5.Graphics.PackageDiagramBuilder</h1>
+<p>
+Module implementing a dialog showing a UML like class diagram of a package.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#PackageDiagramBuilder">PackageDiagramBuilder</a></td>
+<td>Class implementing a builder for UML like class diagrams of a package.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr /><hr />
+<a NAME="PackageDiagramBuilder" ID="PackageDiagramBuilder"></a>
+<h2>PackageDiagramBuilder</h2>
+<p>
+    Class implementing a builder for UML like class diagrams of a package.
+</p>
+<h3>Derived from</h3>
+UMLDiagramBuilder
+<h3>Class Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#PackageDiagramBuilder.__init__">PackageDiagramBuilder</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#PackageDiagramBuilder.__addExternalClass">__addExternalClass</a></td>
+<td>Private method to add a class defined outside the module.</td>
+</tr><tr>
+<td><a href="#PackageDiagramBuilder.__addLocalClass">__addLocalClass</a></td>
+<td>Private method to add a class defined in the module.</td>
+</tr><tr>
+<td><a href="#PackageDiagramBuilder.__arrangeClasses">__arrangeClasses</a></td>
+<td>Private method to arrange the shapes on the canvas.</td>
+</tr><tr>
+<td><a href="#PackageDiagramBuilder.__buildModulesDict">__buildModulesDict</a></td>
+<td>Private method to build a dictionary of modules contained in the package.</td>
+</tr><tr>
+<td><a href="#PackageDiagramBuilder.__createAssociations">__createAssociations</a></td>
+<td>Private method to generate the associations between the class shapes.</td>
+</tr><tr>
+<td><a href="#PackageDiagramBuilder.__getCurrentShape">__getCurrentShape</a></td>
+<td>Private method to get the named shape.</td>
+</tr><tr>
+<td><a href="#PackageDiagramBuilder.buildDiagram">buildDiagram</a></td>
+<td>Public method to build the class shapes of the package diagram.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="PackageDiagramBuilder.__init__" ID="PackageDiagramBuilder.__init__"></a>
+<h4>PackageDiagramBuilder (Constructor)</h4>
+<b>PackageDiagramBuilder</b>(<i>dialog, view, project, package, noAttrs=False</i>)
+<p>
+        Constructor
+</p><dl>
+<dt><i>dialog</i></dt>
+<dd>
+reference to the UML dialog (UMLDialog)
+</dd><dt><i>view</i></dt>
+<dd>
+reference to the view object (UMLGraphicsView)
+</dd><dt><i>project</i></dt>
+<dd>
+reference to the project object (Project)
+</dd><dt><i>package</i></dt>
+<dd>
+name of a python package to be shown (string)
+</dd><dt><i>noAttrs=</i></dt>
+<dd>
+flag indicating, that no attributes should be shown (boolean)
+</dd>
+</dl><a NAME="PackageDiagramBuilder.__addExternalClass" ID="PackageDiagramBuilder.__addExternalClass"></a>
+<h4>PackageDiagramBuilder.__addExternalClass</h4>
+<b>__addExternalClass</b>(<i>_class, x, y</i>)
+<p>
+        Private method to add a class defined outside the module.
+</p><p>
+        If the canvas is too small to take the shape, it
+        is enlarged.
+</p><dl>
+<dt><i>_class</i></dt>
+<dd>
+class to be shown (string)
+</dd><dt><i>x</i></dt>
+<dd>
+x-coordinate (float)
+</dd><dt><i>y</i></dt>
+<dd>
+y-coordinate (float)
+</dd>
+</dl><a NAME="PackageDiagramBuilder.__addLocalClass" ID="PackageDiagramBuilder.__addLocalClass"></a>
+<h4>PackageDiagramBuilder.__addLocalClass</h4>
+<b>__addLocalClass</b>(<i>className, _class, x, y, isRbModule=False</i>)
+<p>
+        Private method to add a class defined in the module.
+</p><dl>
+<dt><i>className</i></dt>
+<dd>
+name of the class to be as a dictionary key (string)
+</dd><dt><i>_class</i></dt>
+<dd>
+class to be shown (ModuleParser.Class)
+</dd><dt><i>x</i></dt>
+<dd>
+x-coordinate (float)
+</dd><dt><i>y</i></dt>
+<dd>
+y-coordinate (float)
+</dd><dt><i>isRbModule</i></dt>
+<dd>
+flag indicating a Ruby module (boolean)
+</dd>
+</dl><a NAME="PackageDiagramBuilder.__arrangeClasses" ID="PackageDiagramBuilder.__arrangeClasses"></a>
+<h4>PackageDiagramBuilder.__arrangeClasses</h4>
+<b>__arrangeClasses</b>(<i>nodes, routes, whiteSpaceFactor=1.2</i>)
+<p>
+        Private method to arrange the shapes on the canvas.
+</p><p>
+        The algorithm is borrowed from Boa Constructor.
+</p><a NAME="PackageDiagramBuilder.__buildModulesDict" ID="PackageDiagramBuilder.__buildModulesDict"></a>
+<h4>PackageDiagramBuilder.__buildModulesDict</h4>
+<b>__buildModulesDict</b>(<i></i>)
+<p>
+        Private method to build a dictionary of modules contained in the package.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+dictionary of modules contained in the package.
+</dd>
+</dl><a NAME="PackageDiagramBuilder.__createAssociations" ID="PackageDiagramBuilder.__createAssociations"></a>
+<h4>PackageDiagramBuilder.__createAssociations</h4>
+<b>__createAssociations</b>(<i>routes</i>)
+<p>
+        Private method to generate the associations between the class shapes.
+</p><dl>
+<dt><i>routes</i></dt>
+<dd>
+list of relationsships
+</dd>
+</dl><a NAME="PackageDiagramBuilder.__getCurrentShape" ID="PackageDiagramBuilder.__getCurrentShape"></a>
+<h4>PackageDiagramBuilder.__getCurrentShape</h4>
+<b>__getCurrentShape</b>(<i>name</i>)
+<p>
+        Private method to get the named shape.
+</p><dl>
+<dt><i>name</i></dt>
+<dd>
+name of the shape (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+shape (QCanvasItem)
+</dd>
+</dl><a NAME="PackageDiagramBuilder.buildDiagram" ID="PackageDiagramBuilder.buildDiagram"></a>
+<h4>PackageDiagramBuilder.buildDiagram</h4>
+<b>buildDiagram</b>(<i></i>)
+<p>
+        Public method to build the class shapes of the package diagram.
+</p><p>
+        The algorithm is borrowed from Boa Constructor.
+</p>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file
--- a/Documentation/Source/eric5.Graphics.PackageItem.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/eric5.Graphics.PackageItem.html	Sun Sep 09 17:40:32 2012 +0200
@@ -70,9 +70,15 @@
 <td><a href="#PackageItem.__createTexts">__createTexts</a></td>
 <td>Private method to create the text items of the class item.</td>
 </tr><tr>
+<td><a href="#PackageItem.buildItemDataString">buildItemDataString</a></td>
+<td>Public method to build a string to persist the specific item data.</td>
+</tr><tr>
 <td><a href="#PackageItem.paint">paint</a></td>
 <td>Public method to paint the item in local coordinates.</td>
 </tr><tr>
+<td><a href="#PackageItem.parseItemDataString">parseItemDataString</a></td>
+<td>Public method to parse the given persistence data.</td>
+</tr><tr>
 <td><a href="#PackageItem.setModel">setModel</a></td>
 <td>Method to set the package model.</td>
 </tr>
@@ -120,7 +126,21 @@
 <b>__createTexts</b>(<i></i>)
 <p>
         Private method to create the text items of the class item.
-</p><a NAME="PackageItem.paint" ID="PackageItem.paint"></a>
+</p><a NAME="PackageItem.buildItemDataString" ID="PackageItem.buildItemDataString"></a>
+<h4>PackageItem.buildItemDataString</h4>
+<b>buildItemDataString</b>(<i></i>)
+<p>
+        Public method to build a string to persist the specific item data.
+</p><p>
+        This string must start with ", " and should be built like
+        "attribute=value" with pairs separated by ", ". value must not contain ", "
+        or newlines.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+persistence data (string)
+</dd>
+</dl><a NAME="PackageItem.paint" ID="PackageItem.paint"></a>
 <h4>PackageItem.paint</h4>
 <b>paint</b>(<i>painter, option, widget=None</i>)
 <p>
@@ -136,6 +156,16 @@
 <dd>
 optional reference to the widget painted on (QWidget)
 </dd>
+</dl><a NAME="PackageItem.parseItemDataString" ID="PackageItem.parseItemDataString"></a>
+<h4>PackageItem.parseItemDataString</h4>
+<b>parseItemDataString</b>(<i>data</i>)
+<p>
+        Public method to parse the given persistence data.
+</p><dl>
+<dt><i>data</i></dt>
+<dd>
+persisted data to be parsed (string)
+</dd>
 </dl><a NAME="PackageItem.setModel" ID="PackageItem.setModel"></a>
 <h4>PackageItem.setModel</h4>
 <b>setModel</b>(<i>model</i>)
--- a/Documentation/Source/eric5.Graphics.UMLClassDiagram.html	Sun Sep 09 14:46:59 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html><head>
-<title>eric5.Graphics.UMLClassDiagram</title>
-<style>
-body {
-    background: #EDECE6;
-    margin: 0em 1em 10em 1em;
-    color: black;
-}
-
-h1 { color: white; background: #85774A; }
-h2 { color: white; background: #85774A; }
-h3 { color: white; background: #9D936E; }
-h4 { color: white; background: #9D936E; }
-    
-a { color: #BA6D36; }
-
-</style>
-</head>
-<body><a NAME="top" ID="top"></a>
-<h1>eric5.Graphics.UMLClassDiagram</h1>
-<p>
-Module implementing a dialog showing a UML like class diagram.
-</p>
-<h3>Global Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Classes</h3>
-<table>
-<tr>
-<td><a href="#UMLClassDiagram">UMLClassDiagram</a></td>
-<td>Class implementing a dialog showing a UML like class diagram.</td>
-</tr>
-</table>
-<h3>Functions</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<hr /><hr />
-<a NAME="UMLClassDiagram" ID="UMLClassDiagram"></a>
-<h2>UMLClassDiagram</h2>
-<p>
-    Class implementing a dialog showing a UML like class diagram.
-</p>
-<h3>Derived from</h3>
-UMLDialog
-<h3>Class Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Class Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Methods</h3>
-<table>
-<tr>
-<td><a href="#UMLClassDiagram.__init__">UMLClassDiagram</a></td>
-<td>Constructor</td>
-</tr><tr>
-<td><a href="#UMLClassDiagram.__addExternalClass">__addExternalClass</a></td>
-<td>Private method to add a class defined outside the module.</td>
-</tr><tr>
-<td><a href="#UMLClassDiagram.__addLocalClass">__addLocalClass</a></td>
-<td>Private method to add a class defined in the module.</td>
-</tr><tr>
-<td><a href="#UMLClassDiagram.__arrangeClasses">__arrangeClasses</a></td>
-<td>Private method to arrange the shapes on the canvas.</td>
-</tr><tr>
-<td><a href="#UMLClassDiagram.__buildClasses">__buildClasses</a></td>
-<td>Private method to build the class shapes of the class diagram.</td>
-</tr><tr>
-<td><a href="#UMLClassDiagram.__createAssociations">__createAssociations</a></td>
-<td>Private method to generate the associations between the class shapes.</td>
-</tr><tr>
-<td><a href="#UMLClassDiagram.__getCurrentShape">__getCurrentShape</a></td>
-<td>Private method to get the named shape.</td>
-</tr><tr>
-<td><a href="#UMLClassDiagram.relayout">relayout</a></td>
-<td>Public method to relayout the diagram.</td>
-</tr>
-</table>
-<h3>Static Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<a NAME="UMLClassDiagram.__init__" ID="UMLClassDiagram.__init__"></a>
-<h4>UMLClassDiagram (Constructor)</h4>
-<b>UMLClassDiagram</b>(<i>project, file, parent=None, name=None, noAttrs=False</i>)
-<p>
-        Constructor
-</p><dl>
-<dt><i>project</i></dt>
-<dd>
-reference to the project object
-</dd><dt><i>file</i></dt>
-<dd>
-filename of a python module to be shown (string)
-</dd><dt><i>parent</i></dt>
-<dd>
-parent widget of the view (QWidget)
-</dd><dt><i>name</i></dt>
-<dd>
-name of the view widget (string)
-</dd><dt><i>noAttrs=</i></dt>
-<dd>
-flag indicating, that no attributes should be shown (boolean)
-</dd>
-</dl><a NAME="UMLClassDiagram.__addExternalClass" ID="UMLClassDiagram.__addExternalClass"></a>
-<h4>UMLClassDiagram.__addExternalClass</h4>
-<b>__addExternalClass</b>(<i>_class, x, y</i>)
-<p>
-        Private method to add a class defined outside the module.
-</p><p>
-        If the canvas is too small to take the shape, it
-        is enlarged.
-</p><dl>
-<dt><i>_class</i></dt>
-<dd>
-class to be shown (string)
-</dd><dt><i>x</i></dt>
-<dd>
-x-coordinate (float)
-</dd><dt><i>y</i></dt>
-<dd>
-y-coordinate (float)
-</dd>
-</dl><a NAME="UMLClassDiagram.__addLocalClass" ID="UMLClassDiagram.__addLocalClass"></a>
-<h4>UMLClassDiagram.__addLocalClass</h4>
-<b>__addLocalClass</b>(<i>className, _class, x, y, isRbModule=False</i>)
-<p>
-        Private method to add a class defined in the module.
-</p><dl>
-<dt><i>className</i></dt>
-<dd>
-name of the class to be as a dictionary key (string)
-</dd><dt><i>_class</i></dt>
-<dd>
-class to be shown (ModuleParser.Class)
-</dd><dt><i>x</i></dt>
-<dd>
-x-coordinate (float)
-</dd><dt><i>y</i></dt>
-<dd>
-y-coordinate (float)
-</dd><dt><i>isRbModule</i></dt>
-<dd>
-flag indicating a Ruby module (boolean)
-</dd>
-</dl><a NAME="UMLClassDiagram.__arrangeClasses" ID="UMLClassDiagram.__arrangeClasses"></a>
-<h4>UMLClassDiagram.__arrangeClasses</h4>
-<b>__arrangeClasses</b>(<i>nodes, routes, whiteSpaceFactor=1.2</i>)
-<p>
-        Private method to arrange the shapes on the canvas.
-</p><p>
-        The algorithm is borrowed from Boa Constructor.
-</p><a NAME="UMLClassDiagram.__buildClasses" ID="UMLClassDiagram.__buildClasses"></a>
-<h4>UMLClassDiagram.__buildClasses</h4>
-<b>__buildClasses</b>(<i></i>)
-<p>
-        Private method to build the class shapes of the class diagram.
-</p><p>
-        The algorithm is borrowed from Boa Constructor.
-</p><a NAME="UMLClassDiagram.__createAssociations" ID="UMLClassDiagram.__createAssociations"></a>
-<h4>UMLClassDiagram.__createAssociations</h4>
-<b>__createAssociations</b>(<i>routes</i>)
-<p>
-        Private method to generate the associations between the class shapes.
-</p><dl>
-<dt><i>routes</i></dt>
-<dd>
-list of relationsships
-</dd>
-</dl><a NAME="UMLClassDiagram.__getCurrentShape" ID="UMLClassDiagram.__getCurrentShape"></a>
-<h4>UMLClassDiagram.__getCurrentShape</h4>
-<b>__getCurrentShape</b>(<i>name</i>)
-<p>
-        Private method to get the named shape.
-</p><dl>
-<dt><i>name</i></dt>
-<dd>
-name of the shape (string)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-shape (QGraphicsItem)
-</dd>
-</dl><a NAME="UMLClassDiagram.relayout" ID="UMLClassDiagram.relayout"></a>
-<h4>UMLClassDiagram.relayout</h4>
-<b>relayout</b>(<i></i>)
-<p>
-        Public method to relayout the diagram.
-</p>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-</body></html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric5.Graphics.UMLClassDiagramBuilder.html	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
+'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html><head>
+<title>eric5.Graphics.UMLClassDiagramBuilder</title>
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric5.Graphics.UMLClassDiagramBuilder</h1>
+<p>
+Module implementing a dialog showing a UML like class diagram.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#UMLClassDiagramBuilder">UMLClassDiagramBuilder</a></td>
+<td>Class implementing a builder for UML like class diagrams.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr /><hr />
+<a NAME="UMLClassDiagramBuilder" ID="UMLClassDiagramBuilder"></a>
+<h2>UMLClassDiagramBuilder</h2>
+<p>
+    Class implementing a builder for UML like class diagrams.
+</p>
+<h3>Derived from</h3>
+UMLDiagramBuilder
+<h3>Class Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#UMLClassDiagramBuilder.__init__">UMLClassDiagramBuilder</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#UMLClassDiagramBuilder.__addExternalClass">__addExternalClass</a></td>
+<td>Private method to add a class defined outside the module.</td>
+</tr><tr>
+<td><a href="#UMLClassDiagramBuilder.__addLocalClass">__addLocalClass</a></td>
+<td>Private method to add a class defined in the module.</td>
+</tr><tr>
+<td><a href="#UMLClassDiagramBuilder.__arrangeClasses">__arrangeClasses</a></td>
+<td>Private method to arrange the shapes on the canvas.</td>
+</tr><tr>
+<td><a href="#UMLClassDiagramBuilder.__createAssociations">__createAssociations</a></td>
+<td>Private method to generate the associations between the class shapes.</td>
+</tr><tr>
+<td><a href="#UMLClassDiagramBuilder.__getCurrentShape">__getCurrentShape</a></td>
+<td>Private method to get the named shape.</td>
+</tr><tr>
+<td><a href="#UMLClassDiagramBuilder.buildDiagram">buildDiagram</a></td>
+<td>Public method to build the class shapes of the class diagram.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="UMLClassDiagramBuilder.__init__" ID="UMLClassDiagramBuilder.__init__"></a>
+<h4>UMLClassDiagramBuilder (Constructor)</h4>
+<b>UMLClassDiagramBuilder</b>(<i>dialog, view, project, file, noAttrs=False</i>)
+<p>
+        Constructor
+</p><dl>
+<dt><i>dialog</i></dt>
+<dd>
+reference to the UML dialog (UMLDialog)
+</dd><dt><i>view</i></dt>
+<dd>
+reference to the view object (UMLGraphicsView)
+</dd><dt><i>project</i></dt>
+<dd>
+reference to the project object (Project)
+</dd><dt><i>file</i></dt>
+<dd>
+file name of a python module to be shown (string)
+</dd><dt><i>noAttrs=</i></dt>
+<dd>
+flag indicating, that no attributes should be shown (boolean)
+</dd>
+</dl><a NAME="UMLClassDiagramBuilder.__addExternalClass" ID="UMLClassDiagramBuilder.__addExternalClass"></a>
+<h4>UMLClassDiagramBuilder.__addExternalClass</h4>
+<b>__addExternalClass</b>(<i>_class, x, y</i>)
+<p>
+        Private method to add a class defined outside the module.
+</p><p>
+        If the canvas is too small to take the shape, it
+        is enlarged.
+</p><dl>
+<dt><i>_class</i></dt>
+<dd>
+class to be shown (string)
+</dd><dt><i>x</i></dt>
+<dd>
+x-coordinate (float)
+</dd><dt><i>y</i></dt>
+<dd>
+y-coordinate (float)
+</dd>
+</dl><a NAME="UMLClassDiagramBuilder.__addLocalClass" ID="UMLClassDiagramBuilder.__addLocalClass"></a>
+<h4>UMLClassDiagramBuilder.__addLocalClass</h4>
+<b>__addLocalClass</b>(<i>className, _class, x, y, isRbModule=False</i>)
+<p>
+        Private method to add a class defined in the module.
+</p><dl>
+<dt><i>className</i></dt>
+<dd>
+name of the class to be as a dictionary key (string)
+</dd><dt><i>_class</i></dt>
+<dd>
+class to be shown (ModuleParser.Class)
+</dd><dt><i>x</i></dt>
+<dd>
+x-coordinate (float)
+</dd><dt><i>y</i></dt>
+<dd>
+y-coordinate (float)
+</dd><dt><i>isRbModule</i></dt>
+<dd>
+flag indicating a Ruby module (boolean)
+</dd>
+</dl><a NAME="UMLClassDiagramBuilder.__arrangeClasses" ID="UMLClassDiagramBuilder.__arrangeClasses"></a>
+<h4>UMLClassDiagramBuilder.__arrangeClasses</h4>
+<b>__arrangeClasses</b>(<i>nodes, routes, whiteSpaceFactor=1.2</i>)
+<p>
+        Private method to arrange the shapes on the canvas.
+</p><p>
+        The algorithm is borrowed from Boa Constructor.
+</p><a NAME="UMLClassDiagramBuilder.__createAssociations" ID="UMLClassDiagramBuilder.__createAssociations"></a>
+<h4>UMLClassDiagramBuilder.__createAssociations</h4>
+<b>__createAssociations</b>(<i>routes</i>)
+<p>
+        Private method to generate the associations between the class shapes.
+</p><dl>
+<dt><i>routes</i></dt>
+<dd>
+list of relationsships
+</dd>
+</dl><a NAME="UMLClassDiagramBuilder.__getCurrentShape" ID="UMLClassDiagramBuilder.__getCurrentShape"></a>
+<h4>UMLClassDiagramBuilder.__getCurrentShape</h4>
+<b>__getCurrentShape</b>(<i>name</i>)
+<p>
+        Private method to get the named shape.
+</p><dl>
+<dt><i>name</i></dt>
+<dd>
+name of the shape (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+shape (QGraphicsItem)
+</dd>
+</dl><a NAME="UMLClassDiagramBuilder.buildDiagram" ID="UMLClassDiagramBuilder.buildDiagram"></a>
+<h4>UMLClassDiagramBuilder.buildDiagram</h4>
+<b>buildDiagram</b>(<i></i>)
+<p>
+        Public method to build the class shapes of the class diagram.
+</p><p>
+        The algorithm is borrowed from Boa Constructor.
+</p>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric5.Graphics.UMLDiagramBuilder.html	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
+'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html><head>
+<title>eric5.Graphics.UMLDiagramBuilder</title>
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric5.Graphics.UMLDiagramBuilder</h1>
+<p>
+Module implementing the UML diagram builder base class.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#UMLDiagramBuilder">UMLDiagramBuilder</a></td>
+<td>Class implementing the UML diagram builder base class.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr /><hr />
+<a NAME="UMLDiagramBuilder" ID="UMLDiagramBuilder"></a>
+<h2>UMLDiagramBuilder</h2>
+<p>
+    Class implementing the UML diagram builder base class.
+</p>
+<h3>Derived from</h3>
+QObject
+<h3>Class Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#UMLDiagramBuilder.__init__">UMLDiagramBuilder</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#UMLDiagramBuilder.buildDiagram">buildDiagram</a></td>
+<td>Public method to build the diagram.</td>
+</tr><tr>
+<td><a href="#UMLDiagramBuilder.parsePersistenceData">parsePersistenceData</a></td>
+<td>Public method to parse persisted data.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="UMLDiagramBuilder.__init__" ID="UMLDiagramBuilder.__init__"></a>
+<h4>UMLDiagramBuilder (Constructor)</h4>
+<b>UMLDiagramBuilder</b>(<i>dialog, view, project</i>)
+<p>
+        Constructor
+</p><dl>
+<dt><i>dialog</i></dt>
+<dd>
+reference to the UML dialog (UMLDialog)
+</dd><dt><i>view</i></dt>
+<dd>
+reference to the view object (UMLGraphicsView)
+</dd><dt><i>project</i></dt>
+<dd>
+reference to the project object (Project)
+</dd>
+</dl><a NAME="UMLDiagramBuilder.buildDiagram" ID="UMLDiagramBuilder.buildDiagram"></a>
+<h4>UMLDiagramBuilder.buildDiagram</h4>
+<b>buildDiagram</b>(<i></i>)
+<p>
+        Public method to build the diagram.
+</p><p>
+        This class must be implemented in subclasses.
+</p><a NAME="UMLDiagramBuilder.parsePersistenceData" ID="UMLDiagramBuilder.parsePersistenceData"></a>
+<h4>UMLDiagramBuilder.parsePersistenceData</h4>
+<b>parsePersistenceData</b>(<i>data</i>)
+<p>
+        Public method to parse persisted data.
+</p><dl>
+<dt><i>dat</i></dt>
+<dd>
+persisted data to be parsed (string)
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file
--- a/Documentation/Source/eric5.Graphics.UMLDialog.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/eric5.Graphics.UMLDialog.html	Sun Sep 09 17:40:32 2012 +0200
@@ -49,7 +49,7 @@
 QMainWindow
 <h3>Class Attributes</h3>
 <table>
-<tr><td>None</td></tr>
+<tr><td>ApplicationDiagram</td></tr><tr><td>ClassDiagram</td></tr><tr><td>ImportsDiagram</td></tr><tr><td>PackageDiagram</td></tr>
 </table>
 <h3>Class Methods</h3>
 <table>
@@ -61,8 +61,14 @@
 <td><a href="#UMLDialog.__init__">UMLDialog</a></td>
 <td>Constructor</td>
 </tr><tr>
-<td><a href="#UMLDialog.setDiagramName">setDiagramName</a></td>
-<td>Public slot to set the diagram name.</td>
+<td><a href="#UMLDialog.__diagramBuilder">__diagramBuilder</a></td>
+<td>Private method to instantiate a diagram builder object.</td>
+</tr><tr>
+<td><a href="#UMLDialog.__relayout">__relayout</a></td>
+<td>Private method to relayout the diagram.</td>
+</tr><tr>
+<td><a href="#UMLDialog.diagramTypeToString">diagramTypeToString</a></td>
+<td>Public method to convert the diagram type to a readable string.</td>
 </tr><tr>
 <td><a href="#UMLDialog.show">show</a></td>
 <td>Overriden method to show the dialog.</td>
@@ -74,32 +80,67 @@
 </table>
 <a NAME="UMLDialog.__init__" ID="UMLDialog.__init__"></a>
 <h4>UMLDialog (Constructor)</h4>
-<b>UMLDialog</b>(<i>buildFunction=None, diagramName="Unnamed", parent=None, name=None</i>)
+<b>UMLDialog</b>(<i>diagramType, project, path, parent=None, **kwargs</i>)
 <p>
         Constructor
 </p><dl>
-<dt><i>buildFunction</i></dt>
+<dt><i>diagramType</i></dt>
 <dd>
-function to build the diagram contents (function)
-</dd><dt><i>diagramName</i></dt>
+type of the diagram
+            (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram)
+</dd><dt><i>project</i></dt>
 <dd>
-name of the diagram (string)
+reference to the project object (Project)
+</dd><dt><i>path</i></dt>
+<dd>
+file or directory path to build the diagram from (string)
 </dd><dt><i>parent</i></dt>
 <dd>
 parent widget of the view (QWidget)
-</dd><dt><i>name</i></dt>
+</dd><dt><i>kwargs</i></dt>
 <dd>
-name of the view widget (string)
+diagram specific data
 </dd>
-</dl><a NAME="UMLDialog.setDiagramName" ID="UMLDialog.setDiagramName"></a>
-<h4>UMLDialog.setDiagramName</h4>
-<b>setDiagramName</b>(<i>name</i>)
+</dl><a NAME="UMLDialog.__diagramBuilder" ID="UMLDialog.__diagramBuilder"></a>
+<h4>UMLDialog.__diagramBuilder</h4>
+<b>__diagramBuilder</b>(<i>diagramType, project, path, **kwargs</i>)
 <p>
-        Public slot to set the diagram name.
+        Private method to instantiate a diagram builder object.
 </p><dl>
-<dt><i>name</i></dt>
+<dt><i>diagramType</i></dt>
+<dd>
+type of the diagram
+            (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram)
+</dd><dt><i>project</i></dt>
+<dd>
+reference to the project object (Project)
+</dd><dt><i>path</i></dt>
+<dd>
+file or directory path to build the diagram from (string)
+</dd><dt><i>kwargs</i></dt>
 <dd>
-diagram name (string)
+diagram specific data
+</dd>
+</dl><a NAME="UMLDialog.__relayout" ID="UMLDialog.__relayout"></a>
+<h4>UMLDialog.__relayout</h4>
+<b>__relayout</b>(<i></i>)
+<p>
+        Private method to relayout the diagram.
+</p><a NAME="UMLDialog.diagramTypeToString" ID="UMLDialog.diagramTypeToString"></a>
+<h4>UMLDialog.diagramTypeToString</h4>
+<b>diagramTypeToString</b>(<i>diagramType</i>)
+<p>
+        Public method to convert the diagram type to a readable string.
+</p><dl>
+<dt><i>diagramType</i></dt>
+<dd>
+type of the diagram
+            (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+readable type string (string)
 </dd>
 </dl><a NAME="UMLDialog.show" ID="UMLDialog.show"></a>
 <h4>UMLDialog.show</h4>
--- a/Documentation/Source/eric5.Graphics.UMLGraphicsView.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/eric5.Graphics.UMLGraphicsView.html	Sun Sep 09 17:40:32 2012 +0200
@@ -101,6 +101,12 @@
 <td><a href="#UMLGraphicsView.__relayout">__relayout</a></td>
 <td>Private method to handle the re-layout context menu entry.</td>
 </tr><tr>
+<td><a href="#UMLGraphicsView.__save">__save</a></td>
+<td>Private slot to save the diagram with the current name.</td>
+</tr><tr>
+<td><a href="#UMLGraphicsView.__saveAs">__saveAs</a></td>
+<td>Private slot to save the diagram.</td>
+</tr><tr>
 <td><a href="#UMLGraphicsView.__saveImage">__saveImage</a></td>
 <td>Private method to handle the save context menu entry.</td>
 </tr><tr>
@@ -122,9 +128,18 @@
 <td><a href="#UMLGraphicsView.filteredItems">filteredItems</a></td>
 <td>Public method to filter a list of items.</td>
 </tr><tr>
+<td><a href="#UMLGraphicsView.findItem">findItem</a></td>
+<td>Public method to find an UML item based on the ID.</td>
+</tr><tr>
 <td><a href="#UMLGraphicsView.gestureEvent">gestureEvent</a></td>
 <td>Protected method handling gesture events.</td>
 </tr><tr>
+<td><a href="#UMLGraphicsView.getItemId">getItemId</a></td>
+<td>Public method to get the ID to be assigned to an item.</td>
+</tr><tr>
+<td><a href="#UMLGraphicsView.getPersistenceData">getPersistenceData</a></td>
+<td>Public method to get the additional persistence data.</td>
+</tr><tr>
 <td><a href="#UMLGraphicsView.initToolBar">initToolBar</a></td>
 <td>Public method to populate a toolbar with our actions.</td>
 </tr><tr>
@@ -137,6 +152,9 @@
 <td><a href="#UMLGraphicsView.setDiagramName">setDiagramName</a></td>
 <td>Public slot to set the diagram name.</td>
 </tr><tr>
+<td><a href="#UMLGraphicsView.setPersistenceData">setPersistenceData</a></td>
+<td>Public method to set additional persistence data.</td>
+</tr><tr>
 <td><a href="#UMLGraphicsView.wheelEvent">wheelEvent</a></td>
 <td>Protected method to handle wheel events.</td>
 </tr>
@@ -147,22 +165,19 @@
 </table>
 <a NAME="UMLGraphicsView.__init__" ID="UMLGraphicsView.__init__"></a>
 <h4>UMLGraphicsView (Constructor)</h4>
-<b>UMLGraphicsView</b>(<i>scene, diagramName="Unnamed", parent=None, name=None</i>)
+<b>UMLGraphicsView</b>(<i>scene, diagramType, parent=None</i>)
 <p>
         Constructor
 </p><dl>
 <dt><i>scene</i></dt>
 <dd>
 reference to the scene object (QGraphicsScene)
-</dd><dt><i>diagramName</i></dt>
+</dd><dt><i>diagramType</i></dt>
 <dd>
-name of the diagram (string)
+type of the diagram (string)
 </dd><dt><i>parent</i></dt>
 <dd>
 parent widget of the view (QWidget)
-</dd><dt><i>name</i></dt>
-<dd>
-name of the view widget (string)
 </dd>
 </dl><a NAME="UMLGraphicsView.__alignShapes" ID="UMLGraphicsView.__alignShapes"></a>
 <h4>UMLGraphicsView.__alignShapes</h4>
@@ -224,7 +239,22 @@
 <b>__relayout</b>(<i></i>)
 <p>
         Private method to handle the re-layout context menu entry.
-</p><a NAME="UMLGraphicsView.__saveImage" ID="UMLGraphicsView.__saveImage"></a>
+</p><a NAME="UMLGraphicsView.__save" ID="UMLGraphicsView.__save"></a>
+<h4>UMLGraphicsView.__save</h4>
+<b>__save</b>(<i></i>)
+<p>
+        Private slot to save the diagram with the current name.
+</p><a NAME="UMLGraphicsView.__saveAs" ID="UMLGraphicsView.__saveAs"></a>
+<h4>UMLGraphicsView.__saveAs</h4>
+<b>__saveAs</b>(<i>filename=""</i>)
+<p>
+        Private slot to save the diagram.
+</p><dl>
+<dt><i>filename</i></dt>
+<dd>
+name of the file to write to (string)
+</dd>
+</dl><a NAME="UMLGraphicsView.__saveImage" ID="UMLGraphicsView.__saveImage"></a>
 <h4>UMLGraphicsView.__saveImage</h4>
 <b>__saveImage</b>(<i></i>)
 <p>
@@ -277,7 +307,7 @@
 </dd>
 </dl><a NAME="UMLGraphicsView.filteredItems" ID="UMLGraphicsView.filteredItems"></a>
 <h4>UMLGraphicsView.filteredItems</h4>
-<b>filteredItems</b>(<i>items</i>)
+<b>filteredItems</b>(<i>items, itemType=UMLItem</i>)
 <p>
         Public method to filter a list of items.
 </p><dl>
@@ -285,12 +315,30 @@
 <dd>
 list of items as returned by the scene object
             (QGraphicsItem)
+</dd><dt><i>itemType</i></dt>
+<dd>
+type to be filtered (class)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
 list of interesting collision items (QGraphicsItem)
 </dd>
+</dl><a NAME="UMLGraphicsView.findItem" ID="UMLGraphicsView.findItem"></a>
+<h4>UMLGraphicsView.findItem</h4>
+<b>findItem</b>(<i>id</i>)
+<p>
+        Public method to find an UML item based on the ID.
+</p><dl>
+<dt><i>id</i></dt>
+<dd>
+of the item to search for (integer)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+item found (UMLItem) or None
+</dd>
 </dl><a NAME="UMLGraphicsView.gestureEvent" ID="UMLGraphicsView.gestureEvent"></a>
 <h4>UMLGraphicsView.gestureEvent</h4>
 <b>gestureEvent</b>(<i>evt</i>)
@@ -301,6 +349,26 @@
 <dd>
 reference to the gesture event (QGestureEvent
 </dd>
+</dl><a NAME="UMLGraphicsView.getItemId" ID="UMLGraphicsView.getItemId"></a>
+<h4>UMLGraphicsView.getItemId</h4>
+<b>getItemId</b>(<i></i>)
+<p>
+        Public method to get the ID to be assigned to an item.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+item ID (integer)
+</dd>
+</dl><a NAME="UMLGraphicsView.getPersistenceData" ID="UMLGraphicsView.getPersistenceData"></a>
+<h4>UMLGraphicsView.getPersistenceData</h4>
+<b>getPersistenceData</b>(<i></i>)
+<p>
+        Public method to get the additional persistence data.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+additional persistence data (string)
+</dd>
 </dl><a NAME="UMLGraphicsView.initToolBar" ID="UMLGraphicsView.initToolBar"></a>
 <h4>UMLGraphicsView.initToolBar</h4>
 <b>initToolBar</b>(<i></i>)
@@ -341,6 +409,16 @@
 <dd>
 diagram name (string)
 </dd>
+</dl><a NAME="UMLGraphicsView.setPersistenceData" ID="UMLGraphicsView.setPersistenceData"></a>
+<h4>UMLGraphicsView.setPersistenceData</h4>
+<b>setPersistenceData</b>(<i>data</i>)
+<p>
+        Public method to set additional persistence data.
+</p><dl>
+<dt><i>data</i></dt>
+<dd>
+string of additional data to be made persistent (string)
+</dd>
 </dl><a NAME="UMLGraphicsView.wheelEvent" ID="UMLGraphicsView.wheelEvent"></a>
 <h4>UMLGraphicsView.wheelEvent</h4>
 <b>wheelEvent</b>(<i>evt</i>)
--- a/Documentation/Source/eric5.Graphics.UMLItem.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/eric5.Graphics.UMLItem.html	Sun Sep 09 17:40:32 2012 +0200
@@ -67,6 +67,12 @@
 <td><a href="#UMLItem.adjustAssociations">adjustAssociations</a></td>
 <td>Method to adjust the associations to widget movements.</td>
 </tr><tr>
+<td><a href="#UMLItem.buildItemDataString">buildItemDataString</a></td>
+<td>Public method to build a string to persist the specific item data.</td>
+</tr><tr>
+<td><a href="#UMLItem.getId">getId</a></td>
+<td>Public method to get the item ID.</td>
+</tr><tr>
 <td><a href="#UMLItem.itemChange">itemChange</a></td>
 <td>Protected method called when an items state changes.</td>
 </tr><tr>
@@ -76,12 +82,18 @@
 <td><a href="#UMLItem.paint">paint</a></td>
 <td>Public method to paint the item in local coordinates.</td>
 </tr><tr>
+<td><a href="#UMLItem.parseItemDataString">parseItemDataString</a></td>
+<td>Public method to parse the given persistence data.</td>
+</tr><tr>
 <td><a href="#UMLItem.removeAssociation">removeAssociation</a></td>
 <td>Method to remove an association to this widget.</td>
 </tr><tr>
 <td><a href="#UMLItem.removeAssociations">removeAssociations</a></td>
 <td>Method to remove all associations of this widget.</td>
 </tr><tr>
+<td><a href="#UMLItem.setId">setId</a></td>
+<td>Public method to assign an ID to the item.</td>
+</tr><tr>
 <td><a href="#UMLItem.setPos">setPos</a></td>
 <td>Overriden method to set the items position.</td>
 </tr><tr>
@@ -127,7 +139,31 @@
 <b>adjustAssociations</b>(<i></i>)
 <p>
         Method to adjust the associations to widget movements.
-</p><a NAME="UMLItem.itemChange" ID="UMLItem.itemChange"></a>
+</p><a NAME="UMLItem.buildItemDataString" ID="UMLItem.buildItemDataString"></a>
+<h4>UMLItem.buildItemDataString</h4>
+<b>buildItemDataString</b>(<i></i>)
+<p>
+        Public method to build a string to persist the specific item data.
+</p><p>
+        This string must start with ", " and should be built like
+        "attribute=value" with pairs separated by ", ". value must not contain ", "
+        or newlines.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+persistence data (string)
+</dd>
+</dl><a NAME="UMLItem.getId" ID="UMLItem.getId"></a>
+<h4>UMLItem.getId</h4>
+<b>getId</b>(<i></i>)
+<p>
+        Public method to get the item ID.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+ID of the item (integer)
+</dd>
+</dl><a NAME="UMLItem.itemChange" ID="UMLItem.itemChange"></a>
 <h4>UMLItem.itemChange</h4>
 <b>itemChange</b>(<i>change, value</i>)
 <p>
@@ -174,6 +210,16 @@
 <dd>
 optional reference to the widget painted on (QWidget)
 </dd>
+</dl><a NAME="UMLItem.parseItemDataString" ID="UMLItem.parseItemDataString"></a>
+<h4>UMLItem.parseItemDataString</h4>
+<b>parseItemDataString</b>(<i>data</i>)
+<p>
+        Public method to parse the given persistence data.
+</p><dl>
+<dt><i>data</i></dt>
+<dd>
+persisted data to be parsed (string)
+</dd>
 </dl><a NAME="UMLItem.removeAssociation" ID="UMLItem.removeAssociation"></a>
 <h4>UMLItem.removeAssociation</h4>
 <b>removeAssociation</b>(<i>assoc</i>)
@@ -189,7 +235,17 @@
 <b>removeAssociations</b>(<i></i>)
 <p>
         Method to remove all associations of this widget.
-</p><a NAME="UMLItem.setPos" ID="UMLItem.setPos"></a>
+</p><a NAME="UMLItem.setId" ID="UMLItem.setId"></a>
+<h4>UMLItem.setId</h4>
+<b>setId</b>(<i>id</i>)
+<p>
+        Public method to assign an ID to the item.
+</p><dl>
+<dt><i>id</i></dt>
+<dd>
+assigned ID (integer)
+</dd>
+</dl><a NAME="UMLItem.setPos" ID="UMLItem.setPos"></a>
 <h4>UMLItem.setPos</h4>
 <b>setPos</b>(<i>x, y</i>)
 <p>
--- a/Documentation/Source/eric5.Utilities.__init__.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/eric5.Utilities.__init__.html	Sun Sep 09 17:40:32 2012 +0200
@@ -224,6 +224,9 @@
 <td><a href="#splitPath">splitPath</a></td>
 <td>Function to split a pathname into a directory part and a file part.</td>
 </tr><tr>
+<td><a href="#toBool">toBool</a></td>
+<td>Module function to convert a string to a boolean value.</td>
+</tr><tr>
 <td><a href="#toNativeSeparators">toNativeSeparators</a></td>
 <td>Function returning a path, that is using native separator characters.</td>
 </tr><tr>
@@ -1483,6 +1486,24 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
+<a NAME="toBool" ID="toBool"></a>
+<h2>toBool</h2>
+<b>toBool</b>(<i>dataStr</i>)
+<p>
+    Module function to convert a string to a boolean value.
+</p><dl>
+<dt><i>dataStr</i></dt>
+<dd>
+string to be converted (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+converted boolean value (boolean)
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr /><hr />
 <a NAME="toNativeSeparators" ID="toNativeSeparators"></a>
 <h2>toNativeSeparators</h2>
 <b>toNativeSeparators</b>(<i>path</i>)
--- a/Documentation/Source/index-eric5.Graphics.html	Sun Sep 09 14:46:59 2012 +0200
+++ b/Documentation/Source/index-eric5.Graphics.html	Sun Sep 09 17:40:32 2012 +0200
@@ -31,7 +31,7 @@
 <h3>Modules</h3>
 <table>
 <tr>
-<td><a href="eric5.Graphics.ApplicationDiagram.html">ApplicationDiagram</a></td>
+<td><a href="eric5.Graphics.ApplicationDiagramBuilder.html">ApplicationDiagramBuilder</a></td>
 <td>Module implementing a dialog showing an imports diagram of the application.</td>
 </tr><tr>
 <td><a href="eric5.Graphics.AssociationItem.html">AssociationItem</a></td>
@@ -43,13 +43,13 @@
 <td><a href="eric5.Graphics.GraphicsUtilities.html">GraphicsUtilities</a></td>
 <td>Module implementing some graphical utility functions.</td>
 </tr><tr>
-<td><a href="eric5.Graphics.ImportsDiagram.html">ImportsDiagram</a></td>
+<td><a href="eric5.Graphics.ImportsDiagramBuilder.html">ImportsDiagramBuilder</a></td>
 <td>Module implementing a dialog showing an imports diagram of a package.</td>
 </tr><tr>
 <td><a href="eric5.Graphics.ModuleItem.html">ModuleItem</a></td>
 <td>Module implementing a module item.</td>
 </tr><tr>
-<td><a href="eric5.Graphics.PackageDiagram.html">PackageDiagram</a></td>
+<td><a href="eric5.Graphics.PackageDiagramBuilder.html">PackageDiagramBuilder</a></td>
 <td>Module implementing a dialog showing a UML like class diagram of a package.</td>
 </tr><tr>
 <td><a href="eric5.Graphics.PackageItem.html">PackageItem</a></td>
@@ -61,9 +61,12 @@
 <td><a href="eric5.Graphics.SvgDiagram.html">SvgDiagram</a></td>
 <td>Module implementing a dialog showing a SVG graphic.</td>
 </tr><tr>
-<td><a href="eric5.Graphics.UMLClassDiagram.html">UMLClassDiagram</a></td>
+<td><a href="eric5.Graphics.UMLClassDiagramBuilder.html">UMLClassDiagramBuilder</a></td>
 <td>Module implementing a dialog showing a UML like class diagram.</td>
 </tr><tr>
+<td><a href="eric5.Graphics.UMLDiagramBuilder.html">UMLDiagramBuilder</a></td>
+<td>Module implementing the UML diagram builder base class.</td>
+</tr><tr>
 <td><a href="eric5.Graphics.UMLDialog.html">UMLDialog</a></td>
 <td>Module implementing a dialog showing UML like diagrams.</td>
 </tr><tr>
--- a/Graphics/ApplicationDiagram.py	Sun Sep 09 14:46:59 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2007 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing a dialog showing an imports diagram of the application.
-"""
-
-import os
-import glob
-
-from PyQt4.QtGui import QApplication, QProgressDialog
-
-from .UMLDialog import UMLDialog
-from .PackageItem import PackageItem, PackageModel
-from .AssociationItem import AssociationItem, Imports
-
-import Utilities.ModuleParser
-import Utilities
-
-import Preferences
-
-
-class ApplicationDiagram(UMLDialog):
-    """
-    Class implementing a dialog showing an imports diagram of the application.
-    """
-    def __init__(self, project, parent=None, name=None,  noModules=False):
-        """
-        Constructor
-        
-        @param project reference to the project object
-        @param parent parent widget of the view (QWidget)
-        @param name name of the view widget (string)
-        @keyparam noModules flag indicating, that no module names should be
-            shown (boolean)
-        """
-        self.project = project
-        self.noModules = noModules
-        
-        UMLDialog.__init__(self, "ApplicationDiagram", buildFunction=self.__buildPackages,
-            parent=parent)
-        self.setDiagramName(
-            self.trUtf8("Application Diagram {0}").format(project.getProjectName()))
-        
-        if not name:
-            self.setObjectName("ApplicationDiagram")
-        else:
-            self.setObjectName(name)
-        
-        self.umlView.setPersistenceData(
-            "project={0}".format(self.project.getProjectFile()))
-        
-        self.umlView.relayout.connect(self.relayout)
-        
-    def __buildModulesDict(self):
-        """
-        Private method to build a dictionary of modules contained in the application.
-        
-        @return dictionary of modules contained in the application.
-        """
-        extensions = Preferences.getPython("PythonExtensions") + \
-            Preferences.getPython("Python3Extensions") + ['.rb']
-        moduleDict = {}
-        mods = self.project.pdata["SOURCES"]
-        modules = []
-        for module in mods:
-            modules.append(Utilities.normabsjoinpath(self.project.ppath, module))
-        tot = len(modules)
-        try:
-            prog = 0
-            progress = QProgressDialog(self.trUtf8("Parsing modules..."),
-                None, 0, tot, self)
-            progress.show()
-            QApplication.processEvents()
-            for module in modules:
-                progress.setValue(prog)
-                QApplication.processEvents()
-                prog += 1
-                if module.endswith("__init__.py"):
-                    continue
-                try:
-                    mod = Utilities.ModuleParser.readModule(module, extensions=extensions)
-                except ImportError:
-                    continue
-                else:
-                    name = mod.name
-                    moduleDict[name] = mod
-        finally:
-            progress.setValue(tot)
-        return moduleDict
-        
-    def __buildPackages(self):
-        """
-        Private method to build the packages shapes of the diagram.
-        """
-        project = os.path.splitdrive(self.project.getProjectPath())[1]\
-            .replace(os.sep, '.')[1:]
-        packages = {}
-        shapes = {}
-        p = 10
-        y = 10
-        maxHeight = 0
-        sceneRect = self.umlView.sceneRect()
-        
-        modules = self.__buildModulesDict()
-        sortedkeys = sorted(modules.keys())
-        
-        # step 1: build a dictionary of packages
-        for module in sortedkeys:
-            l = module.split('.')
-            package = '.'.join(l[:-1])
-            if package in packages:
-                packages[package][0].append(l[-1])
-            else:
-                packages[package] = ([l[-1]], [])
-                
-        # step 2: assign modules to dictionaries and update import relationship
-        for module in sortedkeys:
-            l = module.split('.')
-            package = '.'.join(l[:-1])
-            impLst = []
-            for i in modules[module].imports:
-                if i in modules:
-                    impLst.append(i)
-                else:
-                    if i.find('.') == -1:
-                        n = "{0}.{1}".format(modules[module].package, i)
-                        if n in modules:
-                            impLst.append(n)
-                        else:
-                            n = "{0}.{1}".format(project, i)
-                            if n in modules:
-                                impLst.append(n)
-                            elif n in packages:
-                                n = "{0}.<<Dummy>>".format(n)
-                                impLst.append(n)
-                    else:
-                        n = "{0}.{1}".format(project, i)
-                        if n in modules:
-                            impLst.append(n)
-            for i in list(modules[module].from_imports.keys()):
-                if i.startswith('.'):
-                    dots = len(i) - len(i.lstrip('.'))
-                    if dots == 1:
-                        i = i[1:]
-                    elif dots > 1:
-                        packagePath = os.path.dirname(modules[module].file)
-                        hasInit = True
-                        ppath = packagePath
-                        while hasInit:
-                            ppath = os.path.dirname(ppath)
-                            hasInit = \
-                                len(glob.glob(os.path.join(ppath, '__init__.*'))) > 0
-                        shortPackage = \
-                            packagePath.replace(ppath, '').replace(os.sep, '.')[1:]
-                        packageList = shortPackage.split('.')[1:]
-                        packageListLen = len(packageList)
-                        i = '.'.join(packageList[:packageListLen - dots + 1] + [i[dots:]])
-                
-                if i in modules:
-                    impLst.append(i)
-                else:
-                    if i.find('.') == -1:
-                        n = "{0}.{1}".format(modules[module].package, i)
-                        if n in modules:
-                            impLst.append(n)
-                        else:
-                            n = "{0}.{1}".format(project, i)
-                            if n in modules:
-                                impLst.append(n)
-                            elif n in packages:
-                                n = "{0}.<<Dummy>>".format(n)
-                                impLst.append(n)
-                    else:
-                        n = "{0}.{1}".format(project, i)
-                        if n in modules:
-                            impLst.append(n)
-            for imp in impLst:
-                impPackage = '.'.join(imp.split('.')[:-1])
-                if not impPackage in packages[package][1] and \
-                   not impPackage == package:
-                    packages[package][1].append(impPackage)
-                    
-        sortedkeys = sorted(packages.keys())
-        for package in sortedkeys:
-            if package:
-                relPackage = package.replace(project, '')
-                if relPackage and relPackage[0] == '.':
-                    relPackage = relPackage[1:]
-                else:
-                    relPackage = self.trUtf8("<<Application>>")
-            else:
-                relPackage = self.trUtf8("<<Others>>")
-            shape = self.__addPackage(relPackage, packages[package][0], 0.0, 0.0)
-            shapeRect = shape.sceneBoundingRect()
-            shapes[package] = (shape, packages[package][1])
-            pn = p + shapeRect.width() + 10
-            maxHeight = max(maxHeight, shapeRect.height())
-            if pn > sceneRect.width():
-                p = 10
-                y += maxHeight + 10
-                maxHeight = shapeRect.height()
-                shape.setPos(p, y)
-                p += shapeRect.width() + 10
-            else:
-                shape.setPos(p, y)
-                p = pn
-        
-        rect = self.umlView._getDiagramRect(10)
-        sceneRect = self.umlView.sceneRect()
-        if rect.width() > sceneRect.width():
-            sceneRect.setWidth(rect.width())
-        if rect.height() > sceneRect.height():
-            sceneRect.setHeight(rect.height())
-        self.umlView.setSceneSize(sceneRect.width(), sceneRect.height())
-        
-        self.__createAssociations(shapes)
-        self.umlView.autoAdjustSceneSize(limit=True)
-        
-    def __addPackage(self, name, modules, x, y):
-        """
-        Private method to add a package to the diagram.
-        
-        @param name package name to be shown (string)
-        @param modules list of module names contained in the package
-            (list of strings)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
-        """
-        modules.sort()
-        pm = PackageModel(name, modules)
-        pw = PackageItem(pm, x, y, noModules=self.noModules, scene=self.scene)
-        pw.setId(self.umlView.getItemId())
-        return pw
-        
-    def __createAssociations(self, shapes):
-        """
-        Private method to generate the associations between the package shapes.
-        
-        @param shapes list of shapes
-        """
-        for package in shapes:
-            for rel in shapes[package][1]:
-                assoc = AssociationItem(
-                        shapes[package][0], shapes[rel][0],
-                        Imports)
-                self.scene.addItem(assoc)
-        
-    def relayout(self):
-        """
-        Method to relayout the diagram.
-        """
-        self.__buildPackages()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Graphics/ApplicationDiagramBuilder.py	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,243 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2007 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing a dialog showing an imports diagram of the application.
+"""
+
+import os
+import glob
+
+from PyQt4.QtGui import QApplication, QProgressDialog
+
+from .UMLDiagramBuilder import UMLDiagramBuilder
+from .PackageItem import PackageItem, PackageModel
+from .AssociationItem import AssociationItem, Imports
+
+import Utilities.ModuleParser
+import Utilities
+
+import Preferences
+
+
+class ApplicationDiagramBuilder(UMLDiagramBuilder):
+    """
+    Class implementing a builder for imports diagrams of the application.
+    """
+    def __init__(self, dialog, view, project, noModules=False):
+        """
+        Constructor
+        
+        @param dialog reference to the UML dialog (UMLDialog)
+        @param view reference to the view object (UMLGraphicsView)
+        @param project reference to the project object (Project)
+        @keyparam noModules flag indicating, that no module names should be
+            shown (boolean)
+        """
+        super().__init__(dialog, view, project)
+        self.setObjectName("ApplicationDiagram")
+        
+        self.project = project
+        self.noModules = noModules
+        
+        self.umlView.setDiagramName(
+            self.trUtf8("Application Diagram {0}").format(project.getProjectName()))
+        
+        self.umlView.setPersistenceData(
+            "project={0}".format(self.project.getProjectFile()))
+        
+    def __buildModulesDict(self):
+        """
+        Private method to build a dictionary of modules contained in the application.
+        
+        @return dictionary of modules contained in the application.
+        """
+        extensions = Preferences.getPython("PythonExtensions") + \
+            Preferences.getPython("Python3Extensions") + ['.rb']
+        moduleDict = {}
+        mods = self.project.pdata["SOURCES"]
+        modules = []
+        for module in mods:
+            modules.append(Utilities.normabsjoinpath(self.project.ppath, module))
+        tot = len(modules)
+        try:
+            prog = 0
+            progress = QProgressDialog(self.trUtf8("Parsing modules..."),
+                None, 0, tot, self.parent())
+            progress.show()
+            QApplication.processEvents()
+            for module in modules:
+                progress.setValue(prog)
+                QApplication.processEvents()
+                prog += 1
+                if module.endswith("__init__.py"):
+                    continue
+                try:
+                    mod = Utilities.ModuleParser.readModule(module, extensions=extensions)
+                except ImportError:
+                    continue
+                else:
+                    name = mod.name
+                    moduleDict[name] = mod
+        finally:
+            progress.setValue(tot)
+        return moduleDict
+        
+    def buildDiagram(self):
+        """
+        Public method to build the packages shapes of the diagram.
+        """
+        project = os.path.splitdrive(self.project.getProjectPath())[1]\
+            .replace(os.sep, '.')[1:]
+        packages = {}
+        shapes = {}
+        p = 10
+        y = 10
+        maxHeight = 0
+        sceneRect = self.umlView.sceneRect()
+        
+        modules = self.__buildModulesDict()
+        sortedkeys = sorted(modules.keys())
+        
+        # step 1: build a dictionary of packages
+        for module in sortedkeys:
+            l = module.split('.')
+            package = '.'.join(l[:-1])
+            if package in packages:
+                packages[package][0].append(l[-1])
+            else:
+                packages[package] = ([l[-1]], [])
+                
+        # step 2: assign modules to dictionaries and update import relationship
+        for module in sortedkeys:
+            l = module.split('.')
+            package = '.'.join(l[:-1])
+            impLst = []
+            for i in modules[module].imports:
+                if i in modules:
+                    impLst.append(i)
+                else:
+                    if i.find('.') == -1:
+                        n = "{0}.{1}".format(modules[module].package, i)
+                        if n in modules:
+                            impLst.append(n)
+                        else:
+                            n = "{0}.{1}".format(project, i)
+                            if n in modules:
+                                impLst.append(n)
+                            elif n in packages:
+                                n = "{0}.<<Dummy>>".format(n)
+                                impLst.append(n)
+                    else:
+                        n = "{0}.{1}".format(project, i)
+                        if n in modules:
+                            impLst.append(n)
+            for i in list(modules[module].from_imports.keys()):
+                if i.startswith('.'):
+                    dots = len(i) - len(i.lstrip('.'))
+                    if dots == 1:
+                        i = i[1:]
+                    elif dots > 1:
+                        packagePath = os.path.dirname(modules[module].file)
+                        hasInit = True
+                        ppath = packagePath
+                        while hasInit:
+                            ppath = os.path.dirname(ppath)
+                            hasInit = \
+                                len(glob.glob(os.path.join(ppath, '__init__.*'))) > 0
+                        shortPackage = \
+                            packagePath.replace(ppath, '').replace(os.sep, '.')[1:]
+                        packageList = shortPackage.split('.')[1:]
+                        packageListLen = len(packageList)
+                        i = '.'.join(packageList[:packageListLen - dots + 1] + [i[dots:]])
+                
+                if i in modules:
+                    impLst.append(i)
+                else:
+                    if i.find('.') == -1:
+                        n = "{0}.{1}".format(modules[module].package, i)
+                        if n in modules:
+                            impLst.append(n)
+                        else:
+                            n = "{0}.{1}".format(project, i)
+                            if n in modules:
+                                impLst.append(n)
+                            elif n in packages:
+                                n = "{0}.<<Dummy>>".format(n)
+                                impLst.append(n)
+                    else:
+                        n = "{0}.{1}".format(project, i)
+                        if n in modules:
+                            impLst.append(n)
+            for imp in impLst:
+                impPackage = '.'.join(imp.split('.')[:-1])
+                if not impPackage in packages[package][1] and \
+                   not impPackage == package:
+                    packages[package][1].append(impPackage)
+                    
+        sortedkeys = sorted(packages.keys())
+        for package in sortedkeys:
+            if package:
+                relPackage = package.replace(project, '')
+                if relPackage and relPackage[0] == '.':
+                    relPackage = relPackage[1:]
+                else:
+                    relPackage = self.trUtf8("<<Application>>")
+            else:
+                relPackage = self.trUtf8("<<Others>>")
+            shape = self.__addPackage(relPackage, packages[package][0], 0.0, 0.0)
+            shapeRect = shape.sceneBoundingRect()
+            shapes[package] = (shape, packages[package][1])
+            pn = p + shapeRect.width() + 10
+            maxHeight = max(maxHeight, shapeRect.height())
+            if pn > sceneRect.width():
+                p = 10
+                y += maxHeight + 10
+                maxHeight = shapeRect.height()
+                shape.setPos(p, y)
+                p += shapeRect.width() + 10
+            else:
+                shape.setPos(p, y)
+                p = pn
+        
+        rect = self.umlView._getDiagramRect(10)
+        sceneRect = self.umlView.sceneRect()
+        if rect.width() > sceneRect.width():
+            sceneRect.setWidth(rect.width())
+        if rect.height() > sceneRect.height():
+            sceneRect.setHeight(rect.height())
+        self.umlView.setSceneSize(sceneRect.width(), sceneRect.height())
+        
+        self.__createAssociations(shapes)
+        self.umlView.autoAdjustSceneSize(limit=True)
+        
+    def __addPackage(self, name, modules, x, y):
+        """
+        Private method to add a package to the diagram.
+        
+        @param name package name to be shown (string)
+        @param modules list of module names contained in the package
+            (list of strings)
+        @param x x-coordinate (float)
+        @param y y-coordinate (float)
+        """
+        modules.sort()
+        pm = PackageModel(name, modules)
+        pw = PackageItem(pm, x, y, noModules=self.noModules, scene=self.scene)
+        pw.setId(self.umlView.getItemId())
+        return pw
+        
+    def __createAssociations(self, shapes):
+        """
+        Private method to generate the associations between the package shapes.
+        
+        @param shapes list of shapes
+        """
+        for package in shapes:
+            for rel in shapes[package][1]:
+                assoc = AssociationItem(
+                        shapes[package][0], shapes[rel][0],
+                        Imports)
+                self.scene.addItem(assoc)
--- a/Graphics/ImportsDiagram.py	Sun Sep 09 14:46:59 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2007 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing a dialog showing an imports diagram of a package.
-"""
-
-import glob
-import os
-
-from PyQt4.QtGui import QProgressDialog, QApplication, QGraphicsTextItem
-
-from .UMLDialog import UMLDialog
-from .ModuleItem import ModuleItem, ModuleModel
-from .AssociationItem import AssociationItem, Imports
-
-import Utilities.ModuleParser
-import Utilities
-import Preferences
-
-
-class ImportsDiagram(UMLDialog):
-    """
-    Class implementing a dialog showing an imports diagram of a package.
-    
-    Note: Only package internal imports are show in order to maintain
-    some readability.
-    """
-    def __init__(self, project, package, parent=None, name=None,
-                 showExternalImports=False):
-        """
-        Constructor
-        
-        @param project reference to the project object
-        @param package name of a python package to show the import
-            relationships (string)
-        @param parent parent widget of the view (QWidget)
-        @param name name of the view widget (string)
-        @keyparam showExternalImports flag indicating to show exports from outside
-            the package (boolean)
-        """
-        UMLDialog.__init__(self, "ImportsDiagram", buildFunction=self.__buildImports,
-            parent=parent)
-        
-        self.showExternalImports = showExternalImports
-        self.packagePath = Utilities.normabspath(package)
-        self.package = os.path.splitdrive(self.packagePath)[1].replace(os.sep, '.')[1:]
-        hasInit = True
-        ppath = self.packagePath
-        while hasInit:
-            ppath = os.path.dirname(ppath)
-            hasInit = len(glob.glob(os.path.join(ppath, '__init__.*'))) > 0
-        self.shortPackage = self.packagePath.replace(ppath, '').replace(os.sep, '.')[1:]
-        
-        self.umlView.setPersistenceData("package={0}".format(self.packagePath))
-        
-        pname = project.getProjectName()
-        if pname:
-            name = self.trUtf8("Imports Diagramm {0}: {1}").format(
-                pname, project.getRelativePath(self.packagePath))
-        else:
-            name = self.trUtf8("Imports Diagramm: {0}").format(self.packagePath)
-        self.setDiagramName(name)
-        
-        if not name:
-            self.setObjectName("ImportsDiagram")
-        else:
-            self.setObjectName(name)
-        
-        self.umlView.relayout.connect(self.relayout)
-        
-    def __buildModulesDict(self):
-        """
-        Private method to build a dictionary of modules contained in the package.
-        
-        @return dictionary of modules contained in the package.
-        """
-        extensions = Preferences.getPython("PythonExtensions") + \
-                     Preferences.getPython("Python3Extensions")
-        moduleDict = {}
-        modules = []
-        for ext in Preferences.getPython("PythonExtensions") + \
-                    Preferences.getPython("Python3Extensions"):
-            modules.extend(
-                glob.glob(Utilities.normjoinpath(self.packagePath, '*{0}'.format(ext))))
-        
-        tot = len(modules)
-        try:
-            prog = 0
-            progress = QProgressDialog(self.trUtf8("Parsing modules..."),
-                None, 0, tot, self)
-            progress.show()
-            QApplication.processEvents()
-            for module in modules:
-                progress.setValue(prog)
-                QApplication.processEvents()
-                prog = prog + 1
-                try:
-                    mod = Utilities.ModuleParser.readModule(module, extensions=extensions,
-                                                            caching=False)
-                except ImportError:
-                    continue
-                else:
-                    name = mod.name
-                    if name.startswith(self.package):
-                        name = name[len(self.package) + 1:]
-                    moduleDict[name] = mod
-        finally:
-            progress.setValue(tot)
-        return moduleDict
-        
-    def __buildImports(self):
-        """
-        Private method to build the modules shapes of the diagram.
-        """
-        initlist = glob.glob(os.path.join(self.packagePath, '__init__.*'))
-        if len(initlist) == 0:
-            ct = QGraphicsTextItem(None, self.scene)
-            ct.setHtml(
-                self.trUtf8("The directory <b>'{0}'</b> is not a Python package.")\
-                    .format(self.package))
-            return
-        
-        shapes = {}
-        p = 10
-        y = 10
-        maxHeight = 0
-        sceneRect = self.umlView.sceneRect()
-        
-        modules = self.__buildModulesDict()
-        sortedkeys = sorted(modules.keys())
-        externalMods = []
-        packageList = self.shortPackage.split('.')
-        packageListLen = len(packageList)
-        for module in sortedkeys:
-            impLst = []
-            for i in modules[module].imports:
-                if i.startswith(self.package):
-                    n = i[len(self.package) + 1:]
-                else:
-                    n = i
-                if i in modules:
-                    impLst.append(n)
-                elif self.showExternalImports:
-                    impLst.append(n)
-                    if not n in externalMods:
-                        externalMods.append(n)
-            for i in list(modules[module].from_imports.keys()):
-                if i.startswith('.'):
-                    dots = len(i) - len(i.lstrip('.'))
-                    if dots == 1:
-                        n = i[1:]
-                        i = n
-                    else:
-                        if self.showExternalImports:
-                            n = '.'.join(
-                                packageList[:packageListLen - dots + 1] + [i[dots:]])
-                        else:
-                            n = i
-                elif i.startswith(self.package):
-                    n = i[len(self.package) + 1:]
-                else:
-                    n = i
-                if i in modules:
-                    impLst.append(n)
-                elif self.showExternalImports:
-                    impLst.append(n)
-                    if not n in externalMods:
-                        externalMods.append(n)
-            classNames = []
-            for cls in list(modules[module].classes.keys()):
-                className = modules[module].classes[cls].name
-                if className not in classNames:
-                    classNames.append(className)
-            shape = self.__addModule(module, classNames, 0.0, 0.0)
-            shapeRect = shape.sceneBoundingRect()
-            shapes[module] = (shape, impLst)
-            pn = p + shapeRect.width() + 10
-            maxHeight = max(maxHeight, shapeRect.height())
-            if pn > sceneRect.width():
-                p = 10
-                y += maxHeight + 10
-                maxHeight = shapeRect.height()
-                shape.setPos(p, y)
-                p += shapeRect.width() + 10
-            else:
-                shape.setPos(p, y)
-                p = pn
-        
-        for module in externalMods:
-            shape = self.__addModule(module, [], 0.0, 0.0)
-            shapeRect = shape.sceneBoundingRect()
-            shapes[module] = (shape, [])
-            pn = p + shapeRect.width() + 10
-            maxHeight = max(maxHeight, shapeRect.height())
-            if pn > sceneRect.width():
-                p = 10
-                y += maxHeight + 10
-                maxHeight = shapeRect.height()
-                shape.setPos(p, y)
-                p += shapeRect.width() + 10
-            else:
-                shape.setPos(p, y)
-                p = pn
-        
-        rect = self.umlView._getDiagramRect(10)
-        sceneRect = self.umlView.sceneRect()
-        if rect.width() > sceneRect.width():
-            sceneRect.setWidth(rect.width())
-        if rect.height() > sceneRect.height():
-            sceneRect.setHeight(rect.height())
-        self.umlView.setSceneSize(sceneRect.width(), sceneRect.height())
-        
-        self.__createAssociations(shapes)
-        self.umlView.autoAdjustSceneSize(limit=True)
-        
-    def __addModule(self, name, classes, x, y):
-        """
-        Private method to add a module to the diagram.
-        
-        @param name module name to be shown (string)
-        @param classes list of class names contained in the module
-            (list of strings)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
-        """
-        classes.sort()
-        impM = ModuleModel(name, classes)
-        impW = ModuleItem(impM, x, y, scene=self.scene)
-        impW.setId(self.umlView.getItemId())
-        return impW
-        
-    def __createAssociations(self, shapes):
-        """
-        Private method to generate the associations between the module shapes.
-        
-        @param shapes list of shapes
-        """
-        for module in list(shapes.keys()):
-            for rel in shapes[module][1]:
-                assoc = AssociationItem(
-                        shapes[module][0], shapes[rel][0],
-                        Imports)
-                self.scene.addItem(assoc)
-        
-    def relayout(self):
-        """
-        Method to relayout the diagram.
-        """
-        self.__buildImports()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Graphics/ImportsDiagramBuilder.py	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,238 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2007 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing a dialog showing an imports diagram of a package.
+"""
+
+import glob
+import os
+
+from PyQt4.QtGui import QProgressDialog, QApplication, QGraphicsTextItem
+
+from .UMLDiagramBuilder import UMLDiagramBuilder
+from .ModuleItem import ModuleItem, ModuleModel
+from .AssociationItem import AssociationItem, Imports
+
+import Utilities.ModuleParser
+import Utilities
+import Preferences
+
+
+class ImportsDiagramBuilder(UMLDiagramBuilder):
+    """
+    Class implementing a builder for imports diagrams of a package.
+    
+    Note: Only package internal imports are shown in order to maintain
+    some readability.
+    """
+    def __init__(self, dialog, view, project, package, showExternalImports=False):
+        """
+        Constructor
+        
+        @param dialog reference to the UML dialog (UMLDialog)
+        @param view reference to the view object (UMLGraphicsView)
+        @param project reference to the project object (Project)
+        @param package name of a python package to show the import
+            relationships (string)
+        @keyparam showExternalImports flag indicating to show exports from outside
+            the package (boolean)
+        """
+        super().__init__(dialog, view, project)
+        self.setObjectName("ImportsDiagram")
+        
+        self.showExternalImports = showExternalImports
+        self.packagePath = Utilities.normabspath(package)
+        self.package = os.path.splitdrive(self.packagePath)[1].replace(os.sep, '.')[1:]
+        hasInit = True
+        ppath = self.packagePath
+        while hasInit:
+            ppath = os.path.dirname(ppath)
+            hasInit = len(glob.glob(os.path.join(ppath, '__init__.*'))) > 0
+        self.shortPackage = self.packagePath.replace(ppath, '').replace(os.sep, '.')[1:]
+        
+        self.umlView.setPersistenceData("package={0}".format(self.packagePath))
+        
+        pname = project.getProjectName()
+        if pname:
+            name = self.trUtf8("Imports Diagramm {0}: {1}").format(
+                pname, project.getRelativePath(self.packagePath))
+        else:
+            name = self.trUtf8("Imports Diagramm: {0}").format(self.packagePath)
+        self.umlView.setDiagramName(name)
+        
+    def __buildModulesDict(self):
+        """
+        Private method to build a dictionary of modules contained in the package.
+        
+        @return dictionary of modules contained in the package.
+        """
+        extensions = Preferences.getPython("PythonExtensions") + \
+                     Preferences.getPython("Python3Extensions")
+        moduleDict = {}
+        modules = []
+        for ext in Preferences.getPython("PythonExtensions") + \
+                    Preferences.getPython("Python3Extensions"):
+            modules.extend(
+                glob.glob(Utilities.normjoinpath(self.packagePath, '*{0}'.format(ext))))
+        
+        tot = len(modules)
+        try:
+            prog = 0
+            progress = QProgressDialog(self.trUtf8("Parsing modules..."),
+                None, 0, tot, self.parent())
+            progress.show()
+            QApplication.processEvents()
+            for module in modules:
+                progress.setValue(prog)
+                QApplication.processEvents()
+                prog = prog + 1
+                try:
+                    mod = Utilities.ModuleParser.readModule(module, extensions=extensions,
+                                                            caching=False)
+                except ImportError:
+                    continue
+                else:
+                    name = mod.name
+                    if name.startswith(self.package):
+                        name = name[len(self.package) + 1:]
+                    moduleDict[name] = mod
+        finally:
+            progress.setValue(tot)
+        return moduleDict
+        
+    def buildDiagram(self):
+        """
+        Public method to build the modules shapes of the diagram.
+        """
+        initlist = glob.glob(os.path.join(self.packagePath, '__init__.*'))
+        if len(initlist) == 0:
+            ct = QGraphicsTextItem(None, self.scene)
+            ct.setHtml(
+                self.trUtf8("The directory <b>'{0}'</b> is not a Python package.")\
+                    .format(self.package))
+            return
+        
+        shapes = {}
+        p = 10
+        y = 10
+        maxHeight = 0
+        sceneRect = self.umlView.sceneRect()
+        
+        modules = self.__buildModulesDict()
+        sortedkeys = sorted(modules.keys())
+        externalMods = []
+        packageList = self.shortPackage.split('.')
+        packageListLen = len(packageList)
+        for module in sortedkeys:
+            impLst = []
+            for i in modules[module].imports:
+                if i.startswith(self.package):
+                    n = i[len(self.package) + 1:]
+                else:
+                    n = i
+                if i in modules:
+                    impLst.append(n)
+                elif self.showExternalImports:
+                    impLst.append(n)
+                    if not n in externalMods:
+                        externalMods.append(n)
+            for i in list(modules[module].from_imports.keys()):
+                if i.startswith('.'):
+                    dots = len(i) - len(i.lstrip('.'))
+                    if dots == 1:
+                        n = i[1:]
+                        i = n
+                    else:
+                        if self.showExternalImports:
+                            n = '.'.join(
+                                packageList[:packageListLen - dots + 1] + [i[dots:]])
+                        else:
+                            n = i
+                elif i.startswith(self.package):
+                    n = i[len(self.package) + 1:]
+                else:
+                    n = i
+                if i in modules:
+                    impLst.append(n)
+                elif self.showExternalImports:
+                    impLst.append(n)
+                    if not n in externalMods:
+                        externalMods.append(n)
+            classNames = []
+            for cls in list(modules[module].classes.keys()):
+                className = modules[module].classes[cls].name
+                if className not in classNames:
+                    classNames.append(className)
+            shape = self.__addModule(module, classNames, 0.0, 0.0)
+            shapeRect = shape.sceneBoundingRect()
+            shapes[module] = (shape, impLst)
+            pn = p + shapeRect.width() + 10
+            maxHeight = max(maxHeight, shapeRect.height())
+            if pn > sceneRect.width():
+                p = 10
+                y += maxHeight + 10
+                maxHeight = shapeRect.height()
+                shape.setPos(p, y)
+                p += shapeRect.width() + 10
+            else:
+                shape.setPos(p, y)
+                p = pn
+        
+        for module in externalMods:
+            shape = self.__addModule(module, [], 0.0, 0.0)
+            shapeRect = shape.sceneBoundingRect()
+            shapes[module] = (shape, [])
+            pn = p + shapeRect.width() + 10
+            maxHeight = max(maxHeight, shapeRect.height())
+            if pn > sceneRect.width():
+                p = 10
+                y += maxHeight + 10
+                maxHeight = shapeRect.height()
+                shape.setPos(p, y)
+                p += shapeRect.width() + 10
+            else:
+                shape.setPos(p, y)
+                p = pn
+        
+        rect = self.umlView._getDiagramRect(10)
+        sceneRect = self.umlView.sceneRect()
+        if rect.width() > sceneRect.width():
+            sceneRect.setWidth(rect.width())
+        if rect.height() > sceneRect.height():
+            sceneRect.setHeight(rect.height())
+        self.umlView.setSceneSize(sceneRect.width(), sceneRect.height())
+        
+        self.__createAssociations(shapes)
+        self.umlView.autoAdjustSceneSize(limit=True)
+        
+    def __addModule(self, name, classes, x, y):
+        """
+        Private method to add a module to the diagram.
+        
+        @param name module name to be shown (string)
+        @param classes list of class names contained in the module
+            (list of strings)
+        @param x x-coordinate (float)
+        @param y y-coordinate (float)
+        """
+        classes.sort()
+        impM = ModuleModel(name, classes)
+        impW = ModuleItem(impM, x, y, scene=self.scene)
+        impW.setId(self.umlView.getItemId())
+        return impW
+        
+    def __createAssociations(self, shapes):
+        """
+        Private method to generate the associations between the module shapes.
+        
+        @param shapes list of shapes
+        """
+        for module in list(shapes.keys()):
+            for rel in shapes[module][1]:
+                assoc = AssociationItem(
+                        shapes[module][0], shapes[rel][0],
+                        Imports)
+                self.scene.addItem(assoc)
--- a/Graphics/PackageDiagram.py	Sun Sep 09 14:46:59 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2007 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing a dialog showing a UML like class diagram of a package.
-"""
-
-import glob
-import os.path
-import itertools
-
-from PyQt4.QtGui import QProgressDialog, QApplication, QGraphicsTextItem
-
-from .UMLDialog import UMLDialog
-from .ClassItem import ClassItem, ClassModel
-from .AssociationItem import AssociationItem, Generalisation
-from . import GraphicsUtilities
-
-import Utilities.ModuleParser
-import Utilities
-import Preferences
-
-
-class PackageDiagram(UMLDialog):
-    """
-    Class implementing a dialog showing a UML like class diagram of a package.
-    """
-    def __init__(self, project, package, parent=None, name=None, noAttrs=False):
-        """
-        Constructor
-        
-        @param project reference to the project object
-        @param package name of a python package to be shown (string)
-        @param parent parent widget of the view (QWidget)
-        @param name name of the view widget (string)
-        @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
-        """
-        UMLDialog.__init__(self, "PackageDiagram", buildFunction=self.__buildClasses,
-            parent=parent)
-        
-        self.package = Utilities.normabspath(package)
-        self.allClasses = {}
-        self.noAttrs = noAttrs
-        
-        self.umlView.setPersistenceData("package={0}".format(self.package))
-        
-        pname = project.getProjectName()
-        if pname:
-            name = self.trUtf8("Package Diagram {0}: {1}").format(
-                pname, project.getRelativePath(self.package))
-        else:
-            name = self.trUtf8("Package Diagram: {0}").format(self.package)
-        self.setDiagramName(name)
-        
-        if not name:
-            self.setObjectName("PackageDiagram")
-        else:
-            self.setObjectName(name)
-        
-        self.umlView.relayout.connect(self.relayout)
-        
-    def __getCurrentShape(self, name):
-        """
-        Private method to get the named shape.
-        
-        @param name name of the shape (string)
-        @return shape (QCanvasItem)
-        """
-        return self.allClasses.get(name)
-        
-    def __buildModulesDict(self):
-        """
-        Private method to build a dictionary of modules contained in the package.
-        
-        @return dictionary of modules contained in the package.
-        """
-        supportedExt = \
-            ['*{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 = []
-        for ext in supportedExt:
-            modules.extend(glob.glob(Utilities.normjoinpath(self.package, ext)))
-        tot = len(modules)
-        try:
-            prog = 0
-            progress = QProgressDialog(self.trUtf8("Parsing modules..."),
-                None, 0, tot, self)
-            progress.show()
-            QApplication.processEvents()
-            for module in modules:
-                progress.setValue(prog)
-                QApplication.processEvents()
-                prog += 1
-                try:
-                    mod = Utilities.ModuleParser.readModule(module, extensions=extensions)
-                except ImportError:
-                    continue
-                else:
-                    name = mod.name
-                    if name.startswith(self.package):
-                        name = name[len(self.package) + 1:]
-                    moduleDict[name] = mod
-        finally:
-            progress.setValue(tot)
-        return moduleDict
-        
-    def __buildClasses(self):
-        """
-        Private method to build the class shapes of the package diagram.
-        
-        The algorithm is borrowed from Boa Constructor.
-        """
-        initlist = glob.glob(os.path.join(self.package, '__init__.*'))
-        if len(initlist) == 0:
-            ct = QGraphicsTextItem(None, self.scene)
-            ct.setHtml(
-                self.trUtf8("The directory <b>'{0}'</b> is not a package.")\
-                    .format(self.package))
-            return
-        
-        modules = self.__buildModulesDict()
-        if not modules:
-            ct = QGraphicsTextItem(None, self.scene)
-            ct.setHtml(
-                self.trUtf8("The package <b>'{0}'</b> does not contain any modules.")
-                    .format(self.package))
-            return
-            
-        # step 1: build all classes found in the modules
-        classesFound = False
-        
-        for modName in list(modules.keys()):
-            module = modules[modName]
-            for cls in list(module.classes.keys()):
-                classesFound = True
-                self.__addLocalClass(cls, module.classes[cls], 0, 0)
-        if not classesFound:
-            ct = QGraphicsTextItem(None, self.scene)
-            ct.setHtml(
-                self.trUtf8("The package <b>'{0}'</b> does not contain any classes.")
-                    .format(self.package))
-            return
-        
-        # step 2: build the class hierarchies
-        routes = []
-        nodes = []
-        
-        for modName in list(modules.keys()):
-            module = modules[modName]
-            todo = [module.createHierarchy()]
-            while todo:
-                hierarchy = todo[0]
-                for className in list(hierarchy.keys()):
-                    cw = self.__getCurrentShape(className)
-                    if not cw and className.find('.') >= 0:
-                        cw = self.__getCurrentShape(className.split('.')[-1])
-                        if cw:
-                            self.allClasses[className] = cw
-                    if cw and cw.noAttrs != self.noAttrs:
-                        cw = None
-                    if cw and not (cw.external and \
-                                   (className in module.classes or
-                                    className in module.modules)
-                                  ):
-                        if className not in nodes:
-                            nodes.append(className)
-                    else:
-                        if className in module.classes:
-                            # this is a local class (defined in this module)
-                            self.__addLocalClass(className, module.classes[className],
-                                                 0, 0)
-                        elif className in module.modules:
-                            # this is a local module (defined in this module)
-                            self.__addLocalClass(className, module.modules[className],
-                                                 0, 0, True)
-                        else:
-                            self.__addExternalClass(className, 0, 0)
-                        nodes.append(className)
-                    
-                    if hierarchy.get(className):
-                        todo.append(hierarchy.get(className))
-                        children = list(hierarchy.get(className).keys())
-                        for child in children:
-                            if (className, child) not in routes:
-                                routes.append((className, child))
-                
-                del todo[0]
-            
-        self.__arrangeClasses(nodes, routes[:])
-        self.__createAssociations(routes)
-        self.umlView.autoAdjustSceneSize(limit=True)
-        
-    def __arrangeClasses(self, nodes, routes, whiteSpaceFactor=1.2):
-        """
-        Private method to arrange the shapes on the canvas.
-        
-        The algorithm is borrowed from Boa Constructor.
-        """
-        generations = GraphicsUtilities.sort(nodes, routes)
-        
-        # calculate width and height of all elements
-        sizes = []
-        for generation in generations:
-            sizes.append([])
-            for child in generation:
-                sizes[-1].append(self.__getCurrentShape(child).sceneBoundingRect())
-                
-        # calculate total width and total height
-        width = 0
-        height = 0
-        widths = []
-        heights = []
-        for generation in sizes:
-            currentWidth = 0
-            currentHeight = 0
-            
-            for rect in generation:
-                if rect.bottom() > currentHeight:
-                    currentHeight = rect.bottom()
-                currentWidth = currentWidth + rect.right()
-                
-            # update totals
-            if currentWidth > width:
-                width = currentWidth
-            height = height + currentHeight
-            
-            # store generation info
-            widths.append(currentWidth)
-            heights.append(currentHeight)
-            
-        # add in some whitespace
-        width = width * whiteSpaceFactor
-##        rawHeight = height
-        height = height * whiteSpaceFactor - 20
-##        verticalWhiteSpace = max(
-##            (height - rawHeight) / (len(generations) - 1.0 or 2.0),
-##            40.0
-##        )
-        verticalWhiteSpace = 40.0
-        
-        sceneRect = self.umlView.sceneRect()
-        width += 50.0
-        height += 50.0
-        swidth = width < sceneRect.width() and sceneRect.width() or width
-        sheight = height < sceneRect.height() and sceneRect.height() or height
-        self.umlView.setSceneSize(swidth, sheight)
-        
-        # distribute each generation across the width and the
-        # generations across height
-        y = 10.0
-        for currentWidth, currentHeight, generation in \
-                itertools.zip_longest(widths, heights, generations):
-            x = 10.0
-            # whiteSpace is the space between any two elements
-            whiteSpace = (width - currentWidth - 20) / (len(generation) - 1.0 or 2.0)
-            for className in generation:
-                cw = self.__getCurrentShape(className)
-                cw.setPos(x, y)
-                rect = cw.sceneBoundingRect()
-                x = x + rect.width() + whiteSpace
-            y = y + currentHeight + verticalWhiteSpace
-            
-    def __addLocalClass(self, className, _class, x, y, isRbModule=False):
-        """
-        Private method to add a class defined in the module.
-        
-        @param className name of the class to be as a dictionary key (string)
-        @param _class class to be shown (ModuleParser.Class)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
-        @param isRbModule flag indicating a Ruby module (boolean)
-        """
-        meths = sorted(_class.methods.keys())
-        attrs = sorted(_class.attributes.keys())
-        name = _class.name
-        if isRbModule:
-            name = "{0} (Module)".format(name)
-        cl = ClassModel(name, meths[:], attrs[:])
-        cw = ClassItem(cl, False, x, y, noAttrs=self.noAttrs, scene=self.scene)
-        cw.setId(self.umlView.getItemId())
-        self.allClasses[className] = cw
-        
-    def __addExternalClass(self, _class, x, y):
-        """
-        Private method to add a class defined outside the module.
-        
-        If the canvas is too small to take the shape, it
-        is enlarged.
-        
-        @param _class class to be shown (string)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
-        """
-        cl = ClassModel(_class)
-        cw = ClassItem(cl, True, x, y, noAttrs=self.noAttrs, scene=self.scene)
-        cw.setId(self.umlView.getItemId())
-        self.allClasses[_class] = cw
-        
-    def __createAssociations(self, routes):
-        """
-        Private method to generate the associations between the class shapes.
-        
-        @param routes list of relationsships
-        """
-        for route in routes:
-            if len(route) > 1:
-                assoc = AssociationItem(
-                        self.__getCurrentShape(route[1]),
-                        self.__getCurrentShape(route[0]),
-                        Generalisation,
-                        topToBottom=True)
-                self.scene.addItem(assoc)
-        
-    def relayout(self):
-        """
-        Method to relayout the diagram.
-        """
-        self.allClasses.clear()
-        self.__buildClasses()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Graphics/PackageDiagramBuilder.py	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,313 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2007 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing a dialog showing a UML like class diagram of a package.
+"""
+
+import glob
+import os.path
+import itertools
+
+from PyQt4.QtGui import QProgressDialog, QApplication, QGraphicsTextItem
+
+from .UMLDiagramBuilder import UMLDiagramBuilder
+from .ClassItem import ClassItem, ClassModel
+from .AssociationItem import AssociationItem, Generalisation
+from . import GraphicsUtilities
+
+import Utilities.ModuleParser
+import Utilities
+import Preferences
+
+
+class PackageDiagramBuilder(UMLDiagramBuilder):
+    """
+    Class implementing a builder for UML like class diagrams of a package.
+    """
+    def __init__(self, dialog, view, project, package, noAttrs=False):
+        """
+        Constructor
+        
+        @param dialog reference to the UML dialog (UMLDialog)
+        @param view reference to the view object (UMLGraphicsView)
+        @param project reference to the project object (Project)
+        @param package name of a python package to be shown (string)
+        @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
+        """
+        super().__init__(dialog, view, project)
+        self.setObjectName("PackageDiagram")
+        
+        self.package = Utilities.normabspath(package)
+        self.noAttrs = noAttrs
+        
+        self.umlView.setPersistenceData("package={0}".format(self.package))
+        
+        pname = project.getProjectName()
+        if pname:
+            name = self.trUtf8("Package Diagram {0}: {1}").format(
+                pname, project.getRelativePath(self.package))
+        else:
+            name = self.trUtf8("Package Diagram: {0}").format(self.package)
+        self.umlView.setDiagramName(name)
+        
+    def __getCurrentShape(self, name):
+        """
+        Private method to get the named shape.
+        
+        @param name name of the shape (string)
+        @return shape (QCanvasItem)
+        """
+        return self.allClasses.get(name)
+        
+    def __buildModulesDict(self):
+        """
+        Private method to build a dictionary of modules contained in the package.
+        
+        @return dictionary of modules contained in the package.
+        """
+        supportedExt = \
+            ['*{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 = []
+        for ext in supportedExt:
+            modules.extend(glob.glob(Utilities.normjoinpath(self.package, ext)))
+        tot = len(modules)
+        try:
+            prog = 0
+            progress = QProgressDialog(self.trUtf8("Parsing modules..."),
+                None, 0, tot, self.parent())
+            progress.show()
+            QApplication.processEvents()
+            for module in modules:
+                progress.setValue(prog)
+                QApplication.processEvents()
+                prog += 1
+                try:
+                    mod = Utilities.ModuleParser.readModule(module, extensions=extensions)
+                except ImportError:
+                    continue
+                else:
+                    name = mod.name
+                    if name.startswith(self.package):
+                        name = name[len(self.package) + 1:]
+                    moduleDict[name] = mod
+        finally:
+            progress.setValue(tot)
+        return moduleDict
+        
+    def buildDiagram(self):
+        """
+        Public method to build the class shapes of the package diagram.
+        
+        The algorithm is borrowed from Boa Constructor.
+        """
+        self.allClasses = {}
+        
+        initlist = glob.glob(os.path.join(self.package, '__init__.*'))
+        if len(initlist) == 0:
+            ct = QGraphicsTextItem(None, self.scene)
+            ct.setHtml(
+                self.trUtf8("The directory <b>'{0}'</b> is not a package.")\
+                    .format(self.package))
+            return
+        
+        modules = self.__buildModulesDict()
+        if not modules:
+            ct = QGraphicsTextItem(None, self.scene)
+            ct.setHtml(
+                self.trUtf8("The package <b>'{0}'</b> does not contain any modules.")
+                    .format(self.package))
+            return
+            
+        # step 1: build all classes found in the modules
+        classesFound = False
+        
+        for modName in list(modules.keys()):
+            module = modules[modName]
+            for cls in list(module.classes.keys()):
+                classesFound = True
+                self.__addLocalClass(cls, module.classes[cls], 0, 0)
+        if not classesFound:
+            ct = QGraphicsTextItem(None, self.scene)
+            ct.setHtml(
+                self.trUtf8("The package <b>'{0}'</b> does not contain any classes.")
+                    .format(self.package))
+            return
+        
+        # step 2: build the class hierarchies
+        routes = []
+        nodes = []
+        
+        for modName in list(modules.keys()):
+            module = modules[modName]
+            todo = [module.createHierarchy()]
+            while todo:
+                hierarchy = todo[0]
+                for className in list(hierarchy.keys()):
+                    cw = self.__getCurrentShape(className)
+                    if not cw and className.find('.') >= 0:
+                        cw = self.__getCurrentShape(className.split('.')[-1])
+                        if cw:
+                            self.allClasses[className] = cw
+                    if cw and cw.noAttrs != self.noAttrs:
+                        cw = None
+                    if cw and not (cw.external and \
+                                   (className in module.classes or
+                                    className in module.modules)
+                                  ):
+                        if className not in nodes:
+                            nodes.append(className)
+                    else:
+                        if className in module.classes:
+                            # this is a local class (defined in this module)
+                            self.__addLocalClass(className, module.classes[className],
+                                                 0, 0)
+                        elif className in module.modules:
+                            # this is a local module (defined in this module)
+                            self.__addLocalClass(className, module.modules[className],
+                                                 0, 0, True)
+                        else:
+                            self.__addExternalClass(className, 0, 0)
+                        nodes.append(className)
+                    
+                    if hierarchy.get(className):
+                        todo.append(hierarchy.get(className))
+                        children = list(hierarchy.get(className).keys())
+                        for child in children:
+                            if (className, child) not in routes:
+                                routes.append((className, child))
+                
+                del todo[0]
+            
+        self.__arrangeClasses(nodes, routes[:])
+        self.__createAssociations(routes)
+        self.umlView.autoAdjustSceneSize(limit=True)
+        
+    def __arrangeClasses(self, nodes, routes, whiteSpaceFactor=1.2):
+        """
+        Private method to arrange the shapes on the canvas.
+        
+        The algorithm is borrowed from Boa Constructor.
+        """
+        generations = GraphicsUtilities.sort(nodes, routes)
+        
+        # calculate width and height of all elements
+        sizes = []
+        for generation in generations:
+            sizes.append([])
+            for child in generation:
+                sizes[-1].append(self.__getCurrentShape(child).sceneBoundingRect())
+                
+        # calculate total width and total height
+        width = 0
+        height = 0
+        widths = []
+        heights = []
+        for generation in sizes:
+            currentWidth = 0
+            currentHeight = 0
+            
+            for rect in generation:
+                if rect.bottom() > currentHeight:
+                    currentHeight = rect.bottom()
+                currentWidth = currentWidth + rect.right()
+                
+            # update totals
+            if currentWidth > width:
+                width = currentWidth
+            height = height + currentHeight
+            
+            # store generation info
+            widths.append(currentWidth)
+            heights.append(currentHeight)
+            
+        # add in some whitespace
+        width = width * whiteSpaceFactor
+##        rawHeight = height
+        height = height * whiteSpaceFactor - 20
+##        verticalWhiteSpace = max(
+##            (height - rawHeight) / (len(generations) - 1.0 or 2.0),
+##            40.0
+##        )
+        verticalWhiteSpace = 40.0
+        
+        sceneRect = self.umlView.sceneRect()
+        width += 50.0
+        height += 50.0
+        swidth = width < sceneRect.width() and sceneRect.width() or width
+        sheight = height < sceneRect.height() and sceneRect.height() or height
+        self.umlView.setSceneSize(swidth, sheight)
+        
+        # distribute each generation across the width and the
+        # generations across height
+        y = 10.0
+        for currentWidth, currentHeight, generation in \
+                itertools.zip_longest(widths, heights, generations):
+            x = 10.0
+            # whiteSpace is the space between any two elements
+            whiteSpace = (width - currentWidth - 20) / (len(generation) - 1.0 or 2.0)
+            for className in generation:
+                cw = self.__getCurrentShape(className)
+                cw.setPos(x, y)
+                rect = cw.sceneBoundingRect()
+                x = x + rect.width() + whiteSpace
+            y = y + currentHeight + verticalWhiteSpace
+            
+    def __addLocalClass(self, className, _class, x, y, isRbModule=False):
+        """
+        Private method to add a class defined in the module.
+        
+        @param className name of the class to be as a dictionary key (string)
+        @param _class class to be shown (ModuleParser.Class)
+        @param x x-coordinate (float)
+        @param y y-coordinate (float)
+        @param isRbModule flag indicating a Ruby module (boolean)
+        """
+        meths = sorted(_class.methods.keys())
+        attrs = sorted(_class.attributes.keys())
+        name = _class.name
+        if isRbModule:
+            name = "{0} (Module)".format(name)
+        cl = ClassModel(name, meths[:], attrs[:])
+        cw = ClassItem(cl, False, x, y, noAttrs=self.noAttrs, scene=self.scene)
+        cw.setId(self.umlView.getItemId())
+        self.allClasses[className] = cw
+        
+    def __addExternalClass(self, _class, x, y):
+        """
+        Private method to add a class defined outside the module.
+        
+        If the canvas is too small to take the shape, it
+        is enlarged.
+        
+        @param _class class to be shown (string)
+        @param x x-coordinate (float)
+        @param y y-coordinate (float)
+        """
+        cl = ClassModel(_class)
+        cw = ClassItem(cl, True, x, y, noAttrs=self.noAttrs, scene=self.scene)
+        cw.setId(self.umlView.getItemId())
+        self.allClasses[_class] = cw
+        
+    def __createAssociations(self, routes):
+        """
+        Private method to generate the associations between the class shapes.
+        
+        @param routes list of relationsships
+        """
+        for route in routes:
+            if len(route) > 1:
+                assoc = AssociationItem(
+                        self.__getCurrentShape(route[1]),
+                        self.__getCurrentShape(route[0]),
+                        Generalisation,
+                        topToBottom=True)
+                self.scene.addItem(assoc)
--- a/Graphics/UMLClassDiagram.py	Sun Sep 09 14:46:59 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2007 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing a dialog showing a UML like class diagram.
-"""
-
-import itertools
-
-from PyQt4.QtGui import QGraphicsTextItem
-
-import Utilities.ModuleParser
-import Preferences
-
-from .UMLDialog import UMLDialog
-from .ClassItem import ClassItem, ClassModel
-from .AssociationItem import AssociationItem, Generalisation
-from . import GraphicsUtilities
-
-
-class UMLClassDiagram(UMLDialog):
-    """
-    Class implementing a dialog showing a UML like class diagram.
-    """
-    def __init__(self, project, file, parent=None, name=None, noAttrs=False):
-        """
-        Constructor
-        
-        @param project reference to the project object
-        @param file filename of a python module to be shown (string)
-        @param parent parent widget of the view (QWidget)
-        @param name name of the view widget (string)
-        @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
-        """
-        UMLDialog.__init__(self, "UMLClassDiagram", buildFunction=self.__buildClasses,
-            parent=parent)
-        
-        self.file = file
-        self.noAttrs = noAttrs
-        
-        self.umlView.setPersistenceData("file={0}".format(file))
-        
-        pname = project.getProjectName()
-        if pname and project.isProjectSource(self.file):
-            name = self.trUtf8("Class Diagram {0}: {1}").format(
-                pname, project.getRelativePath(self.file))
-        else:
-            name = self.trUtf8("Class Diagram: {0}").format(self.file)
-        self.setDiagramName(name)
-        
-        if not name:
-            self.setObjectName("UMLClassDiagram")
-        else:
-            self.setObjectName(name)
-        
-        self.allClasses = {}
-        self.allModules = {}
-        
-        self.umlView.relayout.connect(self.relayout)
-        
-    def __getCurrentShape(self, name):
-        """
-        Private method to get the named shape.
-        
-        @param name name of the shape (string)
-        @return shape (QGraphicsItem)
-        """
-        return self.allClasses.get(name)
-        
-    def __buildClasses(self):
-        """
-        Private method to build the class shapes of the class diagram.
-        
-        The algorithm is borrowed from Boa Constructor.
-        """
-        try:
-            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(
-                self.trUtf8("The module <b>'{0}'</b> could not be found.")
-                    .format(self.file))
-            return
-        
-        if self.file not in self.allModules:
-            self.allModules[self.file] = []
-        
-        routes = []
-        nodes = []
-        todo = [module.createHierarchy()]
-        classesFound = False
-        while todo:
-            hierarchy = todo[0]
-            for className in hierarchy:
-                classesFound = True
-                cw = self.__getCurrentShape(className)
-                if not cw and className.find('.') >= 0:
-                    cw = self.__getCurrentShape(className.split('.')[-1])
-                    if cw:
-                        self.allClasses[className] = cw
-                        if className not in self.allModules[self.file]:
-                            self.allModules[self.file].append(className)
-                if cw and cw.noAttrs != self.noAttrs:
-                    cw = None
-                if cw and not (cw.external and \
-                               (className in module.classes or
-                                className in module.modules)
-                              ):
-                    if cw.scene() != self.scene:
-                        self.scene.addItem(cw)
-                        cw.setPos(10, 10)
-                        if className not in nodes:
-                            nodes.append(className)
-                else:
-                    if className in module.classes:
-                        # this is a local class (defined in this module)
-                        self.__addLocalClass(
-                            className, module.classes[className], 0, 0)
-                    elif className in module.modules:
-                        # this is a local module (defined in this module)
-                        self.__addLocalClass(
-                            className, module.modules[className], 0, 0, True)
-                    else:
-                        self.__addExternalClass(className, 0, 0)
-                    nodes.append(className)
-                
-                if hierarchy.get(className):
-                    todo.append(hierarchy.get(className))
-                    children = list(hierarchy.get(className).keys())
-                    for child in children:
-                        if (className, child) not in routes:
-                            routes.append((className, child))
-            
-            del todo[0]
-        
-        if classesFound:
-            self.__arrangeClasses(nodes, routes[:])
-            self.__createAssociations(routes)
-            self.umlView.autoAdjustSceneSize(limit=True)
-        else:
-            ct = QGraphicsTextItem(None, self.scene)
-            ct.setHtml(
-                self.trUtf8("The module <b>'{0}'</b> does not contain any classes.")\
-                .format(self.file))
-        
-    def __arrangeClasses(self, nodes, routes, whiteSpaceFactor=1.2):
-        """
-        Private method to arrange the shapes on the canvas.
-        
-        The algorithm is borrowed from Boa Constructor.
-        """
-        generations = GraphicsUtilities.sort(nodes, routes)
-        
-        # calculate width and height of all elements
-        sizes = []
-        for generation in generations:
-            sizes.append([])
-            for child in generation:
-                sizes[-1].append(self.__getCurrentShape(child).sceneBoundingRect())
-        
-        # calculate total width and total height
-        width = 0
-        height = 0
-        widths = []
-        heights = []
-        for generation in sizes:
-            currentWidth = 0
-            currentHeight = 0
-            
-            for rect in generation:
-                if rect.bottom() > currentHeight:
-                    currentHeight = rect.bottom()
-                currentWidth = currentWidth + rect.right()
-            
-            # update totals
-            if currentWidth > width:
-                width = currentWidth
-            height = height + currentHeight
-            
-            # store generation info
-            widths.append(currentWidth)
-            heights.append(currentHeight)
-        
-        # add in some whitespace
-        width = width * whiteSpaceFactor
-##        rawHeight = height
-        height = height * whiteSpaceFactor - 20
-##        verticalWhiteSpace = max(
-##            (height - rawHeight) / (len(generations) - 1.0 or 2.0),
-##            40.0
-##        )
-        verticalWhiteSpace = 40.0
-        
-        sceneRect = self.umlView.sceneRect()
-        width += 50.0
-        height += 50.0
-        swidth = width < sceneRect.width() and sceneRect.width() or width
-        sheight = height < sceneRect.height() and sceneRect.height() or height
-        self.umlView.setSceneSize(swidth, sheight)
-        
-        # distribute each generation across the width and the
-        # generations across height
-        y = 10.0
-        for currentWidth, currentHeight, generation in \
-                itertools.zip_longest(widths, heights, generations):
-            x = 10.0
-            # whiteSpace is the space between any two elements
-            whiteSpace = (width - currentWidth - 20) / (len(generation) - 1.0 or 2.0)
-            for className in generation:
-                cw = self.__getCurrentShape(className)
-                cw.setPos(x, y)
-                rect = cw.sceneBoundingRect()
-                x = x + rect.width() + whiteSpace
-            y = y + currentHeight + verticalWhiteSpace
-        
-    def __addLocalClass(self, className, _class, x, y, isRbModule=False):
-        """
-        Private method to add a class defined in the module.
-        
-        @param className name of the class to be as a dictionary key (string)
-        @param _class class to be shown (ModuleParser.Class)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
-        @param isRbModule flag indicating a Ruby module (boolean)
-        """
-        meths = sorted(_class.methods.keys())
-        attrs = sorted(_class.attributes.keys())
-        name = _class.name
-        if isRbModule:
-            name = "{0} (Module)".format(name)
-        cl = ClassModel(name, meths[:], attrs[:])
-        cw = ClassItem(cl, False, x, y, noAttrs=self.noAttrs, scene=self.scene)
-        cw.setId(self.umlView.getItemId())
-        self.allClasses[className] = cw
-        if _class.name not in self.allModules[self.file]:
-            self.allModules[self.file].append(_class.name)
-        
-    def __addExternalClass(self, _class, x, y):
-        """
-        Private method to add a class defined outside the module.
-        
-        If the canvas is too small to take the shape, it
-        is enlarged.
-        
-        @param _class class to be shown (string)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
-        """
-        cl = ClassModel(_class)
-        cw = ClassItem(cl, True, x, y, noAttrs=self.noAttrs, scene=self.scene)
-        cw.setId(self.umlView.getItemId())
-        self.allClasses[_class] = cw
-        if _class not in self.allModules[self.file]:
-            self.allModules[self.file].append(_class)
-        
-    def __createAssociations(self, routes):
-        """
-        Private method to generate the associations between the class shapes.
-        
-        @param routes list of relationsships
-        """
-        for route in routes:
-            if len(route) > 1:
-                assoc = AssociationItem(
-                        self.__getCurrentShape(route[1]),
-                        self.__getCurrentShape(route[0]),
-                        Generalisation,
-                        topToBottom=True)
-                self.scene.addItem(assoc)
-        
-    def relayout(self):
-        """
-        Public method to relayout the diagram.
-        """
-        self.allClasses.clear()
-        self.allModules.clear()
-        self.__buildClasses()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Graphics/UMLClassDiagramBuilder.py	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,266 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2007 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing a dialog showing a UML like class diagram.
+"""
+
+import itertools
+
+from PyQt4.QtGui import QGraphicsTextItem
+
+import Utilities.ModuleParser
+import Preferences
+
+from .UMLDiagramBuilder import UMLDiagramBuilder
+from .ClassItem import ClassItem, ClassModel
+from .AssociationItem import AssociationItem, Generalisation
+from . import GraphicsUtilities
+
+
+class UMLClassDiagramBuilder(UMLDiagramBuilder):
+    """
+    Class implementing a builder for UML like class diagrams.
+    """
+    def __init__(self, dialog, view, project, file, noAttrs=False):
+        """
+        Constructor
+        
+        @param dialog reference to the UML dialog (UMLDialog)
+        @param view reference to the view object (UMLGraphicsView)
+        @param project reference to the project object (Project)
+        @param file file name of a python module to be shown (string)
+        @keyparam noAttrs flag indicating, that no attributes should be shown (boolean)
+        """
+        super().__init__(dialog, view, project)
+        self.setObjectName("UMLClassDiagramBuilder")
+        
+        self.file = file
+        self.noAttrs = noAttrs
+        
+        self.umlView.setPersistenceData("file={0}".format(file))
+        
+        pname = self.project.getProjectName()
+        if pname and self.project.isProjectSource(self.file):
+            name = self.trUtf8("Class Diagram {0}: {1}").format(
+                pname, project.getRelativePath(self.file))
+        else:
+            name = self.trUtf8("Class Diagram: {0}").format(self.file)
+        self.umlView.setDiagramName(name)
+        
+    def __getCurrentShape(self, name):
+        """
+        Private method to get the named shape.
+        
+        @param name name of the shape (string)
+        @return shape (QGraphicsItem)
+        """
+        return self.allClasses.get(name)
+        
+    def buildDiagram(self):
+        """
+        Public method to build the class shapes of the class diagram.
+        
+        The algorithm is borrowed from Boa Constructor.
+        """
+        self.allClasses = {}
+        self.allModules = {}
+        
+        try:
+            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(
+                self.trUtf8("The module <b>'{0}'</b> could not be found.")
+                    .format(self.file))
+            return
+        
+        if self.file not in self.allModules:
+            self.allModules[self.file] = []
+        
+        routes = []
+        nodes = []
+        todo = [module.createHierarchy()]
+        classesFound = False
+        while todo:
+            hierarchy = todo[0]
+            for className in hierarchy:
+                classesFound = True
+                cw = self.__getCurrentShape(className)
+                if not cw and className.find('.') >= 0:
+                    cw = self.__getCurrentShape(className.split('.')[-1])
+                    if cw:
+                        self.allClasses[className] = cw
+                        if className not in self.allModules[self.file]:
+                            self.allModules[self.file].append(className)
+                if cw and cw.noAttrs != self.noAttrs:
+                    cw = None
+                if cw and not (cw.external and \
+                               (className in module.classes or
+                                className in module.modules)
+                              ):
+                    if cw.scene() != self.scene:
+                        self.scene.addItem(cw)
+                        cw.setPos(10, 10)
+                        if className not in nodes:
+                            nodes.append(className)
+                else:
+                    if className in module.classes:
+                        # this is a local class (defined in this module)
+                        self.__addLocalClass(
+                            className, module.classes[className], 0, 0)
+                    elif className in module.modules:
+                        # this is a local module (defined in this module)
+                        self.__addLocalClass(
+                            className, module.modules[className], 0, 0, True)
+                    else:
+                        self.__addExternalClass(className, 0, 0)
+                    nodes.append(className)
+                
+                if hierarchy.get(className):
+                    todo.append(hierarchy.get(className))
+                    children = list(hierarchy.get(className).keys())
+                    for child in children:
+                        if (className, child) not in routes:
+                            routes.append((className, child))
+            
+            del todo[0]
+        
+        if classesFound:
+            self.__arrangeClasses(nodes, routes[:])
+            self.__createAssociations(routes)
+            self.umlView.autoAdjustSceneSize(limit=True)
+        else:
+            ct = QGraphicsTextItem(None, self.scene)
+            ct.setHtml(
+                self.trUtf8("The module <b>'{0}'</b> does not contain any classes.")\
+                .format(self.file))
+        
+    def __arrangeClasses(self, nodes, routes, whiteSpaceFactor=1.2):
+        """
+        Private method to arrange the shapes on the canvas.
+        
+        The algorithm is borrowed from Boa Constructor.
+        """
+        generations = GraphicsUtilities.sort(nodes, routes)
+        
+        # calculate width and height of all elements
+        sizes = []
+        for generation in generations:
+            sizes.append([])
+            for child in generation:
+                sizes[-1].append(self.__getCurrentShape(child).sceneBoundingRect())
+        
+        # calculate total width and total height
+        width = 0
+        height = 0
+        widths = []
+        heights = []
+        for generation in sizes:
+            currentWidth = 0
+            currentHeight = 0
+            
+            for rect in generation:
+                if rect.bottom() > currentHeight:
+                    currentHeight = rect.bottom()
+                currentWidth = currentWidth + rect.right()
+            
+            # update totals
+            if currentWidth > width:
+                width = currentWidth
+            height = height + currentHeight
+            
+            # store generation info
+            widths.append(currentWidth)
+            heights.append(currentHeight)
+        
+        # add in some whitespace
+        width = width * whiteSpaceFactor
+##        rawHeight = height
+        height = height * whiteSpaceFactor - 20
+##        verticalWhiteSpace = max(
+##            (height - rawHeight) / (len(generations) - 1.0 or 2.0),
+##            40.0
+##        )
+        verticalWhiteSpace = 40.0
+        
+        sceneRect = self.umlView.sceneRect()
+        width += 50.0
+        height += 50.0
+        swidth = width < sceneRect.width() and sceneRect.width() or width
+        sheight = height < sceneRect.height() and sceneRect.height() or height
+        self.umlView.setSceneSize(swidth, sheight)
+        
+        # distribute each generation across the width and the
+        # generations across height
+        y = 10.0
+        for currentWidth, currentHeight, generation in \
+                itertools.zip_longest(widths, heights, generations):
+            x = 10.0
+            # whiteSpace is the space between any two elements
+            whiteSpace = (width - currentWidth - 20) / (len(generation) - 1.0 or 2.0)
+            for className in generation:
+                cw = self.__getCurrentShape(className)
+                cw.setPos(x, y)
+                rect = cw.sceneBoundingRect()
+                x = x + rect.width() + whiteSpace
+            y = y + currentHeight + verticalWhiteSpace
+        
+    def __addLocalClass(self, className, _class, x, y, isRbModule=False):
+        """
+        Private method to add a class defined in the module.
+        
+        @param className name of the class to be as a dictionary key (string)
+        @param _class class to be shown (ModuleParser.Class)
+        @param x x-coordinate (float)
+        @param y y-coordinate (float)
+        @param isRbModule flag indicating a Ruby module (boolean)
+        """
+        meths = sorted(_class.methods.keys())
+        attrs = sorted(_class.attributes.keys())
+        name = _class.name
+        if isRbModule:
+            name = "{0} (Module)".format(name)
+        cl = ClassModel(name, meths[:], attrs[:])
+        cw = ClassItem(cl, False, x, y, noAttrs=self.noAttrs, scene=self.scene)
+        cw.setId(self.umlView.getItemId())
+        self.allClasses[className] = cw
+        if _class.name not in self.allModules[self.file]:
+            self.allModules[self.file].append(_class.name)
+        
+    def __addExternalClass(self, _class, x, y):
+        """
+        Private method to add a class defined outside the module.
+        
+        If the canvas is too small to take the shape, it
+        is enlarged.
+        
+        @param _class class to be shown (string)
+        @param x x-coordinate (float)
+        @param y y-coordinate (float)
+        """
+        cl = ClassModel(_class)
+        cw = ClassItem(cl, True, x, y, noAttrs=self.noAttrs, scene=self.scene)
+        cw.setId(self.umlView.getItemId())
+        self.allClasses[_class] = cw
+        if _class not in self.allModules[self.file]:
+            self.allModules[self.file].append(_class)
+        
+    def __createAssociations(self, routes):
+        """
+        Private method to generate the associations between the class shapes.
+        
+        @param routes list of relationsships
+        """
+        for route in routes:
+            if len(route) > 1:
+                assoc = AssociationItem(
+                        self.__getCurrentShape(route[1]),
+                        self.__getCurrentShape(route[0]),
+                        Generalisation,
+                        topToBottom=True)
+                self.scene.addItem(assoc)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Graphics/UMLDiagramBuilder.py	Sun Sep 09 17:40:32 2012 +0200
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2012 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing the UML diagram builder base class.
+"""
+
+from PyQt4.QtCore import QObject
+
+
+class UMLDiagramBuilder(QObject):
+    """
+    Class implementing the UML diagram builder base class.
+    """
+    def __init__(self, dialog, view, project):
+        """
+        Constructor
+        
+        @param dialog reference to the UML dialog (UMLDialog)
+        @param view reference to the view object (UMLGraphicsView)
+        @param project reference to the project object (Project)
+        """
+        super().__init__(dialog)
+        
+        self.umlView = view
+        self.scene = self.umlView.scene()
+        self.project = project
+    
+    def buildDiagram(self):
+        """
+        Public method to build the diagram.
+        
+        This class must be implemented in subclasses.
+        """
+        raise NotImplementedError(
+            "Method 'buildDiagram' must be implemented in subclasses.")
+    
+    def parsePersistenceData(self, data):
+        """
+        Public method to parse persisted data.
+        
+        @param dat persisted data to be parsed (string)
+        """
+        return
--- a/Graphics/UMLDialog.py	Sun Sep 09 14:46:59 2012 +0200
+++ b/Graphics/UMLDialog.py	Sun Sep 09 17:40:32 2012 +0200
@@ -20,28 +20,28 @@
     """
     Class implementing a dialog showing UML like diagrams.
     """
-    def __init__(self, diagramType, diagramName="Unnamed", buildFunction=None,
-                 parent=None, name=""):
+    ClassDiagram = 0
+    PackageDiagram = 1
+    ImportsDiagram = 2
+    ApplicationDiagram = 3
+    
+    def __init__(self, diagramType, project, path, parent=None, **kwargs):
         """
         Constructor
         
-        @param diagramType type of the diagram (string)
-        @param diagramName name of the diagram (string)
-        @param buildFunction function to build the diagram contents (function)
+        @param diagramType type of the diagram
+            (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram)
+        @param project reference to the project object (Project)
+        @param path file or directory path to build the diagram from (string)
         @param parent parent widget of the view (QWidget)
-        @param name name of the view widget (string)
+        @param kwargs diagram specific data
         """
         super().__init__(parent)
+        self.setObjectName("UMLDialog")
         
-        if not name:
-            self.setObjectName("UMLDialog")
-        else:
-            self.setObjectName(name)
-        
-        self.buildFunction = buildFunction
         self.scene = QGraphicsScene(0.0, 0.0, 800.0, 600.0)
-        self.umlView = UMLGraphicsView(self.scene, diagramType, diagramName,
-            self, "umlView")
+        self.umlView = UMLGraphicsView(self.scene, diagramType, parent=self)
+        self.builder = self.__diagramBuilder(diagramType, project, path, **kwargs)
         
         self.closeAct = \
             QAction(UI.PixmapCache.getIcon("close.png"),
@@ -58,19 +58,63 @@
         self.addToolBar(Qt.TopToolBarArea, self.umlToolBar)
         
         self.setCentralWidget(self.umlView)
-    
-    def setDiagramName(self, name):
-        """
-        Public slot to set the diagram name.
         
-        @param name diagram name (string)
-        """
-        self.umlView.setDiagramName(name)
+        self.umlView.relayout.connect(self.__relayout)
     
     def show(self):
         """
         Overriden method to show the dialog.
         """
-        if self.buildFunction:
-            self.buildFunction()
+        self.builder.buildDiagram()
         super().show()
+    
+    def __relayout(self):
+        """
+        Private method to relayout the diagram.
+        """
+        self.builder.buildDiagram()
+    
+    def __diagramBuilder(self, diagramType, project, path, **kwargs):
+        """
+        Private method to instantiate a diagram builder object.
+        
+        @param diagramType type of the diagram
+            (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram)
+        @param project reference to the project object (Project)
+        @param path file or directory path to build the diagram from (string)
+        @param kwargs diagram specific data
+        """
+        if diagramType == UMLDialog.ClassDiagram:
+            from .UMLClassDiagramBuilder import UMLClassDiagramBuilder
+            return UMLClassDiagramBuilder(self, self.umlView, project, path, **kwargs)
+        elif diagramType == UMLDialog.PackageDiagram:
+            from .PackageDiagramBuilder import PackageDiagramBuilder
+            return PackageDiagramBuilder(self, self.umlView, project, path, **kwargs)
+        elif diagramType == UMLDialog.ImportsDiagram:
+            from .ImportsDiagramBuilder import ImportsDiagramBuilder
+            return ImportsDiagramBuilder(self, self.umlView, project, path, **kwargs)
+        elif diagramType == UMLDialog.ApplicationDiagram:
+            from .ApplicationDiagramBuilder import ApplicationDiagramBuilder
+            return ApplicationDiagramBuilder(self, self.umlView, project, **kwargs)
+        else:
+            raise ValueError(
+                self.trUtf8("Illegal diagram type '{0}' given.").format(diagramType))
+    
+    def diagramTypeToString(self, diagramType):
+        """
+        Public method to convert the diagram type to a readable string.
+        
+        @param diagramType type of the diagram
+            (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram)
+        @return readable type string (string)
+        """
+        if diagramType == UMLDialog.ClassDiagram:
+            return "Class Diagram"
+        elif diagramType == UMLDialog.PackageDiagram:
+            return "Package Diagram"
+        elif diagramType == UMLDialog.ImportsDiagram:
+            return "Imports Diagram"
+        elif diagramType == UMLDialog.ApplicationDiagram:
+            return "Application Diagram"
+        else:
+            return "Illegal Diagram Type"
--- a/Graphics/UMLGraphicsView.py	Sun Sep 09 14:46:59 2012 +0200
+++ b/Graphics/UMLGraphicsView.py	Sun Sep 09 17:40:32 2012 +0200
@@ -34,23 +34,19 @@
     """
     relayout = pyqtSignal()
     
-    def __init__(self, scene, diagramType, diagramName="Unnamed", parent=None,
-                 name=None):
+    def __init__(self, scene, diagramType, parent=None):
         """
         Constructor
         
         @param scene reference to the scene object (QGraphicsScene)
         @param diagramType type of the diagram (string)
-        @param diagramName name of the diagram (string)
         @param parent parent widget of the view (QWidget)
-        @param name name of the view widget (string)
         """
         E5GraphicsView.__init__(self, scene, parent)
-        if name:
-            self.setObjectName(name)
+        self.setObjectName("UMLGraphicsView")
         self.setViewportUpdateMode(QGraphicsView.FullViewportUpdate)
         
-        self.diagramName = diagramName
+        self.diagramName = "Unnamed"
         self.diagramType = diagramType
         
         self.persistenceData = ""
@@ -674,7 +670,8 @@
         
         lines = [
             "version: 1.0",
-            "diagram_type: {0}".format(self.diagramType),
+            "diagram_type: {0} ({1})".format(self.diagramType,
+                self.parent().diagramTypeToString(self.diagramType)),
             "diagram_name: {0}".format(self.diagramName),
             "scene_size: {0};{1}".format(self.scene().width(), self.scene().height()),
         ]
--- a/Project/Project.py	Sun Sep 09 14:46:59 2012 +0200
+++ b/Project/Project.py	Sun Sep 09 17:40:32 2012 +0200
@@ -53,7 +53,7 @@
 from VCS.CommandOptionsDialog import vcsCommandOptionsDialog
 from VCS.ProjectHelper import VcsProjectHelper
 
-from Graphics.ApplicationDiagram import ApplicationDiagram
+from Graphics.UMLDialog import UMLDialog
 
 from DataViews.CodeMetricsDialog import CodeMetricsDialog
 from DataViews.PyCoverageDialog import PyCoverageDialog
@@ -3984,8 +3984,8 @@
             self.trUtf8("""Include module names?"""),
             yesDefault=True)
         
-        self.applicationDiagram = ApplicationDiagram(self, self.parent(),
-            noModules=not res)
+        self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self,
+                                            self.parent(), noModules=not res)
         self.applicationDiagram.show()
     
     #########################################################################
--- a/Project/ProjectSourcesBrowser.py	Sun Sep 09 14:46:59 2012 +0200
+++ b/Project/ProjectSourcesBrowser.py	Sun Sep 09 17:40:32 2012 +0200
@@ -22,10 +22,7 @@
 from DataViews.PyCoverageDialog import PyCoverageDialog
 from DataViews.PyProfileDialog import PyProfileDialog
 
-from Graphics.UMLClassDiagram import UMLClassDiagram
-from Graphics.ImportsDiagram import ImportsDiagram
-from Graphics.ApplicationDiagram import ApplicationDiagram
-from Graphics.PackageDiagram import PackageDiagram
+from Graphics.UMLDialog import UMLDialog
 
 from .ProjectBrowserModel import ProjectBrowserFileItem, \
     ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
@@ -861,7 +858,8 @@
             self.trUtf8("Class Diagram"),
             self.trUtf8("""Include class attributes?"""),
             yesDefault=True)
-        self.classDiagram = UMLClassDiagram(self.project, fn, self, noAttrs=not res)
+        self.classDiagram = UMLDialog(UMLDialog.ClassDiagram, self.project, fn,
+                                      self, noAttrs=not res)
         self.classDiagram.show()
         
     def __showImportsDiagram(self):
@@ -877,8 +875,8 @@
         res = E5MessageBox.yesNo(self,
             self.trUtf8("Imports Diagram"),
             self.trUtf8("""Include imports from external modules?"""))
-        self.importsDiagram = ImportsDiagram(self.project, package, self,
-            showExternalImports=res)
+        self.importsDiagram = UMLDialog(UMLDialog.ImportsDiagram, self.project, package,
+                                        self, showExternalImports=res)
         self.importsDiagram.show()
         
     def __showPackageDiagram(self):
@@ -895,7 +893,8 @@
             self.trUtf8("Package Diagram"),
             self.trUtf8("""Include class attributes?"""),
             yesDefault=True)
-        self.packageDiagram = PackageDiagram(self.project, package, self, noAttrs=not res)
+        self.packageDiagram = UMLDialog(UMLDialog.PackageDiagram, self.project, package,
+                                        self, noAttrs=not res)
         self.packageDiagram.show()
         
     def __showApplicationDiagram(self):
@@ -906,6 +905,6 @@
             self.trUtf8("Application Diagram"),
             self.trUtf8("""Include module names?"""),
             yesDefault=True)
-        self.applicationDiagram = ApplicationDiagram(self.project, self,
-            noModules=not res)
+        self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self.project,
+                                            self, noModules=not res)
         self.applicationDiagram.show()
--- a/QScintilla/Editor.py	Sun Sep 09 14:46:59 2012 +0200
+++ b/QScintilla/Editor.py	Sun Sep 09 17:40:32 2012 +0200
@@ -5792,11 +5792,11 @@
         """
         Private method to handle the Class Diagram context menu action.
         """
-        from Graphics.UMLClassDiagram import UMLClassDiagram
+        from Graphics.UMLDialog import UMLDialog
         if not self.checkDirty():
             return
         
-        self.classDiagram = UMLClassDiagram(self.project, self.fileName,
+        self.classDiagram = UMLDialog(UMLDialog.ClassDiagram, self.project, self.fileName,
             self, noAttrs=False)
         self.classDiagram.show()
         
@@ -5804,7 +5804,7 @@
         """
         Private method to handle the Package Diagram context menu action.
         """
-        from Graphics.PackageDiagram import PackageDiagram
+        from Graphics.UMLDialog import UMLDialog
         if not self.checkDirty():
             return
         
@@ -5814,14 +5814,15 @@
             self.trUtf8("Package Diagram"),
             self.trUtf8("""Include class attributes?"""),
             yesDefault=True)
-        self.packageDiagram = PackageDiagram(self.project, package, self, noAttrs=not res)
+        self.packageDiagram = UMLDialog(UMLDialog.PackageDiagram, self.project, package,
+                                        self, noAttrs=not res)
         self.packageDiagram.show()
         
     def __showImportsDiagram(self):
         """
         Private method to handle the Imports Diagram context menu action.
         """
-        from Graphics.ImportsDiagram import ImportsDiagram
+        from Graphics.UMLDialog import UMLDialog
         if not self.checkDirty():
             return
         
@@ -5830,21 +5831,21 @@
         res = E5MessageBox.yesNo(self,
             self.trUtf8("Imports Diagram"),
             self.trUtf8("""Include imports from external modules?"""))
-        self.importsDiagram = ImportsDiagram(self.project, package, self,
-            showExternalImports=res)
+        self.importsDiagram = UMLDialog(UMLDialog.ImportsDiagram, self.project, package,
+                                        self, showExternalImports=res)
         self.importsDiagram.show()
         
     def __showApplicationDiagram(self):
         """
         Private method to handle the Imports Diagram context menu action.
         """
-        from Graphics.ApplicationDiagram import ApplicationDiagram
+        from Graphics.UMLDialog import UMLDialog
         res = E5MessageBox.yesNo(self,
             self.trUtf8("Application Diagram"),
             self.trUtf8("""Include module names?"""),
             yesDefault=True)
-        self.applicationDiagram = ApplicationDiagram(self.project,
-                                    self, noModules=not res)
+        self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self.project,
+                                            self, noModules=not res)
         self.applicationDiagram.show()
     
     #######################################################################
--- a/eric5.e4p	Sun Sep 09 14:46:59 2012 +0200
+++ b/eric5.e4p	Sun Sep 09 17:40:32 2012 +0200
@@ -164,10 +164,6 @@
     <Source>Graphics/__init__.py</Source>
     <Source>Graphics/ZoomDialog.py</Source>
     <Source>Graphics/GraphicsUtilities.py</Source>
-    <Source>Graphics/UMLClassDiagram.py</Source>
-    <Source>Graphics/PackageDiagram.py</Source>
-    <Source>Graphics/ImportsDiagram.py</Source>
-    <Source>Graphics/ApplicationDiagram.py</Source>
     <Source>Project/ProjectResourcesBrowser.py</Source>
     <Source>Preferences/ToolGroupConfigurationDialog.py</Source>
     <Source>VCS/StatusMonitorThread.py</Source>
@@ -1039,6 +1035,11 @@
     <Source>E5Gui/E5TreeWidget.py</Source>
     <Source>Helpviewer/AdBlock/AdBlockTreeWidget.py</Source>
     <Source>Helpviewer/AdBlock/AdBlockExceptionsDialog.py</Source>
+    <Source>Graphics/UMLDiagramBuilder.py</Source>
+    <Source>Graphics/UMLClassDiagramBuilder.py</Source>
+    <Source>Graphics/PackageDiagramBuilder.py</Source>
+    <Source>Graphics/ImportsDiagramBuilder.py</Source>
+    <Source>Graphics/ApplicationDiagramBuilder.py</Source>
   </Sources>
   <Forms>
     <Form>PyUnit/UnittestDialog.ui</Form>

eric ide

mercurial