Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.cvsignore3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.project28
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.jdt.core.prefs360
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.pde.prefs31
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/META-INF/MANIFEST.MF17
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/about.html28
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/build.properties20
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/copyright.txt8
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/fragment.xml94
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/plugin.properties11
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/DawnACoreRootEditPart.java55
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/DawnAcoreEditPartFactory.java42
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/DawnACoreRootCanonicalEditPolicy.java61
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreCreationWizard.java147
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDiagramEditor.java164
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDiagramEditorUtil.java390
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDocumentProvider.java227
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/DawnAcoreEditPartProvider.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/DawnAcoreEditPolicyProvider.java52
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.options7
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.project28
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/META-INF/MANIFEST.MF40
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/build.properties10
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/incomingLinksNavigatorGroup.gifbin0 -> 709 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linkSourceNavigatorGroup.gifbin0 -> 709 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linkTargetNavigatorGroup.gifbin0 -> 709 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linksNavigatorGroup.gifbin0 -> 709 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/obj16/AcoreDiagramFile.gifbin0 -> 339 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/outgoingLinksNavigatorGroup.gifbin0 -> 709 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/wizban/NewAcoreWizard.gifbin0 -> 2466 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/messages.properties94
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/plugin.properties49
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/plugin.xml588
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AAttribute2CreateCommand.java99
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AAttributeCreateCommand.java99
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAggregationsCreateCommand.java116
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAggregationsReorientCommand.java180
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAssociationsCreateCommand.java116
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAssociationsReorientCommand.java180
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCompositionsCreateCommand.java116
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCompositionsReorientCommand.java180
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCreateCommand.java98
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassImplementedInterfacesCreateCommand.java118
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassImplementedInterfacesReorientCommand.java181
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassSubClassesCreateCommand.java116
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassSubClassesReorientCommand.java180
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AInterfaceCreateCommand.java99
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AOperation2CreateCommand.java99
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AOperationCreateCommand.java99
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AAttributeEditHelper.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AClassEditHelper.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/ACoreRootEditHelper.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AInterfaceEditHelper.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AOperationEditHelper.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AcoreBaseEditHelper.java108
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AAttribute2EditPart.java683
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AAttributeEditPart.java683
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAAttributeCompartmentEditPart.java92
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAOperationClassCompartmentEditPart.java92
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAggregationsEditPart.java119
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAssociationsEditPart.java71
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassCompositionsEditPart.java119
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassEditPart.java581
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassImplementedInterfacesEditPart.java104
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassNameEditPart.java684
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassSubClassesEditPart.java118
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/ACoreRootEditPart.java55
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceAAttributeInterfaceCompartmentEditPart.java93
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceAOperationInterfaceCompartmentEditPart.java93
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceEditPart.java504
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceNameEditPart.java685
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AOperation2EditPart.java683
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AOperationEditPart.java683
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AcoreEditPartFactory.java227
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AAttribute2ItemSemanticEditPolicy.java60
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AAttributeItemSemanticEditPolicy.java60
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAAttributeCompartmentCanonicalEditPolicy.java77
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAAttributeCompartmentItemSemanticEditPolicy.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAOperationClassCompartmentCanonicalEditPolicy.java77
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAOperationClassCompartmentItemSemanticEditPolicy.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAggregationsItemSemanticEditPolicy.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAssociationsItemSemanticEditPolicy.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassCompositionsItemSemanticEditPolicy.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassImplementedInterfacesItemSemanticEditPolicy.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassItemSemanticEditPolicy.java303
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassSubClassesItemSemanticEditPolicy.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/ACoreRootCanonicalEditPolicy.java345
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/ACoreRootItemSemanticEditPolicy.java79
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy.java77
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy.java77
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceItemSemanticEditPolicy.java183
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AOperation2ItemSemanticEditPolicy.java60
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AOperationItemSemanticEditPolicy.java60
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreBaseItemSemanticEditPolicy.java470
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreTextNonResizableEditPolicy.java281
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreTextSelectionEditPolicy.java264
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreAbstractNavigatorItem.java79
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorContentProvider.java262
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorItem.java134
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorLabelProvider.java119
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorActionProvider.java208
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorContentProvider.java665
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorGroup.java120
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorItem.java111
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorLabelProvider.java459
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorLinkHelper.java147
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorSorter.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/parsers/AbstractParser.java583
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/parsers/MessageFormatParser.java226
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreCreationWizard.java193
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreCreationWizardPage.java105
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramActionBarContributor.java53
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditor.java325
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditorPlugin.java281
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditorUtil.java450
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramUpdateCommand.java101
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramUpdater.java652
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDocumentProvider.java1209
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreInitDiagramFileAction.java108
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreLinkDescriptor.java115
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreMatchingStrategy.java52
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreNewDiagramFileWizard.java204
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreNodeDescriptor.java57
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcorePaletteFactory.java269
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreUriEditorInputTester.java36
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreVisualIDRegistry.java322
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DeleteElementAction.java104
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DiagramEditorContextMenuProvider.java87
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/LoadResourceAction.java43
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/Messages.java488
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/ModelElementSelectionPage.java170
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramAppearancePreferencePage.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramConnectionsPreferencePage.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramGeneralPreferencePage.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramPreferenceInitializer.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramPrintingPreferencePage.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramRulersAndGridPreferencePage.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreEditPartProvider.java172
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreElementTypes.java355
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreIconProvider.java46
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreModelingAssistantProvider.java226
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreParserProvider.java273
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreViewProvider.java748
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/ElementInitializers.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/sheet/AcorePropertySection.java139
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/sheet/AcoreSheetLabelProvider.java101
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.project28
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/build.properties18
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateABasicClass_attributes_AAttribute.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateABasicClass_operations_AOperation.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateACoreRoot_classes_AClass.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateACoreRoot_interfaces_AInterface.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateAOperation_parameters_AParameter.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AAttribute.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/ABasicClass.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AClass.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AClassChild.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/ACoreRoot.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AInterface.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AOperation.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AParameter.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/plugin.properties57
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/plugin.xml30
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AAttributeItemProvider.java134
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/ABasicClassItemProvider.java235
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AClassChildItemProvider.java234
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AClassItemProvider.java256
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/ACoreRootItemProvider.java235
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AInterfaceItemProvider.java134
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AOperationItemProvider.java184
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AParameterItemProvider.java209
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AcoreEditPlugin.java112
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AcoreItemProviderAdapterFactory.java413
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.cvsignore3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.project28
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/acore.gmfgen.prefs7
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/classdiagram.gmfgen.prefs7
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.core.prefs361
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.prefs31
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/CDO.MF1
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/about.html28
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/build.properties14
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/copyright.txt8
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.ecore64
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.genmodel52
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen740
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgraph292
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfmap240
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmftool120
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.trace22
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.properties11
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.xml24
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AAttribute.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ABasicClass.java104
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClass.java125
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClassChild.java154
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ACoreRoot.java104
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AInterface.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AOperation.java57
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AParameter.java95
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AccessType.java293
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcoreFactory.java122
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcorePackage.java1061
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AAttributeImpl.java58
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ABasicClassImpl.java123
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassChildImpl.java158
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassImpl.java124
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ACoreRootImpl.java123
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AInterfaceImpl.java58
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AOperationImpl.java76
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AParameterImpl.java116
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcoreFactoryImpl.java287
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcorePackageImpl.java635
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreAdapterFactory.java288
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreSwitch.java319
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/internal/dawn/examples/acore/bundle/Activator.java66
238 files changed, 34424 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.classpath b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <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="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.cvsignore b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.cvsignore
new file mode 100644
index 0000000000..6ffb221cca
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.cvsignore
@@ -0,0 +1,3 @@
+bin
+doc
+text
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.project b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.project
new file mode 100644
index 0000000000..5b88bca9b7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..a1cef9a448
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Dec 18 13:30:26 CET 2008
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..e6d94e03c0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,360 @@
+#Mon Apr 12 14:00:12 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..5b95c33f76
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,120 @@
+#Thu Feb 04 09:44:24 CET 2010
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Martin Fluegge - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Martin Fluegge\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..864e30fe5d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.mylyn.tasks.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..b050639a54
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.mylyn.team.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..2f50f36c0c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..bf3053a36e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Thu Feb 04 09:44:24 CET 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c6b96bb45e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Thu Feb 04 09:44:24 CET 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..5e5494a640
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn;singleton:=true
+Bundle-Version: 0.2.0.qualifier
+Fragment-Host: org.eclipse.emf.cdo.dawn.examples.acore.diagram;bundle-version="0.2.0.qualifier"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.emf.cdo.dawn;bundle-version="[0.2.0,1.0.0)",
+ org.eclipse.emf.cdo.dawn.util;bundle-version="[0.2.0,1.0.0)",
+ org.eclipse.emf.cdo.ui;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.cdo.dawn.ui;bundle-version="[0.2.0,1.0.0)"
+Export-Package: org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;version="0.2.0",
+ org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;version="0.2.0",
+ org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;version="0.2.0",
+ org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers;version="0.2.0"
+Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/about.html b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/about.html
new file mode 100644
index 0000000000..d35d5aed64
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/build.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/build.properties
new file mode 100644
index 0000000000..69488bb0b7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/build.properties
@@ -0,0 +1,20 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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 Fluegge - initial API and implementation
+
+# NLS_MESSAGEFORMAT_VAR
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ copyright.txt,\
+ plugin.properties,\
+ fragment.xml
+src.includes = about.html,\
+ copyright.txt
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/copyright.txt b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/copyright.txt
new file mode 100644
index 0000000000..9134dfaf00
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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 Fluegge - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/fragment.xml b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/fragment.xml
new file mode 100644
index 0000000000..599e5f57ec
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/fragment.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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 Fluegge - initial API and implementation
+-->
+<fragment>
+<extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.DawnAcoreDiagramEditor"
+ contributorClass="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramActionBarContributor"
+ default="true"
+ extensions="acore_diagram"
+ icon="platform:/plugin/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/obj16/AcoreDiagramFile.gif"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.DawnAcoreDiagramEditor"
+ matchingStrategy="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreMatchingStrategy"
+ name="Dawn Acore Diagram">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ category="org.eclipse.emf.cdo.dawn.ui.category.examples"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.DawnAcoreCreationWizard"
+ icon="platform:/plugin/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/obj16/AcoreDiagramFile.gif"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn.part.AcoreCreationWizardID"
+ name="Dawn Acore Diagram">
+ <description>
+ description body text
+ </description>
+ </wizard>
+
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.resources.editor.documentProviders">
+ <provider
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.DawnAcoreDocumentProvider"
+ documentType="org.eclipse.gmf.runtime.diagram.ui.editor.IDocument"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part"
+ inputTypes="org.eclipse.emf.common.ui .URIEditorInput">
+ </provider>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.DawnAcoreEditPolicyProvider">
+ <Priority
+ name="Low">
+ </Priority>
+ </editpolicyProvider>
+ </extension>
+ <extension
+ point="org.eclipse.emf.cdo.dawn.listeners">
+ <DawnTransactionListener
+ class="org.eclipse.emf.cdo.dawn.notifications.DawnGMFTransactionListener">
+ </DawnTransactionListener>
+ </extension>
+ <extension
+ point="org.eclipse.emf.cdo.dawn.editpartstylizers">
+ <DawnEditPartStylizers
+ editpart="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart"
+ stylizer="org.eclipse.emf.cdo.dawn.appearance.impl.DawnBasicNodeEditPartStylizerImpl">
+ </DawnEditPartStylizers>
+ </extension>
+ <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
+ <?gmfgen generated="true"?>
+ <editpartProvider class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.DawnAcoreEditPartProvider">
+ <Priority name="Medium"/>
+ <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
+ <method name="getType()" value="Acore"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
+ <method name="getType()" value="2001,2002,3001,3002,3003,3004"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
+ <method name="getType()" value="4001,4002,4003,4004,4005"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
+ <method name="getType()" value="5001,5002"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
+ <method name="getType()" value="7001,7002,7003,7004"/>
+ </object>
+ <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
+ </editpartProvider>
+ </extension>
+</fragment>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/plugin.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/plugin.properties
new file mode 100644
index 0000000000..abe6751d1b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/plugin.properties
@@ -0,0 +1,11 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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 Fluegge - initial API and implementation
+
+pluginName = CDO Dawn Examples Acore Editor Extension
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/DawnACoreRootEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/DawnACoreRootEditPart.java
new file mode 100644
index 0000000000..1bcd307a98
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/DawnACoreRootEditPart.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.emf.cdo.dawn.synchronize.DawnConflictHelper;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @author Martin Fluegge
+ */
+public class DawnACoreRootEditPart extends ACoreRootEditPart
+{
+
+ // /**
+ // * @generated
+ // */
+ // public final static String MODEL_ID = "Acore"; //$NON-NLS-1$
+ //
+ // /**
+ // * @generated
+ // */
+ // public static final int VISUAL_ID = 1000;
+
+ /**
+ * @generated
+ */
+ public DawnACoreRootEditPart(View view)
+ {
+ super(view);
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Using DawnACoreRootEditPart instead of the original one");
+ }
+
+ @Override
+ protected void removeChild(EditPart child)
+ {
+ if (DawnConflictHelper.isConflicted((EObject)child.getModel()))
+ {
+ return;
+ }
+ super.removeChild(child);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/DawnAcoreEditPartFactory.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/DawnAcoreEditPartFactory.java
new file mode 100644
index 0000000000..de83b927b3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/DawnAcoreEditPartFactory.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+
+public class DawnAcoreEditPartFactory extends AcoreEditPartFactory
+{
+ public DawnAcoreEditPartFactory()
+ {
+ super();
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Using DawnAcoreEditPartFactory instead of the original one");
+ }
+
+ @Override
+ public EditPart createEditPart(EditPart context, Object model)
+ {
+ if (model instanceof View)
+ {
+ View view = (View)model;
+ switch (AcoreVisualIDRegistry.getVisualID(view))
+ {
+ case DawnACoreRootEditPart.VISUAL_ID:
+ return new DawnACoreRootEditPart(view);
+ }
+ }
+
+ return super.createEditPart(context, model);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/DawnACoreRootCanonicalEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/DawnACoreRootCanonicalEditPolicy.java
new file mode 100644
index 0000000000..f1011b2eb6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/DawnACoreRootCanonicalEditPolicy.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+
+/**
+ * @author Martin Fluegge
+ */
+public class DawnACoreRootCanonicalEditPolicy extends ACoreRootCanonicalEditPolicy
+{
+
+ public DawnACoreRootCanonicalEditPolicy()
+ {
+ super();
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Running DawnAcoreCanonicalEditPolicy instead of original one");
+ }
+
+ // @Override
+ // protected List getSemanticChildrenList()
+ // {
+ // List semanticChildren = super.getSemanticChildrenList();
+ // List<View> viewChildren = getViewChildren();
+ //
+ // //remove all semantic children that do not have a view because the have one in another resource,
+ // //or the child should not have one
+ // semanticChildren.removeAll(cleanCanonicalSemanticChildren(viewChildren, semanticChildren));
+ // return semanticChildren;
+ // }
+
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // public 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);
+ // }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreCreationWizard.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreCreationWizard.java
new file mode 100644
index 0000000000..21bd369a14
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreCreationWizard.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
+import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewDiagramResourceWizardPage;
+import org.eclipse.emf.cdo.dawn.ui.wizards.DawnCreateNewResourceWizardPage;
+import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * @author Martin Fluegge
+ */
+public class DawnAcoreCreationWizard extends AcoreCreationWizard
+{
+ private CDOView view;
+
+ private DawnCreateNewDiagramResourceWizardPage dawnDiagramModelFilePage;
+
+ private DawnCreateNewResourceWizardPage dawnDomainModelFilePage;
+
+ public DawnAcoreCreationWizard()
+ {
+ super();
+ // CDOConnectionUtil.instance.init("repo1", "tcp", "localhost");
+ CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
+ PreferenceConstants.getServerName());
+ CDOSession session = CDOConnectionUtil.instance.openSession();
+ view = CDOConnectionUtil.instance.openView(session);
+ }
+
+ @Override
+ public boolean performFinish()
+ {
+ AcoreDiagramEditorPlugin.getInstance().logInfo(
+ "Notational Model: " + dawnDiagramModelFilePage.getURI().lastSegment());
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Notational Model URI: " + dawnDiagramModelFilePage.getURI());
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Domain Model: " + dawnDomainModelFilePage.getURI().lastSegment());
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Domain Model URI: " + dawnDomainModelFilePage.getURI());
+ IRunnableWithProgress op = new WorkspaceModifyOperation(null)
+ {
+ @Override
+ protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException
+ {
+ URI diagramResourceURI = dawnDiagramModelFilePage.getURI();
+ URI domainModelResourceURI = dawnDomainModelFilePage.getURI();
+
+ diagram = DawnAcoreDiagramEditorUtil.createDiagram(diagramResourceURI, domainModelResourceURI, monitor);
+
+ if (isOpenNewlyCreatedDiagramEditor() && diagram != null)
+ {
+ try
+ {
+ DawnAcoreDiagramEditorUtil.openDiagram(diagram);
+ }
+ catch (PartInitException e)
+ {
+ ErrorDialog.openError(getContainer().getShell(), Messages.AcoreCreationWizardOpenEditorError, 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.AcoreCreationWizardCreationError, null,
+ ((CoreException)e.getTargetException()).getStatus());
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
+ }
+ return false;
+ }
+ return diagram != null;
+ }
+
+ @Override
+ public void addPages()
+ {
+ dawnDiagramModelFilePage = new DawnCreateNewDiagramResourceWizardPage("acore_diagram", false, view);
+ dawnDiagramModelFilePage.setTitle(Messages.AcoreCreationWizard_DiagramModelFilePageTitle);
+ dawnDiagramModelFilePage.setDescription(Messages.AcoreCreationWizard_DiagramModelFilePageDescription);
+ dawnDiagramModelFilePage.setCreateAutomaticResourceName(true);
+ addPage(dawnDiagramModelFilePage);
+
+ dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("", true, view)
+ {
+ @Override
+ public void setVisible(boolean visible)
+ {
+ if (visible)
+ {
+ URI uri = dawnDiagramModelFilePage.getURI();
+ String fileName = uri.lastSegment();
+ fileName = fileName.substring(0, fileName.length() - ".acore_diagram".length()); //$NON-NLS-1$
+ fileName += ".acore";
+ dawnDomainModelFilePage.setResourceNamePrefix(fileName);
+ dawnDomainModelFilePage.setResourcePath(dawnDiagramModelFilePage.getResourcePath());
+ }
+ super.setVisible(visible);
+ }
+ };
+ dawnDomainModelFilePage.setTitle(Messages.AcoreCreationWizard_DomainModelFilePageTitle);
+ dawnDomainModelFilePage.setDescription(Messages.AcoreCreationWizard_DomainModelFilePageDescription);
+
+ // allows to connect to an existing resource
+ dawnDomainModelFilePage.setResourceValidationType(DawnCreateNewResourceWizardPage.VALIDATION_WARN);
+ addPage(dawnDomainModelFilePage);
+ }
+
+ @Override
+ public void dispose()
+ {
+ view.close();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDiagramEditor.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDiagramEditor.java
new file mode 100644
index 0000000000..4b395417a7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDiagramEditor.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.emf.cdo.dawn.diagram.part.IDawnDiagramEditor;
+import org.eclipse.emf.cdo.dawn.notifications.DawnNotificationUtil;
+import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.ui.CDOEditorInput;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.net4j.util.transaction.TransactionException;
+
+import org.eclipse.emf.common.ui.URIEditorInput;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+
+/**
+ * @author Martin Fluegge
+ */
+public class DawnAcoreDiagramEditor extends AcoreDiagramEditor implements IDawnDiagramEditor
+{
+
+ private CDOTransaction transaction;
+
+ private boolean dirty;
+
+ public static String ID = "org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.DawnAcoreDiagramEditor";
+
+ public DawnAcoreDiagramEditor()
+ {
+ super();
+ AcoreDiagramEditorPlugin.getInstance().logInfo("CDO Editor ist starting");
+ setDocumentProvider(new DawnAcoreDocumentProvider());
+ }
+
+ @Override
+ public void setInput(IEditorInput input)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Setting input for DawnAcoreDiagramEditor (" + input + ")");
+
+ 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());
+ }
+ transaction = (CDOTransaction)((DawnEditorInput)input).getView();
+
+ DawnNotificationUtil.registerResourceListeners(getEditingDomain().getResourceSet(), this);
+ DawnNotificationUtil.registerTransactionListeners(transaction, this);
+ DawnNotificationUtil.setChangeSubscriptionPolicy(transaction);
+ }
+
+ @Override
+ protected void initializeGraphicalViewer()
+ {
+ super.initializeGraphicalViewer();
+ }
+
+ @Override
+ public void doSave(IProgressMonitor monitor)
+ {
+ try
+ {
+ dirty = false;
+ updateState(getEditorInput());
+ validateState(getEditorInput());
+ performSave(false, monitor);
+ }
+ catch (TransactionException e)
+ {
+ if (e.getMessage().contains("conflict"))
+ {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), "conflict",
+ "Your Resource is in conflict and cannot be committed");
+ }
+ else
+ {
+ throw e;
+ }
+ }
+ }
+
+ @Override
+ public boolean isDirty()
+ {
+ // return super.isDirty() | transaction.isDirty();
+ // return transaction.isDirty();
+ // return super.isDirty() ;
+ return dirty;
+ }
+
+ public String getContributorID()
+ {
+ return null;
+ }
+
+ /**
+ * Have to override this method to change the the DocuemtnProvider behavior.
+ */
+ @Override
+ protected void setDocumentProvider(IEditorInput input)
+ {
+ if (input instanceof IFileEditorInput || input instanceof URIEditorInput || input instanceof CDOEditorInput)
+ {
+ setDocumentProvider(getDocumentProvider());
+ }
+ else
+ {
+ super.setDocumentProvider(input);
+ }
+ }
+
+ @Override
+ public void dispose()
+ {
+ try
+ {
+ super.dispose();
+ }
+ finally
+ {
+ if (transaction != null && !transaction.isClosed())
+ {
+ transaction.close();
+ }
+ }
+ }
+
+ public CDOView getView()
+ {
+ // TODO Auto-generated method stub
+ return transaction;
+ }
+
+ public void setDirty()
+ {
+ dirty = true;
+ ((AbstractDocumentProvider)getDocumentProvider()).changed(getEditorInput());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDiagramEditorUtil.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDiagramEditorUtil.java
new file mode 100644
index 0000000000..204afea424
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDiagramEditorUtil.java
@@ -0,0 +1,390 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.emf.cdo.dawn.commands.CreateSemanticResourceRecordingCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.DawnACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.preferences.PreferenceConstants;
+import org.eclipse.emf.cdo.dawn.transaction.DawnGMFEditingDomainFactory;
+import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
+import org.eclipse.emf.cdo.dawn.util.connection.CDOConnectionUtil;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+
+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.emf.workspace.util.WorkspaceSynchronizer;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.OperationHistoryFactory;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+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 java.io.IOException;
+import java.util.Collections;
+
+/**
+ * @author Martin Fluegge
+ */
+public class DawnAcoreDiagramEditorUtil extends AcoreDiagramEditorUtil
+{
+
+ // static CDOSession session;
+
+ /**
+ * @generated
+ */
+ public static boolean openDiagram(Resource diagram) throws PartInitException
+ {
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ return null != page.openEditor(new DawnEditorInput(diagram.getURI()), DawnAcoreDiagramEditor.ID);
+ }
+
+ /**
+ * Runs the wizard in a dialog.
+ *
+ * @generated
+ */
+ public static void runWizard(Shell shell, Wizard wizard, String settingsKey)
+ {
+ IDialogSettings pluginDialogSettings = AcoreDiagramEditorPlugin.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();
+ }
+
+ public static Resource createDiagram(URI diagramURI, URI modelURI, IProgressMonitor progressMonitor)
+ {
+ TransactionalEditingDomain editingDomain = DawnGMFEditingDomainFactory.getInstance().createEditingDomain();
+
+ progressMonitor.beginTask(Messages.AcoreDiagramEditorUtil_CreateDiagramProgressTask, 3);
+
+ CDOConnectionUtil.instance.init(PreferenceConstants.getRepositoryName(), PreferenceConstants.getProtocol(),
+ PreferenceConstants.getServerName());
+ CDOConnectionUtil.instance.openSession();
+ ResourceSet resourceSet = editingDomain.getResourceSet();
+
+ AcoreDiagramEditorPlugin.getInstance().logInfo("URI toString: " + diagramURI.toString());
+ AcoreDiagramEditorPlugin.getInstance().logInfo("URI authority: " + diagramURI.authority());
+
+ CDOTransaction transaction = CDOConnectionUtil.instance.openCurrentTransaction(resourceSet, diagramURI.toString());
+
+ final Resource diagramResource = resourceSet.createResource(diagramURI);
+
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Diagram URI: " + diagramURI);
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Diagram Resource: " + diagramResource);
+
+ CreateSemanticResourceRecordingCommand createSemanticResourceCommand = new CreateSemanticResourceRecordingCommand(
+ editingDomain, transaction, modelURI.toString());
+
+ editingDomain.getCommandStack().execute(createSemanticResourceCommand);
+ final Resource modelResource = createSemanticResourceCommand.getResource();
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Model URI: " + modelURI);
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Model Resource: " + modelResource);
+
+ final String diagramName = diagramURI.lastSegment();
+ AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,
+ Messages.AcoreDiagramEditorUtil_CreateDiagramCommandLabel, Collections.EMPTY_LIST)
+ {
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ EObject model = null;
+ if (modelResource.getContents().size() > 0)
+ {
+ model = modelResource.getContents().get(0);
+ }
+ else
+ {
+ model = createInitialModel();
+ attachModelToResource(model, modelResource);
+ }
+
+ Diagram diagram = ViewService.createDiagram(model, DawnACoreRootEditPart.MODEL_ID,
+ AcoreDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ if (diagram != null)
+ {
+ diagramResource.getContents().add(diagram);
+ diagram.setName(diagramName);
+ diagram.setElement(model);
+ }
+
+ try
+ {
+ modelResource.save(Collections.EMPTY_MAP);
+ diagramResource.save(Collections.EMPTY_MAP);
+ }
+ catch (IOException e)
+ {
+ AcoreDiagramEditorPlugin.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)
+ {
+ AcoreDiagramEditorPlugin.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 EObject createInitialModel()
+ {
+ return AcoreFactory.eINSTANCE.createACoreRoot();
+ }
+
+ /**
+ * Store model element in the resource. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static void attachModelToResource(EObject model, Resource resource)
+ {
+ resource.getContents().add(model);
+ }
+
+ // /**
+ // * @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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDocumentProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDocumentProvider.java
new file mode 100644
index 0000000000..d270712868
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreDocumentProvider.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.emf.cdo.dawn.transaction.DawnDiagramEditingDomainFactory;
+import org.eclipse.emf.cdo.dawn.ui.DawnEditorInput;
+import org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+
+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.transaction.NotificationFilter;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+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.IDocument;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil;
+import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * @author Martin Fluegge
+ */
+@SuppressWarnings("restriction")
+public class DawnAcoreDocumentProvider extends AcoreDocumentProvider
+{
+
+ public DawnAcoreDocumentProvider()
+ {
+ super();
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Using DawnAcoreDocumentProvider instead of the original one");
+ }
+
+ /**
+ * override to change creation of editingdomain
+ */
+ @Override
+ protected IDocument createEmptyDocument()
+ {
+ DiagramDocument document = new DiagramDocument();
+ document.setEditingDomain(createEditingDomain());
+ return document;
+ }
+
+ /**
+ * override to change the EditingDomain
+ */
+ private TransactionalEditingDomain createEditingDomain()
+ {
+ TransactionalEditingDomain editingDomain = DawnDiagramEditingDomainFactory.getInstance().createEditingDomain();
+ editingDomain.setID("org.eclipse.emf.cdo.dawn.examples.acore.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;
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ @Override
+ protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException
+ {
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Editor Input: " + element.getName());
+
+ 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)
+ {
+ URIEditorInput editorInput = (URIEditorInput)element;
+
+ URI uri = editorInput.getURI();
+ Resource resource = null;
+ try
+ {
+ // TODO change this fake!!
+ URI dawnURI = URI.createURI(uri.toString().replace("cdo", "dawn"));
+ resource = domain.getResourceSet().getResource(dawnURI, false);
+ if (resource == null)
+ {
+ // TODO clarify with Eike why here a transaction will be opended??
+ resource = domain.getResourceSet().getResource(dawnURI, true);
+ }
+
+ if (editorInput instanceof DawnEditorInput)
+ {
+ ((DawnEditorInput)editorInput).setResource((CDOResource)resource);
+ }
+ if (!resource.isLoaded())
+ {
+ try
+ {
+ Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
+ resource.load(options);
+ }
+ catch (IOException e)
+ {
+ resource.unload();
+ throw e;
+ }
+ }
+ if (uri.fragment() != null)
+ {
+ EObject rootElement = resource.getEObject(uri.fragment());
+ if (rootElement instanceof Diagram)
+ {
+ Diagram diagram = (Diagram)rootElement;
+ DawnDiagramUpdater.initializeElement(diagram);
+ document.setContent(diagram);
+
+ return;
+ }
+ }
+ else
+ {
+ for (Iterator<?> it = resource.getContents().iterator(); it.hasNext();)
+ {
+ Object rootElement = it.next();
+ if (rootElement instanceof Diagram)
+ {
+ Diagram diagram = (Diagram)rootElement;
+ DawnDiagramUpdater.initializeElement(diagram);
+ document.setContent(diagram);
+
+ return;
+ }
+ }
+ }
+ throw new RuntimeException(Messages.AcoreDocumentProvider_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, AcoreDiagramEditorPlugin.ID, 0, msg != null ? msg
+ : Messages.AcoreDocumentProvider_DiagramLoadingError, e));
+ }
+ throw thrownExcp;
+ }
+ }
+ else
+ {
+ throw new CoreException(new Status(IStatus.ERROR, AcoreDiagramEditorPlugin.ID, 0, NLS.bind(
+ Messages.AcoreDocumentProvider_IncorrectInputError, new Object[] { element,
+ "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ null));
+ }
+ }
+
+ @Override
+ public void changed(Object element)
+ {
+ if (element instanceof IEditorInput)
+ {
+ fireElementDirtyStateChanged(element, true);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/DawnAcoreEditPartProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/DawnAcoreEditPartProvider.java
new file mode 100644
index 0000000000..b772872491
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/DawnAcoreEditPartProvider.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.DawnAcoreEditPartFactory;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+
+/**
+ * @author Martin Fluegge
+ */
+public class DawnAcoreEditPartProvider extends AcoreEditPartProvider
+{
+ /**
+ * This class is currently not needed because the change of the EditPolicy is done by changing the EditPart but by
+ * using an own EditPartPolicyProvider. The class is left to have the chance to influence the behavior of the
+ * EditParts from the generated fragment.
+ */
+ public DawnAcoreEditPartProvider()
+ {
+ super();
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Using DawnAcoreEditPartProvider instead of the original one.");
+ setFactory(new DawnAcoreEditPartFactory());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/DawnAcoreEditPolicyProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/DawnAcoreEditPolicyProvider.java
new file mode 100644
index 0000000000..521f9e294e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/DawnAcoreEditPolicyProvider.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.DawnACoreRootCanonicalEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+
+/**
+ * @author Martin Fluegge
+ */
+public class DawnAcoreEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider
+{
+ public static String ID = "org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.DawnAcoreEditPolicyProvider";
+
+ public boolean provides(IOperation operation)
+ {
+ if (operation instanceof CreateEditPoliciesOperation)
+ {
+ CreateEditPoliciesOperation editPoliciesOperation = (CreateEditPoliciesOperation)operation;
+ if (editPoliciesOperation.getEditPart() instanceof ACoreRootEditPart)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void createEditPolicies(EditPart editPart)
+ {
+ if (editPart instanceof ACoreRootEditPart)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logInfo("Overwriting CANONICAL EDITING POLICY in " + editPart);
+ editPart.installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new DawnACoreRootCanonicalEditPolicy());
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.classpath b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.classpath
@@ -0,0 +1,7 @@
+<?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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.options b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.options
new file mode 100644
index 0000000000..ded22b4370
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.options
@@ -0,0 +1,7 @@
+# Tracing options for the org.eclipse.emf.cdo.dawn.examples.acore.diagram plug-in
+
+# Common issues
+org.eclipse.emf.cdo.dawn.examples.acore.diagram/debug=false
+
+# Visual IDs
+org.eclipse.emf.cdo.dawn.examples.acore.diagram/debug/visualID=false
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.project b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.project
new file mode 100644
index 0000000000..baf08eb51b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.dawn.examples.acore.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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..73fe0bd48b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Sat Jun 05 21:13:40 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..e96020a08c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/META-INF/MANIFEST.MF
@@ -0,0 +1,40 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.cdo.dawn.examples.acore.diagram; singleton:=true
+Bundle-Version: 0.2.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts,
+ org.eclipse.emf.cdo.dawn.examples.acore.diagram.part,
+ org.eclipse.emf.cdo.dawn.examples.acore.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.draw2d;visibility:=reexport,
+ org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
+ org.eclipse.emf.cdo.dawn.examples.acore;visibility:=reexport,
+ org.eclipse.emf.cdo.dawn.examples.acore.edit;visibility:=reexport,
+ org.eclipse.gef;visibility:=reexport
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/build.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/build.properties
new file mode 100644
index 0000000000..162d13adf7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/build.properties
@@ -0,0 +1,10 @@
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ messages.properties,\
+ .options
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/incomingLinksNavigatorGroup.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/incomingLinksNavigatorGroup.gif
new file mode 100644
index 0000000000..fca9c53e62
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/incomingLinksNavigatorGroup.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linkSourceNavigatorGroup.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linkSourceNavigatorGroup.gif
new file mode 100644
index 0000000000..fca9c53e62
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linkSourceNavigatorGroup.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linkTargetNavigatorGroup.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linkTargetNavigatorGroup.gif
new file mode 100644
index 0000000000..fca9c53e62
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linkTargetNavigatorGroup.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linksNavigatorGroup.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linksNavigatorGroup.gif
new file mode 100644
index 0000000000..fca9c53e62
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/linksNavigatorGroup.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/obj16/AcoreDiagramFile.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/obj16/AcoreDiagramFile.gif
new file mode 100644
index 0000000000..043fc30550
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/obj16/AcoreDiagramFile.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/outgoingLinksNavigatorGroup.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/outgoingLinksNavigatorGroup.gif
new file mode 100644
index 0000000000..fca9c53e62
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/outgoingLinksNavigatorGroup.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/wizban/NewAcoreWizard.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/wizban/NewAcoreWizard.gif
new file mode 100644
index 0000000000..38e746ff3c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/icons/wizban/NewAcoreWizard.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/messages.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/messages.properties
new file mode 100644
index 0000000000..32781b6ffe
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/messages.properties
@@ -0,0 +1,94 @@
+
+# TODO: manually put keys and values
+AcoreCreationWizardTitle=New Acore Diagram
+AcoreCreationWizard_DiagramModelFilePageTitle=Create Acore Diagram
+AcoreCreationWizard_DiagramModelFilePageDescription=Select file that will contain diagram model.
+AcoreCreationWizard_DomainModelFilePageTitle=Create Acore Domain Model
+AcoreCreationWizard_DomainModelFilePageDescription=Select file that will contain domain model.
+AcoreCreationWizardOpenEditorError=Error opening diagram editor
+AcoreCreationWizardCreationError=Creation Problems
+AcoreCreationWizardPageExtensionError=File name should have {0} extension.
+AcoreDiagramEditorUtil_OpenModelResourceErrorDialogTitle=Error
+AcoreDiagramEditorUtil_OpenModelResourceErrorDialogMessage=Failed to load model file {0}
+AcoreDiagramEditorUtil_CreateDiagramProgressTask=Creating diagram and model files
+AcoreDiagramEditorUtil_CreateDiagramCommandLabel=Creating diagram and model
+AcoreDocumentProvider_isModifiable=Updating cache failed
+AcoreDocumentProvider_handleElementContentChanged=Failed to refresh hierarchy for changed resource
+AcoreDocumentProvider_IncorrectInputError={1}
+AcoreDocumentProvider_NoDiagramInResourceError=Diagram is not present in resource
+AcoreDocumentProvider_DiagramLoadingError=Error loading diagram
+AcoreDocumentProvider_UnsynchronizedFileSaveError=The file has been changed on the file system
+AcoreDocumentProvider_SaveDiagramTask=Saving diagram
+AcoreDocumentProvider_SaveNextResourceTask=Saving {0}
+AcoreDocumentProvider_SaveAsOperation=Saving {0} diagram as
+InitDiagramFile_ResourceErrorDialogTitle=Error
+InitDiagramFile_ResourceErrorDialogMessage=Model file loading failed
+InitDiagramFile_WizardTitle=Initialize new {0} diagram file
+InitDiagramFile_OpenModelFileDialogTitle=Select domain model
+AcoreNewDiagramFileWizard_CreationPageName=Initialize new diagram file
+AcoreNewDiagramFileWizard_CreationPageTitle=Diagram file
+AcoreNewDiagramFileWizard_CreationPageDescription=Create new diagram based on {0} model content
+AcoreNewDiagramFileWizard_RootSelectionPageName=Select diagram root element
+AcoreNewDiagramFileWizard_RootSelectionPageTitle=Diagram root element
+AcoreNewDiagramFileWizard_RootSelectionPageDescription=Select semantic model element to be depicted on diagram
+AcoreNewDiagramFileWizard_RootSelectionPageSelectionTitle=Select diagram root element:
+AcoreNewDiagramFileWizard_RootSelectionPageNoSelectionMessage=Diagram root element is not selected
+AcoreNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage=Invalid diagram root element is selected
+AcoreNewDiagramFileWizard_InitDiagramCommand=Initializing diagram contents
+AcoreNewDiagramFileWizard_IncorrectRootError=Incorrect model object stored as a root resource object
+AcoreDiagramEditor_SavingDeletedFile=The original file "{0}" has been deleted.
+AcoreDiagramEditor_SaveAsErrorTitle=Problem During Save As...
+AcoreDiagramEditor_SaveAsErrorMessage=Save could not be completed. Target file is already open in another editor.
+AcoreDiagramEditor_SaveErrorTitle=Save Problems
+AcoreDiagramEditor_SaveErrorMessage=Could not save file.
+AcoreElementChooserDialog_SelectModelElementTitle=Select model element
+ModelElementSelectionPageMessage=Select model element:
+ValidateActionMessage=Validate
+Node1Group_title=Node
+Connections2Group_title=Connections
+AClass1CreationTool_title=AClass
+AClass1CreationTool_desc=Create new AClass
+AInterface2CreationTool_title=AInterface
+AInterface2CreationTool_desc=Create new AInterface
+AAttribute3CreationTool_title=AAttribute
+AAttribute3CreationTool_desc=Create an Attribute
+AOperation4CreationTool_title=AOperation
+AOperation4CreationTool_desc=Create an Operation
+Inherits1CreationTool_title=inherits
+Inherits1CreationTool_desc=Create new AClassSubClasses
+Implements2CreationTool_title=implements
+Implements2CreationTool_desc=Create new AClassImplementedInterfaces
+Association3CreationTool_title=association
+Association3CreationTool_desc=Create new AClassSubClasses
+Aggregation4CreationTool_title=aggregation
+Aggregation4CreationTool_desc=Create new AClassSubClasses
+Composition5CreationTool_title=composition
+Composition5CreationTool_desc=Create new AClassSubClasses
+AInterfaceAAttributeInterfaceCompartmentEditPart_title=AAttributeInterfaceCompartment
+AInterfaceAOperationInterfaceCompartmentEditPart_title=AOperationInterfaceCompartment
+AClassAAttributeCompartmentEditPart_title=AAttributeCompartment
+AClassAOperationClassCompartmentEditPart_title=AOperationClassCompartment
+
+CommandName_OpenDiagram=Open Diagram
+NavigatorGroupName_AClassSubClasses_4001_target=target
+NavigatorGroupName_AClassSubClasses_4001_source=source
+NavigatorGroupName_AClassCompositions_4005_target=target
+NavigatorGroupName_AClassCompositions_4005_source=source
+NavigatorGroupName_AInterface_2001_incominglinks=incoming links
+NavigatorGroupName_AClassAggregations_4004_target=target
+NavigatorGroupName_AClassAggregations_4004_source=source
+NavigatorGroupName_AClassImplementedInterfaces_4002_target=target
+NavigatorGroupName_AClassImplementedInterfaces_4002_source=source
+NavigatorGroupName_AClass_2002_incominglinks=incoming links
+NavigatorGroupName_AClass_2002_outgoinglinks=outgoing links
+NavigatorGroupName_ACoreRoot_1000_links=links
+NavigatorGroupName_AClassAssociations_4003_target=target
+NavigatorGroupName_AClassAssociations_4003_source=source
+NavigatorActionProvider_OpenDiagramActionName=Open Diagram
+AbstractParser_UnexpectedValueType=Value of type {0} is expected
+AbstractParser_WrongStringConversion=String value does not convert to {0} value
+AbstractParser_UnknownLiteral=Unknown literal: {0}
+
+MessageFormatParser_InvalidInputError=Invalid input at {0}
+AcoreModelingAssistantProviderTitle=Select domain model element
+AcoreModelingAssistantProviderMessage=Available domain model elements:
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/plugin.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/plugin.properties
new file mode 100644
index 0000000000..f598fc4bad
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/plugin.properties
@@ -0,0 +1,49 @@
+pluginName=Acore Plugin
+providerName=Sample Plugin Provider, Inc
+
+editorName=Acore Diagram Editing
+context.description=Acore Diagram Editing
+context.name=In Acore Diagram Editor
+newWizardName=Acore Diagram
+newWizardDesc=Creates Acore diagram.
+
+initDiagramActionLabel=Initialize acore_diagram diagram file
+
+
+navigatorContentName=*.acore_diagram diagram contents
+domainNavigatorContentName=*.acore model contents
+update.diagram.name=Update Acore diagram
+update.diagram.description=Perform Acore diagram update
+
+
+# Property Sheet
+tab.appearance=Appearance
+tab.diagram=Rulers & Grid
+tab.domain=Core
+
+# Preferences
+prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.general=Acore Diagram
+prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.appearance=Appearance
+prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.connections=Connections
+prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.printing=Printing
+prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.rulersAndGrid=Rulers And Grid
+
+
+# Providers
+metatype.name.ACoreRoot_1000=Undefined
+metatype.name.AInterface_2001=AInterface
+metatype.name.AClass_2002=AClass
+metatype.name.AAttribute_3001=AAttribute
+metatype.name.AOperation_3002=AOperation
+metatype.name.AAttribute_3003=AAttribute
+metatype.name.AOperation_3004=AOperation
+metatype.name.AClassSubClasses_4001=Undefined
+metatype.name.AClassImplementedInterfaces_4002=Undefined
+metatype.name.AClassAssociations_4003=Undefined
+metatype.name.AClassAggregations_4004=Undefined
+metatype.name.AClassCompositions_4005=Undefined
+
+# Commands and menu actions
+cmdcategory.name=Acore Editor Commands
+cmdcategory.desc=Acore Editor Commands
+
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/plugin.xml b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/plugin.xml
new file mode 100644
index 0000000000..bd80742217
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/plugin.xml
@@ -0,0 +1,588 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<!--
+Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+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 Fluegge - initial API and implementation
+
+-->
+<plugin>
+
+ <extension point="org.eclipse.team.core.fileTypes" id="repo-ftype">
+ <?gmfgen generated="true"?>
+ <fileTypes type="text" extension="acore_diagram"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser" id="resource-factory">
+ <?gmfgen generated="true"?>
+ <parser
+ type="acore_diagram"
+ class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory">
+ </parser>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors" id="gmf-editor">
+ <?gmfgen generated="true"?>
+ <editor
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorID"
+ name="%editorName"
+ icon="icons/obj16/AcoreDiagramFile.gif"
+ extensions="acore_diagram"
+ default="true"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditor"
+ matchingStrategy="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreMatchingStrategy"
+ contributorClass="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramActionBarContributor">
+ </editor>
+ </extension>
+
+ <extension point="org.eclipse.ui.contexts" id="ui-context">
+ <?gmfgen generated="true"?>
+ <context
+ description="%context.description"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.ui.diagramContext"
+ name="%context.name"
+ parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
+ </context>
+ </extension>
+
+ <extension point="org.eclipse.ui.newWizards" id="creation-wizard">
+ <?gmfgen generated="true"?>
+ <wizard
+ name="%newWizardName"
+ icon="icons/obj16/AcoreDiagramFile.gif"
+ category="org.eclipse.ui.Examples"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreCreationWizard"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreCreationWizardID">
+ <description>%newWizardDesc</description>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.popupMenus" id="init-diagram-action">
+ <?gmfgen generated="true"?>
+ <objectContribution
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.InitDiagram"
+ nameFilter="*.acore"
+ objectClass="org.eclipse.core.resources.IFile">
+ <action
+ label="%initDiagramActionLabel"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreInitDiagramFileAction"
+ menubarPath="additions"
+ enablesFor="1"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.InitDiagramAction">
+ </action>
+ </objectContribution>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders" id="global-actions">
+ <?gmfgen generated="true"?>
+ <GlobalActionHandlerProvider
+ class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandlerProvider"
+ id="AcorePresentation">
+ <Priority name="Lowest"/>
+ <ViewId id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorID">
+ <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="AcorePresentationIDE">
+ <Priority name="Lowest"/>
+ <ViewId id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorID">
+ <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="AcoreRender">
+ <Priority name="Lowest"/>
+ <ViewId id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorID">
+ <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.core.runtime.preferences" id="prefs">
+ <?gmfgen generated="true"?>
+ <initializer class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences.DiagramPreferenceInitializer"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.preferencePages" id="prefpages">
+ <?gmfgen generated="true"?>
+ <page
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
+ name="%prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences.DiagramGeneralPreferencePage">
+ </page>
+ <page
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.appearance"
+ name="%prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.appearance"
+ category="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences.DiagramAppearancePreferencePage">
+ </page>
+ <page
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.connections"
+ name="%prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.connections"
+ category="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences.DiagramConnectionsPreferencePage">
+ </page>
+ <page
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.printing"
+ name="%prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.printing"
+ category="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences.DiagramPrintingPreferencePage">
+ </page>
+ <page
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.rulersAndGrid"
+ name="%prefpage.org.eclipse.emf.cdo.dawn.examples.acore.diagram.rulersAndGrid"
+ category="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences.DiagramRulersAndGridPreferencePage">
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
+ <?gmfgen generated="true"?>
+ <propertyContributor
+ contributorId="org.eclipse.emf.cdo.dawn.examples.acore.diagram"
+ labelProvider="org.eclipse.emf.cdo.dawn.examples.acore.diagram.sheet.AcoreSheetLabelProvider">
+ <propertyCategory category="domain"/>
+ <propertyCategory category="visual"/>
+ <propertyCategory category="extra"/>
+ </propertyContributor>
+ </extension>
+
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
+ <?gmfgen generated="true"?>
+ <propertyTabs contributorId="org.eclipse.emf.cdo.dawn.examples.acore.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" id="propsections">
+ <?gmfgen generated="true"?>
+ <propertySections contributorId="org.eclipse.emf.cdo.dawn.examples.acore.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.emf.cdo.dawn.examples.acore.diagram.sheet.AcorePropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ <input type="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreAbstractNavigatorItem"/>
+ </propertySection>
+ </propertySections>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
+ <?gmfgen generated="true"?>
+ <viewProvider class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="Acore"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2001,2002,3001,3002,3003,3004"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4001,4002,4003,4004,4005"/>
+ </viewProvider>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
+ <?gmfgen generated="true"?>
+ <editpartProvider class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreEditPartProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
+ <method name="getType()" value="Acore"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
+ <method name="getType()" value="2001,2002,3001,3002,3003,3004"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
+ <method name="getType()" value="4001,4002,4003,4004,4005"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
+ <method name="getType()" value="5001,5002"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
+ <method name="getType()" value="7001,7002,7003,7004"/>
+ </object>
+ <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
+ </editpartProvider>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders" id="modelassist-provider">
+ <?gmfgen generated="true"?>
+ <modelingAssistantProvider class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreModelingAssistantProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart" id="ACoreRoot_1000"/>
+ <object class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart" id="AInterface_2001"/>
+ <object class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart" id="AClass_2002"/>
+ <context elements="ACoreRoot_1000,AInterface_2001,AClass_2002"/>
+ </modelingAssistantProvider>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
+ <?gmfgen generated="true"?>
+ <IconProvider class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreIconProvider">
+ <Priority name="Low"/>
+ </IconProvider>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreParserProvider">
+ <Priority name="Lowest"/>
+ </ParserProvider>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <metamodelType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.ACoreRoot_1000"
+ name="%metatype.name.ACoreRoot_1000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ACoreRoot"
+ edithelper="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers.ACoreRootEditHelper">
+ <param name="semanticHint" value="1000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <metamodelType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AInterface_2001"
+ name="%metatype.name.AInterface_2001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="AInterface"
+ edithelper="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers.AInterfaceEditHelper">
+ <param name="semanticHint" value="2001"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <metamodelType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClass_2002"
+ name="%metatype.name.AClass_2002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="AClass"
+ edithelper="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers.AClassEditHelper">
+ <param name="semanticHint" value="2002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <metamodelType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AAttribute_3001"
+ name="%metatype.name.AAttribute_3001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="AAttribute"
+ edithelper="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers.AAttributeEditHelper">
+ <param name="semanticHint" value="3001"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <metamodelType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AOperation_3002"
+ name="%metatype.name.AOperation_3002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="AOperation"
+ edithelper="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers.AOperationEditHelper">
+ <param name="semanticHint" value="3002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <specializationType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AAttribute_3003"
+ name="%metatype.name.AAttribute_3003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AAttribute_3001"/>
+ <param name="semanticHint" value="3003"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <specializationType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AOperation_3004"
+ name="%metatype.name.AOperation_3004"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AOperation_3002"/>
+ <param name="semanticHint" value="3004"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <specializationType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassSubClasses_4001"
+ name="%metatype.name.AClassSubClasses_4001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4001"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <specializationType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassImplementedInterfaces_4002"
+ name="%metatype.name.AClassImplementedInterfaces_4002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4002"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <specializationType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassAssociations_4003"
+ name="%metatype.name.AClassAssociations_4003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4003"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <specializationType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassAggregations_4004"
+ name="%metatype.name.AClassAggregations_4004"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4004"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore">
+ <specializationType
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassCompositions_4005"
+ name="%metatype.name.AClassCompositions_4005"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4005"/>
+ </specializationType>
+ </metamodel>
+ </extension>
+
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
+ <?gmfgen generated="true"?>
+ <clientContext id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.TypeContext">
+ <enablement>
+ <test
+ property="org.eclipse.gmf.runtime.emf.core.editingDomain"
+ value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.EditingDomain"/>
+ </enablement>
+ </clientContext>
+ <binding context="org.eclipse.emf.cdo.dawn.examples.acore.diagram.TypeContext">
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.ACoreRoot_1000"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AInterface_2001"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClass_2002"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AAttribute_3001"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AOperation_3002"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AAttribute_3003"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AOperation_3004"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassSubClasses_4001"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassImplementedInterfaces_4002"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassAssociations_4003"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassAggregations_4004"/>
+ <elementType ref="org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassCompositions_4005"/>
+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ </binding>
+ </extension>
+ <extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
+ <?gmfgen generated="true"?>
+ <propertyTester
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.URIEditorInputPropertyTester"
+ type="org.eclipse.emf.common.ui.URIEditorInput"
+ namespace="org.eclipse.emf.cdo.dawn.examples.acore.diagram"
+ properties="isURIEditorInput"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreUriEditorInputTester">
+ </propertyTester>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
+ <?gmfgen generated="true"?>
+ <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <contentExtension pattern="org.eclipse.emf.cdo.dawn.examples.acore.diagram.resourceContent"/>
+ <contentExtension pattern="org.eclipse.emf.cdo.dawn.examples.acore.diagram.domainResourceContent"/>
+ <contentExtension pattern="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigatorLinkHelper"/>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <actionExtension pattern="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigatorActionProvider"/>
+ </includes>
+ </viewerActionBinding>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
+ <?gmfgen generated="true"?>
+ <navigatorContent
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.resourceContent"
+ name="%navigatorContentName"
+ priority="normal"
+ contentProvider="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorContentProvider"
+ labelProvider="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorLabelProvider"
+ icon="icons/obj16/AcoreDiagramFile.gif"
+ activeByDefault="true">
+ <triggerPoints>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="acore_diagram"/>
+ </and>
+ <instanceof value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreAbstractNavigatorItem"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreAbstractNavigatorItem"/>
+ </or>
+ </possibleChildren>
+ <commonSorter
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigatorSorter"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorSorter">
+ <parentExpression>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="acore_diagram"/>
+ </and>
+ <instanceof value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreAbstractNavigatorItem"/>
+ </or>
+ </parentExpression>
+ </commonSorter>
+ </navigatorContent>
+ <navigatorContent
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.domainResourceContent"
+ name="%domainNavigatorContentName"
+ priority="normal"
+ contentProvider="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorContentProvider"
+ labelProvider="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorLabelProvider"
+ icon="icons/obj16/AcoreDiagramFile.gif"
+ activeByDefault="true">
+ <triggerPoints>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="acore"/>
+ </and>
+ <instanceof value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorItem"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <instanceof value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorItem"/>
+ </possibleChildren>
+ </navigatorContent>
+ <actionProvider
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigatorActionProvider"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorActionProvider">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreAbstractNavigatorItem"/>
+ </or>
+ </enablement>
+ </actionProvider>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
+ <?gmfgen generated="true"?>
+ <linkHelper
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigatorLinkHelper"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorLinkHelper">
+ <editorInputEnablement>
+ <and>
+ <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
+ <test property="org.eclipse.emf.cdo.dawn.examples.acore.diagram.isURIEditorInput"/>
+ </and>
+ </editorInputEnablement>
+ <selectionEnablement>
+ <instanceof value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreAbstractNavigatorItem"/>
+ </selectionEnablement>
+ </linkHelper>
+ </extension>
+ <extension point="org.eclipse.ui.commands" id="update-cmd">
+ <?gmfgen generated="true"?>
+ <command
+ categoryId="org.eclipse.ui.category.edit"
+ defaultHandler="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramUpdateCommand"
+ description="%update.diagram.description"
+ id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.updateDiagram"
+ name="%update.diagram.name"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings" id="update-cmd-binding">
+ <?gmfgen generated="true"?>
+ <key
+ commandId="org.eclipse.emf.cdo.dawn.examples.acore.diagram.updateDiagram"
+ contextId="org.eclipse.emf.cdo.dawn.examples.acore.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F5"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.menus" id="context-menus">
+ <?gmfgen generated="true"?>
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
+ </menuContribution -->
+ <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
+ <command commandId="org.eclipse.emf.cdo.dawn.examples.acore.diagram.LoadResourceAction">
+ <visibleWhen>
+ <and>
+ <with variable="activePartId"><equals value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorID"/></with>
+ <with variable="selection"><iterate ifEmpty="false">
+ <instanceof value="org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart"/>
+ </iterate></with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+ <extension point="org.eclipse.ui.commands" id="menu-commands">
+ <?gmfgen generated="true"?>
+ <category id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+ <command id="org.eclipse.emf.cdo.dawn.examples.acore.diagram.LoadResourceAction"
+ name="Load Resource"
+ categoryId="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorID"
+ defaultHandler="org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.LoadResourceAction"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.handlers" id="menu-handlers">
+ <?gmfgen generated="true"?>
+ </extension>
+
+ <!-- optionally, specify keybindings -->
+</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AAttribute2CreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AAttribute2CreateCommand.java
new file mode 100644
index 0000000000..1b7d24f852
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AAttribute2CreateCommand.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AAttribute;
+import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+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.notation.View;
+
+/**
+ * @generated
+ */
+public class AAttribute2CreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ public AAttribute2CreateCommand(CreateElementRequest req)
+ {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit()
+ {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if (container instanceof View)
+ {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ return true;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ AAttribute newElement = AcoreFactory.eINSTANCE.createAAttribute();
+
+ ABasicClass owner = (ABasicClass)getElementToEdit();
+ owner.getAttributes().add(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(AAttribute newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException
+ {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute())
+ {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AAttributeCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AAttributeCreateCommand.java
new file mode 100644
index 0000000000..ff60d8441e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AAttributeCreateCommand.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AAttribute;
+import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+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.notation.View;
+
+/**
+ * @generated
+ */
+public class AAttributeCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ public AAttributeCreateCommand(CreateElementRequest req)
+ {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit()
+ {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if (container instanceof View)
+ {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ return true;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ AAttribute newElement = AcoreFactory.eINSTANCE.createAAttribute();
+
+ ABasicClass owner = (ABasicClass)getElementToEdit();
+ owner.getAttributes().add(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(AAttribute newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException
+ {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute())
+ {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAggregationsCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAggregationsCreateCommand.java
new file mode 100644
index 0000000000..229259b719
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAggregationsCreateCommand.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassAggregationsCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final EObject source;
+
+ /**
+ * @generated
+ */
+ private final EObject target;
+
+ /**
+ * @generated
+ */
+ public AClassAggregationsCreateCommand(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 && false == source instanceof AClass)
+ {
+ return false;
+ }
+ if (target != null && false == target instanceof AClass)
+ {
+ 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 AcoreBaseItemSemanticEditPolicy.LinkConstraints.canCreateAClassAggregations_4004(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().getAggregations().add(getTarget());
+ }
+ return CommandResult.newOKCommandResult();
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void setElementToEdit(EObject element)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getSource()
+ {
+ return (AClass)source;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getTarget()
+ {
+ return (AClass)target;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAggregationsReorientCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAggregationsReorientCommand.java
new file mode 100644
index 0000000000..c0e2177bbb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAggregationsReorientCommand.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassAggregationsReorientCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject referenceOwner;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public AClassAggregationsReorientCommand(ReorientReferenceRelationshipRequest request)
+ {
+ super(request.getLabel(), null, request);
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ if (false == referenceOwner instanceof AClass)
+ {
+ 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 AClass && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints.canExistAClassAggregations_4004(getNewSource(),
+ getOldTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget()
+ {
+ if (!(oldEnd instanceof AClass && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints.canExistAClassAggregations_4004(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().getAggregations().remove(getOldTarget());
+ getNewSource().getAggregations().add(getOldTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException
+ {
+ getOldSource().getAggregations().remove(getOldTarget());
+ getOldSource().getAggregations().add(getNewTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldSource()
+ {
+ return (AClass)referenceOwner;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewSource()
+ {
+ return (AClass)newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldTarget()
+ {
+ return (AClass)oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewTarget()
+ {
+ return (AClass)newEnd;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAssociationsCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAssociationsCreateCommand.java
new file mode 100644
index 0000000000..4f345f37ee
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAssociationsCreateCommand.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassAssociationsCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final EObject source;
+
+ /**
+ * @generated
+ */
+ private final EObject target;
+
+ /**
+ * @generated
+ */
+ public AClassAssociationsCreateCommand(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 && false == source instanceof AClass)
+ {
+ return false;
+ }
+ if (target != null && false == target instanceof AClass)
+ {
+ 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 AcoreBaseItemSemanticEditPolicy.LinkConstraints.canCreateAClassAssociations_4003(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().getAssociations().add(getTarget());
+ }
+ return CommandResult.newOKCommandResult();
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void setElementToEdit(EObject element)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getSource()
+ {
+ return (AClass)source;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getTarget()
+ {
+ return (AClass)target;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAssociationsReorientCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAssociationsReorientCommand.java
new file mode 100644
index 0000000000..a45ad2f9cf
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassAssociationsReorientCommand.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassAssociationsReorientCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject referenceOwner;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public AClassAssociationsReorientCommand(ReorientReferenceRelationshipRequest request)
+ {
+ super(request.getLabel(), null, request);
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ if (false == referenceOwner instanceof AClass)
+ {
+ 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 AClass && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints.canExistAClassAssociations_4003(getNewSource(),
+ getOldTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget()
+ {
+ if (!(oldEnd instanceof AClass && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints.canExistAClassAssociations_4003(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().getAssociations().remove(getOldTarget());
+ getNewSource().getAssociations().add(getOldTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException
+ {
+ getOldSource().getAssociations().remove(getOldTarget());
+ getOldSource().getAssociations().add(getNewTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldSource()
+ {
+ return (AClass)referenceOwner;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewSource()
+ {
+ return (AClass)newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldTarget()
+ {
+ return (AClass)oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewTarget()
+ {
+ return (AClass)newEnd;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCompositionsCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCompositionsCreateCommand.java
new file mode 100644
index 0000000000..484b1b89a7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCompositionsCreateCommand.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassCompositionsCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final EObject source;
+
+ /**
+ * @generated
+ */
+ private final EObject target;
+
+ /**
+ * @generated
+ */
+ public AClassCompositionsCreateCommand(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 && false == source instanceof AClass)
+ {
+ return false;
+ }
+ if (target != null && false == target instanceof AClass)
+ {
+ 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 AcoreBaseItemSemanticEditPolicy.LinkConstraints.canCreateAClassCompositions_4005(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().getCompositions().add(getTarget());
+ }
+ return CommandResult.newOKCommandResult();
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void setElementToEdit(EObject element)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getSource()
+ {
+ return (AClass)source;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getTarget()
+ {
+ return (AClass)target;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCompositionsReorientCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCompositionsReorientCommand.java
new file mode 100644
index 0000000000..3b7295dfc2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCompositionsReorientCommand.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassCompositionsReorientCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject referenceOwner;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public AClassCompositionsReorientCommand(ReorientReferenceRelationshipRequest request)
+ {
+ super(request.getLabel(), null, request);
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ if (false == referenceOwner instanceof AClass)
+ {
+ 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 AClass && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints.canExistAClassCompositions_4005(getNewSource(),
+ getOldTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget()
+ {
+ if (!(oldEnd instanceof AClass && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints.canExistAClassCompositions_4005(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().getCompositions().remove(getOldTarget());
+ getNewSource().getCompositions().add(getOldTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException
+ {
+ getOldSource().getCompositions().remove(getOldTarget());
+ getOldSource().getCompositions().add(getNewTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldSource()
+ {
+ return (AClass)referenceOwner;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewSource()
+ {
+ return (AClass)newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldTarget()
+ {
+ return (AClass)oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewTarget()
+ {
+ return (AClass)newEnd;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCreateCommand.java
new file mode 100644
index 0000000000..5ab6039916
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassCreateCommand.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+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.notation.View;
+
+/**
+ * @generated
+ */
+public class AClassCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ public AClassCreateCommand(CreateElementRequest req)
+ {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit()
+ {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if (container instanceof View)
+ {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ return true;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ AClass newElement = AcoreFactory.eINSTANCE.createAClass();
+
+ ACoreRoot owner = (ACoreRoot)getElementToEdit();
+ owner.getClasses().add(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(AClass newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute())
+ {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassImplementedInterfacesCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassImplementedInterfacesCreateCommand.java
new file mode 100644
index 0000000000..fe4db5f33f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassImplementedInterfacesCreateCommand.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassImplementedInterfacesCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final EObject source;
+
+ /**
+ * @generated
+ */
+ private final EObject target;
+
+ /**
+ * @generated
+ */
+ public AClassImplementedInterfacesCreateCommand(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 && false == source instanceof AClass)
+ {
+ return false;
+ }
+ if (target != null && false == target instanceof AInterface)
+ {
+ 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 AcoreBaseItemSemanticEditPolicy.LinkConstraints.canCreateAClassImplementedInterfaces_4002(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().getImplementedInterfaces().add(getTarget());
+ }
+ return CommandResult.newOKCommandResult();
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void setElementToEdit(EObject element)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getSource()
+ {
+ return (AClass)source;
+ }
+
+ /**
+ * @generated
+ */
+ protected AInterface getTarget()
+ {
+ return (AInterface)target;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassImplementedInterfacesReorientCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassImplementedInterfacesReorientCommand.java
new file mode 100644
index 0000000000..f31e1300d4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassImplementedInterfacesReorientCommand.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassImplementedInterfacesReorientCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject referenceOwner;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public AClassImplementedInterfacesReorientCommand(ReorientReferenceRelationshipRequest request)
+ {
+ super(request.getLabel(), null, request);
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ if (false == referenceOwner instanceof AClass)
+ {
+ 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 AInterface && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints.canExistAClassImplementedInterfaces_4002(getNewSource(),
+ getOldTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget()
+ {
+ if (!(oldEnd instanceof AInterface && newEnd instanceof AInterface))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints.canExistAClassImplementedInterfaces_4002(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().getImplementedInterfaces().remove(getOldTarget());
+ getNewSource().getImplementedInterfaces().add(getOldTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException
+ {
+ getOldSource().getImplementedInterfaces().remove(getOldTarget());
+ getOldSource().getImplementedInterfaces().add(getNewTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldSource()
+ {
+ return (AClass)referenceOwner;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewSource()
+ {
+ return (AClass)newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AInterface getOldTarget()
+ {
+ return (AInterface)oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AInterface getNewTarget()
+ {
+ return (AInterface)newEnd;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassSubClassesCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassSubClassesCreateCommand.java
new file mode 100644
index 0000000000..72695224fb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassSubClassesCreateCommand.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassSubClassesCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final EObject source;
+
+ /**
+ * @generated
+ */
+ private final EObject target;
+
+ /**
+ * @generated
+ */
+ public AClassSubClassesCreateCommand(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 && false == source instanceof AClass)
+ {
+ return false;
+ }
+ if (target != null && false == target instanceof AClass)
+ {
+ 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 AcoreBaseItemSemanticEditPolicy.LinkConstraints.canCreateAClassSubClasses_4001(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().getSubClasses().add(getTarget());
+ }
+ return CommandResult.newOKCommandResult();
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void setElementToEdit(EObject element)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getSource()
+ {
+ return (AClass)source;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getTarget()
+ {
+ return (AClass)target;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassSubClassesReorientCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassSubClassesReorientCommand.java
new file mode 100644
index 0000000000..cf8a305ad4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AClassSubClassesReorientCommand.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreBaseItemSemanticEditPolicy;
+import org.eclipse.emf.ecore.EObject;
+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 AClassSubClassesReorientCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject referenceOwner;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public AClassSubClassesReorientCommand(ReorientReferenceRelationshipRequest request)
+ {
+ super(request.getLabel(), null, request);
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ if (false == referenceOwner instanceof AClass)
+ {
+ 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 AClass && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints
+ .canExistAClassSubClasses_4001(getNewSource(), getOldTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget()
+ {
+ if (!(oldEnd instanceof AClass && newEnd instanceof AClass))
+ {
+ return false;
+ }
+ return AcoreBaseItemSemanticEditPolicy.LinkConstraints
+ .canExistAClassSubClasses_4001(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().getSubClasses().remove(getOldTarget());
+ getNewSource().getSubClasses().add(getOldTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException
+ {
+ getOldSource().getSubClasses().remove(getOldTarget());
+ getOldSource().getSubClasses().add(getNewTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldSource()
+ {
+ return (AClass)referenceOwner;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewSource()
+ {
+ return (AClass)newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getOldTarget()
+ {
+ return (AClass)oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected AClass getNewTarget()
+ {
+ return (AClass)newEnd;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AInterfaceCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AInterfaceCreateCommand.java
new file mode 100644
index 0000000000..ed80a8ede0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AInterfaceCreateCommand.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+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.notation.View;
+
+/**
+ * @generated
+ */
+public class AInterfaceCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ public AInterfaceCreateCommand(CreateElementRequest req)
+ {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit()
+ {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if (container instanceof View)
+ {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ return true;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ AInterface newElement = AcoreFactory.eINSTANCE.createAInterface();
+
+ ACoreRoot owner = (ACoreRoot)getElementToEdit();
+ owner.getInterfaces().add(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(AInterface newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException
+ {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute())
+ {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AOperation2CreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AOperation2CreateCommand.java
new file mode 100644
index 0000000000..4ce577867b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AOperation2CreateCommand.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.ABasicClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AOperation;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+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.notation.View;
+
+/**
+ * @generated
+ */
+public class AOperation2CreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ public AOperation2CreateCommand(CreateElementRequest req)
+ {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit()
+ {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if (container instanceof View)
+ {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ return true;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ AOperation newElement = AcoreFactory.eINSTANCE.createAOperation();
+
+ ABasicClass owner = (ABasicClass)getElementToEdit();
+ owner.getOperations().add(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(AOperation newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException
+ {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute())
+ {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AOperationCreateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AOperationCreateCommand.java
new file mode 100644
index 0000000000..76d30326fe
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/commands/AOperationCreateCommand.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.ABasicClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AOperation;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+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.notation.View;
+
+/**
+ * @generated
+ */
+public class AOperationCreateCommand extends EditElementCommand
+{
+
+ /**
+ * @generated
+ */
+ public AOperationCreateCommand(CreateElementRequest req)
+ {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit()
+ {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if (container instanceof View)
+ {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute()
+ {
+ return true;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ AOperation newElement = AcoreFactory.eINSTANCE.createAOperation();
+
+ ABasicClass owner = (ABasicClass)getElementToEdit();
+ owner.getOperations().add(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(AOperation newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException
+ {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute())
+ {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AAttributeEditHelper.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AAttributeEditHelper.java
new file mode 100644
index 0000000000..c7dab08b2e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AAttributeEditHelper.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers;
+
+/**
+ * @generated
+ */
+public class AAttributeEditHelper extends AcoreBaseEditHelper
+{
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AClassEditHelper.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AClassEditHelper.java
new file mode 100644
index 0000000000..1e124eef34
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AClassEditHelper.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers;
+
+/**
+ * @generated
+ */
+public class AClassEditHelper extends AcoreBaseEditHelper
+{
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/ACoreRootEditHelper.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/ACoreRootEditHelper.java
new file mode 100644
index 0000000000..a45b515032
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/ACoreRootEditHelper.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers;
+
+/**
+ * @generated
+ */
+public class ACoreRootEditHelper extends AcoreBaseEditHelper
+{
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AInterfaceEditHelper.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AInterfaceEditHelper.java
new file mode 100644
index 0000000000..e1edb854e0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AInterfaceEditHelper.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers;
+
+/**
+ * @generated
+ */
+public class AInterfaceEditHelper extends AcoreBaseEditHelper
+{
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AOperationEditHelper.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AOperationEditHelper.java
new file mode 100644
index 0000000000..7600f1dade
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AOperationEditHelper.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers;
+
+/**
+ * @generated
+ */
+public class AOperationEditHelper extends AcoreBaseEditHelper
+{
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AcoreBaseEditHelper.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AcoreBaseEditHelper.java
new file mode 100644
index 0000000000..ce4a1fcf01
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/helpers/AcoreBaseEditHelper.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
+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 AcoreBaseEditHelper extends AbstractEditHelper
+{
+
+ /**
+ * @generated
+ */
+ public static final String EDIT_POLICY_COMMAND = "edit policy command"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final String CONTEXT_ELEMENT_TYPE = "context element type"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ protected IEditHelperAdvice[] getEditHelperAdvice(IEditCommandRequest req)
+ {
+ if (req.getParameter(CONTEXT_ELEMENT_TYPE) instanceof IElementType)
+ {
+ return ElementTypeRegistry.getInstance()
+ .getEditHelperAdvice((IElementType)req.getParameter(CONTEXT_ELEMENT_TYPE));
+ }
+ return super.getEditHelperAdvice(req);
+ }
+
+ /**
+ * @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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AAttribute2EditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AAttribute2EditPart.java
new file mode 100644
index 0000000000..3fa23a04ea
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AAttribute2EditPart.java
@@ -0,0 +1,683 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AAttribute2ItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextNonResizableEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreParserProvider;
+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.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+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.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.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
+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.DragEditPartsTrackerEx;
+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 AAttribute2EditPart extends CompartmentEditPart implements ITextAwareEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3003;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public AAttribute2EditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public DragTracker getDragTracker(Request request)
+ {
+ if (request instanceof SelectionRequest && ((SelectionRequest)request).getLastButtonPressed() == 3)
+ {
+ return null;
+ }
+ return new DragEditPartsTrackerEx(this);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AAttribute2ItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new AcoreTextNonResizableEditPolicy());
+ installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ }
+
+ /**
+ * @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(IFigure 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()
+ {
+ return null;
+ }
+
+ /**
+ * @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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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)
+ {
+ parser = AcoreParserProvider.getParser(AcoreElementTypes.AAttribute_3003, getParserElement(),
+ AcoreVisualIDRegistry
+ .getType(org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager()
+ {
+ if (manager == null)
+ {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this),
+ AcoreEditPartFactory.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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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()
+ {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim()
+ {
+ return new WrappingLabel();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AAttributeEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AAttributeEditPart.java
new file mode 100644
index 0000000000..1924adca79
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AAttributeEditPart.java
@@ -0,0 +1,683 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AAttributeItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextNonResizableEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreParserProvider;
+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.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+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.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.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
+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.DragEditPartsTrackerEx;
+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 AAttributeEditPart extends CompartmentEditPart implements ITextAwareEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3001;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public AAttributeEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public DragTracker getDragTracker(Request request)
+ {
+ if (request instanceof SelectionRequest && ((SelectionRequest)request).getLastButtonPressed() == 3)
+ {
+ return null;
+ }
+ return new DragEditPartsTrackerEx(this);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AAttributeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new AcoreTextNonResizableEditPolicy());
+ installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ }
+
+ /**
+ * @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(IFigure 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()
+ {
+ return null;
+ }
+
+ /**
+ * @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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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)
+ {
+ parser = AcoreParserProvider.getParser(AcoreElementTypes.AAttribute_3001, getParserElement(),
+ AcoreVisualIDRegistry
+ .getType(org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager()
+ {
+ if (manager == null)
+ {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this),
+ AcoreEditPartFactory.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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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()
+ {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim()
+ {
+ return new WrappingLabel();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAAttributeCompartmentEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAAttributeCompartmentEditPart.java
new file mode 100644
index 0000000000..3440e62958
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAAttributeCompartmentEditPart.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassAAttributeCompartmentCanonicalEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassAAttributeCompartmentItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AClassAAttributeCompartmentEditPart extends ListCompartmentEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7003;
+
+ /**
+ * @generated
+ */
+ public AClassAAttributeCompartmentEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt)
+ {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName()
+ {
+ return Messages.AClassAAttributeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure createFigure()
+ {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure)super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AClassAAttributeCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AClassAAttributeCompartmentCanonicalEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio)
+ {
+ // nothing to do -- parent layout does not accept Double constraints as ratio
+ // super.setRatio(ratio);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAOperationClassCompartmentEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAOperationClassCompartmentEditPart.java
new file mode 100644
index 0000000000..a2c524c4e9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAOperationClassCompartmentEditPart.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassAOperationClassCompartmentCanonicalEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassAOperationClassCompartmentItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AClassAOperationClassCompartmentEditPart extends ListCompartmentEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7004;
+
+ /**
+ * @generated
+ */
+ public AClassAOperationClassCompartmentEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt)
+ {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName()
+ {
+ return Messages.AClassAOperationClassCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure createFigure()
+ {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure)super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AClassAOperationClassCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AClassAOperationClassCompartmentCanonicalEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio)
+ {
+ // nothing to do -- parent layout does not accept Double constraints as ratio
+ // super.setRatio(ratio);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAggregationsEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAggregationsEditPart.java
new file mode 100644
index 0000000000..22402cf228
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAggregationsEditPart.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.PolygonDecoration;
+import org.eclipse.draw2d.RotatableDecoration;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassAggregationsItemSemanticEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+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;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class AClassAggregationsEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4004;
+
+ /**
+ * @generated
+ */
+ public AClassAggregationsEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AClassAggregationsItemSemanticEditPolicy());
+ }
+
+ /**
+ * 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 AClassAggregationClassesFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public AClassAggregationClassesFigure getPrimaryShape()
+ {
+ return (AClassAggregationClassesFigure)getFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public class AClassAggregationClassesFigure extends PolylineConnectionEx
+ {
+
+ /**
+ * @generated
+ */
+ public AClassAggregationClassesFigure()
+ {
+ this.setLineWidth(1);
+
+ setTargetDecoration(createTargetDecoration());
+ }
+
+ /**
+ * @generated
+ */
+ private RotatableDecoration createTargetDecoration()
+ {
+ PolygonDecoration df = new PolygonDecoration();
+ df.setFill(true);
+ df.setLineWidth(1);
+ df.setBackgroundColor(DF_BACK);
+ PointList pl = new PointList();
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+ pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
+ pl.addPoint(getMapMode().DPtoLP(-4), getMapMode().DPtoLP(0));
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+ df.setTemplate(pl);
+ df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
+ return df;
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ static final Color DF_BACK = new Color(null, 255, 255, 255);
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAssociationsEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAssociationsEditPart.java
new file mode 100644
index 0000000000..395daea6bd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassAssociationsEditPart.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassAssociationsItemSemanticEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+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 AClassAssociationsEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4003;
+
+ /**
+ * @generated
+ */
+ public AClassAssociationsEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AClassAssociationsItemSemanticEditPolicy());
+ }
+
+ /**
+ * 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 PolylineConnectionEx();
+ }
+
+ /**
+ * @generated
+ */
+ public PolylineConnectionEx getPrimaryShape()
+ {
+ return (PolylineConnectionEx)getFigure();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassCompositionsEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassCompositionsEditPart.java
new file mode 100644
index 0000000000..c572398f54
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassCompositionsEditPart.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.PolygonDecoration;
+import org.eclipse.draw2d.RotatableDecoration;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassCompositionsItemSemanticEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+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;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class AClassCompositionsEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4005;
+
+ /**
+ * @generated
+ */
+ public AClassCompositionsEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AClassCompositionsItemSemanticEditPolicy());
+ }
+
+ /**
+ * 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 AClassCompositionClassesFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public AClassCompositionClassesFigure getPrimaryShape()
+ {
+ return (AClassCompositionClassesFigure)getFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public class AClassCompositionClassesFigure extends PolylineConnectionEx
+ {
+
+ /**
+ * @generated
+ */
+ public AClassCompositionClassesFigure()
+ {
+ this.setLineWidth(1);
+
+ setTargetDecoration(createTargetDecoration());
+ }
+
+ /**
+ * @generated
+ */
+ private RotatableDecoration createTargetDecoration()
+ {
+ PolygonDecoration df = new PolygonDecoration();
+ df.setFill(true);
+ df.setLineWidth(1);
+ df.setBackgroundColor(DF_BACK);
+ PointList pl = new PointList();
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+ pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
+ pl.addPoint(getMapMode().DPtoLP(-4), getMapMode().DPtoLP(0));
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+ df.setTemplate(pl);
+ df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
+ return df;
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ static final Color DF_BACK = new Color(null, 0, 0, 0);
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassEditPart.java
new file mode 100644
index 0000000000..a71cfd13f5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassEditPart.java
@@ -0,0 +1,581 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.Shape;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+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.editparts.ShapeNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+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;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class AClassEditPart extends ShapeNodeEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2002;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public AClassEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AClassItemSemanticEditPolicy());
+ 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()
+ {
+
+ ConstrainedToolbarLayoutEditPolicy lep = new ConstrainedToolbarLayoutEditPolicy()
+ {
+
+ protected EditPolicy createChildEditPolicy(EditPart child)
+ {
+ if (child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE) == null)
+ {
+ if (child instanceof ITextAwareEditPart)
+ {
+ return new AcoreTextSelectionEditPolicy();
+ }
+ }
+ return super.createChildEditPolicy(child);
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape()
+ {
+ AClassFigure figure = new AClassFigure();
+ return primaryShape = figure;
+ }
+
+ /**
+ * @generated
+ */
+ public AClassFigure getPrimaryShape()
+ {
+ return (AClassFigure)primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart)
+ {
+ if (childEditPart instanceof AClassNameEditPart)
+ {
+ ((AClassNameEditPart)childEditPart).setLabel(getPrimaryShape().getFigureAClassNameFigure());
+ return true;
+ }
+ if (childEditPart instanceof AClassAAttributeCompartmentEditPart)
+ {
+ IFigure pane = getPrimaryShape().getFigureClassAttributes();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((AClassAAttributeCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof AClassAOperationClassCompartmentEditPart)
+ {
+ IFigure pane = getPrimaryShape().getFigureClassOperations();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((AClassAOperationClassCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart)
+ {
+ if (childEditPart instanceof AClassNameEditPart)
+ {
+ return true;
+ }
+ if (childEditPart instanceof AClassAAttributeCompartmentEditPart)
+ {
+ IFigure pane = getPrimaryShape().getFigureClassAttributes();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.remove(((AClassAAttributeCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof AClassAOperationClassCompartmentEditPart)
+ {
+ IFigure pane = getPrimaryShape().getFigureClassOperations();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.remove(((AClassAOperationClassCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ 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)
+ {
+ if (editPart instanceof AClassAAttributeCompartmentEditPart)
+ {
+ return getPrimaryShape().getFigureClassAttributes();
+ }
+ if (editPart instanceof AClassAOperationClassCompartmentEditPart)
+ {
+ return getPrimaryShape().getFigureClassOperations();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate()
+ {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 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(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane()
+ {
+ if (contentPane != null)
+ {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setForegroundColor(Color color)
+ {
+ if (primaryShape != null)
+ {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setBackgroundColor(Color color)
+ {
+ if (primaryShape != null)
+ {
+ primaryShape.setBackgroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineWidth(int width)
+ {
+ if (primaryShape instanceof Shape)
+ {
+ ((Shape)primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineType(int style)
+ {
+ if (primaryShape instanceof Shape)
+ {
+ ((Shape)primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart()
+ {
+ return getChildBySemanticHint(AcoreVisualIDRegistry.getType(AClassNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource()
+ {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(AcoreElementTypes.AClassSubClasses_4001);
+ types.add(AcoreElementTypes.AClassImplementedInterfaces_4002);
+ types.add(AcoreElementTypes.AClassAssociations_4003);
+ types.add(AcoreElementTypes.AClassAggregations_4004);
+ types.add(AcoreElementTypes.AClassCompositions_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart)
+ {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart)
+ {
+ types.add(AcoreElementTypes.AClassSubClasses_4001);
+ }
+ if (targetEditPart instanceof AInterfaceEditPart)
+ {
+ types.add(AcoreElementTypes.AClassImplementedInterfaces_4002);
+ }
+ if (targetEditPart instanceof org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart)
+ {
+ types.add(AcoreElementTypes.AClassAssociations_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart)
+ {
+ types.add(AcoreElementTypes.AClassAggregations_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart)
+ {
+ types.add(AcoreElementTypes.AClassCompositions_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType)
+ {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == AcoreElementTypes.AClassSubClasses_4001)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ else if (relationshipType == AcoreElementTypes.AClassImplementedInterfaces_4002)
+ {
+ types.add(AcoreElementTypes.AInterface_2001);
+ }
+ else if (relationshipType == AcoreElementTypes.AClassAssociations_4003)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ else if (relationshipType == AcoreElementTypes.AClassAggregations_4004)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ else if (relationshipType == AcoreElementTypes.AClassCompositions_4005)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget()
+ {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(AcoreElementTypes.AClassSubClasses_4001);
+ types.add(AcoreElementTypes.AClassAssociations_4003);
+ types.add(AcoreElementTypes.AClassAggregations_4004);
+ types.add(AcoreElementTypes.AClassCompositions_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType)
+ {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == AcoreElementTypes.AClassSubClasses_4001)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ else if (relationshipType == AcoreElementTypes.AClassAssociations_4003)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ else if (relationshipType == AcoreElementTypes.AClassAggregations_4004)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ else if (relationshipType == AcoreElementTypes.AClassCompositions_4005)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request)
+ {
+ if (request instanceof CreateViewAndElementRequest)
+ {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor()
+ .getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if (type == AcoreElementTypes.AAttribute_3003)
+ {
+ return getChildBySemanticHint(AcoreVisualIDRegistry.getType(AClassAAttributeCompartmentEditPart.VISUAL_ID));
+ }
+ if (type == AcoreElementTypes.AOperation_3004)
+ {
+ return getChildBySemanticHint(AcoreVisualIDRegistry.getType(AClassAOperationClassCompartmentEditPart.VISUAL_ID));
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ public class AClassFigure extends RectangleFigure
+ {
+
+ /**
+ * @generated
+ */
+ private RectangleFigure fFigureClassAttributes;
+
+ /**
+ * @generated
+ */
+ private WrappingLabel fFigureAClassNameFigure;
+
+ /**
+ * @generated
+ */
+ private RectangleFigure fFigureClassOperations;
+
+ /**
+ * @generated
+ */
+ public AClassFigure()
+ {
+
+ ToolbarLayout layoutThis = new ToolbarLayout();
+ layoutThis.setStretchMinorAxis(true);
+ layoutThis.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
+
+ layoutThis.setSpacing(0);
+ layoutThis.setVertical(true);
+
+ this.setLayoutManager(layoutThis);
+
+ this.setLineWidth(1);
+ this.setBackgroundColor(THIS_BACK);
+ createContents();
+ }
+
+ /**
+ * @generated
+ */
+ private void createContents()
+ {
+
+ fFigureAClassNameFigure = new WrappingLabel();
+ fFigureAClassNameFigure.setText("<...>");
+
+ this.add(fFigureAClassNameFigure);
+
+ fFigureClassAttributes = new RectangleFigure();
+ fFigureClassAttributes.setLineWidth(1);
+
+ this.add(fFigureClassAttributes);
+ fFigureClassAttributes.setLayoutManager(new StackLayout());
+
+ fFigureClassOperations = new RectangleFigure();
+ fFigureClassOperations.setLineWidth(1);
+
+ this.add(fFigureClassOperations);
+ fFigureClassOperations.setLayoutManager(new StackLayout());
+
+ }
+
+ /**
+ * @generated
+ */
+ private boolean myUseLocalCoordinates = false;
+
+ /**
+ * @generated
+ */
+ protected boolean useLocalCoordinates()
+ {
+ return myUseLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setUseLocalCoordinates(boolean useLocalCoordinates)
+ {
+ myUseLocalCoordinates = useLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleFigure getFigureClassAttributes()
+ {
+ return fFigureClassAttributes;
+ }
+
+ /**
+ * @generated
+ */
+ public WrappingLabel getFigureAClassNameFigure()
+ {
+ return fFigureAClassNameFigure;
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleFigure getFigureClassOperations()
+ {
+ return fFigureClassOperations;
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ static final Color THIS_BACK = new Color(null, 230, 230, 255);
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassImplementedInterfacesEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassImplementedInterfacesEditPart.java
new file mode 100644
index 0000000000..cadb28c77a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassImplementedInterfacesEditPart.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.PolylineDecoration;
+import org.eclipse.draw2d.RotatableDecoration;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassImplementedInterfacesItemSemanticEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+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 AClassImplementedInterfacesEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4002;
+
+ /**
+ * @generated
+ */
+ public AClassImplementedInterfacesEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AClassImplementedInterfacesItemSemanticEditPolicy());
+ }
+
+ /**
+ * 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 AClassImplementedInterfacesFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public AClassImplementedInterfacesFigure getPrimaryShape()
+ {
+ return (AClassImplementedInterfacesFigure)getFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public class AClassImplementedInterfacesFigure extends PolylineConnectionEx
+ {
+
+ /**
+ * @generated
+ */
+ public AClassImplementedInterfacesFigure()
+ {
+ this.setLineWidth(1);
+ this.setLineStyle(Graphics.LINE_DASH);
+
+ setTargetDecoration(createTargetDecoration());
+ }
+
+ /**
+ * @generated
+ */
+ private RotatableDecoration createTargetDecoration()
+ {
+ PolylineDecoration df = new PolylineDecoration();
+ df.setLineWidth(1);
+ return df;
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassNameEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassNameEditPart.java
new file mode 100644
index 0000000000..83952baae5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassNameEditPart.java
@@ -0,0 +1,684 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreParserProvider;
+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.MoveHandle;
+import org.eclipse.gef.handles.NonResizableHandleKit;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+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.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 AClassNameEditPart extends CompartmentEditPart implements ITextAwareEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5002;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public AClassNameEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new AcoreTextSelectionEditPolicy());
+ 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);
+ ((MoveHandle)handles.get(0)).setBorder(null);
+ 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 AcoreElementTypes.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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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)
+ {
+ parser = AcoreParserProvider.getParser(AcoreElementTypes.AClass_2002, getParserElement(), AcoreVisualIDRegistry
+ .getType(org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassNameEditPart.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager()
+ {
+ if (manager == null)
+ {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this),
+ AcoreEditPartFactory.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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassSubClassesEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassSubClassesEditPart.java
new file mode 100644
index 0000000000..34c9a55e73
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AClassSubClassesEditPart.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.PolygonDecoration;
+import org.eclipse.draw2d.RotatableDecoration;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AClassSubClassesItemSemanticEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+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;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class AClassSubClassesEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4001;
+
+ /**
+ * @generated
+ */
+ public AClassSubClassesEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AClassSubClassesItemSemanticEditPolicy());
+ }
+
+ /**
+ * 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 AClassSubClassesFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public AClassSubClassesFigure getPrimaryShape()
+ {
+ return (AClassSubClassesFigure)getFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public class AClassSubClassesFigure extends PolylineConnectionEx
+ {
+
+ /**
+ * @generated
+ */
+ public AClassSubClassesFigure()
+ {
+ this.setLineWidth(1);
+
+ setTargetDecoration(createTargetDecoration());
+ }
+
+ /**
+ * @generated
+ */
+ private RotatableDecoration createTargetDecoration()
+ {
+ PolygonDecoration df = new PolygonDecoration();
+ df.setFill(true);
+ df.setLineWidth(1);
+ df.setBackgroundColor(DF_BACK);
+ PointList pl = new PointList();
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+ pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
+ pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+ df.setTemplate(pl);
+ df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
+ return df;
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ static final Color DF_BACK = new Color(null, 255, 255, 255);
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/ACoreRootEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/ACoreRootEditPart.java
new file mode 100644
index 0000000000..0d4438da6a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/ACoreRootEditPart.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.ACoreRootCanonicalEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.ACoreRootItemSemanticEditPolicy;
+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 ACoreRootEditPart extends DiagramEditPart
+{
+
+ /**
+ * @generated
+ */
+ public final static String MODEL_ID = "Acore"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 1000;
+
+ /**
+ * @generated
+ */
+ public ACoreRootEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ACoreRootItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ACoreRootCanonicalEditPolicy());
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceAAttributeInterfaceCompartmentEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceAAttributeInterfaceCompartmentEditPart.java
new file mode 100644
index 0000000000..aa8a2a2326
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceAAttributeInterfaceCompartmentEditPart.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AInterfaceAAttributeInterfaceCompartmentEditPart extends ListCompartmentEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7001;
+
+ /**
+ * @generated
+ */
+ public AInterfaceAAttributeInterfaceCompartmentEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt)
+ {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName()
+ {
+ return Messages.AInterfaceAAttributeInterfaceCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure createFigure()
+ {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure)super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
+ new AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio)
+ {
+ // nothing to do -- parent layout does not accept Double constraints as ratio
+ // super.setRatio(ratio);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceAOperationInterfaceCompartmentEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceAOperationInterfaceCompartmentEditPart.java
new file mode 100644
index 0000000000..f21ee2ede3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceAOperationInterfaceCompartmentEditPart.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AInterfaceAOperationInterfaceCompartmentEditPart extends ListCompartmentEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7002;
+
+ /**
+ * @generated
+ */
+ public AInterfaceAOperationInterfaceCompartmentEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt)
+ {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName()
+ {
+ return Messages.AInterfaceAOperationInterfaceCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure createFigure()
+ {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure)super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
+ new AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio)
+ {
+ // nothing to do -- parent layout does not accept Double constraints as ratio
+ // super.setRatio(ratio);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceEditPart.java
new file mode 100644
index 0000000000..9575419a06
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceEditPart.java
@@ -0,0 +1,504 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.RoundedRectangle;
+import org.eclipse.draw2d.Shape;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AInterfaceItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+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.editparts.ShapeNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+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;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class AInterfaceEditPart extends ShapeNodeEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2001;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public AInterfaceEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AInterfaceItemSemanticEditPolicy());
+ 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()
+ {
+
+ ConstrainedToolbarLayoutEditPolicy lep = new ConstrainedToolbarLayoutEditPolicy()
+ {
+
+ protected EditPolicy createChildEditPolicy(EditPart child)
+ {
+ if (child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE) == null)
+ {
+ if (child instanceof ITextAwareEditPart)
+ {
+ return new AcoreTextSelectionEditPolicy();
+ }
+ }
+ return super.createChildEditPolicy(child);
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape()
+ {
+ AInterfaceFigure figure = new AInterfaceFigure();
+ return primaryShape = figure;
+ }
+
+ /**
+ * @generated
+ */
+ public AInterfaceFigure getPrimaryShape()
+ {
+ return (AInterfaceFigure)primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart)
+ {
+ if (childEditPart instanceof AInterfaceNameEditPart)
+ {
+ ((AInterfaceNameEditPart)childEditPart).setLabel(getPrimaryShape().getFigureAInterfaceNameFigure());
+ return true;
+ }
+ if (childEditPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart)
+ {
+ IFigure pane = getPrimaryShape().getFigureInterfaceAttributes();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((AInterfaceAAttributeInterfaceCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart)
+ {
+ IFigure pane = getPrimaryShape().getFigureInterfaceOperations();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((AInterfaceAOperationInterfaceCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart)
+ {
+ if (childEditPart instanceof AInterfaceNameEditPart)
+ {
+ return true;
+ }
+ if (childEditPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart)
+ {
+ IFigure pane = getPrimaryShape().getFigureInterfaceAttributes();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.remove(((AInterfaceAAttributeInterfaceCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart)
+ {
+ IFigure pane = getPrimaryShape().getFigureInterfaceOperations();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.remove(((AInterfaceAOperationInterfaceCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ 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)
+ {
+ if (editPart instanceof AInterfaceAAttributeInterfaceCompartmentEditPart)
+ {
+ return getPrimaryShape().getFigureInterfaceAttributes();
+ }
+ if (editPart instanceof AInterfaceAOperationInterfaceCompartmentEditPart)
+ {
+ return getPrimaryShape().getFigureInterfaceOperations();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate()
+ {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 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(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane()
+ {
+ if (contentPane != null)
+ {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setForegroundColor(Color color)
+ {
+ if (primaryShape != null)
+ {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setBackgroundColor(Color color)
+ {
+ if (primaryShape != null)
+ {
+ primaryShape.setBackgroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineWidth(int width)
+ {
+ if (primaryShape instanceof Shape)
+ {
+ ((Shape)primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineType(int style)
+ {
+ if (primaryShape instanceof Shape)
+ {
+ ((Shape)primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart()
+ {
+ return getChildBySemanticHint(AcoreVisualIDRegistry.getType(AInterfaceNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget()
+ {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(AcoreElementTypes.AClassImplementedInterfaces_4002);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType)
+ {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == AcoreElementTypes.AClassImplementedInterfaces_4002)
+ {
+ types.add(AcoreElementTypes.AClass_2002);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request)
+ {
+ if (request instanceof CreateViewAndElementRequest)
+ {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor()
+ .getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if (type == AcoreElementTypes.AAttribute_3001)
+ {
+ return getChildBySemanticHint(AcoreVisualIDRegistry
+ .getType(AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID));
+ }
+ if (type == AcoreElementTypes.AOperation_3002)
+ {
+ return getChildBySemanticHint(AcoreVisualIDRegistry
+ .getType(AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID));
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ public class AInterfaceFigure extends RoundedRectangle
+ {
+
+ /**
+ * @generated
+ */
+ private WrappingLabel fFigureAInterfaceNameFigure;
+
+ /**
+ * @generated
+ */
+ private RectangleFigure fFigureInterfaceAttributes;
+
+ /**
+ * @generated
+ */
+ private RectangleFigure fFigureInterfaceOperations;
+
+ /**
+ * @generated
+ */
+ public AInterfaceFigure()
+ {
+
+ ToolbarLayout layoutThis = new ToolbarLayout();
+ layoutThis.setStretchMinorAxis(true);
+ layoutThis.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
+
+ layoutThis.setSpacing(0);
+ layoutThis.setVertical(true);
+
+ this.setLayoutManager(layoutThis);
+
+ this.setCornerDimensions(new Dimension(getMapMode().DPtoLP(12), getMapMode().DPtoLP(12)));
+ this.setLineWidth(1);
+ this.setBackgroundColor(THIS_BACK);
+ createContents();
+ }
+
+ /**
+ * @generated
+ */
+ private void createContents()
+ {
+
+ WrappingLabel aInterfaceTypeLabelFigure0 = new WrappingLabel();
+ aInterfaceTypeLabelFigure0.setText("«Interface»");
+
+ this.add(aInterfaceTypeLabelFigure0);
+
+ fFigureAInterfaceNameFigure = new WrappingLabel();
+ fFigureAInterfaceNameFigure.setText("<...>");
+
+ this.add(fFigureAInterfaceNameFigure);
+
+ fFigureInterfaceAttributes = new RectangleFigure();
+ fFigureInterfaceAttributes.setLineWidth(1);
+
+ this.add(fFigureInterfaceAttributes);
+ fFigureInterfaceAttributes.setLayoutManager(new StackLayout());
+
+ fFigureInterfaceOperations = new RectangleFigure();
+ fFigureInterfaceOperations.setLineWidth(1);
+
+ this.add(fFigureInterfaceOperations);
+ fFigureInterfaceOperations.setLayoutManager(new StackLayout());
+
+ }
+
+ /**
+ * @generated
+ */
+ private boolean myUseLocalCoordinates = false;
+
+ /**
+ * @generated
+ */
+ protected boolean useLocalCoordinates()
+ {
+ return myUseLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setUseLocalCoordinates(boolean useLocalCoordinates)
+ {
+ myUseLocalCoordinates = useLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ public WrappingLabel getFigureAInterfaceNameFigure()
+ {
+ return fFigureAInterfaceNameFigure;
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleFigure getFigureInterfaceAttributes()
+ {
+ return fFigureInterfaceAttributes;
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleFigure getFigureInterfaceOperations()
+ {
+ return fFigureInterfaceOperations;
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ static final Color THIS_BACK = new Color(null, 250, 250, 190);
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceNameEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceNameEditPart.java
new file mode 100644
index 0000000000..d0b51f33b9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AInterfaceNameEditPart.java
@@ -0,0 +1,685 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreParserProvider;
+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.MoveHandle;
+import org.eclipse.gef.handles.NonResizableHandleKit;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+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.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 AInterfaceNameEditPart extends CompartmentEditPart implements ITextAwareEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5001;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public AInterfaceNameEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new AcoreTextSelectionEditPolicy());
+ 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);
+ ((MoveHandle)handles.get(0)).setBorder(null);
+ 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 AcoreElementTypes.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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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)
+ {
+ parser = AcoreParserProvider.getParser(AcoreElementTypes.AInterface_2001, getParserElement(),
+ AcoreVisualIDRegistry
+ .getType(org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceNameEditPart.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager()
+ {
+ if (manager == null)
+ {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this),
+ AcoreEditPartFactory.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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AOperation2EditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AOperation2EditPart.java
new file mode 100644
index 0000000000..07e8c0b2d5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AOperation2EditPart.java
@@ -0,0 +1,683 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AOperation2ItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextNonResizableEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreParserProvider;
+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.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+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.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.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
+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.DragEditPartsTrackerEx;
+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 AOperation2EditPart extends CompartmentEditPart implements ITextAwareEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3004;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public AOperation2EditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public DragTracker getDragTracker(Request request)
+ {
+ if (request instanceof SelectionRequest && ((SelectionRequest)request).getLastButtonPressed() == 3)
+ {
+ return null;
+ }
+ return new DragEditPartsTrackerEx(this);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AOperation2ItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new AcoreTextNonResizableEditPolicy());
+ installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ }
+
+ /**
+ * @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(IFigure 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()
+ {
+ return null;
+ }
+
+ /**
+ * @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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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)
+ {
+ parser = AcoreParserProvider.getParser(AcoreElementTypes.AOperation_3004, getParserElement(),
+ AcoreVisualIDRegistry
+ .getType(org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager()
+ {
+ if (manager == null)
+ {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this),
+ AcoreEditPartFactory.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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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()
+ {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim()
+ {
+ return new WrappingLabel();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AOperationEditPart.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AOperationEditPart.java
new file mode 100644
index 0000000000..a25cf5b4be
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AOperationEditPart.java
@@ -0,0 +1,683 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AOperationItemSemanticEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextNonResizableEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies.AcoreTextSelectionEditPolicy;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreParserProvider;
+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.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+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.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.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
+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.DragEditPartsTrackerEx;
+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 AOperationEditPart extends CompartmentEditPart implements ITextAwareEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3002;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * @generated
+ */
+ public AOperationEditPart(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ public DragTracker getDragTracker(Request request)
+ {
+ if (request instanceof SelectionRequest && ((SelectionRequest)request).getLastButtonPressed() == 3)
+ {
+ return null;
+ }
+ return new DragEditPartsTrackerEx(this);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies()
+ {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AOperationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new AcoreTextNonResizableEditPolicy());
+ installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ }
+
+ /**
+ * @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(IFigure 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()
+ {
+ return null;
+ }
+
+ /**
+ * @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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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)
+ {
+ parser = AcoreParserProvider.getParser(AcoreElementTypes.AOperation_3002, getParserElement(),
+ AcoreVisualIDRegistry
+ .getType(org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager()
+ {
+ if (manager == null)
+ {
+ setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this),
+ AcoreEditPartFactory.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 AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof AcoreTextSelectionEditPolicy)
+ {
+ ((AcoreTextSelectionEditPolicy)sfEditPolicy).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()
+ {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim()
+ {
+ return new WrappingLabel();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AcoreEditPartFactory.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AcoreEditPartFactory.java
new file mode 100644
index 0000000000..d240cbde7c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/parts/AcoreEditPartFactory.java
@@ -0,0 +1,227 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.gef.tools.CellEditorLocator;
+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 AcoreEditPartFactory implements EditPartFactory
+{
+
+ /**
+ * @generated
+ */
+ public EditPart createEditPart(EditPart context, Object model)
+ {
+ if (model instanceof View)
+ {
+ View view = (View)model;
+ switch (AcoreVisualIDRegistry.getVisualID(view))
+ {
+
+ case ACoreRootEditPart.VISUAL_ID:
+ return new ACoreRootEditPart(view);
+
+ case AInterfaceEditPart.VISUAL_ID:
+ return new AInterfaceEditPart(view);
+
+ case AInterfaceNameEditPart.VISUAL_ID:
+ return new AInterfaceNameEditPart(view);
+
+ case AClassEditPart.VISUAL_ID:
+ return new AClassEditPart(view);
+
+ case AClassNameEditPart.VISUAL_ID:
+ return new AClassNameEditPart(view);
+
+ case AAttributeEditPart.VISUAL_ID:
+ return new AAttributeEditPart(view);
+
+ case AOperationEditPart.VISUAL_ID:
+ return new AOperationEditPart(view);
+
+ case AAttribute2EditPart.VISUAL_ID:
+ return new AAttribute2EditPart(view);
+
+ case AOperation2EditPart.VISUAL_ID:
+ return new AOperation2EditPart(view);
+
+ case AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID:
+ return new AInterfaceAAttributeInterfaceCompartmentEditPart(view);
+
+ case AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID:
+ return new AInterfaceAOperationInterfaceCompartmentEditPart(view);
+
+ case AClassAAttributeCompartmentEditPart.VISUAL_ID:
+ return new AClassAAttributeCompartmentEditPart(view);
+
+ case AClassAOperationClassCompartmentEditPart.VISUAL_ID:
+ return new AClassAOperationClassCompartmentEditPart(view);
+
+ case AClassSubClassesEditPart.VISUAL_ID:
+ return new AClassSubClassesEditPart(view);
+
+ case AClassImplementedInterfacesEditPart.VISUAL_ID:
+ return new AClassImplementedInterfacesEditPart(view);
+
+ case AClassAssociationsEditPart.VISUAL_ID:
+ return new AClassAssociationsEditPart(view);
+
+ case AClassAggregationsEditPart.VISUAL_ID:
+ return new AClassAggregationsEditPart(view);
+
+ case AClassCompositionsEditPart.VISUAL_ID:
+ return new AClassCompositionsEditPart(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 (!text.getFont().isDisposed())
+ {
+ 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);
+ if (!text.getFont().isDisposed())
+ {
+ 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AAttribute2ItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AAttribute2ItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..90490b4ec4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AAttribute2ItemSemanticEditPolicy.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AAttribute2ItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AAttribute2ItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AAttribute_3003);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req)
+ {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation == null)
+ {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ cmd.add(new DestroyElementCommand(req));
+ }
+ else
+ {
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AAttributeItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AAttributeItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..7ec9f46b97
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AAttributeItemSemanticEditPolicy.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AAttributeItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AAttributeItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AAttribute_3001);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req)
+ {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation == null)
+ {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ cmd.add(new DestroyElementCommand(req));
+ }
+ else
+ {
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAAttributeCompartmentCanonicalEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAAttributeCompartmentCanonicalEditPolicy.java
new file mode 100644
index 0000000000..76d83d3cd3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAAttributeCompartmentCanonicalEditPolicy.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramUpdater;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreNodeDescriptor;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AClassAAttributeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ protected List getSemanticChildrenList()
+ {
+ View viewObject = (View)getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<AcoreNodeDescriptor> childDescriptors = AcoreDiagramUpdater
+ .getAClassAAttributeCompartment_7003SemanticChildren(viewObject);
+ for (Iterator<AcoreNodeDescriptor> it = childDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreNodeDescriptor d = it.next();
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isOrphaned(Collection semanticChildren, final View view)
+ {
+ int visualID = AcoreVisualIDRegistry.getVisualID(view);
+ switch (visualID)
+ {
+ case AAttribute2EditPart.VISUAL_ID:
+ if (!semanticChildren.contains(view.getElement()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected EStructuralFeature getFeatureToSynchronize()
+ {
+ return AcorePackage.eINSTANCE.getABasicClass_Attributes();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAAttributeCompartmentItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAAttributeCompartmentItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..e853931e52
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAAttributeCompartmentItemSemanticEditPolicy.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AAttribute2CreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class AClassAAttributeCompartmentItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AClassAAttributeCompartmentItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AClass_2002);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req)
+ {
+ if (AcoreElementTypes.AAttribute_3003 == req.getElementType())
+ {
+ return getGEFWrapper(new AAttribute2CreateCommand(req));
+ }
+ return super.getCreateCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAOperationClassCompartmentCanonicalEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAOperationClassCompartmentCanonicalEditPolicy.java
new file mode 100644
index 0000000000..5228fce162
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAOperationClassCompartmentCanonicalEditPolicy.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramUpdater;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreNodeDescriptor;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AClassAOperationClassCompartmentCanonicalEditPolicy extends CanonicalEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ protected List getSemanticChildrenList()
+ {
+ View viewObject = (View)getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<AcoreNodeDescriptor> childDescriptors = AcoreDiagramUpdater
+ .getAClassAOperationClassCompartment_7004SemanticChildren(viewObject);
+ for (Iterator<AcoreNodeDescriptor> it = childDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreNodeDescriptor d = it.next();
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isOrphaned(Collection semanticChildren, final View view)
+ {
+ int visualID = AcoreVisualIDRegistry.getVisualID(view);
+ switch (visualID)
+ {
+ case AOperation2EditPart.VISUAL_ID:
+ if (!semanticChildren.contains(view.getElement()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected EStructuralFeature getFeatureToSynchronize()
+ {
+ return AcorePackage.eINSTANCE.getABasicClass_Operations();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAOperationClassCompartmentItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAOperationClassCompartmentItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..5d7724dbe8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAOperationClassCompartmentItemSemanticEditPolicy.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AOperation2CreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class AClassAOperationClassCompartmentItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AClassAOperationClassCompartmentItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AClass_2002);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req)
+ {
+ if (AcoreElementTypes.AOperation_3004 == req.getElementType())
+ {
+ return getGEFWrapper(new AOperation2CreateCommand(req));
+ }
+ return super.getCreateCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAggregationsItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAggregationsItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..0d369a3d4f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAggregationsItemSemanticEditPolicy.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+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 AClassAggregationsItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AClassAggregationsItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AClassAggregations_4004);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req)
+ {
+ return getGEFWrapper(new DestroyReferenceCommand(req));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAssociationsItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAssociationsItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..10e99c61df
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassAssociationsItemSemanticEditPolicy.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+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 AClassAssociationsItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AClassAssociationsItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AClassAssociations_4003);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req)
+ {
+ return getGEFWrapper(new DestroyReferenceCommand(req));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassCompositionsItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassCompositionsItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..8acc83b591
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassCompositionsItemSemanticEditPolicy.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+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 AClassCompositionsItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AClassCompositionsItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AClassCompositions_4005);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req)
+ {
+ return getGEFWrapper(new DestroyReferenceCommand(req));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassImplementedInterfacesItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassImplementedInterfacesItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..0655263a3e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassImplementedInterfacesItemSemanticEditPolicy.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+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 AClassImplementedInterfacesItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AClassImplementedInterfacesItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AClassImplementedInterfaces_4002);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req)
+ {
+ return getGEFWrapper(new DestroyReferenceCommand(req));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..7c9ec3575c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassItemSemanticEditPolicy.java
@@ -0,0 +1,303 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassAggregationsCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassAggregationsReorientCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassAssociationsCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassAssociationsReorientCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassCompositionsCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassCompositionsReorientCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassImplementedInterfacesCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassImplementedInterfacesReorientCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassSubClassesCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassSubClassesReorientCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAAttributeCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAOperationClassCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAggregationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAssociationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassCompositionsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassImplementedInterfacesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassSubClassesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
+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.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AClassItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AClassItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AClass_2002);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req)
+ {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
+ for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();)
+ {
+ Edge incomingLink = (Edge)it.next();
+ if (AcoreVisualIDRegistry.getVisualID(incomingLink) == AClassSubClassesEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null,
+ incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ continue;
+ }
+ if (AcoreVisualIDRegistry.getVisualID(incomingLink) == AClassAssociationsEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null,
+ incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ continue;
+ }
+ if (AcoreVisualIDRegistry.getVisualID(incomingLink) == AClassAggregationsEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null,
+ incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ continue;
+ }
+ if (AcoreVisualIDRegistry.getVisualID(incomingLink) == AClassCompositionsEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null,
+ incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ continue;
+ }
+ }
+ for (Iterator it = view.getSourceEdges().iterator(); it.hasNext();)
+ {
+ Edge outgoingLink = (Edge)it.next();
+ if (AcoreVisualIDRegistry.getVisualID(outgoingLink) == AClassSubClassesEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null,
+ outgoingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ continue;
+ }
+ if (AcoreVisualIDRegistry.getVisualID(outgoingLink) == AClassImplementedInterfacesEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null,
+ outgoingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ continue;
+ }
+ if (AcoreVisualIDRegistry.getVisualID(outgoingLink) == AClassAssociationsEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null,
+ outgoingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ continue;
+ }
+ if (AcoreVisualIDRegistry.getVisualID(outgoingLink) == AClassAggregationsEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null,
+ outgoingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ continue;
+ }
+ if (AcoreVisualIDRegistry.getVisualID(outgoingLink) == AClassCompositionsEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null,
+ outgoingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ continue;
+ }
+ }
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation == null)
+ {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ cmd.add(new DestroyElementCommand(req));
+ }
+ else
+ {
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ private void addDestroyChildNodesCommand(ICompositeCommand cmd)
+ {
+ View view = (View)getHost().getModel();
+ for (Iterator nit = view.getChildren().iterator(); nit.hasNext();)
+ {
+ Node node = (Node)nit.next();
+ switch (AcoreVisualIDRegistry.getVisualID(node))
+ {
+ case AClassAAttributeCompartmentEditPart.VISUAL_ID:
+ for (Iterator cit = node.getChildren().iterator(); cit.hasNext();)
+ {
+ Node cnode = (Node)cit.next();
+ switch (AcoreVisualIDRegistry.getVisualID(cnode))
+ {
+ case AAttribute2EditPart.VISUAL_ID:
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ }
+ }
+ break;
+ case AClassAOperationClassCompartmentEditPart.VISUAL_ID:
+ for (Iterator cit = node.getChildren().iterator(); cit.hasNext();)
+ {
+ Node cnode = (Node)cit.next();
+ switch (AcoreVisualIDRegistry.getVisualID(cnode))
+ {
+ case AOperation2EditPart.VISUAL_ID:
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @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 (AcoreElementTypes.AClassSubClasses_4001 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassSubClassesCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (AcoreElementTypes.AClassImplementedInterfaces_4002 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassImplementedInterfacesCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (AcoreElementTypes.AClassAssociations_4003 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassAssociationsCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (AcoreElementTypes.AClassAggregations_4004 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassAggregationsCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (AcoreElementTypes.AClassCompositions_4005 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassCompositionsCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req)
+ {
+ if (AcoreElementTypes.AClassSubClasses_4001 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassSubClassesCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (AcoreElementTypes.AClassImplementedInterfaces_4002 == req.getElementType())
+ {
+ return null;
+ }
+ if (AcoreElementTypes.AClassAssociations_4003 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassAssociationsCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (AcoreElementTypes.AClassAggregations_4004 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassAggregationsCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (AcoreElementTypes.AClassCompositions_4005 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassCompositionsCreateCommand(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 AClassSubClassesEditPart.VISUAL_ID:
+ return getGEFWrapper(new AClassSubClassesReorientCommand(req));
+ case AClassImplementedInterfacesEditPart.VISUAL_ID:
+ return getGEFWrapper(new AClassImplementedInterfacesReorientCommand(req));
+ case AClassAssociationsEditPart.VISUAL_ID:
+ return getGEFWrapper(new AClassAssociationsReorientCommand(req));
+ case AClassAggregationsEditPart.VISUAL_ID:
+ return getGEFWrapper(new AClassAggregationsReorientCommand(req));
+ case AClassCompositionsEditPart.VISUAL_ID:
+ return getGEFWrapper(new AClassCompositionsReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassSubClassesItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassSubClassesItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..bec87f03ef
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AClassSubClassesItemSemanticEditPolicy.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+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 AClassSubClassesItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AClassSubClassesItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AClassSubClasses_4001);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req)
+ {
+ return getGEFWrapper(new DestroyReferenceCommand(req));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/ACoreRootCanonicalEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/ACoreRootCanonicalEditPolicy.java
new file mode 100644
index 0000000000..fa983769ad
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/ACoreRootCanonicalEditPolicy.java
@@ -0,0 +1,345 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import java.util.ArrayList;
+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.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramUpdater;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreLinkDescriptor;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreNodeDescriptor;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+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.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class ACoreRootCanonicalEditPolicy extends CanonicalEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ protected List getSemanticChildrenList()
+ {
+ View viewObject = (View)getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<AcoreNodeDescriptor> childDescriptors = AcoreDiagramUpdater.getACoreRoot_1000SemanticChildren(viewObject);
+ for (Iterator<AcoreNodeDescriptor> it = childDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreNodeDescriptor d = it.next();
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean shouldDeleteView(View view)
+ {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isOrphaned(Collection semanticChildren, final View view)
+ {
+ int visualID = AcoreVisualIDRegistry.getVisualID(view);
+ switch (visualID)
+ {
+ case AInterfaceEditPart.VISUAL_ID:
+ case AClassEditPart.VISUAL_ID:
+ if (!semanticChildren.contains(view.getElement()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected Set getFeaturesToSynchronize()
+ {
+ if (myFeaturesToSynchronize == null)
+ {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(AcorePackage.eINSTANCE.getACoreRoot_Interfaces());
+ myFeaturesToSynchronize.add(AcorePackage.eINSTANCE.getACoreRoot_Classes());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshSemantic()
+ {
+ if (resolveSemanticElement() == null)
+ {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ // refreshSemanticChildren() alternative
+ List<AcoreNodeDescriptor> childDescriptors = AcoreDiagramUpdater.getACoreRoot_1000SemanticChildren((View)getHost()
+ .getModel());
+ ArrayList<EObject> semanticChildren = new ArrayList<EObject>(childDescriptors.size());
+ for (Iterator<AcoreNodeDescriptor> it = childDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreNodeDescriptor next = it.next();
+ semanticChildren.add(next.getModelElement());
+ }
+ List<View> orphaned = cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren);
+ boolean changed = deleteViews(orphaned.iterator());
+ // leave descriptors that reference survived semanticChildren.
+ // NOTE, we may want to stop using cleanCanonicalSemanticChildren() here, replacing with own code, that respects NodeDescriptors
+ for (Iterator<AcoreNodeDescriptor> it = childDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreNodeDescriptor next = it.next();
+ if (!semanticChildren.contains(next.getModelElement()))
+ {
+ it.remove();
+ }
+ }
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(
+ childDescriptors.size());
+ for (Iterator<AcoreNodeDescriptor> it = childDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreNodeDescriptor next = it.next();
+ String hint = AcoreVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ viewDescriptors.add(new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND,
+ false, host().getDiagramPreferencesHint()));
+ }
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute())
+ {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ createdViews.addAll((List<IAdaptable>)request.getNewObject());
+ }
+ if (changed || createdViews.size() > 0)
+ {
+ postProcessRefreshSemantic(createdViews);
+ }
+ Collection<IAdaptable> createdConnectionViews = 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<IAdaptable> refreshConnections()
+ {
+ Map<EObject, View> domain2NotationMap = new HashMap<EObject, View>();
+ Collection<AcoreLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap);
+ Collection existingLinks = new LinkedList(getDiagram().getEdges());
+ for (Iterator linksIterator = existingLinks.iterator(); linksIterator.hasNext();)
+ {
+ Edge nextDiagramLink = (Edge)linksIterator.next();
+ int diagramLinkVisualID = AcoreVisualIDRegistry.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<AcoreLinkDescriptor> linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator
+ .hasNext();)
+ {
+ AcoreLinkDescriptor nextLinkDescriptor = linkDescriptorsIterator.next();
+ if (diagramLinkObject == nextLinkDescriptor.getModelElement()
+ && diagramLinkSrc == nextLinkDescriptor.getSource()
+ && diagramLinkDst == nextLinkDescriptor.getDestination()
+ && diagramLinkVisualID == nextLinkDescriptor.getVisualID())
+ {
+ linksIterator.remove();
+ linkDescriptorsIterator.remove();
+ break;
+ }
+ }
+ }
+ deleteViews(existingLinks.iterator());
+ return createConnections(linkDescriptors, domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<AcoreLinkDescriptor> collectAllLinks(View view, Map<EObject, View> domain2NotationMap)
+ {
+ if (!ACoreRootEditPart.MODEL_ID.equals(AcoreVisualIDRegistry.getModelID(view)))
+ {
+ return Collections.emptyList();
+ }
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ switch (AcoreVisualIDRegistry.getVisualID(view))
+ {
+ case ACoreRootEditPart.VISUAL_ID:
+ {
+ if (!domain2NotationMap.containsKey(view.getElement()))
+ {
+ result.addAll(AcoreDiagramUpdater.getACoreRoot_1000ContainedLinks(view));
+ }
+ if (!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
+ domain2NotationMap.put(view.getElement(), view);
+ }
+ break;
+ }
+ case AInterfaceEditPart.VISUAL_ID:
+ {
+ if (!domain2NotationMap.containsKey(view.getElement()))
+ {
+ result.addAll(AcoreDiagramUpdater.getAInterface_2001ContainedLinks(view));
+ }
+ if (!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
+ domain2NotationMap.put(view.getElement(), view);
+ }
+ break;
+ }
+ case AClassEditPart.VISUAL_ID:
+ {
+ if (!domain2NotationMap.containsKey(view.getElement()))
+ {
+ result.addAll(AcoreDiagramUpdater.getAClass_2002ContainedLinks(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<IAdaptable> createConnections(Collection<AcoreLinkDescriptor> linkDescriptors,
+ Map<EObject, View> domain2NotationMap)
+ {
+ LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
+ for (Iterator<AcoreLinkDescriptor> it = linkDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreLinkDescriptor nextLinkDescriptor = it.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(), String.valueOf(nextLinkDescriptor.getVisualID()), 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<EObject, View> domain2NotationMap)
+ {
+ View view = (View)domain2NotationMap.get(domainModelElement);
+ if (view != null)
+ {
+ return (EditPart)getHost().getViewer().getEditPartRegistry().get(view);
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/ACoreRootItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/ACoreRootItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..b9527ecdc5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/ACoreRootItemSemanticEditPolicy.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AInterfaceCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+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 ACoreRootItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public ACoreRootItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.ACoreRoot_1000);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req)
+ {
+ if (AcoreElementTypes.AInterface_2001 == req.getElementType())
+ {
+ return getGEFWrapper(new AInterfaceCreateCommand(req));
+ }
+ if (AcoreElementTypes.AClass_2002 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassCreateCommand(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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy.java
new file mode 100644
index 0000000000..141a755943
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramUpdater;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreNodeDescriptor;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy extends CanonicalEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ protected List getSemanticChildrenList()
+ {
+ View viewObject = (View)getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<AcoreNodeDescriptor> childDescriptors = AcoreDiagramUpdater
+ .getAInterfaceAAttributeInterfaceCompartment_7001SemanticChildren(viewObject);
+ for (Iterator<AcoreNodeDescriptor> it = childDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreNodeDescriptor d = it.next();
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isOrphaned(Collection semanticChildren, final View view)
+ {
+ int visualID = AcoreVisualIDRegistry.getVisualID(view);
+ switch (visualID)
+ {
+ case AAttributeEditPart.VISUAL_ID:
+ if (!semanticChildren.contains(view.getElement()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected EStructuralFeature getFeatureToSynchronize()
+ {
+ return AcorePackage.eINSTANCE.getABasicClass_Attributes();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..4e45637021
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AAttributeCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AInterface_2001);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req)
+ {
+ if (AcoreElementTypes.AAttribute_3001 == req.getElementType())
+ {
+ return getGEFWrapper(new AAttributeCreateCommand(req));
+ }
+ return super.getCreateCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy.java
new file mode 100644
index 0000000000..e4662c9fdb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramUpdater;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreNodeDescriptor;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy extends CanonicalEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ protected List getSemanticChildrenList()
+ {
+ View viewObject = (View)getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<AcoreNodeDescriptor> childDescriptors = AcoreDiagramUpdater
+ .getAInterfaceAOperationInterfaceCompartment_7002SemanticChildren(viewObject);
+ for (Iterator<AcoreNodeDescriptor> it = childDescriptors.iterator(); it.hasNext();)
+ {
+ AcoreNodeDescriptor d = it.next();
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isOrphaned(Collection semanticChildren, final View view)
+ {
+ int visualID = AcoreVisualIDRegistry.getVisualID(view);
+ switch (visualID)
+ {
+ case AOperationEditPart.VISUAL_ID:
+ if (!semanticChildren.contains(view.getElement()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected EStructuralFeature getFeatureToSynchronize()
+ {
+ return AcorePackage.eINSTANCE.getABasicClass_Operations();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..678a84f06b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AOperationCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AInterface_2001);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req)
+ {
+ if (AcoreElementTypes.AOperation_3002 == req.getElementType())
+ {
+ return getGEFWrapper(new AOperationCreateCommand(req));
+ }
+ return super.getCreateCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..6669573eba
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AInterfaceItemSemanticEditPolicy.java
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassImplementedInterfacesCreateCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.commands.AClassImplementedInterfacesReorientCommand;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassImplementedInterfacesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAAttributeInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAOperationInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
+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.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AInterfaceItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AInterfaceItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AInterface_2001);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req)
+ {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
+ for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();)
+ {
+ Edge incomingLink = (Edge)it.next();
+ if (AcoreVisualIDRegistry.getVisualID(incomingLink) == AClassImplementedInterfacesEditPart.VISUAL_ID)
+ {
+ DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null,
+ incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ continue;
+ }
+ }
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation == null)
+ {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ cmd.add(new DestroyElementCommand(req));
+ }
+ else
+ {
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ private void addDestroyChildNodesCommand(ICompositeCommand cmd)
+ {
+ View view = (View)getHost().getModel();
+ for (Iterator nit = view.getChildren().iterator(); nit.hasNext();)
+ {
+ Node node = (Node)nit.next();
+ switch (AcoreVisualIDRegistry.getVisualID(node))
+ {
+ case AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID:
+ for (Iterator cit = node.getChildren().iterator(); cit.hasNext();)
+ {
+ Node cnode = (Node)cit.next();
+ switch (AcoreVisualIDRegistry.getVisualID(cnode))
+ {
+ case AAttributeEditPart.VISUAL_ID:
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ }
+ }
+ break;
+ case AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID:
+ for (Iterator cit = node.getChildren().iterator(); cit.hasNext();)
+ {
+ Node cnode = (Node)cit.next();
+ switch (AcoreVisualIDRegistry.getVisualID(cnode))
+ {
+ case AOperationEditPart.VISUAL_ID:
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @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 (AcoreElementTypes.AClassImplementedInterfaces_4002 == req.getElementType())
+ {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req)
+ {
+ if (AcoreElementTypes.AClassImplementedInterfaces_4002 == req.getElementType())
+ {
+ return getGEFWrapper(new AClassImplementedInterfacesCreateCommand(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 AClassImplementedInterfacesEditPart.VISUAL_ID:
+ return getGEFWrapper(new AClassImplementedInterfacesReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AOperation2ItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AOperation2ItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..d0921cadb0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AOperation2ItemSemanticEditPolicy.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AOperation2ItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AOperation2ItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AOperation_3004);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req)
+ {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation == null)
+ {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ cmd.add(new DestroyElementCommand(req));
+ }
+ else
+ {
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AOperationItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AOperationItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..e78cdc177b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AOperationItemSemanticEditPolicy.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AOperationItemSemanticEditPolicy extends AcoreBaseItemSemanticEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ public AOperationItemSemanticEditPolicy()
+ {
+ super(AcoreElementTypes.AOperation_3002);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req)
+ {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation == null)
+ {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ cmd.add(new DestroyElementCommand(req));
+ }
+ else
+ {
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreBaseItemSemanticEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreBaseItemSemanticEditPolicy.java
new file mode 100644
index 0000000000..94789ea680
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreBaseItemSemanticEditPolicy.java
@@ -0,0 +1,470 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.helpers.AcoreBaseEditHelper;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+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.emf.commands.core.command.CompositeTransactionalCommand;
+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.View;
+
+/**
+ * @generated
+ */
+public class AcoreBaseItemSemanticEditPolicy extends SemanticEditPolicy
+{
+
+ /**
+ * Extended request data key to hold editpart visual id.
+ * @generated
+ */
+ public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final IElementType myElementType;
+
+ /**
+ * @generated
+ */
+ protected AcoreBaseItemSemanticEditPolicy(IElementType elementType)
+ {
+ myElementType = elementType;
+ }
+
+ /**
+ * 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(AcoreVisualIDRegistry.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);
+ Command semanticCommand = getSemanticCommandSwitch(completedRequest);
+ semanticCommand = getEditHelperCommand(completedRequest, semanticCommand);
+ if (completedRequest instanceof DestroyRequest)
+ {
+ DestroyRequest destroyRequest = (DestroyRequest)completedRequest;
+ return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
+ }
+ return semanticCommand;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest)
+ {
+ Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
+ return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
+ }
+
+ /**
+ * @generated
+ */
+ private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand)
+ {
+ if (editPolicyCommand != null)
+ {
+ ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy)editPolicyCommand).getICommand()
+ : new CommandProxy(editPolicyCommand);
+ request.setParameter(AcoreBaseEditHelper.EDIT_POLICY_COMMAND, command);
+ }
+ IElementType requestContextElementType = getContextElementType(request);
+ request.setParameter(AcoreBaseEditHelper.CONTEXT_ELEMENT_TYPE, requestContextElementType);
+ ICommand command = requestContextElementType.getEditCommand(request);
+ request.setParameter(AcoreBaseEditHelper.EDIT_POLICY_COMMAND, null);
+ request.setParameter(AcoreBaseEditHelper.CONTEXT_ELEMENT_TYPE, null);
+ if (command != null)
+ {
+ if (!(command instanceof CompositeTransactionalCommand))
+ {
+ command = new CompositeTransactionalCommand(getEditingDomain(), command.getLabel()).compose(command);
+ }
+ return new ICommandProxy(command);
+ }
+ return editPolicyCommand;
+ }
+
+ /**
+ * @generated
+ */
+ private IElementType getContextElementType(IEditCommandRequest request)
+ {
+ IElementType requestContextElementType = AcoreElementTypes.getElementType(getVisualID(request));
+ return requestContextElementType != null ? requestContextElementType : myElementType;
+ }
+
+ /**
+ * @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);
+ }
+
+ /**
+ * Returns editing domain from the host edit part.
+ * @generated
+ */
+ protected TransactionalEditingDomain getEditingDomain()
+ {
+ return ((IGraphicalEditPart)getHost()).getEditingDomain();
+ }
+
+ /**
+ * Clean all shortcuts to the host element from the same diagram
+ * @generated
+ */
+ protected void addDestroyShortcutsCommand(ICompositeCommand cmd, View view)
+ {
+ assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
+ 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;
+ }
+ cmd.add(new DeleteCommand(getEditingDomain(), nextView));
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static class LinkConstraints
+ {
+
+ /**
+ * @generated
+ */
+ public static boolean canCreateAClassSubClasses_4001(AClass source, AClass target)
+ {
+ if (source != null)
+ {
+ if (source.getSubClasses().contains(target))
+ {
+ return false;
+ }
+ }
+
+ return canExistAClassSubClasses_4001(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canCreateAClassImplementedInterfaces_4002(AClass source, AInterface target)
+ {
+ if (source != null)
+ {
+ if (source.getImplementedInterfaces().contains(target))
+ {
+ return false;
+ }
+ }
+
+ return canExistAClassImplementedInterfaces_4002(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canCreateAClassAssociations_4003(AClass source, AClass target)
+ {
+ if (source != null)
+ {
+ if (source.getAssociations().contains(target))
+ {
+ return false;
+ }
+ }
+
+ return canExistAClassAssociations_4003(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canCreateAClassAggregations_4004(AClass source, AClass target)
+ {
+ if (source != null)
+ {
+ if (source.getAggregations().contains(target))
+ {
+ return false;
+ }
+ }
+
+ return canExistAClassAggregations_4004(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canCreateAClassCompositions_4005(AClass source, AClass target)
+ {
+ if (source != null)
+ {
+ if (source.getCompositions().contains(target))
+ {
+ return false;
+ }
+ }
+
+ return canExistAClassCompositions_4005(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canExistAClassSubClasses_4001(AClass source, AClass target)
+ {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canExistAClassImplementedInterfaces_4002(AClass source, AInterface target)
+ {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canExistAClassAssociations_4003(AClass source, AClass target)
+ {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canExistAClassAggregations_4004(AClass source, AClass target)
+ {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canExistAClassCompositions_4005(AClass source, AClass target)
+ {
+ return true;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreTextNonResizableEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreTextNonResizableEditPolicy.java
new file mode 100644
index 0000000000..9c76be610b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreTextNonResizableEditPolicy.java
@@ -0,0 +1,281 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.FigureListener;
+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 AcoreTextNonResizableEditPolicy extends NonResizableEditPolicyEx
+{
+
+ /**
+ * @generated
+ */
+ private IFigure selectionFeedbackFigure;
+
+ /**
+ * @generated
+ */
+ private IFigure focusFeedbackFigure;
+
+ /**
+ * @generated
+ */
+ private FigureListener hostPositionListener;
+
+ /**
+ * @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());
+ getHostFigure().addFigureListener(getHostPositionListener());
+ refreshSelectionFeedback();
+ hideFocus();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void hideSelection()
+ {
+ if (getHostFigure() instanceof WrappingLabel)
+ {
+ ((WrappingLabel)getHostFigure()).setSelected(false);
+ ((WrappingLabel)getHostFigure()).setFocus(false);
+ }
+ else
+ {
+ if (selectionFeedbackFigure != null)
+ {
+ removeFeedback(selectionFeedbackFigure);
+ getHostFigure().removeFigureListener(getHostPositionListener());
+ 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
+ */
+ private FigureListener getHostPositionListener()
+ {
+ if (hostPositionListener == null)
+ {
+ hostPositionListener = new FigureListener()
+ {
+ public void figureMoved(IFigure source)
+ {
+ refreshFeedback();
+ }
+ };
+ }
+ return hostPositionListener;
+ }
+
+ /**
+ * @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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreTextSelectionEditPolicy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreTextSelectionEditPolicy.java
new file mode 100644
index 0000000000..cf7715cb84
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/edit/policies/AcoreTextSelectionEditPolicy.java
@@ -0,0 +1,264 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.policies;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FigureListener;
+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 AcoreTextSelectionEditPolicy extends SelectionEditPolicy
+{
+
+ /**
+ * @generated
+ */
+ private IFigure selectionFeedbackFigure;
+
+ /**
+ * @generated
+ */
+ private IFigure focusFeedbackFigure;
+
+ /**
+ * @generated
+ */
+ private FigureListener hostPositionListener;
+
+ /**
+ * @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());
+ getHostFigure().addFigureListener(getHostPositionListener());
+ refreshSelectionFeedback();
+ hideFocus();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void hideSelection()
+ {
+ if (getHostFigure() instanceof WrappingLabel)
+ {
+ ((WrappingLabel)getHostFigure()).setSelected(false);
+ ((WrappingLabel)getHostFigure()).setFocus(false);
+ }
+ else
+ {
+ if (selectionFeedbackFigure != null)
+ {
+ removeFeedback(selectionFeedbackFigure);
+ getHostFigure().removeFigureListener(getHostPositionListener());
+ 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
+ */
+ private FigureListener getHostPositionListener()
+ {
+ if (hostPositionListener == null)
+ {
+ hostPositionListener = new FigureListener()
+ {
+ public void figureMoved(IFigure source)
+ {
+ refreshFeedback();
+ }
+ };
+ }
+ return hostPositionListener;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreAbstractNavigatorItem.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreAbstractNavigatorItem.java
new file mode 100644
index 0000000000..78db1dd7c5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreAbstractNavigatorItem.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreAbstractNavigatorItem extends PlatformObject
+{
+
+ /**
+ * @generated
+ */
+ static
+ {
+ final Class[] supportedTypes = new Class[] { ITabbedPropertySheetPageContributor.class };
+ final ITabbedPropertySheetPageContributor propertySheetPageContributor = new ITabbedPropertySheetPageContributor()
+ {
+ public String getContributorId()
+ {
+ return "org.eclipse.emf.cdo.dawn.examples.acore.diagram"; //$NON-NLS-1$
+ }
+ };
+ Platform.getAdapterManager().registerAdapters(new IAdapterFactory()
+ {
+
+ public Object getAdapter(Object adaptableObject, Class adapterType)
+ {
+ if (adaptableObject instanceof org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreAbstractNavigatorItem
+ && adapterType == ITabbedPropertySheetPageContributor.class)
+ {
+ return propertySheetPageContributor;
+ }
+ return null;
+ }
+
+ public Class[] getAdapterList()
+ {
+ return supportedTypes;
+ }
+ }, org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreAbstractNavigatorItem.class);
+ }
+
+ /**
+ * @generated
+ */
+ private Object myParent;
+
+ /**
+ * @generated
+ */
+ protected AcoreAbstractNavigatorItem(Object parent)
+ {
+ myParent = parent;
+ }
+
+ /**
+ * @generated
+ */
+ public Object getParent()
+ {
+ return myParent;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorContentProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorContentProvider.java
new file mode 100644
index 0000000000..94aefec247
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorContentProvider.java
@@ -0,0 +1,262 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+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.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 AcoreDomainNavigatorContentProvider 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 AcoreDomainNavigatorContentProvider()
+ {
+ myAdapterFctoryContentProvier = new AdapterFactoryContentProvider(AcoreDiagramEditorPlugin.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 AcoreDomainNavigatorItem)
+ {
+ return wrapEObjects(myAdapterFctoryContentProvier.getChildren(((AcoreDomainNavigatorItem)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 AcoreDomainNavigatorItem((EObject)objects[i], parentElement, myAdapterFctoryContentProvier));
+ }
+ }
+ return result.toArray();
+ }
+
+ /**
+ * @generated
+ */
+ public Object getParent(Object element)
+ {
+ if (element instanceof AcoreAbstractNavigatorItem)
+ {
+ AcoreAbstractNavigatorItem abstractNavigatorItem = (AcoreAbstractNavigatorItem)element;
+ return abstractNavigatorItem.getParent();
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean hasChildren(Object element)
+ {
+ return element instanceof IFile || getChildren(element).length > 0;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorItem.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorItem.java
new file mode 100644
index 0000000000..feb7e61762
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorItem.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreDomainNavigatorItem 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.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorItem)
+ {
+ org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorItem domainNavigatorItem = (org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorItem)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.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorItem.class);
+ }
+
+ /**
+ * @generated
+ */
+ private Object myParent;
+
+ /**
+ * @generated
+ */
+ private EObject myEObject;
+
+ /**
+ * @generated
+ */
+ private IPropertySourceProvider myPropertySourceProvider;
+
+ /**
+ * @generated
+ */
+ public AcoreDomainNavigatorItem(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.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorItem)
+ {
+ return EcoreUtil.getURI(getEObject()).equals(
+ EcoreUtil.getURI(((org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreDomainNavigatorItem)obj)
+ .getEObject()));
+ }
+ return super.equals(obj);
+ }
+
+ /**
+ * @generated
+ */
+ public int hashCode()
+ {
+ return EcoreUtil.getURI(getEObject()).hashCode();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorLabelProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorLabelProvider.java
new file mode 100644
index 0000000000..6a0b8c2e81
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreDomainNavigatorLabelProvider.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+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 AcoreDomainNavigatorLabelProvider implements ICommonLabelProvider
+{
+
+ /**
+ * @generated
+ */
+ private AdapterFactoryLabelProvider myAdapterFactoryLabelProvider = new AdapterFactoryLabelProvider(
+ AcoreDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
+
+ /**
+ * @generated
+ */
+ public void init(ICommonContentExtensionSite aConfig)
+ {
+ }
+
+ /**
+ * @generated
+ */
+ public Image getImage(Object element)
+ {
+ if (element instanceof AcoreDomainNavigatorItem)
+ {
+ return myAdapterFactoryLabelProvider.getImage(((AcoreDomainNavigatorItem)element).getEObject());
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public String getText(Object element)
+ {
+ if (element instanceof AcoreDomainNavigatorItem)
+ {
+ return myAdapterFactoryLabelProvider.getText(((AcoreDomainNavigatorItem)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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorActionProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorActionProvider.java
new file mode 100644
index 0000000000..b12a64d233
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorActionProvider.java
@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditor;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+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.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 AcoreNavigatorActionProvider 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 AcoreNavigatorItem)
+ {
+ selectedElement = ((AcoreNavigatorItem)selectedElement).getView();
+ }
+ else if (selectedElement instanceof IAdaptable)
+ {
+ selectedElement = ((IAdaptable)selectedElement).getAdapter(View.class);
+ }
+ if (selectedElement instanceof Diagram)
+ {
+ Diagram diagram = (Diagram)selectedElement;
+ if (ACoreRootEditPart.MODEL_ID.equals(AcoreVisualIDRegistry.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, AcoreDiagramEditor.ID);
+ }
+ catch (PartInitException e)
+ {
+ AcoreDiagramEditorPlugin.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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorContentProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorContentProvider.java
new file mode 100644
index 0000000000..326bc5a30c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorContentProvider.java
@@ -0,0 +1,665 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAAttributeCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAOperationClassCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAggregationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAssociationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassCompositionsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassImplementedInterfacesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassSubClassesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAAttributeInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAOperationInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+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.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+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 AcoreNavigatorContentProvider 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 AcoreNavigatorContentProvider()
+ {
+ 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);
+ ArrayList<AcoreNavigatorItem> result = new ArrayList<AcoreNavigatorItem>();
+ ArrayList<View> topViews = new ArrayList<View>(resource.getContents().size());
+ for (Iterator<EObject> it = resource.getContents().iterator(); it.hasNext();)
+ {
+ EObject o = it.next();
+ if (o instanceof View)
+ {
+ topViews.add((View)o);
+ }
+ }
+ result.addAll(createNavigatorItems(selectViewsByType(topViews, ACoreRootEditPart.MODEL_ID), file, false));
+ return result.toArray();
+ }
+
+ if (parentElement instanceof AcoreNavigatorGroup)
+ {
+ AcoreNavigatorGroup group = (AcoreNavigatorGroup)parentElement;
+ return group.getChildren();
+ }
+
+ if (parentElement instanceof AcoreNavigatorItem)
+ {
+ AcoreNavigatorItem navigatorItem = (AcoreNavigatorItem)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 (AcoreVisualIDRegistry.getVisualID(view))
+ {
+
+ case AClassSubClassesEditPart.VISUAL_ID:
+ {
+ LinkedList<AcoreAbstractNavigatorItem> result = new LinkedList<AcoreAbstractNavigatorItem>();
+ AcoreNavigatorGroup target = new AcoreNavigatorGroup(Messages.NavigatorGroupName_AClassSubClasses_4001_target,
+ "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ AcoreNavigatorGroup source = new AcoreNavigatorGroup(Messages.NavigatorGroupName_AClassSubClasses_4001_source,
+ "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getLinksTargetByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ target.addChildren(createNavigatorItems(connectedViews, target, true));
+ connectedViews = getLinksSourceByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ source.addChildren(createNavigatorItems(connectedViews, source, true));
+ if (!target.isEmpty())
+ {
+ result.add(target);
+ }
+ if (!source.isEmpty())
+ {
+ result.add(source);
+ }
+ return result.toArray();
+ }
+
+ case AClassCompositionsEditPart.VISUAL_ID:
+ {
+ LinkedList<AcoreAbstractNavigatorItem> result = new LinkedList<AcoreAbstractNavigatorItem>();
+ AcoreNavigatorGroup target = new AcoreNavigatorGroup(Messages.NavigatorGroupName_AClassCompositions_4005_target,
+ "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ AcoreNavigatorGroup source = new AcoreNavigatorGroup(Messages.NavigatorGroupName_AClassCompositions_4005_source,
+ "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getLinksTargetByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ target.addChildren(createNavigatorItems(connectedViews, target, true));
+ connectedViews = getLinksSourceByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ source.addChildren(createNavigatorItems(connectedViews, source, true));
+ if (!target.isEmpty())
+ {
+ result.add(target);
+ }
+ if (!source.isEmpty())
+ {
+ result.add(source);
+ }
+ return result.toArray();
+ }
+
+ case AInterfaceEditPart.VISUAL_ID:
+ {
+ LinkedList<AcoreAbstractNavigatorItem> result = new LinkedList<AcoreAbstractNavigatorItem>();
+ AcoreNavigatorGroup incominglinks = new AcoreNavigatorGroup(
+ Messages.NavigatorGroupName_AInterface_2001_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getChildrenByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID));
+ connectedViews = getChildrenByType(connectedViews, AcoreVisualIDRegistry.getType(AAttributeEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID));
+ connectedViews = getChildrenByType(connectedViews, AcoreVisualIDRegistry.getType(AOperationEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getIncomingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassImplementedInterfacesEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
+ if (!incominglinks.isEmpty())
+ {
+ result.add(incominglinks);
+ }
+ return result.toArray();
+ }
+
+ case AClassAggregationsEditPart.VISUAL_ID:
+ {
+ LinkedList<AcoreAbstractNavigatorItem> result = new LinkedList<AcoreAbstractNavigatorItem>();
+ AcoreNavigatorGroup target = new AcoreNavigatorGroup(Messages.NavigatorGroupName_AClassAggregations_4004_target,
+ "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ AcoreNavigatorGroup source = new AcoreNavigatorGroup(Messages.NavigatorGroupName_AClassAggregations_4004_source,
+ "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getLinksTargetByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ target.addChildren(createNavigatorItems(connectedViews, target, true));
+ connectedViews = getLinksSourceByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ source.addChildren(createNavigatorItems(connectedViews, source, true));
+ if (!target.isEmpty())
+ {
+ result.add(target);
+ }
+ if (!source.isEmpty())
+ {
+ result.add(source);
+ }
+ return result.toArray();
+ }
+
+ case AClassImplementedInterfacesEditPart.VISUAL_ID:
+ {
+ LinkedList<AcoreAbstractNavigatorItem> result = new LinkedList<AcoreAbstractNavigatorItem>();
+ AcoreNavigatorGroup target = new AcoreNavigatorGroup(
+ Messages.NavigatorGroupName_AClassImplementedInterfaces_4002_target,
+ "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ AcoreNavigatorGroup source = new AcoreNavigatorGroup(
+ Messages.NavigatorGroupName_AClassImplementedInterfaces_4002_source,
+ "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getLinksTargetByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AInterfaceEditPart.VISUAL_ID));
+ target.addChildren(createNavigatorItems(connectedViews, target, true));
+ connectedViews = getLinksSourceByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ source.addChildren(createNavigatorItems(connectedViews, source, true));
+ if (!target.isEmpty())
+ {
+ result.add(target);
+ }
+ if (!source.isEmpty())
+ {
+ result.add(source);
+ }
+ return result.toArray();
+ }
+
+ case AClassEditPart.VISUAL_ID:
+ {
+ LinkedList<AcoreAbstractNavigatorItem> result = new LinkedList<AcoreAbstractNavigatorItem>();
+ AcoreNavigatorGroup incominglinks = new AcoreNavigatorGroup(
+ Messages.NavigatorGroupName_AClass_2002_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ AcoreNavigatorGroup outgoinglinks = new AcoreNavigatorGroup(
+ Messages.NavigatorGroupName_AClass_2002_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getChildrenByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassAAttributeCompartmentEditPart.VISUAL_ID));
+ connectedViews = getChildrenByType(connectedViews, AcoreVisualIDRegistry.getType(AAttribute2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassAOperationClassCompartmentEditPart.VISUAL_ID));
+ connectedViews = getChildrenByType(connectedViews, AcoreVisualIDRegistry.getType(AOperation2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getIncomingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassSubClassesEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassSubClassesEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassImplementedInterfacesEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassAssociationsEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassAssociationsEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassAggregationsEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassAggregationsEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassCompositionsEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassCompositionsEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
+ if (!incominglinks.isEmpty())
+ {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty())
+ {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
+ case ACoreRootEditPart.VISUAL_ID:
+ {
+ LinkedList<AcoreAbstractNavigatorItem> result = new LinkedList<AcoreAbstractNavigatorItem>();
+ AcoreNavigatorGroup links = new AcoreNavigatorGroup(Messages.NavigatorGroupName_ACoreRoot_1000_links,
+ "icons/linksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getChildrenByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AInterfaceEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getChildrenByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement, false));
+ connectedViews = getDiagramLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassSubClassesEditPart.VISUAL_ID));
+ links.addChildren(createNavigatorItems(connectedViews, links, false));
+ connectedViews = getDiagramLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassImplementedInterfacesEditPart.VISUAL_ID));
+ links.addChildren(createNavigatorItems(connectedViews, links, false));
+ connectedViews = getDiagramLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassAssociationsEditPart.VISUAL_ID));
+ links.addChildren(createNavigatorItems(connectedViews, links, false));
+ connectedViews = getDiagramLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassAggregationsEditPart.VISUAL_ID));
+ links.addChildren(createNavigatorItems(connectedViews, links, false));
+ connectedViews = getDiagramLinksByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassCompositionsEditPart.VISUAL_ID));
+ links.addChildren(createNavigatorItems(connectedViews, links, false));
+ if (!links.isEmpty())
+ {
+ result.add(links);
+ }
+ return result.toArray();
+ }
+
+ case AClassAssociationsEditPart.VISUAL_ID:
+ {
+ LinkedList<AcoreAbstractNavigatorItem> result = new LinkedList<AcoreAbstractNavigatorItem>();
+ AcoreNavigatorGroup target = new AcoreNavigatorGroup(Messages.NavigatorGroupName_AClassAssociations_4003_target,
+ "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ AcoreNavigatorGroup source = new AcoreNavigatorGroup(Messages.NavigatorGroupName_AClassAssociations_4003_source,
+ "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getLinksTargetByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.VISUAL_ID));
+ target.addChildren(createNavigatorItems(connectedViews, target, true));
+ connectedViews = getLinksSourceByType(Collections.singleton(view), AcoreVisualIDRegistry
+ .getType(AClassEditPart.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<View> getLinksSourceByType(Collection edges, String type)
+ {
+ LinkedList<View> result = new LinkedList<View>();
+ 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<View> getLinksTargetByType(Collection edges, String type)
+ {
+ LinkedList<View> result = new LinkedList<View>();
+ 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<View> getOutgoingLinksByType(Collection<View> nodes, String type)
+ {
+ LinkedList<View> result = new LinkedList<View>();
+ for (Iterator<View> it = nodes.iterator(); it.hasNext();)
+ {
+ View nextNode = it.next();
+ result.addAll(selectViewsByType(nextNode.getSourceEdges(), type));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<View> getIncomingLinksByType(Collection<View> nodes, String type)
+ {
+ LinkedList<View> result = new LinkedList<View>();
+ for (Iterator<View> it = nodes.iterator(); it.hasNext();)
+ {
+ View nextNode = it.next();
+ result.addAll(selectViewsByType(nextNode.getTargetEdges(), type));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<View> getChildrenByType(Collection<View> nodes, String type)
+ {
+ LinkedList<View> result = new LinkedList<View>();
+ for (Iterator<View> it = nodes.iterator(); it.hasNext();)
+ {
+ View nextNode = it.next();
+ result.addAll(selectViewsByType(nextNode.getChildren(), type));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private Collection getDiagramLinksByType(Collection diagrams, String type)
+ {
+ Collection result = new ArrayList();
+ for (Iterator it = diagrams.iterator(); it.hasNext();)
+ {
+ Diagram nextDiagram = (Diagram)it.next();
+ result.addAll(selectViewsByType(nextDiagram.getEdges(), type));
+ }
+ return result;
+ }
+
+ // TODO refactor as static method
+ /**
+ * @generated
+ */
+ private Collection<View> selectViewsByType(Collection<View> views, String type)
+ {
+ ArrayList<View> result = new ArrayList<View>();
+ for (Iterator<View> it = views.iterator(); it.hasNext();)
+ {
+ View nextView = it.next();
+ if (type.equals(nextView.getType()) && isOwnView(nextView))
+ {
+ result.add(nextView);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isOwnView(View view)
+ {
+ return ACoreRootEditPart.MODEL_ID.equals(AcoreVisualIDRegistry.getModelID(view));
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<AcoreNavigatorItem> createNavigatorItems(Collection<View> views, Object parent, boolean isLeafs)
+ {
+ ArrayList<AcoreNavigatorItem> result = new ArrayList<AcoreNavigatorItem>(views.size());
+ for (Iterator<View> it = views.iterator(); it.hasNext();)
+ {
+ View nextView = it.next();
+ result.add(new AcoreNavigatorItem(nextView, parent, isLeafs));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public Object getParent(Object element)
+ {
+ if (element instanceof AcoreAbstractNavigatorItem)
+ {
+ AcoreAbstractNavigatorItem abstractNavigatorItem = (AcoreAbstractNavigatorItem)element;
+ return abstractNavigatorItem.getParent();
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean hasChildren(Object element)
+ {
+ return element instanceof IFile || getChildren(element).length > 0;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorGroup.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorGroup.java
new file mode 100644
index 0000000000..32c5d35768
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorGroup.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+/**
+ * @generated
+ */
+public class AcoreNavigatorGroup extends AcoreAbstractNavigatorItem
+{
+
+ /**
+ * @generated
+ */
+ private String myGroupName;
+
+ /**
+ * @generated
+ */
+ private String myIcon;
+
+ /**
+ * @generated
+ */
+ private Collection myChildren = new LinkedList();
+
+ /**
+ * @generated
+ */
+ AcoreNavigatorGroup(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.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorGroup)
+ {
+ org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorGroup anotherGroup = (org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorGroup)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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorItem.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorItem.java
new file mode 100644
index 0000000000..0403316b50
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorItem.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreNavigatorItem extends AcoreAbstractNavigatorItem
+{
+
+ /**
+ * @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.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorItem
+ && (adapterType == View.class || adapterType == EObject.class))
+ {
+ return ((org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorItem)adaptableObject)
+ .getView();
+ }
+ return null;
+ }
+
+ public Class[] getAdapterList()
+ {
+ return supportedTypes;
+ }
+ }, org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorItem.class);
+ }
+
+ /**
+ * @generated
+ */
+ private View myView;
+
+ /**
+ * @generated
+ */
+ private boolean myLeaf = false;
+
+ /**
+ * @generated
+ */
+ public AcoreNavigatorItem(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.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorItem)
+ {
+ return EcoreUtil.getURI(getView()).equals(
+ EcoreUtil.getURI(((org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorItem)obj)
+ .getView()));
+ }
+ return super.equals(obj);
+ }
+
+ /**
+ * @generated
+ */
+ public int hashCode()
+ {
+ return EcoreUtil.getURI(getView()).hashCode();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorLabelProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorLabelProvider.java
new file mode 100644
index 0000000000..1b1bb8c16f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorLabelProvider.java
@@ -0,0 +1,459 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAggregationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAssociationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassCompositionsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassImplementedInterfacesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassNameEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassSubClassesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceNameEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreParserProvider;
+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.emf.core.util.EObjectAdapter;
+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 AcoreNavigatorLabelProvider extends LabelProvider implements ICommonLabelProvider, ITreePathLabelProvider
+{
+
+ /**
+ * @generated
+ */
+ static
+ {
+ AcoreDiagramEditorPlugin.getInstance().getImageRegistry().put(
+ "Navigator?UnknownElement", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
+ AcoreDiagramEditorPlugin.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 AcoreNavigatorItem && !isOwnView(((AcoreNavigatorItem)element).getView()))
+ {
+ return;
+ }
+ label.setText(getText(element));
+ label.setImage(getImage(element));
+ }
+
+ /**
+ * @generated
+ */
+ public Image getImage(Object element)
+ {
+ if (element instanceof AcoreNavigatorGroup)
+ {
+ AcoreNavigatorGroup group = (AcoreNavigatorGroup)element;
+ return AcoreDiagramEditorPlugin.getInstance().getBundledImage(group.getIcon());
+ }
+
+ if (element instanceof AcoreNavigatorItem)
+ {
+ AcoreNavigatorItem navigatorItem = (AcoreNavigatorItem)element;
+ if (!isOwnView(navigatorItem.getView()))
+ {
+ return super.getImage(element);
+ }
+ return getImage(navigatorItem.getView());
+ }
+
+ return super.getImage(element);
+ }
+
+ /**
+ * @generated
+ */
+ public Image getImage(View view)
+ {
+ switch (AcoreVisualIDRegistry.getVisualID(view))
+ {
+ case AAttributeEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AAttribute", AcoreElementTypes.AAttribute_3001); //$NON-NLS-1$
+ case AOperation2EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AOperation", AcoreElementTypes.AOperation_3004); //$NON-NLS-1$
+ case AClassSubClassesEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Link?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AClass?subClasses", AcoreElementTypes.AClassSubClasses_4001); //$NON-NLS-1$
+ case AClassCompositionsEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Link?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AClass?compositions", AcoreElementTypes.AClassCompositions_4005); //$NON-NLS-1$
+ case AInterfaceEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?TopLevelNode?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AInterface", AcoreElementTypes.AInterface_2001); //$NON-NLS-1$
+ case AClassAggregationsEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Link?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AClass?aggregations", AcoreElementTypes.AClassAggregations_4004); //$NON-NLS-1$
+ case AClassImplementedInterfacesEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Link?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AClass?implementedInterfaces", AcoreElementTypes.AClassImplementedInterfaces_4002); //$NON-NLS-1$
+ case AAttribute2EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AAttribute", AcoreElementTypes.AAttribute_3003); //$NON-NLS-1$
+ case AClassEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?TopLevelNode?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AClass", AcoreElementTypes.AClass_2002); //$NON-NLS-1$
+ case ACoreRootEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Diagram?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?ACoreRoot", AcoreElementTypes.ACoreRoot_1000); //$NON-NLS-1$
+ case AClassAssociationsEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Link?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AClass?associations", AcoreElementTypes.AClassAssociations_4003); //$NON-NLS-1$
+ case AOperationEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore?AOperation", AcoreElementTypes.AOperation_3002); //$NON-NLS-1$
+ }
+ return getImage("Navigator?UnknownElement", null); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ private Image getImage(String key, IElementType elementType)
+ {
+ ImageRegistry imageRegistry = AcoreDiagramEditorPlugin.getInstance().getImageRegistry();
+ Image image = imageRegistry.get(key);
+ if (image == null && elementType != null && AcoreElementTypes.isKnownElementType(elementType))
+ {
+ image = AcoreElementTypes.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 AcoreNavigatorGroup)
+ {
+ AcoreNavigatorGroup group = (AcoreNavigatorGroup)element;
+ return group.getGroupName();
+ }
+
+ if (element instanceof AcoreNavigatorItem)
+ {
+ AcoreNavigatorItem navigatorItem = (AcoreNavigatorItem)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 (AcoreVisualIDRegistry.getVisualID(view))
+ {
+ case AAttributeEditPart.VISUAL_ID:
+ return getAAttribute_3001Text(view);
+ case AOperation2EditPart.VISUAL_ID:
+ return getAOperation_3004Text(view);
+ case AClassSubClassesEditPart.VISUAL_ID:
+ return getAClassSubClasses_4001Text(view);
+ case AClassCompositionsEditPart.VISUAL_ID:
+ return getAClassCompositions_4005Text(view);
+ case AInterfaceEditPart.VISUAL_ID:
+ return getAInterface_2001Text(view);
+ case AClassAggregationsEditPart.VISUAL_ID:
+ return getAClassAggregations_4004Text(view);
+ case AClassImplementedInterfacesEditPart.VISUAL_ID:
+ return getAClassImplementedInterfaces_4002Text(view);
+ case AAttribute2EditPart.VISUAL_ID:
+ return getAAttribute_3003Text(view);
+ case AClassEditPart.VISUAL_ID:
+ return getAClass_2002Text(view);
+ case ACoreRootEditPart.VISUAL_ID:
+ return getACoreRoot_1000Text(view);
+ case AClassAssociationsEditPart.VISUAL_ID:
+ return getAClassAssociations_4003Text(view);
+ case AOperationEditPart.VISUAL_ID:
+ return getAOperation_3002Text(view);
+ }
+ return getUnknownElementText(view);
+ }
+
+ /**
+ * @generated
+ */
+ private String getAAttribute_3001Text(View view)
+ {
+ IParser parser = AcoreParserProvider.getParser(AcoreElementTypes.AAttribute_3001, view.getElement() != null ? view
+ .getElement() : view, AcoreVisualIDRegistry.getType(AAttributeEditPart.VISUAL_ID));
+ if (parser != null)
+ {
+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
+ ParserOptions.NONE.intValue());
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3001); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private String getAOperation_3004Text(View view)
+ {
+ IParser parser = AcoreParserProvider.getParser(AcoreElementTypes.AOperation_3004, view.getElement() != null ? view
+ .getElement() : view, AcoreVisualIDRegistry.getType(AOperation2EditPart.VISUAL_ID));
+ if (parser != null)
+ {
+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
+ ParserOptions.NONE.intValue());
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3004); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private String getAClassSubClasses_4001Text(View view)
+ {
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ private String getAClassCompositions_4005Text(View view)
+ {
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ private String getAInterface_2001Text(View view)
+ {
+ IParser parser = AcoreParserProvider.getParser(AcoreElementTypes.AInterface_2001, view.getElement() != null ? view
+ .getElement() : view, AcoreVisualIDRegistry.getType(AInterfaceNameEditPart.VISUAL_ID));
+ if (parser != null)
+ {
+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
+ ParserOptions.NONE.intValue());
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5001); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private String getAClassAggregations_4004Text(View view)
+ {
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ private String getAClassImplementedInterfaces_4002Text(View view)
+ {
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ private String getAAttribute_3003Text(View view)
+ {
+ IParser parser = AcoreParserProvider.getParser(AcoreElementTypes.AAttribute_3003, view.getElement() != null ? view
+ .getElement() : view, AcoreVisualIDRegistry.getType(AAttribute2EditPart.VISUAL_ID));
+ if (parser != null)
+ {
+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
+ ParserOptions.NONE.intValue());
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3003); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private String getAClass_2002Text(View view)
+ {
+ IParser parser = AcoreParserProvider.getParser(AcoreElementTypes.AClass_2002, view.getElement() != null ? view
+ .getElement() : view, AcoreVisualIDRegistry.getType(AClassNameEditPart.VISUAL_ID));
+ if (parser != null)
+ {
+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
+ ParserOptions.NONE.intValue());
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5002); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private String getACoreRoot_1000Text(View view)
+ {
+ ACoreRoot domainModelElement = (ACoreRoot)view.getElement();
+ if (domainModelElement != null)
+ {
+ return domainModelElement.getTitle();
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 1000); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private String getAClassAssociations_4003Text(View view)
+ {
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ private String getAOperation_3002Text(View view)
+ {
+ IParser parser = AcoreParserProvider.getParser(AcoreElementTypes.AOperation_3002, view.getElement() != null ? view
+ .getElement() : view, AcoreVisualIDRegistry.getType(AOperationEditPart.VISUAL_ID));
+ if (parser != null)
+ {
+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
+ ParserOptions.NONE.intValue());
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3002); //$NON-NLS-1$
+ 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 ACoreRootEditPart.MODEL_ID.equals(AcoreVisualIDRegistry.getModelID(view));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorLinkHelper.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorLinkHelper.java
new file mode 100644
index 0000000000..775df621ff
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorLinkHelper.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+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.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 AcoreNavigatorLinkHelper 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 = AcoreDiagramEditorPlugin.getInstance().getDocumentProvider()
+ .getDiagramDocument(anInput);
+ if (document == null)
+ {
+ return StructuredSelection.EMPTY;
+ }
+ Diagram diagram = document.getDiagram();
+ IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
+ if (file != null)
+ {
+ AcoreNavigatorItem item = new AcoreNavigatorItem(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 AcoreAbstractNavigatorItem)
+ {
+ return;
+ }
+
+ AcoreAbstractNavigatorItem abstractNavigatorItem = (AcoreAbstractNavigatorItem)aSelection.getFirstElement();
+ View navigatorView = null;
+ if (abstractNavigatorItem instanceof AcoreNavigatorItem)
+ {
+ navigatorView = ((AcoreNavigatorItem)abstractNavigatorItem).getView();
+ }
+ else if (abstractNavigatorItem instanceof AcoreNavigatorGroup)
+ {
+ AcoreNavigatorGroup navigatorGroup = (AcoreNavigatorGroup)abstractNavigatorItem;
+ if (navigatorGroup.getParent() instanceof AcoreNavigatorItem)
+ {
+ navigatorView = ((AcoreNavigatorItem)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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorSorter.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorSorter.java
new file mode 100644
index 0000000000..11b4791475
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/navigator/AcoreNavigatorSorter.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.jface.viewers.ViewerSorter;
+
+/**
+ * @generated
+ */
+public class AcoreNavigatorSorter extends ViewerSorter
+{
+
+ /**
+ * @generated
+ */
+ private static final int GROUP_CATEGORY = 7006;
+
+ /**
+ * @generated
+ */
+ public int category(Object element)
+ {
+ if (element instanceof AcoreNavigatorItem)
+ {
+ AcoreNavigatorItem item = (AcoreNavigatorItem)element;
+ return AcoreVisualIDRegistry.getVisualID(item.getView());
+ }
+ return GROUP_CATEGORY;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/parsers/AbstractParser.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/parsers/AbstractParser.java
new file mode 100644
index 0000000000..211b041efb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/parsers/AbstractParser.java
@@ -0,0 +1,583 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.parsers;
+
+import java.util.Arrays;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+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.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
+ */
+ protected final EAttribute[] editableFeatures;
+
+ /**
+ * @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.editableFeatures = this.features = features;
+ }
+
+ /**
+ * @generated
+ */
+ public AbstractParser(EAttribute[] features, EAttribute[] editableFeatures)
+ {
+ if (features == null || Arrays.asList(features).contains(null))
+ {
+ throw new IllegalArgumentException();
+ }
+ this.features = features;
+ if (editableFeatures == null || Arrays.asList(editableFeatures).contains(null))
+ {
+ throw new IllegalArgumentException();
+ }
+ this.editableFeatures = editableFeatures;
+ }
+
+ /**
+ * @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[] getEditableValues(EObject element)
+ {
+ Object[] values = new Object[editableFeatures.length];
+ for (int i = 0; i < editableFeatures.length; i++)
+ {
+ values[i] = getValue(element, editableFeatures[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, editableFeatures[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 != editableFeatures.length)
+ {
+ return ParserEditStatus.UNEDITABLE_STATUS;
+ }
+ for (int i = 0; i < values.length; i++)
+ {
+ Object value = getValidNewValue(editableFeatures[i], values[i]);
+ if (value instanceof InvalidValue)
+ {
+ return new ParserEditStatus(AcoreDiagramEditorPlugin.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_UnexpectedValueType, 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_UnexpectedValueType, 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_WrongStringConversion, iClass.getName()));
+ }
+ }
+ }
+ else
+ {
+ value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, 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_WrongStringConversion, iClass.getName()));
+ }
+ }
+ }
+ else
+ {
+ value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, 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_WrongStringConversion, iClass.getName()));
+ }
+ }
+ }
+ else
+ {
+ value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, 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_WrongStringConversion, iClass.getName()));
+ }
+ }
+ }
+ else
+ {
+ value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, 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_WrongStringConversion, iClass.getName()));
+ }
+ }
+ }
+ else
+ {
+ value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, 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_WrongStringConversion, iClass.getName()));
+ }
+ }
+ }
+ else
+ {
+ value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, 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_UnknownLiteral, value));
+ }
+ else
+ {
+ value = literal.getInstance();
+ }
+ }
+ else
+ {
+ value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/parsers/MessageFormatParser.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/parsers/MessageFormatParser.java
new file mode 100644
index 0000000000..0384478dd7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/parsers/MessageFormatParser.java
@@ -0,0 +1,226 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.parsers;
+
+import java.text.FieldPosition;
+import java.text.MessageFormat;
+import java.text.ParsePosition;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+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 String defaultEditablePattern;
+
+ /**
+ * @generated
+ */
+ private MessageFormat viewProcessor;
+
+ /**
+ * @generated
+ */
+ private MessageFormat editorProcessor;
+
+ /**
+ * @generated
+ */
+ private MessageFormat editProcessor;
+
+ /**
+ * @generated
+ */
+ public MessageFormatParser(EAttribute[] features)
+ {
+ super(features);
+ }
+
+ /**
+ * @generated
+ */
+ public MessageFormatParser(EAttribute[] features, EAttribute[] editableFeatures)
+ {
+ super(features, editableFeatures);
+ }
+
+ /**
+ * @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 void setViewPattern(String viewPattern)
+ {
+ super.setViewPattern(viewPattern);
+ viewProcessor = null;
+ }
+
+ /**
+ * @generated
+ */
+ public void setEditorPattern(String editorPattern)
+ {
+ super.setEditorPattern(editorPattern);
+ editorProcessor = null;
+ }
+
+ /**
+ * @generated
+ */
+ protected MessageFormat getViewProcessor()
+ {
+ if (viewProcessor == null)
+ {
+ viewProcessor = new MessageFormat(getViewPattern() == null ? getDefaultPattern() : getViewPattern());
+ }
+ return viewProcessor;
+ }
+
+ /**
+ * @generated
+ */
+ protected MessageFormat getEditorProcessor()
+ {
+ if (editorProcessor == null)
+ {
+ editorProcessor = new MessageFormat(getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern());
+ }
+ return editorProcessor;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getDefaultEditablePattern()
+ {
+ if (defaultEditablePattern == null)
+ {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < editableFeatures.length; i++)
+ {
+ if (i > 0)
+ {
+ sb.append(' ');
+ }
+ sb.append('{');
+ sb.append(i);
+ sb.append('}');
+ }
+ defaultEditablePattern = sb.toString();
+ }
+ return defaultEditablePattern;
+ }
+
+ /**
+ * @generated
+ */
+ public void setEditPattern(String editPattern)
+ {
+ super.setEditPattern(editPattern);
+ editProcessor = null;
+ }
+
+ /**
+ * @generated
+ */
+ protected MessageFormat getEditProcessor()
+ {
+ if (editProcessor == null)
+ {
+ editProcessor = new MessageFormat(getEditPattern() == null ? getDefaultEditablePattern() : getEditPattern());
+ }
+ return editProcessor;
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditString(IAdaptable adapter, int flags)
+ {
+ EObject element = (EObject)adapter.getAdapter(EObject.class);
+ return getEditorProcessor().format(getEditableValues(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(AcoreDiagramEditorPlugin.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);
+ }
+
+ /**
+ * @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();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreCreationWizard.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreCreationWizard.java
new file mode 100644
index 0000000000..1afb3a0bbb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreCreationWizard.java
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreCreationWizard extends Wizard implements INewWizard
+{
+
+ /**
+ * @generated
+ */
+ private IWorkbench workbench;
+
+ /**
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * @generated
+ */
+ protected AcoreCreationWizardPage diagramModelFilePage;
+
+ /**
+ * @generated
+ */
+ protected AcoreCreationWizardPage 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.AcoreCreationWizardTitle);
+ setDefaultPageImageDescriptor(AcoreDiagramEditorPlugin.getBundledImageDescriptor("icons/wizban/NewAcoreWizard.gif")); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * @generated
+ */
+ public void addPages()
+ {
+ diagramModelFilePage = new AcoreCreationWizardPage("DiagramModelFile", getSelection(), "acore_diagram"); //$NON-NLS-1$ //$NON-NLS-2$
+ diagramModelFilePage.setTitle(Messages.AcoreCreationWizard_DiagramModelFilePageTitle);
+ diagramModelFilePage.setDescription(Messages.AcoreCreationWizard_DiagramModelFilePageDescription);
+ addPage(diagramModelFilePage);
+
+ domainModelFilePage = new AcoreCreationWizardPage("DomainModelFile", getSelection(), "acore") { //$NON-NLS-1$ //$NON-NLS-2$
+
+ public void setVisible(boolean visible)
+ {
+ if (visible)
+ {
+ String fileName = diagramModelFilePage.getFileName();
+ fileName = fileName.substring(0, fileName.length() - ".acore_diagram".length()); //$NON-NLS-1$
+ setFileName(AcoreDiagramEditorUtil.getUniqueFileName(getContainerFullPath(), fileName, "acore")); //$NON-NLS-1$
+ }
+ super.setVisible(visible);
+ }
+ };
+ domainModelFilePage.setTitle(Messages.AcoreCreationWizard_DomainModelFilePageTitle);
+ domainModelFilePage.setDescription(Messages.AcoreCreationWizard_DomainModelFilePageDescription);
+ addPage(domainModelFilePage);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean performFinish()
+ {
+ IRunnableWithProgress op = new WorkspaceModifyOperation(null)
+ {
+
+ protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException
+ {
+ diagram = AcoreDiagramEditorUtil.createDiagram(diagramModelFilePage.getURI(), domainModelFilePage.getURI(),
+ monitor);
+ if (isOpenNewlyCreatedDiagramEditor() && diagram != null)
+ {
+ try
+ {
+ AcoreDiagramEditorUtil.openDiagram(diagram);
+ }
+ catch (PartInitException e)
+ {
+ ErrorDialog.openError(getContainer().getShell(), Messages.AcoreCreationWizardOpenEditorError, 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.AcoreCreationWizardCreationError, null,
+ ((CoreException)e.getTargetException()).getStatus());
+ }
+ else
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
+ }
+ return false;
+ }
+ return diagram != null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreCreationWizardPage.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreCreationWizardPage.java
new file mode 100644
index 0000000000..feb5611896
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreCreationWizardPage.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreCreationWizardPage extends WizardNewFileCreationPage
+{
+
+ /**
+ * @generated
+ */
+ private final String fileExtension;
+
+ /**
+ * @generated
+ */
+ public AcoreCreationWizardPage(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(AcoreDiagramEditorUtil.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.AcoreCreationWizardPageExtensionError, extension));
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramActionBarContributor.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramActionBarContributor.java
new file mode 100644
index 0000000000..836ddf7c99
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramActionBarContributor.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * @generated
+ */
+public class AcoreDiagramActionBarContributor extends DiagramActionBarContributor
+{
+
+ /**
+ * @generated
+ */
+ protected Class getEditorClass()
+ {
+ return AcoreDiagramEditor.class;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getEditorId()
+ {
+ return AcoreDiagramEditor.ID;
+ }
+
+ /**
+ * @generated
+ */
+ public void init(IActionBars bars, IWorkbenchPage page)
+ {
+ super.init(bars, page);
+ // print preview
+ IMenuManager fileMenu = bars.getMenuManager().findMenuUsingPath(IWorkbenchActionConstants.M_FILE);
+ assert fileMenu != null;
+ fileMenu.remove("pageSetupAction"); //$NON-NLS-1$
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditor.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditor.java
new file mode 100644
index 0000000000..b551986f22
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditor.java
@@ -0,0 +1,325 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorItem;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gef.palette.PaletteRoot;
+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.actions.ActionIds;
+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 AcoreDiagramEditor extends DiagramDocumentEditor implements IGotoMarker
+{
+
+ /**
+ * @generated
+ */
+ public static final String ID = "org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorID"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final String CONTEXT_ID = "org.eclipse.emf.cdo.dawn.examples.acore.diagram.ui.diagramContext"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public AcoreDiagramEditor()
+ {
+ super(true);
+ }
+
+ /**
+ * @generated
+ */
+ protected String getContextID()
+ {
+ return CONTEXT_ID;
+ }
+
+ /**
+ * @generated
+ */
+ protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot)
+ {
+ PaletteRoot root = super.createPaletteRoot(existingPaletteRoot);
+ new AcorePaletteFactory().fillPalette(root);
+ return root;
+ }
+
+ /**
+ * @generated
+ */
+ protected PreferencesHint getPreferencesHint()
+ {
+ return AcoreDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * @generated
+ */
+ public String getContributorId()
+ {
+ return AcoreDiagramEditorPlugin.ID;
+ }
+
+ /**
+ * @generated
+ */
+ 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
+ */
+ protected IDocumentProvider getDocumentProvider(IEditorInput input)
+ {
+ if (input instanceof IFileEditorInput || input instanceof URIEditorInput)
+ {
+ return AcoreDiagramEditorPlugin.getInstance().getDocumentProvider();
+ }
+ return super.getDocumentProvider(input);
+ }
+
+ /**
+ * @generated
+ */
+ public TransactionalEditingDomain getEditingDomain()
+ {
+ IDocument document = getEditorInput() != null ? getDocumentProvider().getDocument(getEditorInput()) : null;
+ if (document instanceof IDiagramDocument)
+ {
+ return ((IDiagramDocument)document).getEditingDomain();
+ }
+ return super.getEditingDomain();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setDocumentProvider(IEditorInput input)
+ {
+ if (input instanceof IFileEditorInput || input instanceof URIEditorInput)
+ {
+ setDocumentProvider(AcoreDiagramEditorPlugin.getInstance().getDocumentProvider());
+ }
+ else
+ {
+ super.setDocumentProvider(input);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void gotoMarker(IMarker marker)
+ {
+ MarkerNavigationService.getInstance().gotoMarker(this, marker);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean isSaveAsAllowed()
+ {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public void doSaveAs()
+ {
+ performSaveAs(new NullProgressMonitor());
+ }
+
+ /**
+ * @generated
+ */
+ 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.AcoreDiagramEditor_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.AcoreDiagramEditor_SaveAsErrorTitle,
+ Messages.AcoreDiagramEditor_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.AcoreDiagramEditor_SaveErrorTitle,
+ Messages.AcoreDiagramEditor_SaveErrorMessage, x.getStatus());
+ }
+ }
+ finally
+ {
+ provider.changed(newInput);
+ if (success)
+ {
+ setInput(newInput);
+ }
+ }
+ if (progressMonitor != null)
+ {
+ progressMonitor.setCanceled(!success);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ 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)
+ {
+ AcoreNavigatorItem item = new AcoreNavigatorItem(diagram, file, false);
+ return new StructuredSelection(item);
+ }
+ return StructuredSelection.EMPTY;
+ }
+
+ /**
+ * @generated
+ */
+ protected void configureGraphicalViewer()
+ {
+ super.configureGraphicalViewer();
+ DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
+ getDiagramGraphicalViewer().setContextMenu(provider);
+ getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditorPlugin.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditorPlugin.java
new file mode 100644
index 0000000000..d6c91dc927
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditorPlugin.java
@@ -0,0 +1,281 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.provider.AcoreItemProviderAdapterFactory;
+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.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 AcoreDiagramEditorPlugin extends AbstractUIPlugin
+{
+
+ /**
+ * @generated
+ */
+ public static final String ID = "org.eclipse.emf.cdo.dawn.examples.acore.diagram"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
+
+ /**
+ * @generated
+ */
+ private static AcoreDiagramEditorPlugin instance;
+
+ /**
+ * @generated
+ */
+ private ComposedAdapterFactory adapterFactory;
+
+ /**
+ * @generated
+ */
+ private AcoreDocumentProvider documentProvider;
+
+ /**
+ * @generated
+ */
+ public AcoreDiagramEditorPlugin()
+ {
+ }
+
+ /**
+ * @generated
+ */
+ public void start(BundleContext context) throws Exception
+ {
+ super.start(context);
+ instance = this;
+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
+ adapterFactory = createAdapterFactory();
+ }
+
+ /**
+ * @generated
+ */
+ public void stop(BundleContext context) throws Exception
+ {
+ adapterFactory.dispose();
+ adapterFactory = null;
+ instance = null;
+ super.stop(context);
+ }
+
+ /**
+ * @generated
+ */
+ public static AcoreDiagramEditorPlugin 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 AcoreItemProviderAdapterFactory());
+ 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 AcoreDocumentProvider getDocumentProvider()
+ {
+ if (documentProvider == null)
+ {
+ documentProvider = new AcoreDocumentProvider();
+ }
+ 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, AcoreDiagramEditorPlugin.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, AcoreDiagramEditorPlugin.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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditorUtil.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditorUtil.java
new file mode 100644
index 0000000000..5ec3d076be
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramEditorUtil.java
@@ -0,0 +1,450 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+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.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 AcoreDiagramEditorUtil
+{
+
+ /**
+ * @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), AcoreDiagramEditor.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)
+ {
+ AcoreDiagramEditorPlugin.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 = AcoreDiagramEditorPlugin.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.AcoreDiagramEditorUtil_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.AcoreDiagramEditorUtil_CreateDiagramCommandLabel, Collections.EMPTY_LIST)
+ {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ ACoreRoot model = createInitialModel();
+ attachModelToResource(model, modelResource);
+
+ Diagram diagram = ViewService.createDiagram(model, ACoreRootEditPart.MODEL_ID,
+ AcoreDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ if (diagram != null)
+ {
+ diagramResource.getContents().add(diagram);
+ diagram.setName(diagramName);
+ diagram.setElement(model);
+ }
+
+ try
+ {
+ modelResource.save(org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorUtil
+ .getSaveOptions());
+ diagramResource.save(org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorUtil
+ .getSaveOptions());
+ }
+ catch (IOException e)
+ {
+
+ AcoreDiagramEditorPlugin.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)
+ {
+ AcoreDiagramEditorPlugin.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 ACoreRoot createInitialModel()
+ {
+ return AcoreFactory.eINSTANCE.createACoreRoot();
+ }
+
+ /**
+ * Store model element in the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static void attachModelToResource(ACoreRoot model, Resource resource)
+ {
+ resource.getContents().add(model);
+ }
+
+ /**
+ * @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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramUpdateCommand.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramUpdateCommand.java
new file mode 100644
index 0000000000..f92766da2b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramUpdateCommand.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreDiagramUpdateCommand 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramUpdater.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramUpdater.java
new file mode 100644
index 0000000000..5b6bb408dc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDiagramUpdater.java
@@ -0,0 +1,652 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AAttribute;
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.AOperation;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAAttributeCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAOperationClassCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAggregationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAssociationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassCompositionsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassImplementedInterfacesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassSubClassesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAAttributeInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAOperationInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class AcoreDiagramUpdater
+{
+
+ /**
+ * @generated
+ */
+ public static List<AcoreNodeDescriptor> getSemanticChildren(View view)
+ {
+ switch (AcoreVisualIDRegistry.getVisualID(view))
+ {
+ case ACoreRootEditPart.VISUAL_ID:
+ return getACoreRoot_1000SemanticChildren(view);
+ case AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID:
+ return getAInterfaceAAttributeInterfaceCompartment_7001SemanticChildren(view);
+ case AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID:
+ return getAInterfaceAOperationInterfaceCompartment_7002SemanticChildren(view);
+ case AClassAAttributeCompartmentEditPart.VISUAL_ID:
+ return getAClassAAttributeCompartment_7003SemanticChildren(view);
+ case AClassAOperationClassCompartmentEditPart.VISUAL_ID:
+ return getAClassAOperationClassCompartment_7004SemanticChildren(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreNodeDescriptor> getACoreRoot_1000SemanticChildren(View view)
+ {
+ if (!view.isSetElement())
+ {
+ return Collections.emptyList();
+ }
+ ACoreRoot modelElement = (ACoreRoot)view.getElement();
+ LinkedList<AcoreNodeDescriptor> result = new LinkedList<AcoreNodeDescriptor>();
+ for (Iterator it = modelElement.getInterfaces().iterator(); it.hasNext();)
+ {
+ AInterface childElement = (AInterface)it.next();
+ int visualID = AcoreVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == AInterfaceEditPart.VISUAL_ID)
+ {
+ result.add(new AcoreNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator it = modelElement.getClasses().iterator(); it.hasNext();)
+ {
+ AClass childElement = (AClass)it.next();
+ int visualID = AcoreVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == AClassEditPart.VISUAL_ID)
+ {
+ result.add(new AcoreNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreNodeDescriptor> getAInterfaceAAttributeInterfaceCompartment_7001SemanticChildren(View view)
+ {
+ if (false == view.eContainer() instanceof View)
+ {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if (!containerView.isSetElement())
+ {
+ return Collections.emptyList();
+ }
+ AInterface modelElement = (AInterface)containerView.getElement();
+ LinkedList<AcoreNodeDescriptor> result = new LinkedList<AcoreNodeDescriptor>();
+ for (Iterator it = modelElement.getAttributes().iterator(); it.hasNext();)
+ {
+ AAttribute childElement = (AAttribute)it.next();
+ int visualID = AcoreVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == AAttributeEditPart.VISUAL_ID)
+ {
+ result.add(new AcoreNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreNodeDescriptor> getAInterfaceAOperationInterfaceCompartment_7002SemanticChildren(View view)
+ {
+ if (false == view.eContainer() instanceof View)
+ {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if (!containerView.isSetElement())
+ {
+ return Collections.emptyList();
+ }
+ AInterface modelElement = (AInterface)containerView.getElement();
+ LinkedList<AcoreNodeDescriptor> result = new LinkedList<AcoreNodeDescriptor>();
+ for (Iterator it = modelElement.getOperations().iterator(); it.hasNext();)
+ {
+ AOperation childElement = (AOperation)it.next();
+ int visualID = AcoreVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == AOperationEditPart.VISUAL_ID)
+ {
+ result.add(new AcoreNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreNodeDescriptor> getAClassAAttributeCompartment_7003SemanticChildren(View view)
+ {
+ if (false == view.eContainer() instanceof View)
+ {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if (!containerView.isSetElement())
+ {
+ return Collections.emptyList();
+ }
+ AClass modelElement = (AClass)containerView.getElement();
+ LinkedList<AcoreNodeDescriptor> result = new LinkedList<AcoreNodeDescriptor>();
+ for (Iterator it = modelElement.getAttributes().iterator(); it.hasNext();)
+ {
+ AAttribute childElement = (AAttribute)it.next();
+ int visualID = AcoreVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == AAttribute2EditPart.VISUAL_ID)
+ {
+ result.add(new AcoreNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreNodeDescriptor> getAClassAOperationClassCompartment_7004SemanticChildren(View view)
+ {
+ if (false == view.eContainer() instanceof View)
+ {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if (!containerView.isSetElement())
+ {
+ return Collections.emptyList();
+ }
+ AClass modelElement = (AClass)containerView.getElement();
+ LinkedList<AcoreNodeDescriptor> result = new LinkedList<AcoreNodeDescriptor>();
+ for (Iterator it = modelElement.getOperations().iterator(); it.hasNext();)
+ {
+ AOperation childElement = (AOperation)it.next();
+ int visualID = AcoreVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == AOperation2EditPart.VISUAL_ID)
+ {
+ result.add(new AcoreNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getContainedLinks(View view)
+ {
+ switch (AcoreVisualIDRegistry.getVisualID(view))
+ {
+ case ACoreRootEditPart.VISUAL_ID:
+ return getACoreRoot_1000ContainedLinks(view);
+ case AInterfaceEditPart.VISUAL_ID:
+ return getAInterface_2001ContainedLinks(view);
+ case AClassEditPart.VISUAL_ID:
+ return getAClass_2002ContainedLinks(view);
+ case AAttributeEditPart.VISUAL_ID:
+ return getAAttribute_3001ContainedLinks(view);
+ case AOperationEditPart.VISUAL_ID:
+ return getAOperation_3002ContainedLinks(view);
+ case AAttribute2EditPart.VISUAL_ID:
+ return getAAttribute_3003ContainedLinks(view);
+ case AOperation2EditPart.VISUAL_ID:
+ return getAOperation_3004ContainedLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getIncomingLinks(View view)
+ {
+ switch (AcoreVisualIDRegistry.getVisualID(view))
+ {
+ case AInterfaceEditPart.VISUAL_ID:
+ return getAInterface_2001IncomingLinks(view);
+ case AClassEditPart.VISUAL_ID:
+ return getAClass_2002IncomingLinks(view);
+ case AAttributeEditPart.VISUAL_ID:
+ return getAAttribute_3001IncomingLinks(view);
+ case AOperationEditPart.VISUAL_ID:
+ return getAOperation_3002IncomingLinks(view);
+ case AAttribute2EditPart.VISUAL_ID:
+ return getAAttribute_3003IncomingLinks(view);
+ case AOperation2EditPart.VISUAL_ID:
+ return getAOperation_3004IncomingLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getOutgoingLinks(View view)
+ {
+ switch (AcoreVisualIDRegistry.getVisualID(view))
+ {
+ case AInterfaceEditPart.VISUAL_ID:
+ return getAInterface_2001OutgoingLinks(view);
+ case AClassEditPart.VISUAL_ID:
+ return getAClass_2002OutgoingLinks(view);
+ case AAttributeEditPart.VISUAL_ID:
+ return getAAttribute_3001OutgoingLinks(view);
+ case AOperationEditPart.VISUAL_ID:
+ return getAOperation_3002OutgoingLinks(view);
+ case AAttribute2EditPart.VISUAL_ID:
+ return getAAttribute_3003OutgoingLinks(view);
+ case AOperation2EditPart.VISUAL_ID:
+ return getAOperation_3004OutgoingLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getACoreRoot_1000ContainedLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAInterface_2001ContainedLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAClass_2002ContainedLinks(View view)
+ {
+ AClass modelElement = (AClass)view.getElement();
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_SubClasses_4001(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_ImplementedInterfaces_4002(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_Associations_4003(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_Aggregations_4004(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_Compositions_4005(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAAttribute_3001ContainedLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAOperation_3002ContainedLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAAttribute_3003ContainedLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAOperation_3004ContainedLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAInterface_2001IncomingLinks(View view)
+ {
+ AInterface modelElement = (AInterface)view.getElement();
+ Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_AClass_ImplementedInterfaces_4002(modelElement, crossReferences));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAClass_2002IncomingLinks(View view)
+ {
+ AClass modelElement = (AClass)view.getElement();
+ Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_AClass_SubClasses_4001(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_AClass_Associations_4003(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_AClass_Aggregations_4004(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_AClass_Compositions_4005(modelElement, crossReferences));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAAttribute_3001IncomingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAOperation_3002IncomingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAAttribute_3003IncomingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAOperation_3004IncomingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAInterface_2001OutgoingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAClass_2002OutgoingLinks(View view)
+ {
+ AClass modelElement = (AClass)view.getElement();
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_SubClasses_4001(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_ImplementedInterfaces_4002(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_Associations_4003(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_Aggregations_4004(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_AClass_Compositions_4005(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAAttribute_3001OutgoingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAOperation_3002OutgoingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAAttribute_3003OutgoingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public static List<AcoreLinkDescriptor> getAOperation_3004OutgoingLinks(View view)
+ {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getIncomingFeatureModelFacetLinks_AClass_SubClasses_4001(
+ AClass target, Map crossReferences)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ Collection settings = (Collection)crossReferences.get(target);
+ for (Iterator it = settings.iterator(); it.hasNext();)
+ {
+ EStructuralFeature.Setting setting = (EStructuralFeature.Setting)it.next();
+ if (setting.getEStructuralFeature() == AcorePackage.eINSTANCE.getAClass_SubClasses())
+ {
+ result.add(new AcoreLinkDescriptor(setting.getEObject(), target, AcoreElementTypes.AClassSubClasses_4001,
+ AClassSubClassesEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getIncomingFeatureModelFacetLinks_AClass_ImplementedInterfaces_4002(
+ AInterface target, Map crossReferences)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ Collection settings = (Collection)crossReferences.get(target);
+ for (Iterator it = settings.iterator(); it.hasNext();)
+ {
+ EStructuralFeature.Setting setting = (EStructuralFeature.Setting)it.next();
+ if (setting.getEStructuralFeature() == AcorePackage.eINSTANCE.getAClass_ImplementedInterfaces())
+ {
+ result.add(new AcoreLinkDescriptor(setting.getEObject(), target,
+ AcoreElementTypes.AClassImplementedInterfaces_4002, AClassImplementedInterfacesEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getIncomingFeatureModelFacetLinks_AClass_Associations_4003(
+ AClass target, Map crossReferences)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ Collection settings = (Collection)crossReferences.get(target);
+ for (Iterator it = settings.iterator(); it.hasNext();)
+ {
+ EStructuralFeature.Setting setting = (EStructuralFeature.Setting)it.next();
+ if (setting.getEStructuralFeature() == AcorePackage.eINSTANCE.getAClass_Associations())
+ {
+ result.add(new AcoreLinkDescriptor(setting.getEObject(), target, AcoreElementTypes.AClassAssociations_4003,
+ AClassAssociationsEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getIncomingFeatureModelFacetLinks_AClass_Aggregations_4004(
+ AClass target, Map crossReferences)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ Collection settings = (Collection)crossReferences.get(target);
+ for (Iterator it = settings.iterator(); it.hasNext();)
+ {
+ EStructuralFeature.Setting setting = (EStructuralFeature.Setting)it.next();
+ if (setting.getEStructuralFeature() == AcorePackage.eINSTANCE.getAClass_Aggregations())
+ {
+ result.add(new AcoreLinkDescriptor(setting.getEObject(), target, AcoreElementTypes.AClassAggregations_4004,
+ AClassAggregationsEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getIncomingFeatureModelFacetLinks_AClass_Compositions_4005(
+ AClass target, Map crossReferences)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ Collection settings = (Collection)crossReferences.get(target);
+ for (Iterator it = settings.iterator(); it.hasNext();)
+ {
+ EStructuralFeature.Setting setting = (EStructuralFeature.Setting)it.next();
+ if (setting.getEStructuralFeature() == AcorePackage.eINSTANCE.getAClass_Compositions())
+ {
+ result.add(new AcoreLinkDescriptor(setting.getEObject(), target, AcoreElementTypes.AClassCompositions_4005,
+ AClassCompositionsEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getOutgoingFeatureModelFacetLinks_AClass_SubClasses_4001(AClass source)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ for (Iterator destinations = source.getSubClasses().iterator(); destinations.hasNext();)
+ {
+ AClass destination = (AClass)destinations.next();
+ result.add(new AcoreLinkDescriptor(source, destination, AcoreElementTypes.AClassSubClasses_4001,
+ AClassSubClassesEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getOutgoingFeatureModelFacetLinks_AClass_ImplementedInterfaces_4002(
+ AClass source)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ for (Iterator destinations = source.getImplementedInterfaces().iterator(); destinations.hasNext();)
+ {
+ AInterface destination = (AInterface)destinations.next();
+ result.add(new AcoreLinkDescriptor(source, destination, AcoreElementTypes.AClassImplementedInterfaces_4002,
+ AClassImplementedInterfacesEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getOutgoingFeatureModelFacetLinks_AClass_Associations_4003(
+ AClass source)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ for (Iterator destinations = source.getAssociations().iterator(); destinations.hasNext();)
+ {
+ AClass destination = (AClass)destinations.next();
+ result.add(new AcoreLinkDescriptor(source, destination, AcoreElementTypes.AClassAssociations_4003,
+ AClassAssociationsEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getOutgoingFeatureModelFacetLinks_AClass_Aggregations_4004(
+ AClass source)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ for (Iterator destinations = source.getAggregations().iterator(); destinations.hasNext();)
+ {
+ AClass destination = (AClass)destinations.next();
+ result.add(new AcoreLinkDescriptor(source, destination, AcoreElementTypes.AClassAggregations_4004,
+ AClassAggregationsEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<AcoreLinkDescriptor> getOutgoingFeatureModelFacetLinks_AClass_Compositions_4005(
+ AClass source)
+ {
+ LinkedList<AcoreLinkDescriptor> result = new LinkedList<AcoreLinkDescriptor>();
+ for (Iterator destinations = source.getCompositions().iterator(); destinations.hasNext();)
+ {
+ AClass destination = (AClass)destinations.next();
+ result.add(new AcoreLinkDescriptor(source, destination, AcoreElementTypes.AClassCompositions_4005,
+ AClassCompositionsEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDocumentProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDocumentProvider.java
new file mode 100644
index 0000000000..5120892e12
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreDocumentProvider.java
@@ -0,0 +1,1209 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.LinkedList;
+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 AcoreDocumentProvider 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, AcoreDiagramEditorPlugin.ID, 0, NLS.bind(
+ Messages.AcoreDocumentProvider_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, AcoreDiagramEditorPlugin.ID, 0, NLS.bind(
+ Messages.AcoreDocumentProvider_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<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = 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.emf.cdo.dawn.examples.acore.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.AcoreDocumentProvider_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, AcoreDiagramEditorPlugin.ID, 0, msg != null ? msg
+ : Messages.AcoreDocumentProvider_DiagramLoadingError, e));
+ }
+ throw thrownExcp;
+ }
+ }
+ else
+ {
+ throw new CoreException(new Status(IStatus.ERROR, AcoreDiagramEditorPlugin.ID, 0, NLS.bind(
+ Messages.AcoreDocumentProvider_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)
+ {
+ LinkedList<IFile> files2Validate = new LinkedList<IFile>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = 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)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError(Messages.AcoreDocumentProvider_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)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError(Messages.AcoreDocumentProvider_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<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = 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)
+ {
+ LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = 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)
+ {
+ LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = 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)
+ {
+ LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = 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)
+ {
+ LinkedList<ISchedulingRule> files = new LinkedList<ISchedulingRule>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = 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<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = 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, AcoreDiagramEditorPlugin.ID,
+ IResourceStatus.OUT_OF_SYNC_LOCAL, Messages.AcoreDocumentProvider_UnsynchronizedFileSaveError, null));
+ }
+ info.stopResourceListening();
+ fireElementStateChanging(element);
+ try
+ {
+ monitor.beginTask(Messages.AcoreDocumentProvider_SaveDiagramTask,
+ info.getResourceSet().getResources().size() + 1); //"Saving diagram"
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource nextResource = it.next();
+ monitor.setTaskName(NLS.bind(Messages.AcoreDocumentProvider_SaveNextResourceTask, nextResource.getURI()));
+ if (nextResource.isLoaded() && !info.getEditingDomain().isReadOnly(nextResource))
+ {
+ try
+ {
+ nextResource.save(AcoreDiagramEditorUtil.getSaveOptions());
+ }
+ catch (IOException e)
+ {
+ fireElementStateChangeFailed(element);
+ throw new CoreException(new Status(IStatus.ERROR, AcoreDiagramEditorPlugin.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<IFile> 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, AcoreDiagramEditorPlugin.ID, 0, NLS.bind(
+ Messages.AcoreDocumentProvider_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,
+ AcoreDiagramEditorPlugin.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.AcoreDocumentProvider_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(AcoreDiagramEditorUtil.getSaveOptions());
+ }
+ catch (ExecutionException e)
+ {
+ fireElementStateChangeFailed(element);
+ throw new CoreException(
+ new Status(IStatus.ERROR, AcoreDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
+ }
+ catch (IOException e)
+ {
+ fireElementStateChangeFailed(element);
+ throw new CoreException(
+ new Status(IStatus.ERROR, AcoreDiagramEditorPlugin.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)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError(Messages.AcoreDocumentProvider_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 LinkedList<Resource> myUnSynchronizedResources = new LinkedList<Resource>();
+
+ /**
+ * @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 Iterator<Resource> getLoadedResourcesIterator()
+ {
+ return new ArrayList<Resource>(getResourceSet().getResources()).iterator();
+ }
+
+ /**
+ * @generated
+ */
+ public IEditorInput getEditorInput()
+ {
+ return myEditorInput;
+ }
+
+ /**
+ * @generated
+ */
+ public void dispose()
+ {
+ stopResourceListening();
+ getResourceSet().eAdapters().remove(myResourceSetListener);
+ for (Iterator<Resource> it = getLoadedResourcesIterator(); it.hasNext();)
+ {
+ Resource resource = it.next();
+ resource.unload();
+ }
+ getEditingDomain().dispose();
+ }
+
+ /**
+ * @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/*<org.eclipse.emf.ecore.resource.Resource>*/it = myInfo.getLoadedResourcesIterator(); 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreInitDiagramFileAction.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreInitDiagramFileAction.java
new file mode 100644
index 0000000000..a444d29ef1
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreInitDiagramFileAction.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+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.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 AcoreInitDiagramFileAction 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)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
+ }
+ if (diagramRoot == null)
+ {
+ MessageDialog.openError(getShell(), Messages.InitDiagramFile_ResourceErrorDialogTitle,
+ Messages.InitDiagramFile_ResourceErrorDialogMessage);
+ return;
+ }
+ Wizard wizard = new AcoreNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain);
+ wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, ACoreRootEditPart.MODEL_ID));
+ AcoreDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreLinkDescriptor.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreLinkDescriptor.java
new file mode 100644
index 0000000000..ed19159691
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreLinkDescriptor.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreLinkDescriptor extends AcoreNodeDescriptor
+{
+
+ /**
+ * @generated
+ */
+ private EObject mySource;
+
+ /**
+ * @generated
+ */
+ private EObject myDestination;
+
+ /**
+ * @generated
+ */
+ private IAdaptable mySemanticAdapter;
+
+ /**
+ * @generated
+ */
+ private AcoreLinkDescriptor(EObject source, EObject destination, EObject linkElement, int linkVID)
+ {
+ super(linkElement, linkVID);
+ mySource = source;
+ myDestination = destination;
+ }
+
+ /**
+ * @generated
+ */
+ public AcoreLinkDescriptor(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 AcoreLinkDescriptor(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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreMatchingStrategy.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreMatchingStrategy.java
new file mode 100644
index 0000000000..11c44de2be
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreMatchingStrategy.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreMatchingStrategy 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreNewDiagramFileWizard.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreNewDiagramFileWizard.java
new file mode 100644
index 0000000000..5e3fd50860
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreNewDiagramFileWizard.java
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+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.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 AcoreNewDiagramFileWizard extends Wizard
+{
+
+ /**
+ * @generated
+ */
+ private WizardNewFileCreationPage myFileCreationPage;
+
+ /**
+ * @generated
+ */
+ private ModelElementSelectionPage diagramRootElementSelectionPage;
+
+ /**
+ * @generated
+ */
+ private TransactionalEditingDomain myEditingDomain;
+
+ /**
+ * @generated
+ */
+ public AcoreNewDiagramFileWizard(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.AcoreNewDiagramFileWizard_CreationPageName,
+ StructuredSelection.EMPTY);
+ myFileCreationPage.setTitle(Messages.AcoreNewDiagramFileWizard_CreationPageTitle);
+ myFileCreationPage.setDescription(NLS.bind(Messages.AcoreNewDiagramFileWizard_CreationPageDescription,
+ ACoreRootEditPart.MODEL_ID));
+ IPath filePath;
+ String fileName = URI.decode(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(AcoreDiagramEditorUtil.getUniqueFileName(filePath, fileName, "acore_diagram")); //$NON-NLS-1$
+
+ diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(
+ Messages.AcoreNewDiagramFileWizard_RootSelectionPageName);
+ diagramRootElementSelectionPage.setTitle(Messages.AcoreNewDiagramFileWizard_RootSelectionPageTitle);
+ diagramRootElementSelectionPage.setDescription(Messages.AcoreNewDiagramFileWizard_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();
+ AcoreDiagramEditorUtil.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.AcoreNewDiagramFileWizard_InitDiagramCommand, affectedFiles)
+ {
+
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
+ {
+ int diagramVID = AcoreVisualIDRegistry.getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
+ if (diagramVID != ACoreRootEditPart.VISUAL_ID)
+ {
+ return CommandResult.newErrorCommandResult(Messages.AcoreNewDiagramFileWizard_IncorrectRootError);
+ }
+ Diagram diagram = ViewService.createDiagram(diagramRootElementSelectionPage.getModelElement(),
+ ACoreRootEditPart.MODEL_ID, AcoreDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ diagramResource.getContents().add(diagram);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ try
+ {
+ OperationHistoryFactory.getOperationHistory().execute(command, new NullProgressMonitor(), null);
+ diagramResource.save(AcoreDiagramEditorUtil.getSaveOptions());
+ AcoreDiagramEditorUtil.openDiagram(diagramResource);
+ }
+ catch (ExecutionException e)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
+ }
+ catch (IOException ex)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Save operation failed for: " + diagramModelURI, ex); //$NON-NLS-1$
+ }
+ catch (PartInitException ex)
+ {
+ AcoreDiagramEditorPlugin.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.AcoreNewDiagramFileWizard_RootSelectionPageSelectionTitle;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean validatePage()
+ {
+ if (selectedModelElement == null)
+ {
+ setErrorMessage(Messages.AcoreNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
+ return false;
+ }
+ boolean result = ViewService.getInstance().provides(
+ new CreateDiagramViewOperation(new EObjectAdapter(selectedModelElement), ACoreRootEditPart.MODEL_ID,
+ AcoreDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
+ setErrorMessage(result ? null : Messages.AcoreNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
+ return result;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreNodeDescriptor.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreNodeDescriptor.java
new file mode 100644
index 0000000000..a9ee5f9dbe
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreNodeDescriptor.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * @generated
+ */
+public class AcoreNodeDescriptor
+{
+
+ /**
+ * @generated
+ */
+ private final EObject myModelElement;
+
+ /**
+ * @generated
+ */
+ private final int myVisualID;
+
+ /**
+ * @generated
+ */
+ public AcoreNodeDescriptor(EObject modelElement, int visualID)
+ {
+ myModelElement = modelElement;
+ myVisualID = visualID;
+ }
+
+ /**
+ * @generated
+ */
+ public EObject getModelElement()
+ {
+ return myModelElement;
+ }
+
+ /**
+ * @generated
+ */
+ public int getVisualID()
+ {
+ return myVisualID;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcorePaletteFactory.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcorePaletteFactory.java
new file mode 100644
index 0000000000..8cb627195a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcorePaletteFactory.java
@@ -0,0 +1,269 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.palette.PaletteContainer;
+import org.eclipse.gef.palette.PaletteDrawer;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool;
+import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+/**
+ * @generated
+ */
+public class AcorePaletteFactory
+{
+
+ /**
+ * @generated
+ */
+ public void fillPalette(PaletteRoot paletteRoot)
+ {
+ paletteRoot.add(createNode1Group());
+ paletteRoot.add(createConnections2Group());
+ }
+
+ /**
+ * Creates "Node" palette tool group
+ * @generated
+ */
+ private PaletteContainer createNode1Group()
+ {
+ PaletteDrawer paletteContainer = new PaletteDrawer(Messages.Node1Group_title);
+ paletteContainer.setId("createNode1Group"); //$NON-NLS-1$
+ paletteContainer.add(createAClass1CreationTool());
+ paletteContainer.add(createAInterface2CreationTool());
+ paletteContainer.add(createAAttribute3CreationTool());
+ paletteContainer.add(createAOperation4CreationTool());
+ return paletteContainer;
+ }
+
+ /**
+ * Creates "Connections" palette tool group
+ * @generated
+ */
+ private PaletteContainer createConnections2Group()
+ {
+ PaletteDrawer paletteContainer = new PaletteDrawer(Messages.Connections2Group_title);
+ paletteContainer.setId("createConnections2Group"); //$NON-NLS-1$
+ paletteContainer.add(createInherits1CreationTool());
+ paletteContainer.add(createImplements2CreationTool());
+ paletteContainer.add(createAssociation3CreationTool());
+ paletteContainer.add(createAggregation4CreationTool());
+ paletteContainer.add(createComposition5CreationTool());
+ return paletteContainer;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createAClass1CreationTool()
+ {
+ NodeToolEntry entry = new NodeToolEntry(Messages.AClass1CreationTool_title, Messages.AClass1CreationTool_desc,
+ Collections.singletonList(AcoreElementTypes.AClass_2002));
+ entry.setId("createAClass1CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreElementTypes.getImageDescriptor(AcoreElementTypes.AClass_2002));
+ entry.setLargeIcon(entry.getSmallIcon());
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createAInterface2CreationTool()
+ {
+ NodeToolEntry entry = new NodeToolEntry(Messages.AInterface2CreationTool_title,
+ Messages.AInterface2CreationTool_desc, Collections.singletonList(AcoreElementTypes.AInterface_2001));
+ entry.setId("createAInterface2CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreElementTypes.getImageDescriptor(AcoreElementTypes.AInterface_2001));
+ entry.setLargeIcon(entry.getSmallIcon());
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createAAttribute3CreationTool()
+ {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(AcoreElementTypes.AAttribute_3001);
+ types.add(AcoreElementTypes.AAttribute_3003);
+ NodeToolEntry entry = new NodeToolEntry(Messages.AAttribute3CreationTool_title,
+ Messages.AAttribute3CreationTool_desc, types);
+ entry.setId("createAAttribute3CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreElementTypes.getImageDescriptor(AcoreElementTypes.AAttribute_3001));
+ entry.setLargeIcon(entry.getSmallIcon());
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createAOperation4CreationTool()
+ {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(AcoreElementTypes.AOperation_3002);
+ types.add(AcoreElementTypes.AOperation_3004);
+ NodeToolEntry entry = new NodeToolEntry(Messages.AOperation4CreationTool_title,
+ Messages.AOperation4CreationTool_desc, types);
+ entry.setId("createAOperation4CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreElementTypes.getImageDescriptor(AcoreElementTypes.AOperation_3002));
+ entry.setLargeIcon(entry.getSmallIcon());
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createInherits1CreationTool()
+ {
+ LinkToolEntry entry = new LinkToolEntry(Messages.Inherits1CreationTool_title, Messages.Inherits1CreationTool_desc,
+ Collections.singletonList(AcoreElementTypes.AClassSubClasses_4001));
+ entry.setId("createInherits1CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png")); //$NON-NLS-1$
+ entry.setLargeIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png")); //$NON-NLS-1$
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createImplements2CreationTool()
+ {
+ LinkToolEntry entry = new LinkToolEntry(Messages.Implements2CreationTool_title,
+ Messages.Implements2CreationTool_desc, Collections
+ .singletonList(AcoreElementTypes.AClassImplementedInterfaces_4002));
+ entry.setId("createImplements2CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png")); //$NON-NLS-1$
+ entry.setLargeIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png")); //$NON-NLS-1$
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createAssociation3CreationTool()
+ {
+ LinkToolEntry entry = new LinkToolEntry(Messages.Association3CreationTool_title,
+ Messages.Association3CreationTool_desc, Collections.singletonList(AcoreElementTypes.AClassAssociations_4003));
+ entry.setId("createAssociation3CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png")); //$NON-NLS-1$
+ entry.setLargeIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png")); //$NON-NLS-1$
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createAggregation4CreationTool()
+ {
+ LinkToolEntry entry = new LinkToolEntry(Messages.Aggregation4CreationTool_title,
+ Messages.Aggregation4CreationTool_desc, Collections.singletonList(AcoreElementTypes.AClassAggregations_4004));
+ entry.setId("createAggregation4CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png")); //$NON-NLS-1$
+ entry.setLargeIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png")); //$NON-NLS-1$
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private ToolEntry createComposition5CreationTool()
+ {
+ LinkToolEntry entry = new LinkToolEntry(Messages.Composition5CreationTool_title,
+ Messages.Composition5CreationTool_desc, Collections.singletonList(AcoreElementTypes.AClassCompositions_4005));
+ entry.setId("createComposition5CreationTool"); //$NON-NLS-1$
+ entry.setSmallIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png")); //$NON-NLS-1$
+ entry.setLargeIcon(AcoreDiagramEditorPlugin
+ .findImageDescriptor("/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png")); //$NON-NLS-1$
+ return entry;
+ }
+
+ /**
+ * @generated
+ */
+ private static class NodeToolEntry extends ToolEntry
+ {
+
+ /**
+ * @generated
+ */
+ private final List<IElementType> elementTypes;
+
+ /**
+ * @generated
+ */
+ private NodeToolEntry(String title, String description, List<IElementType> 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<IElementType> relationshipTypes;
+
+ /**
+ * @generated
+ */
+ private LinkToolEntry(String title, String description, List<IElementType> 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreUriEditorInputTester.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreUriEditorInputTester.java
new file mode 100644
index 0000000000..62b26d9d0a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreUriEditorInputTester.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.emf.common.ui.URIEditorInput;
+
+/**
+ * @generated
+ */
+public class AcoreUriEditorInputTester 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 "acore_diagram".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreVisualIDRegistry.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreVisualIDRegistry.java
new file mode 100644
index 0000000000..20c11815c2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/AcoreVisualIDRegistry.java
@@ -0,0 +1,322 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAAttributeCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAOperationClassCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassNameEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAAttributeInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAOperationInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceNameEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+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 AcoreVisualIDRegistry
+{
+
+ /**
+ * @generated
+ */
+ private static final String DEBUG_KEY = "org.eclipse.emf.cdo.dawn.examples.acore.diagram/debug/visualID"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static int getVisualID(View view)
+ {
+ if (view instanceof Diagram)
+ {
+ if (ACoreRootEditPart.MODEL_ID.equals(view.getType()))
+ {
+ return ACoreRootEditPart.VISUAL_ID;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+ return org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry.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)))
+ {
+ AcoreDiagramEditorPlugin.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 (AcorePackage.eINSTANCE.getACoreRoot().isSuperTypeOf(domainElement.eClass())
+ && isDiagram((ACoreRoot)domainElement))
+ {
+ return ACoreRootEditPart.VISUAL_ID;
+ }
+ return -1;
+ }
+
+ /**
+ * @generated
+ */
+ public static int getNodeVisualID(View containerView, EObject domainElement)
+ {
+ if (domainElement == null)
+ {
+ return -1;
+ }
+ String containerModelID = org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry
+ .getModelID(containerView);
+ if (!ACoreRootEditPart.MODEL_ID.equals(containerModelID))
+ {
+ return -1;
+ }
+ int containerVisualID;
+ if (ACoreRootEditPart.MODEL_ID.equals(containerModelID))
+ {
+ containerVisualID = org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry
+ .getVisualID(containerView);
+ }
+ else
+ {
+ if (containerView instanceof Diagram)
+ {
+ containerVisualID = ACoreRootEditPart.VISUAL_ID;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+ switch (containerVisualID)
+ {
+ case ACoreRootEditPart.VISUAL_ID:
+ if (AcorePackage.eINSTANCE.getAInterface().isSuperTypeOf(domainElement.eClass()))
+ {
+ return AInterfaceEditPart.VISUAL_ID;
+ }
+ if (AcorePackage.eINSTANCE.getAClass().isSuperTypeOf(domainElement.eClass()))
+ {
+ return AClassEditPart.VISUAL_ID;
+ }
+ break;
+ case AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID:
+ if (AcorePackage.eINSTANCE.getAAttribute().isSuperTypeOf(domainElement.eClass()))
+ {
+ return AAttributeEditPart.VISUAL_ID;
+ }
+ break;
+ case AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID:
+ if (AcorePackage.eINSTANCE.getAOperation().isSuperTypeOf(domainElement.eClass()))
+ {
+ return AOperationEditPart.VISUAL_ID;
+ }
+ break;
+ case AClassAAttributeCompartmentEditPart.VISUAL_ID:
+ if (AcorePackage.eINSTANCE.getAAttribute().isSuperTypeOf(domainElement.eClass()))
+ {
+ return AAttribute2EditPart.VISUAL_ID;
+ }
+ break;
+ case AClassAOperationClassCompartmentEditPart.VISUAL_ID:
+ if (AcorePackage.eINSTANCE.getAOperation().isSuperTypeOf(domainElement.eClass()))
+ {
+ return AOperation2EditPart.VISUAL_ID;
+ }
+ break;
+ }
+ return -1;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canCreateNode(View containerView, int nodeVisualID)
+ {
+ String containerModelID = org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry
+ .getModelID(containerView);
+ if (!ACoreRootEditPart.MODEL_ID.equals(containerModelID))
+ {
+ return false;
+ }
+ int containerVisualID;
+ if (ACoreRootEditPart.MODEL_ID.equals(containerModelID))
+ {
+ containerVisualID = org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry
+ .getVisualID(containerView);
+ }
+ else
+ {
+ if (containerView instanceof Diagram)
+ {
+ containerVisualID = ACoreRootEditPart.VISUAL_ID;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ switch (containerVisualID)
+ {
+ case ACoreRootEditPart.VISUAL_ID:
+ if (AInterfaceEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ if (AClassEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ break;
+ case AInterfaceEditPart.VISUAL_ID:
+ if (AInterfaceNameEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ if (AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ if (AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ break;
+ case AClassEditPart.VISUAL_ID:
+ if (AClassNameEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ if (AClassAAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ if (AClassAOperationClassCompartmentEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ break;
+ case AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID:
+ if (AAttributeEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ break;
+ case AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID:
+ if (AOperationEditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ break;
+ case AClassAAttributeCompartmentEditPart.VISUAL_ID:
+ if (AAttribute2EditPart.VISUAL_ID == nodeVisualID)
+ {
+ return true;
+ }
+ break;
+ case AClassAOperationClassCompartmentEditPart.VISUAL_ID:
+ if (AOperation2EditPart.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(ACoreRoot element)
+ {
+ return true;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DeleteElementAction.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DeleteElementAction.java
new file mode 100644
index 0000000000..c3cacba0a1
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DeleteElementAction.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.actions.AbstractDeleteFromAction;
+import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
+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.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @generated
+ */
+public class DeleteElementAction extends AbstractDeleteFromAction
+{
+
+ /**
+ * @generated
+ */
+ public DeleteElementAction(IWorkbenchPart part)
+ {
+ super(part);
+ }
+
+ /**
+ * @generated
+ */
+ public DeleteElementAction(IWorkbenchPage workbenchPage)
+ {
+ super(workbenchPage);
+ }
+
+ /**
+ * @generated
+ */
+ public void init()
+ {
+ super.init();
+ setId(ActionIds.ACTION_DELETE_FROM_MODEL);
+ setText(DiagramUIMessages.DiagramEditor_Delete_from_Model);
+ setToolTipText(DiagramUIMessages.DiagramEditor_Delete_from_ModelToolTip);
+ ISharedImages workbenchImages = PlatformUI.getWorkbench().getSharedImages();
+ setHoverImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+ setImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+ setDisabledImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
+ }
+
+ /**
+ * @generated
+ */
+ protected String getCommandLabel()
+ {
+ return DiagramUIMessages.DiagramEditor_Delete_from_Model;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCommand(Request request)
+ {
+ List operationSet = getOperationSet();
+ if (operationSet.isEmpty())
+ {
+ return UnexecutableCommand.INSTANCE;
+ }
+ Iterator editParts = operationSet.iterator();
+ CompositeTransactionalCommand command = new CompositeTransactionalCommand(getEditingDomain(), getCommandLabel());
+ while (editParts.hasNext())
+ {
+ EditPart editPart = (EditPart)editParts.next();
+ Command curCommand = editPart.getCommand(request);
+ if (curCommand != null)
+ {
+ command.compose(new CommandProxy(curCommand));
+ }
+ }
+ if (command.isEmpty() || command.size() != operationSet.size())
+ {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return new ICommandProxy(command);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DiagramEditorContextMenuProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DiagramEditorContextMenuProvider.java
new file mode 100644
index 0000000000..20dc29fb25
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DiagramEditorContextMenuProvider.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService;
+import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
+import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * @generated
+ */
+public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider
+{
+
+ /**
+ * @generated
+ */
+ private IWorkbenchPart part;
+
+ /**
+ * @generated
+ */
+ private DeleteElementAction deleteAction;
+
+ /**
+ * @generated
+ */
+ public DiagramEditorContextMenuProvider(IWorkbenchPart part, EditPartViewer viewer)
+ {
+ super(part, viewer);
+ this.part = part;
+ deleteAction = new DeleteElementAction(part);
+ deleteAction.init();
+ }
+
+ /**
+ * @generated
+ */
+ public void dispose()
+ {
+ if (deleteAction != null)
+ {
+ deleteAction.dispose();
+ deleteAction = null;
+ }
+ super.dispose();
+ }
+
+ /**
+ * @generated
+ */
+ public void buildContextMenu(final IMenuManager menu)
+ {
+ getViewer().flush();
+ try
+ {
+ TransactionUtil.getEditingDomain((EObject)getViewer().getContents().getModel()).runExclusive(new Runnable()
+ {
+
+ public void run()
+ {
+ ContributionItemService.getInstance().contributeToPopupMenu(DiagramEditorContextMenuProvider.this, part);
+ menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
+ menu.appendToGroup("editGroup", deleteAction);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ AcoreDiagramEditorPlugin.getInstance().logError("Error building context menu", e);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/LoadResourceAction.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/LoadResourceAction.java
new file mode 100644
index 0000000000..f73991ff1d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/LoadResourceAction.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.part;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * @generated
+ */
+public class LoadResourceAction extends AbstractHandler
+{
+ /**
+ * @generated
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException
+ {
+ IEditorPart diagramEditor = HandlerUtil.getActiveEditorChecked(event);
+ Shell shell = diagramEditor.getEditorSite().getShell();
+ assert diagramEditor instanceof DiagramEditor;
+ TransactionalEditingDomain editingDomain = ((DiagramEditor)diagramEditor).getEditingDomain();
+ org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog loadResourceDialog = new org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog(
+ shell, editingDomain);
+ loadResourceDialog.open();
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/Messages.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/Messages.java
new file mode 100644
index 0000000000..5738eb08cf
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/Messages.java
@@ -0,0 +1,488 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreCreationWizardTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreCreationWizard_DiagramModelFilePageTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreCreationWizard_DiagramModelFilePageDescription;
+
+ /**
+ * @generated
+ */
+ public static String AcoreCreationWizard_DomainModelFilePageTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreCreationWizard_DomainModelFilePageDescription;
+
+ /**
+ * @generated
+ */
+ public static String AcoreCreationWizardOpenEditorError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreCreationWizardCreationError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreCreationWizardPageExtensionError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditorUtil_OpenModelResourceErrorDialogTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditorUtil_OpenModelResourceErrorDialogMessage;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditorUtil_CreateDiagramProgressTask;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditorUtil_CreateDiagramCommandLabel;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_isModifiable;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_handleElementContentChanged;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_IncorrectInputError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_NoDiagramInResourceError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_DiagramLoadingError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_UnsynchronizedFileSaveError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_SaveDiagramTask;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_SaveNextResourceTask;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDocumentProvider_SaveAsOperation;
+
+ /**
+ * @generated
+ */
+ public static String InitDiagramFile_ResourceErrorDialogTitle;
+
+ /**
+ * @generated
+ */
+ public static String InitDiagramFile_ResourceErrorDialogMessage;
+
+ /**
+ * @generated
+ */
+ public static String InitDiagramFile_WizardTitle;
+
+ /**
+ * @generated
+ */
+ public static String InitDiagramFile_OpenModelFileDialogTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_CreationPageName;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_CreationPageTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_CreationPageDescription;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_RootSelectionPageName;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_RootSelectionPageTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_RootSelectionPageDescription;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_RootSelectionPageSelectionTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_RootSelectionPageNoSelectionMessage;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_InitDiagramCommand;
+
+ /**
+ * @generated
+ */
+ public static String AcoreNewDiagramFileWizard_IncorrectRootError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditor_SavingDeletedFile;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditor_SaveAsErrorTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditor_SaveAsErrorMessage;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditor_SaveErrorTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreDiagramEditor_SaveErrorMessage;
+
+ /**
+ * @generated
+ */
+ public static String AcoreElementChooserDialog_SelectModelElementTitle;
+
+ /**
+ * @generated
+ */
+ public static String ModelElementSelectionPageMessage;
+
+ /**
+ * @generated
+ */
+ public static String ValidateActionMessage;
+
+ /**
+ * @generated
+ */
+ public static String Node1Group_title;
+
+ /**
+ * @generated
+ */
+ public static String Connections2Group_title;
+
+ /**
+ * @generated
+ */
+ public static String AClass1CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String AClass1CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String AInterface2CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String AInterface2CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String AAttribute3CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String AAttribute3CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String AOperation4CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String AOperation4CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String Inherits1CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String Inherits1CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String Implements2CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String Implements2CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String Association3CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String Association3CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String Aggregation4CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String Aggregation4CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String Composition5CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String Composition5CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String AInterfaceAAttributeInterfaceCompartmentEditPart_title;
+
+ /**
+ * @generated
+ */
+ public static String AInterfaceAOperationInterfaceCompartmentEditPart_title;
+
+ /**
+ * @generated
+ */
+ public static String AClassAAttributeCompartmentEditPart_title;
+
+ /**
+ * @generated
+ */
+ public static String AClassAOperationClassCompartmentEditPart_title;
+
+ /**
+ * @generated
+ */
+ public static String CommandName_OpenDiagram;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassSubClasses_4001_target;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassSubClasses_4001_source;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassCompositions_4005_target;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassCompositions_4005_source;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AInterface_2001_incominglinks;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassAggregations_4004_target;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassAggregations_4004_source;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassImplementedInterfaces_4002_target;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassImplementedInterfaces_4002_source;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClass_2002_incominglinks;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClass_2002_outgoinglinks;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_ACoreRoot_1000_links;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassAssociations_4003_target;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorGroupName_AClassAssociations_4003_source;
+
+ /**
+ * @generated
+ */
+ public static String NavigatorActionProvider_OpenDiagramActionName;
+
+ /**
+ * @generated
+ */
+ public static String AbstractParser_UnexpectedValueType;
+
+ /**
+ * @generated
+ */
+ public static String AbstractParser_WrongStringConversion;
+
+ /**
+ * @generated
+ */
+ public static String AbstractParser_UnknownLiteral;
+
+ /**
+ * @generated
+ */
+ public static String MessageFormatParser_InvalidInputError;
+
+ /**
+ * @generated
+ */
+ public static String AcoreModelingAssistantProviderTitle;
+
+ /**
+ * @generated
+ */
+ public static String AcoreModelingAssistantProviderMessage;
+
+ //TODO: put accessor fields manually
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/ModelElementSelectionPage.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/ModelElementSelectionPage.java
new file mode 100644
index 0000000000..279aeb423c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/ModelElementSelectionPage.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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(AcoreDiagramEditorPlugin.getInstance()
+ .getItemProvidersAdapterFactory()));
+ modelViewer.setLabelProvider(new AdapterFactoryLabelProvider(AcoreDiagramEditorPlugin.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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramAppearancePreferencePage.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramAppearancePreferencePage.java
new file mode 100644
index 0000000000..332c390f92
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramAppearancePreferencePage.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage;
+
+/**
+ * @generated
+ */
+public class DiagramAppearancePreferencePage extends AppearancePreferencePage
+{
+
+ /**
+ * @generated
+ */
+ public DiagramAppearancePreferencePage()
+ {
+ setPreferenceStore(AcoreDiagramEditorPlugin.getInstance().getPreferenceStore());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramConnectionsPreferencePage.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramConnectionsPreferencePage.java
new file mode 100644
index 0000000000..a390c8d573
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramConnectionsPreferencePage.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage;
+
+/**
+ * @generated
+ */
+public class DiagramConnectionsPreferencePage extends ConnectionsPreferencePage
+{
+
+ /**
+ * @generated
+ */
+ public DiagramConnectionsPreferencePage()
+ {
+ setPreferenceStore(AcoreDiagramEditorPlugin.getInstance().getPreferenceStore());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramGeneralPreferencePage.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramGeneralPreferencePage.java
new file mode 100644
index 0000000000..0a4dfad9a7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramGeneralPreferencePage.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.gmf.runtime.diagram.ui.preferences.DiagramsPreferencePage;
+
+/**
+ * @generated
+ */
+public class DiagramGeneralPreferencePage extends DiagramsPreferencePage
+{
+
+ /**
+ * @generated
+ */
+ public DiagramGeneralPreferencePage()
+ {
+ setPreferenceStore(AcoreDiagramEditorPlugin.getInstance().getPreferenceStore());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramPreferenceInitializer.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramPreferenceInitializer.java
new file mode 100644
index 0000000000..0c6c8764bc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramPreferenceInitializer.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * @generated
+ */
+public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer
+{
+
+ /**
+ * @generated
+ */
+ public void initializeDefaultPreferences()
+ {
+ IPreferenceStore store = getPreferenceStore();
+ DiagramGeneralPreferencePage.initDefaults(store);
+ DiagramAppearancePreferencePage.initDefaults(store);
+ DiagramConnectionsPreferencePage.initDefaults(store);
+ DiagramPrintingPreferencePage.initDefaults(store);
+ DiagramRulersAndGridPreferencePage.initDefaults(store);
+
+ }
+
+ /**
+ * @generated
+ */
+ protected IPreferenceStore getPreferenceStore()
+ {
+ return AcoreDiagramEditorPlugin.getInstance().getPreferenceStore();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramPrintingPreferencePage.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramPrintingPreferencePage.java
new file mode 100644
index 0000000000..066c6b91b0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramPrintingPreferencePage.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
+
+/**
+ * @generated
+ */
+public class DiagramPrintingPreferencePage extends PrintingPreferencePage
+{
+
+ /**
+ * @generated
+ */
+ public DiagramPrintingPreferencePage()
+ {
+ setPreferenceStore(AcoreDiagramEditorPlugin.getInstance().getPreferenceStore());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramRulersAndGridPreferencePage.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramRulersAndGridPreferencePage.java
new file mode 100644
index 0000000000..725b8eca55
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/preferences/DiagramRulersAndGridPreferencePage.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.preferences;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
+
+/**
+ * @generated
+ */
+public class DiagramRulersAndGridPreferencePage extends RulerGridPreferencePage
+{
+
+ /**
+ * @generated
+ */
+ public DiagramRulersAndGridPreferencePage()
+ {
+ setPreferenceStore(AcoreDiagramEditorPlugin.getInstance().getPreferenceStore());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreEditPartProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreEditPartProvider.java
new file mode 100644
index 0000000000..47de25adf8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreEditPartProvider.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers;
+
+import java.lang.ref.WeakReference;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AcoreEditPartFactory;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+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 AcoreEditPartProvider extends AbstractEditPartProvider
+{
+
+ /**
+ * @generated
+ */
+ private EditPartFactory factory;
+
+ /**
+ * @generated
+ */
+ private boolean allowCaching;
+
+ /**
+ * @generated
+ */
+ private WeakReference cachedPart;
+
+ /**
+ * @generated
+ */
+ private WeakReference cachedView;
+
+ /**
+ * @generated
+ */
+ public AcoreEditPartProvider()
+ {
+ setFactory(new AcoreEditPartFactory());
+ 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 (!ACoreRootEditPart.MODEL_ID.equals(AcoreVisualIDRegistry.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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreElementTypes.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreElementTypes.java
new file mode 100644
index 0000000000..d541011f10
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreElementTypes.java
@@ -0,0 +1,355 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAggregationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAssociationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassCompositionsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassImplementedInterfacesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassSubClassesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+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.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 AcoreElementTypes extends ElementInitializers
+{
+
+ /**
+ * @generated
+ */
+ private AcoreElementTypes()
+ {
+ }
+
+ /**
+ * @generated
+ */
+ private static Map<IElementType, ENamedElement> elements;
+
+ /**
+ * @generated
+ */
+ private static ImageRegistry imageRegistry;
+
+ /**
+ * @generated
+ */
+ private static Set<IElementType> KNOWN_ELEMENT_TYPES;
+
+ /**
+ * @generated
+ */
+ public static final IElementType ACoreRoot_1000 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.ACoreRoot_1000"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AInterface_2001 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AInterface_2001"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AClass_2002 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClass_2002"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AAttribute_3001 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AAttribute_3001"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AOperation_3002 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AOperation_3002"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AAttribute_3003 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AAttribute_3003"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AOperation_3004 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AOperation_3004"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AClassSubClasses_4001 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassSubClasses_4001"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AClassImplementedInterfaces_4002 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassImplementedInterfaces_4002"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AClassAssociations_4003 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassAssociations_4003"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AClassAggregations_4004 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassAggregations_4004"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final IElementType AClassCompositions_4005 = getElementType("org.eclipse.emf.cdo.dawn.examples.acore.diagram.AClassCompositions_4005"); //$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 AcoreDiagramEditorPlugin.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<IElementType, ENamedElement>();
+
+ elements.put(ACoreRoot_1000, AcorePackage.eINSTANCE.getACoreRoot());
+
+ elements.put(AInterface_2001, AcorePackage.eINSTANCE.getAInterface());
+
+ elements.put(AClass_2002, AcorePackage.eINSTANCE.getAClass());
+
+ elements.put(AAttribute_3001, AcorePackage.eINSTANCE.getAAttribute());
+
+ elements.put(AOperation_3002, AcorePackage.eINSTANCE.getAOperation());
+
+ elements.put(AAttribute_3003, AcorePackage.eINSTANCE.getAAttribute());
+
+ elements.put(AOperation_3004, AcorePackage.eINSTANCE.getAOperation());
+
+ elements.put(AClassSubClasses_4001, AcorePackage.eINSTANCE.getAClass_SubClasses());
+
+ elements.put(AClassImplementedInterfaces_4002, AcorePackage.eINSTANCE.getAClass_ImplementedInterfaces());
+
+ elements.put(AClassAssociations_4003, AcorePackage.eINSTANCE.getAClass_Associations());
+
+ elements.put(AClassAggregations_4004, AcorePackage.eINSTANCE.getAClass_Aggregations());
+
+ elements.put(AClassCompositions_4005, AcorePackage.eINSTANCE.getAClass_Compositions());
+ }
+ 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<IElementType>();
+ KNOWN_ELEMENT_TYPES.add(ACoreRoot_1000);
+ KNOWN_ELEMENT_TYPES.add(AInterface_2001);
+ KNOWN_ELEMENT_TYPES.add(AClass_2002);
+ KNOWN_ELEMENT_TYPES.add(AAttribute_3001);
+ KNOWN_ELEMENT_TYPES.add(AOperation_3002);
+ KNOWN_ELEMENT_TYPES.add(AAttribute_3003);
+ KNOWN_ELEMENT_TYPES.add(AOperation_3004);
+ KNOWN_ELEMENT_TYPES.add(AClassSubClasses_4001);
+ KNOWN_ELEMENT_TYPES.add(AClassImplementedInterfaces_4002);
+ KNOWN_ELEMENT_TYPES.add(AClassAssociations_4003);
+ KNOWN_ELEMENT_TYPES.add(AClassAggregations_4004);
+ KNOWN_ELEMENT_TYPES.add(AClassCompositions_4005);
+ }
+ return KNOWN_ELEMENT_TYPES.contains(elementType);
+ }
+
+ /**
+ * @generated
+ */
+ public static IElementType getElementType(int visualID)
+ {
+ switch (visualID)
+ {
+ case ACoreRootEditPart.VISUAL_ID:
+ return ACoreRoot_1000;
+ case AInterfaceEditPart.VISUAL_ID:
+ return AInterface_2001;
+ case AClassEditPart.VISUAL_ID:
+ return AClass_2002;
+ case AAttributeEditPart.VISUAL_ID:
+ return AAttribute_3001;
+ case AOperationEditPart.VISUAL_ID:
+ return AOperation_3002;
+ case AAttribute2EditPart.VISUAL_ID:
+ return AAttribute_3003;
+ case AOperation2EditPart.VISUAL_ID:
+ return AOperation_3004;
+ case AClassSubClassesEditPart.VISUAL_ID:
+ return AClassSubClasses_4001;
+ case AClassImplementedInterfacesEditPart.VISUAL_ID:
+ return AClassImplementedInterfaces_4002;
+ case AClassAssociationsEditPart.VISUAL_ID:
+ return AClassAssociations_4003;
+ case AClassAggregationsEditPart.VISUAL_ID:
+ return AClassAggregations_4004;
+ case AClassCompositionsEditPart.VISUAL_ID:
+ return AClassCompositions_4005;
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreIconProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreIconProvider.java
new file mode 100644
index 0000000000..b64ac07f27
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreIconProvider.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcoreIconProvider extends AbstractProvider implements IIconProvider
+{
+
+ /**
+ * @generated
+ */
+ public Image getIcon(IAdaptable hint, int flags)
+ {
+ return AcoreElementTypes.getImage(hint);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean provides(IOperation operation)
+ {
+ if (operation instanceof GetIconOperation)
+ {
+ return ((GetIconOperation)operation).execute(this) != null;
+ }
+ return false;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreModelingAssistantProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreModelingAssistantProvider.java
new file mode 100644
index 0000000000..11d4928b79
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreModelingAssistantProvider.java
@@ -0,0 +1,226 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreDiagramEditorPlugin;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.Messages;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+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 AcoreModelingAssistantProvider extends ModelingAssistantProvider
+{
+
+ /**
+ * @generated
+ */
+ public List getTypesForPopupBar(IAdaptable host)
+ {
+ IGraphicalEditPart editPart = (IGraphicalEditPart)host.getAdapter(IGraphicalEditPart.class);
+ if (editPart instanceof ACoreRootEditPart)
+ {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(AcoreElementTypes.AInterface_2001);
+ types.add(AcoreElementTypes.AClass_2002);
+ return types;
+ }
+ if (editPart instanceof AInterfaceEditPart)
+ {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(AcoreElementTypes.AAttribute_3001);
+ types.add(AcoreElementTypes.AOperation_3002);
+ return types;
+ }
+ if (editPart instanceof AClassEditPart)
+ {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(AcoreElementTypes.AAttribute_3003);
+ types.add(AcoreElementTypes.AOperation_3004);
+ return types;
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public List getRelTypesOnSource(IAdaptable source)
+ {
+ IGraphicalEditPart sourceEditPart = (IGraphicalEditPart)source.getAdapter(IGraphicalEditPart.class);
+ if (sourceEditPart instanceof AClassEditPart)
+ {
+ return ((AClassEditPart)sourceEditPart).getMARelTypesOnSource();
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public List getRelTypesOnTarget(IAdaptable target)
+ {
+ IGraphicalEditPart targetEditPart = (IGraphicalEditPart)target.getAdapter(IGraphicalEditPart.class);
+ if (targetEditPart instanceof AInterfaceEditPart)
+ {
+ return ((AInterfaceEditPart)targetEditPart).getMARelTypesOnTarget();
+ }
+ if (targetEditPart instanceof AClassEditPart)
+ {
+ return ((AClassEditPart)targetEditPart).getMARelTypesOnTarget();
+ }
+ 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 AClassEditPart)
+ {
+ return ((AClassEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public List getTypesForSource(IAdaptable target, IElementType relationshipType)
+ {
+ IGraphicalEditPart targetEditPart = (IGraphicalEditPart)target.getAdapter(IGraphicalEditPart.class);
+ if (targetEditPart instanceof AInterfaceEditPart)
+ {
+ return ((AInterfaceEditPart)targetEditPart).getMATypesForSource(relationshipType);
+ }
+ if (targetEditPart instanceof AClassEditPart)
+ {
+ return ((AClassEditPart)targetEditPart).getMATypesForSource(relationshipType);
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public List getTypesForTarget(IAdaptable source, IElementType relationshipType)
+ {
+ IGraphicalEditPart sourceEditPart = (IGraphicalEditPart)source.getAdapter(IGraphicalEditPart.class);
+ if (sourceEditPart instanceof AClassEditPart)
+ {
+ return ((AClassEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
+ }
+ 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();
+ HashSet<EObject> elements = new HashSet<EObject>();
+ for (Iterator<EObject> it = diagram.getElement().eAllContents(); it.hasNext();)
+ {
+ EObject element = 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(AcoreDiagramEditorPlugin.getInstance()
+ .getItemProvidersAdapterFactory());
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider);
+ dialog.setMessage(Messages.AcoreModelingAssistantProviderMessage);
+ dialog.setTitle(Messages.AcoreModelingAssistantProviderTitle);
+ dialog.setMultipleSelection(false);
+ dialog.setElements(elements);
+ EObject selected = null;
+ if (dialog.open() == Window.OK)
+ {
+ selected = (EObject)dialog.getFirstResult();
+ }
+ return selected;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreParserProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreParserProvider.java
new file mode 100644
index 0000000000..c9ddd72de4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreParserProvider.java
@@ -0,0 +1,273 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassNameEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceNameEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.parsers.MessageFormatParser;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+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.common.ui.services.parser.ParserService;
+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 AcoreParserProvider extends AbstractProvider implements IParserProvider
+{
+
+ /**
+ * @generated
+ */
+ private IParser aInterfaceName_5001Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAInterfaceName_5001Parser()
+ {
+ if (aInterfaceName_5001Parser == null)
+ {
+ EAttribute[] features = new EAttribute[] { AcorePackage.eINSTANCE.getABasicClass_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ aInterfaceName_5001Parser = parser;
+ }
+ return aInterfaceName_5001Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser aClassName_5002Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAClassName_5002Parser()
+ {
+ if (aClassName_5002Parser == null)
+ {
+ EAttribute[] features = new EAttribute[] { AcorePackage.eINSTANCE.getABasicClass_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ aClassName_5002Parser = parser;
+ }
+ return aClassName_5002Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser aAttribute_3001Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAAttribute_3001Parser()
+ {
+ if (aAttribute_3001Parser == null)
+ {
+ EAttribute[] features = new EAttribute[] { AcorePackage.eINSTANCE.getAClassChild_Accessright(),
+ AcorePackage.eINSTANCE.getAClassChild_DataType(), AcorePackage.eINSTANCE.getAClassChild_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ parser.setViewPattern("{0} {2}:{1}"); //$NON-NLS-1$
+ parser.setEditorPattern("{0} {2}:{1}"); //$NON-NLS-1$
+ parser.setEditPattern("{0} {2}:{1}"); //$NON-NLS-1$
+ aAttribute_3001Parser = parser;
+ }
+ return aAttribute_3001Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser aOperation_3002Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAOperation_3002Parser()
+ {
+ if (aOperation_3002Parser == null)
+ {
+ EAttribute[] features = new EAttribute[] { AcorePackage.eINSTANCE.getAClassChild_Accessright(),
+ AcorePackage.eINSTANCE.getAClassChild_DataType(), AcorePackage.eINSTANCE.getAClassChild_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ parser.setViewPattern("{0} {2}():{1}"); //$NON-NLS-1$
+ parser.setEditorPattern("{0} {2}():{1}"); //$NON-NLS-1$
+ parser.setEditPattern("{0} {2}():{1}"); //$NON-NLS-1$
+ aOperation_3002Parser = parser;
+ }
+ return aOperation_3002Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser aAttribute_3003Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAAttribute_3003Parser()
+ {
+ if (aAttribute_3003Parser == null)
+ {
+ EAttribute[] features = new EAttribute[] { AcorePackage.eINSTANCE.getAClassChild_Accessright(),
+ AcorePackage.eINSTANCE.getAClassChild_DataType(), AcorePackage.eINSTANCE.getAClassChild_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ parser.setViewPattern("{0} {2}:{1}"); //$NON-NLS-1$
+ parser.setEditorPattern("{0} {2}:{1}"); //$NON-NLS-1$
+ parser.setEditPattern("{0} {2}:{1}"); //$NON-NLS-1$
+ aAttribute_3003Parser = parser;
+ }
+ return aAttribute_3003Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser aOperation_3004Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAOperation_3004Parser()
+ {
+ if (aOperation_3004Parser == null)
+ {
+ EAttribute[] features = new EAttribute[] { AcorePackage.eINSTANCE.getAClassChild_Accessright(),
+ AcorePackage.eINSTANCE.getAClassChild_DataType(), AcorePackage.eINSTANCE.getAClassChild_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ parser.setViewPattern("{0} {2}():{1}"); //$NON-NLS-1$
+ parser.setEditorPattern("{0} {2}():{1}"); //$NON-NLS-1$
+ parser.setEditPattern("{0} {2}():{1}"); //$NON-NLS-1$
+ aOperation_3004Parser = parser;
+ }
+ return aOperation_3004Parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected IParser getParser(int visualID)
+ {
+ switch (visualID)
+ {
+ case AInterfaceNameEditPart.VISUAL_ID:
+ return getAInterfaceName_5001Parser();
+ case AClassNameEditPart.VISUAL_ID:
+ return getAClassName_5002Parser();
+ case AAttributeEditPart.VISUAL_ID:
+ return getAAttribute_3001Parser();
+ case AOperationEditPart.VISUAL_ID:
+ return getAOperation_3002Parser();
+ case AAttribute2EditPart.VISUAL_ID:
+ return getAAttribute_3003Parser();
+ case AOperation2EditPart.VISUAL_ID:
+ return getAOperation_3004Parser();
+ }
+ return null;
+ }
+
+ /**
+ * Utility method that consults ParserService
+ * @generated
+ */
+ public static IParser getParser(IElementType type, EObject object, String parserHint)
+ {
+ return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint));
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser(IAdaptable hint)
+ {
+ String vid = (String)hint.getAdapter(String.class);
+ if (vid != null)
+ {
+ return getParser(AcoreVisualIDRegistry.getVisualID(vid));
+ }
+ View view = (View)hint.getAdapter(View.class);
+ if (view != null)
+ {
+ return getParser(AcoreVisualIDRegistry.getVisualID(view));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean provides(IOperation operation)
+ {
+ if (operation instanceof GetParserOperation)
+ {
+ IAdaptable hint = ((GetParserOperation)operation).getHint();
+ if (AcoreElementTypes.getElement(hint) == null)
+ {
+ return false;
+ }
+ return getParser(hint) != null;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ private 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreViewProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreViewProvider.java
new file mode 100644
index 0000000000..f8424dd561
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/AcoreViewProvider.java
@@ -0,0 +1,748 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttribute2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AAttributeEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAAttributeCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAOperationClassCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAggregationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassAssociationsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassCompositionsEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassImplementedInterfacesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassNameEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AClassSubClassesEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.ACoreRootEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAAttributeInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceAOperationInterfaceCompartmentEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AInterfaceNameEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperation2EditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.edit.parts.AOperationEditPart;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
+import org.eclipse.gmf.runtime.notation.Routing;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
+
+/**
+ * @generated
+ */
+public class AcoreViewProvider extends AbstractProvider implements IViewProvider
+{
+
+ /**
+ * @generated
+ */
+ public final boolean provides(IOperation operation)
+ {
+ if (operation instanceof CreateViewForKindOperation)
+ {
+ return provides((CreateViewForKindOperation)operation);
+ }
+ assert operation instanceof CreateViewOperation;
+ if (operation instanceof CreateDiagramViewOperation)
+ {
+ return provides((CreateDiagramViewOperation)operation);
+ }
+ else if (operation instanceof CreateEdgeViewOperation)
+ {
+ return provides((CreateEdgeViewOperation)operation);
+ }
+ else if (operation instanceof CreateNodeViewOperation)
+ {
+ return provides((CreateNodeViewOperation)operation);
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateViewForKindOperation op)
+ {
+ /*
+ if (op.getViewKind() == Node.class)
+ return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ if (op.getViewKind() == Edge.class)
+ return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ */
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateDiagramViewOperation op)
+ {
+ return ACoreRootEditPart.MODEL_ID.equals(op.getSemanticHint())
+ && AcoreVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != -1;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateNodeViewOperation op)
+ {
+ if (op.getContainerView() == null)
+ {
+ return false;
+ }
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ EObject domainElement = getSemanticElement(op.getSemanticAdapter());
+ int visualID;
+ if (op.getSemanticHint() == 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 false;
+ }
+ visualID = AcoreVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement);
+ }
+ else
+ {
+ visualID = AcoreVisualIDRegistry.getVisualID(op.getSemanticHint());
+ if (elementType != null)
+ {
+ if (!AcoreElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType)))
+ {
+ return false; // foreign element type
+ }
+ String elementTypeHint = ((IHintedType)elementType).getSemanticHint();
+ if (!op.getSemanticHint().equals(elementTypeHint))
+ {
+ return false; // if semantic hint is specified it should be the same as in element type
+ }
+ if (domainElement != null
+ && visualID != AcoreVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement))
+ {
+ return false; // visual id for node EClass should match visual id from element type
+ }
+ }
+ else
+ {
+ if (!ACoreRootEditPart.MODEL_ID.equals(AcoreVisualIDRegistry.getModelID(op.getContainerView())))
+ {
+ return false; // foreign diagram
+ }
+ switch (visualID)
+ {
+ case AInterfaceEditPart.VISUAL_ID:
+ case AClassEditPart.VISUAL_ID:
+ case AAttributeEditPart.VISUAL_ID:
+ case AOperationEditPart.VISUAL_ID:
+ case AAttribute2EditPart.VISUAL_ID:
+ case AOperation2EditPart.VISUAL_ID:
+ if (domainElement == null
+ || visualID != AcoreVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement))
+ {
+ return false; // visual id in semantic hint should match visual id for domain element
+ }
+ break;
+ default:
+ return false;
+ }
+ }
+ }
+ return AInterfaceEditPart.VISUAL_ID == visualID || AClassEditPart.VISUAL_ID == visualID
+ || AAttributeEditPart.VISUAL_ID == visualID || AOperationEditPart.VISUAL_ID == visualID
+ || AAttribute2EditPart.VISUAL_ID == visualID || AOperation2EditPart.VISUAL_ID == visualID;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateEdgeViewOperation op)
+ {
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ if (!AcoreElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType)))
+ {
+ return false; // foreign element type
+ }
+ String elementTypeHint = ((IHintedType)elementType).getSemanticHint();
+ if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint())))
+ {
+ return false; // our hint is visual id and must be specified, and it should be the same as in element type
+ }
+ int visualID = AcoreVisualIDRegistry.getVisualID(elementTypeHint);
+ EObject domainElement = getSemanticElement(op.getSemanticAdapter());
+ if (domainElement != null && visualID != AcoreVisualIDRegistry.getLinkWithClassVisualID(domainElement))
+ {
+ return false; // visual id for link EClass should match visual id from element type
+ }
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint)
+ {
+ Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
+ diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
+ diagram.setType(ACoreRootEditPart.MODEL_ID);
+ diagram.setElement(getSemanticElement(semanticAdapter));
+ diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
+ return diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index,
+ boolean persisted, PreferencesHint preferencesHint)
+ {
+ final EObject domainElement = getSemanticElement(semanticAdapter);
+ final int visualID;
+ if (semanticHint == null)
+ {
+ visualID = AcoreVisualIDRegistry.getNodeVisualID(containerView, domainElement);
+ }
+ else
+ {
+ visualID = AcoreVisualIDRegistry.getVisualID(semanticHint);
+ }
+ switch (visualID)
+ {
+ case AInterfaceEditPart.VISUAL_ID:
+ return createAInterface_2001(domainElement, containerView, index, persisted, preferencesHint);
+ case AClassEditPart.VISUAL_ID:
+ return createAClass_2002(domainElement, containerView, index, persisted, preferencesHint);
+ case AAttributeEditPart.VISUAL_ID:
+ return createAAttribute_3001(domainElement, containerView, index, persisted, preferencesHint);
+ case AOperationEditPart.VISUAL_ID:
+ return createAOperation_3002(domainElement, containerView, index, persisted, preferencesHint);
+ case AAttribute2EditPart.VISUAL_ID:
+ return createAAttribute_3003(domainElement, containerView, index, persisted, preferencesHint);
+ case AOperation2EditPart.VISUAL_ID:
+ return createAOperation_3004(domainElement, containerView, index, persisted, preferencesHint);
+ }
+ // can't happen, provided #provides(CreateNodeViewOperation) is correct
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index,
+ boolean persisted, PreferencesHint preferencesHint)
+ {
+ IElementType elementType = getSemanticElementType(semanticAdapter);
+ String elementTypeHint = ((IHintedType)elementType).getSemanticHint();
+ switch (AcoreVisualIDRegistry.getVisualID(elementTypeHint))
+ {
+ case AClassSubClassesEditPart.VISUAL_ID:
+ return createAClassSubClasses_4001(containerView, index, persisted, preferencesHint);
+ case AClassImplementedInterfacesEditPart.VISUAL_ID:
+ return createAClassImplementedInterfaces_4002(containerView, index, persisted, preferencesHint);
+ case AClassAssociationsEditPart.VISUAL_ID:
+ return createAClassAssociations_4003(containerView, index, persisted, preferencesHint);
+ case AClassAggregationsEditPart.VISUAL_ID:
+ return createAClassAggregations_4004(containerView, index, persisted, preferencesHint);
+ case AClassCompositionsEditPart.VISUAL_ID:
+ return createAClassCompositions_4005(containerView, index, persisted, preferencesHint);
+ }
+ // can never happen, provided #provides(CreateEdgeViewOperation) is correct
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAInterface_2001(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Node node = NotationFactory.eINSTANCE.createNode();
+ node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
+ node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ node.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(AcoreVisualIDRegistry.getType(AInterfaceEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ stampShortcut(containerView, node);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter
+ .getColor(prefStore, IPreferenceConstants.PREF_LINE_COLOR);
+ ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities
+ .RGBToInteger(lineRGB));
+ FontStyle nodeFontStyle = (FontStyle)node.getStyle(NotationPackage.Literals.FONT_STYLE);
+ if (nodeFontStyle != null)
+ {
+ FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
+ nodeFontStyle.setFontName(fontData.getName());
+ nodeFontStyle.setFontHeight(fontData.getHeight());
+ nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
+ nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
+ org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
+ IPreferenceConstants.PREF_FONT_COLOR);
+ nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
+ }
+ Node label5001 = createLabel(node, AcoreVisualIDRegistry.getType(AInterfaceNameEditPart.VISUAL_ID));
+ createCompartment(node, AcoreVisualIDRegistry.getType(AInterfaceAAttributeInterfaceCompartmentEditPart.VISUAL_ID),
+ false, false, true, true);
+ createCompartment(node, AcoreVisualIDRegistry.getType(AInterfaceAOperationInterfaceCompartmentEditPart.VISUAL_ID),
+ false, false, true, true);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAClass_2002(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Node node = NotationFactory.eINSTANCE.createNode();
+ node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
+ node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ node.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(AcoreVisualIDRegistry.getType(AClassEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ stampShortcut(containerView, node);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter
+ .getColor(prefStore, IPreferenceConstants.PREF_LINE_COLOR);
+ ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities
+ .RGBToInteger(lineRGB));
+ FontStyle nodeFontStyle = (FontStyle)node.getStyle(NotationPackage.Literals.FONT_STYLE);
+ if (nodeFontStyle != null)
+ {
+ FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
+ nodeFontStyle.setFontName(fontData.getName());
+ nodeFontStyle.setFontHeight(fontData.getHeight());
+ nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
+ nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
+ org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
+ IPreferenceConstants.PREF_FONT_COLOR);
+ nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
+ }
+ Node label5002 = createLabel(node, AcoreVisualIDRegistry.getType(AClassNameEditPart.VISUAL_ID));
+ createCompartment(node, AcoreVisualIDRegistry.getType(AClassAAttributeCompartmentEditPart.VISUAL_ID), false, false,
+ true, true);
+ createCompartment(node, AcoreVisualIDRegistry.getType(AClassAOperationClassCompartmentEditPart.VISUAL_ID), false,
+ false, true, true);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAAttribute_3001(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Node node = NotationFactory.eINSTANCE.createNode();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ node.setType(AcoreVisualIDRegistry.getType(AAttributeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAOperation_3002(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Node node = NotationFactory.eINSTANCE.createNode();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ node.setType(AcoreVisualIDRegistry.getType(AOperationEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAAttribute_3003(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Node node = NotationFactory.eINSTANCE.createNode();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ node.setType(AcoreVisualIDRegistry.getType(AAttribute2EditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAOperation_3004(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Node node = NotationFactory.eINSTANCE.createNode();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ node.setType(AcoreVisualIDRegistry.getType(AOperation2EditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createAClassSubClasses_4001(View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList points = new ArrayList(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(AcoreVisualIDRegistry.getType(AClassSubClassesEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter
+ .getColor(prefStore, IPreferenceConstants.PREF_LINE_COLOR);
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities
+ .RGBToInteger(lineRGB));
+ FontStyle edgeFontStyle = (FontStyle)edge.getStyle(NotationPackage.Literals.FONT_STYLE);
+ if (edgeFontStyle != null)
+ {
+ FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
+ edgeFontStyle.setFontName(fontData.getName());
+ edgeFontStyle.setFontHeight(fontData.getHeight());
+ edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
+ edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
+ org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
+ IPreferenceConstants.PREF_FONT_COLOR);
+ edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
+ }
+ Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
+ if (routing != null)
+ {
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ }
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createAClassImplementedInterfaces_4002(View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList points = new ArrayList(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(AcoreVisualIDRegistry.getType(AClassImplementedInterfacesEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter
+ .getColor(prefStore, IPreferenceConstants.PREF_LINE_COLOR);
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities
+ .RGBToInteger(lineRGB));
+ FontStyle edgeFontStyle = (FontStyle)edge.getStyle(NotationPackage.Literals.FONT_STYLE);
+ if (edgeFontStyle != null)
+ {
+ FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
+ edgeFontStyle.setFontName(fontData.getName());
+ edgeFontStyle.setFontHeight(fontData.getHeight());
+ edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
+ edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
+ org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
+ IPreferenceConstants.PREF_FONT_COLOR);
+ edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
+ }
+ Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
+ if (routing != null)
+ {
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ }
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createAClassAssociations_4003(View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList points = new ArrayList(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(AcoreVisualIDRegistry.getType(AClassAssociationsEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter
+ .getColor(prefStore, IPreferenceConstants.PREF_LINE_COLOR);
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities
+ .RGBToInteger(lineRGB));
+ FontStyle edgeFontStyle = (FontStyle)edge.getStyle(NotationPackage.Literals.FONT_STYLE);
+ if (edgeFontStyle != null)
+ {
+ FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
+ edgeFontStyle.setFontName(fontData.getName());
+ edgeFontStyle.setFontHeight(fontData.getHeight());
+ edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
+ edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
+ org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
+ IPreferenceConstants.PREF_FONT_COLOR);
+ edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
+ }
+ Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
+ if (routing != null)
+ {
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ }
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createAClassAggregations_4004(View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList points = new ArrayList(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(AcoreVisualIDRegistry.getType(AClassAggregationsEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter
+ .getColor(prefStore, IPreferenceConstants.PREF_LINE_COLOR);
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities
+ .RGBToInteger(lineRGB));
+ FontStyle edgeFontStyle = (FontStyle)edge.getStyle(NotationPackage.Literals.FONT_STYLE);
+ if (edgeFontStyle != null)
+ {
+ FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
+ edgeFontStyle.setFontName(fontData.getName());
+ edgeFontStyle.setFontHeight(fontData.getHeight());
+ edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
+ edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
+ org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
+ IPreferenceConstants.PREF_FONT_COLOR);
+ edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
+ }
+ Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
+ if (routing != null)
+ {
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ }
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createAClassCompositions_4005(View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint)
+ {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList points = new ArrayList(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(AcoreVisualIDRegistry.getType(AClassCompositionsEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter
+ .getColor(prefStore, IPreferenceConstants.PREF_LINE_COLOR);
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities
+ .RGBToInteger(lineRGB));
+ FontStyle edgeFontStyle = (FontStyle)edge.getStyle(NotationPackage.Literals.FONT_STYLE);
+ if (edgeFontStyle != null)
+ {
+ FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
+ edgeFontStyle.setFontName(fontData.getName());
+ edgeFontStyle.setFontHeight(fontData.getHeight());
+ edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
+ edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
+ org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
+ IPreferenceConstants.PREF_FONT_COLOR);
+ edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
+ }
+ Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
+ if (routing != null)
+ {
+ ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ }
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ private void stampShortcut(View containerView, Node target)
+ {
+ if (!ACoreRootEditPart.MODEL_ID.equals(AcoreVisualIDRegistry.getModelID(containerView)))
+ {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", ACoreRootEditPart.MODEL_ID); //$NON-NLS-1$
+ target.getEAnnotations().add(shortcutAnnotation);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private Node createLabel(View owner, String hint)
+ {
+ DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+
+ /**
+ * @generated
+ */
+ private Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort,
+ boolean canFilter)
+ {
+ //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ //rv.setShowTitle(showTitle);
+ //rv.setCollapsed(isCollapsed);
+ Node rv;
+ if (canCollapse)
+ {
+ rv = NotationFactory.eINSTANCE.createBasicCompartment();
+ }
+ else
+ {
+ rv = NotationFactory.eINSTANCE.createDecorationNode();
+ }
+ if (hasTitle)
+ {
+ TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
+ ts.setShowTitle(true);
+ rv.getStyles().add(ts);
+ }
+ if (canSort)
+ {
+ rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
+ }
+ if (canFilter)
+ {
+ rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
+ }
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+
+ /**
+ * @generated
+ */
+ private EObject getSemanticElement(IAdaptable semanticAdapter)
+ {
+ if (semanticAdapter == null)
+ {
+ return null;
+ }
+ EObject eObject = (EObject)semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null)
+ {
+ return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private IElementType getSemanticElementType(IAdaptable semanticAdapter)
+ {
+ if (semanticAdapter == null)
+ {
+ return null;
+ }
+ return (IElementType)semanticAdapter.getAdapter(IElementType.class);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/ElementInitializers.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/ElementInitializers.java
new file mode 100644
index 0000000000..8da86ef63f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/providers/ElementInitializers.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers;
+
+/**
+ * @generated
+ */
+public class ElementInitializers
+{
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/sheet/AcorePropertySection.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/sheet/AcorePropertySection.java
new file mode 100644
index 0000000000..eb94a90fb0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/sheet/AcorePropertySection.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.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 AcorePropertySection 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/sheet/AcoreSheetLabelProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/sheet/AcoreSheetLabelProvider.java
new file mode 100644
index 0000000000..26fb67c577
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/sheet/AcoreSheetLabelProvider.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.diagram.sheet;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.navigator.AcoreNavigatorGroup;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.part.AcoreVisualIDRegistry;
+import org.eclipse.emf.cdo.dawn.examples.acore.diagram.providers.AcoreElementTypes;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.BaseLabelProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @generated
+ */
+public class AcoreSheetLabelProvider extends BaseLabelProvider implements ILabelProvider
+{
+
+ /**
+ * @generated
+ */
+ public String getText(Object element)
+ {
+ element = unwrap(element);
+ if (element instanceof AcoreNavigatorGroup)
+ {
+ return ((AcoreNavigatorGroup)element).getGroupName();
+ }
+ IElementType etype = getElementType(getView(element));
+ return etype == null ? "" : etype.getDisplayName();
+ }
+
+ /**
+ * @generated
+ */
+ public Image getImage(Object element)
+ {
+ IElementType etype = getElementType(getView(unwrap(element)));
+ return etype == null ? null : AcoreElementTypes.getImage(etype);
+ }
+
+ /**
+ * @generated
+ */
+ private Object unwrap(Object element)
+ {
+ if (element instanceof IStructuredSelection)
+ {
+ return ((IStructuredSelection)element).getFirstElement();
+ }
+ return element;
+ }
+
+ /**
+ * @generated
+ */
+ private View getView(Object element)
+ {
+ if (element instanceof View)
+ {
+ return (View)element;
+ }
+ if (element instanceof IAdaptable)
+ {
+ return (View)((IAdaptable)element).getAdapter(View.class);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private IElementType getElementType(View view)
+ {
+ // For intermediate views climb up the containment hierarchy to find the one associated with an element type.
+ while (view != null)
+ {
+ int vid = AcoreVisualIDRegistry.getVisualID(view);
+ IElementType etype = AcoreElementTypes.getElementType(vid);
+ if (etype != null)
+ {
+ return etype;
+ }
+ view = view.eContainer() instanceof View ? (View)view.eContainer() : null;
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.classpath b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.classpath
@@ -0,0 +1,7 @@
+<?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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.project b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.project
new file mode 100644
index 0000000000..3536e9420f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.dawn.examples.acore.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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..eacd55b267
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Sat Jun 05 21:14:03 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..6be7fd44bd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.cdo.dawn.examples.acore.edit;singleton:=true
+Bundle-Version: 0.2.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.emf.cdo.dawn.examples.acore.provider.AcoreEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.emf.cdo.dawn.examples.acore.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.cdo.dawn.examples.acore;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/build.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/build.properties
new file mode 100644
index 0000000000..47686ea406
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/build.properties
@@ -0,0 +1,18 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+# 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 Fluegge - initial API and implementation
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateABasicClass_attributes_AAttribute.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateABasicClass_attributes_AAttribute.gif
new file mode 100644
index 0000000000..ea090fc159
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateABasicClass_attributes_AAttribute.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateABasicClass_operations_AOperation.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateABasicClass_operations_AOperation.gif
new file mode 100644
index 0000000000..85753e9f70
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateABasicClass_operations_AOperation.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateACoreRoot_classes_AClass.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateACoreRoot_classes_AClass.gif
new file mode 100644
index 0000000000..dbffe982c1
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateACoreRoot_classes_AClass.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateACoreRoot_interfaces_AInterface.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateACoreRoot_interfaces_AInterface.gif
new file mode 100644
index 0000000000..ee92050288
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateACoreRoot_interfaces_AInterface.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateAOperation_parameters_AParameter.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateAOperation_parameters_AParameter.gif
new file mode 100644
index 0000000000..9dc793f568
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/ctool16/CreateAOperation_parameters_AParameter.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AAttribute.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AAttribute.gif
new file mode 100644
index 0000000000..14af8aaee9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AAttribute.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/ABasicClass.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/ABasicClass.gif
new file mode 100644
index 0000000000..89ad5da38a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/ABasicClass.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AClass.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AClass.gif
new file mode 100644
index 0000000000..db7414e937
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AClass.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AClassChild.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AClassChild.gif
new file mode 100644
index 0000000000..2124f3e3ab
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AClassChild.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/ACoreRoot.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/ACoreRoot.gif
new file mode 100644
index 0000000000..ed87474740
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/ACoreRoot.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AInterface.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AInterface.gif
new file mode 100644
index 0000000000..cb1755a712
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AInterface.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AOperation.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AOperation.gif
new file mode 100644
index 0000000000..8a5c70cbd7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AOperation.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AParameter.gif b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AParameter.gif
new file mode 100644
index 0000000000..136e3b2726
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/AParameter.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/plugin.properties
new file mode 100644
index 0000000000..762733bf50
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/plugin.properties
@@ -0,0 +1,57 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+# 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 Fluegge - initial API and implementation
+#
+
+pluginName = Acore 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_AClass_type = AClass
+_UI_AInterface_type = AInterface
+_UI_ACoreRoot_type = ACore Root
+_UI_AAttribute_type = AAttribute
+_UI_AOperation_type = AOperation
+_UI_ABasicClass_type = ABasic Class
+_UI_AParameter_type = AParameter
+_UI_AClassChild_type = AClass Child
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_AClass_subClasses_feature = Sub Classes
+_UI_AClass_implementedInterfaces_feature = Implemented Interfaces
+_UI_AClass_associations_feature = Associations
+_UI_AClass_compositions_feature = Compositions
+_UI_AClass_aggregations_feature = Aggregations
+_UI_ACoreRoot_title_feature = Title
+_UI_ACoreRoot_classes_feature = Classes
+_UI_ACoreRoot_interfaces_feature = Interfaces
+_UI_AOperation_parameters_feature = Parameters
+_UI_ABasicClass_operations_feature = Operations
+_UI_ABasicClass_attributes_feature = Attributes
+_UI_ABasicClass_name_feature = Name
+_UI_AParameter_name_feature = Name
+_UI_AParameter_type_feature = Type
+_UI_AClassChild_name_feature = Name
+_UI_AClassChild_accessright_feature = Accessright
+_UI_AClassChild_dataType_feature = Data Type
+_UI_Unknown_feature = Unspecified
+
+_UI_AccessType_PUBLIC_literal = public
+_UI_AccessType_PRIVATE_literal = private
+_UI_AccessType_PROECTED_literal = protected
+_UI_AccessType_PACKAGE_literal = package
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/plugin.xml b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/plugin.xml
new file mode 100644
index 0000000000..0d2db45b67
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/plugin.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ 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 Fluegge - initial API and implementation
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.provider.AcoreItemProviderAdapterFactory"
+ 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AAttributeItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AAttributeItemProvider.java
new file mode 100644
index 0000000000..fe1132f062
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AAttributeItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AAttribute;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+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;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AAttribute} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AAttributeItemProvider
+ extends AClassChildItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AAttributeItemProvider(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 returns AAttribute.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AAttribute"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((AAttribute)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_AAttribute_type") :
+ getString("_UI_AAttribute_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);
+ 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);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/ABasicClassItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/ABasicClassItemProvider.java
new file mode 100644
index 0000000000..b0c316d67d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/ABasicClassItemProvider.java
@@ -0,0 +1,235 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+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;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ABasicClassItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ABasicClassItemProvider(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);
+
+ addNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * 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_ABasicClass_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ABasicClass_name_feature", "_UI_ABasicClass_type"),
+ AcorePackage.Literals.ABASIC_CLASS__NAME,
+ 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(AcorePackage.Literals.ABASIC_CLASS__OPERATIONS);
+ childrenFeatures.add(AcorePackage.Literals.ABASIC_CLASS__ATTRIBUTES);
+ }
+ 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 ABasicClass.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ABasicClass"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((ABasicClass)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ABasicClass_type") :
+ getString("_UI_ABasicClass_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(ABasicClass.class))
+ {
+ case AcorePackage.ABASIC_CLASS__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case AcorePackage.ABASIC_CLASS__OPERATIONS:
+ case AcorePackage.ABASIC_CLASS__ATTRIBUTES:
+ 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
+ (AcorePackage.Literals.ABASIC_CLASS__OPERATIONS,
+ AcoreFactory.eINSTANCE.createAOperation()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (AcorePackage.Literals.ABASIC_CLASS__ATTRIBUTES,
+ AcoreFactory.eINSTANCE.createAAttribute()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return AcoreEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AClassChildItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AClassChildItemProvider.java
new file mode 100644
index 0000000000..e04044072e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AClassChildItemProvider.java
@@ -0,0 +1,234 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClassChild;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+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;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AClassChildItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AClassChildItemProvider(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);
+
+ addNamePropertyDescriptor(object);
+ addAccessrightPropertyDescriptor(object);
+ addDataTypePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * 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_AClassChild_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AClassChild_name_feature", "_UI_AClassChild_type"),
+ AcorePackage.Literals.ACLASS_CHILD__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Accessright feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAccessrightPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AClassChild_accessright_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AClassChild_accessright_feature", "_UI_AClassChild_type"),
+ AcorePackage.Literals.ACLASS_CHILD__ACCESSRIGHT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Data Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDataTypePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AClassChild_dataType_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AClassChild_dataType_feature", "_UI_AClassChild_type"),
+ AcorePackage.Literals.ACLASS_CHILD__DATA_TYPE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns AClassChild.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AClassChild"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((AClassChild)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_AClassChild_type") :
+ getString("_UI_AClassChild_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(AClassChild.class))
+ {
+ case AcorePackage.ACLASS_CHILD__NAME:
+ case AcorePackage.ACLASS_CHILD__ACCESSRIGHT:
+ case AcorePackage.ACLASS_CHILD__DATA_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 AcoreEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AClassItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AClassItemProvider.java
new file mode 100644
index 0000000000..2c6386c8c4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AClassItemProvider.java
@@ -0,0 +1,256 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+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;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AClass} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AClassItemProvider
+ extends ABasicClassItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AClassItemProvider(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);
+
+ addSubClassesPropertyDescriptor(object);
+ addImplementedInterfacesPropertyDescriptor(object);
+ addAssociationsPropertyDescriptor(object);
+ addCompositionsPropertyDescriptor(object);
+ addAggregationsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Sub Classes feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSubClassesPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AClass_subClasses_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AClass_subClasses_feature", "_UI_AClass_type"),
+ AcorePackage.Literals.ACLASS__SUB_CLASSES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Implemented Interfaces feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addImplementedInterfacesPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AClass_implementedInterfaces_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AClass_implementedInterfaces_feature", "_UI_AClass_type"),
+ AcorePackage.Literals.ACLASS__IMPLEMENTED_INTERFACES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Associations feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAssociationsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AClass_associations_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AClass_associations_feature", "_UI_AClass_type"),
+ AcorePackage.Literals.ACLASS__ASSOCIATIONS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Compositions feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCompositionsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AClass_compositions_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AClass_compositions_feature", "_UI_AClass_type"),
+ AcorePackage.Literals.ACLASS__COMPOSITIONS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Aggregations feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAggregationsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AClass_aggregations_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AClass_aggregations_feature", "_UI_AClass_type"),
+ AcorePackage.Literals.ACLASS__AGGREGATIONS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns AClass.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AClass"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((AClass)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_AClass_type") :
+ getString("_UI_AClass_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);
+ 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);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/ACoreRootItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/ACoreRootItemProvider.java
new file mode 100644
index 0000000000..316d9580c3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/ACoreRootItemProvider.java
@@ -0,0 +1,235 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+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;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ACoreRootItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ACoreRootItemProvider(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_ACoreRoot_title_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ACoreRoot_title_feature", "_UI_ACoreRoot_type"),
+ AcorePackage.Literals.ACORE_ROOT__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(AcorePackage.Literals.ACORE_ROOT__CLASSES);
+ childrenFeatures.add(AcorePackage.Literals.ACORE_ROOT__INTERFACES);
+ }
+ 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 ACoreRoot.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ACoreRoot"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((ACoreRoot)object).getTitle();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ACoreRoot_type") :
+ getString("_UI_ACoreRoot_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(ACoreRoot.class))
+ {
+ case AcorePackage.ACORE_ROOT__TITLE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case AcorePackage.ACORE_ROOT__CLASSES:
+ case AcorePackage.ACORE_ROOT__INTERFACES:
+ 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
+ (AcorePackage.Literals.ACORE_ROOT__CLASSES,
+ AcoreFactory.eINSTANCE.createAClass()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (AcorePackage.Literals.ACORE_ROOT__INTERFACES,
+ AcoreFactory.eINSTANCE.createAInterface()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return AcoreEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AInterfaceItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AInterfaceItemProvider.java
new file mode 100644
index 0000000000..fa56382974
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AInterfaceItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+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;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AInterface} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AInterfaceItemProvider
+ extends ABasicClassItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AInterfaceItemProvider(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 returns AInterface.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AInterface"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((AInterface)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_AInterface_type") :
+ getString("_UI_AInterface_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);
+ 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);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AOperationItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AOperationItemProvider.java
new file mode 100644
index 0000000000..18eefdd58c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AOperationItemProvider.java
@@ -0,0 +1,184 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AOperation;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+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.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AOperationItemProvider
+ extends AClassChildItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AOperationItemProvider(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(AcorePackage.Literals.AOPERATION__PARAMETERS);
+ }
+ 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 AOperation.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AOperation"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((AOperation)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_AOperation_type") :
+ getString("_UI_AOperation_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(AOperation.class))
+ {
+ case AcorePackage.AOPERATION__PARAMETERS:
+ 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
+ (AcorePackage.Literals.AOPERATION__PARAMETERS,
+ AcoreFactory.eINSTANCE.createAParameter()));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AParameterItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AParameterItemProvider.java
new file mode 100644
index 0000000000..07b21f7e43
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AParameterItemProvider.java
@@ -0,0 +1,209 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AParameter;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+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;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AParameterItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AParameterItemProvider(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);
+
+ addNamePropertyDescriptor(object);
+ addTypePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * 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_AParameter_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AParameter_name_feature", "_UI_AParameter_type"),
+ AcorePackage.Literals.APARAMETER__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ 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_AParameter_type_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AParameter_type_feature", "_UI_AParameter_type"),
+ AcorePackage.Literals.APARAMETER__TYPE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns AParameter.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AParameter"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((AParameter)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_AParameter_type") :
+ getString("_UI_AParameter_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(AParameter.class))
+ {
+ case AcorePackage.APARAMETER__NAME:
+ case AcorePackage.APARAMETER__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 AcoreEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AcoreEditPlugin.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AcoreEditPlugin.java
new file mode 100644
index 0000000000..21fab666cc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AcoreEditPlugin.java
@@ -0,0 +1,112 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Acore edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class AcoreEditPlugin extends EMFPlugin
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final AcoreEditPlugin INSTANCE = new AcoreEditPlugin();
+
+ /**
+ * 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 AcoreEditPlugin()
+ {
+ 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/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AcoreItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AcoreItemProviderAdapterFactory.java
new file mode 100644
index 0000000000..1ca1a9ebfb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.edit/src/org/eclipse/emf/cdo/dawn/examples/acore/provider/AcoreItemProviderAdapterFactory.java
@@ -0,0 +1,413 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.util.AcoreAdapterFactory;
+
+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;
+
+/**
+ * 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 AcoreItemProviderAdapterFactory extends AcoreAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * 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 AcoreItemProviderAdapterFactory()
+ {
+ 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.emf.cdo.dawn.examples.acore.AClass} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AClassItemProvider aClassItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AClass}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createAClassAdapter()
+ {
+ if (aClassItemProvider == null)
+ {
+ aClassItemProvider = new AClassItemProvider(this);
+ }
+
+ return aClassItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.dawn.examples.acore.AInterface} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AInterfaceItemProvider aInterfaceItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AInterface}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createAInterfaceAdapter()
+ {
+ if (aInterfaceItemProvider == null)
+ {
+ aInterfaceItemProvider = new AInterfaceItemProvider(this);
+ }
+
+ return aInterfaceItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ACoreRootItemProvider aCoreRootItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createACoreRootAdapter()
+ {
+ if (aCoreRootItemProvider == null)
+ {
+ aCoreRootItemProvider = new ACoreRootItemProvider(this);
+ }
+
+ return aCoreRootItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.dawn.examples.acore.AAttribute} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AAttributeItemProvider aAttributeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AAttribute}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createAAttributeAdapter()
+ {
+ if (aAttributeItemProvider == null)
+ {
+ aAttributeItemProvider = new AAttributeItemProvider(this);
+ }
+
+ return aAttributeItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AOperationItemProvider aOperationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createAOperationAdapter()
+ {
+ if (aOperationItemProvider == null)
+ {
+ aOperationItemProvider = new AOperationItemProvider(this);
+ }
+
+ return aOperationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ABasicClassItemProvider aBasicClassItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createABasicClassAdapter()
+ {
+ if (aBasicClassItemProvider == null)
+ {
+ aBasicClassItemProvider = new ABasicClassItemProvider(this);
+ }
+
+ return aBasicClassItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AParameterItemProvider aParameterItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createAParameterAdapter()
+ {
+ if (aParameterItemProvider == null)
+ {
+ aParameterItemProvider = new AParameterItemProvider(this);
+ }
+
+ return aParameterItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AClassChildItemProvider aClassChildItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createAClassChildAdapter()
+ {
+ if (aClassChildItemProvider == null)
+ {
+ aClassChildItemProvider = new AClassChildItemProvider(this);
+ }
+
+ return aClassChildItemProvider;
+ }
+
+ /**
+ * 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 (aClassItemProvider != null) aClassItemProvider.dispose();
+ if (aInterfaceItemProvider != null) aInterfaceItemProvider.dispose();
+ if (aCoreRootItemProvider != null) aCoreRootItemProvider.dispose();
+ if (aAttributeItemProvider != null) aAttributeItemProvider.dispose();
+ if (aOperationItemProvider != null) aOperationItemProvider.dispose();
+ if (aBasicClassItemProvider != null) aBasicClassItemProvider.dispose();
+ if (aParameterItemProvider != null) aParameterItemProvider.dispose();
+ if (aClassChildItemProvider != null) aClassChildItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.classpath b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.classpath
@@ -0,0 +1,7 @@
+<?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/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.cvsignore b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.cvsignore
new file mode 100644
index 0000000000..6ffb221cca
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.cvsignore
@@ -0,0 +1,3 @@
+bin
+doc
+text
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.project b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.project
new file mode 100644
index 0000000000..ad86366708
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.dawn.examples.acore</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/acore.gmfgen.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/acore.gmfgen.prefs
new file mode 100644
index 0000000000..36caece86e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/acore.gmfgen.prefs
@@ -0,0 +1,7 @@
+#Sat Jun 05 19:31:43 CEST 2010
+eclipse.preferences.version=1
+generate_rcp=false
+ignore_gmfgen_validation=false
+ignore_mapmodel_validation=false
+use_map_mode=true
+use_runtime_figures=true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/classdiagram.gmfgen.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/classdiagram.gmfgen.prefs
new file mode 100644
index 0000000000..b3e0e17bbf
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/classdiagram.gmfgen.prefs
@@ -0,0 +1,7 @@
+#Fri Mar 19 16:14:10 CET 2010
+eclipse.preferences.version=1
+generate_rcp=false
+ignore_gmfgen_validation=false
+ignore_mapmodel_validation=false
+use_map_mode=true
+use_runtime_figures=true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..a1cef9a448
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Dec 18 13:30:26 CET 2008
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..8cdb535839
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,361 @@
+#Fri May 14 20:04:16 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=ignore
+org.eclipse.jdt.core.compiler.problem.deadCode=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=ignore
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=ignore
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=ignore
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=ignore
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=ignore
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=ignore
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
+org.eclipse.jdt.core.compiler.problem.unusedLabel=ignore
+org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=ignore
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..5b95c33f76
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,120 @@
+#Thu Feb 04 09:44:24 CET 2010
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Martin Fluegge - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Martin Fluegge\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..864e30fe5d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.tasks.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..b050639a54
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.team.ui.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..2f50f36c0c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..bf3053a36e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Thu Feb 04 09:44:24 CET 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..01a394f43f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Fri May 14 20:09:27 CEST 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/CDO.MF b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/CDO.MF
new file mode 100644
index 0000000000..bbfa1b0550
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/CDO.MF
@@ -0,0 +1 @@
+This is a marker file for bundles with CDO native models.
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..4be9a926b3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.emf.cdo.dawn.examples.acore;singleton:=true
+Bundle-Version: 0.2.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.emf.cdo.dawn.examples.acore,
+ org.eclipse.emf.cdo.dawn.examples.acore.impl,
+ org.eclipse.emf.cdo.dawn.examples.acore.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.cdo;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/about.html b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/about.html
new file mode 100644
index 0000000000..d35d5aed64
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/build.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/build.properties
new file mode 100644
index 0000000000..cfbefc8de8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/build.properties
@@ -0,0 +1,14 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id: build.properties,v 1.1 2010-06-05 19:27:58 mfluegge Exp $
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/copyright.txt b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/copyright.txt
new file mode 100644
index 0000000000..9134dfaf00
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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 Fluegge - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.ecore b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.ecore
new file mode 100644
index 0000000000..83ba795d55
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.ecore
@@ -0,0 +1,64 @@
+<?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="acore"
+ nsURI="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore" nsPrefix="acore">
+ <eClassifiers xsi:type="ecore:EClass" name="AClass" eSuperTypes="#//ABasicClass">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="subClasses" upperBound="-1"
+ eType="#//AClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="implementedInterfaces"
+ upperBound="-1" eType="#//AInterface"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="associations" upperBound="-1"
+ eType="#//AClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="compositions" upperBound="-1"
+ eType="#//AClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="aggregations" upperBound="-1"
+ eType="#//AClass"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AInterface" eSuperTypes="#//ABasicClass"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ACoreRoot">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="classes" upperBound="-1"
+ eType="#//AClass" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="interfaces" upperBound="-1"
+ eType="#//AInterface" containment="true" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AAttribute" eSuperTypes="#//AClassChild"/>
+ <eClassifiers xsi:type="ecore:EClass" name="AOperation" eSuperTypes="#//AClassChild">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1"
+ eType="#//AParameter" containment="true" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ABasicClass">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="operations" upperBound="-1"
+ eType="#//AOperation" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="attributes" upperBound="-1"
+ eType="#//AAttribute" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AParameter">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AClassChild">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral=""/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="accessright" unique="false"
+ eType="#//AccessType" defaultValueLiteral="public" unsettable="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="dataType" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="AccessType">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="AccessType"/>
+ </eAnnotations>
+ <eLiterals name="PUBLIC" literal="public"/>
+ <eLiterals name="PRIVATE" value="1" literal="private"/>
+ <eLiterals name="PROECTED" value="2" literal="protected"/>
+ <eLiterals name="PACKAGE" value="3" literal="package"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="AccessTypeObject" instanceClassName="org.eclipse.emf.common.util.Enumerator">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="AccessType:Object"/>
+ <details key="baseType" value="AccessType"/>
+ </eAnnotations>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.genmodel b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.genmodel
new file mode 100644
index 0000000000..d9c3369e34
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.genmodel
@@ -0,0 +1,52 @@
+<?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" copyrightText="Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA;Contributors:&#xD;&#xA; Martin Fluegge - initial API and implementation&#xD;&#xA;"
+ modelDirectory="/org.eclipse.emf.cdo.dawn.examples.acore/src" modelPluginID="org.eclipse.emf.cdo.dawn.examples.acore"
+ modelName="Acore" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject" rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl"
+ reflectiveDelegation="true" importerID="org.eclipse.emf.importer.cdo" featureDelegation="Reflective"
+ complianceLevel="5.0">
+ <foreignModel>acore.ecore</foreignModel>
+ <modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables>
+ <genPackages prefix="Acore" basePackage="org.eclipse.emf.cdo.dawn.examples" disposableProviderFactory="true"
+ ecorePackage="acore.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="acore.ecore#//AccessType">
+ <genEnumLiterals ecoreEnumLiteral="acore.ecore#//AccessType/PUBLIC"/>
+ <genEnumLiterals ecoreEnumLiteral="acore.ecore#//AccessType/PRIVATE"/>
+ <genEnumLiterals ecoreEnumLiteral="acore.ecore#//AccessType/PROECTED"/>
+ <genEnumLiterals ecoreEnumLiteral="acore.ecore#//AccessType/PACKAGE"/>
+ </genEnums>
+ <genDataTypes ecoreDataType="acore.ecore#//AccessTypeObject"/>
+ <genClasses ecoreClass="acore.ecore#//AClass">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference acore.ecore#//AClass/subClasses"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference acore.ecore#//AClass/implementedInterfaces"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference acore.ecore#//AClass/associations"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference acore.ecore#//AClass/compositions"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference acore.ecore#//AClass/aggregations"/>
+ </genClasses>
+ <genClasses ecoreClass="acore.ecore#//AInterface"/>
+ <genClasses ecoreClass="acore.ecore#//ACoreRoot">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute acore.ecore#//ACoreRoot/title"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference acore.ecore#//ACoreRoot/classes"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference acore.ecore#//ACoreRoot/interfaces"/>
+ </genClasses>
+ <genClasses ecoreClass="acore.ecore#//AAttribute"/>
+ <genClasses ecoreClass="acore.ecore#//AOperation">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference acore.ecore#//AOperation/parameters"/>
+ </genClasses>
+ <genClasses ecoreClass="acore.ecore#//ABasicClass">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference acore.ecore#//ABasicClass/operations"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference acore.ecore#//ABasicClass/attributes"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute acore.ecore#//ABasicClass/name"/>
+ </genClasses>
+ <genClasses ecoreClass="acore.ecore#//AParameter">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute acore.ecore#//AParameter/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute acore.ecore#//AParameter/type"/>
+ </genClasses>
+ <genClasses ecoreClass="acore.ecore#//AClassChild">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute acore.ecore#//AClassChild/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute acore.ecore#//AClassChild/accessright"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute acore.ecore#//AClassChild/dataType"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen
new file mode 100644
index 0000000000..a871250aa5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgen
@@ -0,0 +1,740 @@
+<?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/2009/GenModel" copyrightText="Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA;Contributors:&#xD;&#xA; Martin Fluegge - initial API and implementation&#xD;&#xA;">
+ <diagram
+ visualID="1000"
+ editPartClassName="ACoreRootEditPart"
+ itemSemanticEditPolicyClassName="ACoreRootItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ACoreRootCanonicalEditPolicy"
+ iconProviderPriority="Low"
+ validationProviderPriority="Low">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ACoreRootEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
+ <domainDiagramElement
+ href="acore.genmodel#//acore/ACoreRoot"/>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3001"
+ editPartClassName="AAttributeEditPart"
+ itemSemanticEditPolicyClassName="AAttributeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AAttributeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="AAttributeGraphicalNodeEditPolicy"
+ createCommandClassName="AAttributeCreateCommand"
+ containers="//@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="AAttributeEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet>
+ <metaClass
+ href="acore.genmodel#//acore/AAttribute"/>
+ <containmentMetaFeature
+ href="acore.genmodel#//acore/ABasicClass/attributes"/>
+ <childMetaFeature
+ href="acore.genmodel#//acore/ABasicClass/attributes"/>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="//@labelParsers/@implementations.0"
+ viewPattern="{0} {2}:{1}"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/accessright"/>
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/dataType"/>
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3002"
+ editPartClassName="AOperationEditPart"
+ itemSemanticEditPolicyClassName="AOperationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AOperationCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="AOperationGraphicalNodeEditPolicy"
+ createCommandClassName="AOperationCreateCommand"
+ containers="//@diagram/@compartments.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="AOperationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet>
+ <metaClass
+ href="acore.genmodel#//acore/AOperation"/>
+ <containmentMetaFeature
+ href="acore.genmodel#//acore/ABasicClass/operations"/>
+ <childMetaFeature
+ href="acore.genmodel#//acore/ABasicClass/operations"/>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="//@labelParsers/@implementations.0"
+ viewPattern="{0} {2}():{1}"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/accessright"/>
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/dataType"/>
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3003"
+ editPartClassName="AAttribute2EditPart"
+ itemSemanticEditPolicyClassName="AAttribute2ItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AAttribute2CanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="AAttribute2GraphicalNodeEditPolicy"
+ createCommandClassName="AAttribute2CreateCommand"
+ containers="//@diagram/@compartments.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="//@diagram/@childNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet>
+ <metaClass
+ href="acore.genmodel#//acore/AAttribute"/>
+ <containmentMetaFeature
+ href="acore.genmodel#//acore/ABasicClass/attributes"/>
+ <childMetaFeature
+ href="acore.genmodel#//acore/ABasicClass/attributes"/>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="//@labelParsers/@implementations.0"
+ viewPattern="{0} {2}:{1}"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/accessright"/>
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/dataType"/>
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3004"
+ editPartClassName="AOperation2EditPart"
+ itemSemanticEditPolicyClassName="AOperation2ItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AOperation2CanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="AOperation2GraphicalNodeEditPolicy"
+ createCommandClassName="AOperation2CreateCommand"
+ containers="//@diagram/@compartments.3">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="//@diagram/@childNodes.1/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet>
+ <metaClass
+ href="acore.genmodel#//acore/AOperation"/>
+ <containmentMetaFeature
+ href="acore.genmodel#//acore/ABasicClass/operations"/>
+ <childMetaFeature
+ href="acore.genmodel#//acore/ABasicClass/operations"/>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="//@labelParsers/@implementations.0"
+ viewPattern="{0} {2}():{1}"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/accessright"/>
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/dataType"/>
+ <metaFeatures
+ href="acore.genmodel#//acore/AClassChild/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <topLevelNodes
+ visualID="2001"
+ editPartClassName="AInterfaceEditPart"
+ itemSemanticEditPolicyClassName="AInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AInterfaceCanonicalEditPolicy"
+ compartments="//@diagram/@compartments.0 //@diagram/@compartments.1"
+ graphicalNodeEditPolicyClassName="AInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="AInterfaceCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="AInterfaceEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ layoutType="TOOLBAR_LAYOUT"
+ className="AInterfaceFigure"
+ classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class AInterfaceFigure extends org.eclipse.draw2d.RoundedRectangle {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAInterfaceNameFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RectangleFigure fFigureInterfaceAttributes; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RectangleFigure fFigureInterfaceOperations; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public AInterfaceFigure() {&#xA;&#x9;&#x9;&#xA;&#x9;org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();&#xA;&#x9;layoutThis.setStretchMinorAxis(true);&#xA;&#x9;layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER&#xA;);&#xA;&#xA;&#x9;layoutThis.setSpacing(0);&#xA;&#x9;layoutThis.setVertical(true);&#xA;&#xA;&#x9;this.setLayoutManager(layoutThis);&#xA;&#xA;&#x9;&#x9;this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(12)&#xA;, getMapMode().DPtoLP(12)&#xA;));&#xA;this.setLineWidth(1);&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xA;);&#xA;&#x9;&#x9;createContents();&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel aInterfaceTypeLabelFigure0 = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;aInterfaceTypeLabelFigure0.setText(&quot;«Interface»&quot;);&#xA;&#xA;this.add(aInterfaceTypeLabelFigure0);&#xA;&#xA;&#xA;&#xA;fFigureAInterfaceNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureAInterfaceNameFigure.setText(&quot;&lt;...>&quot;);&#xA;&#xA;this.add(fFigureAInterfaceNameFigure);&#xA;&#xA;&#xA;&#xA;fFigureInterfaceAttributes = new org.eclipse.draw2d.RectangleFigure();&#xA;fFigureInterfaceAttributes.setLineWidth(1);&#xA;&#xA;this.add(fFigureInterfaceAttributes);&#xA;fFigureInterfaceAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#xA;&#xA;&#xA;&#xA;fFigureInterfaceOperations = new org.eclipse.draw2d.RectangleFigure();&#xA;fFigureInterfaceOperations.setLineWidth(1);&#xA;&#xA;this.add(fFigureInterfaceOperations);&#xA;fFigureInterfaceOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#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 getFigureAInterfaceNameFigure() {&#xA;&#x9;&#x9;return fFigureAInterfaceNameFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.draw2d.RectangleFigure getFigureInterfaceAttributes() {&#xA;&#x9;&#x9;return fFigureInterfaceAttributes;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.draw2d.RectangleFigure getFigureInterfaceOperations() {&#xA;&#x9;&#x9;return fFigureInterfaceOperations;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 250, 250, 190);&#xA;&#xA;">
+ <attributes
+ xsi:type="gmfgen:StyleAttributes"
+ fixedBackground="true"/>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="acore.genmodel#//acore/AInterface"/>
+ <containmentMetaFeature
+ href="acore.genmodel#//acore/ACoreRoot/interfaces"/>
+ <childMetaFeature
+ href="acore.genmodel#//acore/ACoreRoot/interfaces"/>
+ </modelFacet>
+ <labels
+ visualID="5001"
+ editPartClassName="AInterfaceNameEditPart"
+ itemSemanticEditPolicyClassName="AInterfaceNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureAInterfaceNameFigure"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="//@labelParsers/@implementations.0">
+ <metaFeatures
+ href="acore.genmodel#//acore/ABasicClass/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2002"
+ editPartClassName="AClassEditPart"
+ itemSemanticEditPolicyClassName="AClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AClassCanonicalEditPolicy"
+ compartments="//@diagram/@compartments.2 //@diagram/@compartments.3"
+ graphicalNodeEditPolicyClassName="AClassGraphicalNodeEditPolicy"
+ createCommandClassName="AClassCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="AClassEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ layoutType="TOOLBAR_LAYOUT"
+ className="AClassFigure"
+ classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class AClassFigure extends org.eclipse.draw2d.RectangleFigure {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RectangleFigure fFigureClassAttributes; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureAClassNameFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RectangleFigure fFigureClassOperations; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public AClassFigure() {&#xA;&#x9;&#x9;&#xA;&#x9;org.eclipse.draw2d.ToolbarLayout layoutThis = new org.eclipse.draw2d.ToolbarLayout();&#xA;&#x9;layoutThis.setStretchMinorAxis(true);&#xA;&#x9;layoutThis.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER&#xA;);&#xA;&#xA;&#x9;layoutThis.setSpacing(0);&#xA;&#x9;layoutThis.setVertical(true);&#xA;&#xA;&#x9;this.setLayoutManager(layoutThis);&#xA;&#xA;&#x9;&#x9;this.setLineWidth(1);&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xA;);&#xA;&#x9;&#x9;createContents();&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureAClassNameFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureAClassNameFigure.setText(&quot;&lt;...>&quot;);&#xA;&#xA;this.add(fFigureAClassNameFigure);&#xA;&#xA;&#xA;&#xA;fFigureClassAttributes = new org.eclipse.draw2d.RectangleFigure();&#xA;fFigureClassAttributes.setLineWidth(1);&#xA;&#xA;this.add(fFigureClassAttributes);&#xA;fFigureClassAttributes.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#xA;&#xA;&#xA;&#xA;fFigureClassOperations = new org.eclipse.draw2d.RectangleFigure();&#xA;fFigureClassOperations.setLineWidth(1);&#xA;&#xA;this.add(fFigureClassOperations);&#xA;fFigureClassOperations.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#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.draw2d.RectangleFigure getFigureClassAttributes() {&#xA;&#x9;&#x9;return fFigureClassAttributes;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureAClassNameFigure() {&#xA;&#x9;&#x9;return fFigureAClassNameFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.draw2d.RectangleFigure getFigureClassOperations() {&#xA;&#x9;&#x9;return fFigureClassOperations;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 230, 230, 255);&#xA;&#xA;">
+ <attributes
+ xsi:type="gmfgen:StyleAttributes"
+ fixedBackground="true"/>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="acore.genmodel#//acore/AClass"/>
+ <containmentMetaFeature
+ href="acore.genmodel#//acore/ACoreRoot/classes"/>
+ <childMetaFeature
+ href="acore.genmodel#//acore/ACoreRoot/classes"/>
+ </modelFacet>
+ <labels
+ visualID="5002"
+ editPartClassName="AClassNameEditPart"
+ itemSemanticEditPolicyClassName="AClassNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureAClassNameFigure"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="//@labelParsers/@implementations.0">
+ <metaFeatures
+ href="acore.genmodel#//acore/ABasicClass/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <links
+ visualID="4001"
+ editPartClassName="AClassSubClassesEditPart"
+ itemSemanticEditPolicyClassName="AClassSubClassesItemSemanticEditPolicy"
+ createCommandClassName="AClassSubClassesCreateCommand"
+ reorientCommandClassName="AClassSubClassesReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="AClassSubClassesFigure"
+ classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class AClassSubClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public AClassSubClassesFigure() {&#xA;&#x9;&#x9;this.setLineWidth(1);&#xA;&#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.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();&#xA;df.setFill(true);&#xA;df.setLineWidth(1);&#xA;&#x9;df.setBackgroundColor(DF_BACK&#xA;);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);&#xA;&#xA;"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="acore.genmodel#//acore/AClass/subClasses"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4002"
+ editPartClassName="AClassImplementedInterfacesEditPart"
+ itemSemanticEditPolicyClassName="AClassImplementedInterfacesItemSemanticEditPolicy"
+ createCommandClassName="AClassImplementedInterfacesCreateCommand"
+ reorientCommandClassName="AClassImplementedInterfacesReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="AClassImplementedInterfacesFigure"
+ classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class AClassImplementedInterfacesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public AClassImplementedInterfacesFigure() {&#xA;&#x9;&#x9;this.setLineWidth(1);&#xA;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xA;&#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;df.setLineWidth(1);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="acore.genmodel#//acore/AClass/implementedInterfaces"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4003"
+ editPartClassName="AClassAssociationsEditPart"
+ itemSemanticEditPolicyClassName="AClassAssociationsItemSemanticEditPolicy"
+ createCommandClassName="AClassAssociationsCreateCommand"
+ reorientCommandClassName="AClassAssociationsReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="acore.genmodel#//acore/AClass/associations"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4004"
+ editPartClassName="AClassAggregationsEditPart"
+ itemSemanticEditPolicyClassName="AClassAggregationsItemSemanticEditPolicy"
+ createCommandClassName="AClassAggregationsCreateCommand"
+ reorientCommandClassName="AClassAggregationsReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="AClassAggregationClassesFigure"
+ classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class AClassAggregationClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public AClassAggregationClassesFigure() {&#xA;&#x9;&#x9;this.setLineWidth(1);&#xA;&#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.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();&#xA;df.setFill(true);&#xA;df.setLineWidth(1);&#xA;&#x9;df.setBackgroundColor(DF_BACK&#xA;);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-4)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 255, 255, 255);&#xA;&#xA;"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="acore.genmodel#//acore/AClass/aggregations"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4005"
+ editPartClassName="AClassCompositionsEditPart"
+ itemSemanticEditPolicyClassName="AClassCompositionsItemSemanticEditPolicy"
+ createCommandClassName="AClassCompositionsCreateCommand"
+ reorientCommandClassName="AClassCompositionsReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="AClassCompositionClassesFigure"
+ classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class AClassCompositionClassesFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public AClassCompositionClassesFigure() {&#xA;&#x9;&#x9;this.setLineWidth(1);&#xA;&#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.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();&#xA;df.setFill(true);&#xA;df.setLineWidth(1);&#xA;&#x9;df.setBackgroundColor(DF_BACK&#xA;);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-4)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Color DF_BACK = new org.eclipse.swt.graphics.Color(null, 0, 0, 0);&#xA;&#xA;"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="acore.genmodel#//acore/AClass/compositions"/>
+ </modelFacet>
+ </links>
+ <compartments
+ visualID="7001"
+ editPartClassName="AInterfaceAAttributeInterfaceCompartmentEditPart"
+ itemSemanticEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AInterfaceAAttributeInterfaceCompartmentCanonicalEditPolicy"
+ childNodes="//@diagram/@childNodes.0"
+ title="AAttributeInterfaceCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="//@diagram/@topLevelNodes.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureInterfaceAttributes"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ </compartments>
+ <compartments
+ visualID="7002"
+ editPartClassName="AInterfaceAOperationInterfaceCompartmentEditPart"
+ itemSemanticEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AInterfaceAOperationInterfaceCompartmentCanonicalEditPolicy"
+ childNodes="//@diagram/@childNodes.1"
+ title="AOperationInterfaceCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="//@diagram/@topLevelNodes.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureInterfaceOperations"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ </compartments>
+ <compartments
+ visualID="7003"
+ editPartClassName="AClassAAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="AClassAAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AClassAAttributeCompartmentCanonicalEditPolicy"
+ childNodes="//@diagram/@childNodes.2"
+ title="AAttributeCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="//@diagram/@topLevelNodes.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureClassAttributes"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ </compartments>
+ <compartments
+ visualID="7004"
+ editPartClassName="AClassAOperationClassCompartmentEditPart"
+ itemSemanticEditPolicyClassName="AClassAOperationClassCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AClassAOperationClassCompartmentCanonicalEditPolicy"
+ childNodes="//@diagram/@childNodes.3"
+ title="AOperationClassCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="//@diagram/@topLevelNodes.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureClassOperations"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ </compartments>
+ <palette>
+ <groups
+ title="Node"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="AClass"
+ description="Create new AClass"
+ genNodes="//@diagram/@topLevelNodes.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="AInterface"
+ description="Create new AInterface"
+ genNodes="//@diagram/@topLevelNodes.0"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="AAttribute"
+ description="Create an Attribute"
+ genNodes="//@diagram/@childNodes.0 //@diagram/@childNodes.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="AOperation"
+ description="Create an Operation"
+ genNodes="//@diagram/@childNodes.1 //@diagram/@childNodes.3"/>
+ </groups>
+ <groups
+ title="Connections"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="inherits"
+ description="Create new AClassSubClasses"
+ largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png"
+ smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/inherits.png"
+ genLinks="//@diagram/@links.0"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="implements"
+ description="Create new AClassImplementedInterfaces"
+ largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png"
+ smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/implements.png"
+ genLinks="//@diagram/@links.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="association"
+ description="Create new AClassSubClasses"
+ largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png"
+ smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/association.png"
+ genLinks="//@diagram/@links.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="aggregation"
+ description="Create new AClassSubClasses"
+ largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png"
+ smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/aggregation.png"
+ genLinks="//@diagram/@links.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="composition"
+ description="Create new AClassSubClasses"
+ largeIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png"
+ smallIconPath="/org.eclipse.emf.cdo.dawn.examples.acore.edit/icons/full/obj16/composition.png"
+ genLinks="//@diagram/@links.4"/>
+ </groups>
+ </palette>
+ <preferencePages
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.general"
+ name="Acore Diagram">
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.appearance"
+ name="Appearance"
+ kind="Appearance"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.connections"
+ name="Connections"
+ kind="Connections"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.printing"
+ name="Printing"
+ kind="Printing"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.emf.cdo.dawn.examples.acore.diagram.rulersAndGrid"
+ name="Rulers And Grid"
+ kind="RulersAndGrid"/>
+ </preferencePages>
+ </diagram>
+ <plugin>
+ <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
+ <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
+ </plugin>
+ <editor/>
+ <navigator>
+ <childReferences
+ child="//@diagram"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.0"
+ child="//@diagram/@childNodes.0"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.0"
+ child="//@diagram/@childNodes.1"/>
+ <childReferences
+ parent="//@diagram"
+ child="//@diagram/@topLevelNodes.0"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@childNodes.2"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@childNodes.3"/>
+ <childReferences
+ parent="//@diagram"
+ child="//@diagram/@topLevelNodes.1"/>
+ <childReferences
+ parent="//@diagram"
+ child="//@diagram/@links.0"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.0"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.0"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram"
+ child="//@diagram/@links.1"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.1"
+ child="//@diagram/@topLevelNodes.0"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.0"
+ child="//@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.1"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram"
+ child="//@diagram/@links.2"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.2"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.2"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram"
+ child="//@diagram/@links.3"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.3"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.3"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram"
+ child="//@diagram/@links.4"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.4"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@links.4"
+ child="//@diagram/@topLevelNodes.1"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="//@diagram/@topLevelNodes.1"
+ child="//@diagram/@links.4"
+ 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="acore.genmodel#/"/>
+ <labelParsers
+ extensibleViaService="true">
+ <implementations
+ xsi:type="gmfgen:PredefinedParser"
+ uses="//@diagram/@childNodes.0/@labelModelFacet //@diagram/@childNodes.1/@labelModelFacet //@diagram/@topLevelNodes.0/@labels.0/@modelFacet //@diagram/@childNodes.2/@labelModelFacet //@diagram/@childNodes.3/@labelModelFacet //@diagram/@topLevelNodes.1/@labels.0/@modelFacet"/>
+ </labelParsers>
+ <contextMenus
+ context="//@diagram">
+ <items
+ xsi:type="gmfgen:LoadResourceAction"/>
+ </contextMenus>
+</gmfgen:GenEditorGenerator>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgraph b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgraph
new file mode 100644
index 0000000000..f2621f9ccd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfgraph
@@ -0,0 +1,292 @@
+<?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="classdiagram">
+ <figures
+ name="Default">
+ <figures
+ xsi:type="gmfgraph:PolylineDecoration"
+ name="AClassSubClassesTargetDecoration">
+ <foregroundColor
+ xsi:type="gmfgraph:RGBColor"
+ green="255"/>
+ <backgroundColor
+ xsi:type="gmfgraph:RGBColor"
+ green="255"/>
+ <template
+ x="-2"
+ y="2"/>
+ <template/>
+ <template
+ x="-2"
+ y="-2"/>
+ <template
+ x="-2"
+ y="2"/>
+ </figures>
+ <figures
+ xsi:type="gmfgraph:PolylineDecoration"
+ name="AClassImplementedInterfacesTargetDecoration"/>
+ <figures
+ xsi:type="gmfgraph:PolygonDecoration"
+ name="ClassArrow">
+ <backgroundColor
+ xsi:type="gmfgraph:RGBColor"
+ red="255"
+ green="255"
+ blue="255"/>
+ <template
+ x="-2"
+ y="2"/>
+ <template/>
+ <template
+ x="-2"
+ y="-2"/>
+ <template
+ x="-2"
+ y="2"/>
+ </figures>
+ <figures
+ xsi:type="gmfgraph:PolygonDecoration"
+ name="BlackDiamond">
+ <backgroundColor
+ xsi:type="gmfgraph:RGBColor"/>
+ <template
+ x="-2"
+ y="2"/>
+ <template/>
+ <template
+ x="-2"
+ y="-2"/>
+ <template
+ x="-4"/>
+ <template
+ x="-2"
+ y="2"/>
+ </figures>
+ <figures
+ xsi:type="gmfgraph:PolygonDecoration"
+ name="WhiteDiamond">
+ <backgroundColor
+ xsi:type="gmfgraph:RGBColor"
+ red="255"
+ green="255"
+ blue="255"/>
+ <template
+ x="-2"
+ y="2"/>
+ <template/>
+ <template
+ x="-2"
+ y="-2"/>
+ <template
+ x="-4"/>
+ <template
+ x="-2"
+ y="2"/>
+ </figures>
+ <descriptors
+ name="AClassFigure">
+ <actualFigure
+ xsi:type="gmfgraph:Rectangle"
+ name="AClassFigure">
+ <layout
+ xsi:type="gmfgraph:FlowLayout"
+ vertical="true"
+ matchMinorSize="true"
+ forceSingleLine="true"
+ minorAlignment="CENTER"
+ majorSpacing="0"
+ minorSpacing="0"/>
+ <backgroundColor
+ xsi:type="gmfgraph:RGBColor"
+ red="230"
+ green="230"
+ blue="255"/>
+ <children
+ xsi:type="gmfgraph:Label"
+ name="AClassNameFigure"
+ text="&lt;...>"/>
+ <children
+ xsi:type="gmfgraph:Rectangle"
+ name="ClassAttributes">
+ <layout
+ xsi:type="gmfgraph:StackLayout"/>
+ </children>
+ <children
+ xsi:type="gmfgraph:Rectangle"
+ name="ClassOperations">
+ <layout
+ xsi:type="gmfgraph:StackLayout"/>
+ </children>
+ </actualFigure>
+ <accessors
+ figure="//@figures.0/@descriptors.0/@actualFigure/@children.1"/>
+ <accessors
+ figure="//@figures.0/@descriptors.0/@actualFigure/@children.0"/>
+ <accessors
+ figure="//@figures.0/@descriptors.0/@actualFigure/@children.2"/>
+ </descriptors>
+ <descriptors
+ name="AClassSubClassesFigure">
+ <actualFigure
+ xsi:type="gmfgraph:PolylineConnection"
+ name="AClassSubClassesFigure"
+ targetDecoration="//@figures.0/@figures.2"/>
+ </descriptors>
+ <descriptors
+ name="AClassImplementedInterfacesFigure">
+ <actualFigure
+ xsi:type="gmfgraph:PolylineConnection"
+ name="AClassImplementedInterfacesFigure"
+ lineKind="LINE_DASH"
+ targetDecoration="//@figures.0/@figures.1"/>
+ </descriptors>
+ <descriptors
+ name="AInterfaceFigure">
+ <actualFigure
+ xsi:type="gmfgraph:RoundedRectangle"
+ name="AInterfaceFigure"
+ cornerWidth="12"
+ cornerHeight="12">
+ <layout
+ xsi:type="gmfgraph:FlowLayout"
+ vertical="true"
+ matchMinorSize="true"
+ forceSingleLine="true"
+ minorAlignment="CENTER"
+ majorSpacing="0"
+ minorSpacing="0"/>
+ <backgroundColor
+ xsi:type="gmfgraph:RGBColor"
+ red="250"
+ green="250"
+ blue="190"/>
+ <children
+ xsi:type="gmfgraph:Label"
+ name="AInterfaceTypeLabelFigure"
+ text="«Interface»"/>
+ <children
+ xsi:type="gmfgraph:Label"
+ name="AInterfaceNameFigure"
+ text="&lt;...>"/>
+ <children
+ xsi:type="gmfgraph:Rectangle"
+ name="InterfaceAttributes">
+ <layout
+ xsi:type="gmfgraph:StackLayout"/>
+ </children>
+ <children
+ xsi:type="gmfgraph:Rectangle"
+ name="InterfaceOperations">
+ <layout
+ xsi:type="gmfgraph:StackLayout"/>
+ </children>
+ </actualFigure>
+ <accessors
+ figure="//@figures.0/@descriptors.3/@actualFigure/@children.1"/>
+ <accessors
+ figure="//@figures.0/@descriptors.3/@actualFigure/@children.2"/>
+ <accessors
+ figure="//@figures.0/@descriptors.3/@actualFigure/@children.3"/>
+ </descriptors>
+ <descriptors
+ name="AnAttributeFigure">
+ <actualFigure
+ xsi:type="gmfgraph:Rectangle"
+ name="AnAttributeFigure">
+ <children
+ xsi:type="gmfgraph:Label"
+ name="AnAttributeNameFigure"/>
+ </actualFigure>
+ <accessors
+ figure="//@figures.0/@descriptors.4/@actualFigure/@children.0"/>
+ </descriptors>
+ <descriptors
+ name="AnAttributeLabelFigure">
+ <actualFigure
+ xsi:type="gmfgraph:Label"
+ name="AnAttributeLabelFigure"/>
+ </descriptors>
+ <descriptors
+ name="AnOperationLabelFigure">
+ <actualFigure
+ xsi:type="gmfgraph:Label"
+ name="AnMethodLabelFigure"/>
+ </descriptors>
+ <descriptors
+ name="AClassAssociationClassesFigure">
+ <actualFigure
+ xsi:type="gmfgraph:PolylineConnection"
+ name="AClassAssociationFigure"/>
+ </descriptors>
+ <descriptors
+ name="AClassAggregationClassesFigure">
+ <actualFigure
+ xsi:type="gmfgraph:PolylineConnection"
+ name="AClassAggregationFigure"
+ targetDecoration="//@figures.0/@figures.4"/>
+ </descriptors>
+ <descriptors
+ name="AClassCompositionClassesFigure">
+ <actualFigure
+ xsi:type="gmfgraph:PolylineConnection"
+ name="AClassCompositionFigure"
+ targetDecoration="//@figures.0/@figures.3"/>
+ </descriptors>
+ </figures>
+ <nodes
+ name="AClass"
+ figure="AClassFigure"/>
+ <nodes
+ name="AInterface"
+ figure="AInterfaceFigure"/>
+ <connections
+ name="AClassSubClasses"
+ figure="AClassSubClassesFigure"/>
+ <connections
+ name="AClassImplementedInterfaces"
+ figure="AClassImplementedInterfacesFigure"/>
+ <connections
+ name="AClassAssociationClasses"
+ figure="AClassAssociationClassesFigure"/>
+ <connections
+ name="AClassAggregationClasses"
+ figure="AClassAggregationClassesFigure"/>
+ <connections
+ name="AClassCompositionClasses"
+ figure="AClassCompositionClassesFigure"/>
+ <compartments
+ name="AAttributeCompartment"
+ figure="AClassFigure"
+ accessor="//@figures.0/@descriptors.0/@accessors.0"/>
+ <compartments
+ name="AAttributeInterfaceCompartment"
+ figure="AInterfaceFigure"
+ accessor="//@figures.0/@descriptors.3/@accessors.1"/>
+ <compartments
+ name="AOperationClassCompartment"
+ figure="AClassFigure"
+ accessor="//@figures.0/@descriptors.0/@accessors.2"/>
+ <compartments
+ name="AOperationInterfaceCompartment"
+ figure="AInterfaceFigure"
+ accessor="//@figures.0/@descriptors.3/@accessors.2"/>
+ <labels
+ name="AClassName"
+ figure="AClassFigure"
+ accessor="//@figures.0/@descriptors.0/@accessors.1"/>
+ <labels
+ name="AInterfaceName"
+ figure="AInterfaceFigure"
+ accessor="//@figures.0/@descriptors.3/@accessors.0"/>
+ <labels
+ name="AAttributeLabel"
+ figure="AnAttributeLabelFigure"
+ elementIcon="false"/>
+ <labels
+ name="AOperationLabel"
+ figure="AnOperationLabelFigure"
+ elementIcon="false"/>
+</gmfgraph:Canvas>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfmap b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfmap
new file mode 100644
index 0000000000..f1e0d03246
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmfmap
@@ -0,0 +1,240 @@
+<?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/2008/mappings"
+ xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
+ <nodes>
+ <containmentFeature
+ href="acore.ecore#//ACoreRoot/interfaces"/>
+ <ownedChild>
+ <domainMetaElement
+ href="acore.ecore#//AInterface"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping">
+ <diagramLabel
+ href="acore.gmfgraph#AInterfaceName"/>
+ <features
+ href="acore.ecore#//ABasicClass/name"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.0/@tools.1"/>
+ <diagramNode
+ href="acore.gmfgraph#AInterface"/>
+ <children
+ compartment="//@nodes.0/@ownedChild/@compartments.0">
+ <containmentFeature
+ href="acore.ecore#//ABasicClass/attributes"/>
+ <ownedChild>
+ <domainMetaElement
+ href="acore.ecore#//AAttribute"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping"
+ viewPattern="{0} {2}:{1}"
+ editorPattern=""
+ editPattern="">
+ <diagramLabel
+ href="acore.gmfgraph#AAttributeLabel"/>
+ <features
+ href="acore.ecore#//AClassChild/accessright"/>
+ <features
+ href="acore.ecore#//AClassChild/dataType"/>
+ <features
+ href="acore.ecore#//AClassChild/name"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.0/@tools.2"/>
+ <diagramNode
+ href="acore.gmfgraph#AAttributeLabel"/>
+ </ownedChild>
+ </children>
+ <children
+ compartment="//@nodes.0/@ownedChild/@compartments.1">
+ <containmentFeature
+ href="acore.ecore#//ABasicClass/operations"/>
+ <ownedChild>
+ <domainMetaElement
+ href="acore.ecore#//AOperation"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping"
+ viewPattern="{0} {2}():{1}"
+ editorPattern=""
+ editPattern="">
+ <diagramLabel
+ href="acore.gmfgraph#AOperationLabel"/>
+ <features
+ href="acore.ecore#//AClassChild/accessright"/>
+ <features
+ href="acore.ecore#//AClassChild/dataType"/>
+ <features
+ href="acore.ecore#//AClassChild/name"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.0/@tools.3"/>
+ <diagramNode
+ href="acore.gmfgraph#AOperationLabel"/>
+ </ownedChild>
+ </children>
+ <compartments
+ children="//@nodes.0/@ownedChild/@children.0">
+ <compartment
+ href="acore.gmfgraph#AAttributeInterfaceCompartment"/>
+ </compartments>
+ <compartments
+ children="//@nodes.0/@ownedChild/@children.1">
+ <compartment
+ href="acore.gmfgraph#AOperationInterfaceCompartment"/>
+ </compartments>
+ </ownedChild>
+ </nodes>
+ <nodes>
+ <containmentFeature
+ href="acore.ecore#//ACoreRoot/classes"/>
+ <ownedChild>
+ <domainMetaElement
+ href="acore.ecore#//AClass"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping">
+ <diagramLabel
+ href="acore.gmfgraph#AClassName"/>
+ <features
+ href="acore.ecore#//ABasicClass/name"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.0/@tools.0"/>
+ <diagramNode
+ href="acore.gmfgraph#AClass"/>
+ <children
+ compartment="//@nodes.1/@ownedChild/@compartments.0">
+ <containmentFeature
+ href="acore.ecore#//ABasicClass/attributes"/>
+ <ownedChild>
+ <domainMetaElement
+ href="acore.ecore#//AAttribute"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping"
+ viewPattern="{0} {2}:{1}"
+ editorPattern=""
+ editPattern="">
+ <diagramLabel
+ href="acore.gmfgraph#AAttributeLabel"/>
+ <features
+ href="acore.ecore#//AClassChild/accessright"/>
+ <features
+ href="acore.ecore#//AClassChild/dataType"/>
+ <features
+ href="acore.ecore#//AClassChild/name"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.0/@tools.2"/>
+ <diagramNode
+ href="acore.gmfgraph#AAttributeLabel"/>
+ </ownedChild>
+ </children>
+ <children
+ compartment="//@nodes.1/@ownedChild/@compartments.1">
+ <containmentFeature
+ href="acore.ecore#//ABasicClass/operations"/>
+ <ownedChild>
+ <domainMetaElement
+ href="acore.ecore#//AOperation"/>
+ <labelMappings
+ xsi:type="gmfmap:FeatureLabelMapping"
+ viewPattern="{0} {2}():{1}"
+ editorPattern=""
+ editPattern="">
+ <diagramLabel
+ href="acore.gmfgraph#AOperationLabel"/>
+ <features
+ href="acore.ecore#//AClassChild/accessright"/>
+ <features
+ href="acore.ecore#//AClassChild/dataType"/>
+ <features
+ href="acore.ecore#//AClassChild/name"/>
+ </labelMappings>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.0/@tools.3"/>
+ <diagramNode
+ href="acore.gmfgraph#AOperationLabel"/>
+ </ownedChild>
+ </children>
+ <compartments
+ children="//@nodes.1/@ownedChild/@children.0">
+ <compartment
+ href="acore.gmfgraph#AAttributeCompartment"/>
+ </compartments>
+ <compartments
+ children="//@nodes.1/@ownedChild/@children.1">
+ <compartment
+ href="acore.gmfgraph#AOperationClassCompartment"/>
+ </compartments>
+ </ownedChild>
+ </nodes>
+ <links>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.1/@tools.0"/>
+ <diagramLink
+ href="acore.gmfgraph#AClassSubClasses"/>
+ <linkMetaFeature
+ xsi:type="ecore:EReference"
+ href="acore.ecore#//AClass/subClasses"/>
+ </links>
+ <links>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.1/@tools.1"/>
+ <diagramLink
+ href="acore.gmfgraph#AClassImplementedInterfaces"/>
+ <linkMetaFeature
+ xsi:type="ecore:EReference"
+ href="acore.ecore#//AClass/implementedInterfaces"/>
+ </links>
+ <links>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.1/@tools.2"/>
+ <diagramLink
+ href="acore.gmfgraph#AClassAssociationClasses"/>
+ <linkMetaFeature
+ xsi:type="ecore:EReference"
+ href="acore.ecore#//AClass/associations"/>
+ </links>
+ <links>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.1/@tools.3"/>
+ <diagramLink
+ href="acore.gmfgraph#AClassAggregationClasses"/>
+ <linkMetaFeature
+ xsi:type="ecore:EReference"
+ href="acore.ecore#//AClass/aggregations"/>
+ </links>
+ <links>
+ <tool
+ xsi:type="gmftool:CreationTool"
+ href="acore.gmftool#//@palette/@tools.1/@tools.4"/>
+ <diagramLink
+ href="acore.gmfgraph#AClassCompositionClasses"/>
+ <linkMetaFeature
+ xsi:type="ecore:EReference"
+ href="acore.ecore#//AClass/compositions"/>
+ </links>
+ <diagram>
+ <diagramCanvas
+ href="acore.gmfgraph#classdiagram"/>
+ <domainModel
+ href="acore.ecore#/"/>
+ <domainMetaElement
+ href="acore.ecore#//ACoreRoot"/>
+ <palette
+ href="acore.gmftool#//@palette"/>
+ </diagram>
+</gmfmap:Mapping>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmftool b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmftool
new file mode 100644
index 0000000000..56f2feea8b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.gmftool
@@ -0,0 +1,120 @@
+<?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="classdiagramPalette">
+ <tools
+ xsi:type="gmftool:ToolGroup"
+ title="Node"
+ collapsible="true">
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="AClass"
+ description="Create new AClass">
+ <smallIcon
+ xsi:type="gmftool:DefaultImage"/>
+ <largeIcon
+ xsi:type="gmftool:DefaultImage"/>
+ </tools>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="AInterface"
+ description="Create new AInterface">
+ <smallIcon
+ xsi:type="gmftool:DefaultImage"/>
+ <largeIcon
+ xsi:type="gmftool:DefaultImage"/>
+ </tools>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="AAttribute"
+ description="Create an Attribute">
+ <smallIcon
+ xsi:type="gmftool:DefaultImage"/>
+ <largeIcon
+ xsi:type="gmftool:DefaultImage"/>
+ </tools>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="AOperation"
+ description="Create an Operation">
+ <smallIcon
+ xsi:type="gmftool:DefaultImage"/>
+ <largeIcon
+ xsi:type="gmftool:DefaultImage"/>
+ </tools>
+ </tools>
+ <tools
+ xsi:type="gmftool:ToolGroup"
+ title="Connections"
+ collapsible="true">
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="inherits"
+ description="Create new AClassSubClasses">
+ <smallIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/inherits.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ <largeIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/inherits.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ </tools>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="implements"
+ description="Create new AClassImplementedInterfaces">
+ <smallIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/implements.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ <largeIcon
+ xsi:type="gmftool:BundleImage"
+ path="icons/full/obj16/implements.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ </tools>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="association"
+ description="Create new AClassSubClasses">
+ <smallIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/association.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ <largeIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/association.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ </tools>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="aggregation"
+ description="Create new AClassSubClasses">
+ <smallIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/aggregation.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ <largeIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/aggregation.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ </tools>
+ <tools
+ xsi:type="gmftool:CreationTool"
+ title="composition"
+ description="Create new AClassSubClasses">
+ <smallIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/composition.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ <largeIcon
+ xsi:type="gmftool:BundleImage"
+ path="/icons/full/obj16/composition.png"
+ bundle="org.eclipse.emf.cdo.dawn.examples.acore.edit"/>
+ </tools>
+ </tools>
+ </palette>
+</gmftool:ToolRegistry>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.trace b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.trace
new file mode 100644
index 0000000000..b3dd37501d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/model/acore.trace
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<trace:TraceModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:trace="http://www.eclipse.org/gmf/2006/Trace">
+ <nodeTraces visualID="2001" queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AInterface') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'ACoreRoot') and _containmentMF_.name = 'interfaces')">
+ <nodeLabelTraces visualID="5001" queryText="true"/>
+ <compartmentTraces visualID="7001" queryText="true"/>
+ <compartmentTraces visualID="7002" queryText="true"/>
+ </nodeTraces>
+ <nodeTraces visualID="2002" queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AClass') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'ACoreRoot') and _containmentMF_.name = 'classes')">
+ <nodeLabelTraces visualID="5002" queryText="true"/>
+ <compartmentTraces visualID="7003" queryText="true"/>
+ <compartmentTraces visualID="7004" queryText="true"/>
+ </nodeTraces>
+ <childNodeTraces visualID="3001" queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AAttribute') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'ABasicClass') and _containmentMF_.name = 'attributes')"/>
+ <childNodeTraces visualID="3002" queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AOperation') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'ABasicClass') and _containmentMF_.name = 'operations')"/>
+ <childNodeTraces visualID="3003" queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AAttribute') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'ABasicClass') and _containmentMF_.name = 'attributes')"/>
+ <childNodeTraces visualID="3004" queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AOperation') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'ABasicClass') and _containmentMF_.name = 'operations')"/>
+ <linkTraces visualID="4001" queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AClass') and _feature_.name = 'subClasses')"/>
+ <linkTraces visualID="4002" queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AClass') and _feature_.name = 'implementedInterfaces')"/>
+ <linkTraces visualID="4003" queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AClass') and _feature_.name = 'associations')"/>
+ <linkTraces visualID="4004" queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AClass') and _feature_.name = 'aggregations')"/>
+ <linkTraces visualID="4005" queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore' and _eClass_.name = 'AClass') and _feature_.name = 'compositions')"/>
+</trace:TraceModel>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.properties b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.properties
new file mode 100644
index 0000000000..1de510b571
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.properties
@@ -0,0 +1,11 @@
+# Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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 Fluegge - initial API and implementation
+
+pluginName = CDO Dawn Examples Acore
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.xml b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.xml
new file mode 100644
index 0000000000..6c305efe7c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/plugin.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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 Fluegge - initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore"
+ class="org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage"
+ genModel="model/acore.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AAttribute.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AAttribute.java
new file mode 100644
index 0000000000..094fd150d5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AAttribute.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>AAttribute</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAAttribute()
+ * @model
+ * @generated
+ */
+public interface AAttribute extends AClassChild
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+} // AAttribute
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ABasicClass.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ABasicClass.java
new file mode 100644
index 0000000000..a320167511
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ABasicClass.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+import org.eclipse.emf.cdo.CDOObject;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>ABasic Class</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getOperations <em>Operations</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getAttributes <em>Attributes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getABasicClass()
+ * @model
+ * @extends CDOObject
+ * @generated
+ */
+public interface ABasicClass extends CDOObject
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * Returns the value of the '<em><b>Operations</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Operations</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>Operations</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getABasicClass_Operations()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AOperation> getOperations();
+
+ /**
+ * Returns the value of the '<em><b>Attributes</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AAttribute}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attributes</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>Attributes</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getABasicClass_Attributes()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AAttribute> getAttributes();
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getABasicClass_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // ABasicClass
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClass.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClass.java
new file mode 100644
index 0000000000..e8e8bfffae
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClass.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>AClass</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getSubClasses <em>Sub Classes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getImplementedInterfaces <em>Implemented Interfaces</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getAssociations <em>Associations</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getCompositions <em>Compositions</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getAggregations <em>Aggregations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass()
+ * @model
+ * @generated
+ */
+public interface AClass extends ABasicClass
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * Returns the value of the '<em><b>Sub Classes</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sub Classes</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sub Classes</em>' reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_SubClasses()
+ * @model
+ * @generated
+ */
+ EList<AClass> getSubClasses();
+
+ /**
+ * Returns the value of the '<em><b>Implemented Interfaces</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AInterface}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Implemented Interfaces</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Implemented Interfaces</em>' reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_ImplementedInterfaces()
+ * @model
+ * @generated
+ */
+ EList<AInterface> getImplementedInterfaces();
+
+ /**
+ * Returns the value of the '<em><b>Associations</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Associations</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Associations</em>' reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_Associations()
+ * @model
+ * @generated
+ */
+ EList<AClass> getAssociations();
+
+ /**
+ * Returns the value of the '<em><b>Compositions</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Compositions</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Compositions</em>' reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_Compositions()
+ * @model
+ * @generated
+ */
+ EList<AClass> getCompositions();
+
+ /**
+ * Returns the value of the '<em><b>Aggregations</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Aggregations</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Aggregations</em>' reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClass_Aggregations()
+ * @model
+ * @generated
+ */
+ EList<AClass> getAggregations();
+
+} // AClass
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClassChild.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClassChild.java
new file mode 100644
index 0000000000..d2224dacab
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AClassChild.java
@@ -0,0 +1,154 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+import org.eclipse.emf.cdo.CDOObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>AClass Child</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright <em>Accessright</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getDataType <em>Data Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClassChild()
+ * @model
+ * @extends CDOObject
+ * @generated
+ */
+public interface AClassChild extends CDOObject
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * The default value is <code>""</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClassChild_Name()
+ * @model default=""
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Accessright</b></em>' attribute.
+ * The default value is <code>"public"</code>.
+ * The literals are from the enumeration {@link org.eclipse.emf.cdo.dawn.examples.acore.AccessType}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Accessright</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Accessright</em>' attribute.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType
+ * @see #isSetAccessright()
+ * @see #unsetAccessright()
+ * @see #setAccessright(AccessType)
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClassChild_Accessright()
+ * @model default="public" unique="false" unsettable="true"
+ * @generated
+ */
+ AccessType getAccessright();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright <em>Accessright</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Accessright</em>' attribute.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType
+ * @see #isSetAccessright()
+ * @see #unsetAccessright()
+ * @see #getAccessright()
+ * @generated
+ */
+ void setAccessright(AccessType value);
+
+ /**
+ * Unsets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright <em>Accessright</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetAccessright()
+ * @see #getAccessright()
+ * @see #setAccessright(AccessType)
+ * @generated
+ */
+ void unsetAccessright();
+
+ /**
+ * Returns whether the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright <em>Accessright</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Accessright</em>' attribute is set.
+ * @see #unsetAccessright()
+ * @see #getAccessright()
+ * @see #setAccessright(AccessType)
+ * @generated
+ */
+ boolean isSetAccessright();
+
+ /**
+ * Returns the value of the '<em><b>Data Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Data Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Data Type</em>' attribute.
+ * @see #setDataType(String)
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAClassChild_DataType()
+ * @model
+ * @generated
+ */
+ String getDataType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getDataType <em>Data Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Data Type</em>' attribute.
+ * @see #getDataType()
+ * @generated
+ */
+ void setDataType(String value);
+
+} // AClassChild
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ACoreRoot.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ACoreRoot.java
new file mode 100644
index 0000000000..97ef616eb0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/ACoreRoot.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+import org.eclipse.emf.cdo.CDOObject;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>ACore Root</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getClasses <em>Classes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getInterfaces <em>Interfaces</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getACoreRoot()
+ * @model
+ * @extends CDOObject
+ * @generated
+ */
+public interface ACoreRoot extends CDOObject
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * 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.emf.cdo.dawn.examples.acore.AcorePackage#getACoreRoot_Title()
+ * @model
+ * @generated
+ */
+ String getTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#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);
+
+ /**
+ * Returns the value of the '<em><b>Classes</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Classes</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>Classes</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getACoreRoot_Classes()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AClass> getClasses();
+
+ /**
+ * Returns the value of the '<em><b>Interfaces</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AInterface}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Interfaces</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>Interfaces</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getACoreRoot_Interfaces()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AInterface> getInterfaces();
+
+} // ACoreRoot
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AInterface.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AInterface.java
new file mode 100644
index 0000000000..02c91ca316
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AInterface.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>AInterface</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAInterface()
+ * @model
+ * @generated
+ */
+public interface AInterface extends ABasicClass
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+} // AInterface
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AOperation.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AOperation.java
new file mode 100644
index 0000000000..2d3786c916
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AOperation.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>AOperation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation#getParameters <em>Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAOperation()
+ * @model
+ * @generated
+ */
+public interface AOperation extends AClassChild
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * Returns the value of the '<em><b>Parameters</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parameters</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>Parameters</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAOperation_Parameters()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AParameter> getParameters();
+
+} // AOperation
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AParameter.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AParameter.java
new file mode 100644
index 0000000000..2cd30b53ab
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AParameter.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+import org.eclipse.emf.cdo.CDOObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>AParameter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAParameter()
+ * @model
+ * @extends CDOObject
+ * @generated
+ */
+public interface AParameter extends CDOObject
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAParameter_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAParameter_Type()
+ * @model
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+} // AParameter
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AccessType.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AccessType.java
new file mode 100644
index 0000000000..2befc78aed
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AccessType.java
@@ -0,0 +1,293 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Access Type</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#getAccessType()
+ * @model extendedMetaData="name='AccessType'"
+ * @generated
+ */
+public enum AccessType implements Enumerator
+{
+ /**
+ * The '<em><b>PUBLIC</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #PUBLIC_VALUE
+ * @generated
+ * @ordered
+ */
+ PUBLIC(0, "PUBLIC", "public"),
+
+ /**
+ * The '<em><b>PRIVATE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #PRIVATE_VALUE
+ * @generated
+ * @ordered
+ */
+ PRIVATE(1, "PRIVATE", "private"),
+
+ /**
+ * The '<em><b>PROECTED</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #PROECTED_VALUE
+ * @generated
+ * @ordered
+ */
+ PROECTED(2, "PROECTED", "protected"),
+
+ /**
+ * The '<em><b>PACKAGE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #PACKAGE_VALUE
+ * @generated
+ * @ordered
+ */
+ PACKAGE(3, "PACKAGE", "package");
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * The '<em><b>PUBLIC</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>PUBLIC</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #PUBLIC
+ * @model literal="public"
+ * @generated
+ * @ordered
+ */
+ public static final int PUBLIC_VALUE = 0;
+
+ /**
+ * The '<em><b>PRIVATE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>PRIVATE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #PRIVATE
+ * @model literal="private"
+ * @generated
+ * @ordered
+ */
+ public static final int PRIVATE_VALUE = 1;
+
+ /**
+ * The '<em><b>PROECTED</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>PROECTED</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #PROECTED
+ * @model literal="protected"
+ * @generated
+ * @ordered
+ */
+ public static final int PROECTED_VALUE = 2;
+
+ /**
+ * The '<em><b>PACKAGE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>PACKAGE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #PACKAGE
+ * @model literal="package"
+ * @generated
+ * @ordered
+ */
+ public static final int PACKAGE_VALUE = 3;
+
+ /**
+ * An array of all the '<em><b>Access Type</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final AccessType[] VALUES_ARRAY =
+ new AccessType[]
+ {
+ PUBLIC,
+ PRIVATE,
+ PROECTED,
+ PACKAGE,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Access Type</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<AccessType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Access Type</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static AccessType get(String literal)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ AccessType result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Access Type</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static AccessType getByName(String name)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ AccessType result = VALUES_ARRAY[i];
+ if (result.getName().equals(name))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Access Type</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static AccessType get(int value)
+ {
+ switch (value)
+ {
+ case PUBLIC_VALUE: return PUBLIC;
+ case PRIVATE_VALUE: return PRIVATE;
+ case PROECTED_VALUE: return PROECTED;
+ case PACKAGE_VALUE: return PACKAGE;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private AccessType(int value, String name, String literal)
+ {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue()
+ {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral()
+ {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ return literal;
+ }
+
+} //AccessType
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcoreFactory.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcoreFactory.java
new file mode 100644
index 0000000000..6c964f273b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcoreFactory.java
@@ -0,0 +1,122 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+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.emf.cdo.dawn.examples.acore.AcorePackage
+ * @generated
+ */
+public interface AcoreFactory extends EFactory
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ AcoreFactory eINSTANCE = org.eclipse.emf.cdo.dawn.examples.acore.impl.AcoreFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>AClass</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>AClass</em>'.
+ * @generated
+ */
+ AClass createAClass();
+
+ /**
+ * Returns a new object of class '<em>AInterface</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>AInterface</em>'.
+ * @generated
+ */
+ AInterface createAInterface();
+
+ /**
+ * Returns a new object of class '<em>ACore Root</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>ACore Root</em>'.
+ * @generated
+ */
+ ACoreRoot createACoreRoot();
+
+ /**
+ * Returns a new object of class '<em>AAttribute</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>AAttribute</em>'.
+ * @generated
+ */
+ AAttribute createAAttribute();
+
+ /**
+ * Returns a new object of class '<em>AOperation</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>AOperation</em>'.
+ * @generated
+ */
+ AOperation createAOperation();
+
+ /**
+ * Returns a new object of class '<em>ABasic Class</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>ABasic Class</em>'.
+ * @generated
+ */
+ ABasicClass createABasicClass();
+
+ /**
+ * Returns a new object of class '<em>AParameter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>AParameter</em>'.
+ * @generated
+ */
+ AParameter createAParameter();
+
+ /**
+ * Returns a new object of class '<em>AClass Child</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>AClass Child</em>'.
+ * @generated
+ */
+ AClassChild createAClassChild();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ AcorePackage getAcorePackage();
+
+} //AcoreFactory
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcorePackage.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcorePackage.java
new file mode 100644
index 0000000000..4f099c9829
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/AcorePackage.java
@@ -0,0 +1,1061 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore;
+
+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.emf.cdo.dawn.examples.acore.AcoreFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface AcorePackage extends EPackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "acore";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "acore";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ AcorePackage eINSTANCE = org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ABasicClassImpl <em>ABasic Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.ABasicClassImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getABasicClass()
+ * @generated
+ */
+ int ABASIC_CLASS = 5;
+
+ /**
+ * The feature id for the '<em><b>Operations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABASIC_CLASS__OPERATIONS = 0;
+
+ /**
+ * The feature id for the '<em><b>Attributes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABASIC_CLASS__ATTRIBUTES = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABASIC_CLASS__NAME = 2;
+
+ /**
+ * The number of structural features of the '<em>ABasic Class</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABASIC_CLASS_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl <em>AClass</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAClass()
+ * @generated
+ */
+ int ACLASS = 0;
+
+ /**
+ * The feature id for the '<em><b>Operations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS__OPERATIONS = ABASIC_CLASS__OPERATIONS;
+
+ /**
+ * The feature id for the '<em><b>Attributes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS__ATTRIBUTES = ABASIC_CLASS__ATTRIBUTES;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS__NAME = ABASIC_CLASS__NAME;
+
+ /**
+ * The feature id for the '<em><b>Sub Classes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS__SUB_CLASSES = ABASIC_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Implemented Interfaces</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS__IMPLEMENTED_INTERFACES = ABASIC_CLASS_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Associations</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS__ASSOCIATIONS = ABASIC_CLASS_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Compositions</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS__COMPOSITIONS = ABASIC_CLASS_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Aggregations</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS__AGGREGATIONS = ABASIC_CLASS_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>AClass</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS_FEATURE_COUNT = ABASIC_CLASS_FEATURE_COUNT + 5;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AInterfaceImpl <em>AInterface</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AInterfaceImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAInterface()
+ * @generated
+ */
+ int AINTERFACE = 1;
+
+ /**
+ * The feature id for the '<em><b>Operations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AINTERFACE__OPERATIONS = ABASIC_CLASS__OPERATIONS;
+
+ /**
+ * The feature id for the '<em><b>Attributes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AINTERFACE__ATTRIBUTES = ABASIC_CLASS__ATTRIBUTES;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AINTERFACE__NAME = ABASIC_CLASS__NAME;
+
+ /**
+ * The number of structural features of the '<em>AInterface</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AINTERFACE_FEATURE_COUNT = ABASIC_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ACoreRootImpl <em>ACore Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.ACoreRootImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getACoreRoot()
+ * @generated
+ */
+ int ACORE_ROOT = 2;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACORE_ROOT__TITLE = 0;
+
+ /**
+ * The feature id for the '<em><b>Classes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACORE_ROOT__CLASSES = 1;
+
+ /**
+ * The feature id for the '<em><b>Interfaces</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACORE_ROOT__INTERFACES = 2;
+
+ /**
+ * The number of structural features of the '<em>ACore Root</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACORE_ROOT_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassChildImpl <em>AClass Child</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassChildImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAClassChild()
+ * @generated
+ */
+ int ACLASS_CHILD = 7;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS_CHILD__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Accessright</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS_CHILD__ACCESSRIGHT = 1;
+
+ /**
+ * The feature id for the '<em><b>Data Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS_CHILD__DATA_TYPE = 2;
+
+ /**
+ * The number of structural features of the '<em>AClass Child</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACLASS_CHILD_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AAttributeImpl <em>AAttribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AAttributeImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAAttribute()
+ * @generated
+ */
+ int AATTRIBUTE = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AATTRIBUTE__NAME = ACLASS_CHILD__NAME;
+
+ /**
+ * The feature id for the '<em><b>Accessright</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AATTRIBUTE__ACCESSRIGHT = ACLASS_CHILD__ACCESSRIGHT;
+
+ /**
+ * The feature id for the '<em><b>Data Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AATTRIBUTE__DATA_TYPE = ACLASS_CHILD__DATA_TYPE;
+
+ /**
+ * The number of structural features of the '<em>AAttribute</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AATTRIBUTE_FEATURE_COUNT = ACLASS_CHILD_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AOperationImpl <em>AOperation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AOperationImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAOperation()
+ * @generated
+ */
+ int AOPERATION = 4;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AOPERATION__NAME = ACLASS_CHILD__NAME;
+
+ /**
+ * The feature id for the '<em><b>Accessright</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AOPERATION__ACCESSRIGHT = ACLASS_CHILD__ACCESSRIGHT;
+
+ /**
+ * The feature id for the '<em><b>Data Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AOPERATION__DATA_TYPE = ACLASS_CHILD__DATA_TYPE;
+
+ /**
+ * The feature id for the '<em><b>Parameters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AOPERATION__PARAMETERS = ACLASS_CHILD_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>AOperation</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AOPERATION_FEATURE_COUNT = ACLASS_CHILD_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AParameterImpl <em>AParameter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AParameterImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAParameter()
+ * @generated
+ */
+ int APARAMETER = 6;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int APARAMETER__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int APARAMETER__TYPE = 1;
+
+ /**
+ * The number of structural features of the '<em>AParameter</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int APARAMETER_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AccessType <em>Access Type</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAccessType()
+ * @generated
+ */
+ int ACCESS_TYPE = 8;
+
+ /**
+ * The meta object id for the '<em>Access Type Object</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAccessTypeObject()
+ * @generated
+ */
+ int ACCESS_TYPE_OBJECT = 9;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass <em>AClass</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>AClass</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClass
+ * @generated
+ */
+ EClass getAClass();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getSubClasses <em>Sub Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Sub Classes</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClass#getSubClasses()
+ * @see #getAClass()
+ * @generated
+ */
+ EReference getAClass_SubClasses();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getImplementedInterfaces <em>Implemented Interfaces</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Implemented Interfaces</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClass#getImplementedInterfaces()
+ * @see #getAClass()
+ * @generated
+ */
+ EReference getAClass_ImplementedInterfaces();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getAssociations <em>Associations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Associations</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClass#getAssociations()
+ * @see #getAClass()
+ * @generated
+ */
+ EReference getAClass_Associations();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getCompositions <em>Compositions</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Compositions</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClass#getCompositions()
+ * @see #getAClass()
+ * @generated
+ */
+ EReference getAClass_Compositions();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass#getAggregations <em>Aggregations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Aggregations</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClass#getAggregations()
+ * @see #getAClass()
+ * @generated
+ */
+ EReference getAClass_Aggregations();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AInterface <em>AInterface</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>AInterface</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AInterface
+ * @generated
+ */
+ EClass getAInterface();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot <em>ACore Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>ACore Root</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot
+ * @generated
+ */
+ EClass getACoreRoot();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getTitle <em>Title</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Title</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getTitle()
+ * @see #getACoreRoot()
+ * @generated
+ */
+ EAttribute getACoreRoot_Title();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getClasses <em>Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Classes</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getClasses()
+ * @see #getACoreRoot()
+ * @generated
+ */
+ EReference getACoreRoot_Classes();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getInterfaces <em>Interfaces</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Interfaces</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot#getInterfaces()
+ * @see #getACoreRoot()
+ * @generated
+ */
+ EReference getACoreRoot_Interfaces();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AAttribute <em>AAttribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>AAttribute</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AAttribute
+ * @generated
+ */
+ EClass getAAttribute();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation <em>AOperation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>AOperation</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AOperation
+ * @generated
+ */
+ EClass getAOperation();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation#getParameters <em>Parameters</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Parameters</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AOperation#getParameters()
+ * @see #getAOperation()
+ * @generated
+ */
+ EReference getAOperation_Parameters();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass <em>ABasic Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>ABasic Class</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass
+ * @generated
+ */
+ EClass getABasicClass();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getOperations <em>Operations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Operations</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getOperations()
+ * @see #getABasicClass()
+ * @generated
+ */
+ EReference getABasicClass_Operations();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getAttributes <em>Attributes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Attributes</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getAttributes()
+ * @see #getABasicClass()
+ * @generated
+ */
+ EReference getABasicClass_Attributes();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass#getName()
+ * @see #getABasicClass()
+ * @generated
+ */
+ EAttribute getABasicClass_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter <em>AParameter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>AParameter</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AParameter
+ * @generated
+ */
+ EClass getAParameter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getName()
+ * @see #getAParameter()
+ * @generated
+ */
+ EAttribute getAParameter_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AParameter#getType()
+ * @see #getAParameter()
+ * @generated
+ */
+ EAttribute getAParameter_Type();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild <em>AClass Child</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>AClass Child</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClassChild
+ * @generated
+ */
+ EClass getAClassChild();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getName()
+ * @see #getAClassChild()
+ * @generated
+ */
+ EAttribute getAClassChild_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright <em>Accessright</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Accessright</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getAccessright()
+ * @see #getAClassChild()
+ * @generated
+ */
+ EAttribute getAClassChild_Accessright();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getDataType <em>Data Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Data Type</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClassChild#getDataType()
+ * @see #getAClassChild()
+ * @generated
+ */
+ EAttribute getAClassChild_DataType();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.emf.cdo.dawn.examples.acore.AccessType <em>Access Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Access Type</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType
+ * @generated
+ */
+ EEnum getAccessType();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.emf.cdo.dawn.examples.acore.AccessType <em>Access Type Object</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Access Type Object</em>'.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType
+ * @model instanceClass="org.eclipse.emf.cdo.dawn.examples.acore.AccessType"
+ * extendedMetaData="name='AccessType:Object' baseType='AccessType'"
+ * @generated
+ */
+ EDataType getAccessTypeObject();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ AcoreFactory getAcoreFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that 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 -->
+ * @generated
+ */
+ interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl <em>AClass</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAClass()
+ * @generated
+ */
+ EClass ACLASS = eINSTANCE.getAClass();
+
+ /**
+ * The meta object literal for the '<em><b>Sub Classes</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACLASS__SUB_CLASSES = eINSTANCE.getAClass_SubClasses();
+
+ /**
+ * The meta object literal for the '<em><b>Implemented Interfaces</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACLASS__IMPLEMENTED_INTERFACES = eINSTANCE.getAClass_ImplementedInterfaces();
+
+ /**
+ * The meta object literal for the '<em><b>Associations</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACLASS__ASSOCIATIONS = eINSTANCE.getAClass_Associations();
+
+ /**
+ * The meta object literal for the '<em><b>Compositions</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACLASS__COMPOSITIONS = eINSTANCE.getAClass_Compositions();
+
+ /**
+ * The meta object literal for the '<em><b>Aggregations</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACLASS__AGGREGATIONS = eINSTANCE.getAClass_Aggregations();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AInterfaceImpl <em>AInterface</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AInterfaceImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAInterface()
+ * @generated
+ */
+ EClass AINTERFACE = eINSTANCE.getAInterface();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ACoreRootImpl <em>ACore Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.ACoreRootImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getACoreRoot()
+ * @generated
+ */
+ EClass ACORE_ROOT = eINSTANCE.getACoreRoot();
+
+ /**
+ * The meta object literal for the '<em><b>Title</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ACORE_ROOT__TITLE = eINSTANCE.getACoreRoot_Title();
+
+ /**
+ * The meta object literal for the '<em><b>Classes</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACORE_ROOT__CLASSES = eINSTANCE.getACoreRoot_Classes();
+
+ /**
+ * The meta object literal for the '<em><b>Interfaces</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACORE_ROOT__INTERFACES = eINSTANCE.getACoreRoot_Interfaces();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AAttributeImpl <em>AAttribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AAttributeImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAAttribute()
+ * @generated
+ */
+ EClass AATTRIBUTE = eINSTANCE.getAAttribute();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AOperationImpl <em>AOperation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AOperationImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAOperation()
+ * @generated
+ */
+ EClass AOPERATION = eINSTANCE.getAOperation();
+
+ /**
+ * The meta object literal for the '<em><b>Parameters</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference AOPERATION__PARAMETERS = eINSTANCE.getAOperation_Parameters();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ABasicClassImpl <em>ABasic Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.ABasicClassImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getABasicClass()
+ * @generated
+ */
+ EClass ABASIC_CLASS = eINSTANCE.getABasicClass();
+
+ /**
+ * The meta object literal for the '<em><b>Operations</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ABASIC_CLASS__OPERATIONS = eINSTANCE.getABasicClass_Operations();
+
+ /**
+ * The meta object literal for the '<em><b>Attributes</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ABASIC_CLASS__ATTRIBUTES = eINSTANCE.getABasicClass_Attributes();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ABASIC_CLASS__NAME = eINSTANCE.getABasicClass_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AParameterImpl <em>AParameter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AParameterImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAParameter()
+ * @generated
+ */
+ EClass APARAMETER = eINSTANCE.getAParameter();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute APARAMETER__NAME = eINSTANCE.getAParameter_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute APARAMETER__TYPE = eINSTANCE.getAParameter_Type();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassChildImpl <em>AClass Child</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassChildImpl
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAClassChild()
+ * @generated
+ */
+ EClass ACLASS_CHILD = eINSTANCE.getAClassChild();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ACLASS_CHILD__NAME = eINSTANCE.getAClassChild_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Accessright</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ACLASS_CHILD__ACCESSRIGHT = eINSTANCE.getAClassChild_Accessright();
+
+ /**
+ * The meta object literal for the '<em><b>Data Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ACLASS_CHILD__DATA_TYPE = eINSTANCE.getAClassChild_DataType();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.dawn.examples.acore.AccessType <em>Access Type</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAccessType()
+ * @generated
+ */
+ EEnum ACCESS_TYPE = eINSTANCE.getAccessType();
+
+ /**
+ * The meta object literal for the '<em>Access Type Object</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AccessType
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.impl.AcorePackageImpl#getAccessTypeObject()
+ * @generated
+ */
+ EDataType ACCESS_TYPE_OBJECT = eINSTANCE.getAccessTypeObject();
+
+ }
+
+} //AcorePackage
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AAttributeImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AAttributeImpl.java
new file mode 100644
index 0000000000..e0c3214e79
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AAttributeImpl.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AAttribute;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>AAttribute</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class AAttributeImpl extends AClassChildImpl implements AAttribute
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AAttributeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return AcorePackage.Literals.AATTRIBUTE;
+ }
+
+} //AAttributeImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ABasicClassImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ABasicClassImpl.java
new file mode 100644
index 0000000000..f106982b2c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ABasicClassImpl.java
@@ -0,0 +1,123 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AAttribute;
+import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AOperation;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>ABasic Class</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ABasicClassImpl#getOperations <em>Operations</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ABasicClassImpl#getAttributes <em>Attributes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ABasicClassImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ABasicClassImpl extends CDOObjectImpl implements ABasicClass
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ABasicClassImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return AcorePackage.Literals.ABASIC_CLASS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AOperation> getOperations()
+ {
+ return (EList<AOperation>)eGet(AcorePackage.Literals.ABASIC_CLASS__OPERATIONS, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AAttribute> getAttributes()
+ {
+ return (EList<AAttribute>)eGet(AcorePackage.Literals.ABASIC_CLASS__ATTRIBUTES, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(AcorePackage.Literals.ABASIC_CLASS__NAME, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ eSet(AcorePackage.Literals.ABASIC_CLASS__NAME, newName);
+ }
+
+} //ABasicClassImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassChildImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassChildImpl.java
new file mode 100644
index 0000000000..f2639a3644
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassChildImpl.java
@@ -0,0 +1,158 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClassChild;
+import org.eclipse.emf.cdo.dawn.examples.acore.AccessType;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>AClass Child</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassChildImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassChildImpl#getAccessright <em>Accessright</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassChildImpl#getDataType <em>Data Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AClassChildImpl extends CDOObjectImpl implements AClassChild
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AClassChildImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return AcorePackage.Literals.ACLASS_CHILD;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(AcorePackage.Literals.ACLASS_CHILD__NAME, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ eSet(AcorePackage.Literals.ACLASS_CHILD__NAME, newName);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AccessType getAccessright()
+ {
+ return (AccessType)eGet(AcorePackage.Literals.ACLASS_CHILD__ACCESSRIGHT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAccessright(AccessType newAccessright)
+ {
+ eSet(AcorePackage.Literals.ACLASS_CHILD__ACCESSRIGHT, newAccessright);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetAccessright()
+ {
+ eUnset(AcorePackage.Literals.ACLASS_CHILD__ACCESSRIGHT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetAccessright()
+ {
+ return eIsSet(AcorePackage.Literals.ACLASS_CHILD__ACCESSRIGHT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getDataType()
+ {
+ return (String)eGet(AcorePackage.Literals.ACLASS_CHILD__DATA_TYPE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDataType(String newDataType)
+ {
+ eSet(AcorePackage.Literals.ACLASS_CHILD__DATA_TYPE, newDataType);
+ }
+
+} //AClassChildImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassImpl.java
new file mode 100644
index 0000000000..205caf0e42
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AClassImpl.java
@@ -0,0 +1,124 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>AClass</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl#getSubClasses <em>Sub Classes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl#getImplementedInterfaces <em>Implemented Interfaces</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl#getAssociations <em>Associations</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl#getCompositions <em>Compositions</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AClassImpl#getAggregations <em>Aggregations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AClassImpl extends ABasicClassImpl implements AClass
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AClassImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return AcorePackage.Literals.ACLASS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AClass> getSubClasses()
+ {
+ return (EList<AClass>)eGet(AcorePackage.Literals.ACLASS__SUB_CLASSES, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AInterface> getImplementedInterfaces()
+ {
+ return (EList<AInterface>)eGet(AcorePackage.Literals.ACLASS__IMPLEMENTED_INTERFACES, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AClass> getAssociations()
+ {
+ return (EList<AClass>)eGet(AcorePackage.Literals.ACLASS__ASSOCIATIONS, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AClass> getCompositions()
+ {
+ return (EList<AClass>)eGet(AcorePackage.Literals.ACLASS__COMPOSITIONS, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AClass> getAggregations()
+ {
+ return (EList<AClass>)eGet(AcorePackage.Literals.ACLASS__AGGREGATIONS, true);
+ }
+
+} //AClassImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ACoreRootImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ACoreRootImpl.java
new file mode 100644
index 0000000000..829384d6c0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/ACoreRootImpl.java
@@ -0,0 +1,123 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>ACore Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ACoreRootImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ACoreRootImpl#getClasses <em>Classes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.ACoreRootImpl#getInterfaces <em>Interfaces</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ACoreRootImpl extends CDOObjectImpl implements ACoreRoot
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ACoreRootImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return AcorePackage.Literals.ACORE_ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTitle()
+ {
+ return (String)eGet(AcorePackage.Literals.ACORE_ROOT__TITLE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTitle(String newTitle)
+ {
+ eSet(AcorePackage.Literals.ACORE_ROOT__TITLE, newTitle);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AClass> getClasses()
+ {
+ return (EList<AClass>)eGet(AcorePackage.Literals.ACORE_ROOT__CLASSES, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AInterface> getInterfaces()
+ {
+ return (EList<AInterface>)eGet(AcorePackage.Literals.ACORE_ROOT__INTERFACES, true);
+ }
+
+} //ACoreRootImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AInterfaceImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AInterfaceImpl.java
new file mode 100644
index 0000000000..e62b7cb8e2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AInterfaceImpl.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>AInterface</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class AInterfaceImpl extends ABasicClassImpl implements AInterface
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AInterfaceImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return AcorePackage.Literals.AINTERFACE;
+ }
+
+} //AInterfaceImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AOperationImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AOperationImpl.java
new file mode 100644
index 0000000000..02089f8490
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AOperationImpl.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AOperation;
+import org.eclipse.emf.cdo.dawn.examples.acore.AParameter;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>AOperation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AOperationImpl#getParameters <em>Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AOperationImpl extends AClassChildImpl implements AOperation
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AOperationImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return AcorePackage.Literals.AOPERATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<AParameter> getParameters()
+ {
+ return (EList<AParameter>)eGet(AcorePackage.Literals.AOPERATION__PARAMETERS, true);
+ }
+
+} //AOperationImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AParameterImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AParameterImpl.java
new file mode 100644
index 0000000000..876b16a09a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AParameterImpl.java
@@ -0,0 +1,116 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AParameter;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>AParameter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AParameterImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.dawn.examples.acore.impl.AParameterImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AParameterImpl extends CDOObjectImpl implements AParameter
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AParameterImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return AcorePackage.Literals.APARAMETER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(AcorePackage.Literals.APARAMETER__NAME, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ eSet(AcorePackage.Literals.APARAMETER__NAME, newName);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType()
+ {
+ return (String)eGet(AcorePackage.Literals.APARAMETER__TYPE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType)
+ {
+ eSet(AcorePackage.Literals.APARAMETER__TYPE, newType);
+ }
+
+} //AParameterImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcoreFactoryImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcoreFactoryImpl.java
new file mode 100644
index 0000000000..8bf366ba74
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcoreFactoryImpl.java
@@ -0,0 +1,287 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AcoreFactoryImpl extends EFactoryImpl implements AcoreFactory
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static AcoreFactory init()
+ {
+ try
+ {
+ AcoreFactory theAcoreFactory = (AcoreFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/cdo/dawn/examples/2010/ACore");
+ if (theAcoreFactory != null)
+ {
+ return theAcoreFactory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new AcoreFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AcoreFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case AcorePackage.ACLASS: return (EObject)createAClass();
+ case AcorePackage.AINTERFACE: return (EObject)createAInterface();
+ case AcorePackage.ACORE_ROOT: return (EObject)createACoreRoot();
+ case AcorePackage.AATTRIBUTE: return (EObject)createAAttribute();
+ case AcorePackage.AOPERATION: return (EObject)createAOperation();
+ case AcorePackage.ABASIC_CLASS: return (EObject)createABasicClass();
+ case AcorePackage.APARAMETER: return (EObject)createAParameter();
+ case AcorePackage.ACLASS_CHILD: return (EObject)createAClassChild();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case AcorePackage.ACCESS_TYPE:
+ return createAccessTypeFromString(eDataType, initialValue);
+ case AcorePackage.ACCESS_TYPE_OBJECT:
+ return createAccessTypeObjectFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case AcorePackage.ACCESS_TYPE:
+ return convertAccessTypeToString(eDataType, instanceValue);
+ case AcorePackage.ACCESS_TYPE_OBJECT:
+ return convertAccessTypeObjectToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AClass createAClass()
+ {
+ AClassImpl aClass = new AClassImpl();
+ return aClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AInterface createAInterface()
+ {
+ AInterfaceImpl aInterface = new AInterfaceImpl();
+ return aInterface;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ACoreRoot createACoreRoot()
+ {
+ ACoreRootImpl aCoreRoot = new ACoreRootImpl();
+ return aCoreRoot;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AAttribute createAAttribute()
+ {
+ AAttributeImpl aAttribute = new AAttributeImpl();
+ return aAttribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AOperation createAOperation()
+ {
+ AOperationImpl aOperation = new AOperationImpl();
+ return aOperation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ABasicClass createABasicClass()
+ {
+ ABasicClassImpl aBasicClass = new ABasicClassImpl();
+ return aBasicClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AParameter createAParameter()
+ {
+ AParameterImpl aParameter = new AParameterImpl();
+ return aParameter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AClassChild createAClassChild()
+ {
+ AClassChildImpl aClassChild = new AClassChildImpl();
+ return aClassChild;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AccessType createAccessTypeFromString(EDataType eDataType, String initialValue)
+ {
+ AccessType result = AccessType.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertAccessTypeToString(EDataType eDataType, Object instanceValue)
+ {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AccessType createAccessTypeObjectFromString(EDataType eDataType, String initialValue)
+ {
+ return createAccessTypeFromString(AcorePackage.Literals.ACCESS_TYPE, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertAccessTypeObjectToString(EDataType eDataType, Object instanceValue)
+ {
+ return convertAccessTypeToString(AcorePackage.Literals.ACCESS_TYPE, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AcorePackage getAcorePackage()
+ {
+ return (AcorePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static AcorePackage getPackage()
+ {
+ return AcorePackage.eINSTANCE;
+ }
+
+} //AcoreFactoryImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcorePackageImpl.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcorePackageImpl.java
new file mode 100644
index 0000000000..84428f21d8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/impl/AcorePackageImpl.java
@@ -0,0 +1,635 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.impl;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.AAttribute;
+import org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AClass;
+import org.eclipse.emf.cdo.dawn.examples.acore.AClassChild;
+import org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot;
+import org.eclipse.emf.cdo.dawn.examples.acore.AInterface;
+import org.eclipse.emf.cdo.dawn.examples.acore.AOperation;
+import org.eclipse.emf.cdo.dawn.examples.acore.AParameter;
+import org.eclipse.emf.cdo.dawn.examples.acore.AccessType;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcoreFactory;
+import org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage;
+
+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;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AcorePackageImpl extends EPackageImpl implements AcorePackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass aClassEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass aInterfaceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass aCoreRootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass aAttributeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass aOperationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass aBasicClassEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass aParameterEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass aClassChildEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum accessTypeEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType accessTypeObjectEDataType = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private AcorePackageImpl()
+ {
+ super(eNS_URI, AcoreFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link AcorePackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static AcorePackage init()
+ {
+ if (isInited) return (AcorePackage)EPackage.Registry.INSTANCE.getEPackage(AcorePackage.eNS_URI);
+
+ // Obtain or create and register package
+ AcorePackageImpl theAcorePackage = (AcorePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof AcorePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new AcorePackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theAcorePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theAcorePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theAcorePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(AcorePackage.eNS_URI, theAcorePackage);
+ return theAcorePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAClass()
+ {
+ return aClassEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getAClass_SubClasses()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getAClass_ImplementedInterfaces()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getAClass_Associations()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getAClass_Compositions()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getAClass_Aggregations()
+ {
+ return (EReference)aClassEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAInterface()
+ {
+ return aInterfaceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getACoreRoot()
+ {
+ return aCoreRootEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getACoreRoot_Title()
+ {
+ return (EAttribute)aCoreRootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getACoreRoot_Classes()
+ {
+ return (EReference)aCoreRootEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getACoreRoot_Interfaces()
+ {
+ return (EReference)aCoreRootEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAAttribute()
+ {
+ return aAttributeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAOperation()
+ {
+ return aOperationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getAOperation_Parameters()
+ {
+ return (EReference)aOperationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getABasicClass()
+ {
+ return aBasicClassEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getABasicClass_Operations()
+ {
+ return (EReference)aBasicClassEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getABasicClass_Attributes()
+ {
+ return (EReference)aBasicClassEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getABasicClass_Name()
+ {
+ return (EAttribute)aBasicClassEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAParameter()
+ {
+ return aParameterEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAParameter_Name()
+ {
+ return (EAttribute)aParameterEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAParameter_Type()
+ {
+ return (EAttribute)aParameterEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAClassChild()
+ {
+ return aClassChildEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAClassChild_Name()
+ {
+ return (EAttribute)aClassChildEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAClassChild_Accessright()
+ {
+ return (EAttribute)aClassChildEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAClassChild_DataType()
+ {
+ return (EAttribute)aClassChildEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getAccessType()
+ {
+ return accessTypeEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getAccessTypeObject()
+ {
+ return accessTypeObjectEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AcoreFactory getAcoreFactory()
+ {
+ return (AcoreFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ aClassEClass = createEClass(ACLASS);
+ createEReference(aClassEClass, ACLASS__SUB_CLASSES);
+ createEReference(aClassEClass, ACLASS__IMPLEMENTED_INTERFACES);
+ createEReference(aClassEClass, ACLASS__ASSOCIATIONS);
+ createEReference(aClassEClass, ACLASS__COMPOSITIONS);
+ createEReference(aClassEClass, ACLASS__AGGREGATIONS);
+
+ aInterfaceEClass = createEClass(AINTERFACE);
+
+ aCoreRootEClass = createEClass(ACORE_ROOT);
+ createEAttribute(aCoreRootEClass, ACORE_ROOT__TITLE);
+ createEReference(aCoreRootEClass, ACORE_ROOT__CLASSES);
+ createEReference(aCoreRootEClass, ACORE_ROOT__INTERFACES);
+
+ aAttributeEClass = createEClass(AATTRIBUTE);
+
+ aOperationEClass = createEClass(AOPERATION);
+ createEReference(aOperationEClass, AOPERATION__PARAMETERS);
+
+ aBasicClassEClass = createEClass(ABASIC_CLASS);
+ createEReference(aBasicClassEClass, ABASIC_CLASS__OPERATIONS);
+ createEReference(aBasicClassEClass, ABASIC_CLASS__ATTRIBUTES);
+ createEAttribute(aBasicClassEClass, ABASIC_CLASS__NAME);
+
+ aParameterEClass = createEClass(APARAMETER);
+ createEAttribute(aParameterEClass, APARAMETER__NAME);
+ createEAttribute(aParameterEClass, APARAMETER__TYPE);
+
+ aClassChildEClass = createEClass(ACLASS_CHILD);
+ createEAttribute(aClassChildEClass, ACLASS_CHILD__NAME);
+ createEAttribute(aClassChildEClass, ACLASS_CHILD__ACCESSRIGHT);
+ createEAttribute(aClassChildEClass, ACLASS_CHILD__DATA_TYPE);
+
+ // Create enums
+ accessTypeEEnum = createEEnum(ACCESS_TYPE);
+
+ // Create data types
+ accessTypeObjectEDataType = createEDataType(ACCESS_TYPE_OBJECT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ aClassEClass.getESuperTypes().add(this.getABasicClass());
+ aInterfaceEClass.getESuperTypes().add(this.getABasicClass());
+ aAttributeEClass.getESuperTypes().add(this.getAClassChild());
+ aOperationEClass.getESuperTypes().add(this.getAClassChild());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(aClassEClass, AClass.class, "AClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAClass_SubClasses(), this.getAClass(), null, "subClasses", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAClass_ImplementedInterfaces(), this.getAInterface(), null, "implementedInterfaces", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAClass_Associations(), this.getAClass(), null, "associations", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAClass_Compositions(), this.getAClass(), null, "compositions", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAClass_Aggregations(), this.getAClass(), null, "aggregations", null, 0, -1, AClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aInterfaceEClass, AInterface.class, "AInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(aCoreRootEClass, ACoreRoot.class, "ACoreRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getACoreRoot_Title(), ecorePackage.getEString(), "title", null, 0, 1, ACoreRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getACoreRoot_Classes(), this.getAClass(), null, "classes", null, 0, -1, ACoreRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getACoreRoot_Interfaces(), this.getAInterface(), null, "interfaces", null, 0, -1, ACoreRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aAttributeEClass, AAttribute.class, "AAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(aOperationEClass, AOperation.class, "AOperation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAOperation_Parameters(), this.getAParameter(), null, "parameters", null, 0, -1, AOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aBasicClassEClass, ABasicClass.class, "ABasicClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getABasicClass_Operations(), this.getAOperation(), null, "operations", null, 0, -1, ABasicClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getABasicClass_Attributes(), this.getAAttribute(), null, "attributes", null, 0, -1, ABasicClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getABasicClass_Name(), ecorePackage.getEString(), "name", null, 0, 1, ABasicClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aParameterEClass, AParameter.class, "AParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAParameter_Name(), ecorePackage.getEString(), "name", null, 0, 1, AParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAParameter_Type(), ecorePackage.getEString(), "type", null, 0, 1, AParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(aClassChildEClass, AClassChild.class, "AClassChild", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAClassChild_Name(), ecorePackage.getEString(), "name", "", 0, 1, AClassChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAClassChild_Accessright(), this.getAccessType(), "accessright", "public", 0, 1, AClassChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAClassChild_DataType(), ecorePackage.getEString(), "dataType", null, 0, 1, AClassChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(accessTypeEEnum, AccessType.class, "AccessType");
+ addEEnumLiteral(accessTypeEEnum, AccessType.PUBLIC);
+ addEEnumLiteral(accessTypeEEnum, AccessType.PRIVATE);
+ addEEnumLiteral(accessTypeEEnum, AccessType.PROECTED);
+ addEEnumLiteral(accessTypeEEnum, AccessType.PACKAGE);
+
+ // Initialize data types
+ initEDataType(accessTypeObjectEDataType, AccessType.class, "AccessTypeObject", IS_SERIALIZABLE, IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations()
+ {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation
+ (accessTypeEEnum,
+ source,
+ new String[]
+ {
+ "name", "AccessType"
+ });
+ addAnnotation
+ (accessTypeObjectEDataType,
+ source,
+ new String[]
+ {
+ "name", "AccessType:Object",
+ "baseType", "AccessType"
+ });
+ }
+
+} //AcorePackageImpl
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreAdapterFactory.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreAdapterFactory.java
new file mode 100644
index 0000000000..4d51178bfe
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreAdapterFactory.java
@@ -0,0 +1,288 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.util;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.*;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage
+ * @generated
+ */
+public class AcoreAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static AcorePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AcoreAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = AcorePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AcoreSwitch<Adapter> modelSwitch =
+ new AcoreSwitch<Adapter>()
+ {
+ @Override
+ public Adapter caseAClass(AClass object)
+ {
+ return createAClassAdapter();
+ }
+ @Override
+ public Adapter caseAInterface(AInterface object)
+ {
+ return createAInterfaceAdapter();
+ }
+ @Override
+ public Adapter caseACoreRoot(ACoreRoot object)
+ {
+ return createACoreRootAdapter();
+ }
+ @Override
+ public Adapter caseAAttribute(AAttribute object)
+ {
+ return createAAttributeAdapter();
+ }
+ @Override
+ public Adapter caseAOperation(AOperation object)
+ {
+ return createAOperationAdapter();
+ }
+ @Override
+ public Adapter caseABasicClass(ABasicClass object)
+ {
+ return createABasicClassAdapter();
+ }
+ @Override
+ public Adapter caseAParameter(AParameter object)
+ {
+ return createAParameterAdapter();
+ }
+ @Override
+ public Adapter caseAClassChild(AClassChild object)
+ {
+ return createAClassChildAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object)
+ {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClass <em>AClass</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClass
+ * @generated
+ */
+ public Adapter createAClassAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AInterface <em>AInterface</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AInterface
+ * @generated
+ */
+ public Adapter createAInterfaceAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot <em>ACore Root</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ACoreRoot
+ * @generated
+ */
+ public Adapter createACoreRootAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AAttribute <em>AAttribute</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AAttribute
+ * @generated
+ */
+ public Adapter createAAttributeAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AOperation <em>AOperation</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AOperation
+ * @generated
+ */
+ public Adapter createAOperationAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass <em>ABasic Class</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.ABasicClass
+ * @generated
+ */
+ public Adapter createABasicClassAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AParameter <em>AParameter</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AParameter
+ * @generated
+ */
+ public Adapter createAParameterAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.dawn.examples.acore.AClassChild <em>AClass Child</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AClassChild
+ * @generated
+ */
+ public Adapter createAClassChildAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //AcoreAdapterFactory
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreSwitch.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreSwitch.java
new file mode 100644
index 0000000000..e263f403da
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/dawn/examples/acore/util/AcoreSwitch.java
@@ -0,0 +1,319 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ *
+ */
+package org.eclipse.emf.cdo.dawn.examples.acore.util;
+
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.examples.acore.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.dawn.examples.acore.AcorePackage
+ * @generated
+ */
+public class AcoreSwitch<T>
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Martin Fluegge - initial API and implementation\r\n";
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static AcorePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AcoreSwitch()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = AcorePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject)
+ {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject)
+ {
+ if (theEClass.eContainer() == modelPackage)
+ {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else
+ {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case AcorePackage.ACLASS:
+ {
+ AClass aClass = (AClass)theEObject;
+ T result = caseAClass(aClass);
+ if (result == null) result = caseABasicClass(aClass);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.AINTERFACE:
+ {
+ AInterface aInterface = (AInterface)theEObject;
+ T result = caseAInterface(aInterface);
+ if (result == null) result = caseABasicClass(aInterface);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.ACORE_ROOT:
+ {
+ ACoreRoot aCoreRoot = (ACoreRoot)theEObject;
+ T result = caseACoreRoot(aCoreRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.AATTRIBUTE:
+ {
+ AAttribute aAttribute = (AAttribute)theEObject;
+ T result = caseAAttribute(aAttribute);
+ if (result == null) result = caseAClassChild(aAttribute);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.AOPERATION:
+ {
+ AOperation aOperation = (AOperation)theEObject;
+ T result = caseAOperation(aOperation);
+ if (result == null) result = caseAClassChild(aOperation);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.ABASIC_CLASS:
+ {
+ ABasicClass aBasicClass = (ABasicClass)theEObject;
+ T result = caseABasicClass(aBasicClass);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.APARAMETER:
+ {
+ AParameter aParameter = (AParameter)theEObject;
+ T result = caseAParameter(aParameter);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case AcorePackage.ACLASS_CHILD:
+ {
+ AClassChild aClassChild = (AClassChild)theEObject;
+ T result = caseAClassChild(aClassChild);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AClass</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AClass</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAClass(AClass object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AInterface</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AInterface</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAInterface(AInterface object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>ACore Root</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>ACore Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseACoreRoot(ACoreRoot object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AAttribute</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AAttribute</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAAttribute(AAttribute object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AOperation</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AOperation</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAOperation(AOperation object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>ABasic Class</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>ABasic Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseABasicClass(ABasicClass object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AParameter</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AParameter</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAParameter(AParameter object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AClass Child</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AClass Child</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAClassChild(AClassChild object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //AcoreSwitch
diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/internal/dawn/examples/acore/bundle/Activator.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/internal/dawn/examples/acore/bundle/Activator.java
new file mode 100644
index 0000000000..5d420525b6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore/src/org/eclipse/emf/cdo/internal/dawn/examples/acore/bundle/Activator.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany).
+ * 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 Fluegge - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.cdo.internal.dawn.examples.acore.bundle;
+
+import org.eclipse.core.runtime.Plugin;
+
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin
+{
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.emf.cdo.dawn.reference.editor";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator()
+ {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception
+ {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception
+ {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault()
+ {
+ return plugin;
+ }
+
+}

Back to the top