Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gmf')
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/.classpath7
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/.project28
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/META-INF/MANIFEST.MF15
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/build.properties14
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateDocumentRoot_map_Map.gifbin223 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_relations_Relationship.gifbin223 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_resources_Resource.gifbin223 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_rootTopics_Topic.gifbin223 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateThread_items_ThreadItem.gifbin223 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateTopic_comments_Thread.gifbin223 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/DocumentRoot.gifbin129 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Map.gifbin129 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Relationship.gifbin129 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Resource.gifbin129 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Thread.gifbin129 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/ThreadItem.gifbin129 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Topic.gifbin129 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/plugin.properties87
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/plugin.xml25
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/DocumentRootItemProvider.java171
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MapItemProvider.java216
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MindmapEditPlugin.java93
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MindmapItemProviderAdapterFactory.java347
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/RelationshipItemProvider.java231
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ResourceItemProvider.java231
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ThreadItemItemProvider.java208
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ThreadItemProvider.java251
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/TopicItemProvider.java368
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.classpath7
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.options7
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.project28
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/META-INF/MANIFEST.MF39
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/build.properties13
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/incomingLinksNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linkSourceNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linkTargetNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linksNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/obj16/MindmapDiagramFile.gifbin339 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/outgoingLinksNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/wizban/NewMindmapWizard.gifbin2466 -> 0 bytes
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/messages.properties65
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/plugin.properties45
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/plugin.xml533
-rwxr-xr-xexamples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/annotations.xml22
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/GMFEListPropertyHandler.java58
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/OpenMindmapDBEditor.java109
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/StoreController.java119
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/MindmapReorientConnectionViewCommand.java70
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicCreateCommand.java41
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicSubtopicsCreateCommand.java87
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicSubtopicsReorientCommand.java152
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/MapEditHelper.java7
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/MindmapBaseEditHelper.java69
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/TopicEditHelper.java7
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/MapEditPart.java43
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/MindmapEditPartFactory.java154
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicEditPart.java277
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicNameEditPart.java584
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicSubtopicsEditPart.java81
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MapCanonicalEditPolicy.java294
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MapItemSemanticEditPolicy.java61
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapBaseItemSemanticEditPolicy.java368
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapTextNonResizableEditPolicy.java203
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapTextSelectionEditPolicy.java187
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/TopicItemSemanticEditPolicy.java84
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/TopicSubtopicsItemSemanticEditPolicy.java20
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapAbstractNavigatorItem.java61
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorContentProvider.java233
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorItem.java118
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorLabelProvider.java101
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorActionProvider.java178
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorContentProvider.java427
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorGroup.java97
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorItem.java94
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorLabelProvider.java250
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorLinkHelper.java128
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorSorter.java27
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/AbstractParser.java440
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/CompositeParser.java75
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/MessageFormatParser.java210
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/Messages.java334
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapCreationWizard.java160
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapCreationWizardPage.java88
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramActionBarContributor.java24
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditor.java323
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditorPlugin.java248
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditorUtil.java439
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramUpdateCommand.java85
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramUpdater.java171
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDocumentProvider.java1116
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDomainModelElementTester.java47
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapInitDiagramFileAction.java101
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapLinkDescriptor.java93
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapLoadResourceAction.java66
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapMatchingStrategy.java36
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapNewDiagramFileWizard.java199
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapNodeDescriptor.java57
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapPaletteFactory.java126
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapUriEditorInputTester.java23
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapVisualIDRegistry.java188
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/ModelElementSelectionPage.java150
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramAppearancePreferencePage.java18
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramConnectionsPreferencePage.java18
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramGeneralPreferencePage.java18
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramPreferenceInitializer.java30
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramPrintingPreferencePage.java18
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramRulersAndGridPreferencePage.java18
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/ElementInitializers.java7
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapEditPartProvider.java142
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapElementTypes.java201
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapIconProvider.java32
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapModelingAssistantProvider.java202
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapParserProvider.java120
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapViewProvider.java176
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/sheet/MindmapPropertySection.java117
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/sheet/MindmapSheetLabelProvider.java80
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/MapViewFactory.java31
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/OtherEReferencePropertyHandler.java72
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicNameViewFactory.java21
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicSubtopicsViewFactory.java42
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicViewFactory.java65
-rwxr-xr-xexamples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/teneo.properties28
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/.classpath7
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/.project28
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/META-INF/MANIFEST.MF20
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/build.properties14
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/model/cdo_hibernate.hbm.xml227
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.ecore298
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.genmodel72
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfgen202
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfgraph44
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfmap48
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmftool31
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/plugin.properties20
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/plugin.xml26
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/DocumentRoot.java115
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Map.java111
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/MindmapFactory.java100
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/MindmapPackage.java1382
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Priority.java320
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Relationship.java168
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/RelationshipType.java239
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Resource.java125
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Thread.java135
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/ThreadItem.java112
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Topic.java340
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/DocumentRootImpl.java286
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/MapImpl.java300
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/MindmapFactoryImpl.java293
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/MindmapPackageImpl.java1064
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/RelationshipImpl.java378
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/ResourceImpl.java333
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/ThreadImpl.java382
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/ThreadItemImpl.java285
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/impl/TopicImpl.java639
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/util/MindmapAdapterFactory.java238
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/util/MindmapResourceFactoryImpl.java56
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/util/MindmapResourceImpl.java32
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/util/MindmapSwitch.java262
-rw-r--r--examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/util/MindmapXMLProcessor.java54
160 files changed, 0 insertions, 22881 deletions
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/.classpath b/examples/gmf/org.eclipse.gmf.examples.edit/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/.project b/examples/gmf/org.eclipse.gmf.examples.edit/.project
deleted file mode 100644
index a62039756..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gmf.examples.mindmap.edit</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/META-INF/MANIFEST.MF b/examples/gmf/org.eclipse.gmf.examples.edit/META-INF/MANIFEST.MF
deleted file mode 100644
index f7feaec76..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.gmf.examples.mindmap.edit; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.gmf.examples.mindmap.provider.MindmapEditPlugin$Implementation
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.gmf.examples.mindmap.provider
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.gmf.examples.mindmap;visibility:=reexport,
- org.eclipse.emf.edit;visibility:=reexport
-Eclipse-LazyStart: true
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/build.properties b/examples/gmf/org.eclipse.gmf.examples.edit/build.properties
deleted file mode 100644
index 580308908..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.1 2008/03/16 21:21:52 mtaal Exp $
-
-bin.includes = .,\
- icons/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateDocumentRoot_map_Map.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateDocumentRoot_map_Map.gif
deleted file mode 100644
index 3d308aaad..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateDocumentRoot_map_Map.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_relations_Relationship.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_relations_Relationship.gif
deleted file mode 100644
index 309abb616..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_relations_Relationship.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_resources_Resource.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_resources_Resource.gif
deleted file mode 100644
index 81b3c8840..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_resources_Resource.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_rootTopics_Topic.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_rootTopics_Topic.gif
deleted file mode 100644
index 1f06e1f1a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateMap_rootTopics_Topic.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateThread_items_ThreadItem.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateThread_items_ThreadItem.gif
deleted file mode 100644
index 73cc3c185..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateThread_items_ThreadItem.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateTopic_comments_Thread.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateTopic_comments_Thread.gif
deleted file mode 100644
index b8a285afb..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/ctool16/CreateTopic_comments_Thread.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/DocumentRoot.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/DocumentRoot.gif
deleted file mode 100644
index 739ebbfa6..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/DocumentRoot.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Map.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Map.gif
deleted file mode 100644
index c673a5200..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Map.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Relationship.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Relationship.gif
deleted file mode 100644
index 2124f3e3a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Relationship.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Resource.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Resource.gif
deleted file mode 100644
index 338fb8d9a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Resource.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Thread.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Thread.gif
deleted file mode 100644
index c4a8af418..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Thread.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/ThreadItem.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/ThreadItem.gif
deleted file mode 100644
index d92f34c8a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/ThreadItem.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Topic.gif b/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Topic.gif
deleted file mode 100644
index b1f8afa47..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/icons/full/obj16/Topic.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/plugin.properties b/examples/gmf/org.eclipse.gmf.examples.edit/plugin.properties
deleted file mode 100644
index 025da7f04..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/plugin.properties
+++ /dev/null
@@ -1,87 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: plugin.properties,v 1.1 2008/03/16 21:21:52 mtaal Exp $
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = Mindmap Edit Support
-providerName = www.example.org
-
-_UI_CreateChild_text = {0}
-_UI_CreateChild_text2 = {1} {0}
-_UI_CreateChild_text3 = {1}
-_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
-_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
-_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
-
-_UI_PropertyDescriptor_description = The {0} of the {1}
-
-_UI_DocumentRoot_type = Document Root
-_UI_Map_type = Map
-_UI_Relationship_type = Relationship
-_UI_Resource_type = Resource
-_UI_Thread_type = Thread
-_UI_ThreadItem_type = Thread Item
-_UI_Topic_type = Topic
-_UI_Unknown_type = Object
-
-_UI_Unknown_datatype= Value
-
-_UI_DocumentRoot_mixed_feature = Mixed
-_UI_DocumentRoot_xMLNSPrefixMap_feature = XMLNS Prefix Map
-_UI_DocumentRoot_xSISchemaLocation_feature = XSI Schema Location
-_UI_DocumentRoot_map_feature = Map
-_UI_Map_rootTopics_feature = Root Topics
-_UI_Map_relations_feature = Relations
-_UI_Map_resources_feature = Resources
-_UI_Map_title_feature = Title
-_UI_Relationship_label_feature = Label
-_UI_Relationship_source_feature = Source
-_UI_Relationship_target_feature = Target
-_UI_Relationship_type_feature = Type
-_UI_Resource_comments_feature = Comments
-_UI_Resource_email_feature = Email
-_UI_Resource_name_feature = Name
-_UI_Resource_topics_feature = Topics
-_UI_Thread_items_feature = Items
-_UI_Thread_author_feature = Author
-_UI_Thread_postDate_feature = Post Date
-_UI_Thread_subject_feature = Subject
-_UI_ThreadItem_author_feature = Author
-_UI_ThreadItem_body_feature = Body
-_UI_ThreadItem_itemPostDate_feature = Item Post Date
-_UI_Topic_comments_feature = Comments
-_UI_Topic_duration_feature = Duration
-_UI_Topic_endDate_feature = End Date
-_UI_Topic_name_feature = Name
-_UI_Topic_percentComplete_feature = Percent Complete
-_UI_Topic_priority_feature = Priority
-_UI_Topic_resources_feature = Resources
-_UI_Topic_startDate_feature = Start Date
-_UI_Topic_subtopics_feature = Subtopics
-_UI_XMLTypeDocumentRoot_comment_feature = Comment
-_UI_XMLTypeDocumentRoot_text_feature = Text
-_UI_XMLTypeDocumentRoot_processingInstruction_feature = Processing Instruction
-_UI_Unknown_feature = Unspecified
-
-_UI_Priority_ZERO_literal = ZERO
-_UI_Priority_ONE_literal = ONE
-_UI_Priority_TWO_literal = TWO
-_UI_Priority_THREE_literal = THREE
-_UI_Priority_FOUR_literal = FOUR
-_UI_Priority_FIVE_literal = FIVE
-_UI_RelationshipType_DEPENDENCY_literal = DEPENDENCY
-_UI_RelationshipType_INCLUDES_literal = INCLUDES
-_UI_RelationshipType_EXTENDS_literal = EXTENDS
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/plugin.xml b/examples/gmf/org.eclipse.gmf.examples.edit/plugin.xml
deleted file mode 100644
index 701158063..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/plugin.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
- <copyright>
- </copyright>
-
- $Id: plugin.xml,v 1.1 2008/03/16 21:21:52 mtaal Exp $
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <factory
- uri = "http://www.example.org/mindmap"
- class = "org.eclipse.gmf.examples.mindmap.provider.MindmapItemProviderAdapterFactory"
- supportedTypes =
- "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
- org.eclipse.emf.edit.provider.IStructuredItemContentProvider
- org.eclipse.emf.edit.provider.ITreeItemContentProvider
- org.eclipse.emf.edit.provider.IItemLabelProvider
- org.eclipse.emf.edit.provider.IItemPropertySource" />
- </extension>
-
-</plugin>
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/DocumentRootItemProvider.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/DocumentRootItemProvider.java
deleted file mode 100644
index ba6b80274..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/DocumentRootItemProvider.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DocumentRootItemProvider.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.gmf.examples.mindmap.DocumentRoot;
-import org.eclipse.gmf.examples.mindmap.MindmapFactory;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.gmf.examples.mindmap.DocumentRoot} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class DocumentRootItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DocumentRootItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(MindmapPackage.Literals.DOCUMENT_ROOT__MAP);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns DocumentRoot.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/DocumentRoot"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_DocumentRoot_type");
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(DocumentRoot.class)) {
- case MindmapPackage.DOCUMENT_ROOT__MAP:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (MindmapPackage.Literals.DOCUMENT_ROOT__MAP,
- MindmapFactory.eINSTANCE.createMap()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return MindmapEditPlugin.INSTANCE;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MapItemProvider.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MapItemProvider.java
deleted file mode 100644
index 8de573688..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MapItemProvider.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: MapItemProvider.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.gmf.examples.mindmap.Map;
-import org.eclipse.gmf.examples.mindmap.MindmapFactory;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.gmf.examples.mindmap.Map} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class MapItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MapItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addTitlePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Title feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTitlePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Map_title_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Map_title_feature", "_UI_Map_type"),
- MindmapPackage.Literals.MAP__TITLE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(MindmapPackage.Literals.MAP__ROOT_TOPICS);
- childrenFeatures.add(MindmapPackage.Literals.MAP__RELATIONS);
- childrenFeatures.add(MindmapPackage.Literals.MAP__RESOURCES);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns Map.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Map"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((Map)object).getTitle();
- return label == null || label.length() == 0 ?
- getString("_UI_Map_type") :
- getString("_UI_Map_type") + " " + label;
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Map.class)) {
- case MindmapPackage.MAP__TITLE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case MindmapPackage.MAP__ROOT_TOPICS:
- case MindmapPackage.MAP__RELATIONS:
- case MindmapPackage.MAP__RESOURCES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (MindmapPackage.Literals.MAP__ROOT_TOPICS,
- MindmapFactory.eINSTANCE.createTopic()));
-
- newChildDescriptors.add
- (createChildParameter
- (MindmapPackage.Literals.MAP__RELATIONS,
- MindmapFactory.eINSTANCE.createRelationship()));
-
- newChildDescriptors.add
- (createChildParameter
- (MindmapPackage.Literals.MAP__RESOURCES,
- MindmapFactory.eINSTANCE.createResource()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return MindmapEditPlugin.INSTANCE;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MindmapEditPlugin.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MindmapEditPlugin.java
deleted file mode 100644
index 2511b4120..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MindmapEditPlugin.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: MindmapEditPlugin.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-import org.eclipse.emf.common.EMFPlugin;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-/**
- * This is the central singleton for the Mindmap edit plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public final class MindmapEditPlugin extends EMFPlugin {
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final MindmapEditPlugin INSTANCE = new MindmapEditPlugin();
-
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static Implementation plugin;
-
- /**
- * Create the instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MindmapEditPlugin() {
- super
- (new ResourceLocator [] {
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- @Override
- public ResourceLocator getPluginResourceLocator() {
- return plugin;
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- public static Implementation getPlugin() {
- return plugin;
- }
-
- /**
- * The actual implementation of the Eclipse <b>Plugin</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class Implementation extends EclipsePlugin {
- /**
- * Creates an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Implementation() {
- super();
-
- // Remember the static instance.
- //
- plugin = this;
- }
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MindmapItemProviderAdapterFactory.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MindmapItemProviderAdapterFactory.java
deleted file mode 100644
index 2e4c30e90..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/MindmapItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: MindmapItemProviderAdapterFactory.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-
-import org.eclipse.gmf.examples.mindmap.util.MindmapAdapterFactory;
-
-/**
- * This is the factory that is used to provide the interfaces needed to support Viewers.
- * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
- * The adapters also support Eclipse property sheets.
- * Note that most of the adapters are shared among multiple instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class MindmapItemProviderAdapterFactory extends MindmapAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection<Object> supportedTypes = new ArrayList<Object>();
-
- /**
- * This constructs an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MindmapItemProviderAdapterFactory() {
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.mindmap.DocumentRoot} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected DocumentRootItemProvider documentRootItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.gmf.examples.mindmap.DocumentRoot}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createDocumentRootAdapter() {
- if (documentRootItemProvider == null) {
- documentRootItemProvider = new DocumentRootItemProvider(this);
- }
-
- return documentRootItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.mindmap.Map} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected MapItemProvider mapItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.gmf.examples.mindmap.Map}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createMapAdapter() {
- if (mapItemProvider == null) {
- mapItemProvider = new MapItemProvider(this);
- }
-
- return mapItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.mindmap.Relationship} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected RelationshipItemProvider relationshipItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.gmf.examples.mindmap.Relationship}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createRelationshipAdapter() {
- if (relationshipItemProvider == null) {
- relationshipItemProvider = new RelationshipItemProvider(this);
- }
-
- return relationshipItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.mindmap.Resource} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ResourceItemProvider resourceItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.gmf.examples.mindmap.Resource}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createResourceAdapter() {
- if (resourceItemProvider == null) {
- resourceItemProvider = new ResourceItemProvider(this);
- }
-
- return resourceItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.mindmap.Thread} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ThreadItemProvider threadItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.gmf.examples.mindmap.Thread}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createThreadAdapter() {
- if (threadItemProvider == null) {
- threadItemProvider = new ThreadItemProvider(this);
- }
-
- return threadItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.mindmap.ThreadItem} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ThreadItemItemProvider threadItemItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.gmf.examples.mindmap.ThreadItem}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createThreadItemAdapter() {
- if (threadItemItemProvider == null) {
- threadItemItemProvider = new ThreadItemItemProvider(this);
- }
-
- return threadItemItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.mindmap.Topic} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TopicItemProvider topicItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.gmf.examples.mindmap.Topic}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createTopicAdapter() {
- if (topicItemProvider == null) {
- topicItemProvider = new TopicItemProvider(this);
- }
-
- return topicItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object type) {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object adapt(Object object, Object type) {
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * This adds a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This disposes all of the item providers created by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void dispose() {
- if (documentRootItemProvider != null) documentRootItemProvider.dispose();
- if (mapItemProvider != null) mapItemProvider.dispose();
- if (relationshipItemProvider != null) relationshipItemProvider.dispose();
- if (resourceItemProvider != null) resourceItemProvider.dispose();
- if (threadItemProvider != null) threadItemProvider.dispose();
- if (threadItemItemProvider != null) threadItemItemProvider.dispose();
- if (topicItemProvider != null) topicItemProvider.dispose();
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/RelationshipItemProvider.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/RelationshipItemProvider.java
deleted file mode 100644
index af7fca5e2..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/RelationshipItemProvider.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: RelationshipItemProvider.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.Relationship;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.gmf.examples.mindmap.Relationship} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class RelationshipItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public RelationshipItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addLabelPropertyDescriptor(object);
- addSourcePropertyDescriptor(object);
- addTargetPropertyDescriptor(object);
- addTypePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Label feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addLabelPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Relationship_label_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Relationship_label_feature", "_UI_Relationship_type"),
- MindmapPackage.Literals.RELATIONSHIP__LABEL,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Source feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addSourcePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Relationship_source_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Relationship_source_feature", "_UI_Relationship_type"),
- MindmapPackage.Literals.RELATIONSHIP__SOURCE,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Target feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTargetPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Relationship_target_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Relationship_target_feature", "_UI_Relationship_type"),
- MindmapPackage.Literals.RELATIONSHIP__TARGET,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Type feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Relationship_type_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Relationship_type_feature", "_UI_Relationship_type"),
- MindmapPackage.Literals.RELATIONSHIP__TYPE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns Relationship.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Relationship"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((Relationship)object).getLabel();
- return label == null || label.length() == 0 ?
- getString("_UI_Relationship_type") :
- getString("_UI_Relationship_type") + " " + label;
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Relationship.class)) {
- case MindmapPackage.RELATIONSHIP__LABEL:
- case MindmapPackage.RELATIONSHIP__TYPE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return MindmapEditPlugin.INSTANCE;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ResourceItemProvider.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ResourceItemProvider.java
deleted file mode 100644
index ff8505676..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ResourceItemProvider.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ResourceItemProvider.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.Resource;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.gmf.examples.mindmap.Resource} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ResourceItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addCommentsPropertyDescriptor(object);
- addEmailPropertyDescriptor(object);
- addNamePropertyDescriptor(object);
- addTopicsPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Comments feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addCommentsPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Resource_comments_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Resource_comments_feature", "_UI_Resource_type"),
- MindmapPackage.Literals.RESOURCE__COMMENTS,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Email feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addEmailPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Resource_email_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Resource_email_feature", "_UI_Resource_type"),
- MindmapPackage.Literals.RESOURCE__EMAIL,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Name feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Resource_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Resource_name_feature", "_UI_Resource_type"),
- MindmapPackage.Literals.RESOURCE__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Topics feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTopicsPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Resource_topics_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Resource_topics_feature", "_UI_Resource_type"),
- MindmapPackage.Literals.RESOURCE__TOPICS,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This returns Resource.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Resource"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((Resource)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_Resource_type") :
- getString("_UI_Resource_type") + " " + label;
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Resource.class)) {
- case MindmapPackage.RESOURCE__EMAIL:
- case MindmapPackage.RESOURCE__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return MindmapEditPlugin.INSTANCE;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ThreadItemItemProvider.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ThreadItemItemProvider.java
deleted file mode 100644
index f48e72a1d..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ThreadItemItemProvider.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ThreadItemItemProvider.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.ThreadItem;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.gmf.examples.mindmap.ThreadItem} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ThreadItemItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ThreadItemItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addAuthorPropertyDescriptor(object);
- addBodyPropertyDescriptor(object);
- addItemPostDatePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Author feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addAuthorPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ThreadItem_author_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ThreadItem_author_feature", "_UI_ThreadItem_type"),
- MindmapPackage.Literals.THREAD_ITEM__AUTHOR,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Body feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addBodyPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ThreadItem_body_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ThreadItem_body_feature", "_UI_ThreadItem_type"),
- MindmapPackage.Literals.THREAD_ITEM__BODY,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Item Post Date feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addItemPostDatePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ThreadItem_itemPostDate_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ThreadItem_itemPostDate_feature", "_UI_ThreadItem_type"),
- MindmapPackage.Literals.THREAD_ITEM__ITEM_POST_DATE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns ThreadItem.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/ThreadItem"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ThreadItem)object).getBody();
- return label == null || label.length() == 0 ?
- getString("_UI_ThreadItem_type") :
- getString("_UI_ThreadItem_type") + " " + label;
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(ThreadItem.class)) {
- case MindmapPackage.THREAD_ITEM__BODY:
- case MindmapPackage.THREAD_ITEM__ITEM_POST_DATE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return MindmapEditPlugin.INSTANCE;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ThreadItemProvider.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ThreadItemProvider.java
deleted file mode 100644
index c79329cc7..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/ThreadItemProvider.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ThreadItemProvider.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import javax.xml.datatype.XMLGregorianCalendar;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.gmf.examples.mindmap.MindmapFactory;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.gmf.examples.mindmap.Thread} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ThreadItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ThreadItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addAuthorPropertyDescriptor(object);
- addPostDatePropertyDescriptor(object);
- addSubjectPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Author feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addAuthorPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Thread_author_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Thread_author_feature", "_UI_Thread_type"),
- MindmapPackage.Literals.THREAD__AUTHOR,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Post Date feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addPostDatePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Thread_postDate_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Thread_postDate_feature", "_UI_Thread_type"),
- MindmapPackage.Literals.THREAD__POST_DATE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Subject feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addSubjectPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Thread_subject_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Thread_subject_feature", "_UI_Thread_type"),
- MindmapPackage.Literals.THREAD__SUBJECT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(MindmapPackage.Literals.THREAD__ITEMS);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns Thread.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Thread"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- XMLGregorianCalendar labelValue = ((org.eclipse.gmf.examples.mindmap.Thread)object).getPostDate();
- String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ?
- getString("_UI_Thread_type") :
- getString("_UI_Thread_type") + " " + label;
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(org.eclipse.gmf.examples.mindmap.Thread.class)) {
- case MindmapPackage.THREAD__POST_DATE:
- case MindmapPackage.THREAD__SUBJECT:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case MindmapPackage.THREAD__ITEMS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (MindmapPackage.Literals.THREAD__ITEMS,
- MindmapFactory.eINSTANCE.createThreadItem()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return MindmapEditPlugin.INSTANCE;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/TopicItemProvider.java b/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/TopicItemProvider.java
deleted file mode 100644
index e48471249..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.edit/src/org/eclipse/gmf/examples/mindmap/provider/TopicItemProvider.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: TopicItemProvider.java,v 1.1 2008/03/16 21:21:53 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.gmf.examples.mindmap.MindmapFactory;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.Topic;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.gmf.examples.mindmap.Topic} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class TopicItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public TopicItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addDurationPropertyDescriptor(object);
- addEndDatePropertyDescriptor(object);
- addNamePropertyDescriptor(object);
- addPercentCompletePropertyDescriptor(object);
- addPriorityPropertyDescriptor(object);
- addResourcesPropertyDescriptor(object);
- addStartDatePropertyDescriptor(object);
- addSubtopicsPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Duration feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addDurationPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Topic_duration_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Topic_duration_feature", "_UI_Topic_type"),
- MindmapPackage.Literals.TOPIC__DURATION,
- true,
- false,
- false,
- ItemPropertyDescriptor.REAL_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the End Date feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addEndDatePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Topic_endDate_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Topic_endDate_feature", "_UI_Topic_type"),
- MindmapPackage.Literals.TOPIC__END_DATE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Name feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Topic_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Topic_name_feature", "_UI_Topic_type"),
- MindmapPackage.Literals.TOPIC__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Percent Complete feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addPercentCompletePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Topic_percentComplete_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Topic_percentComplete_feature", "_UI_Topic_type"),
- MindmapPackage.Literals.TOPIC__PERCENT_COMPLETE,
- true,
- false,
- false,
- ItemPropertyDescriptor.REAL_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Priority feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addPriorityPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Topic_priority_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Topic_priority_feature", "_UI_Topic_type"),
- MindmapPackage.Literals.TOPIC__PRIORITY,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Resources feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addResourcesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Topic_resources_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Topic_resources_feature", "_UI_Topic_type"),
- MindmapPackage.Literals.TOPIC__RESOURCES,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Start Date feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addStartDatePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Topic_startDate_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Topic_startDate_feature", "_UI_Topic_type"),
- MindmapPackage.Literals.TOPIC__START_DATE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Subtopics feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addSubtopicsPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Topic_subtopics_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Topic_subtopics_feature", "_UI_Topic_type"),
- MindmapPackage.Literals.TOPIC__SUBTOPICS,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(MindmapPackage.Literals.TOPIC__COMMENTS);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns Topic.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Topic"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((Topic)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_Topic_type") :
- getString("_UI_Topic_type") + " " + label;
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Topic.class)) {
- case MindmapPackage.TOPIC__DURATION:
- case MindmapPackage.TOPIC__END_DATE:
- case MindmapPackage.TOPIC__NAME:
- case MindmapPackage.TOPIC__PERCENT_COMPLETE:
- case MindmapPackage.TOPIC__PRIORITY:
- case MindmapPackage.TOPIC__START_DATE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case MindmapPackage.TOPIC__COMMENTS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (MindmapPackage.Literals.TOPIC__COMMENTS,
- MindmapFactory.eINSTANCE.createThread()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return MindmapEditPlugin.INSTANCE;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.classpath b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.options b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.options
deleted file mode 100644
index bbbac07b8..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.options
+++ /dev/null
@@ -1,7 +0,0 @@
-# Tracing options for the org.eclipse.gmf.examples.mindmap.diagram plug-in
-
-# Common issues
-org.eclipse.gmf.examples.mindmap.diagram/debug=false
-
-# Visual IDs
-org.eclipse.gmf.examples.mindmap.diagram/debug/visualID=false
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.project b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.project
deleted file mode 100644
index d7a98c743..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gmf.examples.mindmap.diagram</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/META-INF/MANIFEST.MF b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/META-INF/MANIFEST.MF
deleted file mode 100644
index f06f115c4..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,39 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.gmf.examples.mindmap.diagram; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.gmf.examples.mindmap.diagram.edit.parts,
- org.eclipse.gmf.examples.mindmap.diagram.part,
- org.eclipse.gmf.examples.mindmap.diagram.providers
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.core.expressions,
- org.eclipse.jface,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.ui.navigator,
- org.eclipse.ui.navigator.resources,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.emf.edit.ui,
- org.eclipse.gmf.runtime.emf.core,
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.gmf.runtime.emf.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.gmf.runtime.diagram.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.providers.ide,
- org.eclipse.gmf.runtime.diagram.ui.render,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
- org.eclipse.gmf.examples.mindmap;visibility:=reexport,
- org.eclipse.gmf.examples.mindmap.edit;visibility:=reexport,
- org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
- org.eclipse.draw2d;visibility:=reexport,
- org.eclipse.gef;visibility:=reexport
-Eclipse-LazyStart: true
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/build.properties b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/build.properties
deleted file mode 100644
index 5841150a7..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-bin.includes = .,\
- icons/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties,\
- messages.properties,\
- .options,\
- src/teneo.properties,\
- src/annotations.xml
-jars.compile.order = .
-source.. = src/
-output.. = bin/
-bin.excludes = src/org/
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/incomingLinksNavigatorGroup.gif b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/incomingLinksNavigatorGroup.gif
deleted file mode 100644
index fca9c53e6..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/incomingLinksNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linkSourceNavigatorGroup.gif b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linkSourceNavigatorGroup.gif
deleted file mode 100644
index fca9c53e6..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linkSourceNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linkTargetNavigatorGroup.gif b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linkTargetNavigatorGroup.gif
deleted file mode 100644
index fca9c53e6..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linkTargetNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linksNavigatorGroup.gif b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linksNavigatorGroup.gif
deleted file mode 100644
index fca9c53e6..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/linksNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/obj16/MindmapDiagramFile.gif b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/obj16/MindmapDiagramFile.gif
deleted file mode 100644
index 183d42559..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/obj16/MindmapDiagramFile.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/outgoingLinksNavigatorGroup.gif b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/outgoingLinksNavigatorGroup.gif
deleted file mode 100644
index fca9c53e6..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/outgoingLinksNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/wizban/NewMindmapWizard.gif b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/wizban/NewMindmapWizard.gif
deleted file mode 100644
index 1e5769f07..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/icons/wizban/NewMindmapWizard.gif
+++ /dev/null
Binary files differ
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/messages.properties b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/messages.properties
deleted file mode 100644
index 12987bb9d..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/messages.properties
+++ /dev/null
@@ -1,65 +0,0 @@
-
-# TODO: manually put keys and values
-MindmapCreationWizardTitle=New Mindmap Diagram
-MindmapCreationWizard_DiagramModelFilePageTitle=Create Mindmap Diagram
-MindmapCreationWizard_DiagramModelFilePageDescription=Select file that will contain diagram model.
-MindmapCreationWizard_DomainModelFilePageTitle=Create Mindmap Diagram
-MindmapCreationWizard_DomainModelFilePageDescription=Select file that will contain domain model.
-MindmapCreationWizardOpenEditorError=Error opening diagram editor
-MindmapCreationWizardCreationError=Creation Problems
-MindmapCreationWizardPageExtensionError=File name should have {0} extension.
-MindmapDiagramEditorUtil_OpenModelResourceErrorDialogTitle=Error
-MindmapDiagramEditorUtil_OpenModelResourceErrorDialogMessage=Failed to load model file {0}
-MindmapDiagramEditorUtil_CreateDiagramProgressTask=Creating diagram and model files
-MindmapDiagramEditorUtil_CreateDiagramCommandLabel=Creating diagram and model
-MindmapDocumentProvider_isModifiable=Updating cache failed
-MindmapDocumentProvider_handleElementContentChanged=Failed to refresh hierarchy for changed resource
-MindmapDocumentProvider_IncorrectInputError={1}
-MindmapDocumentProvider_NoDiagramInResourceError=Diagram is not present in resource
-MindmapDocumentProvider_DiagramLoadingError=Error loading diagram
-MindmapDocumentProvider_UnsynchronizedFileSaveError=The file has been changed on the file system
-MindmapDocumentProvider_SaveDiagramTask=Saving diagram
-MindmapDocumentProvider_SaveNextResourceTask=Saving {0}
-MindmapDocumentProvider_SaveAsOperation=Saving {0} diagram as
-MindmapInitDiagramFileAction_InitDiagramFileResourceErrorDialogTitle=Error
-MindmapInitDiagramFileAction_InitDiagramFileResourceErrorDialogMessage=Model file loading failed
-MindmapInitDiagramFileAction_InitDiagramFileWizardTitle=Initialize new {0} diagram file
-MindmapInitDiagramFileAction_OpenModelFileDialogTitle=Select domain model
-MindmapNewDiagramFileWizard_CreationPageName=Initialize new diagram file
-MindmapNewDiagramFileWizard_CreationPageTitle=Diagram file
-MindmapNewDiagramFileWizard_CreationPageDescription=Create new diagram based on {0} model content
-MindmapNewDiagramFileWizard_RootSelectionPageName=Select diagram root element
-MindmapNewDiagramFileWizard_RootSelectionPageTitle=Diagram root element
-MindmapNewDiagramFileWizard_RootSelectionPageDescription=Select semantic model element to be depicted on diagram
-MindmapNewDiagramFileWizard_RootSelectionPageSelectionTitle=Select diagram root element:
-MindmapNewDiagramFileWizard_RootSelectionPageNoSelectionMessage=Diagram root element is not selected
-MindmapNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage=Invalid diagram root element is selected
-MindmapNewDiagramFileWizard_InitDiagramCommand=Initializing diagram contents
-MindmapNewDiagramFileWizard_IncorrectRootError=Incorrect model object stored as a root resource object
-MindmapDiagramEditor_SavingDeletedFile=The original file "{0}" has been deleted.
-MindmapDiagramEditor_SaveAsErrorTitle=Problem During Save As...
-MindmapDiagramEditor_SaveAsErrorMessage=Save could not be completed. Target file is already open in another editor.
-MindmapDiagramEditor_SaveErrorTitle=Save Problems
-MindmapDiagramEditor_SaveErrorMessage=Could not save file.
-MindmapElementChooserDialog_SelectModelElementTitle=Select model element
-ModelElementSelectionPageMessage=Select model element:
-ValidateActionMessage=Validate
-Mindmap1Group_title=mindmap
-Topic1CreationTool_title=Topic
-Topic1CreationTool_desc=Create new Topic
-TopicSubtopics2CreationTool_title=TopicSubtopics
-TopicSubtopics2CreationTool_desc=Create new TopicSubtopics
-
-CommandName_OpenDiagram=Open Diagram
-NavigatorGroupName_Map_79_links=links
-NavigatorGroupName_Topic_1001_incominglinks=incoming links
-NavigatorGroupName_Topic_1001_outgoinglinks=outgoing links
-NavigatorGroupName_TopicSubtopics_3001_target=target
-NavigatorGroupName_TopicSubtopics_3001_source=source
-NavigatorActionProvider_OpenDiagramActionName=Open Diagram
-AbstractParser_UnexpectedValueTypeMessage=Value of type {0} is expected
-AbstractParser_WrongStringConversionMessage=String value does not convert to {0} value
-AbstractParser_UnknownLiteralMessage=Unknown literal: {0}
-MessageFormatParser_InvalidInputError=Invalid input at {0}
-MindmapModelingAssistantProviderTitle=Select domain model element
-MindmapModelingAssistantProviderMessage=Available domain model elements:
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/plugin.properties b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/plugin.properties
deleted file mode 100644
index 93e1971be..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/plugin.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-pluginName=Mindmap Plugin
-providerName=Sample Plugin Provider, Inc
-
-preferences.general=Mindmap Diagram
-preferences.appearance=Appearance
-preferences.connections=Connections
-preferences.printing=Printing
-preferences.rulersAndGrid=Rulers & Grid
-preferences.pathmaps=Path Maps
-
-editorName=Mindmap Diagram Editing
-context.description=Mindmap Diagram Editing
-context.name=In Mindmap Diagram Editor
-newWizardName=Mindmap Diagram
-newWizardDesc=Creates Mindmap diagram.
-
-initDiagramActionLabel=Initialize mindmap_diagram diagram file
-loadResourceActionLabel=Load Resource...
-
-
-navigatorContentName=*.mindmap_diagram diagram contents
-domainNavigatorContentName=*.mindmap model contents
-update.diagram.name=Update Mindmap diagram
-update.diagram.description=Perform Mindmap diagram update
-
-
-# Property Sheet
-tab.appearance=Appearance
-tab.diagram=Rulers & Grid
-tab.domain=Core
-
-# Preferences
-preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.general=Mindmap Diagram
-preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.appearance=Appearance
-preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.connections=Connections
-preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.printing=Printing
-preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.rulersAndGrid=Rulers And Grid
-preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.pathmaps=Pathmaps
-
-
-# Providers
-metatype.name.Map_79=Undefined
-metatype.name.Topic_1001=Topic
-metatype.name.TopicSubtopics_3001=Undefined
-
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/plugin.xml b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/plugin.xml
deleted file mode 100644
index e666f8435..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/plugin.xml
+++ /dev/null
@@ -1,533 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.team.core.fileTypes">
- <?gmfgen generated="true"?>
- <fileTypes
- type="text"
- extension="mindmap_diagram">
- </fileTypes>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <?gmfgen generated="true"?>
- <parser
- type="mindmap_diagram"
- class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory">
- </parser>
- </extension>
-
- <extension point="org.eclipse.ui.editors">
- <?gmfgen generated="true"?>
- <editor
- id="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorID"
- name="%editorName"
- icon="icons/obj16/MindmapDiagramFile.gif"
- extensions="mindmap_diagram"
- default="true"
- class="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditor"
- matchingStrategy="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapMatchingStrategy"
- contributorClass="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramActionBarContributor">
- </editor>
- </extension>
-
- <extension point="org.eclipse.ui.contexts">
- <?gmfgen generated="true"?>
- <context
- description="%context.description"
- id="org.eclipse.gmf.examples.mindmap.diagram.ui.diagramContext"
- name="%context.name"
- parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
- </context>
- </extension>
-
- <extension point="org.eclipse.ui.newWizards">
- <?gmfgen generated="true"?>
- <wizard
- name="%newWizardName"
- icon="icons/obj16/MindmapDiagramFile.gif"
- category="org.eclipse.ui.Examples"
- class="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapCreationWizard"
- id="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapCreationWizardID">
- <description>%newWizardDesc</description>
- </wizard>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <?gmfgen generated="true"?>
- <objectContribution
- adaptable="false"
- id="org.eclipse.gmf.examples.mindmap.diagram.LoadResource"
- objectClass="org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart">
- <action
- class="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapLoadResourceAction"
- enablesFor="1"
- id="org.eclipse.gmf.examples.mindmap.diagram.LoadResourceAction"
- label="%loadResourceActionLabel"
- menubarPath="additions">
- </action>
- </objectContribution>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <?gmfgen generated="true"?>
- <objectContribution
- id="org.eclipse.gmf.examples.mindmap.diagram.InitDiagram"
- nameFilter="*.mindmap"
- objectClass="org.eclipse.core.resources.IFile">
- <action
- label="%initDiagramActionLabel"
- class="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapInitDiagramFileAction"
- menubarPath="additions"
- enablesFor="1"
- id="org.eclipse.gmf.examples.mindmap.diagram.InitDiagramAction">
- </action>
- </objectContribution>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders">
- <?gmfgen generated="true"?>
- <GlobalActionHandlerProvider
- class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandlerProvider"
- id="MindmapPresentation">
- <Priority name="Lowest"/>
- <ViewId id="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorID">
- <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
- <GlobalActionId actionId="delete"/>
- </ElementType>
- <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart">
- <GlobalActionId actionId="save"/>
- </ElementType>
- </ViewId>
- </GlobalActionHandlerProvider>
- <GlobalActionHandlerProvider
- class="org.eclipse.gmf.runtime.diagram.ui.providers.ide.providers.DiagramIDEGlobalActionHandlerProvider"
- id="MindmapPresentationIDE">
- <Priority name="Lowest"/>
- <ViewId id="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorID">
- <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
- <GlobalActionId actionId="bookmark"/>
- </ElementType>
- </ViewId>
- </GlobalActionHandlerProvider>
- <GlobalActionHandlerProvider
- class="org.eclipse.gmf.runtime.diagram.ui.render.providers.DiagramUIRenderGlobalActionHandlerProvider"
- id="MindmapRender">
- <Priority name="Lowest"/>
- <ViewId id="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorID">
- <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
- <GlobalActionId actionId="cut"/>
- <GlobalActionId actionId="copy"/>
- <GlobalActionId actionId="paste"/>
- </ElementType>
- </ViewId>
- </GlobalActionHandlerProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders">
- <?gmfgen generated="true"?>
- <contributionItemProvider
- class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContributionItemProvider"
- checkPluginLoaded="false">
- <Priority name="Low"/>
- <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider">
- <popupStructuredContributionCriteria objectClass="org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicSubtopicsEditPart"/>
- <popupAction path="/editGroup" id="deleteFromModelAction"/>
- <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/>
- </popupContribution>
- </contributionItemProvider>
- </extension>
-
- <extension point="org.eclipse.core.runtime.preferences">
- <?gmfgen generated="true"?>
- <initializer class="org.eclipse.gmf.examples.mindmap.diagram.preferences.DiagramPreferenceInitializer"/>
- </extension>
-
- <extension point="org.eclipse.ui.preferencePages">
- <?gmfgen generated="true"?>
- <page
- id="org.eclipse.gmf.examples.mindmap.diagram.general"
- name="%preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.general"
- class="org.eclipse.gmf.examples.mindmap.diagram.preferences.DiagramGeneralPreferencePage">
- </page>
- <page
- id="org.eclipse.gmf.examples.mindmap.diagram.appearance"
- name="%preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.appearance"
- category="org.eclipse.gmf.examples.mindmap.diagram.general"
- class="org.eclipse.gmf.examples.mindmap.diagram.preferences.DiagramAppearancePreferencePage">
- </page>
- <page
- id="org.eclipse.gmf.examples.mindmap.diagram.connections"
- name="%preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.connections"
- category="org.eclipse.gmf.examples.mindmap.diagram.general"
- class="org.eclipse.gmf.examples.mindmap.diagram.preferences.DiagramConnectionsPreferencePage">
- </page>
- <page
- id="org.eclipse.gmf.examples.mindmap.diagram.printing"
- name="%preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.printing"
- category="org.eclipse.gmf.examples.mindmap.diagram.general"
- class="org.eclipse.gmf.examples.mindmap.diagram.preferences.DiagramPrintingPreferencePage">
- </page>
- <page
- id="org.eclipse.gmf.examples.mindmap.diagram.rulersAndGrid"
- name="%preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.rulersAndGrid"
- category="org.eclipse.gmf.examples.mindmap.diagram.general"
- class="org.eclipse.gmf.examples.mindmap.diagram.preferences.DiagramRulersAndGridPreferencePage">
- </page>
- <page
- id="org.eclipse.gmf.examples.mindmap.diagram.pathmaps"
- name="%preference.page.title.org.eclipse.gmf.examples.mindmap.diagram.pathmaps"
- category="org.eclipse.gmf.examples.mindmap.diagram.general"
- class="org.eclipse.gmf.runtime.emf.ui.preferences.PathmapsPreferencePage">
- </page>
- </extension>
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
- <?gmfgen generated="true"?>
- <propertyContributor
- contributorId="org.eclipse.gmf.examples.mindmap.diagram"
- labelProvider="org.eclipse.gmf.examples.mindmap.diagram.sheet.MindmapSheetLabelProvider">
- <propertyCategory category="domain"/>
- <propertyCategory category="visual"/>
- <propertyCategory category="extra"/>
- </propertyContributor>
- </extension>
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
- <?gmfgen generated="true"?>
- <propertyTabs contributorId="org.eclipse.gmf.examples.mindmap.diagram">
- <propertyTab
- category="visual"
- id="property.tab.AppearancePropertySection"
- label="%tab.appearance"/>
- <propertyTab
- category="visual"
- id="property.tab.DiagramPropertySection"
- label="%tab.diagram"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- </propertyTabs>
- </extension>
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
- <?gmfgen generated="true"?>
- <propertySections contributorId="org.eclipse.gmf.examples.mindmap.diagram">
- <propertySection id="property.section.ConnectorAppearancePropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.ShapeColorAndFontPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.RulerGridPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
- tab="property.tab.DiagramPropertySection">
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.gmf.examples.mindmap.diagram.sheet.MindmapPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- <input type="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapAbstractNavigatorItem"/>
- </propertySection>
- </propertySections>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="Mindmap"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints=""/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints=""/>
- </viewProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
- <?gmfgen generated="true"?>
- <editpartProvider class="org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapEditPartProvider">
- <Priority name="Lowest"/>
- </editpartProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders">
- <?gmfgen generated="true"?>
- <modelingAssistantProvider class="org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapModelingAssistantProvider">
- <Priority name="Lowest"/>
- </modelingAssistantProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapIconProvider">
- <Priority name="Low"/>
- </IconProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
- <?gmfgen generated="true"?>
- <metamodel nsURI="http://www.example.org/mindmap">
- <metamodelType
- id="org.eclipse.gmf.examples.mindmap.diagram.Map_79"
- name="%metatype.name.Map_79"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Map"
- edithelper="org.eclipse.gmf.examples.mindmap.diagram.edit.helpers.MapEditHelper">
- <param name="semanticHint" value="79"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.example.org/mindmap">
- <metamodelType
- id="org.eclipse.gmf.examples.mindmap.diagram.Topic_1001"
- name="%metatype.name.Topic_1001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Topic"
- edithelper="org.eclipse.gmf.examples.mindmap.diagram.edit.helpers.TopicEditHelper">
- <param name="semanticHint" value="1001"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.example.org/mindmap">
- <specializationType
- id="org.eclipse.gmf.examples.mindmap.diagram.TopicSubtopics_3001"
- name="%metatype.name.TopicSubtopics_3001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3001"/>
- </specializationType>
- </metamodel>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
- <?gmfgen generated="true"?>
- <clientContext id="MindmapClientContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.gmf.examples.mindmap.diagram.EditingDomain"/>
- </enablement>
- </clientContext>
- <binding context="MindmapClientContext">
- <elementType ref="org.eclipse.gmf.examples.mindmap.diagram.Map_79"/>
- <elementType ref="org.eclipse.gmf.examples.mindmap.diagram.Topic_1001"/>
- <elementType ref="org.eclipse.gmf.examples.mindmap.diagram.TopicSubtopics_3001"/>
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- </binding>
- </extension>
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <?gmfgen generated="true"?>
- <propertyTester
- id="org.eclipse.gmf.examples.mindmap.diagram.URIEditorInputPropertyTester"
- type="org.eclipse.emf.common.ui.URIEditorInput"
- namespace="org.eclipse.gmf.examples.mindmap.diagram"
- properties="isURIEditorInput"
- class="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapUriEditorInputTester">
- </propertyTester>
- </extension>
-
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <?gmfgen generated="true"?>
- <propertyTester
- id="org.eclipse.gmf.examples.mindmap.diagram.DomainModelElementPropertyTester"
- type="org.eclipse.emf.ecore.EObject"
- namespace="org.eclipse.gmf.examples.mindmap.diagram"
- properties="isDomainModelElement"
- class="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDomainModelElementTester">
- </propertyTester>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.viewer">
- <?gmfgen generated="true"?>
- <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension pattern="org.eclipse.gmf.examples.mindmap.diagram.resourceContent"/>
- <contentExtension pattern="org.eclipse.gmf.examples.mindmap.diagram.domainResourceContent"/>
- <contentExtension pattern="org.eclipse.gmf.examples.mindmap.diagram.navigatorLinkHelper"/>
- </includes>
- </viewerContentBinding>
- <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <actionExtension pattern="org.eclipse.gmf.examples.mindmap.diagram.navigatorActionProvider"/>
- </includes>
- </viewerActionBinding>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.navigatorContent">
- <?gmfgen generated="true"?>
- <navigatorContent
- id="org.eclipse.gmf.examples.mindmap.diagram.resourceContent"
- name="%navigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorContentProvider"
- labelProvider="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorLabelProvider"
- icon="icons/obj16/MindmapDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="mindmap_diagram"/>
- </and>
- <instanceof value="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapAbstractNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <or>
- <instanceof value="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapAbstractNavigatorItem"/>
- </or>
- </possibleChildren>
- <commonSorter
- id="org.eclipse.gmf.examples.mindmap.diagram.navigatorSorter"
- class="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorSorter">
- <parentExpression>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="mindmap_diagram"/>
- </and>
- <instanceof value="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapAbstractNavigatorItem"/>
- </or>
- </parentExpression>
- </commonSorter>
- </navigatorContent>
- <navigatorContent
- id="org.eclipse.gmf.examples.mindmap.diagram.domainResourceContent"
- name="%domainNavigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapDomainNavigatorContentProvider"
- labelProvider="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapDomainNavigatorLabelProvider"
- icon="icons/obj16/MindmapDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="mindmap"/>
- </and>
- <and>
- <instanceof value="org.eclipse.emf.ecore.EObject"/>
- <test property="org.eclipse.gmf.examples.mindmap.diagram.isDomainModelElement"/>
- </and>
- </or>
- </triggerPoints>
- <possibleChildren>
- <and>
- <instanceof value="org.eclipse.emf.ecore.EObject"/>
- <test property="org.eclipse.gmf.examples.mindmap.diagram.isDomainModelElement"/>
- </and>
- </possibleChildren>
- </navigatorContent>
- <actionProvider
- id="org.eclipse.gmf.examples.mindmap.diagram.navigatorActionProvider"
- class="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorActionProvider">
- <enablement>
- <or>
- <instanceof value="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapAbstractNavigatorItem"/>
- </or>
- </enablement>
- </actionProvider>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.linkHelper">
- <?gmfgen generated="true"?>
- <linkHelper
- id="org.eclipse.gmf.examples.mindmap.diagram.navigatorLinkHelper"
- class="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorLinkHelper">
- <editorInputEnablement>
- <and>
- <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
- <test property="org.eclipse.gmf.examples.mindmap.diagram.isURIEditorInput"/>
- </and>
- </editorInputEnablement>
- <selectionEnablement>
- <instanceof value="org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapAbstractNavigatorItem"/>
- </selectionEnablement>
- </linkHelper>
- </extension>
- <extension point="org.eclipse.ui.commands">
- <?gmfgen generated="true"?>
- <command
- categoryId="org.eclipse.ui.category.edit"
- defaultHandler="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramUpdateCommand"
- description="%update.diagram.description"
- id="org.eclipse.gmf.examples.mindmap.diagram.updateDiagram"
- name="%update.diagram.name"/>
- </extension>
-
- <extension point="org.eclipse.ui.bindings">
- <?gmfgen generated="true"?>
- <key
- commandId="org.eclipse.gmf.examples.mindmap.diagram.updateDiagram"
- contextId="org.eclipse.gmf.examples.mindmap.diagram.ui.diagramContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="F5"/>
- </extension>
-
- <!--
- Part added for Teneo tutorial
- -->
-
- <!--
- Registers the db editor
- -->
- <extension point="org.eclipse.ui.editors">
- <?gmfgen generated="true"?>
- <editor
- id="org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorID.db"
- name="Mindmap DB Editor"
- extensions=""
- default="true"
- class="org.eclipse.gmf.examples.mindmap.diagram.db.MindmapDiagramDBEditor">
- </editor>
- </extension>
-
- <!--
- Adds a global menu, note is a rather simplistic method of adding a global menu option.
- -->
- <extension
- id="mindmap.gmf.editor.actions"
- point="org.eclipse.ui.actionSets">
- <actionSet
- id="mindmap.gmf.editor.actions"
- label="Mindmap DB"
- visible="true">
- <menu
- id="mmMenu"
- label="Mindmap DB">
- <separator
- name="mmgroup">
- </separator>
- </menu>
- <action
- id="mindmap.teneo.gmf.action0"
- label="Open DB Editor"
- menubarPath="mmMenu/mmgroup"
- style="push">
- <class
- class="org.eclipse.gmf.examples.mindmap.diagram.db.OpenMindmapDBEditor">
- </class>
- </action>
- </actionSet>
- </extension>
-
-
-</plugin>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/annotations.xml b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/annotations.xml
deleted file mode 100755
index 8108861fb..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/annotations.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<persistence-mapping xmlns="http://www.eclipse.org/emft/teneo"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <!-- Template for TestAction persistence mapping. -->
-
- <epackage namespace-uri="http://www.eclipse.org/gmf/runtime/1.0.1/notation">
-
- <eclass name="ShapeStyle">
- <entity extends="LineStyle"/>
- </eclass>
-
- <eclass name="DiagramStyle">
- <entity extends="PageStyle"/>
- </eclass>
-
- <eclass name="ConnectorStyle">
- <entity extends="RoutingStyle"/>
- </eclass>
- </epackage>
-
-</persistence-mapping> \ No newline at end of file
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/GMFEListPropertyHandler.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/GMFEListPropertyHandler.java
deleted file mode 100644
index bcffbbb7f..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/GMFEListPropertyHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2005, 2006, 2007, 2008 Springsite BV (The Netherlands) and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Taal - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: GMFEListPropertyHandler.java,v 1.1 2008/03/16 21:21:14 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.diagram.db;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.teneo.hibernate.mapping.property.EListPropertyHandler;
-import org.eclipse.gmf.runtime.notation.impl.NotationPackageImpl;
-
-/**
- * This specific EListPropertyHandler is required because of the specific
- * implementation of the GMF NotationPackageImpl. In the init method of this
- * EPackage the efeature for which a java member with the name persistedChildren
- * was generated is re-named to children. This confuses Teneo.
- *
- * See also here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=159226#c12
- *
- * @author mtaal@elver.org
- */
-
-public class GMFEListPropertyHandler extends EListPropertyHandler {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- protected String getFieldName(Object owner) {
- if (!(owner instanceof EObject)) { // can this occur?
- return super.getFieldName(owner);
- }
- final EObject eObject = (EObject) owner;
- final EClass eClass = eObject.eClass();
- final String featureName = super.getFieldName(owner);
- if (NotationPackageImpl.eINSTANCE.getDiagram().isSuperTypeOf(eClass)
- && featureName.compareTo("edges") == 0) {
- return "persistedEdges";
- }
-
- if (NotationPackageImpl.eINSTANCE.getView().isSuperTypeOf(eClass)
- && featureName.compareTo("children") == 0) {
- return "persistedChildren";
- }
- return featureName;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/OpenMindmapDBEditor.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/OpenMindmapDBEditor.java
deleted file mode 100644
index a0bfc7a47..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/OpenMindmapDBEditor.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2005, 2006, 2007, 2008 Springsite BV (The Netherlands) and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Taal - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: OpenMindmapDBEditor.java,v 1.1 2008/03/16 21:21:14 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.diagram.db;
-
-import java.io.IOException;
-import java.util.Collections;
-
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.teneo.hibernate.resource.HibernateXMLResource;
-import org.eclipse.gmf.examples.mindmap.Map;
-import org.eclipse.gmf.examples.mindmap.MindmapFactory;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditor;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * Rather generic class which opens an editor using the static ID member in the
- * MindmapDiagramDBEditor class.
- *
- * @author mtaal@elver.org
- */
-public class OpenMindmapDBEditor implements IWorkbenchWindowActionDelegate {
-
- private IWorkbenchWindow window;
-
- public void dispose() {
- }
-
- public void init(IWorkbenchWindow window) {
- this.window = window;
- StoreController.getInstance().initializeDataStore();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void run(IAction action) {
-
- try {
- initializeData();
- final IWorkbenchPage page = window.getActivePage();
- page.openEditor(new URIEditorInput(StoreController.DATABASE_URI),
- MindmapDiagramEditor.ID);
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- // Ensure that the resource at least contains a Map and a diagram object
- private void initializeData() {
- try {
- final Resource res = new HibernateXMLResource(
- StoreController.DATABASE_URI);
- res.load(Collections.EMPTY_MAP);
- boolean addMap = true;
- boolean addDiagram = true;
- Map map = null;
- for (Object o : res.getContents()) {
- if (o instanceof Map) {
- addMap = false;
- map = (Map) o;
- }
- if (o instanceof Diagram) {
- addDiagram = false;
- }
- }
- if (addMap) {
- map = MindmapFactory.eINSTANCE.createMap();
- res.getContents().add(map);
- }
- if (addDiagram) {
- Diagram diagram = ViewService.createDiagram(map,
- MapEditPart.MODEL_ID,
- MindmapDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- res.getContents().add(diagram);
- diagram.setName("mindmap");
- diagram.setElement(map);
- }
- if (addMap || addDiagram) {
- res.save(Collections.EMPTY_MAP);
- }
- res.unload();
- } catch (IOException e) {
- throw new IllegalStateException(e);
- }
- }
-} \ No newline at end of file
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/StoreController.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/StoreController.java
deleted file mode 100644
index d372a7b73..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/db/StoreController.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2005, 2006, 2007, 2008 Springsite BV (The Netherlands) and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Taal - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: StoreController.java,v 1.3 2009/06/28 20:06:17 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap.diagram.db;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-import org.eclipse.emf.teneo.PersistenceOptions;
-import org.eclipse.emf.teneo.hibernate.HbHelper;
-import org.eclipse.emf.teneo.hibernate.HbSessionDataStore;
-import org.eclipse.emf.teneo.hibernate.mapping.property.EListPropertyHandler;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.hibernate.Session;
-
-/**
- * This class manages one Hibernate Datastore, it offers static access to a singleton DataStore. It initializes the
- * datastore using the GMF and Ecore epackages and the properties in the teneo.properties.
- *
- * @author mtaal@elver.org
- */
-public class StoreController {
-
- // This database uri ensures that the Hibernate XML Resource is used and
- // that the
- // Map and the Diagram are loaded in the top of the resource. The dsname
- // parameter
- // is the name of the datastore initialized below.
- public static final URI DATABASE_URI = URI.createURI("hbxml://?dsname=mindmap&query1=from Map&query2=from Diagram");
-
- // provide easy access to the datastore
- private static StoreController instance = new StoreController();
-
- public static StoreController getInstance() {
- return instance;
- }
-
- private HbSessionDataStore dataStore = null;
- private boolean initialized = false;
-
- public Session getSession() {
- return getDataStore().getSessionFactory().openSession();
- }
-
- public HbSessionDataStore getDataStore() {
- if (dataStore == null) {
- dataStore = initializeDataStore();
- }
-
- return dataStore;
- }
-
- public void closeDataStore() {
- getDataStore().close();
- }
-
- public HbSessionDataStore initializeDataStore() {
- if (initialized) {
- return dataStore;
- }
-
- // create and register the datastore using the mindmap name
- final HbSessionDataStore localDataStore = new HbSessionDataStore();
- localDataStore.setName("mindmap");
- HbHelper.INSTANCE.register(localDataStore);
-
- // now register the epackages. There are four epackages:
- // 1) the model itself
- // 2) the GMF model
- // 3) the ecore model because GMF depends on it
- // 4) and the ecore XML type package
- final EPackage[] ePackages = new EPackage[] { MindmapPackage.eINSTANCE, NotationPackage.eINSTANCE,
- EcorePackage.eINSTANCE, XMLTypePackage.eINSTANCE };
- localDataStore.setEPackages(ePackages);
-
- // load the properties from the teneo.properties file
- try {
- final Properties props = new Properties();
- props.load(this.getClass().getResourceAsStream("/teneo.properties"));
-
- // handle multiple inheritance in the GMF model
- props.setProperty(PersistenceOptions.PERSISTENCE_XML, "/annotations.xml");
-
- localDataStore.setProperties(props);
- } catch (IOException e) {
- throw new IllegalStateException(e);
- }
-
- // solve a specific issue with the GMF model
- localDataStore.getExtensionManager().registerExtension(EListPropertyHandler.class.getName(),
- GMFEListPropertyHandler.class.getName());
-
- localDataStore.initialize();
-
- // print the hibernate mapping
- System.err.println(localDataStore.getMappingXML());
- initialized = true;
-
- return localDataStore;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/MindmapReorientConnectionViewCommand.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/MindmapReorientConnectionViewCommand.java
deleted file mode 100644
index cf0a82a92..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/MindmapReorientConnectionViewCommand.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.commands;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MindmapReorientConnectionViewCommand extends
- AbstractTransactionalCommand {
-
- /**
- * @generated
- */
- private IAdaptable edgeAdaptor;
-
- /**
- * @generated
- */
- public MindmapReorientConnectionViewCommand(
- TransactionalEditingDomain editingDomain, String label) {
- super(editingDomain, label, null);
- }
-
- /**
- * @generated
- */
- public List getAffectedFiles() {
- View view = (View) edgeAdaptor.getAdapter(View.class);
- if (view != null) {
- return getWorkspaceFiles(view);
- }
- return super.getAffectedFiles();
- }
-
- /**
- * @generated
- */
- public IAdaptable getEdgeAdaptor() {
- return edgeAdaptor;
- }
-
- /**
- * @generated
- */
- public void setEdgeAdaptor(IAdaptable edgeAdaptor) {
- this.edgeAdaptor = edgeAdaptor;
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(
- IProgressMonitor progressMonitor, IAdaptable info) {
- assert null != edgeAdaptor : "Null child in MindmapReorientConnectionViewCommand"; //$NON-NLS-1$
- Edge edge = (Edge) getEdgeAdaptor().getAdapter(Edge.class);
- assert null != edge : "Null edge in MindmapReorientConnectionViewCommand"; //$NON-NLS-1$
- View tempView = edge.getSource();
- edge.setSource(edge.getTarget());
- edge.setTarget(tempView);
- return CommandResult.newOKCommandResult();
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicCreateCommand.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicCreateCommand.java
deleted file mode 100644
index 9f94413cb..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicCreateCommand.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.commands;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class TopicCreateCommand extends CreateElementCommand {
-
- /**
- * @generated
- */
- public TopicCreateCommand(CreateElementRequest req) {
- super(req);
- }
-
- /**
- * @generated
- */
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- protected EClass getEClassToEdit() {
- return MindmapPackage.eINSTANCE.getMap();
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicSubtopicsCreateCommand.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicSubtopicsCreateCommand.java
deleted file mode 100644
index 383e99d17..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicSubtopicsCreateCommand.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.examples.mindmap.Topic;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.policies.MindmapBaseItemSemanticEditPolicy;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-
-/**
- * @generated
- */
-public class TopicSubtopicsCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final EObject source;
-
- /**
- * @generated
- */
- private final EObject target;
-
- /**
- * @generated
- */
- public TopicSubtopicsCreateCommand(CreateRelationshipRequest request,
- EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && !(source instanceof Topic)) {
- return false;
- }
- if (target != null && !(target instanceof Topic)) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- return MindmapBaseItemSemanticEditPolicy.LinkConstraints
- .canCreateTopicSubtopics_3001(getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException(
- "Invalid arguments in create link command"); //$NON-NLS-1$
- }
- if (getSource() != null && getTarget() != null) {
- getSource().getSubtopics().add(getTarget());
- }
- return CommandResult.newOKCommandResult();
- }
-
- /**
- * @generated
- */
- protected Topic getSource() {
- return (Topic) source;
- }
-
- /**
- * @generated
- */
- protected Topic getTarget() {
- return (Topic) target;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicSubtopicsReorientCommand.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicSubtopicsReorientCommand.java
deleted file mode 100644
index a0d8c5cc0..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/commands/TopicSubtopicsReorientCommand.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.examples.mindmap.Topic;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.policies.MindmapBaseItemSemanticEditPolicy;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-
-/**
- * @generated
- */
-public class TopicSubtopicsReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public TopicSubtopicsReorientCommand(
- ReorientReferenceRelationshipRequest request) {
- super(request.getLabel(), null, request);
- reorientDirection = request.getDirection();
- referenceOwner = request.getReferenceOwner();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if (!(referenceOwner instanceof Topic)) {
- return false;
- }
- if (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof Topic && newEnd instanceof Topic)) {
- return false;
- }
- return MindmapBaseItemSemanticEditPolicy.LinkConstraints
- .canExistTopicSubtopics_3001(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Topic && newEnd instanceof Topic)) {
- return false;
- }
- return MindmapBaseItemSemanticEditPolicy.LinkConstraints
- .canExistTopicSubtopics_3001(getOldSource(), getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException(
- "Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if (reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getOldSource().getSubtopics().remove(getOldTarget());
- getNewSource().getSubtopics().add(getOldTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().getSubtopics().remove(getOldTarget());
- getOldSource().getSubtopics().add(getNewTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected Topic getOldSource() {
- return (Topic) referenceOwner;
- }
-
- /**
- * @generated
- */
- protected Topic getNewSource() {
- return (Topic) newEnd;
- }
-
- /**
- * @generated
- */
- protected Topic getOldTarget() {
- return (Topic) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Topic getNewTarget() {
- return (Topic) newEnd;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/MapEditHelper.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/MapEditHelper.java
deleted file mode 100644
index 3addaaca3..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/MapEditHelper.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.helpers;
-
-/**
- * @generated
- */
-public class MapEditHelper extends MindmapBaseEditHelper {
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/MindmapBaseEditHelper.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/MindmapBaseEditHelper.java
deleted file mode 100644
index eabfcd376..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/MindmapBaseEditHelper.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.helpers;
-
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-
-/**
- * @generated
- */
-public class MindmapBaseEditHelper extends AbstractEditHelper {
-
- /**
- * @generated
- */
- public static final String EDIT_POLICY_COMMAND = "edit policy command"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- protected ICommand getInsteadCommand(IEditCommandRequest req) {
- ICommand epCommand = (ICommand) req.getParameter(EDIT_POLICY_COMMAND);
- req.setParameter(EDIT_POLICY_COMMAND, null);
- ICommand ehCommand = super.getInsteadCommand(req);
- if (epCommand == null) {
- return ehCommand;
- }
- if (ehCommand == null) {
- return epCommand;
- }
- CompositeCommand command = new CompositeCommand(null);
- command.add(epCommand);
- command.add(ehCommand);
- return command;
- }
-
- /**
- * @generated
- */
- protected ICommand getCreateCommand(CreateElementRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected ICommand getCreateRelationshipCommand(
- CreateRelationshipRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected ICommand getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return null;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/TopicEditHelper.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/TopicEditHelper.java
deleted file mode 100644
index 65ebb8cf7..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/helpers/TopicEditHelper.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.helpers;
-
-/**
- * @generated
- */
-public class TopicEditHelper extends MindmapBaseEditHelper {
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/MapEditPart.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/MapEditPart.java
deleted file mode 100644
index c29227a62..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/MapEditPart.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.parts;
-
-import org.eclipse.gmf.examples.mindmap.diagram.edit.policies.MapCanonicalEditPolicy;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.policies.MapItemSemanticEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MapEditPart extends DiagramEditPart {
-
- /**
- * @generated
- */
- public final static String MODEL_ID = "Mindmap"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 79;
-
- /**
- * @generated
- */
- public MapEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
- new MapItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE,
- new MapCanonicalEditPolicy());
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/MindmapEditPartFactory.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/MindmapEditPartFactory.java
deleted file mode 100644
index 3d5d128fe..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/MindmapEditPartFactory.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.parts;
-
-import org.eclipse.draw2d.FigureUtilities;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartFactory;
-import org.eclipse.gef.tools.CellEditorLocator;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @generated
- */
-public class MindmapEditPartFactory implements EditPartFactory {
-
- /**
- * @generated
- */
- public EditPart createEditPart(EditPart context, Object model) {
- if (model instanceof View) {
- View view = (View) model;
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
-
- case MapEditPart.VISUAL_ID:
- return new MapEditPart(view);
-
- case TopicEditPart.VISUAL_ID:
- return new TopicEditPart(view);
-
- case TopicNameEditPart.VISUAL_ID:
- return new TopicNameEditPart(view);
-
- case TopicSubtopicsEditPart.VISUAL_ID:
- return new TopicSubtopicsEditPart(view);
- }
- }
- return createUnrecognizedEditPart(context, model);
- }
-
- /**
- * @generated
- */
- private EditPart createUnrecognizedEditPart(EditPart context, Object model) {
- // Handle creation of unrecognized child node EditParts here
- return null;
- }
-
- /**
- * @generated
- */
- public static CellEditorLocator getTextCellEditorLocator(
- ITextAwareEditPart source) {
- if (source.getFigure() instanceof WrappingLabel)
- return new TextCellEditorLocator((WrappingLabel) source.getFigure());
- else {
- return new LabelCellEditorLocator((Label) source.getFigure());
- }
- }
-
- /**
- * @generated
- */
- static private class TextCellEditorLocator implements CellEditorLocator {
-
- /**
- * @generated
- */
- private WrappingLabel wrapLabel;
-
- /**
- * @generated
- */
- public TextCellEditorLocator(WrappingLabel wrapLabel) {
- this.wrapLabel = wrapLabel;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getWrapLabel() {
- return wrapLabel;
- }
-
- /**
- * @generated
- */
- public void relocate(CellEditor celleditor) {
- Text text = (Text) celleditor.getControl();
- Rectangle rect = getWrapLabel().getTextBounds().getCopy();
- getWrapLabel().translateToAbsolute(rect);
- if (getWrapLabel().isTextWrapOn()
- && getWrapLabel().getText().length() > 0) {
- rect.setSize(new Dimension(text.computeSize(rect.width,
- SWT.DEFAULT)));
- } else {
- int avr = FigureUtilities.getFontMetrics(text.getFont())
- .getAverageCharWidth();
- rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT,
- SWT.DEFAULT)).expand(avr * 2, 0));
- }
- if (!rect.equals(new Rectangle(text.getBounds()))) {
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
- }
- }
-
- /**
- * @generated
- */
- private static class LabelCellEditorLocator implements CellEditorLocator {
-
- /**
- * @generated
- */
- private Label label;
-
- /**
- * @generated
- */
- public LabelCellEditorLocator(Label label) {
- this.label = label;
- }
-
- /**
- * @generated
- */
- public Label getLabel() {
- return label;
- }
-
- /**
- * @generated
- */
- public void relocate(CellEditor celleditor) {
- Text text = (Text) celleditor.getControl();
- Rectangle rect = getLabel().getTextBounds().getCopy();
- getLabel().translateToAbsolute(rect);
- int avr = FigureUtilities.getFontMetrics(text.getFont())
- .getAverageCharWidth();
- rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT,
- SWT.DEFAULT)).expand(avr * 2, 0));
- if (!rect.equals(new Rectangle(text.getBounds()))) {
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
- }
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicEditPart.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicEditPart.java
deleted file mode 100644
index 9b783bf67..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicEditPart.java
+++ /dev/null
@@ -1,277 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.parts;
-
-import org.eclipse.draw2d.FlowLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.FlowLayoutEditPolicy;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.policies.TopicItemSemanticEditPolicy;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class TopicEditPart extends ShapeNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 1001;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public TopicEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
- new TopicItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
-
- FlowLayoutEditPolicy lep = new FlowLayoutEditPolicy() {
-
- protected Command createAddCommand(EditPart child, EditPart after) {
- return null;
- }
-
- protected Command createMoveChildCommand(EditPart child,
- EditPart after) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- TopicFigure figure = new TopicFigure();
- return primaryShape = figure;
- }
-
- /**
- * @generated
- */
- public TopicFigure getPrimaryShape() {
- return (TopicFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof TopicNameEditPart) {
- ((TopicNameEditPart) childEditPart).setLabel(getPrimaryShape()
- .getFigureTopicNameFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
-
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
-
- return super.getContentPaneFor(editPart);
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(getMapMode()
- .DPtoLP(40), getMapMode().DPtoLP(40));
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- * @param nodeShape instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(getMapMode().DPtoLP(5));
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(MindmapVisualIDRegistry
- .getType(TopicNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public class TopicFigure extends RectangleFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureTopicNameFigure;
-
- /**
- * @generated
- */
- public TopicFigure() {
-
- FlowLayout layoutThis = new FlowLayout();
- layoutThis.setStretchMinorAxis(false);
- layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
-
- layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
- layoutThis.setMajorSpacing(5);
- layoutThis.setMinorSpacing(5);
- layoutThis.setHorizontal(true);
-
- this.setLayoutManager(layoutThis);
-
- createContents();
- }
-
- /**
- * @generated
- */
- private void createContents() {
-
- fFigureTopicNameFigure = new WrappingLabel();
- fFigureTopicNameFigure.setText("<...>");
-
- this.add(fFigureTopicNameFigure);
-
- }
-
- /**
- * @generated
- */
- private boolean myUseLocalCoordinates = false;
-
- /**
- * @generated
- */
- protected boolean useLocalCoordinates() {
- return myUseLocalCoordinates;
- }
-
- /**
- * @generated
- */
- protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
- myUseLocalCoordinates = useLocalCoordinates;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureTopicNameFigure() {
- return fFigureTopicNameFigure;
- }
-
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicNameEditPart.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicNameEditPart.java
deleted file mode 100644
index cc572ffcf..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicNameEditPart.java
+++ /dev/null
@@ -1,584 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.handles.NonResizableHandleKit;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.policies.MindmapTextSelectionEditPolicy;
-import org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapElementTypes;
-import org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapParserProvider;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @generated
- */
-public class TopicNameEditPart extends CompartmentEditPart implements
- ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4001;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * @generated
- */
- public TopicNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
- new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
- new NonResizableEditPolicy() {
-
- protected List createSelectionHandles() {
- List handles = new ArrayList();
- NonResizableHandleKit.addMoveHandle(
- (GraphicalEditPart) getHost(), handles);
- return handles;
- }
-
- public Command getCommand(Request request) {
- return null;
- }
-
- public boolean understandsRequest(Request request) {
- return false;
- }
- });
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else {
- return ((Label) figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else {
- ((Label) figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else {
- return ((Label) figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else {
- ((Label) figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if (parserElement == null) {
- return null;
- }
- return MindmapElementTypes.getImage(parserElement.eClass());
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
- }
- if (text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof MindmapTextSelectionEditPolicy) {
- ((MindmapTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if (value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
- .runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(
- new EObjectAdapter(element),
- (String) value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null
- : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(
- new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if (parser == null) {
- String parserHint = ((View) getModel()).getType();
- IAdaptable hintAdapter = new MindmapParserProvider.HintAdapter(
- MindmapElementTypes.Topic_1001, getParserElement(),
- parserHint);
- parser = ParserService.getInstance().getParser(hintAdapter);
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new TextDirectEditManager(this, TextDirectEditManager
- .getTextCellEditorClass(this), MindmapEditPartFactory
- .getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if (getManager().getClass() == TextDirectEditManager.class) {
- ((TextDirectEditManager) getManager()).show(eventLocation
- .getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
- final Request theRequest = request;
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if (isActive() && isEditable()) {
- if (theRequest
- .getExtendedData()
- .get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest
- .getExtendedData()
- .get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest)
- && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof MindmapTextSelectionEditPolicy) {
- ((MindmapTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style
- .isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(style.getFontName(), style
- .getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL)
- | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser())
- .getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter(
- "SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(
- feature)) {
- refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough()
- .equals(feature)) {
- refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(
- feature)
- || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(
- feature)
- || NotationPackage.eINSTANCE.getFontStyle_Bold()
- .equals(feature)
- || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(
- feature)) {
- refreshFont();
- } else {
- if (getParser() != null
- && getParser().isAffectingEvent(event,
- getParserOptions().intValue())) {
- refreshLabel();
- }
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if (resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicSubtopicsEditPart.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicSubtopicsEditPart.java
deleted file mode 100644
index 9122f2923..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/TopicSubtopicsEditPart.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.parts;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.PolylineDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.policies.TopicSubtopicsItemSemanticEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class TopicSubtopicsEditPart extends ConnectionNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3001;
-
- /**
- * @generated
- */
- public TopicSubtopicsEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
- new TopicSubtopicsItemSemanticEditPolicy());
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new TopicSubtopicsFigure();
- }
-
- /**
- * @generated
- */
- public TopicSubtopicsFigure getPrimaryShape() {
- return (TopicSubtopicsFigure) getFigure();
- }
-
- /**
- * @generated
- */
- public class TopicSubtopicsFigure extends PolylineConnectionEx {
-
- /**
- * @generated
- */
- public TopicSubtopicsFigure() {
-
- setTargetDecoration(createTargetDecoration());
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- PolylineDecoration df = new PolylineDecoration();
- return df;
- }
-
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MapCanonicalEditPolicy.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MapCanonicalEditPolicy.java
deleted file mode 100644
index defa03ba0..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MapCanonicalEditPolicy.java
+++ /dev/null
@@ -1,294 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.policies;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramUpdater;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapLinkDescriptor;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapNodeDescriptor;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalConnectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MapCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
-
- /**
- * @generated
- */
- Set myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- protected List getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- List result = new LinkedList();
- for (Iterator it = MindmapDiagramUpdater.getMap_79SemanticChildren(
- viewObject).iterator(); it.hasNext();) {
- result.add(((MindmapNodeDescriptor) it.next()).getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean shouldDeleteView(View view) {
- return true;
- }
-
- /**
- * @generated
- */
- protected boolean isOrphaned(Collection semanticChildren, final View view) {
- int visualID = MindmapVisualIDRegistry.getVisualID(view);
- switch (visualID) {
- case TopicEditPart.VISUAL_ID:
- return !semanticChildren.contains(view.getElement())
- || visualID != MindmapVisualIDRegistry.getNodeVisualID(
- (View) getHost().getModel(), view.getElement());
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected String getDefaultFactoryHint() {
- return null;
- }
-
- /**
- * @generated
- */
- protected Set getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet();
- myFeaturesToSynchronize.add(MindmapPackage.eINSTANCE
- .getMap_RootTopics());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- protected List getSemanticConnectionsList() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- protected EObject getSourceElement(EObject relationship) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getTargetElement(EObject relationship) {
- return null;
- }
-
- /**
- * @generated
- */
- protected boolean shouldIncludeConnection(Edge connector,
- Collection children) {
- return false;
- }
-
- /**
- * @generated
- */
- protected void refreshSemantic() {
- List createdViews = new LinkedList();
- createdViews.addAll(refreshSemanticChildren());
- List createdConnectionViews = new LinkedList();
- createdConnectionViews.addAll(refreshSemanticConnections());
- createdConnectionViews.addAll(refreshConnections());
-
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host()
- .getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- createdViews.addAll(createdConnectionViews);
- makeViewsImmutable(createdViews);
- }
-
- /**
- * @generated
- */
- private Diagram getDiagram() {
- return ((View) getHost().getModel()).getDiagram();
- }
-
- /**
- * @generated
- */
- private Collection refreshConnections() {
- Map domain2NotationMap = new HashMap();
- Collection linkDescriptors = collectAllLinks(getDiagram(),
- domain2NotationMap);
- Collection existingLinks = new LinkedList(getDiagram().getEdges());
- for (Iterator linksIterator = existingLinks.iterator(); linksIterator
- .hasNext();) {
- Edge nextDiagramLink = (Edge) linksIterator.next();
- int diagramLinkVisualID = MindmapVisualIDRegistry
- .getVisualID(nextDiagramLink);
- if (diagramLinkVisualID == -1) {
- if (nextDiagramLink.getSource() != null
- && nextDiagramLink.getTarget() != null) {
- linksIterator.remove();
- }
- continue;
- }
- EObject diagramLinkObject = nextDiagramLink.getElement();
- EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
- EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
- for (Iterator LinkDescriptorsIterator = linkDescriptors.iterator(); LinkDescriptorsIterator
- .hasNext();) {
- MindmapLinkDescriptor nextLinkDescriptor = (MindmapLinkDescriptor) LinkDescriptorsIterator
- .next();
- if (diagramLinkObject == nextLinkDescriptor.getModelElement()
- && diagramLinkSrc == nextLinkDescriptor.getSource()
- && diagramLinkDst == nextLinkDescriptor
- .getDestination()
- && diagramLinkVisualID == nextLinkDescriptor
- .getVisualID()) {
- linksIterator.remove();
- LinkDescriptorsIterator.remove();
- }
- }
- }
- deleteViews(existingLinks.iterator());
- return createConnections(linkDescriptors, domain2NotationMap);
- }
-
- /**
- * @generated
- */
- private Collection collectAllLinks(View view, Map domain2NotationMap) {
- if (!MapEditPart.MODEL_ID.equals(MindmapVisualIDRegistry
- .getModelID(view))) {
- return Collections.EMPTY_LIST;
- }
- Collection result = new LinkedList();
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
- case MapEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(MindmapDiagramUpdater
- .getMap_79ContainedLinks(view));
- }
- if (!domain2NotationMap.containsKey(view.getElement())
- || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case TopicEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(MindmapDiagramUpdater
- .getTopic_1001ContainedLinks(view));
- }
- if (!domain2NotationMap.containsKey(view.getElement())
- || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- }
- for (Iterator children = view.getChildren().iterator(); children
- .hasNext();) {
- result.addAll(collectAllLinks((View) children.next(),
- domain2NotationMap));
- }
- for (Iterator edges = view.getSourceEdges().iterator(); edges.hasNext();) {
- result.addAll(collectAllLinks((View) edges.next(),
- domain2NotationMap));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection createConnections(Collection linkDescriptors,
- Map domain2NotationMap) {
- List adapters = new LinkedList();
- for (Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator
- .hasNext();) {
- final MindmapLinkDescriptor nextLinkDescriptor = (MindmapLinkDescriptor) linkDescriptorsIterator
- .next();
- EditPart sourceEditPart = getEditPart(nextLinkDescriptor
- .getSource(), domain2NotationMap);
- EditPart targetEditPart = getEditPart(nextLinkDescriptor
- .getDestination(), domain2NotationMap);
- if (sourceEditPart == null || targetEditPart == null) {
- continue;
- }
- CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
- nextLinkDescriptor.getSemanticAdapter(), null,
- ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost())
- .getDiagramPreferencesHint());
- CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
- descriptor);
- ccr.setType(RequestConstants.REQ_CONNECTION_START);
- ccr.setSourceEditPart(sourceEditPart);
- sourceEditPart.getCommand(ccr);
- ccr.setTargetEditPart(targetEditPart);
- ccr.setType(RequestConstants.REQ_CONNECTION_END);
- Command cmd = targetEditPart.getCommand(ccr);
- if (cmd != null && cmd.canExecute()) {
- executeCommand(cmd);
- IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
- if (viewAdapter != null) {
- adapters.add(viewAdapter);
- }
- }
- }
- return adapters;
- }
-
- /**
- * @generated
- */
- private EditPart getEditPart(EObject domainModelElement,
- Map domain2NotationMap) {
- View view = (View) domain2NotationMap.get(domainModelElement);
- if (view != null) {
- return (EditPart) getHost().getViewer().getEditPartRegistry().get(
- view);
- }
- return null;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MapItemSemanticEditPolicy.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MapItemSemanticEditPolicy.java
deleted file mode 100644
index 80d070053..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MapItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.policies;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.commands.TopicCreateCommand;
-import org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapElementTypes;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-
-/**
- * @generated
- */
-public class MapItemSemanticEditPolicy extends
- MindmapBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if (MindmapElementTypes.Topic_1001 == req.getElementType()) {
- if (req.getContainmentFeature() == null) {
- req.setContainmentFeature(MindmapPackage.eINSTANCE
- .getMap_RootTopics());
- }
- return getGEFWrapper(new TopicCreateCommand(req));
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
- .getEditingDomain();
- return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
- }
-
- /**
- * @generated
- */
- private static class DuplicateAnythingCommand extends
- DuplicateEObjectsCommand {
-
- /**
- * @generated
- */
- public DuplicateAnythingCommand(
- TransactionalEditingDomain editingDomain,
- DuplicateElementsRequest req) {
- super(editingDomain, req.getLabel(), req
- .getElementsToBeDuplicated(), req
- .getAllDuplicatedElementsMap());
- }
-
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapBaseItemSemanticEditPolicy.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapBaseItemSemanticEditPolicy.java
deleted file mode 100644
index ded9a7e0a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapBaseItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,368 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.policies;
-
-import java.util.Collections;
-import java.util.Iterator;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.examples.mindmap.Topic;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.helpers.MindmapBaseEditHelper;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IEditHelperContext;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MindmapBaseItemSemanticEditPolicy extends SemanticEditPolicy {
-
- /**
- * Extended request data key to hold editpart visual id.
- *
- * @generated
- */
- public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
-
- /**
- * Extended request data key to hold editpart visual id.
- * Add visual id of edited editpart to extended data of the request
- * so command switch can decide what kind of diagram element is being edited.
- * It is done in those cases when it's not possible to deduce diagram
- * element kind from domain element.
- *
- * @generated
- */
- public Command getCommand(Request request) {
- if (request instanceof ReconnectRequest) {
- Object view = ((ReconnectRequest) request).getConnectionEditPart()
- .getModel();
- if (view instanceof View) {
- Integer id = new Integer(MindmapVisualIDRegistry
- .getVisualID((View) view));
- request.getExtendedData().put(VISUAL_ID_KEY, id);
- }
- }
- return super.getCommand(request);
- }
-
- /**
- * Returns visual id from request parameters.
- *
- * @generated
- */
- protected int getVisualID(IEditCommandRequest request) {
- Object id = request.getParameter(VISUAL_ID_KEY);
- return id instanceof Integer ? ((Integer) id).intValue() : -1;
- }
-
- /**
- * @generated
- */
- protected Command getSemanticCommand(IEditCommandRequest request) {
- IEditCommandRequest completedRequest = completeRequest(request);
- Object editHelperContext = completedRequest.getEditHelperContext();
- if (editHelperContext instanceof View
- || (editHelperContext instanceof IEditHelperContext && ((IEditHelperContext) editHelperContext)
- .getEObject() instanceof View)) {
- // no semantic commands are provided for pure design elements
- return null;
- }
- if (editHelperContext == null) {
- editHelperContext = ViewUtil
- .resolveSemanticElement((View) getHost().getModel());
- }
- IElementType elementType = ElementTypeRegistry.getInstance()
- .getElementType(editHelperContext);
- if (elementType == ElementTypeRegistry.getInstance().getType(
- "org.eclipse.gmf.runtime.emf.type.core.default")) { //$NON-NLS-1$
- elementType = null;
- }
- Command semanticCommand = getSemanticCommandSwitch(completedRequest);
- if (semanticCommand != null) {
- ICommand command = semanticCommand instanceof ICommandProxy ? ((ICommandProxy) semanticCommand)
- .getICommand()
- : new CommandProxy(semanticCommand);
- completedRequest.setParameter(
- MindmapBaseEditHelper.EDIT_POLICY_COMMAND, command);
- }
- if (elementType != null) {
- ICommand command = elementType.getEditCommand(completedRequest);
- if (command != null) {
- if (!(command instanceof CompositeTransactionalCommand)) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
- .getEditingDomain();
- command = new CompositeTransactionalCommand(editingDomain,
- null).compose(command);
- }
- semanticCommand = new ICommandProxy(command);
- }
- }
- boolean shouldProceed = true;
- if (completedRequest instanceof DestroyRequest) {
- shouldProceed = shouldProceed((DestroyRequest) completedRequest);
- }
- if (shouldProceed) {
- if (completedRequest instanceof DestroyRequest) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
- .getEditingDomain();
- Command deleteViewCommand = new ICommandProxy(
- new DeleteCommand(editingDomain, (View) getHost()
- .getModel()));
- semanticCommand = semanticCommand == null ? deleteViewCommand
- : semanticCommand.chain(deleteViewCommand);
- }
- return semanticCommand;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
- if (req instanceof CreateRelationshipRequest) {
- return getCreateRelationshipCommand((CreateRelationshipRequest) req);
- } else if (req instanceof CreateElementRequest) {
- return getCreateCommand((CreateElementRequest) req);
- } else if (req instanceof ConfigureRequest) {
- return getConfigureCommand((ConfigureRequest) req);
- } else if (req instanceof DestroyElementRequest) {
- return getDestroyElementCommand((DestroyElementRequest) req);
- } else if (req instanceof DestroyReferenceRequest) {
- return getDestroyReferenceCommand((DestroyReferenceRequest) req);
- } else if (req instanceof DuplicateElementsRequest) {
- return getDuplicateCommand((DuplicateElementsRequest) req);
- } else if (req instanceof GetEditContextRequest) {
- return getEditContextCommand((GetEditContextRequest) req);
- } else if (req instanceof MoveRequest) {
- return getMoveCommand((MoveRequest) req);
- } else if (req instanceof ReorientReferenceRelationshipRequest) {
- return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest) req);
- } else if (req instanceof ReorientRelationshipRequest) {
- return getReorientRelationshipCommand((ReorientRelationshipRequest) req);
- } else if (req instanceof SetRequest) {
- return getSetCommand((SetRequest) req);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getConfigureCommand(ConfigureRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getSetCommand(SetRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getEditContextCommand(GetEditContextRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getMoveCommand(MoveRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(
- ReorientReferenceRelationshipRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getReorientRelationshipCommand(
- ReorientRelationshipRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected final Command getGEFWrapper(ICommand cmd) {
- return new ICommandProxy(cmd);
- }
-
- /**
- * @deprecated use getGEFWrapper() instead
- * @generated
- */
- protected final Command getMSLWrapper(ICommand cmd) {
- // XXX deprecated: use getGEFWrapper() instead
- return getGEFWrapper(cmd);
- }
-
- /**
- * @generated
- */
- protected EObject getSemanticElement() {
- return ViewUtil.resolveSemanticElement((View) getHost().getModel());
- }
-
- /**
- * Returns editing domain from the host edit part.
- *
- * @generated
- */
- protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart) getHost()).getEditingDomain();
- }
-
- /**
- * Creates command to destroy the link.
- *
- * @generated
- */
- protected Command getDestroyElementCommand(View view) {
- EditPart editPart = (EditPart) getHost().getViewer()
- .getEditPartRegistry().get(view);
- DestroyElementRequest request = new DestroyElementRequest(
- getEditingDomain(), false);
- return editPart.getCommand(new EditCommandRequestWrapper(request,
- Collections.EMPTY_MAP));
- }
-
- /**
- * Creates commands to destroy all host incoming and outgoing links.
- *
- * @generated
- */
- protected CompoundCommand getDestroyEdgesCommand() {
- CompoundCommand cmd = new CompoundCommand();
- View view = (View) getHost().getModel();
- for (Iterator it = view.getSourceEdges().iterator(); it.hasNext();) {
- cmd.add(getDestroyElementCommand((Edge) it.next()));
- }
- for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();) {
- cmd.add(getDestroyElementCommand((Edge) it.next()));
- }
- return cmd;
- }
-
- /**
- * @generated
- */
- protected void addDestroyShortcutsCommand(CompoundCommand command) {
- View view = (View) getHost().getModel();
- if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
- return;
- }
- for (Iterator it = view.getDiagram().getChildren().iterator(); it
- .hasNext();) {
- View nextView = (View) it.next();
- if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
- continue;
- }
- command.add(getDestroyElementCommand(nextView));
- }
- }
-
- /**
- * @generated
- */
- public static class LinkConstraints {
-
- /**
- * @generated
- */
- public static boolean canCreateTopicSubtopics_3001(Topic source,
- Topic target) {
- if (source != null) {
- if (source.getSubtopics().contains(target)) {
- return false;
- }
- }
- return canExistTopicSubtopics_3001(source, target);
- }
-
- /**
- * @generated
- */
- public static boolean canExistTopicSubtopics_3001(Topic source,
- Topic target) {
- return true;
- }
-
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapTextNonResizableEditPolicy.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapTextNonResizableEditPolicy.java
deleted file mode 100644
index ed56f0053..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapTextNonResizableEditPolicy.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
-import org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-
-/**
- * @generated
- */
-public class MindmapTextNonResizableEditPolicy extends NonResizableEditPolicyEx {
-
- /**
- * @generated
- */
- private IFigure selectionFeedbackFigure;
-
- /**
- * @generated
- */
- private IFigure focusFeedbackFigure;
-
- /**
- * @generated
- */
- protected void showPrimarySelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(true);
- } else {
- showSelection();
- showFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void showSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- hideSelection();
- addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
- refreshSelectionFeedback();
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void hideSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(false);
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- if (selectionFeedbackFigure != null) {
- removeFeedback(selectionFeedbackFigure);
- selectionFeedbackFigure = null;
- }
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void showFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(true);
- } else {
- hideFocus();
- addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
- refreshFocusFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void hideFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- if (focusFeedbackFigure != null) {
- removeFeedback(focusFeedbackFigure);
- focusFeedbackFigure = null;
- }
- }
- }
-
- /**
- * @generated
- */
- protected Rectangle getFeedbackBounds() {
- Rectangle bounds;
- if (getHostFigure() instanceof Label) {
- bounds = ((Label) getHostFigure()).getTextBounds();
- bounds.intersect(getHostFigure().getBounds());
- } else {
- bounds = getHostFigure().getBounds().getCopy();
- }
- getHostFigure().getParent().translateToAbsolute(bounds);
- getFeedbackLayer().translateToRelative(bounds);
- return bounds;
- }
-
- /**
- * @generated
- */
- protected IFigure createSelectionFeedbackFigure() {
- if (getHostFigure() instanceof Label) {
- Label feedbackFigure = new Label();
- feedbackFigure.setOpaque(true);
- feedbackFigure
- .setBackgroundColor(ColorConstants.menuBackgroundSelected);
- feedbackFigure
- .setForegroundColor(ColorConstants.menuForegroundSelected);
- return feedbackFigure;
- } else {
- RectangleFigure feedbackFigure = new RectangleFigure();
- feedbackFigure.setFill(false);
- return feedbackFigure;
- }
- }
-
- /**
- * @generated
- */
- protected IFigure createFocusFeedbackFigure() {
- return new Figure() {
-
- protected void paintFigure(Graphics graphics) {
- graphics.drawFocus(getBounds().getResized(-1, -1));
- }
- };
- }
-
- /**
- * @generated
- */
- protected void updateLabel(Label target) {
- Label source = (Label) getHostFigure();
- target.setText(source.getText());
- target.setTextAlignment(source.getTextAlignment());
- target.setFont(source.getFont());
- }
-
- /**
- * @generated
- */
- protected void refreshSelectionFeedback() {
- if (selectionFeedbackFigure != null) {
- if (selectionFeedbackFigure instanceof Label) {
- updateLabel((Label) selectionFeedbackFigure);
- selectionFeedbackFigure.setBounds(getFeedbackBounds());
- } else {
- selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5,
- 5));
- }
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFocusFeedback() {
- if (focusFeedbackFigure != null) {
- focusFeedbackFigure.setBounds(getFeedbackBounds());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFeedback() {
- refreshSelectionFeedback();
- refreshFocusFeedback();
- }
-
- /**
- * @generated
- */
- protected List createSelectionHandles() {
- MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
- moveHandle.setBorder(null);
- moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
- return Collections.singletonList(moveHandle);
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapTextSelectionEditPolicy.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapTextSelectionEditPolicy.java
deleted file mode 100644
index e7d5b21a6..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/MindmapTextSelectionEditPolicy.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.policies;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.editpolicies.SelectionEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-
-/**
- * @generated
- */
-public class MindmapTextSelectionEditPolicy extends SelectionEditPolicy {
-
- /**
- * @generated
- */
- private IFigure selectionFeedbackFigure;
-
- /**
- * @generated
- */
- private IFigure focusFeedbackFigure;
-
- /**
- * @generated
- */
- protected void showPrimarySelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(true);
- } else {
- showSelection();
- showFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void showSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- hideSelection();
- addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
- refreshSelectionFeedback();
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void hideSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(false);
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- if (selectionFeedbackFigure != null) {
- removeFeedback(selectionFeedbackFigure);
- selectionFeedbackFigure = null;
- }
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void showFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(true);
- } else {
- hideFocus();
- addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
- refreshFocusFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void hideFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- if (focusFeedbackFigure != null) {
- removeFeedback(focusFeedbackFigure);
- focusFeedbackFigure = null;
- }
- }
- }
-
- /**
- * @generated
- */
- protected Rectangle getFeedbackBounds() {
- Rectangle bounds;
- if (getHostFigure() instanceof Label) {
- bounds = ((Label) getHostFigure()).getTextBounds();
- bounds.intersect(getHostFigure().getBounds());
- } else {
- bounds = getHostFigure().getBounds().getCopy();
- }
- getHostFigure().getParent().translateToAbsolute(bounds);
- getFeedbackLayer().translateToRelative(bounds);
- return bounds;
- }
-
- /**
- * @generated
- */
- protected IFigure createSelectionFeedbackFigure() {
- if (getHostFigure() instanceof Label) {
- Label feedbackFigure = new Label();
- feedbackFigure.setOpaque(true);
- feedbackFigure
- .setBackgroundColor(ColorConstants.menuBackgroundSelected);
- feedbackFigure
- .setForegroundColor(ColorConstants.menuForegroundSelected);
- return feedbackFigure;
- } else {
- RectangleFigure feedbackFigure = new RectangleFigure();
- feedbackFigure.setFill(false);
- return feedbackFigure;
- }
- }
-
- /**
- * @generated
- */
- protected IFigure createFocusFeedbackFigure() {
- return new Figure() {
-
- protected void paintFigure(Graphics graphics) {
- graphics.drawFocus(getBounds().getResized(-1, -1));
- }
- };
- }
-
- /**
- * @generated
- */
- protected void updateLabel(Label target) {
- Label source = (Label) getHostFigure();
- target.setText(source.getText());
- target.setTextAlignment(source.getTextAlignment());
- target.setFont(source.getFont());
- }
-
- /**
- * @generated
- */
- protected void refreshSelectionFeedback() {
- if (selectionFeedbackFigure != null) {
- if (selectionFeedbackFigure instanceof Label) {
- updateLabel((Label) selectionFeedbackFigure);
- selectionFeedbackFigure.setBounds(getFeedbackBounds());
- } else {
- selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5,
- 5));
- }
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFocusFeedback() {
- if (focusFeedbackFigure != null) {
- focusFeedbackFigure.setBounds(getFeedbackBounds());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFeedback() {
- refreshSelectionFeedback();
- refreshFocusFeedback();
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/TopicItemSemanticEditPolicy.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/TopicItemSemanticEditPolicy.java
deleted file mode 100644
index 7be379148..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/TopicItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.commands.TopicSubtopicsCreateCommand;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.commands.TopicSubtopicsReorientCommand;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicSubtopicsEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapElementTypes;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class TopicItemSemanticEditPolicy extends
- MindmapBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompoundCommand cc = getDestroyEdgesCommand();
- addDestroyShortcutsCommand(cc);
- View view = (View) getHost().getModel();
- if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
- req.setElementToDestroy(view);
- }
- cc.add(getGEFWrapper(new DestroyElementCommand(req)));
- return cc.unwrap();
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
- : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super
- .getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(
- CreateRelationshipRequest req) {
- if (MindmapElementTypes.TopicSubtopics_3001 == req.getElementType()) {
- return getGEFWrapper(new TopicSubtopicsCreateCommand(req, req
- .getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(
- CreateRelationshipRequest req) {
- if (MindmapElementTypes.TopicSubtopics_3001 == req.getElementType()) {
- return getGEFWrapper(new TopicSubtopicsCreateCommand(req, req
- .getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(
- ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case TopicSubtopicsEditPart.VISUAL_ID:
- return getGEFWrapper(new TopicSubtopicsReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/TopicSubtopicsItemSemanticEditPolicy.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/TopicSubtopicsItemSemanticEditPolicy.java
deleted file mode 100644
index 92e7f2beb..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/policies/TopicSubtopicsItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-
-/**
- * @generated
- */
-public class TopicSubtopicsItemSemanticEditPolicy extends
- MindmapBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapAbstractNavigatorItem.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapAbstractNavigatorItem.java
deleted file mode 100644
index e2a16bc65..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapAbstractNavigatorItem.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
-
-/**
- * @generated
- */
-public abstract class MindmapAbstractNavigatorItem extends PlatformObject {
-
- /**
- * @generated
- */
- static {
- final Class[] supportedTypes = new Class[] { ITabbedPropertySheetPageContributor.class };
- final ITabbedPropertySheetPageContributor propertySheetPageContributor = new ITabbedPropertySheetPageContributor() {
- public String getContributorId() {
- return "org.eclipse.gmf.examples.mindmap.diagram"; //$NON-NLS-1$
- }
- };
- Platform.getAdapterManager().registerAdapters(
- new IAdapterFactory() {
-
- public Object getAdapter(Object adaptableObject,
- Class adapterType) {
- if (adaptableObject instanceof org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapAbstractNavigatorItem
- && adapterType == ITabbedPropertySheetPageContributor.class) {
- return propertySheetPageContributor;
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return supportedTypes;
- }
- },
- org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapAbstractNavigatorItem.class);
- }
-
- /**
- * @generated
- */
- private Object myParent;
-
- /**
- * @generated
- */
- protected MindmapAbstractNavigatorItem(Object parent) {
- myParent = parent;
- }
-
- /**
- * @generated
- */
- public Object getParent() {
- return myParent;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorContentProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorContentProvider.java
deleted file mode 100644
index 15ccd1080..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorContentProvider.java
+++ /dev/null
@@ -1,233 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonContentProvider;
-
-/**
- * @generated
- */
-public class MindmapDomainNavigatorContentProvider implements
- ICommonContentProvider {
-
- /**
- * @generated
- */
- private AdapterFactoryContentProvider myAdapterFctoryContentProvier;
-
- /**
- * @generated
- */
- private static final Object[] EMPTY_ARRAY = new Object[0];
-
- /**
- * @generated
- */
- private Viewer myViewer;
-
- /**
- * @generated
- */
- private AdapterFactoryEditingDomain myEditingDomain;
-
- /**
- * @generated
- */
- private WorkspaceSynchronizer myWorkspaceSynchronizer;
-
- /**
- * @generated
- */
- private Runnable myViewerRefreshRunnable;
-
- /**
- * @generated
- */
- public MindmapDomainNavigatorContentProvider() {
- myAdapterFctoryContentProvier = new AdapterFactoryContentProvider(
- MindmapDiagramEditorPlugin.getInstance()
- .getItemProvidersAdapterFactory());
- TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
- .createEditingDomain();
- myEditingDomain = (AdapterFactoryEditingDomain) editingDomain;
- myEditingDomain.setResourceToReadOnlyMap(new HashMap() {
- public Object get(Object key) {
- if (!containsKey(key)) {
- put(key, Boolean.TRUE);
- }
- return super.get(key);
- }
- });
- myViewerRefreshRunnable = new Runnable() {
- public void run() {
- if (myViewer != null) {
- myViewer.refresh();
- }
- }
- };
- myWorkspaceSynchronizer = new WorkspaceSynchronizer(editingDomain,
- new WorkspaceSynchronizer.Delegate() {
- public void dispose() {
- }
-
- public boolean handleResourceChanged(final Resource resource) {
- for (Iterator it = myEditingDomain.getResourceSet()
- .getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource) it.next();
- nextResource.unload();
- }
- if (myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(
- myViewerRefreshRunnable);
- }
- return true;
- }
-
- public boolean handleResourceDeleted(Resource resource) {
- for (Iterator it = myEditingDomain.getResourceSet()
- .getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource) it.next();
- nextResource.unload();
- }
- if (myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(
- myViewerRefreshRunnable);
- }
- return true;
- }
-
- public boolean handleResourceMoved(Resource resource,
- final URI newURI) {
- for (Iterator it = myEditingDomain.getResourceSet()
- .getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource) it.next();
- nextResource.unload();
- }
- if (myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(
- myViewerRefreshRunnable);
- }
- return true;
- }
- });
- }
-
- /**
- * @generated
- */
- public void dispose() {
- myWorkspaceSynchronizer.dispose();
- myWorkspaceSynchronizer = null;
- myViewerRefreshRunnable = null;
- for (Iterator it = myEditingDomain.getResourceSet().getResources()
- .iterator(); it.hasNext();) {
- Resource resource = (Resource) it.next();
- resource.unload();
- }
- ((TransactionalEditingDomain) myEditingDomain).dispose();
- myEditingDomain = null;
- }
-
- /**
- * @generated
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- myViewer = viewer;
- }
-
- /**
- * @generated
- */
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /**
- * @generated
- */
- public void restoreState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void saveState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void init(ICommonContentExtensionSite aConfig) {
- }
-
- /**
- * @generated
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof IFile) {
- IFile file = (IFile) parentElement;
- URI fileURI = URI.createPlatformResourceURI(file.getFullPath()
- .toString(), true);
- Resource resource = myEditingDomain.getResourceSet().getResource(
- fileURI, true);
- return wrapEObjects(myAdapterFctoryContentProvier
- .getChildren(resource), parentElement);
- }
-
- if (parentElement instanceof MindmapDomainNavigatorItem) {
- return wrapEObjects(myAdapterFctoryContentProvier
- .getChildren(((MindmapDomainNavigatorItem) parentElement)
- .getEObject()), parentElement);
- }
- return EMPTY_ARRAY;
- }
-
- /**
- * @generated
- */
- public Object[] wrapEObjects(Object[] objects, Object parentElement) {
- Collection result = new ArrayList();
- for (int i = 0; i < objects.length; i++) {
- if (objects[i] instanceof EObject) {
- result.add(new MindmapDomainNavigatorItem((EObject) objects[i],
- parentElement, myAdapterFctoryContentProvier));
- }
- }
- return result.toArray();
- }
-
- /**
- * @generated
- */
- public Object getParent(Object element) {
- if (element instanceof MindmapAbstractNavigatorItem) {
- MindmapAbstractNavigatorItem abstractNavigatorItem = (MindmapAbstractNavigatorItem) element;
- return abstractNavigatorItem.getParent();
- }
- return null;
- }
-
- /**
- * @generated
- */
- public boolean hasChildren(Object element) {
- return element instanceof IFile || getChildren(element).length > 0;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorItem.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorItem.java
deleted file mode 100644
index c8ebd23df..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorItem.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.IPropertySourceProvider;
-
-/**
- * @generated
- */
-public class MindmapDomainNavigatorItem extends PlatformObject {
-
- /**
- * @generated
- */
- static {
- final Class[] supportedTypes = new Class[] { EObject.class,
- IPropertySource.class };
- Platform.getAdapterManager().registerAdapters(
- new IAdapterFactory() {
-
- public Object getAdapter(Object adaptableObject,
- Class adapterType) {
- if (adaptableObject instanceof org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapDomainNavigatorItem) {
- org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapDomainNavigatorItem domainNavigatorItem = (org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapDomainNavigatorItem) adaptableObject;
- EObject eObject = domainNavigatorItem.getEObject();
- if (adapterType == EObject.class) {
- return eObject;
- }
- if (adapterType == IPropertySource.class) {
- return domainNavigatorItem
- .getPropertySourceProvider()
- .getPropertySource(eObject);
- }
- }
-
- return null;
- }
-
- public Class[] getAdapterList() {
- return supportedTypes;
- }
- },
- org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapDomainNavigatorItem.class);
- }
-
- /**
- * @generated
- */
- private Object myParent;
-
- /**
- * @generated
- */
- private EObject myEObject;
-
- /**
- * @generated
- */
- private IPropertySourceProvider myPropertySourceProvider;
-
- /**
- * @generated
- */
- public MindmapDomainNavigatorItem(EObject eObject, Object parent,
- IPropertySourceProvider propertySourceProvider) {
- myParent = parent;
- myEObject = eObject;
- myPropertySourceProvider = propertySourceProvider;
- }
-
- /**
- * @generated
- */
- public Object getParent() {
- return myParent;
- }
-
- /**
- * @generated
- */
- public EObject getEObject() {
- return myEObject;
- }
-
- /**
- * @generated
- */
- public IPropertySourceProvider getPropertySourceProvider() {
- return myPropertySourceProvider;
- }
-
- /**
- * @generated
- */
- public boolean equals(Object obj) {
- if (obj instanceof org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapDomainNavigatorItem) {
- return EcoreUtil
- .getURI(getEObject())
- .equals(
- EcoreUtil
- .getURI(((org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapDomainNavigatorItem) obj)
- .getEObject()));
- }
- return super.equals(obj);
- }
-
- /**
- * @generated
- */
- public int hashCode() {
- return EcoreUtil.getURI(getEObject()).hashCode();
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorLabelProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorLabelProvider.java
deleted file mode 100644
index 798f0536a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapDomainNavigatorLabelProvider.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonLabelProvider;
-
-/**
- * @generated
- */
-public class MindmapDomainNavigatorLabelProvider implements
- ICommonLabelProvider {
-
- /**
- * @generated
- */
- private AdapterFactoryLabelProvider myAdapterFactoryLabelProvider = new AdapterFactoryLabelProvider(
- MindmapDiagramEditorPlugin.getInstance()
- .getItemProvidersAdapterFactory());
-
- /**
- * @generated
- */
- public void init(ICommonContentExtensionSite aConfig) {
- }
-
- /**
- * @generated
- */
- public Image getImage(Object element) {
- if (element instanceof MindmapDomainNavigatorItem) {
- return myAdapterFactoryLabelProvider
- .getImage(((MindmapDomainNavigatorItem) element)
- .getEObject());
- }
- return null;
- }
-
- /**
- * @generated
- */
- public String getText(Object element) {
- if (element instanceof MindmapDomainNavigatorItem) {
- return myAdapterFactoryLabelProvider
- .getText(((MindmapDomainNavigatorItem) element)
- .getEObject());
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void addListener(ILabelProviderListener listener) {
- myAdapterFactoryLabelProvider.addListener(listener);
- }
-
- /**
- * @generated
- */
- public void dispose() {
- myAdapterFactoryLabelProvider.dispose();
- }
-
- /**
- * @generated
- */
- public boolean isLabelProperty(Object element, String property) {
- return myAdapterFactoryLabelProvider.isLabelProperty(element, property);
- }
-
- /**
- * @generated
- */
- public void removeListener(ILabelProviderListener listener) {
- myAdapterFactoryLabelProvider.removeListener(listener);
- }
-
- /**
- * @generated
- */
- public void restoreState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void saveState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public String getDescription(Object anElement) {
- return null;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorActionProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorActionProvider.java
deleted file mode 100644
index 630ff68f3..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorActionProvider.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.Messages;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditor;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.ICommonActionConstants;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @generated
- */
-public class MindmapNavigatorActionProvider extends CommonActionProvider {
-
- /**
- * @generated
- */
- private boolean myContribute;
-
- /**
- * @generated
- */
- private OpenDiagramAction myOpenDiagramAction;
-
- /**
- * @generated
- */
- public void init(ICommonActionExtensionSite aSite) {
- super.init(aSite);
- if (aSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {
- myContribute = true;
- makeActions((ICommonViewerWorkbenchSite) aSite.getViewSite());
- } else {
- myContribute = false;
- }
- }
-
- /**
- * @generated
- */
- private void makeActions(ICommonViewerWorkbenchSite viewerSite) {
- myOpenDiagramAction = new OpenDiagramAction(viewerSite);
- }
-
- /**
- * @generated
- */
- public void fillActionBars(IActionBars actionBars) {
- if (!myContribute) {
- return;
- }
- IStructuredSelection selection = (IStructuredSelection) getContext()
- .getSelection();
- myOpenDiagramAction.selectionChanged(selection);
- if (myOpenDiagramAction.isEnabled()) {
- actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN,
- myOpenDiagramAction);
- }
- }
-
- /**
- * @generated
- */
- public void fillContextMenu(IMenuManager menu) {
- }
-
- /**
- * @generated
- */
- private class OpenDiagramAction extends Action {
-
- /**
- * @generated
- */
- private Diagram myDiagram;
-
- /**
- * @generated
- */
- private ICommonViewerWorkbenchSite myViewerSite;
-
- /**
- * @generated
- */
- public OpenDiagramAction(ICommonViewerWorkbenchSite viewerSite) {
- super(Messages.NavigatorActionProvider_OpenDiagramActionName);
- myViewerSite = viewerSite;
- }
-
- /**
- * @generated
- */
- public final void selectionChanged(IStructuredSelection selection) {
- myDiagram = null;
- if (selection.size() == 1) {
- Object selectedElement = selection.getFirstElement();
- if (selectedElement instanceof MindmapNavigatorItem) {
- selectedElement = ((MindmapNavigatorItem) selectedElement)
- .getView();
- } else if (selectedElement instanceof IAdaptable) {
- selectedElement = ((IAdaptable) selectedElement)
- .getAdapter(View.class);
- }
- if (selectedElement instanceof Diagram) {
- Diagram diagram = (Diagram) selectedElement;
- if (MapEditPart.MODEL_ID.equals(MindmapVisualIDRegistry
- .getModelID(diagram))) {
- myDiagram = diagram;
- }
- }
- }
- setEnabled(myDiagram != null);
- }
-
- /**
- * @generated
- */
- public void run() {
- if (myDiagram == null || myDiagram.eResource() == null) {
- return;
- }
-
- IEditorInput editorInput = getEditorInput();
- IWorkbenchPage page = myViewerSite.getPage();
- try {
- page.openEditor(editorInput, MindmapDiagramEditor.ID);
- } catch (PartInitException e) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Exception while openning diagram", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private IEditorInput getEditorInput() {
- for (Iterator it = myDiagram.eResource().getContents().iterator(); it
- .hasNext();) {
- EObject nextEObject = (EObject) it.next();
- if (nextEObject == myDiagram) {
- return new FileEditorInput(WorkspaceSynchronizer
- .getFile(myDiagram.eResource()));
- }
- if (nextEObject instanceof Diagram) {
- break;
- }
- }
- URI uri = EcoreUtil.getURI(myDiagram);
- String editorName = uri.lastSegment()
- + "#" + myDiagram.eResource().getContents().indexOf(myDiagram); //$NON-NLS-1$
- IEditorInput editorInput = new URIEditorInput(uri, editorName);
- return editorInput;
- }
-
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorContentProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorContentProvider.java
deleted file mode 100644
index fb4049189..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorContentProvider.java
+++ /dev/null
@@ -1,427 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicSubtopicsEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.Messages;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonContentProvider;
-
-/**
- * @generated
- */
-public class MindmapNavigatorContentProvider implements ICommonContentProvider {
-
- /**
- * @generated
- */
- private static final Object[] EMPTY_ARRAY = new Object[0];
-
- /**
- * @generated
- */
- private Viewer myViewer;
-
- /**
- * @generated
- */
- private AdapterFactoryEditingDomain myEditingDomain;
-
- /**
- * @generated
- */
- private WorkspaceSynchronizer myWorkspaceSynchronizer;
-
- /**
- * @generated
- */
- private Runnable myViewerRefreshRunnable;
-
- /**
- * @generated
- */
- public MindmapNavigatorContentProvider() {
- TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
- .createEditingDomain();
- myEditingDomain = (AdapterFactoryEditingDomain) editingDomain;
- myEditingDomain.setResourceToReadOnlyMap(new HashMap() {
- public Object get(Object key) {
- if (!containsKey(key)) {
- put(key, Boolean.TRUE);
- }
- return super.get(key);
- }
- });
- myViewerRefreshRunnable = new Runnable() {
- public void run() {
- if (myViewer != null) {
- myViewer.refresh();
- }
- }
- };
- myWorkspaceSynchronizer = new WorkspaceSynchronizer(editingDomain,
- new WorkspaceSynchronizer.Delegate() {
- public void dispose() {
- }
-
- public boolean handleResourceChanged(final Resource resource) {
- for (Iterator it = myEditingDomain.getResourceSet()
- .getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource) it.next();
- nextResource.unload();
- }
- if (myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(
- myViewerRefreshRunnable);
- }
- return true;
- }
-
- public boolean handleResourceDeleted(Resource resource) {
- for (Iterator it = myEditingDomain.getResourceSet()
- .getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource) it.next();
- nextResource.unload();
- }
- if (myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(
- myViewerRefreshRunnable);
- }
- return true;
- }
-
- public boolean handleResourceMoved(Resource resource,
- final URI newURI) {
- for (Iterator it = myEditingDomain.getResourceSet()
- .getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource) it.next();
- nextResource.unload();
- }
- if (myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(
- myViewerRefreshRunnable);
- }
- return true;
- }
- });
- }
-
- /**
- * @generated
- */
- public void dispose() {
- myWorkspaceSynchronizer.dispose();
- myWorkspaceSynchronizer = null;
- myViewerRefreshRunnable = null;
- for (Iterator it = myEditingDomain.getResourceSet().getResources()
- .iterator(); it.hasNext();) {
- Resource resource = (Resource) it.next();
- resource.unload();
- }
- ((TransactionalEditingDomain) myEditingDomain).dispose();
- myEditingDomain = null;
- }
-
- /**
- * @generated
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- myViewer = viewer;
- }
-
- /**
- * @generated
- */
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /**
- * @generated
- */
- public void restoreState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void saveState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void init(ICommonContentExtensionSite aConfig) {
- }
-
- /**
- * @generated
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof IFile) {
- IFile file = (IFile) parentElement;
- URI fileURI = URI.createPlatformResourceURI(file.getFullPath()
- .toString(), true);
- Resource resource = myEditingDomain.getResourceSet().getResource(
- fileURI, true);
- Collection result = new ArrayList();
- result.addAll(createNavigatorItems(selectViewsByType(resource
- .getContents(), MapEditPart.MODEL_ID), file, false));
- return result.toArray();
- }
-
- if (parentElement instanceof MindmapNavigatorGroup) {
- MindmapNavigatorGroup group = (MindmapNavigatorGroup) parentElement;
- return group.getChildren();
- }
-
- if (parentElement instanceof MindmapNavigatorItem) {
- MindmapNavigatorItem navigatorItem = (MindmapNavigatorItem) parentElement;
- if (navigatorItem.isLeaf() || !isOwnView(navigatorItem.getView())) {
- return EMPTY_ARRAY;
- }
- return getViewChildren(navigatorItem.getView(), parentElement);
- }
-
- return EMPTY_ARRAY;
- }
-
- /**
- * @generated
- */
- private Object[] getViewChildren(View view, Object parentElement) {
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
-
- case MapEditPart.VISUAL_ID: {
- Collection result = new ArrayList();
- MindmapNavigatorGroup links = new MindmapNavigatorGroup(
- Messages.NavigatorGroupName_Map_79_links,
- "icons/linksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getChildrenByType(Collections
- .singleton(view), TopicEditPart.VISUAL_ID);
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view),
- TopicSubtopicsEditPart.VISUAL_ID);
- links
- .addChildren(createNavigatorItems(connectedViews, links,
- false));
- if (!links.isEmpty()) {
- result.add(links);
- }
- return result.toArray();
- }
-
- case TopicEditPart.VISUAL_ID: {
- Collection result = new ArrayList();
- MindmapNavigatorGroup incominglinks = new MindmapNavigatorGroup(
- Messages.NavigatorGroupName_Topic_1001_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- MindmapNavigatorGroup outgoinglinks = new MindmapNavigatorGroup(
- Messages.NavigatorGroupName_Topic_1001_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections
- .singleton(view), TopicSubtopicsEditPart.VISUAL_ID);
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(
- Collections.singleton(view),
- TopicSubtopicsEditPart.VISUAL_ID);
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case TopicSubtopicsEditPart.VISUAL_ID: {
- Collection result = new ArrayList();
- MindmapNavigatorGroup target = new MindmapNavigatorGroup(
- Messages.NavigatorGroupName_TopicSubtopics_3001_target,
- "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- MindmapNavigatorGroup source = new MindmapNavigatorGroup(
- Messages.NavigatorGroupName_TopicSubtopics_3001_source,
- "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections
- .singleton(view), TopicEditPart.VISUAL_ID);
- target.addChildren(createNavigatorItems(connectedViews, target,
- true));
- connectedViews = getLinksSourceByType(Collections.singleton(view),
- TopicEditPart.VISUAL_ID);
- source.addChildren(createNavigatorItems(connectedViews, source,
- true));
- if (!target.isEmpty()) {
- result.add(target);
- }
- if (!source.isEmpty()) {
- result.add(source);
- }
- return result.toArray();
- }
- }
- return EMPTY_ARRAY;
- }
-
- /**
- * @generated
- */
- private Collection getLinksSourceByType(Collection edges, int visualID) {
- Collection result = new ArrayList();
- String type = MindmapVisualIDRegistry.getType(visualID);
- for (Iterator it = edges.iterator(); it.hasNext();) {
- Edge nextEdge = (Edge) it.next();
- View nextEdgeSource = nextEdge.getSource();
- if (type.equals(nextEdgeSource.getType())
- && isOwnView(nextEdgeSource)) {
- result.add(nextEdgeSource);
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getLinksTargetByType(Collection edges, int visualID) {
- Collection result = new ArrayList();
- String type = MindmapVisualIDRegistry.getType(visualID);
- for (Iterator it = edges.iterator(); it.hasNext();) {
- Edge nextEdge = (Edge) it.next();
- View nextEdgeTarget = nextEdge.getTarget();
- if (type.equals(nextEdgeTarget.getType())
- && isOwnView(nextEdgeTarget)) {
- result.add(nextEdgeTarget);
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getOutgoingLinksByType(Collection nodes, int visualID) {
- Collection result = new ArrayList();
- String type = MindmapVisualIDRegistry.getType(visualID);
- for (Iterator it = nodes.iterator(); it.hasNext();) {
- View nextNode = (View) it.next();
- result.addAll(selectViewsByType(nextNode.getSourceEdges(), type));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getIncomingLinksByType(Collection nodes, int visualID) {
- Collection result = new ArrayList();
- String type = MindmapVisualIDRegistry.getType(visualID);
- for (Iterator it = nodes.iterator(); it.hasNext();) {
- View nextNode = (View) it.next();
- result.addAll(selectViewsByType(nextNode.getTargetEdges(), type));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getChildrenByType(Collection nodes, int visualID) {
- Collection result = new ArrayList();
- String type = MindmapVisualIDRegistry.getType(visualID);
- for (Iterator it = nodes.iterator(); it.hasNext();) {
- View nextNode = (View) it.next();
- result.addAll(selectViewsByType(nextNode.getChildren(), type));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getDiagramLinksByType(Collection diagrams, int visualID) {
- Collection result = new ArrayList();
- String type = MindmapVisualIDRegistry.getType(visualID);
- for (Iterator it = diagrams.iterator(); it.hasNext();) {
- Diagram nextDiagram = (Diagram) it.next();
- result.addAll(selectViewsByType(nextDiagram.getEdges(), type));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection selectViewsByType(Collection views, String type) {
- Collection result = new ArrayList();
- for (Iterator it = views.iterator(); it.hasNext();) {
- View nextView = (View) it.next();
- if (type.equals(nextView.getType()) && isOwnView(nextView)) {
- result.add(nextView);
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private boolean isOwnView(View view) {
- return MapEditPart.MODEL_ID.equals(MindmapVisualIDRegistry
- .getModelID(view));
- }
-
- /**
- * @generated
- */
- private Collection createNavigatorItems(Collection views, Object parent,
- boolean isLeafs) {
- Collection result = new ArrayList();
- for (Iterator it = views.iterator(); it.hasNext();) {
- result.add(new MindmapNavigatorItem((View) it.next(), parent,
- isLeafs));
- }
- return result;
- }
-
- /**
- * @generated
- */
- public Object getParent(Object element) {
- if (element instanceof MindmapAbstractNavigatorItem) {
- MindmapAbstractNavigatorItem abstractNavigatorItem = (MindmapAbstractNavigatorItem) element;
- return abstractNavigatorItem.getParent();
- }
- return null;
- }
-
- /**
- * @generated
- */
- public boolean hasChildren(Object element) {
- return element instanceof IFile || getChildren(element).length > 0;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorGroup.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorGroup.java
deleted file mode 100644
index 204700930..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorGroup.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import java.util.Collection;
-import java.util.LinkedList;
-
-/**
- * @generated
- */
-public class MindmapNavigatorGroup extends MindmapAbstractNavigatorItem {
-
- /**
- * @generated
- */
- private String myGroupName;
-
- /**
- * @generated
- */
- private String myIcon;
-
- /**
- * @generated
- */
- private Collection myChildren = new LinkedList();
-
- /**
- * @generated
- */
- MindmapNavigatorGroup(String groupName, String icon, Object parent) {
- super(parent);
- myGroupName = groupName;
- myIcon = icon;
- }
-
- /**
- * @generated
- */
- public String getGroupName() {
- return myGroupName;
- }
-
- /**
- * @generated
- */
- public String getIcon() {
- return myIcon;
- }
-
- /**
- * @generated
- */
- public Object[] getChildren() {
- return myChildren.toArray();
- }
-
- /**
- * @generated
- */
- public void addChildren(Collection children) {
- myChildren.addAll(children);
- }
-
- /**
- * @generated
- */
- public void addChild(Object child) {
- myChildren.add(child);
- }
-
- /**
- * @generated
- */
- public boolean isEmpty() {
- return myChildren.size() == 0;
- }
-
- /**
- * @generated
- */
- public boolean equals(Object obj) {
- if (obj instanceof org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorGroup) {
- org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorGroup anotherGroup = (org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorGroup) obj;
- if (getGroupName().equals(anotherGroup.getGroupName())) {
- return getParent().equals(anotherGroup.getParent());
- }
- }
- return super.equals(obj);
- }
-
- /**
- * @generated
- */
- public int hashCode() {
- return getGroupName().hashCode();
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorItem.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorItem.java
deleted file mode 100644
index 637ec613c..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorItem.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MindmapNavigatorItem extends MindmapAbstractNavigatorItem {
-
- /**
- * @generated
- */
- static {
- final Class[] supportedTypes = new Class[] { View.class, EObject.class };
- Platform.getAdapterManager().registerAdapters(
- new IAdapterFactory() {
-
- public Object getAdapter(Object adaptableObject,
- Class adapterType) {
- if (adaptableObject instanceof org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorItem
- && (adapterType == View.class || adapterType == EObject.class)) {
- return ((org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorItem) adaptableObject)
- .getView();
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return supportedTypes;
- }
- },
- org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorItem.class);
- }
-
- /**
- * @generated
- */
- private View myView;
-
- /**
- * @generated
- */
- private boolean myLeaf = false;
-
- /**
- * @generated
- */
- public MindmapNavigatorItem(View view, Object parent, boolean isLeaf) {
- super(parent);
- myView = view;
- myLeaf = isLeaf;
- }
-
- /**
- * @generated
- */
- public View getView() {
- return myView;
- }
-
- /**
- * @generated
- */
- public boolean isLeaf() {
- return myLeaf;
- }
-
- /**
- * @generated
- */
- public boolean equals(Object obj) {
- if (obj instanceof org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorItem) {
- return EcoreUtil
- .getURI(getView())
- .equals(
- EcoreUtil
- .getURI(((org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorItem) obj)
- .getView()));
- }
- return super.equals(obj);
- }
-
- /**
- * @generated
- */
- public int hashCode() {
- return EcoreUtil.getURI(getView()).hashCode();
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorLabelProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorLabelProvider.java
deleted file mode 100644
index 365c68b55..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorLabelProvider.java
+++ /dev/null
@@ -1,250 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.examples.mindmap.Map;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicNameEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicSubtopicsEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapElementTypes;
-import org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapParserProvider;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.viewers.ITreePathLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.ViewerLabel;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonLabelProvider;
-
-/**
- * @generated
- */
-public class MindmapNavigatorLabelProvider extends LabelProvider implements
- ICommonLabelProvider, ITreePathLabelProvider {
-
- /**
- * @generated
- */
- static {
- MindmapDiagramEditorPlugin
- .getInstance()
- .getImageRegistry()
- .put(
- "Navigator?UnknownElement", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
- MindmapDiagramEditorPlugin
- .getInstance()
- .getImageRegistry()
- .put(
- "Navigator?ImageNotFound", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- public void updateLabel(ViewerLabel label, TreePath elementPath) {
- Object element = elementPath.getLastSegment();
- if (element instanceof MindmapNavigatorItem
- && !isOwnView(((MindmapNavigatorItem) element).getView())) {
- return;
- }
- label.setText(getText(element));
- label.setImage(getImage(element));
- }
-
- /**
- * @generated
- */
- public Image getImage(Object element) {
- if (element instanceof MindmapNavigatorGroup) {
- MindmapNavigatorGroup group = (MindmapNavigatorGroup) element;
- return MindmapDiagramEditorPlugin.getInstance().getBundledImage(
- group.getIcon());
- }
-
- if (element instanceof MindmapNavigatorItem) {
- MindmapNavigatorItem navigatorItem = (MindmapNavigatorItem) element;
- if (!isOwnView(navigatorItem.getView())) {
- return super.getImage(element);
- }
- return getImage(navigatorItem.getView());
- }
-
- return super.getImage(element);
- }
-
- /**
- * @generated
- */
- public Image getImage(View view) {
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
- case MapEditPart.VISUAL_ID:
- return getImage(
- "Navigator?Diagram?http://www.example.org/mindmap?Map", MindmapElementTypes.Map_79); //$NON-NLS-1$
- case TopicEditPart.VISUAL_ID:
- return getImage(
- "Navigator?TopLevelNode?http://www.example.org/mindmap?Topic", MindmapElementTypes.Topic_1001); //$NON-NLS-1$
- case TopicSubtopicsEditPart.VISUAL_ID:
- return getImage(
- "Navigator?Link?http://www.example.org/mindmap?Topic?subtopics", MindmapElementTypes.TopicSubtopics_3001); //$NON-NLS-1$
- }
- return getImage("Navigator?UnknownElement", null); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- private Image getImage(String key, IElementType elementType) {
- ImageRegistry imageRegistry = MindmapDiagramEditorPlugin.getInstance()
- .getImageRegistry();
- Image image = imageRegistry.get(key);
- if (image == null && elementType != null
- && MindmapElementTypes.isKnownElementType(elementType)) {
- image = MindmapElementTypes.getImage(elementType);
- imageRegistry.put(key, image);
- }
-
- if (image == null) {
- image = imageRegistry.get("Navigator?ImageNotFound"); //$NON-NLS-1$
- imageRegistry.put(key, image);
- }
- return image;
- }
-
- /**
- * @generated
- */
- public String getText(Object element) {
- if (element instanceof MindmapNavigatorGroup) {
- MindmapNavigatorGroup group = (MindmapNavigatorGroup) element;
- return group.getGroupName();
- }
-
- if (element instanceof MindmapNavigatorItem) {
- MindmapNavigatorItem navigatorItem = (MindmapNavigatorItem) element;
- if (!isOwnView(navigatorItem.getView())) {
- return null;
- }
- return getText(navigatorItem.getView());
- }
-
- return super.getText(element);
- }
-
- /**
- * @generated
- */
- public String getText(View view) {
- if (view.getElement() != null && view.getElement().eIsProxy()) {
- return getUnresolvedDomainElementProxyText(view);
- }
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
- case MapEditPart.VISUAL_ID:
- return getMap_79Text(view);
- case TopicEditPart.VISUAL_ID:
- return getTopic_1001Text(view);
- case TopicSubtopicsEditPart.VISUAL_ID:
- return getTopicSubtopics_3001Text(view);
- }
- return getUnknownElementText(view);
- }
-
- /**
- * @generated
- */
- private String getMap_79Text(View view) {
- Map domainModelElement = (Map) view.getElement();
- if (domainModelElement != null) {
- return String.valueOf(domainModelElement.getTitle());
- } else {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "No domain element for view with visualID = " + 79); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getTopic_1001Text(View view) {
- IAdaptable hintAdapter = new MindmapParserProvider.HintAdapter(
- MindmapElementTypes.Topic_1001,
- (view.getElement() != null ? view.getElement() : view),
- MindmapVisualIDRegistry.getType(TopicNameEditPart.VISUAL_ID));
- IParser parser = ParserService.getInstance().getParser(hintAdapter);
-
- if (parser != null) {
- return parser.getPrintString(hintAdapter, ParserOptions.NONE
- .intValue());
- } else {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Parser was not found for label " + 4001); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
-
- }
-
- /**
- * @generated
- */
- private String getTopicSubtopics_3001Text(View view) {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- private String getUnknownElementText(View view) {
- return "<UnknownElement Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @generated
- */
- private String getUnresolvedDomainElementProxyText(View view) {
- return "<Unresolved domain element Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @generated
- */
- public void init(ICommonContentExtensionSite aConfig) {
- }
-
- /**
- * @generated
- */
- public void restoreState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void saveState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public String getDescription(Object anElement) {
- return null;
- }
-
- /**
- * @generated
- */
- private boolean isOwnView(View view) {
- return MapEditPart.MODEL_ID.equals(MindmapVisualIDRegistry
- .getModelID(view));
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorLinkHelper.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorLinkHelper.java
deleted file mode 100644
index 535030fdf..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorLinkHelper.java
+++ /dev/null
@@ -1,128 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.navigator.ILinkHelper;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @generated
- */
-public class MindmapNavigatorLinkHelper implements ILinkHelper {
-
- /**
- * @generated
- */
- private static IEditorInput getEditorInput(Diagram diagram) {
- Resource diagramResource = diagram.eResource();
- for (Iterator it = diagramResource.getContents().iterator(); it
- .hasNext();) {
- EObject nextEObject = (EObject) it.next();
- if (nextEObject == diagram) {
- return new FileEditorInput(WorkspaceSynchronizer
- .getFile(diagramResource));
- }
- if (nextEObject instanceof Diagram) {
- break;
- }
- }
- URI uri = EcoreUtil.getURI(diagram);
- String editorName = uri.lastSegment()
- + "#" + diagram.eResource().getContents().indexOf(diagram); //$NON-NLS-1$
- IEditorInput editorInput = new URIEditorInput(uri, editorName);
- return editorInput;
- }
-
- /**
- * @generated
- */
- public IStructuredSelection findSelection(IEditorInput anInput) {
- IDiagramDocument document = MindmapDiagramEditorPlugin.getInstance()
- .getDocumentProvider().getDiagramDocument(anInput);
- if (document == null) {
- return StructuredSelection.EMPTY;
- }
- Diagram diagram = document.getDiagram();
- IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
- if (file != null) {
- MindmapNavigatorItem item = new MindmapNavigatorItem(diagram, file,
- false);
- return new StructuredSelection(item);
- }
- return StructuredSelection.EMPTY;
- }
-
- /**
- * @generated
- */
- public void activateEditor(IWorkbenchPage aPage,
- IStructuredSelection aSelection) {
- if (aSelection == null || aSelection.isEmpty()) {
- return;
- }
- if (false == aSelection.getFirstElement() instanceof MindmapAbstractNavigatorItem) {
- return;
- }
-
- MindmapAbstractNavigatorItem abstractNavigatorItem = (MindmapAbstractNavigatorItem) aSelection
- .getFirstElement();
- View navigatorView = null;
- if (abstractNavigatorItem instanceof MindmapNavigatorItem) {
- navigatorView = ((MindmapNavigatorItem) abstractNavigatorItem)
- .getView();
- } else if (abstractNavigatorItem instanceof MindmapNavigatorGroup) {
- MindmapNavigatorGroup navigatorGroup = (MindmapNavigatorGroup) abstractNavigatorItem;
- if (navigatorGroup.getParent() instanceof MindmapNavigatorItem) {
- navigatorView = ((MindmapNavigatorItem) navigatorGroup
- .getParent()).getView();
- }
- }
- if (navigatorView == null) {
- return;
- }
- IEditorInput editorInput = getEditorInput(navigatorView.getDiagram());
- IEditorPart editor = aPage.findEditor(editorInput);
- if (editor == null) {
- return;
- }
- aPage.bringToTop(editor);
- if (editor instanceof DiagramEditor) {
- DiagramEditor diagramEditor = (DiagramEditor) editor;
- ResourceSet diagramEditorResourceSet = diagramEditor
- .getEditingDomain().getResourceSet();
- EObject selectedView = diagramEditorResourceSet.getEObject(
- EcoreUtil.getURI(navigatorView), true);
- if (selectedView == null) {
- return;
- }
- GraphicalViewer graphicalViewer = (GraphicalViewer) diagramEditor
- .getAdapter(GraphicalViewer.class);
- EditPart selectedEditPart = (EditPart) graphicalViewer
- .getEditPartRegistry().get(selectedView);
- if (selectedEditPart != null) {
- graphicalViewer.select(selectedEditPart);
- }
- }
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorSorter.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorSorter.java
deleted file mode 100644
index 5a450718b..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/navigator/MindmapNavigatorSorter.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.navigator;
-
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.jface.viewers.ViewerSorter;
-
-/**
- * @generated
- */
-public class MindmapNavigatorSorter extends ViewerSorter {
-
- /**
- * @generated
- */
- private static final int GROUP_CATEGORY = 3003;
-
- /**
- * @generated
- */
- public int category(Object element) {
- if (element instanceof MindmapNavigatorItem) {
- MindmapNavigatorItem item = (MindmapNavigatorItem) element;
- return MindmapVisualIDRegistry.getVisualID(item.getView());
- }
- return GROUP_CATEGORY;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/AbstractParser.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/AbstractParser.java
deleted file mode 100644
index 630a72c28..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/AbstractParser.java
+++ /dev/null
@@ -1,440 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.parsers;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.examples.mindmap.diagram.part.Messages;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @generated
- */
-public abstract class AbstractParser implements IParser {
-
- /**
- * @generated
- */
- protected final EAttribute[] features;
-
- /**
- * @generated
- */
- private String viewPattern;
-
- /**
- * @generated
- */
- private String editorPattern;
-
- /**
- * @generated
- */
- private String editPattern;
-
- /**
- * @generated
- */
- public AbstractParser(EAttribute[] features) {
- if (features == null || Arrays.asList(features).contains(null)) {
- throw new IllegalArgumentException();
- }
- this.features = features;
- }
-
- /**
- * @generated
- */
- public String getViewPattern() {
- return viewPattern;
- }
-
- /**
- * @generated
- */
- public void setViewPattern(String viewPattern) {
- this.viewPattern = viewPattern;
- }
-
- /**
- * @generated
- */
- public String getEditorPattern() {
- return editorPattern;
- }
-
- /**
- * @generated
- */
- public void setEditorPattern(String editorPattern) {
- this.editorPattern = editorPattern;
- }
-
- /**
- * @generated
- */
- public String getEditPattern() {
- return editPattern;
- }
-
- /**
- * @generated
- */
- public void setEditPattern(String editPattern) {
- this.editPattern = editPattern;
- }
-
- /**
- * @generated
- */
- public boolean isAffectingEvent(Object event, int flags) {
- if (event instanceof Notification) {
- return isAffectingFeature(((Notification) event).getFeature());
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean isAffectingFeature(Object feature) {
- for (int i = 0; i < features.length; i++) {
- if (features[i] == feature) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Object[] getValues(EObject element) {
- Object[] values = new Object[features.length];
- for (int i = 0; i < features.length; i++) {
- values[i] = getValue(element, features[i]);
- }
- return values;
- }
-
- /**
- * @generated
- */
- protected Object getValue(EObject element, EAttribute feature) {
- Object value = element.eGet(feature);
- Class iClass = feature.getEAttributeType().getInstanceClass();
- if (String.class.equals(iClass)) {
- if (value == null) {
- value = ""; //$NON-NLS-1$
- }
- }
- return value;
- }
-
- /**
- * @generated
- */
- protected ICommand getParseCommand(IAdaptable adapter, Object[] values,
- int flags) {
- if (values == null
- || validateNewValues(values).getCode() != IParserEditStatus.EDITABLE) {
- return UnexecutableCommand.INSTANCE;
- }
- EObject element = (EObject) adapter.getAdapter(EObject.class);
- TransactionalEditingDomain editingDomain = TransactionUtil
- .getEditingDomain(element);
- if (editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(
- editingDomain, "Set Values"); //$NON-NLS-1$
- for (int i = 0; i < values.length; i++) {
- command.compose(getModificationCommand(element, features[i],
- values[i]));
- }
- return command;
- }
-
- /**
- * @generated
- */
- protected ICommand getModificationCommand(EObject element,
- EAttribute feature, Object value) {
- value = getValidNewValue(feature, value);
- if (value instanceof InvalidValue) {
- return UnexecutableCommand.INSTANCE;
- }
- SetRequest request = new SetRequest(element, feature, value);
- return new SetValueCommand(request);
- }
-
- /**
- * @generated
- */
- protected IParserEditStatus validateNewValues(Object[] values) {
- if (values.length != features.length) {
- return ParserEditStatus.UNEDITABLE_STATUS;
- }
- for (int i = 0; i < values.length; i++) {
- Object value = getValidNewValue(features[i], values[i]);
- if (value instanceof InvalidValue) {
- return new ParserEditStatus(MindmapDiagramEditorPlugin.ID,
- IParserEditStatus.UNEDITABLE, value.toString());
- }
- }
- return ParserEditStatus.EDITABLE_STATUS;
- }
-
- /**
- * @generated
- */
- protected Object getValidNewValue(EAttribute feature, Object value) {
- EClassifier type = feature.getEType();
- if (type instanceof EDataType) {
- Class iClass = type.getInstanceClass();
- if (Boolean.TYPE.equals(iClass)) {
- if (value instanceof Boolean) {
- // ok
- } else if (value instanceof String) {
- value = Boolean.valueOf((String) value);
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- iClass.getName()));
- }
- } else if (Character.TYPE.equals(iClass)) {
- if (value instanceof Character) {
- // ok
- } else if (value instanceof String) {
- String s = (String) value;
- if (s.length() == 0) {
- value = null;
- } else {
- value = new Character(s.charAt(0));
- }
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- iClass.getName()));
- }
- } else if (Byte.TYPE.equals(iClass)) {
- if (value instanceof Byte) {
- // ok
- } else if (value instanceof Number) {
- value = new Byte(((Number) value).byteValue());
- } else if (value instanceof String) {
- String s = (String) value;
- if (s.length() == 0) {
- value = null;
- } else {
- try {
- value = Byte.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(
- NLS
- .bind(
- Messages.AbstractParser_WrongStringConversionMessage,
- iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- iClass.getName()));
- }
- } else if (Short.TYPE.equals(iClass)) {
- if (value instanceof Short) {
- // ok
- } else if (value instanceof Number) {
- value = new Short(((Number) value).shortValue());
- } else if (value instanceof String) {
- String s = (String) value;
- if (s.length() == 0) {
- value = null;
- } else {
- try {
- value = Short.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(
- NLS
- .bind(
- Messages.AbstractParser_WrongStringConversionMessage,
- iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- iClass.getName()));
- }
- } else if (Integer.TYPE.equals(iClass)) {
- if (value instanceof Integer) {
- // ok
- } else if (value instanceof Number) {
- value = new Integer(((Number) value).intValue());
- } else if (value instanceof String) {
- String s = (String) value;
- if (s.length() == 0) {
- value = null;
- } else {
- try {
- value = Integer.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(
- NLS
- .bind(
- Messages.AbstractParser_WrongStringConversionMessage,
- iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- iClass.getName()));
- }
- } else if (Long.TYPE.equals(iClass)) {
- if (value instanceof Long) {
- // ok
- } else if (value instanceof Number) {
- value = new Long(((Number) value).longValue());
- } else if (value instanceof String) {
- String s = (String) value;
- if (s.length() == 0) {
- value = null;
- } else {
- try {
- value = Long.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(
- NLS
- .bind(
- Messages.AbstractParser_WrongStringConversionMessage,
- iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- iClass.getName()));
- }
- } else if (Float.TYPE.equals(iClass)) {
- if (value instanceof Float) {
- // ok
- } else if (value instanceof Number) {
- value = new Float(((Number) value).floatValue());
- } else if (value instanceof String) {
- String s = (String) value;
- if (s.length() == 0) {
- value = null;
- } else {
- try {
- value = Float.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(
- NLS
- .bind(
- Messages.AbstractParser_WrongStringConversionMessage,
- iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- iClass.getName()));
- }
- } else if (Double.TYPE.equals(iClass)) {
- if (value instanceof Double) {
- // ok
- } else if (value instanceof Number) {
- value = new Double(((Number) value).doubleValue());
- } else if (value instanceof String) {
- String s = (String) value;
- if (s.length() == 0) {
- value = null;
- } else {
- try {
- value = Double.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(
- NLS
- .bind(
- Messages.AbstractParser_WrongStringConversionMessage,
- iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- iClass.getName()));
- }
- } else if (type instanceof EEnum) {
- if (value instanceof String) {
- EEnumLiteral literal = ((EEnum) type)
- .getEEnumLiteralByLiteral((String) value);
- if (literal == null) {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnknownLiteralMessage,
- value));
- } else {
- value = literal.getInstance();
- }
- } else {
- value = new InvalidValue(NLS.bind(
- Messages.AbstractParser_UnexpectedValueTypeMessage,
- String.class.getName()));
- }
- }
- }
- return value;
- }
-
- /**
- * @generated
- */
- protected class InvalidValue {
-
- /**
- * @generated
- */
- private String description;
-
- /**
- * @generated
- */
- public InvalidValue(String description) {
- this.description = description;
- }
-
- /**
- * @generated
- */
- public String toString() {
- return description;
- }
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/CompositeParser.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/CompositeParser.java
deleted file mode 100644
index 82f966c37..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/CompositeParser.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.parsers;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-
-/**
- * @generated
- */
-public class CompositeParser implements IParser {
-
- /**
- * @generated
- */
- private final IParser reader;
-
- /**
- * @generated
- */
- private final IParser writer;
-
- /**
- * @generated
- */
- public CompositeParser(IParser reader, IParser writer) {
- this.reader = reader;
- this.writer = writer;
- }
-
- /**
- * @generated
- */
- public boolean isAffectingEvent(Object event, int flags) {
- return reader.isAffectingEvent(event, flags);
- }
-
- /**
- * @generated
- */
- public String getPrintString(IAdaptable adapter, int flags) {
- return reader.getPrintString(adapter, flags);
- }
-
- /**
- * @generated
- */
- public String getEditString(IAdaptable adapter, int flags) {
- return reader.getEditString(adapter, flags);
- }
-
- /**
- * @generated
- */
- public IParserEditStatus isValidEditString(IAdaptable adapter,
- String editString) {
- return writer.isValidEditString(adapter, editString);
- }
-
- /**
- * @generated
- */
- public ICommand getParseCommand(IAdaptable adapter, String newString,
- int flags) {
- return writer.getParseCommand(adapter, newString, flags);
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor(IAdaptable adapter) {
- return writer.getCompletionProcessor(adapter);
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/MessageFormatParser.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/MessageFormatParser.java
deleted file mode 100644
index 783c84f1a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/parsers/MessageFormatParser.java
+++ /dev/null
@@ -1,210 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.parsers;
-
-import java.text.FieldPosition;
-import java.text.MessageFormat;
-import java.text.ParsePosition;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.examples.mindmap.diagram.part.Messages;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @generated
- */
-public class MessageFormatParser extends AbstractParser {
-
- /**
- * @generated
- */
- private String defaultPattern;
-
- /**
- * @generated
- */
- private MessageFormat viewProcessor;
-
- /**
- * @generated
- */
- private MessageFormat editorProcessor;
-
- /**
- * @generated
- */
- private MessageFormat editProcessor;
-
- /**
- * @generated
- */
- public MessageFormatParser(EAttribute[] features) {
- super(features);
- }
-
- /**
- * @generated
- */
- protected String getDefaultPattern() {
- if (defaultPattern == null) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < features.length; i++) {
- if (i > 0) {
- sb.append(' ');
- }
- sb.append('{');
- sb.append(i);
- sb.append('}');
- }
- defaultPattern = sb.toString();
- }
- return defaultPattern;
- }
-
- /**
- * @generated
- */
- public String getViewPattern() {
- String pattern = super.getViewPattern();
- return pattern != null ? pattern : getDefaultPattern();
- }
-
- /**
- * @generated
- */
- public void setViewPattern(String viewPattern) {
- super.setViewPattern(viewPattern);
- viewProcessor = null;
- }
-
- /**
- * @generated
- */
- protected MessageFormat createViewProcessor(String viewPattern) {
- return new MessageFormat(viewPattern);
- }
-
- /**
- * @generated
- */
- protected MessageFormat getViewProcessor() {
- if (viewProcessor == null) {
- viewProcessor = createViewProcessor(getViewPattern());
- }
- return viewProcessor;
- }
-
- /**
- * @generated
- */
- public String getEditorPattern() {
- String pattern = super.getEditorPattern();
- return pattern != null ? pattern : getDefaultPattern();
- }
-
- /**
- * @generated
- */
- public void setEditorPattern(String editorPattern) {
- super.setEditorPattern(editorPattern);
- editorProcessor = null;
- }
-
- /**
- * @generated
- */
- protected MessageFormat createEditorProcessor(String editorPattern) {
- return new MessageFormat(editorPattern);
- }
-
- /**
- * @generated
- */
- protected MessageFormat getEditorProcessor() {
- if (editorProcessor == null) {
- editorProcessor = createEditorProcessor(getEditorPattern());
- }
- return editorProcessor;
- }
-
- /**
- * @generated
- */
- public String getEditPattern() {
- String pattern = super.getEditPattern();
- return pattern != null ? pattern : getDefaultPattern();
- }
-
- /**
- * @generated
- */
- public void setEditPattern(String editPattern) {
- super.setEditPattern(editPattern);
- editProcessor = null;
- }
-
- /**
- * @generated
- */
- protected MessageFormat createEditProcessor(String editPattern) {
- return new MessageFormat(editPattern);
- }
-
- /**
- * @generated
- */
- protected MessageFormat getEditProcessor() {
- if (editProcessor == null) {
- editProcessor = createEditProcessor(getEditPattern());
- }
- return editProcessor;
- }
-
- /**
- * @generated
- */
- public String getPrintString(IAdaptable adapter, int flags) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
- return getViewProcessor().format(getValues(element),
- new StringBuffer(), new FieldPosition(0)).toString();
- }
-
- /**
- * @generated
- */
- public String getEditString(IAdaptable adapter, int flags) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
- return getEditorProcessor().format(getValues(element),
- new StringBuffer(), new FieldPosition(0)).toString();
- }
-
- /**
- * @generated
- */
- public IParserEditStatus isValidEditString(IAdaptable adapter,
- String editString) {
- ParsePosition pos = new ParsePosition(0);
- Object[] values = getEditProcessor().parse(editString, pos);
- if (values == null) {
- return new ParserEditStatus(MindmapDiagramEditorPlugin.ID,
- IParserEditStatus.UNEDITABLE, NLS.bind(
- Messages.MessageFormatParser_InvalidInputError,
- new Integer(pos.getErrorIndex())));
- }
- return validateNewValues(values);
- }
-
- /**
- * @generated
- */
- public ICommand getParseCommand(IAdaptable adapter, String newString,
- int flags) {
- Object[] values = getEditProcessor().parse(newString,
- new ParsePosition(0));
- return getParseCommand(adapter, values, flags);
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/Messages.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/Messages.java
deleted file mode 100644
index 78982ee26..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/Messages.java
+++ /dev/null
@@ -1,334 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @generated
- */
-public class Messages extends NLS {
-
- /**
- * @generated
- */
- static {
- NLS.initializeMessages("messages", Messages.class); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- private Messages() {
- }
-
- /**
- * @generated
- */
- public static String MindmapCreationWizardTitle;
-
- /**
- * @generated
- */
- public static String MindmapCreationWizard_DiagramModelFilePageTitle;
-
- /**
- * @generated
- */
- public static String MindmapCreationWizard_DiagramModelFilePageDescription;
-
- /**
- * @generated
- */
- public static String MindmapCreationWizard_DomainModelFilePageTitle;
-
- /**
- * @generated
- */
- public static String MindmapCreationWizard_DomainModelFilePageDescription;
-
- /**
- * @generated
- */
- public static String MindmapCreationWizardOpenEditorError;
-
- /**
- * @generated
- */
- public static String MindmapCreationWizardCreationError;
-
- /**
- * @generated
- */
- public static String MindmapCreationWizardPageExtensionError;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditorUtil_OpenModelResourceErrorDialogTitle;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditorUtil_OpenModelResourceErrorDialogMessage;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditorUtil_CreateDiagramProgressTask;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditorUtil_CreateDiagramCommandLabel;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_isModifiable;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_handleElementContentChanged;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_IncorrectInputError;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_NoDiagramInResourceError;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_DiagramLoadingError;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_UnsynchronizedFileSaveError;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_SaveDiagramTask;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_SaveNextResourceTask;
-
- /**
- * @generated
- */
- public static String MindmapDocumentProvider_SaveAsOperation;
-
- /**
- * @generated
- */
- public static String MindmapInitDiagramFileAction_InitDiagramFileResourceErrorDialogTitle;
-
- /**
- * @generated
- */
- public static String MindmapInitDiagramFileAction_InitDiagramFileResourceErrorDialogMessage;
-
- /**
- * @generated
- */
- public static String MindmapInitDiagramFileAction_InitDiagramFileWizardTitle;
-
- /**
- * @generated
- */
- public static String MindmapInitDiagramFileAction_OpenModelFileDialogTitle;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_CreationPageName;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_CreationPageTitle;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_CreationPageDescription;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_RootSelectionPageName;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_RootSelectionPageTitle;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_RootSelectionPageDescription;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_RootSelectionPageSelectionTitle;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_RootSelectionPageNoSelectionMessage;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_InitDiagramCommand;
-
- /**
- * @generated
- */
- public static String MindmapNewDiagramFileWizard_IncorrectRootError;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditor_SavingDeletedFile;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditor_SaveAsErrorTitle;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditor_SaveAsErrorMessage;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditor_SaveErrorTitle;
-
- /**
- * @generated
- */
- public static String MindmapDiagramEditor_SaveErrorMessage;
-
- /**
- * @generated
- */
- public static String MindmapElementChooserDialog_SelectModelElementTitle;
-
- /**
- * @generated
- */
- public static String ModelElementSelectionPageMessage;
-
- /**
- * @generated
- */
- public static String ValidateActionMessage;
-
- /**
- * @generated
- */
- public static String Mindmap1Group_title;
-
- /**
- * @generated
- */
- public static String Topic1CreationTool_title;
-
- /**
- * @generated
- */
- public static String Topic1CreationTool_desc;
-
- /**
- * @generated
- */
- public static String TopicSubtopics2CreationTool_title;
-
- /**
- * @generated
- */
- public static String TopicSubtopics2CreationTool_desc;
-
- /**
- * @generated
- */
- public static String CommandName_OpenDiagram;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Map_79_links;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Topic_1001_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Topic_1001_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_TopicSubtopics_3001_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_TopicSubtopics_3001_source;
-
- /**
- * @generated
- */
- public static String NavigatorActionProvider_OpenDiagramActionName;
-
- /**
- * @generated
- */
- public static String AbstractParser_UnexpectedValueTypeMessage;
-
- /**
- * @generated
- */
- public static String AbstractParser_WrongStringConversionMessage;
-
- /**
- * @generated
- */
- public static String AbstractParser_UnknownLiteralMessage;
-
- /**
- * @generated
- */
- public static String MessageFormatParser_InvalidInputError;
-
- /**
- * @generated
- */
- public static String MindmapModelingAssistantProviderTitle;
-
- /**
- * @generated
- */
- public static String MindmapModelingAssistantProviderMessage;
-
- //TODO: put accessor fields manually
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapCreationWizard.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapCreationWizard.java
deleted file mode 100644
index edf743930..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapCreationWizard.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * @generated
- */
-public class MindmapCreationWizard extends Wizard implements INewWizard {
-
- /**
- * @generated
- */
- private IWorkbench workbench;
-
- /**
- * @generated
- */
- protected IStructuredSelection selection;
-
- /**
- * @generated
- */
- protected MindmapCreationWizardPage diagramModelFilePage;
-
- /**
- * @generated
- */
- protected MindmapCreationWizardPage domainModelFilePage;
-
- /**
- * @generated
- */
- protected Resource diagram;
-
- /**
- * @generated
- */
- private boolean openNewlyCreatedDiagramEditor = true;
-
- /**
- * @generated
- */
- public IWorkbench getWorkbench() {
- return workbench;
- }
-
- /**
- * @generated
- */
- public IStructuredSelection getSelection() {
- return selection;
- }
-
- /**
- * @generated
- */
- public final Resource getDiagram() {
- return diagram;
- }
-
- /**
- * @generated
- */
- public final boolean isOpenNewlyCreatedDiagramEditor() {
- return openNewlyCreatedDiagramEditor;
- }
-
- /**
- * @generated
- */
- public void setOpenNewlyCreatedDiagramEditor(
- boolean openNewlyCreatedDiagramEditor) {
- this.openNewlyCreatedDiagramEditor = openNewlyCreatedDiagramEditor;
- }
-
- /**
- * @generated
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.workbench = workbench;
- this.selection = selection;
- setWindowTitle(Messages.MindmapCreationWizardTitle);
- setDefaultPageImageDescriptor(MindmapDiagramEditorPlugin
- .getBundledImageDescriptor("icons/wizban/NewMindmapWizard.gif")); //$NON-NLS-1$
- setNeedsProgressMonitor(true);
- }
-
- /**
- * @generated
- */
- public void addPages() {
- diagramModelFilePage = new MindmapCreationWizardPage(
- "DiagramModelFile", getSelection(), "mindmap_diagram"); //$NON-NLS-1$ //$NON-NLS-2$
- diagramModelFilePage
- .setTitle(Messages.MindmapCreationWizard_DiagramModelFilePageTitle);
- diagramModelFilePage
- .setDescription(Messages.MindmapCreationWizard_DiagramModelFilePageDescription);
- addPage(diagramModelFilePage);
-
- domainModelFilePage = new MindmapCreationWizardPage(
- "DomainModelFile", getSelection(), "mindmap"); //$NON-NLS-1$ //$NON-NLS-2$
- domainModelFilePage
- .setTitle(Messages.MindmapCreationWizard_DomainModelFilePageTitle);
- domainModelFilePage
- .setDescription(Messages.MindmapCreationWizard_DomainModelFilePageDescription);
- addPage(domainModelFilePage);
- }
-
- /**
- * @generated
- */
- public boolean performFinish() {
- IRunnableWithProgress op = new WorkspaceModifyOperation(null) {
-
- protected void execute(IProgressMonitor monitor)
- throws CoreException, InterruptedException {
- diagram = MindmapDiagramEditorUtil.createDiagram(
- diagramModelFilePage.getURI(), domainModelFilePage
- .getURI(), monitor);
- if (isOpenNewlyCreatedDiagramEditor() && diagram != null) {
- try {
- MindmapDiagramEditorUtil.openDiagram(diagram);
- } catch (PartInitException e) {
- ErrorDialog.openError(getContainer().getShell(),
- Messages.MindmapCreationWizardOpenEditorError,
- null, e.getStatus());
- }
- }
- }
- };
- try {
- getContainer().run(false, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- if (e.getTargetException() instanceof CoreException) {
- ErrorDialog.openError(getContainer().getShell(),
- Messages.MindmapCreationWizardCreationError, null,
- ((CoreException) e.getTargetException()).getStatus());
- } else {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Error creating diagram", e.getTargetException()); //$NON-NLS-1$
- }
- return false;
- }
- return diagram != null;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapCreationWizardPage.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapCreationWizardPage.java
deleted file mode 100644
index 8da047d2d..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapCreationWizardPage.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-/**
- * @generated
- */
-public class MindmapCreationWizardPage extends WizardNewFileCreationPage {
-
- /**
- * @generated
- */
- private final String fileExtension;
-
- /**
- * @generated
- */
- public MindmapCreationWizardPage(String pageName,
- IStructuredSelection selection, String fileExtension) {
- super(pageName, selection);
- this.fileExtension = fileExtension;
- }
-
- /**
- * Override to create files with this extension.
- *
- * @generated
- */
- protected String getExtension() {
- return fileExtension;
- }
-
- /**
- * @generated
- */
- public URI getURI() {
- return URI.createPlatformResourceURI(getFilePath().toString(), false);
- }
-
- /**
- * @generated
- */
- protected IPath getFilePath() {
- IPath path = getContainerFullPath();
- if (path == null) {
- path = new Path(""); //$NON-NLS-1$
- }
- String fileName = getFileName();
- if (fileName != null) {
- path = path.append(fileName);
- }
- return path;
- }
-
- /**
- * @generated
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- setFileName(MindmapDiagramEditorUtil.getUniqueFileName(
- getContainerFullPath(), getFileName(), getExtension()));
- setPageComplete(validatePage());
- }
-
- /**
- * @generated
- */
- protected boolean validatePage() {
- if (!super.validatePage()) {
- return false;
- }
- String extension = getExtension();
- if (extension != null
- && !getFilePath().toString().endsWith("." + extension)) {
- setErrorMessage(NLS
- .bind(Messages.MindmapCreationWizardPageExtensionError,
- extension));
- return false;
- }
- return true;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramActionBarContributor.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramActionBarContributor.java
deleted file mode 100644
index 026ea1adc..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramActionBarContributor.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor;
-
-/**
- * @generated
- */
-public class MindmapDiagramActionBarContributor extends
- DiagramActionBarContributor {
-
- /**
- * @generated
- */
- protected Class getEditorClass() {
- return MindmapDiagramEditor.class;
- }
-
- /**
- * @generated
- */
- protected String getEditorId() {
- return MindmapDiagramEditor.ID;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditor.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditor.java
deleted file mode 100644
index 88662e249..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditor.java
+++ /dev/null
@@ -1,323 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorItem;
-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorMatchingStrategy;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.SaveAsDialog;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.navigator.resources.ProjectExplorer;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.IShowInTargetList;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * @generated
- */
-public class MindmapDiagramEditor extends DiagramDocumentEditor implements
- IGotoMarker {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final String CONTEXT_ID = "org.eclipse.gmf.examples.mindmap.diagram.ui.diagramContext"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public MindmapDiagramEditor() {
- super(true);
- }
-
- /**
- * @generated
- */
- @Override
- protected String getContextID() {
- return CONTEXT_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
- PaletteRoot root = super.createPaletteRoot(existingPaletteRoot);
- new MindmapPaletteFactory().fillPalette(root);
- return root;
- }
-
- /**
- * @generated
- */
- @Override
- protected PreferencesHint getPreferencesHint() {
- return MindmapDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- @Override
- public String getContributorId() {
- return MindmapDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getAdapter(Class type) {
- if (type == IShowInTargetList.class) {
- return new IShowInTargetList() {
- public String[] getShowInTargetIds() {
- return new String[] { ProjectExplorer.VIEW_ID };
- }
- };
- }
- return super.getAdapter(type);
- }
-
- /**
- * @generated
- */
- @Override
- protected IDocumentProvider getDocumentProvider(IEditorInput input) {
- if (input instanceof IFileEditorInput
- || input instanceof URIEditorInput) {
- return MindmapDiagramEditorPlugin.getInstance()
- .getDocumentProvider();
- }
- return super.getDocumentProvider(input);
- }
-
- /**
- * @generated
- */
- @Override
- public TransactionalEditingDomain getEditingDomain() {
- IDocument document = getEditorInput() != null ? getDocumentProvider()
- .getDocument(getEditorInput()) : null;
- if (document instanceof IDiagramDocument) {
- return ((IDiagramDocument) document).getEditingDomain();
- }
- return super.getEditingDomain();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setDocumentProvider(IEditorInput input) {
- if (input instanceof IFileEditorInput
- || input instanceof URIEditorInput) {
- setDocumentProvider(MindmapDiagramEditorPlugin.getInstance()
- .getDocumentProvider());
- } else {
- super.setDocumentProvider(input);
- }
- }
-
- /**
- * @generated
- */
- public void gotoMarker(IMarker marker) {
- MarkerNavigationService.getInstance().gotoMarker(this, marker);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * @generated
- */
- @Override
- public void doSaveAs() {
- performSaveAs(new NullProgressMonitor());
- }
-
- /**
- * @generated
- */
- @Override
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- Shell shell = getSite().getShell();
- IEditorInput input = getEditorInput();
- SaveAsDialog dialog = new SaveAsDialog(shell);
- IFile original = input instanceof IFileEditorInput ? ((IFileEditorInput) input)
- .getFile()
- : null;
- if (original != null) {
- dialog.setOriginalFile(original);
- }
- dialog.create();
- IDocumentProvider provider = getDocumentProvider();
- if (provider == null) {
- // editor has been programmatically closed while the dialog was open
- return;
- }
- if (provider.isDeleted(input) && original != null) {
- String message = NLS.bind(
- Messages.MindmapDiagramEditor_SavingDeletedFile, original
- .getName());
- dialog.setErrorMessage(null);
- dialog.setMessage(message, IMessageProvider.WARNING);
- }
- if (dialog.open() == Window.CANCEL) {
- if (progressMonitor != null) {
- progressMonitor.setCanceled(true);
- }
- return;
- }
- IPath filePath = dialog.getResult();
- if (filePath == null) {
- if (progressMonitor != null) {
- progressMonitor.setCanceled(true);
- }
- return;
- }
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- IFile file = workspaceRoot.getFile(filePath);
- final IEditorInput newInput = new FileEditorInput(file);
- // Check if the editor is already open
- IEditorMatchingStrategy matchingStrategy = getEditorDescriptor()
- .getEditorMatchingStrategy();
- IEditorReference[] editorRefs = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage()
- .getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- if (matchingStrategy.matches(editorRefs[i], newInput)) {
- MessageDialog.openWarning(shell,
- Messages.MindmapDiagramEditor_SaveAsErrorTitle,
- Messages.MindmapDiagramEditor_SaveAsErrorMessage);
- return;
- }
- }
- boolean success = false;
- try {
- provider.aboutToChange(newInput);
- getDocumentProvider(newInput).saveDocument(progressMonitor,
- newInput,
- getDocumentProvider().getDocument(getEditorInput()), true);
- success = true;
- } catch (CoreException x) {
- IStatus status = x.getStatus();
- if (status == null || status.getSeverity() != IStatus.CANCEL) {
- ErrorDialog.openError(shell,
- Messages.MindmapDiagramEditor_SaveErrorTitle,
- Messages.MindmapDiagramEditor_SaveErrorMessage, x
- .getStatus());
- }
- } finally {
- provider.changed(newInput);
- if (success) {
- setInput(newInput);
- }
- }
- if (progressMonitor != null) {
- progressMonitor.setCanceled(!success);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public ShowInContext getShowInContext() {
- return new ShowInContext(getEditorInput(), getNavigatorSelection());
- }
-
- /**
- * @generated
- */
- private ISelection getNavigatorSelection() {
- IDiagramDocument document = getDiagramDocument();
- if (document == null) {
- return StructuredSelection.EMPTY;
- }
- Diagram diagram = document.getDiagram();
- IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
- if (file != null) {
- MindmapNavigatorItem item = new MindmapNavigatorItem(diagram, file,
- false);
- return new StructuredSelection(item);
- }
- return StructuredSelection.EMPTY;
- }
-
- @Override
- // register the resource as not being readonly
- public void setInput(IEditorInput input) {
- // this part is copied from the super.setInput because
- // the catch block was hiding the underlying exception
- // for now a printStackTrace is added for better visibility
- // this should ofcourse be replaced by logging
- try {
- doSetInput(input, true);
- } catch (CoreException x) {
- x.printStackTrace(System.err);
- String title = x.getMessage();
- String msg = x.getMessage();
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
-
- // set the resource in the resourcetoreadonly map
- final ResourceSet rs = getEditingDomain().getResourceSet();
- for (Resource res : rs.getResources()) {
- ((AdapterFactoryEditingDomain) getEditingDomain())
- .getResourceToReadOnlyMap().put(res, new Boolean(false));
- }
- }
-
- @Override
- // implement a more simple save as there are no save-as dialogs involved
- public void doSave(IProgressMonitor progressMonitor) {
- updateState(getEditorInput());
- validateState(getEditorInput());
- performSave(false, progressMonitor);
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditorPlugin.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditorPlugin.java
deleted file mode 100644
index c03e9dc00..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditorPlugin.java
+++ /dev/null
@@ -1,248 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
-import org.eclipse.gmf.examples.mindmap.diagram.db.StoreController;
-import org.eclipse.gmf.examples.mindmap.provider.MindmapItemProviderAdapterFactory;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * @generated
- */
-public class MindmapDiagramEditorPlugin extends AbstractUIPlugin {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.gmf.examples.mindmap.diagram"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
-
- /**
- * @generated
- */
- private static MindmapDiagramEditorPlugin instance;
-
- /**
- * @generated
- */
- private ComposedAdapterFactory adapterFactory;
-
- /**
- * @generated
- */
- private MindmapDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- public MindmapDiagramEditorPlugin() {
- }
-
- /**
- * @generated
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- instance = this;
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
- adapterFactory = createAdapterFactory();
-
- StoreController.getInstance().initializeDataStore();
- }
-
- /**
- * @generated
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- adapterFactory.dispose();
- adapterFactory = null;
- instance = null;
- super.stop(context);
-
- StoreController.getInstance().closeDataStore();
- }
-
- /**
- * @generated
- */
- public static MindmapDiagramEditorPlugin getInstance() {
- return instance;
- }
-
- /**
- * @generated
- */
- protected ComposedAdapterFactory createAdapterFactory() {
- List factories = new ArrayList();
- fillItemProviderFactories(factories);
- return new ComposedAdapterFactory(factories);
- }
-
- /**
- * @generated
- */
- protected void fillItemProviderFactories(List factories) {
- factories.add(new MindmapItemProviderAdapterFactory());
- factories.add(new ResourceItemProviderAdapterFactory());
- factories.add(new ReflectiveItemProviderAdapterFactory());
- }
-
- /**
- * @generated
- */
- public AdapterFactory getItemProvidersAdapterFactory() {
- return adapterFactory;
- }
-
- /**
- * @generated
- */
- public ImageDescriptor getItemImageDescriptor(Object item) {
- IItemLabelProvider labelProvider = (IItemLabelProvider) adapterFactory.adapt(item, IItemLabelProvider.class);
- if (labelProvider != null) {
- return ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(item));
- }
- return null;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @generated
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(ID, path);
- }
-
- /**
- * Respects images residing in any plug-in. If path is relative, then this bundle is looked up for the image,
- * otherwise, for absolute path, first segment is taken as id of plug-in with image
- *
- * @generated
- * @param path
- * the path to image, either absolute (with plug-in id as first segment), or relative for bundled images
- * @return the image descriptor
- */
- public static ImageDescriptor findImageDescriptor(String path) {
- final IPath p = new Path(path);
- if (p.isAbsolute() && p.segmentCount() > 1) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p.removeFirstSegments(1).makeAbsolute()
- .toString());
- } else {
- return getBundledImageDescriptor(p.makeAbsolute().toString());
- }
- }
-
- /**
- * Returns an image for the image file at the given plug-in relative path. Client do not need to dispose this image.
- * Images will be disposed automatically.
- *
- * @generated
- * @param path
- * the path
- * @return image instance
- */
- public Image getBundledImage(String path) {
- Image image = getImageRegistry().get(path);
- if (image == null) {
- getImageRegistry().put(path, getBundledImageDescriptor(path));
- image = getImageRegistry().get(path);
- }
- return image;
- }
-
- /**
- * Returns string from plug-in's resource bundle
- *
- * @generated
- */
- public static String getString(String key) {
- return Platform.getResourceString(getInstance().getBundle(), "%" + key); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- public MindmapDocumentProvider getDocumentProvider() {
- if (documentProvider == null) {
- documentProvider = new MindmapDocumentProvider();
- }
- return documentProvider;
- }
-
- /**
- * @generated
- */
- public void logError(String error) {
- logError(error, null);
- }
-
- /**
- * @generated
- */
- public void logError(String error, Throwable throwable) {
- if (error == null && throwable != null) {
- error = throwable.getMessage();
- }
- getLog().log(new Status(IStatus.ERROR, MindmapDiagramEditorPlugin.ID, IStatus.OK, error, throwable));
- debug(error, throwable);
- }
-
- /**
- * @generated
- */
- public void logInfo(String message) {
- logInfo(message, null);
- }
-
- /**
- * @generated
- */
- public void logInfo(String message, Throwable throwable) {
- if (message == null && throwable != null) {
- message = throwable.getMessage();
- }
- getLog().log(new Status(IStatus.INFO, MindmapDiagramEditorPlugin.ID, IStatus.OK, message, throwable));
- debug(message, throwable);
- }
-
- /**
- * @generated
- */
- private void debug(String message, Throwable throwable) {
- if (!isDebugging()) {
- return;
- }
- if (message != null) {
- System.err.println(message);
- }
- if (throwable != null) {
- throwable.printStackTrace();
- }
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditorUtil.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditorUtil.java
deleted file mode 100644
index f5503af98..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramEditorUtil.java
+++ /dev/null
@@ -1,439 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.examples.mindmap.DocumentRoot;
-import org.eclipse.gmf.examples.mindmap.MindmapFactory;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @generated
- */
-public class MindmapDiagramEditorUtil {
-
- /**
- * @generated
- */
- public static Map getSaveOptions() {
- Map saveOptions = new HashMap();
- saveOptions.put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$
- saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED,
- Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
- return saveOptions;
- }
-
- /**
- * @generated
- */
- public static boolean openDiagram(Resource diagram)
- throws PartInitException {
- String path = diagram.getURI().toPlatformString(true);
- IResource workspaceResource = ResourcesPlugin.getWorkspace().getRoot()
- .findMember(new Path(path));
- if (workspaceResource instanceof IFile) {
- IWorkbenchPage page = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- return null != page.openEditor(new FileEditorInput(
- (IFile) workspaceResource), MindmapDiagramEditor.ID);
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static void setCharset(IFile file) {
- if (file == null) {
- return;
- }
- try {
- file.setCharset("UTF-8", new NullProgressMonitor()); //$NON-NLS-1$
- } catch (CoreException e) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Unable to set charset for file " + file.getFullPath(), e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public static String getUniqueFileName(IPath containerFullPath,
- String fileName, String extension) {
- if (containerFullPath == null) {
- containerFullPath = new Path(""); //$NON-NLS-1$
- }
- if (fileName == null || fileName.trim().length() == 0) {
- fileName = "default"; //$NON-NLS-1$
- }
- IPath filePath = containerFullPath.append(fileName);
- if (extension != null && !extension.equals(filePath.getFileExtension())) {
- filePath = filePath.addFileExtension(extension);
- }
- extension = filePath.getFileExtension();
- fileName = filePath.removeFileExtension().lastSegment();
- int i = 1;
- while (ResourcesPlugin.getWorkspace().getRoot().exists(filePath)) {
- i++;
- filePath = containerFullPath.append(fileName + i);
- if (extension != null) {
- filePath = filePath.addFileExtension(extension);
- }
- }
- return filePath.lastSegment();
- }
-
- /**
- * Runs the wizard in a dialog.
- *
- * @generated
- */
- public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
- IDialogSettings pluginDialogSettings = MindmapDiagramEditorPlugin
- .getInstance().getDialogSettings();
- IDialogSettings wizardDialogSettings = pluginDialogSettings
- .getSection(settingsKey);
- if (wizardDialogSettings == null) {
- wizardDialogSettings = pluginDialogSettings
- .addNewSection(settingsKey);
- }
- wizard.setDialogSettings(wizardDialogSettings);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x),
- 500);
- dialog.open();
- }
-
- /**
- * This method should be called within a workspace modify operation since it creates resources.
- * @generated
- */
- public static Resource createDiagram(URI diagramURI, URI modelURI,
- IProgressMonitor progressMonitor) {
- TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
- .createEditingDomain();
- progressMonitor.beginTask(
- Messages.MindmapDiagramEditorUtil_CreateDiagramProgressTask, 3);
- final Resource diagramResource = editingDomain.getResourceSet()
- .createResource(diagramURI);
- final Resource modelResource = editingDomain.getResourceSet()
- .createResource(modelURI);
- final String diagramName = diagramURI.lastSegment();
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(
- editingDomain,
- Messages.MindmapDiagramEditorUtil_CreateDiagramCommandLabel,
- Collections.EMPTY_LIST) {
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- org.eclipse.gmf.examples.mindmap.Map model = createInitialModel();
- attachModelToResource(model, modelResource);
-
- Diagram diagram = ViewService.createDiagram(model,
- MapEditPart.MODEL_ID,
- MindmapDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- if (diagram != null) {
- diagramResource.getContents().add(diagram);
- diagram.setName(diagramName);
- diagram.setElement(model);
- }
-
- try {
- modelResource
- .save(org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorUtil
- .getSaveOptions());
- diagramResource
- .save(org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorUtil
- .getSaveOptions());
- } catch (IOException e) {
-
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Unable to store model and diagram resources", e); //$NON-NLS-1$
- }
- return CommandResult.newOKCommandResult();
- }
- };
- try {
- OperationHistoryFactory.getOperationHistory().execute(command,
- new SubProgressMonitor(progressMonitor, 1), null);
- } catch (ExecutionException e) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Unable to create model and diagram", e); //$NON-NLS-1$
- }
- setCharset(WorkspaceSynchronizer.getFile(modelResource));
- setCharset(WorkspaceSynchronizer.getFile(diagramResource));
- return diagramResource;
- }
-
- /**
- * Create a new instance of domain element associated with canvas.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static org.eclipse.gmf.examples.mindmap.Map createInitialModel() {
- return MindmapFactory.eINSTANCE.createMap();
- }
-
- /**
- * Store model element in the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static void attachModelToResource(
- org.eclipse.gmf.examples.mindmap.Map model, Resource resource) {
- resource.getContents().add(createDocumentRoot(model));
- }
-
- /**
- * @generated
- */
- private static DocumentRoot createDocumentRoot(
- org.eclipse.gmf.examples.mindmap.Map model) {
- DocumentRoot docRoot = MindmapFactory.eINSTANCE.createDocumentRoot();
-
- docRoot.setMap(model);
- return docRoot;
- }
-
- /**
- * @generated
- */
- public static void selectElementsInDiagram(
- IDiagramWorkbenchPart diagramPart, List/*EditPart*/editParts) {
- diagramPart.getDiagramGraphicalViewer().deselectAll();
-
- EditPart firstPrimary = null;
- for (Iterator it = editParts.iterator(); it.hasNext();) {
- EditPart nextPart = (EditPart) it.next();
- diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
- if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
- firstPrimary = nextPart;
- }
- }
-
- if (!editParts.isEmpty()) {
- diagramPart.getDiagramGraphicalViewer().reveal(
- firstPrimary != null ? firstPrimary : (EditPart) editParts
- .get(0));
- }
- }
-
- /**
- * @generated
- */
- private static int findElementsInDiagramByID(DiagramEditPart diagramPart,
- EObject element, List editPartCollector) {
- IDiagramGraphicalViewer viewer = (IDiagramGraphicalViewer) diagramPart
- .getViewer();
- final int intialNumOfEditParts = editPartCollector.size();
-
- if (element instanceof View) { // support notation element lookup
- EditPart editPart = (EditPart) viewer.getEditPartRegistry().get(
- element);
- if (editPart != null) {
- editPartCollector.add(editPart);
- return 1;
- }
- }
-
- String elementID = EMFCoreUtil.getProxyID(element);
- List associatedParts = viewer.findEditPartsForElement(elementID,
- IGraphicalEditPart.class);
- // perform the possible hierarchy disjoint -> take the top-most parts only
- for (Iterator editPartIt = associatedParts.iterator(); editPartIt
- .hasNext();) {
- EditPart nextPart = (EditPart) editPartIt.next();
- EditPart parentPart = nextPart.getParent();
- while (parentPart != null && !associatedParts.contains(parentPart)) {
- parentPart = parentPart.getParent();
- }
- if (parentPart == null) {
- editPartCollector.add(nextPart);
- }
- }
-
- if (intialNumOfEditParts == editPartCollector.size()) {
- if (!associatedParts.isEmpty()) {
- editPartCollector.add(associatedParts.iterator().next());
- } else {
- if (element.eContainer() != null) {
- return findElementsInDiagramByID(diagramPart, element
- .eContainer(), editPartCollector);
- }
- }
- }
- return editPartCollector.size() - intialNumOfEditParts;
- }
-
- /**
- * @generated
- */
- public static View findView(DiagramEditPart diagramEditPart,
- EObject targetElement, LazyElement2ViewMap lazyElement2ViewMap) {
- boolean hasStructuralURI = false;
- if (targetElement.eResource() instanceof XMLResource) {
- hasStructuralURI = ((XMLResource) targetElement.eResource())
- .getID(targetElement) == null;
- }
-
- View view = null;
- if (hasStructuralURI
- && !lazyElement2ViewMap.getElement2ViewMap().isEmpty()) {
- view = (View) lazyElement2ViewMap.getElement2ViewMap().get(
- targetElement);
- } else if (findElementsInDiagramByID(diagramEditPart, targetElement,
- lazyElement2ViewMap.editPartTmpHolder) > 0) {
- EditPart editPart = (EditPart) lazyElement2ViewMap.editPartTmpHolder
- .get(0);
- lazyElement2ViewMap.editPartTmpHolder.clear();
- view = editPart.getModel() instanceof View ? (View) editPart
- .getModel() : null;
- }
-
- return (view == null) ? diagramEditPart.getDiagramView() : view;
- }
-
- /**
- * @generated
- */
- public static class LazyElement2ViewMap {
- /**
- * @generated
- */
- private Map element2ViewMap;
-
- /**
- * @generated
- */
- private View scope;
-
- /**
- * @generated
- */
- private Set elementSet;
-
- /**
- * @generated
- */
- public final List editPartTmpHolder = new ArrayList();
-
- /**
- * @generated
- */
- public LazyElement2ViewMap(View scope, Set elements) {
- this.scope = scope;
- this.elementSet = elements;
- }
-
- /**
- * @generated
- */
- public final Map getElement2ViewMap() {
- if (element2ViewMap == null) {
- element2ViewMap = new HashMap();
- // map possible notation elements to itself as these can't be found by view.getElement()
- for (Iterator it = elementSet.iterator(); it.hasNext();) {
- EObject element = (EObject) it.next();
- if (element instanceof View) {
- View view = (View) element;
- if (view.getDiagram() == scope.getDiagram()) {
- element2ViewMap.put(element, element); // take only those that part of our diagram
- }
- }
- }
-
- buildElement2ViewMap(scope, element2ViewMap, elementSet);
- }
- return element2ViewMap;
- }
-
- /**
- * @generated
- */
- static Map buildElement2ViewMap(View parentView, Map element2ViewMap,
- Set elements) {
- if (elements.size() == element2ViewMap.size())
- return element2ViewMap;
-
- if (parentView.isSetElement()
- && !element2ViewMap.containsKey(parentView.getElement())
- && elements.contains(parentView.getElement())) {
- element2ViewMap.put(parentView.getElement(), parentView);
- if (elements.size() == element2ViewMap.size())
- return element2ViewMap;
- }
-
- for (Iterator it = parentView.getChildren().iterator(); it
- .hasNext();) {
- buildElement2ViewMap((View) it.next(), element2ViewMap,
- elements);
- if (elements.size() == element2ViewMap.size())
- return element2ViewMap;
- }
- for (Iterator it = parentView.getSourceEdges().iterator(); it
- .hasNext();) {
- buildElement2ViewMap((View) it.next(), element2ViewMap,
- elements);
- if (elements.size() == element2ViewMap.size())
- return element2ViewMap;
- }
- for (Iterator it = parentView.getSourceEdges().iterator(); it
- .hasNext();) {
- buildElement2ViewMap((View) it.next(), element2ViewMap,
- elements);
- if (elements.size() == element2ViewMap.size())
- return element2ViewMap;
- }
- return element2ViewMap;
- }
- } //LazyElement2ViewMap
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramUpdateCommand.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramUpdateCommand.java
deleted file mode 100644
index d043eb455..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramUpdateCommand.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MindmapDiagramUpdateCommand implements IHandler {
-
- /**
- * @generated
- */
- public void addHandlerListener(IHandlerListener handlerListener) {
- }
-
- /**
- * @generated
- */
- public void dispose() {
- }
-
- /**
- * @generated
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ISelection selection = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getSelectionService()
- .getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- if (structuredSelection.size() != 1) {
- return null;
- }
- if (structuredSelection.getFirstElement() instanceof EditPart
- && ((EditPart) structuredSelection.getFirstElement())
- .getModel() instanceof View) {
- EObject modelElement = ((View) ((EditPart) structuredSelection
- .getFirstElement()).getModel()).getElement();
- List editPolicies = CanonicalEditPolicy
- .getRegisteredEditPolicies(modelElement);
- for (Iterator it = editPolicies.iterator(); it.hasNext();) {
- CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy) it
- .next();
- nextEditPolicy.refresh();
- }
-
- }
- }
- return null;
- }
-
- /**
- * @generated
- */
- public boolean isEnabled() {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean isHandled() {
- return true;
- }
-
- /**
- * @generated
- */
- public void removeHandlerListener(IHandlerListener handlerListener) {
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramUpdater.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramUpdater.java
deleted file mode 100644
index 3b4ddd36b..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDiagramUpdater.java
+++ /dev/null
@@ -1,171 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.examples.mindmap.Map;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.Topic;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicSubtopicsEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapElementTypes;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MindmapDiagramUpdater {
-
- /**
- * @generated
- */
- public static List getSemanticChildren(View view) {
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
- case MapEditPart.VISUAL_ID:
- return getMap_79SemanticChildren(view);
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public static List getMap_79SemanticChildren(View view) {
- if (!view.isSetElement()) {
- return Collections.EMPTY_LIST;
- }
- Map modelElement = (Map) view.getElement();
- List result = new LinkedList();
- for (Iterator it = modelElement.getRootTopics().iterator(); it
- .hasNext();) {
- Topic childElement = (Topic) it.next();
- int visualID = MindmapVisualIDRegistry.getNodeVisualID(view,
- childElement);
- if (visualID == TopicEditPart.VISUAL_ID) {
- result.add(new MindmapNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public static List getContainedLinks(View view) {
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
- case MapEditPart.VISUAL_ID:
- return getMap_79ContainedLinks(view);
- case TopicEditPart.VISUAL_ID:
- return getTopic_1001ContainedLinks(view);
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public static List getIncomingLinks(View view) {
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
- case TopicEditPart.VISUAL_ID:
- return getTopic_1001IncomingLinks(view);
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public static List getOutgoingLinks(View view) {
- switch (MindmapVisualIDRegistry.getVisualID(view)) {
- case TopicEditPart.VISUAL_ID:
- return getTopic_1001OutgoingLinks(view);
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public static List getMap_79ContainedLinks(View view) {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public static List getTopic_1001ContainedLinks(View view) {
- Topic modelElement = (Topic) view.getElement();
- List result = new LinkedList();
- result
- .addAll(getOutgoingFeatureModelFacetLinks_Topic_Subtopics_3001(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List getTopic_1001IncomingLinks(View view) {
- Topic modelElement = (Topic) view.getElement();
- java.util.Map crossReferences = EcoreUtil.CrossReferencer.find(view
- .eResource().getResourceSet().getResources());
- List result = new LinkedList();
- result.addAll(getIncomingFeatureModelFacetLinks_Topic_Subtopics_3001(
- modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List getTopic_1001OutgoingLinks(View view) {
- Topic modelElement = (Topic) view.getElement();
- List result = new LinkedList();
- result
- .addAll(getOutgoingFeatureModelFacetLinks_Topic_Subtopics_3001(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection getIncomingFeatureModelFacetLinks_Topic_Subtopics_3001(
- Topic target, java.util.Map crossReferences) {
- Collection result = new LinkedList();
- Collection settings = (Collection) crossReferences.get(target);
- for (Iterator it = settings.iterator(); it.hasNext();) {
- EStructuralFeature.Setting setting = (EStructuralFeature.Setting) it
- .next();
- if (setting.getEStructuralFeature() == MindmapPackage.eINSTANCE
- .getTopic_Subtopics()) {
- result.add(new MindmapLinkDescriptor(setting.getEObject(),
- target, MindmapElementTypes.TopicSubtopics_3001,
- TopicSubtopicsEditPart.VISUAL_ID));
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection getOutgoingFeatureModelFacetLinks_Topic_Subtopics_3001(
- Topic source) {
- Collection result = new LinkedList();
- for (Iterator destinations = source.getSubtopics().iterator(); destinations
- .hasNext();) {
- Topic destination = (Topic) destinations.next();
- result.add(new MindmapLinkDescriptor(source, destination,
- MindmapElementTypes.TopicSubtopics_3001,
- TopicSubtopicsEditPart.VISUAL_ID));
- }
- return result;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDocumentProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDocumentProvider.java
deleted file mode 100644
index 02581944c..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDocumentProvider.java
+++ /dev/null
@@ -1,1116 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.DiagramEditingDomainFactory;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocumentProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.EditorStatusCodes;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @generated
- */
-public class MindmapDocumentProvider extends AbstractDocumentProvider implements
- IDiagramDocumentProvider {
-
- /**
- * @generated
- */
- protected ElementInfo createElementInfo(Object element)
- throws CoreException {
- if (false == element instanceof FileEditorInput
- && false == element instanceof URIEditorInput) {
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID,
- 0,
- NLS
- .bind(
- Messages.MindmapDocumentProvider_IncorrectInputError,
- new Object[] {
- element,
- "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- IEditorInput editorInput = (IEditorInput) element;
- IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
-
- ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
- info.setModificationStamp(computeModificationStamp(info));
- info.fStatus = null;
- return info;
- }
-
- /**
- * @generated
- */
- protected IDocument createDocument(Object element) throws CoreException {
- if (false == element instanceof FileEditorInput
- && false == element instanceof URIEditorInput) {
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID,
- 0,
- NLS
- .bind(
- Messages.MindmapDocumentProvider_IncorrectInputError,
- new Object[] {
- element,
- "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- IDocument document = createEmptyDocument();
- setDocumentContent(document, (IEditorInput) element);
- setupDocument(element, document);
- return document;
- }
-
- /**
- * Sets up the given document as it would be provided for the given element. The
- * content of the document is not changed. This default implementation is empty.
- * Subclasses may reimplement.
- *
- * @param element the blue-print element
- * @param document the document to set up
- * @generated
- */
- protected void setupDocument(Object element, IDocument document) {
- // for subclasses
- }
-
- /**
- * @generated
- */
- private long computeModificationStamp(ResourceSetInfo info) {
- int result = 0;
- for (Iterator it = info.getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource nextResource = (Resource) it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- if (file.getLocation() != null) {
- result += file.getLocation().toFile().lastModified();
- } else {
- result += file.getModificationStamp();
- }
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected IDocument createEmptyDocument() {
- DiagramDocument document = new DiagramDocument();
- document.setEditingDomain(createEditingDomain());
- return document;
- }
-
- /**
- * @generated
- */
- private TransactionalEditingDomain createEditingDomain() {
- TransactionalEditingDomain editingDomain = DiagramEditingDomainFactory
- .getInstance().createEditingDomain();
- editingDomain
- .setID("org.eclipse.gmf.examples.mindmap.diagram.EditingDomain"); //$NON-NLS-1$
- final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
- .createNotifierFilter(editingDomain.getResourceSet()).and(
- NotificationFilter
- .createEventTypeFilter(Notification.ADD)).and(
- NotificationFilter.createFeatureFilter(
- ResourceSet.class,
- ResourceSet.RESOURCE_SET__RESOURCES));
- editingDomain.getResourceSet().eAdapters().add(new Adapter() {
-
- private Notifier myTarger;
-
- public Notifier getTarget() {
- return myTarger;
- }
-
- public boolean isAdapterForType(Object type) {
- return false;
- }
-
- public void notifyChanged(Notification notification) {
- if (diagramResourceModifiedFilter.matches(notification)) {
- Object value = notification.getNewValue();
- if (value instanceof Resource) {
- ((Resource) value).setTrackingModification(true);
- }
- }
- }
-
- public void setTarget(Notifier newTarget) {
- myTarger = newTarget;
- }
-
- });
-
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected void setDocumentContent(IDocument document, IEditorInput element)
- throws CoreException {
- IDiagramDocument diagramDocument = (IDiagramDocument) document;
- TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
- if (element instanceof FileEditorInput) {
- IStorage storage = ((FileEditorInput) element).getStorage();
- Diagram diagram = DiagramIOUtil.load(domain, storage, true,
- getProgressMonitor());
- document.setContent(diagram);
- } else if (element instanceof URIEditorInput) {
- URI uri = ((URIEditorInput) element).getURI();
- Resource resource = null;
- try {
- resource = domain.getResourceSet().getResource(
- uri.trimFragment(), false);
- if (resource == null) {
- resource = domain.getResourceSet().createResource(
- uri.trimFragment());
- }
- if (!resource.isLoaded()) {
- try {
- Map options = new HashMap(GMFResourceFactory
- .getDefaultLoadOptions());
- // @see 171060
- // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
- resource.load(options);
- } catch (IOException e) {
- resource.unload();
- throw e;
- }
- }
- if (uri.fragment() != null) {
- EObject rootElement = resource.getEObject(uri.fragment());
- if (rootElement instanceof Diagram) {
- document.setContent((Diagram) rootElement);
- return;
- }
- } else {
- for (Iterator it = resource.getContents().iterator(); it
- .hasNext();) {
- Object rootElement = it.next();
- if (rootElement instanceof Diagram) {
- document.setContent((Diagram) rootElement);
- return;
- }
- }
- }
- throw new RuntimeException(
- Messages.MindmapDocumentProvider_NoDiagramInResourceError);
- } catch (Exception e) {
- CoreException thrownExcp = null;
- if (e instanceof CoreException) {
- thrownExcp = (CoreException) e;
- } else {
- String msg = e.getLocalizedMessage();
- thrownExcp = new CoreException(
- new Status(
- IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID,
- 0,
- msg != null ? msg
- : Messages.MindmapDocumentProvider_DiagramLoadingError,
- e));
- }
- throw thrownExcp;
- }
- } else {
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID,
- 0,
- NLS
- .bind(
- Messages.MindmapDocumentProvider_IncorrectInputError,
- new Object[] {
- element,
- "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- }
-
- /**
- * @generated
- */
- public long getModificationStamp(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- return computeModificationStamp(info);
- }
- return super.getModificationStamp(element);
- }
-
- /**
- * @generated
- */
- public boolean isDeleted(Object element) {
- IDiagramDocument document = getDiagramDocument(element);
- if (document != null) {
- Resource diagramResource = document.getDiagram().eResource();
- if (diagramResource != null) {
- IFile file = WorkspaceSynchronizer.getFile(diagramResource);
- return file == null || file.getLocation() == null
- || !file.getLocation().toFile().exists();
- }
- }
- return super.isDeleted(element);
- }
-
- /**
- * @generated
- */
- public ResourceSetInfo getResourceSetInfo(Object editorInput) {
- return (ResourceSetInfo) super.getElementInfo(editorInput);
- }
-
- /**
- * @generated
- */
- protected void disposeElementInfo(Object element, ElementInfo info) {
- if (info instanceof ResourceSetInfo) {
- ResourceSetInfo resourceSetInfo = (ResourceSetInfo) info;
- resourceSetInfo.dispose();
- }
- super.disposeElementInfo(element, info);
- }
-
- /**
- * @generated
- */
- protected void doValidateState(Object element, Object computationContext)
- throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- Collection files2Validate = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource nextResource = (Resource) it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null && file.isReadOnly()) {
- files2Validate.add(file);
- }
- }
- ResourcesPlugin.getWorkspace().validateEdit(
- (IFile[]) files2Validate.toArray(new IFile[files2Validate
- .size()]), computationContext);
- }
-
- super.doValidateState(element, computationContext);
- }
-
- /**
- * @generated
- */
- public boolean isReadOnly(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- if (info.isUpdateCache()) {
- try {
- updateCache(element);
- } catch (CoreException ex) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- Messages.MindmapDocumentProvider_isModifiable, ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.StorageDocumentProvider_isModifiable
- }
- }
- return info.isReadOnly();
- }
- return super.isReadOnly(element);
- }
-
- /**
- * @generated
- */
- public boolean isModifiable(Object element) {
- if (!isStateValidated(element)) {
- if (element instanceof FileEditorInput
- || element instanceof URIEditorInput) {
- return true;
- }
- }
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- if (info.isUpdateCache()) {
- try {
- updateCache(element);
- } catch (CoreException ex) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- Messages.MindmapDocumentProvider_isModifiable, ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.StorageDocumentProvider_isModifiable
- }
- }
- return info.isModifiable();
- }
- return super.isModifiable(element);
- }
-
- /**
- * @generated
- */
- protected void updateCache(Object element) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- for (Iterator it = info.getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource nextResource = (Resource) it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null && file.isReadOnly()) {
- info.setReadOnly(true);
- info.setModifiable(false);
- return;
- }
- }
- info.setReadOnly(false);
- info.setModifiable(true);
- return;
- }
- }
-
- /**
- * @generated
- */
- protected void doUpdateStateCache(Object element) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- info.setUpdateCache(true);
- }
- super.doUpdateStateCache(element);
- }
-
- /**
- * @generated
- */
- public boolean isSynchronized(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- return info.isSynchronized();
- }
- return super.isSynchronized(element);
- }
-
- /**
- * @generated
- */
- protected ISchedulingRule getResetRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- Collection rules = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource nextResource = (Resource) it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
- .modifyRule(file));
- }
- }
- return new MultiRule((ISchedulingRule[]) rules
- .toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected ISchedulingRule getSaveRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- Collection rules = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource nextResource = (Resource) it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- rules.add(computeSchedulingRule(file));
- }
- }
- return new MultiRule((ISchedulingRule[]) rules
- .toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected ISchedulingRule getSynchronizeRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- Collection rules = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource nextResource = (Resource) it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
- .refreshRule(file));
- }
- }
- return new MultiRule((ISchedulingRule[]) rules
- .toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected ISchedulingRule getValidateStateRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- Collection files = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource nextResource = (Resource) it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- files.add(file);
- }
- }
- return ResourcesPlugin.getWorkspace().getRuleFactory()
- .validateEditRule(
- (IFile[]) files.toArray(new IFile[files.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
- if (toCreateOrModify.exists())
- return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(
- toCreateOrModify);
-
- IResource parent = toCreateOrModify;
- do {
- /*
- * XXX This is a workaround for
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=67601
- * IResourceRuleFactory.createRule should iterate the hierarchy
- * itself.
- */
- toCreateOrModify = parent;
- parent = toCreateOrModify.getParent();
- } while (parent != null && !parent.exists());
-
- return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(
- toCreateOrModify);
- }
-
- /**
- * @generated
- */
- protected void doSynchronize(Object element, IProgressMonitor monitor)
- throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- for (Iterator it = info.getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource nextResource = (Resource) it.next();
- handleElementChanged(info, nextResource, monitor);
- }
- return;
- }
- super.doSynchronize(element, monitor);
- }
-
- /**
- * @generated
- */
- protected void doSaveDocument(IProgressMonitor monitor, Object element,
- IDocument document, boolean overwrite) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- if (!overwrite && !info.isSynchronized()) {
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID,
- IResourceStatus.OUT_OF_SYNC_LOCAL,
- Messages.MindmapDocumentProvider_UnsynchronizedFileSaveError,
- null));
- }
- info.stopResourceListening();
- fireElementStateChanging(element);
- List resources = info.getResourceSet().getResources();
- try {
- monitor.beginTask(
- Messages.MindmapDocumentProvider_SaveDiagramTask,
- resources.size() + 1); //"Saving diagram"
- for (Iterator it = resources.iterator(); it.hasNext();) {
- Resource nextResource = (Resource) it.next();
- monitor
- .setTaskName(NLS
- .bind(
- Messages.MindmapDocumentProvider_SaveNextResourceTask,
- nextResource.getURI()));
- if (nextResource.isLoaded()
- && !info.getEditingDomain()
- .isReadOnly(nextResource)) {
- try {
- nextResource.save(MindmapDiagramEditorUtil
- .getSaveOptions());
- } catch (IOException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID,
- EditorStatusCodes.RESOURCE_FAILURE, e
- .getLocalizedMessage(), null));
- }
- }
- monitor.worked(1);
- }
- monitor.done();
- info.setModificationStamp(computeModificationStamp(info));
- } catch (RuntimeException x) {
- fireElementStateChangeFailed(element);
- throw x;
- } finally {
- info.startResourceListening();
- }
- } else {
- URI newResoruceURI;
- List affectedFiles = null;
- if (element instanceof FileEditorInput) {
- IFile newFile = ((FileEditorInput) element).getFile();
- affectedFiles = Collections.singletonList(newFile);
- newResoruceURI = URI.createPlatformResourceURI(newFile
- .getFullPath().toString(), true);
- } else if (element instanceof URIEditorInput) {
- newResoruceURI = ((URIEditorInput) element).getURI();
- } else {
- fireElementStateChangeFailed(element);
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID,
- 0,
- NLS
- .bind(
- Messages.MindmapDocumentProvider_IncorrectInputError,
- new Object[] {
- element,
- "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- if (false == document instanceof IDiagramDocument) {
- fireElementStateChangeFailed(element);
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID,
- 0,
- "Incorrect document used: " + document + " instead of org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument", null)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- IDiagramDocument diagramDocument = (IDiagramDocument) document;
- final Resource newResource = diagramDocument.getEditingDomain()
- .getResourceSet().createResource(newResoruceURI);
- final Diagram diagramCopy = (Diagram) EcoreUtil
- .copy(diagramDocument.getDiagram());
- try {
- new AbstractTransactionalCommand(diagramDocument
- .getEditingDomain(), NLS.bind(
- Messages.MindmapDocumentProvider_SaveAsOperation,
- diagramCopy.getName()), affectedFiles) {
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- newResource.getContents().add(diagramCopy);
- return CommandResult.newOKCommandResult();
- }
- }.execute(monitor, null);
- newResource.save(MindmapDiagramEditorUtil.getSaveOptions());
- } catch (ExecutionException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID, 0, e
- .getLocalizedMessage(), null));
- } catch (IOException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR,
- MindmapDiagramEditorPlugin.ID, 0, e
- .getLocalizedMessage(), null));
- }
- newResource.unload();
- }
- }
-
- /**
- * @generated
- */
- protected void handleElementChanged(ResourceSetInfo info,
- Resource changedResource, IProgressMonitor monitor) {
- IFile file = WorkspaceSynchronizer.getFile(changedResource);
- if (file != null) {
- try {
- file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- } catch (CoreException ex) {
- MindmapDiagramEditorPlugin
- .getInstance()
- .logError(
- Messages.MindmapDocumentProvider_handleElementContentChanged,
- ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.FileDocumentProvider_handleElementContentChanged
- }
- }
- changedResource.unload();
-
- fireElementContentAboutToBeReplaced(info.getEditorInput());
- removeUnchangedElementListeners(info.getEditorInput(), info);
- info.fStatus = null;
- try {
- setDocumentContent(info.fDocument, info.getEditorInput());
- } catch (CoreException e) {
- info.fStatus = e.getStatus();
- }
- if (!info.fCanBeSaved) {
- info.setModificationStamp(computeModificationStamp(info));
- }
- addUnchangedElementListeners(info.getEditorInput(), info);
- fireElementContentReplaced(info.getEditorInput());
- }
-
- /**
- * @generated
- */
- protected void handleElementMoved(IEditorInput input, URI uri) {
- if (input instanceof FileEditorInput) {
- IFile newFile = ResourcesPlugin.getWorkspace().getRoot().getFile(
- new Path(URI.decode(uri.path())).removeFirstSegments(1));
- fireElementMoved(input, newFile == null ? null
- : new FileEditorInput(newFile));
- return;
- }
- // TODO: append suffix to the URI! (use diagram as a parameter)
- fireElementMoved(input, new URIEditorInput(uri));
- }
-
- /**
- * @generated
- */
- public IEditorInput createInputWithEditingDomain(IEditorInput editorInput,
- TransactionalEditingDomain domain) {
- return editorInput;
- }
-
- /**
- * @generated
- */
- public IDiagramDocument getDiagramDocument(Object element) {
- IDocument doc = getDocument(element);
- if (doc instanceof IDiagramDocument) {
- return (IDiagramDocument) doc;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
- return null;
- }
-
- /**
- * @generated
- */
- protected class ResourceSetInfo extends ElementInfo {
-
- /**
- * @generated
- */
- private long myModificationStamp = IResource.NULL_STAMP;
-
- /**
- * @generated
- */
- private WorkspaceSynchronizer mySynchronizer;
-
- /**
- * @generated
- */
- private Collection myUnSynchronizedResources = new ArrayList();
-
- /**
- * @generated
- */
- private IDiagramDocument myDocument;
-
- /**
- * @generated
- */
- private IEditorInput myEditorInput;
-
- /**
- * @generated
- */
- private boolean myUpdateCache = true;
-
- /**
- * @generated
- */
- private boolean myModifiable = false;
-
- /**
- * @generated
- */
- private boolean myReadOnly = true;
-
- /**
- * @generated
- */
- private ResourceSetModificationListener myResourceSetListener;
-
- /**
- * @generated
- */
- public ResourceSetInfo(IDiagramDocument document,
- IEditorInput editorInput) {
- super(document);
- myDocument = document;
- myEditorInput = editorInput;
- startResourceListening();
- myResourceSetListener = new ResourceSetModificationListener(this);
- getResourceSet().eAdapters().add(myResourceSetListener);
- }
-
- /**
- * @generated
- */
- public long getModificationStamp() {
- return myModificationStamp;
- }
-
- /**
- * @generated
- */
- public void setModificationStamp(long modificationStamp) {
- myModificationStamp = modificationStamp;
- }
-
- /**
- * @generated
- */
- public TransactionalEditingDomain getEditingDomain() {
- return myDocument.getEditingDomain();
- }
-
- /**
- * @generated
- */
- public ResourceSet getResourceSet() {
- return getEditingDomain().getResourceSet();
- }
-
- /**
- * @generated
- */
- public IEditorInput getEditorInput() {
- return myEditorInput;
- }
-
- /**
- * @generated
- */
- public void dispose() {
- stopResourceListening();
- getResourceSet().eAdapters().remove(myResourceSetListener);
- for (Iterator it = getResourceSet().getResources().iterator(); it
- .hasNext();) {
- Resource resource = (Resource) it.next();
- resource.unload();
- }
- }
-
- /**
- * @generated
- */
- public boolean isSynchronized() {
- return myUnSynchronizedResources.size() == 0;
- }
-
- /**
- * @generated
- */
- public void setUnSynchronized(Resource resource) {
- myUnSynchronizedResources.add(resource);
- }
-
- /**
- * @generated
- */
- public void setSynchronized(Resource resource) {
- myUnSynchronizedResources.remove(resource);
- }
-
- /**
- * @generated
- */
- public final void stopResourceListening() {
- mySynchronizer.dispose();
- mySynchronizer = null;
- }
-
- /**
- * @generated
- */
- public final void startResourceListening() {
- mySynchronizer = new WorkspaceSynchronizer(getEditingDomain(),
- new SynchronizerDelegate());
- }
-
- /**
- * @generated
- */
- public boolean isUpdateCache() {
- return myUpdateCache;
- }
-
- /**
- * @generated
- */
- public void setUpdateCache(boolean update) {
- myUpdateCache = update;
- }
-
- /**
- * @generated
- */
- public boolean isModifiable() {
- return myModifiable;
- }
-
- /**
- * @generated
- */
- public void setModifiable(boolean modifiable) {
- myModifiable = modifiable;
- }
-
- /**
- * @generated
- */
- public boolean isReadOnly() {
- return myReadOnly;
- }
-
- /**
- * @generated
- */
- public void setReadOnly(boolean readOnly) {
- myReadOnly = readOnly;
- }
-
- /**
- * @generated
- */
- private class SynchronizerDelegate implements
- WorkspaceSynchronizer.Delegate {
-
- /**
- * @generated
- */
- public void dispose() {
- }
-
- /**
- * @generated
- */
- public boolean handleResourceChanged(final Resource resource) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- handleElementChanged(ResourceSetInfo.this, resource,
- null);
- }
- });
- return true;
- }
-
- /**
- * @generated
- */
- public boolean handleResourceDeleted(Resource resource) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- fireElementDeleted(ResourceSetInfo.this
- .getEditorInput());
- }
- });
- return true;
- }
-
- /**
- * @generated
- */
- public boolean handleResourceMoved(Resource resource,
- final URI newURI) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- if (myDocument.getDiagram().eResource() == resource) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- handleElementMoved(ResourceSetInfo.this
- .getEditorInput(), newURI);
- }
- });
- } else {
- handleResourceDeleted(resource);
- }
- return true;
- }
-
- }
-
- }
-
- /**
- * @generated
- */
- private class ResourceSetModificationListener extends EContentAdapter {
-
- /**
- * @generated
- */
- private NotificationFilter myModifiedFilter;
-
- /**
- * @generated
- */
- private ResourceSetInfo myInfo;
-
- /**
- * @generated
- */
- public ResourceSetModificationListener(ResourceSetInfo info) {
- myInfo = info;
- myModifiedFilter = NotificationFilter.createEventTypeFilter(
- Notification.SET).or(
- NotificationFilter
- .createEventTypeFilter(Notification.UNSET)).and(
- NotificationFilter.createFeatureFilter(Resource.class,
- Resource.RESOURCE__IS_MODIFIED));
- }
-
- /**
- * @generated
- */
- public void notifyChanged(Notification notification) {
- if (notification.getNotifier() instanceof ResourceSet) {
- super.notifyChanged(notification);
- }
- if (!notification.isTouch()
- && myModifiedFilter.matches(notification)) {
- if (notification.getNotifier() instanceof Resource) {
- Resource resource = (Resource) notification.getNotifier();
- if (resource.isLoaded()) {
- boolean modified = false;
- for (Iterator it = myInfo.getResourceSet()
- .getResources().iterator(); it.hasNext()
- && !modified;) {
- Resource nextResource = (Resource) it.next();
- if (nextResource.isLoaded()) {
- modified = nextResource.isModified();
- }
- }
- boolean dirtyStateChanged = false;
- synchronized (myInfo) {
- if (modified != myInfo.fCanBeSaved) {
- myInfo.fCanBeSaved = modified;
- dirtyStateChanged = true;
- }
- if (!resource.isModified()) {
- myInfo.setSynchronized(resource);
- }
- }
- if (dirtyStateChanged) {
- fireElementDirtyStateChanged(myInfo
- .getEditorInput(), modified);
-
- if (!modified) {
- myInfo
- .setModificationStamp(computeModificationStamp(myInfo));
- }
- }
- }
- }
- }
- }
-
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDomainModelElementTester.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDomainModelElementTester.java
deleted file mode 100644
index 864352fdb..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapDomainModelElementTester.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-
-/**
- * @generated
- */
-public class MindmapDomainModelElementTester extends PropertyTester {
-
- /**
- * @generated
- */
- public boolean test(Object receiver, String method, Object[] args,
- Object expectedValue) {
- if (false == receiver instanceof EObject) {
- return false;
- }
- EObject eObject = (EObject) receiver;
- EClass eClass = eObject.eClass();
- if (eClass == MindmapPackage.eINSTANCE.getDocumentRoot()) {
- return true;
- }
- if (eClass == MindmapPackage.eINSTANCE.getMap()) {
- return true;
- }
- if (eClass == MindmapPackage.eINSTANCE.getRelationship()) {
- return true;
- }
- if (eClass == MindmapPackage.eINSTANCE.getResource()) {
- return true;
- }
- if (eClass == MindmapPackage.eINSTANCE.getThread()) {
- return true;
- }
- if (eClass == MindmapPackage.eINSTANCE.getThreadItem()) {
- return true;
- }
- if (eClass == MindmapPackage.eINSTANCE.getTopic()) {
- return true;
- }
- return false;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapInitDiagramFileAction.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapInitDiagramFileAction.java
deleted file mode 100644
index a835f9288..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapInitDiagramFileAction.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @generated
- */
-public class MindmapInitDiagramFileAction implements IObjectActionDelegate {
-
- /**
- * @generated
- */
- private IWorkbenchPart targetPart;
-
- /**
- * @generated
- */
- private URI domainModelURI;
-
- /**
- * @generated
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- this.targetPart = targetPart;
- }
-
- /**
- * @generated
- */
- public void selectionChanged(IAction action, ISelection selection) {
- domainModelURI = null;
- action.setEnabled(false);
- if (selection instanceof IStructuredSelection == false
- || selection.isEmpty()) {
- return;
- }
- IFile file = (IFile) ((IStructuredSelection) selection)
- .getFirstElement();
- domainModelURI = URI.createPlatformResourceURI(file.getFullPath()
- .toString(), true);
- action.setEnabled(true);
- }
-
- /**
- * @generated
- */
- private Shell getShell() {
- return targetPart.getSite().getShell();
- }
-
- /**
- * @generated
- */
- public void run(IAction action) {
- TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
- .createEditingDomain();
- ResourceSet resourceSet = editingDomain.getResourceSet();
- EObject diagramRoot = null;
- try {
- Resource resource = resourceSet.getResource(domainModelURI, true);
- diagramRoot = (EObject) resource.getContents().get(0);
- } catch (WrappedException ex) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
- }
- if (diagramRoot == null) {
- MessageDialog
- .openError(
- getShell(),
- Messages.MindmapInitDiagramFileAction_InitDiagramFileResourceErrorDialogTitle,
- Messages.MindmapInitDiagramFileAction_InitDiagramFileResourceErrorDialogMessage);
- return;
- }
- Wizard wizard = new MindmapNewDiagramFileWizard(domainModelURI,
- diagramRoot, editingDomain);
- wizard
- .setWindowTitle(NLS
- .bind(
- Messages.MindmapInitDiagramFileAction_InitDiagramFileWizardTitle,
- MapEditPart.MODEL_ID));
- MindmapDiagramEditorUtil.runWizard(getShell(), wizard,
- "InitDiagramFile"); //$NON-NLS-1$
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapLinkDescriptor.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapLinkDescriptor.java
deleted file mode 100644
index f25a90c70..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapLinkDescriptor.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-
-/**
- * @generated
- */
-public class MindmapLinkDescriptor extends MindmapNodeDescriptor {
-
- /**
- * @generated
- */
- private EObject mySource;
-
- /**
- * @generated
- */
- private EObject myDestination;
-
- /**
- * @generated
- */
- private IAdaptable mySemanticAdapter;
-
- /**
- * @generated
- */
- private MindmapLinkDescriptor(EObject source, EObject destination,
- EObject linkElement, int linkVID) {
- super(linkElement, linkVID);
- mySource = source;
- myDestination = destination;
- }
-
- /**
- * @generated
- */
- public MindmapLinkDescriptor(EObject source, EObject destination,
- IElementType elementType, int linkVID) {
- this(source, destination, (EObject) null, linkVID);
- final IElementType elementTypeCopy = elementType;
- mySemanticAdapter = new IAdaptable() {
- public Object getAdapter(Class adapter) {
- if (IElementType.class.equals(adapter)) {
- return elementTypeCopy;
- }
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public MindmapLinkDescriptor(EObject source, EObject destination,
- EObject linkElement, IElementType elementType, int linkVID) {
- this(source, destination, linkElement, linkVID);
- final IElementType elementTypeCopy = elementType;
- mySemanticAdapter = new EObjectAdapter(linkElement) {
- public Object getAdapter(Class adapter) {
- if (IElementType.class.equals(adapter)) {
- return elementTypeCopy;
- }
- return super.getAdapter(adapter);
- }
- };
- }
-
- /**
- * @generated
- */
- public EObject getSource() {
- return mySource;
- }
-
- /**
- * @generated
- */
- public EObject getDestination() {
- return myDestination;
- }
-
- /**
- * @generated
- */
- public IAdaptable getSemanticAdapter() {
- return mySemanticAdapter;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapLoadResourceAction.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapLoadResourceAction.java
deleted file mode 100644
index 573a42575..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapLoadResourceAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.emf.edit.ui.action.LoadResourceAction;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @generated
- */
-public class MindmapLoadResourceAction implements IObjectActionDelegate {
-
- /**
- * @generated
- */
- private MapEditPart mySelectedElement;
-
- /**
- * @generated
- */
- private Shell myShell;
-
- /**
- * @generated
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- myShell = targetPart.getSite().getShell();
- }
-
- /**
- * @generated
- */
- public void run(IAction action) {
- LoadResourceAction.LoadResourceDialog loadResourceDialog = new LoadResourceAction.LoadResourceDialog(
- myShell, mySelectedElement.getEditingDomain());
- loadResourceDialog.open();
- }
-
- /**
- * @generated
- */
- public void selectionChanged(IAction action, ISelection selection) {
- mySelectedElement = null;
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- if (structuredSelection.size() == 1
- && structuredSelection.getFirstElement() instanceof MapEditPart) {
- mySelectedElement = (MapEditPart) structuredSelection
- .getFirstElement();
- }
- }
- action.setEnabled(isEnabled());
- }
-
- /**
- * @generated
- */
- private boolean isEnabled() {
- return mySelectedElement != null;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapMatchingStrategy.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapMatchingStrategy.java
deleted file mode 100644
index be395371a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapMatchingStrategy.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorMatchingStrategy;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.PartInitException;
-
-/**
- * @generated
- */
-public class MindmapMatchingStrategy implements IEditorMatchingStrategy {
-
- /**
- * @generated
- */
- public boolean matches(IEditorReference editorRef, IEditorInput input) {
- IEditorInput editorInput;
- try {
- editorInput = editorRef.getEditorInput();
- } catch (PartInitException e) {
- return false;
- }
-
- if (editorInput.equals(input)) {
- return true;
- }
- if (editorInput instanceof URIEditorInput
- && input instanceof URIEditorInput) {
- return ((URIEditorInput) editorInput).getURI().equals(
- ((URIEditorInput) input).getURI());
- }
- return false;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapNewDiagramFileWizard.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapNewDiagramFileWizard.java
deleted file mode 100644
index 2746b36a8..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapNewDiagramFileWizard.java
+++ /dev/null
@@ -1,199 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-/**
- * @generated
- */
-public class MindmapNewDiagramFileWizard extends Wizard {
-
- /**
- * @generated
- */
- private WizardNewFileCreationPage myFileCreationPage;
-
- /**
- * @generated
- */
- private ModelElementSelectionPage diagramRootElementSelectionPage;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain myEditingDomain;
-
- /**
- * @generated
- */
- public MindmapNewDiagramFileWizard(URI domainModelURI, EObject diagramRoot,
- TransactionalEditingDomain editingDomain) {
- assert domainModelURI != null : "Domain model uri must be specified"; //$NON-NLS-1$
- assert diagramRoot != null : "Doagram root element must be specified"; //$NON-NLS-1$
- assert editingDomain != null : "Editing domain must be specified"; //$NON-NLS-1$
-
- myFileCreationPage = new WizardNewFileCreationPage(
- Messages.MindmapNewDiagramFileWizard_CreationPageName,
- StructuredSelection.EMPTY);
- myFileCreationPage
- .setTitle(Messages.MindmapNewDiagramFileWizard_CreationPageTitle);
- myFileCreationPage.setDescription(NLS.bind(
- Messages.MindmapNewDiagramFileWizard_CreationPageDescription,
- MapEditPart.MODEL_ID));
- IPath filePath;
- String fileName = domainModelURI.trimFileExtension().lastSegment();
- if (domainModelURI.isPlatformResource()) {
- filePath = new Path(domainModelURI.trimSegments(1)
- .toPlatformString(true));
- } else if (domainModelURI.isFile()) {
- filePath = new Path(domainModelURI.trimSegments(1).toFileString());
- } else {
- // TODO : use some default path
- throw new IllegalArgumentException(
- "Unsupported URI: " + domainModelURI); //$NON-NLS-1$
- }
- myFileCreationPage.setContainerFullPath(filePath);
- myFileCreationPage.setFileName(MindmapDiagramEditorUtil
- .getUniqueFileName(filePath, fileName, "mindmap_diagram")); //$NON-NLS-1$
-
- diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(
- Messages.MindmapNewDiagramFileWizard_RootSelectionPageName);
- diagramRootElementSelectionPage
- .setTitle(Messages.MindmapNewDiagramFileWizard_RootSelectionPageTitle);
- diagramRootElementSelectionPage
- .setDescription(Messages.MindmapNewDiagramFileWizard_RootSelectionPageDescription);
- diagramRootElementSelectionPage.setModelElement(diagramRoot);
-
- myEditingDomain = editingDomain;
- }
-
- /**
- * @generated
- */
- public void addPages() {
- addPage(myFileCreationPage);
- addPage(diagramRootElementSelectionPage);
- }
-
- /**
- * @generated
- */
- public boolean performFinish() {
- List affectedFiles = new LinkedList();
- IFile diagramFile = myFileCreationPage.createNewFile();
- MindmapDiagramEditorUtil.setCharset(diagramFile);
- affectedFiles.add(diagramFile);
- URI diagramModelURI = URI.createPlatformResourceURI(diagramFile
- .getFullPath().toString(), true);
- ResourceSet resourceSet = myEditingDomain.getResourceSet();
- final Resource diagramResource = resourceSet
- .createResource(diagramModelURI);
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(
- myEditingDomain,
- Messages.MindmapNewDiagramFileWizard_InitDiagramCommand,
- affectedFiles) {
-
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- int diagramVID = MindmapVisualIDRegistry
- .getDiagramVisualID(diagramRootElementSelectionPage
- .getModelElement());
- if (diagramVID != MapEditPart.VISUAL_ID) {
- return CommandResult
- .newErrorCommandResult(Messages.MindmapNewDiagramFileWizard_IncorrectRootError);
- }
- Diagram diagram = ViewService.createDiagram(
- diagramRootElementSelectionPage.getModelElement(),
- MapEditPart.MODEL_ID,
- MindmapDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- diagramResource.getContents().add(diagram);
- return CommandResult.newOKCommandResult();
- }
- };
- try {
- OperationHistoryFactory.getOperationHistory().execute(command,
- new NullProgressMonitor(), null);
- diagramResource.save(MindmapDiagramEditorUtil.getSaveOptions());
- MindmapDiagramEditorUtil.openDiagram(diagramResource);
- } catch (ExecutionException e) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Unable to create model and diagram", e); //$NON-NLS-1$
- } catch (IOException ex) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Save operation failed for: " + diagramModelURI, ex); //$NON-NLS-1$
- } catch (PartInitException ex) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Unable to open editor", ex); //$NON-NLS-1$
- }
- return true;
- }
-
- /**
- * @generated
- */
- private static class DiagramRootElementSelectionPage extends
- ModelElementSelectionPage {
-
- /**
- * @generated
- */
- protected DiagramRootElementSelectionPage(String pageName) {
- super(pageName);
- }
-
- /**
- * @generated
- */
- protected String getSelectionTitle() {
- return Messages.MindmapNewDiagramFileWizard_RootSelectionPageSelectionTitle;
- }
-
- /**
- * @generated
- */
- protected boolean validatePage() {
- if (selectedModelElement == null) {
- setErrorMessage(Messages.MindmapNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
- return false;
- }
- boolean result = ViewService
- .getInstance()
- .provides(
- new CreateDiagramViewOperation(
- new EObjectAdapter(selectedModelElement),
- MapEditPart.MODEL_ID,
- MindmapDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
- setErrorMessage(result ? null
- : Messages.MindmapNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
- return result;
- }
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapNodeDescriptor.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapNodeDescriptor.java
deleted file mode 100644
index 15d9bcfa4..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapNodeDescriptor.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * @generated
- */
-public class MindmapNodeDescriptor {
-
- /**
- * @generated
- */
- private EObject myModelElement;
-
- /**
- * @generated
- */
- private int myVisualID;
-
- /**
- * @generated
- */
- private String myType;
-
- /**
- * @generated
- */
- public MindmapNodeDescriptor(EObject modelElement, int visualID) {
- myModelElement = modelElement;
- myVisualID = visualID;
- }
-
- /**
- * @generated
- */
- public EObject getModelElement() {
- return myModelElement;
- }
-
- /**
- * @generated
- */
- public int getVisualID() {
- return myVisualID;
- }
-
- /**
- * @generated
- */
- public String getType() {
- if (myType == null) {
- myType = MindmapVisualIDRegistry.getType(getVisualID());
- }
- return myType;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapPaletteFactory.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapPaletteFactory.java
deleted file mode 100644
index 24d5e5036..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapPaletteFactory.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.palette.PaletteContainer;
-import org.eclipse.gef.palette.PaletteGroup;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.palette.ToolEntry;
-import org.eclipse.gmf.examples.mindmap.diagram.providers.MindmapElementTypes;
-import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool;
-import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool;
-
-/**
- * @generated
- */
-public class MindmapPaletteFactory {
-
- /**
- * @generated
- */
- public void fillPalette(PaletteRoot paletteRoot) {
- paletteRoot.add(createMindmap1Group());
- }
-
- /**
- * Creates "mindmap" palette tool group
- * @generated
- */
- private PaletteContainer createMindmap1Group() {
- PaletteGroup paletteContainer = new PaletteGroup(
- Messages.Mindmap1Group_title);
- paletteContainer.add(createTopic1CreationTool());
- paletteContainer.add(createTopicSubtopics2CreationTool());
- return paletteContainer;
- }
-
- /**
- * @generated
- */
- private ToolEntry createTopic1CreationTool() {
- List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
- types.add(MindmapElementTypes.Topic_1001);
- NodeToolEntry entry = new NodeToolEntry(
- Messages.Topic1CreationTool_title,
- Messages.Topic1CreationTool_desc, types);
- entry.setSmallIcon(MindmapElementTypes
- .getImageDescriptor(MindmapElementTypes.Topic_1001));
- entry.setLargeIcon(entry.getSmallIcon());
- return entry;
- }
-
- /**
- * @generated
- */
- private ToolEntry createTopicSubtopics2CreationTool() {
- List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
- types.add(MindmapElementTypes.TopicSubtopics_3001);
- LinkToolEntry entry = new LinkToolEntry(
- Messages.TopicSubtopics2CreationTool_title,
- Messages.TopicSubtopics2CreationTool_desc, types);
- entry.setSmallIcon(MindmapElementTypes
- .getImageDescriptor(MindmapElementTypes.TopicSubtopics_3001));
- entry.setLargeIcon(entry.getSmallIcon());
- return entry;
- }
-
- /**
- * @generated
- */
- private static class NodeToolEntry extends ToolEntry {
-
- /**
- * @generated
- */
- private final List elementTypes;
-
- /**
- * @generated
- */
- private NodeToolEntry(String title, String description,
- List elementTypes) {
- super(title, description, null, null);
- this.elementTypes = elementTypes;
- }
-
- /**
- * @generated
- */
- public Tool createTool() {
- Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
- tool.setProperties(getToolProperties());
- return tool;
- }
- }
-
- /**
- * @generated
- */
- private static class LinkToolEntry extends ToolEntry {
-
- /**
- * @generated
- */
- private final List relationshipTypes;
-
- /**
- * @generated
- */
- private LinkToolEntry(String title, String description,
- List relationshipTypes) {
- super(title, description, null, null);
- this.relationshipTypes = relationshipTypes;
- }
-
- /**
- * @generated
- */
- public Tool createTool() {
- Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes);
- tool.setProperties(getToolProperties());
- return tool;
- }
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapUriEditorInputTester.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapUriEditorInputTester.java
deleted file mode 100644
index 56c86d9de..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapUriEditorInputTester.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.emf.common.ui.URIEditorInput;
-
-/**
- * @generated
- */
-public class MindmapUriEditorInputTester extends PropertyTester {
-
- /**
- * @generated
- */
- public boolean test(Object receiver, String method, Object[] args,
- Object expectedValue) {
- if (false == receiver instanceof URIEditorInput) {
- return false;
- }
- URIEditorInput editorInput = (URIEditorInput) receiver;
- return "mindmap_diagram".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapVisualIDRegistry.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapVisualIDRegistry.java
deleted file mode 100644
index c5ff01a9a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/MindmapVisualIDRegistry.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.examples.mindmap.Map;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicNameEditPart;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * This registry is used to determine which type of visual object should be
- * created for the corresponding Diagram, Node, ChildNode or Link represented
- * by a domain model object.
- *
- * @generated
- */
-public class MindmapVisualIDRegistry {
-
- /**
- * @generated
- */
- private static final String DEBUG_KEY = MindmapDiagramEditorPlugin
- .getInstance().getBundle().getSymbolicName()
- + "/debug/visualID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static int getVisualID(View view) {
- if (view instanceof Diagram) {
- if (MapEditPart.MODEL_ID.equals(view.getType())) {
- return MapEditPart.VISUAL_ID;
- } else {
- return -1;
- }
- }
- return org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry
- .getVisualID(view.getType());
- }
-
- /**
- * @generated
- */
- public static String getModelID(View view) {
- View diagram = view.getDiagram();
- while (view != diagram) {
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if (annotation != null) {
- return (String) annotation.getDetails().get("modelID"); //$NON-NLS-1$
- }
- view = (View) view.eContainer();
- }
- return diagram != null ? diagram.getType() : null;
- }
-
- /**
- * @generated
- */
- public static int getVisualID(String type) {
- try {
- return Integer.parseInt(type);
- } catch (NumberFormatException e) {
- if (Boolean.TRUE.toString().equalsIgnoreCase(
- Platform.getDebugOption(DEBUG_KEY))) {
- MindmapDiagramEditorPlugin.getInstance().logError(
- "Unable to parse view type as a visualID number: "
- + type);
- }
- }
- return -1;
- }
-
- /**
- * @generated
- */
- public static String getType(int visualID) {
- return String.valueOf(visualID);
- }
-
- /**
- * @generated
- */
- public static int getDiagramVisualID(EObject domainElement) {
- if (domainElement == null) {
- return -1;
- }
- if (MindmapPackage.eINSTANCE.getMap().isSuperTypeOf(
- domainElement.eClass())
- && isDiagram((Map) domainElement)) {
- return MapEditPart.VISUAL_ID;
- }
- return -1;
- }
-
- /**
- * @generated
- */
- public static int getNodeVisualID(View containerView, EObject domainElement) {
- if (domainElement == null) {
- return -1;
- }
- String containerModelID = org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry
- .getModelID(containerView);
- if (!MapEditPart.MODEL_ID.equals(containerModelID)) {
- return -1;
- }
- int containerVisualID;
- if (MapEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry
- .getVisualID(containerView);
- } else {
- if (containerView instanceof Diagram) {
- containerVisualID = MapEditPart.VISUAL_ID;
- } else {
- return -1;
- }
- }
- switch (containerVisualID) {
- case MapEditPart.VISUAL_ID:
- if (MindmapPackage.eINSTANCE.getTopic().isSuperTypeOf(
- domainElement.eClass())) {
- return TopicEditPart.VISUAL_ID;
- }
- break;
- }
- return -1;
- }
-
- /**
- * @generated
- */
- public static boolean canCreateNode(View containerView, int nodeVisualID) {
- String containerModelID = org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry
- .getModelID(containerView);
- if (!MapEditPart.MODEL_ID.equals(containerModelID)) {
- return false;
- }
- int containerVisualID;
- if (MapEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry
- .getVisualID(containerView);
- } else {
- if (containerView instanceof Diagram) {
- containerVisualID = MapEditPart.VISUAL_ID;
- } else {
- return false;
- }
- }
- switch (containerVisualID) {
- case TopicEditPart.VISUAL_ID:
- if (TopicNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case MapEditPart.VISUAL_ID:
- if (TopicEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static int getLinkWithClassVisualID(EObject domainElement) {
- if (domainElement == null) {
- return -1;
- }
- return -1;
- }
-
- /**
- * User can change implementation of this method to handle some specific
- * situations not covered by default logic.
- *
- * @generated
- */
- private static boolean isDiagram(Map element) {
- return true;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/ModelElementSelectionPage.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/ModelElementSelectionPage.java
deleted file mode 100644
index 70683519a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/part/ModelElementSelectionPage.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.part;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.edit.provider.IWrapperItemProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * Wizard page that allows to select element from model.
- * @generated
- */
-public class ModelElementSelectionPage extends WizardPage {
- /**
- * @generated
- */
- protected EObject selectedModelElement;
-
- /**
- * @generated
- */
- private TreeViewer modelViewer;
-
- /**
- * @generated
- */
- public ModelElementSelectionPage(String pageName) {
- super(pageName);
- }
-
- /**
- * @generated
- */
- public EObject getModelElement() {
- return selectedModelElement;
- }
-
- /**
- * @generated
- */
- public void setModelElement(EObject modelElement) {
- selectedModelElement = modelElement;
- if (modelViewer != null) {
- if (selectedModelElement != null) {
- modelViewer.setInput(selectedModelElement.eResource());
- modelViewer.setSelection(new StructuredSelection(
- selectedModelElement));
- } else {
- modelViewer.setInput(null);
- }
- setPageComplete(validatePage());
- }
- }
-
- /**
- * @generated
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
-
- Composite plate = new Composite(parent, SWT.NONE);
- plate.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- plate.setLayout(layout);
- setControl(plate);
-
- Label label = new Label(plate, SWT.NONE);
- label.setText(getSelectionTitle());
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- modelViewer = new TreeViewer(plate, SWT.SINGLE | SWT.H_SCROLL
- | SWT.V_SCROLL | SWT.BORDER);
- GridData layoutData = new GridData(GridData.FILL_BOTH);
- layoutData.heightHint = 300;
- layoutData.widthHint = 300;
- modelViewer.getTree().setLayoutData(layoutData);
- modelViewer.setContentProvider(new AdapterFactoryContentProvider(
- MindmapDiagramEditorPlugin.getInstance()
- .getItemProvidersAdapterFactory()));
- modelViewer.setLabelProvider(new AdapterFactoryLabelProvider(
- MindmapDiagramEditorPlugin.getInstance()
- .getItemProvidersAdapterFactory()));
- if (selectedModelElement != null) {
- modelViewer.setInput(selectedModelElement.eResource());
- modelViewer.setSelection(new StructuredSelection(
- selectedModelElement));
- }
- modelViewer
- .addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ModelElementSelectionPage.this
- .updateSelection((IStructuredSelection) event
- .getSelection());
- }
- });
-
- setPageComplete(validatePage());
- }
-
- /**
- * Override to provide custom model element description.
- * @generated
- */
- protected String getSelectionTitle() {
- return Messages.ModelElementSelectionPageMessage;
- }
-
- /**
- * @generated
- */
- protected void updateSelection(IStructuredSelection selection) {
- selectedModelElement = null;
- if (selection.size() == 1) {
- Object selectedElement = selection.getFirstElement();
- if (selectedElement instanceof IWrapperItemProvider) {
- selectedElement = ((IWrapperItemProvider) selectedElement)
- .getValue();
- }
- if (selectedElement instanceof FeatureMap.Entry) {
- selectedElement = ((FeatureMap.Entry) selectedElement)
- .getValue();
- }
- if (selectedElement instanceof EObject) {
- selectedModelElement = (EObject) selectedElement;
- }
- }
- setPageComplete(validatePage());
- }
-
- /**
- * Override to provide specific validation of the selected model element.
- * @generated
- */
- protected boolean validatePage() {
- return true;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramAppearancePreferencePage.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramAppearancePreferencePage.java
deleted file mode 100644
index d97fd4aa2..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramAppearancePreferencePage.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.preferences;
-
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage;
-
-/**
- * @generated
- */
-public class DiagramAppearancePreferencePage extends AppearancePreferencePage {
-
- /**
- * @generated
- */
- public DiagramAppearancePreferencePage() {
- setPreferenceStore(MindmapDiagramEditorPlugin.getInstance()
- .getPreferenceStore());
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramConnectionsPreferencePage.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramConnectionsPreferencePage.java
deleted file mode 100644
index 188134bbb..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramConnectionsPreferencePage.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.preferences;
-
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage;
-
-/**
- * @generated
- */
-public class DiagramConnectionsPreferencePage extends ConnectionsPreferencePage {
-
- /**
- * @generated
- */
- public DiagramConnectionsPreferencePage() {
- setPreferenceStore(MindmapDiagramEditorPlugin.getInstance()
- .getPreferenceStore());
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramGeneralPreferencePage.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramGeneralPreferencePage.java
deleted file mode 100644
index 1821801a4..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramGeneralPreferencePage.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.preferences;
-
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.DiagramsPreferencePage;
-
-/**
- * @generated
- */
-public class DiagramGeneralPreferencePage extends DiagramsPreferencePage {
-
- /**
- * @generated
- */
- public DiagramGeneralPreferencePage() {
- setPreferenceStore(MindmapDiagramEditorPlugin.getInstance()
- .getPreferenceStore());
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramPreferenceInitializer.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramPreferenceInitializer.java
deleted file mode 100644
index 6146ef42e..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramPreferenceInitializer.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-/**
- * @generated
- */
-public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /**
- * @generated
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = getPreferenceStore();
- DiagramPrintingPreferencePage.initDefaults(store);
- DiagramGeneralPreferencePage.initDefaults(store);
- DiagramAppearancePreferencePage.initDefaults(store);
- DiagramConnectionsPreferencePage.initDefaults(store);
- DiagramRulersAndGridPreferencePage.initDefaults(store);
- }
-
- /**
- * @generated
- */
- protected IPreferenceStore getPreferenceStore() {
- return MindmapDiagramEditorPlugin.getInstance().getPreferenceStore();
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramPrintingPreferencePage.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramPrintingPreferencePage.java
deleted file mode 100644
index 8f55c3f9b..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramPrintingPreferencePage.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.preferences;
-
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
-
-/**
- * @generated
- */
-public class DiagramPrintingPreferencePage extends PrintingPreferencePage {
-
- /**
- * @generated
- */
- public DiagramPrintingPreferencePage() {
- setPreferenceStore(MindmapDiagramEditorPlugin.getInstance()
- .getPreferenceStore());
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramRulersAndGridPreferencePage.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramRulersAndGridPreferencePage.java
deleted file mode 100644
index 431859265..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/preferences/DiagramRulersAndGridPreferencePage.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.preferences;
-
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
-
-/**
- * @generated
- */
-public class DiagramRulersAndGridPreferencePage extends RulerGridPreferencePage {
-
- /**
- * @generated
- */
- public DiagramRulersAndGridPreferencePage() {
- setPreferenceStore(MindmapDiagramEditorPlugin.getInstance()
- .getPreferenceStore());
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/ElementInitializers.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/ElementInitializers.java
deleted file mode 100644
index 2955895a1..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/ElementInitializers.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.providers;
-
-/**
- * @generated
- */
-public class ElementInitializers {
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapEditPartProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapEditPartProvider.java
deleted file mode 100644
index fede5089e..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapEditPartProvider.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.providers;
-
-import java.lang.ref.WeakReference;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartFactory;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MindmapEditPartFactory;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MindmapEditPartProvider extends AbstractEditPartProvider {
-
- /**
- * @generated
- */
- private EditPartFactory factory;
-
- /**
- * @generated
- */
- private boolean allowCaching;
-
- /**
- * @generated
- */
- private WeakReference cachedPart;
-
- /**
- * @generated
- */
- private WeakReference cachedView;
-
- /**
- * @generated
- */
- public MindmapEditPartProvider() {
- setFactory(new MindmapEditPartFactory());
- setAllowCaching(true);
- }
-
- /**
- * @generated
- */
- public final EditPartFactory getFactory() {
- return factory;
- }
-
- /**
- * @generated
- */
- protected void setFactory(EditPartFactory factory) {
- this.factory = factory;
- }
-
- /**
- * @generated
- */
- public final boolean isAllowCaching() {
- return allowCaching;
- }
-
- /**
- * @generated
- */
- protected synchronized void setAllowCaching(boolean allowCaching) {
- this.allowCaching = allowCaching;
- if (!allowCaching) {
- cachedPart = null;
- cachedView = null;
- }
- }
-
- /**
- * @generated
- */
- protected IGraphicalEditPart createEditPart(View view) {
- EditPart part = factory.createEditPart(null, view);
- if (part instanceof IGraphicalEditPart) {
- return (IGraphicalEditPart) part;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IGraphicalEditPart getCachedPart(View view) {
- if (cachedView != null && cachedView.get() == view) {
- return (IGraphicalEditPart) cachedPart.get();
- }
- return null;
- }
-
- /**
- * @generated
- */
- public synchronized IGraphicalEditPart createGraphicEditPart(View view) {
- if (isAllowCaching()) {
- IGraphicalEditPart part = getCachedPart(view);
- cachedPart = null;
- cachedView = null;
- if (part != null) {
- return part;
- }
- }
- return createEditPart(view);
- }
-
- /**
- * @generated
- */
- public synchronized boolean provides(IOperation operation) {
- if (operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation) operation).getView();
- if (!MapEditPart.MODEL_ID.equals(MindmapVisualIDRegistry
- .getModelID(view))) {
- return false;
- }
- if (isAllowCaching() && getCachedPart(view) != null) {
- return true;
- }
- IGraphicalEditPart part = createEditPart(view);
- if (part != null) {
- if (isAllowCaching()) {
- cachedPart = new WeakReference(part);
- cachedView = new WeakReference(view);
- }
- return true;
- }
- }
- return false;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapElementTypes.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapElementTypes.java
deleted file mode 100644
index cd226d417..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapElementTypes.java
+++ /dev/null
@@ -1,201 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.providers;
-
-import java.util.HashSet;
-import java.util.IdentityHashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @generated
- */
-public class MindmapElementTypes extends ElementInitializers {
-
- /**
- * @generated
- */
- private MindmapElementTypes() {
- }
-
- /**
- * @generated
- */
- private static Map elements;
-
- /**
- * @generated
- */
- private static ImageRegistry imageRegistry;
-
- /**
- * @generated
- */
- private static Set KNOWN_ELEMENT_TYPES;
-
- /**
- * @generated
- */
- public static final IElementType Map_79 = getElementType("org.eclipse.gmf.examples.mindmap.diagram.Map_79"); //$NON-NLS-1$
- /**
- * @generated
- */
- public static final IElementType Topic_1001 = getElementType("org.eclipse.gmf.examples.mindmap.diagram.Topic_1001"); //$NON-NLS-1$
- /**
- * @generated
- */
- public static final IElementType TopicSubtopics_3001 = getElementType("org.eclipse.gmf.examples.mindmap.diagram.TopicSubtopics_3001"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- private static ImageRegistry getImageRegistry() {
- if (imageRegistry == null) {
- imageRegistry = new ImageRegistry();
- }
- return imageRegistry;
- }
-
- /**
- * @generated
- */
- private static String getImageRegistryKey(ENamedElement element) {
- return element.getName();
- }
-
- /**
- * @generated
- */
- private static ImageDescriptor getProvidedImageDescriptor(
- ENamedElement element) {
- if (element instanceof EStructuralFeature) {
- EStructuralFeature feature = ((EStructuralFeature) element);
- EClass eContainingClass = feature.getEContainingClass();
- EClassifier eType = feature.getEType();
- if (eContainingClass != null && !eContainingClass.isAbstract()) {
- element = eContainingClass;
- } else if (eType instanceof EClass
- && !((EClass) eType).isAbstract()) {
- element = eType;
- }
- }
- if (element instanceof EClass) {
- EClass eClass = (EClass) element;
- if (!eClass.isAbstract()) {
- return MindmapDiagramEditorPlugin.getInstance()
- .getItemImageDescriptor(
- eClass.getEPackage().getEFactoryInstance()
- .create(eClass));
- }
- }
- // TODO : support structural features
- return null;
- }
-
- /**
- * @generated
- */
- public static ImageDescriptor getImageDescriptor(ENamedElement element) {
- String key = getImageRegistryKey(element);
- ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(key);
- if (imageDescriptor == null) {
- imageDescriptor = getProvidedImageDescriptor(element);
- if (imageDescriptor == null) {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
- getImageRegistry().put(key, imageDescriptor);
- }
- return imageDescriptor;
- }
-
- /**
- * @generated
- */
- public static Image getImage(ENamedElement element) {
- String key = getImageRegistryKey(element);
- Image image = getImageRegistry().get(key);
- if (image == null) {
- ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element);
- if (imageDescriptor == null) {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
- getImageRegistry().put(key, imageDescriptor);
- image = getImageRegistry().get(key);
- }
- return image;
- }
-
- /**
- * @generated
- */
- public static ImageDescriptor getImageDescriptor(IAdaptable hint) {
- ENamedElement element = getElement(hint);
- if (element == null) {
- return null;
- }
- return getImageDescriptor(element);
- }
-
- /**
- * @generated
- */
- public static Image getImage(IAdaptable hint) {
- ENamedElement element = getElement(hint);
- if (element == null) {
- return null;
- }
- return getImage(element);
- }
-
- /**
- * Returns 'type' of the ecore object associated with the hint.
- *
- * @generated
- */
- public static ENamedElement getElement(IAdaptable hint) {
- Object type = hint.getAdapter(IElementType.class);
- if (elements == null) {
- elements = new IdentityHashMap();
-
- elements.put(Map_79, MindmapPackage.eINSTANCE.getMap());
-
- elements.put(Topic_1001, MindmapPackage.eINSTANCE.getTopic());
-
- elements.put(TopicSubtopics_3001, MindmapPackage.eINSTANCE
- .getTopic_Subtopics());
- }
- return (ENamedElement) elements.get(type);
- }
-
- /**
- * @generated
- */
- private static IElementType getElementType(String id) {
- return ElementTypeRegistry.getInstance().getType(id);
- }
-
- /**
- * @generated
- */
- public static boolean isKnownElementType(IElementType elementType) {
- if (KNOWN_ELEMENT_TYPES == null) {
- KNOWN_ELEMENT_TYPES = new HashSet();
- KNOWN_ELEMENT_TYPES.add(Map_79);
- KNOWN_ELEMENT_TYPES.add(Topic_1001);
- KNOWN_ELEMENT_TYPES.add(TopicSubtopics_3001);
- }
- return KNOWN_ELEMENT_TYPES.contains(elementType);
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapIconProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapIconProvider.java
deleted file mode 100644
index f59eccddc..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapIconProvider.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.providers;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.ui.services.icon.GetIconOperation;
-import org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @generated
- */
-public class MindmapIconProvider extends AbstractProvider implements
- IIconProvider {
-
- /**
- * @generated
- */
- public Image getIcon(IAdaptable hint, int flags) {
- return MindmapElementTypes.getImage(hint);
- }
-
- /**
- * @generated
- */
- public boolean provides(IOperation operation) {
- if (operation instanceof GetIconOperation) {
- return ((GetIconOperation) operation).execute(this) != null;
- }
- return false;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapModelingAssistantProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapModelingAssistantProvider.java
deleted file mode 100644
index ff1d33c9c..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapModelingAssistantProvider.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.providers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.Messages;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.ui.services.modelingassistant.ModelingAssistantProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-
-/**
- * @generated
- */
-public class MindmapModelingAssistantProvider extends ModelingAssistantProvider {
-
- /**
- * @generated
- */
- public List getTypesForPopupBar(IAdaptable host) {
- IGraphicalEditPart editPart = (IGraphicalEditPart) host
- .getAdapter(IGraphicalEditPart.class);
- if (editPart instanceof MapEditPart) {
- List types = new ArrayList();
- types.add(MindmapElementTypes.Topic_1001);
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public List getRelTypesOnSource(IAdaptable source) {
- IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
- .getAdapter(IGraphicalEditPart.class);
- if (sourceEditPart instanceof TopicEditPart) {
- List types = new ArrayList();
- types.add(MindmapElementTypes.TopicSubtopics_3001);
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public List getRelTypesOnTarget(IAdaptable target) {
- IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target
- .getAdapter(IGraphicalEditPart.class);
- if (targetEditPart instanceof TopicEditPart) {
- List types = new ArrayList();
- types.add(MindmapElementTypes.TopicSubtopics_3001);
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public List getRelTypesOnSourceAndTarget(IAdaptable source,
- IAdaptable target) {
- IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
- .getAdapter(IGraphicalEditPart.class);
- IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target
- .getAdapter(IGraphicalEditPart.class);
- if (sourceEditPart instanceof TopicEditPart) {
- List types = new ArrayList();
- if (targetEditPart instanceof TopicEditPart) {
- types.add(MindmapElementTypes.TopicSubtopics_3001);
- }
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public List getTypesForSource(IAdaptable target,
- IElementType relationshipType) {
- IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target
- .getAdapter(IGraphicalEditPart.class);
- if (targetEditPart instanceof TopicEditPart) {
- List types = new ArrayList();
- if (relationshipType == MindmapElementTypes.TopicSubtopics_3001) {
- types.add(MindmapElementTypes.Topic_1001);
- }
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public List getTypesForTarget(IAdaptable source,
- IElementType relationshipType) {
- IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
- .getAdapter(IGraphicalEditPart.class);
- if (sourceEditPart instanceof TopicEditPart) {
- List types = new ArrayList();
- if (relationshipType == MindmapElementTypes.TopicSubtopics_3001) {
- types.add(MindmapElementTypes.Topic_1001);
- }
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public EObject selectExistingElementForSource(IAdaptable target,
- IElementType relationshipType) {
- return selectExistingElement(target, getTypesForSource(target,
- relationshipType));
- }
-
- /**
- * @generated
- */
- public EObject selectExistingElementForTarget(IAdaptable source,
- IElementType relationshipType) {
- return selectExistingElement(source, getTypesForTarget(source,
- relationshipType));
- }
-
- /**
- * @generated
- */
- protected EObject selectExistingElement(IAdaptable host, Collection types) {
- if (types.isEmpty()) {
- return null;
- }
- IGraphicalEditPart editPart = (IGraphicalEditPart) host
- .getAdapter(IGraphicalEditPart.class);
- if (editPart == null) {
- return null;
- }
- Diagram diagram = (Diagram) editPart.getRoot().getContents().getModel();
- Collection elements = new HashSet();
- for (Iterator it = diagram.getElement().eAllContents(); it.hasNext();) {
- EObject element = (EObject) it.next();
- if (isApplicableElement(element, types)) {
- elements.add(element);
- }
- }
- if (elements.isEmpty()) {
- return null;
- }
- return selectElement((EObject[]) elements.toArray(new EObject[elements
- .size()]));
- }
-
- /**
- * @generated
- */
- protected boolean isApplicableElement(EObject element, Collection types) {
- IElementType type = ElementTypeRegistry.getInstance().getElementType(
- element);
- return types.contains(type);
- }
-
- /**
- * @generated
- */
- protected EObject selectElement(EObject[] elements) {
- Shell shell = Display.getCurrent().getActiveShell();
- ILabelProvider labelProvider = new AdapterFactoryLabelProvider(
- MindmapDiagramEditorPlugin.getInstance()
- .getItemProvidersAdapterFactory());
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(
- shell, labelProvider);
- dialog.setMessage(Messages.MindmapModelingAssistantProviderMessage);
- dialog.setTitle(Messages.MindmapModelingAssistantProviderTitle);
- dialog.setMultipleSelection(false);
- dialog.setElements(elements);
- EObject selected = null;
- if (dialog.open() == Window.OK) {
- selected = (EObject) dialog.getFirstResult();
- }
- return selected;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapParserProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapParserProvider.java
deleted file mode 100644
index f0c3f1e97..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapParserProvider.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.providers;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.examples.mindmap.MindmapPackage;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicNameEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.parsers.MessageFormatParser;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MindmapParserProvider extends AbstractProvider implements
- IParserProvider {
-
- /**
- * @generated
- */
- private IParser topicName_4001Parser;
-
- /**
- * @generated
- */
- private IParser getTopicName_4001Parser() {
- if (topicName_4001Parser == null) {
- topicName_4001Parser = createTopicName_4001Parser();
- }
- return topicName_4001Parser;
- }
-
- /**
- * @generated
- */
- protected IParser createTopicName_4001Parser() {
- EAttribute[] features = new EAttribute[] { MindmapPackage.eINSTANCE
- .getTopic_Name(), };
- MessageFormatParser parser = new MessageFormatParser(features);
- return parser;
- }
-
- /**
- * @generated
- */
- protected IParser getParser(int visualID) {
- switch (visualID) {
- case TopicNameEditPart.VISUAL_ID:
- return getTopicName_4001Parser();
- }
- return null;
- }
-
- /**
- * @generated
- */
- public IParser getParser(IAdaptable hint) {
- String vid = (String) hint.getAdapter(String.class);
- if (vid != null) {
- return getParser(MindmapVisualIDRegistry.getVisualID(vid));
- }
- View view = (View) hint.getAdapter(View.class);
- if (view != null) {
- return getParser(MindmapVisualIDRegistry.getVisualID(view));
- }
- return null;
- }
-
- /**
- * @generated
- */
- public boolean provides(IOperation operation) {
- if (operation instanceof GetParserOperation) {
- IAdaptable hint = ((GetParserOperation) operation).getHint();
- if (MindmapElementTypes.getElement(hint) == null) {
- return false;
- }
- return getParser(hint) != null;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static class HintAdapter extends ParserHintAdapter {
-
- /**
- * @generated
- */
- private final IElementType elementType;
-
- /**
- * @generated
- */
- public HintAdapter(IElementType type, EObject object, String parserHint) {
- super(object, parserHint);
- assert type != null;
- elementType = type;
- }
-
- /**
- * @generated
- */
- public Object getAdapter(Class adapter) {
- if (IElementType.class.equals(adapter)) {
- return elementType;
- }
- return super.getAdapter(adapter);
- }
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapViewProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapViewProvider.java
deleted file mode 100644
index d187cb050..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/providers/MindmapViewProvider.java
+++ /dev/null
@@ -1,176 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.providers;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicNameEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicSubtopicsEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.examples.mindmap.diagram.view.factories.MapViewFactory;
-import org.eclipse.gmf.examples.mindmap.diagram.view.factories.TopicNameViewFactory;
-import org.eclipse.gmf.examples.mindmap.diagram.view.factories.TopicSubtopicsViewFactory;
-import org.eclipse.gmf.examples.mindmap.diagram.view.factories.TopicViewFactory;
-import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MindmapViewProvider extends AbstractViewProvider {
-
- /**
- * @generated
- */
- protected Class getDiagramViewClass(IAdaptable semanticAdapter,
- String diagramKind) {
- EObject semanticElement = getSemanticElement(semanticAdapter);
- if (MapEditPart.MODEL_ID.equals(diagramKind)
- && MindmapVisualIDRegistry.getDiagramVisualID(semanticElement) != -1) {
- return MapViewFactory.class;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Class getNodeViewClass(IAdaptable semanticAdapter,
- View containerView, String semanticHint) {
- if (containerView == null) {
- return null;
- }
- IElementType elementType = getSemanticElementType(semanticAdapter);
- EObject domainElement = getSemanticElement(semanticAdapter);
- int visualID;
- if (semanticHint == null) {
- // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
- // In this situation there should be NO elementType, visualID will be determined
- // by VisualIDRegistry.getNodeVisualID() for domainElement.
- if (elementType != null || domainElement == null) {
- return null;
- }
- visualID = MindmapVisualIDRegistry.getNodeVisualID(containerView,
- domainElement);
- } else {
- visualID = MindmapVisualIDRegistry.getVisualID(semanticHint);
- if (elementType != null) {
- // Semantic hint is specified together with element type.
- // Both parameters should describe exactly the same diagram element.
- // In addition we check that visualID returned by VisualIDRegistry.getNodeVisualID() for
- // domainElement (if specified) is the same as in element type.
- if (!MindmapElementTypes.isKnownElementType(elementType)
- || (!(elementType instanceof IHintedType))) {
- return null; // foreign element type
- }
- String elementTypeHint = ((IHintedType) elementType)
- .getSemanticHint();
- if (!semanticHint.equals(elementTypeHint)) {
- return null; // if semantic hint is specified it should be the same as in element type
- }
- if (domainElement != null
- && visualID != MindmapVisualIDRegistry.getNodeVisualID(
- containerView, domainElement)) {
- return null; // visual id for node EClass should match visual id from element type
- }
- } else {
- // Element type is not specified. Domain element should be present (except pure design elements).
- // This method is called with EObjectAdapter as parameter from:
- // - ViewService.createNode(View container, EObject eObject, String type, PreferencesHint preferencesHint)
- // - generated ViewFactory.decorateView() for parent element
- if (!MapEditPart.MODEL_ID.equals(MindmapVisualIDRegistry
- .getModelID(containerView))) {
- return null; // foreign diagram
- }
- switch (visualID) {
- case TopicEditPart.VISUAL_ID:
- if (domainElement == null
- || visualID != MindmapVisualIDRegistry
- .getNodeVisualID(containerView,
- domainElement)) {
- return null; // visual id in semantic hint should match visual id for domain element
- }
- break;
- case TopicNameEditPart.VISUAL_ID:
- if (TopicEditPart.VISUAL_ID != MindmapVisualIDRegistry
- .getVisualID(containerView)
- || containerView.getElement() != domainElement) {
- return null; // wrong container
- }
- break;
- default:
- return null;
- }
- }
- }
- return getNodeViewClass(containerView, visualID);
- }
-
- /**
- * @generated
- */
- protected Class getNodeViewClass(View containerView, int visualID) {
- if (containerView == null
- || !MindmapVisualIDRegistry.canCreateNode(containerView,
- visualID)) {
- return null;
- }
- switch (visualID) {
- case TopicEditPart.VISUAL_ID:
- return TopicViewFactory.class;
- case TopicNameEditPart.VISUAL_ID:
- return TopicNameViewFactory.class;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Class getEdgeViewClass(IAdaptable semanticAdapter,
- View containerView, String semanticHint) {
- IElementType elementType = getSemanticElementType(semanticAdapter);
- if (!MindmapElementTypes.isKnownElementType(elementType)
- || (!(elementType instanceof IHintedType))) {
- return null; // foreign element type
- }
- String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- if (elementTypeHint == null) {
- return null; // our hint is visual id and must be specified
- }
- if (semanticHint != null && !semanticHint.equals(elementTypeHint)) {
- return null; // if semantic hint is specified it should be the same as in element type
- }
- int visualID = MindmapVisualIDRegistry.getVisualID(elementTypeHint);
- EObject domainElement = getSemanticElement(semanticAdapter);
- if (domainElement != null
- && visualID != MindmapVisualIDRegistry
- .getLinkWithClassVisualID(domainElement)) {
- return null; // visual id for link EClass should match visual id from element type
- }
- return getEdgeViewClass(visualID);
- }
-
- /**
- * @generated
- */
- protected Class getEdgeViewClass(int visualID) {
- switch (visualID) {
- case TopicSubtopicsEditPart.VISUAL_ID:
- return TopicSubtopicsViewFactory.class;
- }
- return null;
- }
-
- /**
- * @generated
- */
- private IElementType getSemanticElementType(IAdaptable semanticAdapter) {
- if (semanticAdapter == null) {
- return null;
- }
- return (IElementType) semanticAdapter.getAdapter(IElementType.class);
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/sheet/MindmapPropertySection.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/sheet/MindmapPropertySection.java
deleted file mode 100644
index 37130b9e8..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/sheet/MindmapPropertySection.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.sheet;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.ui.provider.PropertySource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.IPropertySourceProvider;
-
-/**
- * @generated
- */
-public class MindmapPropertySection extends AdvancedPropertySection implements
- IPropertySourceProvider {
-
- /**
- * @generated
- */
- public IPropertySource getPropertySource(Object object) {
- if (object instanceof IPropertySource) {
- return (IPropertySource) object;
- }
- AdapterFactory af = getAdapterFactory(object);
- if (af != null) {
- IItemPropertySource ips = (IItemPropertySource) af.adapt(object,
- IItemPropertySource.class);
- if (ips != null) {
- return new PropertySource(object, ips);
- }
- }
- if (object instanceof IAdaptable) {
- return (IPropertySource) ((IAdaptable) object)
- .getAdapter(IPropertySource.class);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IPropertySourceProvider getPropertySourceProvider() {
- return this;
- }
-
- /**
- * Modify/unwrap selection.
- * @generated
- */
- protected Object transformSelection(Object selected) {
-
- if (selected instanceof EditPart) {
- Object model = ((EditPart) selected).getModel();
- return model instanceof View ? ((View) model).getElement() : null;
- }
- if (selected instanceof View) {
- return ((View) selected).getElement();
- }
- if (selected instanceof IAdaptable) {
- View view = (View) ((IAdaptable) selected).getAdapter(View.class);
- if (view != null) {
- return view.getElement();
- }
- }
- return selected;
- }
-
- /**
- * @generated
- */
- public void setInput(IWorkbenchPart part, ISelection selection) {
- if (selection.isEmpty()
- || false == selection instanceof StructuredSelection) {
- super.setInput(part, selection);
- return;
- }
- final StructuredSelection structuredSelection = ((StructuredSelection) selection);
- ArrayList transformedSelection = new ArrayList(structuredSelection
- .size());
- for (Iterator it = structuredSelection.iterator(); it.hasNext();) {
- Object r = transformSelection(it.next());
- if (r != null) {
- transformedSelection.add(r);
- }
- }
- super.setInput(part, new StructuredSelection(transformedSelection));
- }
-
- /**
- * @generated
- */
- protected AdapterFactory getAdapterFactory(Object object) {
- if (getEditingDomain() instanceof AdapterFactoryEditingDomain) {
- return ((AdapterFactoryEditingDomain) getEditingDomain())
- .getAdapterFactory();
- }
- TransactionalEditingDomain editingDomain = TransactionUtil
- .getEditingDomain(object);
- if (editingDomain != null) {
- return ((AdapterFactoryEditingDomain) editingDomain)
- .getAdapterFactory();
- }
- return null;
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/sheet/MindmapSheetLabelProvider.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/sheet/MindmapSheetLabelProvider.java
deleted file mode 100644
index da00b438c..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/sheet/MindmapSheetLabelProvider.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.sheet;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.navigator.MindmapNavigatorGroup;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapDiagramEditorPlugin;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @generated
- */
-public class MindmapSheetLabelProvider extends DecoratingLabelProvider {
-
- /**
- * @generated
- */
- public MindmapSheetLabelProvider() {
- super(new AdapterFactoryLabelProvider(MindmapDiagramEditorPlugin
- .getInstance().getItemProvidersAdapterFactory()), null);
- }
-
- /**
- * @generated
- */
- public String getText(Object element) {
- Object selected = unwrap(element);
- if (selected instanceof MindmapNavigatorGroup) {
- return ((MindmapNavigatorGroup) selected).getGroupName();
- }
- return super.getText(selected);
- }
-
- /**
- * @generated
- */
- public Image getImage(Object element) {
- return super.getImage(unwrap(element));
- }
-
- /**
- * @generated
- */
- private Object unwrap(Object element) {
- if (element instanceof IStructuredSelection) {
- return unwrap(((IStructuredSelection) element).getFirstElement());
- }
- if (element instanceof EditPart) {
- return unwrapEditPart((EditPart) element);
- }
- if (element instanceof IAdaptable) {
- View view = (View) ((IAdaptable) element).getAdapter(View.class);
- if (view != null) {
- return unwrapView(view);
- }
- }
- return element;
- }
-
- /**
- * @generated
- */
- private Object unwrapEditPart(EditPart p) {
- if (p.getModel() instanceof View) {
- return unwrapView((View) p.getModel());
- }
- return p.getModel();
- }
-
- /**
- * @generated
- */
- private Object unwrapView(View view) {
- return view.getElement() == null ? view : view.getElement();
- }
-
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/MapViewFactory.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/MapViewFactory.java
deleted file mode 100644
index fdb47357e..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/MapViewFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.view.factories;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class MapViewFactory extends DiagramViewFactory {
-
- /**
- * @generated
- */
- protected List createStyles(View view) {
- List styles = new ArrayList();
- styles.add(NotationFactory.eINSTANCE.createDiagramStyle());
- return styles;
- }
-
- /**
- * @generated
- */
- protected MeasurementUnit getMeasurementUnit() {
- return MeasurementUnit.PIXEL_LITERAL;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/OtherEReferencePropertyHandler.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/OtherEReferencePropertyHandler.java
deleted file mode 100644
index b86f04b8b..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/OtherEReferencePropertyHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.view.factories;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.teneo.hibernate.mapping.property.EReferencePropertyHandler;
-import org.eclipse.emf.teneo.hibernate.resource.HibernateResource;
-import org.hibernate.HibernateException;
-import org.hibernate.engine.SessionFactoryImplementor;
-
-/**
- * Implements the getter for an EReference field. Normally uses the eget/eset methods with bidirectional relations the
- * handling is a bit different using eInverseRemove and eInverseAdd. This class implements both the getter, setter and
- * propertyaccessor interfaces. When the getGetter and getSetter methods are called it returns itself.
- *
- * @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.2 $
- */
-@SuppressWarnings("unchecked")
-public class OtherEReferencePropertyHandler extends EReferencePropertyHandler {
-
- /*
- * (non-Javadoc)
- *
- * @see org.hibernate.property.Setter#set(java.lang.Object, java.lang.Object,
- * org.hibernate.engine.SessionFactoryImplementor)
- */
- @Override
- public void set(Object target, Object value, SessionFactoryImplementor factory) throws HibernateException {
- final Object curValue = get(target);
- if (isBidirectional) {// these are handled a bit differently because
- // the opposite should not be set, this is
- // done by hb
- if (curValue != value) { // note that == works fine if the
- // curValue and value have been read in
- // the same
- // pm.
- if (value == null) { // remove
- final NotificationChain nots = ((InternalEObject) target).eInverseRemove(
- (InternalEObject) curValue, eReference.getFeatureID(), eReference.getEType()
- .getInstanceClass(), null);
- if (nots != null) {
- nots.dispatch();
- }
- } else {
- final NotificationChain nots = ((InternalEObject) target).eInverseAdd((InternalEObject) value,
- eReference.getFeatureID(), eReference.getEType().getInstanceClass(), null);
- if (nots != null) {
- nots.dispatch();
- }
- }
- }
- } else {
- if (curValue == null && value == null) {
- return; // do nothing in this case
- }
- final EObject eobj = (EObject) target;
- eobj.eSet(eReference, value);
- Resource res = eobj.eResource();
- if (value != null && res instanceof HibernateResource && ((EObject) value).eResource() == null) {
- final boolean loading = ((HibernateResource) res).isLoading();
- try {
- ((HibernateResource) res).setIsLoading(true);
- ((HibernateResource) res).addToContentOrAttach((InternalEObject) value, eReference);
- } finally {
- ((HibernateResource) res).setIsLoading(loading);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicNameViewFactory.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicNameViewFactory.java
deleted file mode 100644
index a8cf84654..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicNameViewFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.view.factories;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class TopicNameViewFactory extends BasicNodeViewFactory {
-
- /**
- * @generated
- */
- protected List createStyles(View view) {
- List styles = new ArrayList();
- return styles;
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicSubtopicsViewFactory.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicSubtopicsViewFactory.java
deleted file mode 100644
index 850432259..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicSubtopicsViewFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.view.factories;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicSubtopicsEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class TopicSubtopicsViewFactory extends ConnectionViewFactory {
-
- /**
- * @generated
- */
- protected List createStyles(View view) {
- List styles = new ArrayList();
- styles.add(NotationFactory.eINSTANCE.createConnectorStyle());
- styles.add(NotationFactory.eINSTANCE.createFontStyle());
- return styles;
- }
-
- /**
- * @generated
- */
- protected void decorateView(View containerView, View view,
- IAdaptable semanticAdapter, String semanticHint, int index,
- boolean persisted) {
- if (semanticHint == null) {
- semanticHint = MindmapVisualIDRegistry
- .getType(TopicSubtopicsEditPart.VISUAL_ID);
- view.setType(semanticHint);
- }
- super.decorateView(containerView, view, semanticAdapter, semanticHint,
- index, persisted);
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicViewFactory.java b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicViewFactory.java
deleted file mode 100644
index c2f0b98de..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/view/factories/TopicViewFactory.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.gmf.examples.mindmap.diagram.view.factories;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.MapEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.edit.parts.TopicNameEditPart;
-import org.eclipse.gmf.examples.mindmap.diagram.part.MindmapVisualIDRegistry;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class TopicViewFactory extends AbstractShapeViewFactory {
-
- /**
- * @generated
- */
- protected List createStyles(View view) {
- List styles = new ArrayList();
- styles.add(NotationFactory.eINSTANCE.createShapeStyle());
- return styles;
- }
-
- /**
- * @generated
- */
- protected void decorateView(View containerView, View view,
- IAdaptable semanticAdapter, String semanticHint, int index,
- boolean persisted) {
- if (semanticHint == null) {
- semanticHint = MindmapVisualIDRegistry
- .getType(TopicEditPart.VISUAL_ID);
- view.setType(semanticHint);
- }
- super.decorateView(containerView, view, semanticAdapter, semanticHint,
- index, persisted);
- if (!MapEditPart.MODEL_ID.equals(MindmapVisualIDRegistry
- .getModelID(containerView))) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE
- .createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails()
- .put("modelID", MapEditPart.MODEL_ID); //$NON-NLS-1$
- view.getEAnnotations().add(shortcutAnnotation);
- }
- IAdaptable eObjectAdapter = null;
- EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
- if (eObject != null) {
- eObjectAdapter = new EObjectAdapter(eObject);
- }
- getViewService().createNode(eObjectAdapter, view,
- MindmapVisualIDRegistry.getType(TopicNameEditPart.VISUAL_ID),
- ViewUtil.APPEND, true, getPreferencesHint());
- }
-}
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/teneo.properties b/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/teneo.properties
deleted file mode 100755
index 91d2783fd..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap.diagram/src/teneo.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-teneo.mapping.inheritance = JOINED
-
-# -----------------------------------------------------------
-# DEFAULT SETTINGS FOR IN MEMORY HSQLDB DATABASE.
-#
-hibernate.dialect=org.hibernate.dialect.HSQLDialect
-hibernate.connection.driver_class=org.hsqldb.jdbcDriver
-hibernate.connection.url=jdbc:hsqldb:mem:statem
-hibernate.connection.username=sa
-hibernate.connection.password=
-hibernate.connection.autocommit=true
-#hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
-
-#--------------------------------------------------------------
-# EXAMPLE SETTING FOR MYSQL DATABASE. UNCOMMENT AND EDIT TO USE.
-#
-#hibernate.connection.driver_class=com.mysql.jdbc.Driver
-#hibernate.connection.url=jdbc:mysql://localhost:3306/mindmap
-#hibernate.connection.username=root
-#hibernate.connection.password=root
-#hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
-
-#-----------------------------------------------------------
-# FIXED SETTING BELOW - ADVANCED USERS ONLY.
-# See Hibernate documentation for further info: http://www.hibernate.org/
-#hibernate.hbm2ddl.auto=create-drop
-hibernate.show_sql=false
-hibernate.connection.pool_size=10 \ No newline at end of file
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/.classpath b/examples/gmf/org.eclipse.gmf.examples.mindmap/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/.project b/examples/gmf/org.eclipse.gmf.examples.mindmap/.project
deleted file mode 100644
index 0ede8910e..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gmf.examples.mindmap</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/META-INF/MANIFEST.MF b/examples/gmf/org.eclipse.gmf.examples.mindmap/META-INF/MANIFEST.MF
deleted file mode 100644
index ada5bc167..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.gmf.examples.mindmap; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.gmf.examples.mindmap,
- org.eclipse.gmf.examples.mindmap.impl,
- org.eclipse.gmf.examples.mindmap.util
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.emf.teneo.hibernate;visibility:=reexport,
- org.hibernate;bundle-version="3.3.2";visibility:=reexport,
- org.hsqldb;bundle-version="1.8.1",
- com.mysql.jdbc;bundle-version="5.1.11"
-Eclipse-LazyStart: true
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/build.properties b/examples/gmf/org.eclipse.gmf.examples.mindmap/build.properties
deleted file mode 100644
index ae995cfec..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.1 2008/03/16 21:20:25 mtaal Exp $
-
-bin.includes = .,\
- model/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/cdo_hibernate.hbm.xml b/examples/gmf/org.eclipse.gmf.examples.mindmap/model/cdo_hibernate.hbm.xml
deleted file mode 100644
index a7cbc516c..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/cdo_hibernate.hbm.xml
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping auto-import="false">
- <typedef name="mindmap.PriorityObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType">
- <param name="epackage">http://www.example.org/mindmap</param>
- <param name="edatatype">PriorityObject</param>
- </typedef>
- <typedef name="mindmap.RelationshipTypeObject" class="org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType">
- <param name="epackage">http://www.example.org/mindmap</param>
- <param name="edatatype">RelationshipTypeObject</param>
- </typedef>
- <class name="org.eclipse.gmf.examples.mindmap.impl.MapImpl" entity-name="Map" abstract="false" lazy="false" discriminator-value="Map" table="`map`">
- <meta attribute="eclassName">Map</meta>
- <meta attribute="epackage">http://www.example.org/mindmap</meta>
- <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
- <meta attribute="syntheticId">true</meta>
- <generator class="native"/>
- </id>
- <discriminator column="`dtype`" type="string"/>
- <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
- <meta attribute="syntheticVersion">true</meta>
- </version>
- <list name="rootTopics" lazy="true" cascade="all,delete-orphan">
- <key update="true" foreign-key="map_roottopics">
- <column name="`map_roottopics_e_id`" not-null="false" unique="false"/>
- </key>
- <list-index column="`map_roottopics_idx`"/>
- <one-to-many entity-name="Topic"/>
- </list>
- <list name="relations" lazy="true" cascade="all,delete-orphan">
- <key update="true" foreign-key="map_relations">
- <column name="`map_relations_e_id`" not-null="false" unique="false"/>
- </key>
- <list-index column="`map_relations_idx`"/>
- <one-to-many entity-name="Relationship"/>
- </list>
- <list name="resources" lazy="true" cascade="all,delete-orphan">
- <key update="true" foreign-key="map_resources">
- <column name="`map_resources_e_id`" not-null="false" unique="false"/>
- </key>
- <list-index column="`map_resources_idx`"/>
- <one-to-many entity-name="Resource"/>
- </list>
- <property name="title" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
- <column not-null="false" unique="false" name="`title`"/>
- </property>
- </class>
- <class name="org.eclipse.gmf.examples.mindmap.impl.RelationshipImpl" entity-name="Relationship" abstract="false" lazy="false" discriminator-value="Relationship" table="`relationship`">
- <meta attribute="eclassName">Relationship</meta>
- <meta attribute="epackage">http://www.example.org/mindmap</meta>
- <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
- <meta attribute="syntheticId">true</meta>
- <generator class="native"/>
- </id>
- <discriminator column="`dtype`" type="string"/>
- <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
- <meta attribute="syntheticVersion">true</meta>
- </version>
- <property name="label" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
- <column not-null="false" unique="false" name="`label`"/>
- </property>
- <many-to-one name="source" entity-name="Topic" foreign-key="relationship_source" lazy="false" insert="true" update="true" not-null="false">
- <column not-null="false" unique="false" name="`topic_source_e_id`"/>
- </many-to-one>
- <many-to-one name="target" entity-name="Topic" foreign-key="relationship_target" lazy="false" insert="true" update="true" not-null="false">
- <column not-null="false" unique="false" name="`topic_target_e_id`"/>
- </many-to-one>
- <property name="type" lazy="false" not-null="false" insert="true" update="true" unique="false">
- <column not-null="false" unique="false" name="`type`"/>
- <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType">
- <param name="enumClass">org.eclipse.gmf.examples.mindmap.RelationshipType</param>
- </type>
- </property>
- </class>
- <class name="org.eclipse.gmf.examples.mindmap.impl.ResourceImpl" entity-name="Resource" abstract="false" lazy="false" discriminator-value="Resource" table="`resource`">
- <meta attribute="eclassName">Resource</meta>
- <meta attribute="epackage">http://www.example.org/mindmap</meta>
- <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
- <meta attribute="syntheticId">true</meta>
- <generator class="native"/>
- </id>
- <discriminator column="`dtype`" type="string"/>
- <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
- <meta attribute="syntheticVersion">true</meta>
- </version>
- <list name="comments" lazy="true">
- <key update="true">
- <column name="`thread_author_e_id`" not-null="false" unique="false"/>
- </key>
- <list-index column="`resource_comments_idx`"/>
- <one-to-many entity-name="Thread"/>
- </list>
- <property name="email" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
- <column not-null="false" unique="false" name="`email`"/>
- </property>
- <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
- <column not-null="false" unique="false" name="`name`"/>
- </property>
- <list name="topics" lazy="true" table="`resource_topics`">
- <key update="true">
- <column name="`resource_e_id`" not-null="true" unique="false"/>
- </key>
- <list-index column="`resource_topics_idx`"/>
- <many-to-many entity-name="Topic" unique="false" foreign-key="resource_topics">
- <column name="`topic_e_id`" not-null="true" unique="false"/>
- </many-to-many>
- </list>
- </class>
- <class name="org.eclipse.gmf.examples.mindmap.impl.ThreadImpl" entity-name="Thread" abstract="false" lazy="false" discriminator-value="Thread" table="`thread`">
- <meta attribute="eclassName">Thread</meta>
- <meta attribute="epackage">http://www.example.org/mindmap</meta>
- <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
- <meta attribute="syntheticId">true</meta>
- <generator class="native"/>
- </id>
- <discriminator column="`dtype`" type="string"/>
- <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
- <meta attribute="syntheticVersion">true</meta>
- </version>
- <list name="items" lazy="true" cascade="all,delete-orphan">
- <key update="true" foreign-key="thread_items">
- <column name="`thread_items_e_id`" not-null="false" unique="false"/>
- </key>
- <list-index column="`thread_items_idx`"/>
- <one-to-many entity-name="ThreadItem"/>
- </list>
- <many-to-one name="author" entity-name="Resource" foreign-key="thread_author" lazy="false" insert="false" update="false" not-null="false">
- <column not-null="false" unique="false" name="`thread_author_e_id`"/>
- </many-to-one>
- <property name="postDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate">
- <column not-null="false" unique="false" name="`postdate`"/>
- </property>
- <property name="subject" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
- <column not-null="false" unique="false" name="`subject`"/>
- </property>
- </class>
- <class name="org.eclipse.gmf.examples.mindmap.impl.ThreadItemImpl" entity-name="ThreadItem" abstract="false" lazy="false" discriminator-value="ThreadItem" table="`threaditem`">
- <meta attribute="eclassName">ThreadItem</meta>
- <meta attribute="epackage">http://www.example.org/mindmap</meta>
- <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
- <meta attribute="syntheticId">true</meta>
- <generator class="native"/>
- </id>
- <discriminator column="`dtype`" type="string"/>
- <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
- <meta attribute="syntheticVersion">true</meta>
- </version>
- <many-to-one name="author" entity-name="Resource" foreign-key="threaditem_author" lazy="false" insert="true" update="true" not-null="false">
- <column not-null="false" unique="false" name="`resource_author_e_id`"/>
- </many-to-one>
- <property name="body" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
- <column not-null="false" unique="false" name="`body`"/>
- </property>
- <property name="itemPostDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate">
- <column not-null="false" unique="false" name="`itempostdate`"/>
- </property>
- </class>
- <class name="org.eclipse.gmf.examples.mindmap.impl.TopicImpl" entity-name="Topic" abstract="false" lazy="false" discriminator-value="Topic" table="`topic`">
- <meta attribute="eclassName">Topic</meta>
- <meta attribute="epackage">http://www.example.org/mindmap</meta>
- <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
- <id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
- <meta attribute="syntheticId">true</meta>
- <generator class="native"/>
- </id>
- <discriminator column="`dtype`" type="string"/>
- <version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
- <meta attribute="syntheticVersion">true</meta>
- </version>
- <list name="comments" lazy="true" cascade="all,delete-orphan">
- <key update="true" foreign-key="topic_comments">
- <column name="`topic_comments_e_id`" not-null="false" unique="false"/>
- </key>
- <list-index column="`topic_comments_idx`"/>
- <one-to-many entity-name="Thread"/>
- </list>
- <property name="duration" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float">
- <column not-null="false" unique="false" name="`duration`"/>
- </property>
- <property name="endDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate">
- <column not-null="false" unique="false" name="`enddate`"/>
- </property>
- <property name="name" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
- <column not-null="false" unique="false" name="`name`"/>
- </property>
- <property name="percentComplete" lazy="false" insert="true" update="true" not-null="false" unique="false" type="float">
- <column not-null="false" unique="false" name="`percentcomplete`"/>
- </property>
- <property name="priority" lazy="false" not-null="false" insert="true" update="true" unique="false">
- <column not-null="false" unique="false" name="`priority`"/>
- <type name="org.eclipse.emf.teneo.hibernate.mapping.ENumUserType">
- <param name="enumClass">org.eclipse.gmf.examples.mindmap.Priority</param>
- </type>
- </property>
- <list name="resources" lazy="true" table="`topic_resources`">
- <key update="true">
- <column name="`topic_e_id`" not-null="true" unique="false"/>
- </key>
- <list-index column="`topic_resources_idx`"/>
- <many-to-many entity-name="Resource" unique="false" foreign-key="topic_resources">
- <column name="`resource_e_id`" not-null="true" unique="false"/>
- </many-to-many>
- </list>
- <property name="startDate" lazy="false" insert="true" update="true" not-null="false" unique="false" type="org.eclipse.emf.teneo.hibernate.mapping.XSDDate">
- <column not-null="false" unique="false" name="`startdate`"/>
- </property>
- <list name="subtopics" lazy="true">
- <key update="true" foreign-key="topic_subtopics">
- <column name="`topic_subtopics_e_id`" not-null="false" unique="false"/>
- </key>
- <list-index column="`topic_subtopics_idx`"/>
- <one-to-many entity-name="Topic"/>
- </list>
- </class>
-</hibernate-mapping> \ No newline at end of file
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.ecore b/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.ecore
deleted file mode 100644
index 3ef152f5e..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.ecore
+++ /dev/null
@@ -1,298 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="mindmap"
- nsURI="http://www.example.org/mindmap" nsPrefix="mindmap">
- <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value=""/>
- <details key="kind" value="mixed"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed" unique="false" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="elementWildcard"/>
- <details key="name" value=":mixed"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="xMLNSPrefixMap" upperBound="-1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
- transient="true" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="xmlns:prefix"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="xSISchemaLocation" upperBound="-1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
- transient="true" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="xsi:schemaLocation"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="map" upperBound="-2" eType="#//Map"
- volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="map"/>
- <details key="namespace" value="##targetNamespace"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Map">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Map"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="rootTopics" upperBound="-1"
- eType="#//Topic" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="rootTopics"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="relations" upperBound="-1"
- eType="#//Relationship" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="relations"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="resources" upperBound="-1"
- eType="#//Resource" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="resources"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="title"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="Priority">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Priority"/>
- </eAnnotations>
- <eLiterals name="ZERO"/>
- <eLiterals name="ONE" value="1"/>
- <eLiterals name="TWO" value="2"/>
- <eLiterals name="THREE" value="3"/>
- <eLiterals name="FOUR" value="4"/>
- <eLiterals name="FIVE" value="5"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EDataType" name="PriorityObject" instanceClassName="org.eclipse.emf.common.util.Enumerator">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Priority:Object"/>
- <details key="baseType" value="Priority"/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Relationship">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Relationship"/>
- <details key="kind" value="empty"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="label"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="source" eType="#//Topic">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="source"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="target" eType="#//Topic">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="target"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" unique="false" eType="#//RelationshipType"
- defaultValueLiteral="DEPENDENCY" unsettable="true">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="type"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="RelationshipType">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="RelationshipType"/>
- </eAnnotations>
- <eLiterals name="DEPENDENCY"/>
- <eLiterals name="INCLUDES" value="1"/>
- <eLiterals name="EXTENDS" value="2"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EDataType" name="RelationshipTypeObject" instanceClassName="org.eclipse.emf.common.util.Enumerator">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="RelationshipType:Object"/>
- <details key="baseType" value="RelationshipType"/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Resource">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Resource"/>
- <details key="kind" value="empty"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="comments" upperBound="-1"
- eType="#//Thread" eOpposite="#//Thread/author">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="comments"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="email" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="email"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="topics" upperBound="-1"
- eType="#//Topic" eOpposite="#//Topic/resources">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="topics"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Thread">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Thread"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="items" upperBound="-1"
- eType="#//ThreadItem" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="items"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="author" eType="#//Resource"
- eOpposite="#//Resource/comments">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="author"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="postDate" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Date">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="postDate"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="subject" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="subject"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ThreadItem">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="ThreadItem"/>
- <details key="kind" value="empty"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="author" eType="#//Resource">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="author"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="body" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="body"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="itemPostDate" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Date">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="itemPostDate"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Topic">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Topic"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="comments" upperBound="-1"
- eType="#//Thread" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="comments"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="duration" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Float" defaultValueLiteral="0"
- unsettable="true">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="duration"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="endDate" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Date">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="endDate"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="percentComplete" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Float" unsettable="true">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="percentComplete"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" unique="false"
- eType="#//Priority" defaultValueLiteral="ZERO" unsettable="true">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="priority"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="resources" upperBound="-1"
- eType="#//Resource" eOpposite="#//Resource/topics">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="resources"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="startDate" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Date">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="startDate"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="subtopics" upperBound="-1"
- eType="#//Topic">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="subtopics"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.genmodel b/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.genmodel
deleted file mode 100644
index 0ae32f338..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.genmodel
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.gmf.examples.mindmap/src"
- modelPluginID="org.eclipse.gmf.examples.mindmap" modelName="Mindmap" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="5.0" copyrightFields="false">
- <foreignModel>mindmap.ecore</foreignModel>
- <genPackages prefix="Mindmap" basePackage="org.eclipse.gmf.examples" resource="XML"
- disposableProviderFactory="true" ecorePackage="mindmap.ecore#/">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="mindmap.ecore#//Priority">
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//Priority/ZERO"/>
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//Priority/ONE"/>
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//Priority/TWO"/>
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//Priority/THREE"/>
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//Priority/FOUR"/>
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//Priority/FIVE"/>
- </genEnums>
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="mindmap.ecore#//RelationshipType">
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//RelationshipType/DEPENDENCY"/>
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//RelationshipType/INCLUDES"/>
- <genEnumLiterals ecoreEnumLiteral="mindmap.ecore#//RelationshipType/EXTENDS"/>
- </genEnums>
- <genDataTypes ecoreDataType="mindmap.ecore#//PriorityObject"/>
- <genDataTypes ecoreDataType="mindmap.ecore#//RelationshipTypeObject"/>
- <genClasses ecoreClass="mindmap.ecore#//DocumentRoot">
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//DocumentRoot/mixed"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference mindmap.ecore#//DocumentRoot/xMLNSPrefixMap"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference mindmap.ecore#//DocumentRoot/xSISchemaLocation"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mindmap.ecore#//DocumentRoot/map"/>
- </genClasses>
- <genClasses ecoreClass="mindmap.ecore#//Map">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mindmap.ecore#//Map/rootTopics"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mindmap.ecore#//Map/relations"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mindmap.ecore#//Map/resources"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Map/title"/>
- </genClasses>
- <genClasses ecoreClass="mindmap.ecore#//Relationship">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Relationship/label"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mindmap.ecore#//Relationship/source"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mindmap.ecore#//Relationship/target"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Relationship/type"/>
- </genClasses>
- <genClasses ecoreClass="mindmap.ecore#//Resource">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mindmap.ecore#//Resource/comments"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Resource/email"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Resource/name"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mindmap.ecore#//Resource/topics"/>
- </genClasses>
- <genClasses ecoreClass="mindmap.ecore#//Thread">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mindmap.ecore#//Thread/items"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mindmap.ecore#//Thread/author"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Thread/postDate"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Thread/subject"/>
- </genClasses>
- <genClasses ecoreClass="mindmap.ecore#//ThreadItem">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mindmap.ecore#//ThreadItem/author"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//ThreadItem/body"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//ThreadItem/itemPostDate"/>
- </genClasses>
- <genClasses ecoreClass="mindmap.ecore#//Topic">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mindmap.ecore#//Topic/comments"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Topic/duration"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Topic/endDate"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Topic/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Topic/percentComplete"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Topic/priority"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mindmap.ecore#//Topic/resources"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mindmap.ecore#//Topic/startDate"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mindmap.ecore#//Topic/subtopics"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfgen b/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfgen
deleted file mode 100644
index 59f44e9ed..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfgen
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmfgen:GenEditorGenerator xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2006/GenModel">
- <diagram
- visualID="79"
- editPartClassName="MapEditPart"
- itemSemanticEditPolicyClassName="MapItemSemanticEditPolicy"
- notationViewFactoryClassName="MapViewFactory"
- canonicalEditPolicyClassName="MapCanonicalEditPolicy"
- iconProviderPriority="Low"
- validationProviderPriority="Low">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="MapEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <domainDiagramElement
- href="mindmap.genmodel#//mindmap/Map"/>
- <topLevelNodes
- visualID="1001"
- editPartClassName="TopicEditPart"
- itemSemanticEditPolicyClassName="TopicItemSemanticEditPolicy"
- notationViewFactoryClassName="TopicViewFactory"
- canonicalEditPolicyClassName="TopicCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="TopicGraphicalNodeEditPolicy"
- createCommandClassName="TopicCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="TopicEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- layoutType="FLOW_LAYOUT"
- className="TopicFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class TopicFigure extends org.eclipse.draw2d.RectangleFigure {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureTopicNameFigure; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public TopicFigure() {&#xA;&#x9;&#x9;&#xA;&#xA;&#x9;org.eclipse.draw2d.FlowLayout layoutThis = new org.eclipse.draw2d.FlowLayout();&#xA;&#x9;layoutThis.setStretchMinorAxis(false);&#xA;&#x9;layoutThis.setMinorAlignment(org.eclipse.draw2d.FlowLayout.ALIGN_LEFTTOP&#xA;);&#xA;&#xA;&#x9;layoutThis.setMajorAlignment(org.eclipse.draw2d.FlowLayout.ALIGN_LEFTTOP&#xA;);&#xA;&#x9;layoutThis.setMajorSpacing(5);&#xA;&#x9;layoutThis.setMinorSpacing(5);&#xA;&#x9;layoutThis.setHorizontal(true);&#xA;&#xA;&#x9;this.setLayoutManager(layoutThis);&#xA;&#xA;&#x9;&#x9;&#x9;&#x9;createContents();&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureTopicNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureTopicNameFigure.setText(&quot;&lt;...>&quot;);&#xA;&#xA;this.add(fFigureTopicNameFigure);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;protected boolean useLocalCoordinates() {&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureTopicNameFigure() {&#xA;&#x9;&#x9;return fFigureTopicNameFigure;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="mindmap.genmodel#//mindmap/Topic"/>
- <containmentMetaFeature
- href="mindmap.genmodel#//mindmap/Map/rootTopics"/>
- <childMetaFeature
- href="mindmap.genmodel#//mindmap/Map/rootTopics"/>
- </modelFacet>
- <labels
- visualID="4001"
- editPartClassName="TopicNameEditPart"
- itemSemanticEditPolicyClassName="TopicNameItemSemanticEditPolicy"
- notationViewFactoryClassName="TopicNameViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureTopicNameFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet">
- <metaFeatures
- href="mindmap.genmodel#//mindmap/Topic/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="3001"
- editPartClassName="TopicSubtopicsEditPart"
- itemSemanticEditPolicyClassName="TopicSubtopicsItemSemanticEditPolicy"
- notationViewFactoryClassName="TopicSubtopicsViewFactory"
- createCommandClassName="TopicSubtopicsCreateCommand"
- reorientCommandClassName="TopicSubtopicsReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="TopicSubtopicsFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class TopicSubtopicsFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public TopicSubtopicsFigure() {&#xA;&#x9;&#x9;&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="mindmap.genmodel#//mindmap/Topic/subtopics"/>
- </modelFacet>
- </links>
- <palette>
- <groups
- title="mindmap">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Topic"
- description="Create new Topic"
- genNodes="//@diagram/@topLevelNodes.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="TopicSubtopics"
- description="Create new TopicSubtopics"
- genLinks="//@diagram/@links.0"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.gmf.examples.mindmap.diagram.general"
- name="Mindmap Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.gmf.examples.mindmap.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.gmf.examples.mindmap.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.gmf.examples.mindmap.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.gmf.examples.mindmap.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.gmf.examples.mindmap.diagram.pathmaps"
- name="Pathmaps"
- kind="Pathmaps"/>
- </preferencePages>
- </diagram>
- <plugin/>
- <editor/>
- <navigator>
- <childReferences
- child="//@diagram"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@topLevelNodes.0"/>
- <childReferences
- parent="//@diagram"
- child="//@diagram/@links.0"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.0"
- child="//@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.0"
- child="//@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@links.0"
- child="//@diagram/@topLevelNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="//@diagram/@topLevelNodes.0"
- child="//@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- </navigator>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="mindmap.genmodel#/"/>
-</gmfgen:GenEditorGenerator>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfgraph b/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfgraph
deleted file mode 100644
index 64264323f..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfgraph
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmfgraph:Canvas xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgraph="http://www.eclipse.org/gmf/2006/GraphicalDefinition" name="mindmap">
- <figures
- name="Default">
- <figures
- xsi:type="gmfgraph:PolylineDecoration"
- name="TopicSubtopicsTargetDecoration"/>
- <descriptors
- name="TopicFigure">
- <actualFigure
- xsi:type="gmfgraph:Rectangle"
- name="TopicFigure">
- <layout
- xsi:type="gmfgraph:FlowLayout"/>
- <children
- xsi:type="gmfgraph:Label"
- name="TopicNameFigure"
- text="&lt;...>"/>
- </actualFigure>
- <accessors
- figure="//@figures.0/@descriptors.0/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="TopicSubtopicsFigure">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="TopicSubtopicsFigure"
- targetDecoration="//@figures.0/@figures.0"/>
- </descriptors>
- </figures>
- <nodes
- name="Topic"
- figure="TopicFigure"/>
- <connections
- name="TopicSubtopics"
- figure="TopicSubtopicsFigure"/>
- <labels
- name="TopicName"
- figure="TopicFigure"
- accessor="//@figures.0/@descriptors.0/@accessors.0"/>
-</gmfgraph:Canvas>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfmap b/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfmap
deleted file mode 100644
index dff3e03a2..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmfmap
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmfmap:Mapping xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:gmfmap="http://www.eclipse.org/gmf/2006/mappings"
- xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
- <nodes>
- <containmentFeature
- href="mindmap.ecore#//Map/rootTopics"/>
- <ownedChild>
- <domainMetaElement
- href="mindmap.ecore#//Topic"/>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping">
- <diagramLabel
- href="mindmap.gmfgraph#TopicName"/>
- <features
- href="mindmap.ecore#//Topic/name"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="mindmap.gmftool#//@palette/@tools.0/@tools.0"/>
- <diagramNode
- href="mindmap.gmfgraph#Topic"/>
- </ownedChild>
- </nodes>
- <links>
- <tool
- xsi:type="gmftool:CreationTool"
- href="mindmap.gmftool#//@palette/@tools.0/@tools.1"/>
- <diagramLink
- href="mindmap.gmfgraph#TopicSubtopics"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="mindmap.ecore#//Topic/subtopics"/>
- </links>
- <diagram>
- <diagramCanvas
- href="mindmap.gmfgraph#mindmap"/>
- <domainModel
- href="mindmap.ecore#/"/>
- <domainMetaElement
- href="mindmap.ecore#//Map"/>
- <palette
- href="mindmap.gmftool#//@palette"/>
- </diagram>
-</gmfmap:Mapping>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmftool b/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmftool
deleted file mode 100644
index e3a137682..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/model/mindmap.gmftool
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmftool:ToolRegistry xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
- <palette
- title="mindmapPalette">
- <tools
- xsi:type="gmftool:ToolGroup"
- title="mindmap">
- <tools
- xsi:type="gmftool:CreationTool"
- title="Topic"
- description="Create new Topic">
- <smallIcon
- xsi:type="gmftool:DefaultImage"/>
- <largeIcon
- xsi:type="gmftool:DefaultImage"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="TopicSubtopics"
- description="Create new TopicSubtopics">
- <smallIcon
- xsi:type="gmftool:DefaultImage"/>
- <largeIcon
- xsi:type="gmftool:DefaultImage"/>
- </tools>
- </tools>
- </palette>
-</gmftool:ToolRegistry>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/plugin.properties b/examples/gmf/org.eclipse.gmf.examples.mindmap/plugin.properties
deleted file mode 100644
index 02e39c785..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: plugin.properties,v 1.1 2008/03/16 21:20:26 mtaal Exp $
-
-# ====================================================================
-# To code developer:
-# Do NOT change the properties between this line and the
-# "%%% END OF TRANSLATED PROPERTIES %%%" line.
-# Make a new property name, append to the end of the file and change
-# the code to use the new property.
-# ====================================================================
-
-# ====================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# ====================================================================
-
-pluginName = Mindmap Model
-providerName = www.example.org
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/plugin.xml b/examples/gmf/org.eclipse.gmf.examples.mindmap/plugin.xml
deleted file mode 100644
index def401363..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
- <copyright>
- </copyright>
-
- $Id: plugin.xml,v 1.1 2008/03/16 21:20:25 mtaal Exp $
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.example.org/mindmap"
- class = "org.eclipse.gmf.examples.mindmap.MindmapPackage"
- genModel = "model/mindmap.genmodel" />
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="mindmap"
- class="org.eclipse.gmf.examples.mindmap.util.MindmapResourceFactoryImpl" />
- </extension>
-
-</plugin>
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/DocumentRoot.java b/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/DocumentRoot.java
deleted file mode 100644
index acdeb7808..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/DocumentRoot.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DocumentRoot.java,v 1.1 2008/03/16 21:20:25 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap;
-
-import org.eclipse.emf.common.util.EMap;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Document Root</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.gmf.examples.mindmap.DocumentRoot#getMixed <em>Mixed</em>}</li>
- * <li>{@link org.eclipse.gmf.examples.mindmap.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
- * <li>{@link org.eclipse.gmf.examples.mindmap.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
- * <li>{@link org.eclipse.gmf.examples.mindmap.DocumentRoot#getMap <em>Map</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getDocumentRoot()
- * @model extendedMetaData="name='' kind='mixed'"
- * @generated
- */
-public interface DocumentRoot extends EObject {
- /**
- * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mixed</em>' attribute list.
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getDocumentRoot_Mixed()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * extendedMetaData="kind='elementWildcard' name=':mixed'"
- * @generated
- */
- FeatureMap getMixed();
-
- /**
- * Returns the value of the '<em><b>XMLNS Prefix Map</b></em>' map.
- * The key is of type {@link java.lang.String},
- * and the value is of type {@link java.lang.String},
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XMLNS Prefix Map</em>' map isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>XMLNS Prefix Map</em>' map.
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getDocumentRoot_XMLNSPrefixMap()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
- * extendedMetaData="kind='attribute' name='xmlns:prefix'"
- * @generated
- */
- EMap<String, String> getXMLNSPrefixMap();
-
- /**
- * Returns the value of the '<em><b>XSI Schema Location</b></em>' map.
- * The key is of type {@link java.lang.String},
- * and the value is of type {@link java.lang.String},
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XSI Schema Location</em>' map isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>XSI Schema Location</em>' map.
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getDocumentRoot_XSISchemaLocation()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
- * extendedMetaData="kind='attribute' name='xsi:schemaLocation'"
- * @generated
- */
- EMap<String, String> getXSISchemaLocation();
-
- /**
- * Returns the value of the '<em><b>Map</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Map</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Map</em>' containment reference.
- * @see #setMap(Map)
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getDocumentRoot_Map()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='map' namespace='##targetNamespace'"
- * @generated
- */
- Map getMap();
-
- /**
- * Sets the value of the '{@link org.eclipse.gmf.examples.mindmap.DocumentRoot#getMap <em>Map</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Map</em>' containment reference.
- * @see #getMap()
- * @generated
- */
- void setMap(Map value);
-
-} // DocumentRoot
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Map.java b/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Map.java
deleted file mode 100644
index aea3e6f7e..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/Map.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: Map.java,v 1.1 2008/03/16 21:20:25 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Map</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.gmf.examples.mindmap.Map#getRootTopics <em>Root Topics</em>}</li>
- * <li>{@link org.eclipse.gmf.examples.mindmap.Map#getRelations <em>Relations</em>}</li>
- * <li>{@link org.eclipse.gmf.examples.mindmap.Map#getResources <em>Resources</em>}</li>
- * <li>{@link org.eclipse.gmf.examples.mindmap.Map#getTitle <em>Title</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getMap()
- * @model extendedMetaData="name='Map' kind='elementOnly'"
- * @generated
- */
-public interface Map extends EObject {
- /**
- * Returns the value of the '<em><b>Root Topics</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.gmf.examples.mindmap.Topic}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Root Topics</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Root Topics</em>' containment reference list.
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getMap_RootTopics()
- * @model containment="true"
- * extendedMetaData="kind='element' name='rootTopics'"
- * @generated
- */
- EList<Topic> getRootTopics();
-
- /**
- * Returns the value of the '<em><b>Relations</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.gmf.examples.mindmap.Relationship}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Relations</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Relations</em>' containment reference list.
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getMap_Relations()
- * @model containment="true"
- * extendedMetaData="kind='element' name='relations'"
- * @generated
- */
- EList<Relationship> getRelations();
-
- /**
- * Returns the value of the '<em><b>Resources</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.gmf.examples.mindmap.Resource}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Resources</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Resources</em>' containment reference list.
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getMap_Resources()
- * @model containment="true"
- * extendedMetaData="kind='element' name='resources'"
- * @generated
- */
- EList<Resource> getResources();
-
- /**
- * Returns the value of the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Title</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Title</em>' attribute.
- * @see #setTitle(String)
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage#getMap_Title()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='title'"
- * @generated
- */
- String getTitle();
-
- /**
- * Sets the value of the '{@link org.eclipse.gmf.examples.mindmap.Map#getTitle <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Title</em>' attribute.
- * @see #getTitle()
- * @generated
- */
- void setTitle(String value);
-
-} // Map
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/MindmapFactory.java b/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/MindmapFactory.java
deleted file mode 100644
index 844e9577a..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/MindmapFactory.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: MindmapFactory.java,v 1.2 2009/06/28 20:18:46 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.gmf.examples.mindmap.MindmapPackage
- * @generated
- */
-public interface MindmapFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- MindmapFactory eINSTANCE = org.eclipse.gmf.examples.mindmap.impl.MindmapFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Document Root</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Document Root</em>'.
- * @generated
- */
- DocumentRoot createDocumentRoot();
-
- /**
- * Returns a new object of class '<em>Map</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Map</em>'.
- * @generated
- */
- Map createMap();
-
- /**
- * Returns a new object of class '<em>Relationship</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Relationship</em>'.
- * @generated
- */
- Relationship createRelationship();
-
- /**
- * Returns a new object of class '<em>Resource</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource</em>'.
- * @generated
- */
- Resource createResource();
-
- /**
- * Returns a new object of class '<em>Thread</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Thread</em>'.
- * @generated
- */
- Thread createThread();
-
- /**
- * Returns a new object of class '<em>Thread Item</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Thread Item</em>'.
- * @generated
- */
- ThreadItem createThreadItem();
-
- /**
- * Returns a new object of class '<em>Topic</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Topic</em>'.
- * @generated
- */
- Topic createTopic();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- MindmapPackage getMindmapPackage();
-
-} //MindmapFactory
diff --git a/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/MindmapPackage.java b/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/MindmapPackage.java
deleted file mode 100644
index abaff9301..000000000
--- a/examples/gmf/org.eclipse.gmf.examples.mindmap/src/org/eclipse/gmf/examples/mindmap/MindmapPackage.java
+++ /dev/null
@@ -1,1382 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: MindmapPackage.java,v 1.1 2008/03/16 21:20:25 mtaal Exp $
- */
-package org.eclipse.gmf.examples.mindmap;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.gmf.examples.mindmap.MindmapFactory
- * @model kind="package"
- * @generated
- */
-public interface MindmapPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "mindmap";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.example.org/mindmap";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "mindmap";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- MindmapPackage eINSTANCE = org.eclipse.gmf.examples.mindmap.impl.MindmapPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.gmf.examples.mindmap.impl.DocumentRootImpl <em>Document Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.gmf.examples.mindmap.impl.DocumentRootImpl
- * @see org.eclipse.gmf.examples.mindmap.impl.MindmapPackageImpl#getDocumentRoot()
- * @generated
- */
- int DOCUMENT_ROOT = 0;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MIXED = 0;
-
- /**
- * The feature id for the '<em><b>XMLNS Prefix Map</b></em>' map.