Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Goubet2013-03-11 09:35:26 -0400
committerLaurent Goubet2013-03-11 09:35:26 -0400
commitb16dbfeee9e3536364b330376114929c0a845108 (patch)
treeb616f6bf29986da463d3ca5335b3359f55d4fe09
parent76b776ffab77c332a2acb21831ccaf42fecb4a57 (diff)
parent7a2a815d196be073960b6160b7c6b1b8c5f4669e (diff)
downloadorg.eclipse.emf.compare-logical_experimentation.tar.gz
org.eclipse.emf.compare-logical_experimentation.tar.xz
org.eclipse.emf.compare-logical_experimentation.zip
Merge branch 'master' into logical_experimentationlogical_experimentation
-rw-r--r--org.eclipse.emf.compare-parent/pom.xml61
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/juno-4.2-sdk.target4
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava12-sdk.target41
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava13-sdk.target41
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava14-sdk.target41
-rw-r--r--org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-sdk.target38
-rw-r--r--packaging/org.eclipse.emf.compare-feature/sourceTemplateFeature/feature.properties (renamed from plugins/org.eclipse.emf.compare.diagram.ide.papyrus/plugin.properties)23
-rw-r--r--packaging/org.eclipse.emf.compare.diagram.ecoretools-feature/feature.xml77
-rw-r--r--packaging/org.eclipse.emf.compare.diagram.gmf-feature/feature.xml9
-rw-r--r--packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml89
-rw-r--r--packaging/org.eclipse.emf.compare.ide.ui-feature/feature.xml2
-rw-r--r--packaging/org.eclipse.emf.compare.ide.ui-feature/sourceTemplateFeature/feature.properties (renamed from plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/plugin.properties)23
-rw-r--r--packaging/org.eclipse.emf.compare.rcp.ui-feature/feature.xml2
-rw-r--r--packaging/org.eclipse.emf.compare.rcp.ui-feature/sourceTemplateFeature/feature.properties (renamed from plugins/org.eclipse.emf.compare.diagram.ide/plugin.properties)23
-rw-r--r--packaging/org.eclipse.emf.compare.uml2-feature/feature.xml2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/AbstractTest.java4
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/edgechanges/EdgechangesTest.java5
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/hide/HideTest.java2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java8
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/nodechanges/NodechangesTest.java5
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/show/ShowTest.java2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/suite/AllTests.java4
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/build.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/icons/full/obj16/LabelChange.gifbin129 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/plugin.xml4
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/DiagramDiffItemProvider.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramDiffItemProvider.java)24
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/EdgeChangeItemProvider.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/EdgeChangeItemProvider.java)16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ExtensionsEditPlugin.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramEditPlugin.java)12
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ExtensionsItemProviderAdapterFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramCompareItemProviderAdapterFactory.java)50
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/HideItemProvider.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/HideItemProvider.java)16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/NodeChangeItemProvider.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/NodeChangeItemProvider.java)16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ShowItemProvider.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/ShowItemProvider.java)16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/LabelChangeItemProvider.java200
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/ExtensionsItemProviderAdapterFactorySpec.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/DiagramCompareAdapterFactorySpec.java)17
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/ForwardingDiagramDiffItemProvider.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/ForwardingDiagramDiffItemProvider.java)9
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/LabelChangeItemProviderSpec.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/LabelChangeItemProviderSpec.java)6
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/NodeChangeItemProviderSpec.java (renamed from plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/NodeChangeItemProviderSpec.java)8
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/nodechanges/NodechangesTest.java17
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/suite/AllTests.java4
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.checkstyle13
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.classpath7
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.project40
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.jdt.core.prefs375
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.jdt.ui.prefs61
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.pde.api.tools.prefs178
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/about.html106
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/build.properties17
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/plugin.xml13
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/pom.xml24
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ecoretools/EcoreToolsIDECompare.java53
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ecoretools/EcoreToolsViewLabelProvider.java38
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.classpath7
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.project28
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/META-INF/MANIFEST.MF26
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/about.html106
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/build.properties8
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/plugin.xml51
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/pom.xml24
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/AbstractUMLViewLabelProvider.java150
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/Activator.java49
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ActivityViewLabelProvider.java81
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ClazzViewLabelProvider.java83
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/CommunicationViewLabelProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ComponentViewLabelProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/CompositeViewLabelProvider.java105
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/DeploymentViewLabelProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/PackageViewLabelProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ProfileViewLabelProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/SequenceViewLabelProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/StateMachineViewLabelProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/UseCaseViewLabelProvider.java37
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/about.ini14
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/about.properties26
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/build.properties21
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/DiagramContentMergeViewerCreator.java (renamed from plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/DiagramContentMergeViewerCreator.java)2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/EcoreToolsIDEUICompare.java (renamed from plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/EcoreToolsIDEUICompare.java)2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/about.ini14
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/about.properties26
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/build.properties12
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiContentDescriptor.java (renamed from plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/DiContentDescriptor.java)2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiagramContentMergeViewerCreator.java (renamed from plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/DiagramContentMergeViewerCreator.java)2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/PapyrusIDEUICompare.java (renamed from plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/PapyrusIDEUICompare.java)2
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/META-INF/MANIFEST.MF20
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/build.properties21
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml29
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/AbstractEditPartMergeViewer.java80
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/AbstractGraphicalMergeViewer.java90
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/GMFCompareUIPlugin.java120
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/AbstractDifferenceDecorator.java227
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DeleteGhostImageFigure.java44
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffDecorationEditPolicy.java33
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffEdgeDecorator.java154
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffLabelDecorator.java149
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffNodeDecorator.java158
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/provider/DiffDecoratorProvider.java188
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/provider/SelectedDiffAdapter.java72
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/AbstractGraphicalMergeViewer.java88
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/CompareDiagramIDEUIPlugin.java103
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/EMFCompareDiagramIDEUIMessages.java (renamed from plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/EMFCompareDiagramIDEUIMessages.java)4
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEDiffAccessorImpl.java7
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEMatchAccessorImpl.java111
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramDiffAccessor.java22
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramNodeAccessor.java59
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEDiffAccessorFactory.java31
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEMatchAccessorFactory.java27
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/DiagramCompareContentMergeViewer.java634
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.java2278
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramMergeViewer.java439
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/diagram_ide_ui_messages.properties (renamed from plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/diagram_ide_ui_messages.properties)4
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/preferences/DiagramComparePreferencesPage.java16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/mergeviewer/EditingDomainUtils.java199
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/structuremergeviewer/filters/GMFRefinedElementsFilter.java74
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/.classpath7
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/.project34
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/.settings/org.eclipse.pde.api.tools.prefs97
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/about.html106
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/build.properties11
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/plugin.xml14
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/pom.xml24
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/schema/viewLabelProvider.exsd109
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/GMFCompareIDEPlugin.java90
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/DiagramDiffIDEExtensionPostProcessor.java187
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/AbstractDiffExtensionFactory.java301
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/DiffExtensionFactoryRegistry.java53
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/IDiffExtensionFactory.java72
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/provider/internal/ViewLabelProviderIDEExtensionDescriptor.java83
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/provider/internal/ViewLabelProviderRegistryListener.java111
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/about.ini14
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/about.properties26
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/build.properties12
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/model/diagramCompare.ecore (renamed from plugins/org.eclipse.emf.compare.diagram/model/diagramdiff.ecore)7
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/model/diagramCompare.genmodel20
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/model/diagramdiff.genmodel25
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/plugin.xml20
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/LabelChange.java111
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/DiagramDiffImpl.java249
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/LabelChangeImpl.java298
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/DiagramDiff.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/DiagramDiff.java)31
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/EdgeChange.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/EdgeChange.java)6
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/ExtensionsFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/DiagramCompareFactory.java)23
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/ExtensionsPackage.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/DiagramComparePackage.java)339
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/Hide.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/Hide.java)6
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/NodeChange.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/NodeChange.java)6
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/Show.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/Show.java)6
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/impl/DiagramDiffImpl.java228
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/impl/EdgeChangeImpl.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/EdgeChangeImpl.java)10
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/impl/ExtensionsFactoryImpl.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/DiagramCompareFactoryImpl.java)49
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/impl/ExtensionsPackageImpl.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/DiagramComparePackageImpl.java)162
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/impl/HideImpl.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/HideImpl.java)10
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/impl/NodeChangeImpl.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/NodeChangeImpl.java)10
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/impl/ShowImpl.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/impl/ShowImpl.java)10
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/util/ExtensionsAdapterFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/util/DiagramCompareAdapterFactory.java)60
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/util/ExtensionsSwitch.java (renamed from plugins/org.eclipse.emf.compare.diagram/src-gen/org/eclipse/emf/compare/diagram/util/DiagramCompareSwitch.java)89
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/internal/extension/DiffExtensionFactoryRegistry.java64
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/util/GMFLabelUtil.java406
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/CompareDiagramConfiguration.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/DiagramComparisonConfiguration.java)4
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/CompareDiagramConstants.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/util/DiagramCompareConstants.java)6
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/CompareDiagramPlugin.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/DiagramDiffEnginePlugin.java)10
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/CompareDiagramPostProcessor.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/DiagramDiffExtensionPostProcessor.java)39
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/CompareDiagramUIMessages.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/util/DiagramCompareUIMessages.java)8
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/diagramcompareuimessages.properties (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/util/diagramcompareuimessages.properties)0
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/factories/AbstractDiagramExtensionFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/internal/extension/AbstractDiffExtensionFactory.java)12
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/factories/DiagramExtensionFactoryRegistry.java64
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/factories/IDiagramExtensionFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/internal/extension/IDiffExtensionFactory.java)6
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/factories/extensions/EdgeChangeFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/internal/extension/factories/EdgeChangeFactory.java)30
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/factories/extensions/HideFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/internal/extension/factories/HideFactory.java)18
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/factories/extensions/NodeChangeFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/internal/extension/factories/NodeChangeFactory.java)34
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/factories/extensions/ShowFactory.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/diff/internal/extension/factories/ShowFactory.java)16
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/internal/merge/CompareDiagramMerger.java (renamed from plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/merge/DiagramDiffMerger.java)6
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/provider/AbstractLabelProvider.java64
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/provider/IViewLabelProvider.java49
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/provider/ViewLabelProviderExtensionDescriptor.java72
-rw-r--r--plugins/org.eclipse.emf.compare.diagram/src/org/eclipse/emf/compare/diagram/provider/ViewLabelProviderExtensionRegistry.java93
-rw-r--r--plugins/org.eclipse.emf.compare.edit/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.emf.compare.edit/icons/full/ovr16/confinoutchg_ov.pngbin0 -> 311 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.edit/icons/full/ovr16/inadd_ov.gifbin194 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.edit/icons/full/ovr16/inchg_ov.gifbin191 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.edit/icons/full/ovr16/indel_ov.gifbin190 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.edit/icons/full/ovr16/inoutchg_ov.gifbin299 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.edit/icons/full/ovr16/outadd_ov.gifbin190 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.edit/icons/full/ovr16/outchg_ov.gifbin194 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.edit/icons/full/ovr16/outdel_ov.gifbin188 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.edit/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.edit/plugin.xml61
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/IItemDescriptionProvider.java30
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/IItemStyledLabelProvider.java15
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/AttributeChangeItemProviderSpec.java398
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/CompareItemProviderAdapterFactorySpec.java9
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/ComparisonItemProviderSpec.java34
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/ConflictItemProviderSpec.java162
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/MatchItemProviderSpec.java148
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/MatchResourceItemProviderSpec.java26
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/OverlayImageProvider.java227
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/ReferenceChangeItemProviderSpec.java117
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/ResourceAttachmentChangeItemProviderSpec.java67
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/about.ini14
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/about.properties26
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/build.properties10
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/plugin.xml8
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/EMFCompareIDEUIPlugin.java8
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java32
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/util/DynamicObject.java4
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java13
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerContentProvider.java344
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerLabelProvider.java36
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/provider/MatchNode.java138
-rw-r--r--plugins/org.eclipse.emf.compare.ide/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.emf.compare.ide/plugin.xml8
-rw-r--r--plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/ForwardingXMLHandler.java4
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/META-INF/MANIFEST.MF9
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/about.ini14
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/about.properties26
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/build.properties10
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/plugin.xml33
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/EMFCompareRCPUIPlugin.java8
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/util/AbstractRegistryEventListener.java4
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/mergeviewer/CompareColorImpl.java560
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/mergeviewer/MergeViewerInfoViewer.java2
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/mergeviewer/TableMergeViewer.java3
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/actions/FilterAction.java3
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/actions/FilterActionMenu.java2
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/actions/GroupActionMenu.java2
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/AbstractDifferenceFilter.java (renamed from plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/AddedElementsFilter.java)65
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/ChangedElementsFilter.java114
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/EmptyMatchedResourcesFilter.java123
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/IDifferenceFilter.java17
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/IdenticalElementsFilter.java62
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/MovedElementsFilter.java115
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/PseudoConflictsFilter.java71
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/PseudoDeleteConflictsFilter.java83
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/RemovedElementsFilter.java115
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/StructureMergeViewerFilter.java34
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/filters/SubDiffElementsFilter.java64
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/groups/DefaultDifferenceGroup.java31
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/groups/DefaultGroupProvider.java2
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/groups/DifferenceGroup.java10
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/groups/KindGroupProvider.java8
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/groups/MetamodelGroupProvider.java159
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/structuremergeviewer/groups/ThreeWayComparisonGroupProvider.java10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java248
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestMatchItemProviderSpec.java290
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java590
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/data/TestPostProcessor.java11
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.edit/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.edit/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.ide.ui/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.ide.ui/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.ide.ui/plugin.xml8
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.ide.ui/src/org/eclipse/emf/compare/uml2/ide/ui/structuremergeviewer/filters/UMLRefinedElementsFilter.java97
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.ide/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.ide/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/about.ini14
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/about.properties26
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/build.properties10
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/diff/UMLDiffExtensionPostProcessor.java9
-rw-r--r--plugins/org.eclipse.emf.compare/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.emf.compare/about.mappings6
-rw-r--r--plugins/org.eclipse.emf.compare/about.properties1
-rw-r--r--plugins/org.eclipse.emf.compare/build.properties2
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/EMFCompare.java4
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/extension/IPostProcessor.java17
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/MatchSpec.java2
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/match/DefaultEqualityHelperFactory.java4
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/match/eobject/ByTypeIndex.java4
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/match/eobject/EditionDistance.java4
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/match/eobject/URIDistance.java6
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/utils/EqualityHelper.java7
297 files changed, 6517 insertions, 11348 deletions
diff --git a/org.eclipse.emf.compare-parent/pom.xml b/org.eclipse.emf.compare-parent/pom.xml
index ddf39ee1f..0e12c653d 100644
--- a/org.eclipse.emf.compare-parent/pom.xml
+++ b/org.eclipse.emf.compare-parent/pom.xml
@@ -11,36 +11,42 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
+ <prerequisites>
+ <maven>3.0</maven>
+ </prerequisites>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>emf.compare-parent</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
+ <groupId>org.eclipse.emf.compare</groupId>
+ <artifactId>emf.compare-parent</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
- <licenses>
- <license>
- <name>Eclipse Public License v1.0</name>
- <comments>
- All rights reserved.
+ <licenses>
+ <license>
+ <name>Eclipse Public License v1.0</name>
+ <comments>
+ 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.htm
- </comments>
- </license>
- </licenses>
-
- <properties>
- <tycho-version>0.16.0</tycho-version>
- <tycho-extras-version>0.16.0</tycho-extras-version>
- </properties>
+ 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.htm
+ </comments>
+ </license>
+ </licenses>
+ <properties>
+ <tycho-version>0.17.0-SNAPSHOT</tycho-version>
+ <tycho-extras-version>0.17.0-SNAPSHOT</tycho-extras-version>
+ </properties>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>tycho-snapshots</id>
+ <url>https://oss.sonatype.org/content/groups/public/</url>
+ </pluginRepository>
+ </pluginRepositories>
<modules>
<!-- Update Site -->
@@ -86,19 +92,16 @@
<module>../packaging/org.eclipse.emf.compare.diagram.gmf-feature</module>
<module>../plugins/org.eclipse.emf.compare.diagram</module>
<module>../plugins/org.eclipse.emf.compare.diagram.edit</module>
- <module>../plugins/org.eclipse.emf.compare.diagram.ide</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui</module>
<!-- Ecore Tools -->
<module>../packaging/org.eclipse.emf.compare.diagram.ecoretools-feature</module>
- <module>../plugins/org.eclipse.emf.compare.diagram.ide.ecoretools</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ecoretools.tests</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests</module>
<!-- Papyrus -->
<module>../packaging/org.eclipse.emf.compare.diagram.papyrus-feature</module>
- <module>../plugins/org.eclipse.emf.compare.diagram.ide.papyrus</module>
<module>../plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus</module>
</modules>
@@ -280,7 +283,7 @@
<groupId>org.eclipse.emf.compare</groupId>
<artifactId>emf.compare-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
- <classifier>targetPlatforms/kepler-m4-sdk</classifier>
+ <classifier>targetPlatforms/kepler-m5-sdk</classifier>
</artifact>
</target>
</configuration>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/juno-4.2-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/juno-4.2-sdk.target
index d0a53a314..259b51076 100644
--- a/org.eclipse.emf.compare-parent/targetPlatforms/juno-4.2-sdk.target
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/juno-4.2-sdk.target
@@ -4,8 +4,8 @@
<target name="EMF Compare based on Juno with 4.2 Platform" sequenceNumber="57">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="com.google.guava" version="10.0.1.v201203051515"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20120526062928/repository/"/>
+<unit id="com.google.guava" version="11.0.2.v201303041551"/>
+<repository location="http://build.eclipse.org/orbit/committers/orbit-I/20130305082625/I20130305082625/repository/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M5"/>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava12-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava12-sdk.target
new file mode 100644
index 000000000..38d3a8dd0
--- /dev/null
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava12-sdk.target
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.8"?><target name="EMF Compare based on Kepler SDK" sequenceNumber="0">
+<locations>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.emf.sdk.feature.group" version="2.9.0.v20130204-1146"/>
+<unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="1.2.0.201301291331"/>
+<unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="1.7.0.201212181759"/>
+<unit id="org.eclipse.gmf.feature.group" version="1.7.0.201212181845"/>
+<unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.7.0.201212181845"/>
+<unit id="org.eclipse.uml2.sdk.feature.group" version="4.1.0.v20130204-1402"/>
+<unit id="org.eclipse.jdt.feature.group" version="3.9.0.v20121210-132935-8-8uFyYFNOfwKNWSo-XLNBDV3834"/>
+<unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.10.0.v201302061523"/>
+<unit id="org.eclipse.xtext.sdk.feature.group" version="2.4.0.v201302051002"/>
+<repository location="http://download.eclipse.org/releases/kepler"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.egit.feature.group" version="2.3.1.201302201838-r"/>
+<repository location="http://download.eclipse.org/egit/updates"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.apache.commons.logging" version="1.1.1.v201101211721"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20120526062928/repository/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="com.google.guava" version="12.0.1"/>
+<repository location="http://mbarbero.github.com/guava-p2/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.emf.emfstore.modelmutator.feature.feature.group" version="0.9.3.M5"/>
+<unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M5"/>
+<repository location="http://download.eclipse.org/emf-store/milestones/archive/0.9.3.M5"/>
+</location>
+</locations>
+</target>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava13-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava13-sdk.target
new file mode 100644
index 000000000..d617dc471
--- /dev/null
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava13-sdk.target
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.8"?><target name="EMF Compare based on Kepler SDK" sequenceNumber="0">
+<locations>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.emf.sdk.feature.group" version="2.9.0.v20130204-1146"/>
+<unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="1.2.0.201301291331"/>
+<unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="1.7.0.201212181759"/>
+<unit id="org.eclipse.gmf.feature.group" version="1.7.0.201212181845"/>
+<unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.7.0.201212181845"/>
+<unit id="org.eclipse.uml2.sdk.feature.group" version="4.1.0.v20130204-1402"/>
+<unit id="org.eclipse.jdt.feature.group" version="3.9.0.v20121210-132935-8-8uFyYFNOfwKNWSo-XLNBDV3834"/>
+<unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.10.0.v201302061523"/>
+<unit id="org.eclipse.xtext.sdk.feature.group" version="2.4.0.v201302051002"/>
+<repository location="http://download.eclipse.org/releases/kepler"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.egit.feature.group" version="2.3.1.201302201838-r"/>
+<repository location="http://download.eclipse.org/egit/updates"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.apache.commons.logging" version="1.1.1.v201101211721"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20120526062928/repository/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="com.google.guava" version="13.0.1"/>
+<repository location="http://mbarbero.github.com/guava-p2/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.emf.emfstore.modelmutator.feature.feature.group" version="0.9.3.M5"/>
+<unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M5"/>
+<repository location="http://download.eclipse.org/emf-store/milestones/archive/0.9.3.M5"/>
+</location>
+</locations>
+</target>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava14-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava14-sdk.target
new file mode 100644
index 000000000..4e05d818d
--- /dev/null
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-guava14-sdk.target
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.8"?><target name="EMF Compare based on Kepler SDK" sequenceNumber="0">
+<locations>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.emf.sdk.feature.group" version="2.9.0.v20130204-1146"/>
+<unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="1.2.0.201301291331"/>
+<unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="1.7.0.201212181759"/>
+<unit id="org.eclipse.gmf.feature.group" version="1.7.0.201212181845"/>
+<unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.7.0.201212181845"/>
+<unit id="org.eclipse.uml2.sdk.feature.group" version="4.1.0.v20130204-1402"/>
+<unit id="org.eclipse.jdt.feature.group" version="3.9.0.v20121210-132935-8-8uFyYFNOfwKNWSo-XLNBDV3834"/>
+<unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.10.0.v201302061523"/>
+<unit id="org.eclipse.xtext.sdk.feature.group" version="2.4.0.v201302051002"/>
+<repository location="http://download.eclipse.org/releases/kepler"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.egit.feature.group" version="2.3.1.201302201838-r"/>
+<repository location="http://download.eclipse.org/egit/updates"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.apache.commons.logging" version="1.1.1.v201101211721"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20120526062928/repository/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="com.google.guava" version="14.0.0"/>
+<repository location="http://mbarbero.github.com/guava-p2/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.emf.emfstore.modelmutator.feature.feature.group" version="0.9.3.M5"/>
+<unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M5"/>
+<repository location="http://download.eclipse.org/emf-store/milestones/archive/0.9.3.M5"/>
+</location>
+</locations>
+</target>
diff --git a/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-sdk.target b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-sdk.target
new file mode 100644
index 000000000..613b97453
--- /dev/null
+++ b/org.eclipse.emf.compare-parent/targetPlatforms/kepler-m5-sdk.target
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.8"?><target name="EMF Compare based on Kepler SDK" sequenceNumber="0">
+<locations>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.emf.sdk.feature.group" version="2.9.0.v20130204-1146"/>
+<unit id="org.eclipse.emf.ecoretools.sdk.feature.group" version="1.2.0.201301291331"/>
+<unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="1.7.0.201212181759"/>
+<unit id="org.eclipse.gmf.feature.group" version="1.7.0.201212181845"/>
+<unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.7.0.201212181845"/>
+<unit id="org.eclipse.uml2.sdk.feature.group" version="4.1.0.v20130204-1402"/>
+<unit id="org.eclipse.jdt.feature.group" version="3.9.0.v20121210-132935-8-8uFyYFNOfwKNWSo-XLNBDV3834"/>
+<unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.10.0.v201302061523"/>
+<unit id="org.eclipse.xtext.sdk.feature.group" version="2.4.0.v201302051002"/>
+<repository location="http://download.eclipse.org/releases/kepler"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.egit.feature.group" version="2.3.1.201302201838-r"/>
+<repository location="http://download.eclipse.org/egit/updates"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="com.google.guava" version="11.0.2.v201303041551"/>
+<unit id="org.apache.commons.logging" version="1.1.1.v201101211721"/>
+<repository location="http://build.eclipse.org/orbit/committers/orbit-I/20130305082625/I20130305082625/repository/"/>
+</location>
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.emf.emfstore.modelmutator.feature.feature.group" version="0.9.3.M5"/>
+<unit id="org.eclipse.emf.emfstore.fuzzy.feature.feature.group" version="0.9.3.M5"/>
+<repository location="http://download.eclipse.org/emf-store/milestones/archive/0.9.3.M5"/>
+</location>
+</locations>
+</target>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/plugin.properties b/packaging/org.eclipse.emf.compare-feature/sourceTemplateFeature/feature.properties
index 94d9e829d..748aa96d5 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/plugin.properties
+++ b/packaging/org.eclipse.emf.compare-feature/sourceTemplateFeature/feature.properties
@@ -1,12 +1,11 @@
-################################################################################
-# Copyright (c) 2006, 2012 Obeo.
-# 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:
-# Obeo - initial API and implementation
-################################################################################
-pluginName = EMF Compare Papyrus Support IDE Integration
-providerName = Eclipse Modeling Project
+################################################################################
+# Copyright (c) 2006, 2012 Obeo.
+# 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:
+# Obeo - initial API and implementation
+################################################################################
+featureName = EMF Compare Core SDK
diff --git a/packaging/org.eclipse.emf.compare.diagram.ecoretools-feature/feature.xml b/packaging/org.eclipse.emf.compare.diagram.ecoretools-feature/feature.xml
index d77bb75d1..c32833e3c 100644
--- a/packaging/org.eclipse.emf.compare.diagram.ecoretools-feature/feature.xml
+++ b/packaging/org.eclipse.emf.compare.diagram.ecoretools-feature/feature.xml
@@ -1,42 +1,35 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.emf.compare.diagram.ecoretools"
- label="%featureName"
- version="2.1.0.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.emf.compare">
-
- <description>
- %description
- </description>
-
- <copyright url="%copyrightURL">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import feature="org.eclipse.emf.compare" version="2.1.0.qualifier"/>
- <import feature="org.eclipse.emf.compare.ide.ui" version="2.1.0.qualifier"/>
- <import feature="org.eclipse.emf.ecoretools" version="1.0.0"/>
- <import feature="org.eclipse.emf.compare.diagram.gmf" version="2.1.0.qualifier"/>
- </requires>
-
- <plugin
- id="org.eclipse.emf.compare.diagram.ide.ecoretools"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.compare.diagram.ide.ui.ecoretools"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.emf.compare.diagram.ecoretools"
+ label="%featureName"
+ version="2.1.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.emf.compare.diagram.ide.ui.ecoretools">
+
+ <description>
+ %description
+ </description>
+
+ <copyright url="%copyrightURL">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import feature="org.eclipse.emf.compare" version="2.1.0.qualifier"/>
+ <import feature="org.eclipse.emf.compare.ide.ui" version="2.1.0.qualifier"/>
+ <import feature="org.eclipse.emf.ecoretools" version="1.0.0"/>
+ <import feature="org.eclipse.emf.compare.diagram.gmf" version="2.1.0.qualifier"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.emf.compare.diagram.ide.ui.ecoretools"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/packaging/org.eclipse.emf.compare.diagram.gmf-feature/feature.xml b/packaging/org.eclipse.emf.compare.diagram.gmf-feature/feature.xml
index 5f45a8dcf..626d97116 100644
--- a/packaging/org.eclipse.emf.compare.diagram.gmf-feature/feature.xml
+++ b/packaging/org.eclipse.emf.compare.diagram.gmf-feature/feature.xml
@@ -4,7 +4,7 @@
label="%featureName"
version="2.1.0.qualifier"
provider-name="%providerName"
- plugin="org.eclipse.emf.compare">
+ plugin="org.eclipse.emf.compare.diagram">
<description>
%description
@@ -39,13 +39,6 @@
unpack="false"/>
<plugin
- id="org.eclipse.emf.compare.diagram.ide"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.emf.compare.diagram.ide.ui"
download-size="0"
install-size="0"
diff --git a/packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml b/packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml
index 39a657420..1c7b6055b 100644
--- a/packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml
+++ b/packaging/org.eclipse.emf.compare.diagram.papyrus-feature/feature.xml
@@ -1,48 +1,41 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.emf.compare.diagram.papyrus"
- label="%featureName"
- version="2.1.0.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.emf.compare">
-
- <description>
- %description
- </description>
-
- <copyright url="%copyrightURL">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import feature="org.eclipse.emf.compare" version="2.1.0.qualifier"/>
- <import feature="org.eclipse.emf.compare.diagram.gmf" version="2.1.0.qualifier"/>
- <import feature="org.eclipse.emf.compare.ide.ui" version="2.1.0.qualifier"/>
- <import feature="org.eclipse.emf.compare.uml2" version="2.1.0.qualifier"/>
- <import feature="org.eclipse.papyrus.infra.core.feature" version="0.9.1.v201209190809"/>
- <import feature="org.eclipse.papyrus.infra.emf.feature" version="0.9.1.v201209190809"/>
- <import feature="org.eclipse.papyrus.infra.gmfdiag.feature" version="0.9.1.v201209190809"/>
- <import feature="org.eclipse.papyrus.uml.diagram.feature" version="0.9.1.v201209190809"/>
- <import feature="org.eclipse.papyrus.uml.tools.feature" version="0.9.1.v201209190809"/>
- <import plugin="org.eclipse.gmf.runtime.diagram.ui" version="1.6.0" match="greaterOrEqual"/>
- </requires>
-
- <plugin
- id="org.eclipse.emf.compare.diagram.ide.papyrus"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.compare.diagram.ide.ui.papyrus"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.emf.compare.diagram.papyrus"
+ label="%featureName"
+ version="2.1.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.emf.compare.diagram.ide.ui.papyrus">
+
+ <description>
+ %description
+ </description>
+
+ <copyright url="%copyrightURL">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import feature="org.eclipse.emf.compare" version="2.1.0.qualifier"/>
+ <import feature="org.eclipse.emf.compare.diagram.gmf" version="2.1.0.qualifier"/>
+ <import feature="org.eclipse.emf.compare.ide.ui" version="2.1.0.qualifier"/>
+ <import feature="org.eclipse.emf.compare.uml2" version="2.1.0.qualifier"/>
+ <import feature="org.eclipse.papyrus.infra.core.feature" version="0.9.1.v201209190809"/>
+ <import feature="org.eclipse.papyrus.infra.emf.feature" version="0.9.1.v201209190809"/>
+ <import feature="org.eclipse.papyrus.infra.gmfdiag.feature" version="0.9.1.v201209190809"/>
+ <import feature="org.eclipse.papyrus.uml.diagram.feature" version="0.9.1.v201209190809"/>
+ <import feature="org.eclipse.papyrus.uml.tools.feature" version="0.9.1.v201209190809"/>
+ <import plugin="org.eclipse.gmf.runtime.diagram.ui" version="1.6.0" match="greaterOrEqual"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.emf.compare.diagram.ide.ui.papyrus"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/packaging/org.eclipse.emf.compare.ide.ui-feature/feature.xml b/packaging/org.eclipse.emf.compare.ide.ui-feature/feature.xml
index e1a31484d..00f2c9111 100644
--- a/packaging/org.eclipse.emf.compare.ide.ui-feature/feature.xml
+++ b/packaging/org.eclipse.emf.compare.ide.ui-feature/feature.xml
@@ -4,7 +4,7 @@
label="%featureName"
version="2.1.0.qualifier"
provider-name="%providerName"
- plugin="org.eclipse.emf.compare">
+ plugin="org.eclipse.emf.compare.ide.ui">
<description>
%description
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/plugin.properties b/packaging/org.eclipse.emf.compare.ide.ui-feature/sourceTemplateFeature/feature.properties
index 03dfa5121..8ee51637e 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/plugin.properties
+++ b/packaging/org.eclipse.emf.compare.ide.ui-feature/sourceTemplateFeature/feature.properties
@@ -1,12 +1,11 @@
-################################################################################
-# Copyright (c) 2006, 2012 Obeo.
-# 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:
-# Obeo - initial API and implementation
-################################################################################
-pluginName = EMF Compare EcoreTools Support IDE Integration
-providerName = Eclipse Modeling Project
+################################################################################
+# Copyright (c) 2006, 2012 Obeo.
+# 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:
+# Obeo - initial API and implementation
+################################################################################
+featureName = EMF Compare IDE UI SDK
diff --git a/packaging/org.eclipse.emf.compare.rcp.ui-feature/feature.xml b/packaging/org.eclipse.emf.compare.rcp.ui-feature/feature.xml
index 538f37f33..876aa8cb4 100644
--- a/packaging/org.eclipse.emf.compare.rcp.ui-feature/feature.xml
+++ b/packaging/org.eclipse.emf.compare.rcp.ui-feature/feature.xml
@@ -4,7 +4,7 @@
label="%featureName"
version="2.1.0.qualifier"
provider-name="%providerName"
- plugin="org.eclipse.emf.compare">
+ plugin="org.eclipse.emf.compare.rcp.ui">
<description>
%description
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/plugin.properties b/packaging/org.eclipse.emf.compare.rcp.ui-feature/sourceTemplateFeature/feature.properties
index c90cf0c78..a2c0ca9ab 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide/plugin.properties
+++ b/packaging/org.eclipse.emf.compare.rcp.ui-feature/sourceTemplateFeature/feature.properties
@@ -1,12 +1,11 @@
-################################################################################
-# Copyright (c) 2006, 2012 Obeo.
-# 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:
-# Obeo - initial API and implementation
-################################################################################
-pluginName = EMF Compare Diagram Comparison Support IDE Integration
-providerName = Eclipse Modeling Project
+################################################################################
+# Copyright (c) 2006, 2012 Obeo.
+# 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:
+# Obeo - initial API and implementation
+################################################################################
+featureName = EMF Compare RCP UI SDK
diff --git a/packaging/org.eclipse.emf.compare.uml2-feature/feature.xml b/packaging/org.eclipse.emf.compare.uml2-feature/feature.xml
index 9b418b71a..f60e3c7f6 100644
--- a/packaging/org.eclipse.emf.compare.uml2-feature/feature.xml
+++ b/packaging/org.eclipse.emf.compare.uml2-feature/feature.xml
@@ -4,7 +4,7 @@
label="%featureName"
version="2.1.0.qualifier"
provider-name="%providerName"
- plugin="org.eclipse.emf.compare">
+ plugin="org.eclipse.emf.compare.uml2">
<description>
%description
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF
index 3b581f853..796a8c8b9 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/META-INF/MANIFEST.MF
@@ -12,11 +12,10 @@ Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.5.0",
org.eclipse.emf.compare,
org.eclipse.gmf.runtime.emf.core;bundle-version="1.2.2",
org.eclipse.gmf.runtime.notation;bundle-version="1.2.0",
- org.eclipse.emf.compare.diagram.ide.ecoretools;bundle-version="2.0.0",
org.eclipse.ui;bundle-version="3.5.0",
org.eclipse.emf.compare.uml2;bundle-version="2.1.0"
-Import-Package: com.google.common.base;version="[10.0.1,11.0.0)",
- com.google.common.collect;version="[10.0.1,11.0.0)"
+Import-Package: com.google.common.base;version="[11.0.0,15.0.0)",
+ com.google.common.collect;version="[11.0.0,15.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/AbstractTest.java b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/AbstractTest.java
index 7dd6cc3c0..19f778dde 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/AbstractTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/AbstractTest.java
@@ -5,7 +5,7 @@ import java.util.List;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.EMFCompare;
-import org.eclipse.emf.compare.diagram.diff.DiagramDiffExtensionPostProcessor;
+import org.eclipse.emf.compare.diagram.internal.CompareDiagramPostProcessor;
import org.eclipse.emf.compare.extension.PostProcessorDescriptor;
import org.eclipse.emf.compare.extension.PostProcessorRegistry;
import org.eclipse.emf.ecore.resource.Resource;
@@ -29,7 +29,7 @@ public abstract class AbstractTest {
postProcessorRegistry.addPostProcessor(new PostProcessorDescriptor(
"http://www.eclipse.org/gmf/runtime/\\d.\\d.\\d/notation", null,
"org.eclipse.emf.compare.diagram.diff.DiagramDiffExtensionPostProcessor",
- new DiagramDiffExtensionPostProcessor()));
+ new CompareDiagramPostProcessor()));
emfCompare = EMFCompare.builder().setPostProcessorRegistry(postProcessorRegistry).build();
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/edgechanges/EdgechangesTest.java b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/edgechanges/EdgechangesTest.java
index 98f6e63dd..192626ae9 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/edgechanges/EdgechangesTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/edgechanges/EdgechangesTest.java
@@ -2,10 +2,10 @@ package org.eclipse.emf.compare.diagram.ecoretools.tests.edgechanges;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
+import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertSame;
import static junit.framework.Assert.assertTrue;
-import static junit.framework.Assert.assertFalse;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import java.io.IOException;
@@ -18,15 +18,14 @@ import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.EMFCompare;
import org.eclipse.emf.compare.ReferenceChange;
-import org.eclipse.emf.compare.diagram.EdgeChange;
import org.eclipse.emf.compare.diagram.ecoretools.tests.AbstractTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.DiagramInputData;
import org.eclipse.emf.compare.diagram.ecoretools.tests.edgechanges.data.EdgeChangesInputData;
+import org.eclipse.emf.compare.diagram.internal.extensions.EdgeChange;
import org.eclipse.emf.compare.scope.IComparisonScope;
import org.eclipse.emf.compare.utils.MatchUtil;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
import org.junit.Ignore;
import org.junit.Test;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/hide/HideTest.java b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/hide/HideTest.java
index 8fe57a503..76abf5623 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/hide/HideTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/hide/HideTest.java
@@ -15,10 +15,10 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.EMFCompare;
-import org.eclipse.emf.compare.diagram.Hide;
import org.eclipse.emf.compare.diagram.ecoretools.tests.AbstractTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.DiagramInputData;
import org.eclipse.emf.compare.diagram.ecoretools.tests.hide.data.HideInputData;
+import org.eclipse.emf.compare.diagram.internal.extensions.Hide;
import org.eclipse.emf.compare.scope.IComparisonScope;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gmf.runtime.notation.NotationPackage;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java
index 1bfe3a4c7..605b753cd 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/merge/ExtensionMergeTest.java
@@ -21,11 +21,11 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.EMFCompare;
import org.eclipse.emf.compare.ReferenceChange;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
import org.eclipse.emf.compare.diagram.ecoretools.tests.AbstractTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.DiagramInputData;
import org.eclipse.emf.compare.diagram.ecoretools.tests.edgechanges.data.EdgeChangesInputData;
-import org.eclipse.emf.compare.diagram.merge.DiagramDiffMerger;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
+import org.eclipse.emf.compare.diagram.internal.merge.CompareDiagramMerger;
import org.eclipse.emf.compare.merge.AttributeChangeMerger;
import org.eclipse.emf.compare.merge.IMerger;
import org.eclipse.emf.compare.merge.ReferenceChangeMerger;
@@ -56,14 +56,14 @@ public class ExtensionMergeTest extends AbstractTest {
final IMerger.Registry registry = IMerger.RegistryImpl.createStandaloneInstance();
final IMerger umlMerger = new UMLDiffMerger();
umlMerger.setRanking(11);
- final IMerger diagramMerger = new DiagramDiffMerger();
+ final IMerger diagramMerger = new CompareDiagramMerger();
diagramMerger.setRanking(11);
registry.add(umlMerger);
registry.add(diagramMerger);
for (Diff diff : differences) {
final Class<? extends IMerger> expectedMerger;
if (diff instanceof DiagramDiff) {
- expectedMerger = DiagramDiffMerger.class;
+ expectedMerger = CompareDiagramMerger.class;
} else if (diff instanceof UMLDiff) {
expectedMerger = UMLDiffMerger.class;
} else if (diff instanceof AttributeChange) {
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/nodechanges/NodechangesTest.java b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/nodechanges/NodechangesTest.java
index 09ad88565..5e2e4d4cb 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/nodechanges/NodechangesTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/nodechanges/NodechangesTest.java
@@ -11,8 +11,8 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removed;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.removedFromReference;
-import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueNameMatches;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueIs;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueNameMatches;
import java.io.IOException;
import java.util.List;
@@ -24,12 +24,11 @@ import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.EMFCompare;
import org.eclipse.emf.compare.ReferenceChange;
import org.eclipse.emf.compare.ResourceAttachmentChange;
-import org.eclipse.emf.compare.diagram.NodeChange;
import org.eclipse.emf.compare.diagram.ecoretools.tests.AbstractTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.DiagramInputData;
import org.eclipse.emf.compare.diagram.ecoretools.tests.nodechanges.data.NodeChangesInputData;
+import org.eclipse.emf.compare.diagram.internal.extensions.NodeChange;
import org.eclipse.emf.compare.scope.IComparisonScope;
-import org.eclipse.emf.compare.utils.MatchUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.resource.Resource;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/show/ShowTest.java b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/show/ShowTest.java
index ce2a63435..9c005ef61 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/show/ShowTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/show/ShowTest.java
@@ -15,10 +15,10 @@ import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.EMFCompare;
-import org.eclipse.emf.compare.diagram.Show;
import org.eclipse.emf.compare.diagram.ecoretools.tests.AbstractTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.DiagramInputData;
import org.eclipse.emf.compare.diagram.ecoretools.tests.show.data.ShowInputData;
+import org.eclipse.emf.compare.diagram.internal.extensions.Show;
import org.eclipse.emf.compare.scope.IComparisonScope;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gmf.runtime.notation.NotationPackage;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/suite/AllTests.java
index 1a7cb9c70..b2d7577be 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/suite/AllTests.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ecoretools/tests/suite/AllTests.java
@@ -15,12 +15,12 @@ import junit.framework.Test;
import junit.textui.TestRunner;
import org.eclipse.emf.compare.ComparePackage;
-import org.eclipse.emf.compare.diagram.DiagramComparePackage;
import org.eclipse.emf.compare.diagram.ecoretools.tests.edgechanges.EdgechangesTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.hide.HideTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.merge.ExtensionMergeTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.nodechanges.NodechangesTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.show.ShowTest;
+import org.eclipse.emf.compare.diagram.internal.extensions.ExtensionsPackage;
import org.eclipse.emf.compare.tests.suite.CompareTestSuite;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EcorePackage;
@@ -63,7 +63,7 @@ public class AllTests {
@BeforeClass
public static void fillEMFRegistries() {
EPackage.Registry.INSTANCE.put(ComparePackage.eNS_URI, ComparePackage.eINSTANCE);
- EPackage.Registry.INSTANCE.put(DiagramComparePackage.eNS_URI, DiagramComparePackage.eINSTANCE);
+ EPackage.Registry.INSTANCE.put(ExtensionsPackage.eNS_URI, ExtensionsPackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(NotationPackage.eNS_URI, NotationPackage.eINSTANCE);
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.edit/META-INF/MANIFEST.MF
index 3e7eb56aa..514419455 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/META-INF/MANIFEST.MF
@@ -2,13 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.compare.diagram.edit;singleton:=true
-Bundle-Version: 2.1.0.qualifier
+Bundle-Version: 2.2.0.qualifier
Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.emf.compare.diagram.provider.DiagramEditPlugin$Implementation
+Bundle-Activator: org.eclipse.emf.compare.diagram.internal.extensions.provider.ExtensionsEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.emf.compare.diagram.provider
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.compare.diagram;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport,
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/build.properties b/plugins/org.eclipse.emf.compare.diagram.edit/build.properties
index eef98df95..db29da77d 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/build.properties
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/build.properties
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 Obeo.
+# Copyright (c) 2013 Obeo.
# 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
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/icons/full/obj16/LabelChange.gif b/plugins/org.eclipse.emf.compare.diagram.edit/icons/full/obj16/LabelChange.gif
deleted file mode 100644
index 7c2aaac84..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.edit/icons/full/obj16/LabelChange.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.edit/plugin.xml
index b5356c89b..40e840076 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/plugin.xml
@@ -2,7 +2,7 @@
<?eclipse version="3.0"?>
<!--
- Copyright (c) 2012 Obeo.
+ Copyright (c) 2013 Obeo.
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
@@ -17,7 +17,7 @@
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<factory
uri="http://www.eclipse.org/emf/compare/diagram/2.0"
- class="org.eclipse.emf.compare.diagram.provider.spec.DiagramCompareAdapterFactorySpec"
+ class="org.eclipse.emf.compare.diagram.internal.extensions.provider.spec.ExtensionsItemProviderAdapterFactorySpec"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/pom.xml b/plugins/org.eclipse.emf.compare.diagram.edit/pom.xml
index 24bd78b24..ba46d5a95 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/pom.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/pom.xml
@@ -10,7 +10,7 @@
</parent>
<groupId>org.eclipse.emf.compare</groupId>
<artifactId>org.eclipse.emf.compare.diagram.edit</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramDiffItemProvider.java b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/DiagramDiffItemProvider.java
index 5330b0ed0..c51c66de4 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramDiffItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/DiagramDiffItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider;
import java.util.Collection;
@@ -21,8 +21,8 @@ import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.DiagramComparePackage;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
+import org.eclipse.emf.compare.diagram.internal.extensions.ExtensionsPackage;
import org.eclipse.emf.compare.provider.DiffItemProvider;
@@ -37,7 +37,7 @@ 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.compare.diagram.DiagramDiff} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -45,7 +45,13 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
public class DiagramDiffItemProvider
extends DiffItemProvider
implements
- IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource,
+ IItemColorProvider,
+ IItemFontProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
@@ -86,7 +92,7 @@ public class DiagramDiffItemProvider
getResourceLocator(),
getString("_UI_DiagramDiff_semanticDiff_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramDiff_semanticDiff_feature", "_UI_DiagramDiff_type"),
- DiagramComparePackage.Literals.DIAGRAM_DIFF__SEMANTIC_DIFF,
+ ExtensionsPackage.Literals.DIAGRAM_DIFF__SEMANTIC_DIFF,
true,
false,
true,
@@ -108,7 +114,7 @@ public class DiagramDiffItemProvider
getResourceLocator(),
getString("_UI_DiagramDiff_view_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramDiff_view_feature", "_UI_DiagramDiff_type"),
- DiagramComparePackage.Literals.DIAGRAM_DIFF__VIEW,
+ ExtensionsPackage.Literals.DIAGRAM_DIFF__VIEW,
true,
false,
true,
@@ -165,7 +171,7 @@ public class DiagramDiffItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return DiagramEditPlugin.INSTANCE;
+ return ExtensionsEditPlugin.INSTANCE;
}
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/EdgeChangeItemProvider.java b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/EdgeChangeItemProvider.java
index 88f1435b2..ef0576a6c 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/EdgeChangeItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/EdgeChangeItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider;
import java.util.Collection;
@@ -19,7 +19,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.EdgeChange;
+import org.eclipse.emf.compare.diagram.internal.extensions.EdgeChange;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemColorProvider;
@@ -31,7 +31,7 @@ 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.compare.diagram.EdgeChange} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.EdgeChange} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -39,7 +39,13 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
public class EdgeChangeItemProvider
extends DiagramDiffItemProvider
implements
- IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource,
+ IItemColorProvider,
+ IItemFontProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramEditPlugin.java b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ExtensionsEditPlugin.java
index 38c431595..4864a865a 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramEditPlugin.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ExtensionsEditPlugin.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider;
import org.eclipse.emf.common.EMFPlugin;
@@ -19,19 +19,19 @@ import org.eclipse.emf.compare.provider.EMFCompareEditPlugin;
import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
/**
- * This is the central singleton for the Diagram edit plugin.
+ * This is the central singleton for the Extensions edit plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public final class DiagramEditPlugin extends EMFPlugin {
+public final class ExtensionsEditPlugin extends EMFPlugin {
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static final DiagramEditPlugin INSTANCE = new DiagramEditPlugin();
+ public static final ExtensionsEditPlugin INSTANCE = new ExtensionsEditPlugin();
/**
* Keep track of the singleton.
@@ -47,7 +47,7 @@ public final class DiagramEditPlugin extends EMFPlugin {
* <!-- end-user-doc -->
* @generated
*/
- public DiagramEditPlugin() {
+ public ExtensionsEditPlugin() {
super
(new ResourceLocator [] {
EMFCompareEditPlugin.INSTANCE,
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramCompareItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ExtensionsItemProviderAdapterFactory.java
index 9fdd40210..4a57fd438 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/DiagramCompareItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ExtensionsItemProviderAdapterFactory.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider;
import java.util.ArrayList;
import java.util.Collection;
@@ -17,7 +17,7 @@ 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.compare.diagram.util.DiagramCompareAdapterFactory;
+import org.eclipse.emf.compare.diagram.internal.extensions.util.ExtensionsAdapterFactory;
import org.eclipse.emf.edit.provider.ChangeNotifier;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
@@ -42,7 +42,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
* <!-- end-user-doc -->
* @generated
*/
-public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+public class ExtensionsItemProviderAdapterFactory extends ExtensionsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
/**
* This keeps track of the root adapter factory that delegates to this adapter factory.
* <!-- begin-user-doc -->
@@ -73,7 +73,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
* <!-- end-user-doc -->
* @generated
*/
- public DiagramCompareItemProviderAdapterFactory() {
+ public ExtensionsItemProviderAdapterFactory() {
supportedTypes.add(IEditingDomainItemProvider.class);
supportedTypes.add(IStructuredItemContentProvider.class);
supportedTypes.add(ITreeItemContentProvider.class);
@@ -84,7 +84,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.Show} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.internal.extensions.Show} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -92,7 +92,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
protected ShowItemProvider showItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.Show}.
+ * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.Show}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -107,7 +107,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.Hide} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.internal.extensions.Hide} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -115,7 +115,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
protected HideItemProvider hideItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.Hide}.
+ * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.Hide}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -130,7 +130,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.NodeChange} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.internal.extensions.NodeChange} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -138,7 +138,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
protected NodeChangeItemProvider nodeChangeItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.NodeChange}.
+ * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.NodeChange}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -153,7 +153,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.EdgeChange} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.internal.extensions.EdgeChange} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -161,7 +161,7 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
protected EdgeChangeItemProvider edgeChangeItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.EdgeChange}.
+ * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.EdgeChange}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -176,29 +176,6 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.compare.diagram.LabelChange} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LabelChangeItemProvider labelChangeItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.diagram.LabelChange}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createLabelChangeAdapter() {
- if (labelChangeItemProvider == null) {
- labelChangeItemProvider = new LabelChangeItemProvider(this);
- }
-
- return labelChangeItemProvider;
- }
-
- /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -301,7 +278,6 @@ public class DiagramCompareItemProviderAdapterFactory extends DiagramCompareAdap
if (hideItemProvider != null) hideItemProvider.dispose();
if (nodeChangeItemProvider != null) nodeChangeItemProvider.dispose();
if (edgeChangeItemProvider != null) edgeChangeItemProvider.dispose();
- if (labelChangeItemProvider != null) labelChangeItemProvider.dispose();
}
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/HideItemProvider.java b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/HideItemProvider.java
index a75f7f504..76e8f9272 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/HideItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/HideItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider;
import java.util.Collection;
@@ -19,7 +19,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.Hide;
+import org.eclipse.emf.compare.diagram.internal.extensions.Hide;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemColorProvider;
@@ -31,7 +31,7 @@ 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.compare.diagram.Hide} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.Hide} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -39,7 +39,13 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
public class HideItemProvider
extends DiagramDiffItemProvider
implements
- IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource,
+ IItemColorProvider,
+ IItemFontProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/NodeChangeItemProvider.java b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/NodeChangeItemProvider.java
index c6bb286f7..796773c33 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/NodeChangeItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/NodeChangeItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider;
import java.util.Collection;
@@ -19,7 +19,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.NodeChange;
+import org.eclipse.emf.compare.diagram.internal.extensions.NodeChange;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemColorProvider;
@@ -31,7 +31,7 @@ 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.compare.diagram.NodeChange} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.NodeChange} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -39,7 +39,13 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
public class NodeChangeItemProvider
extends DiagramDiffItemProvider
implements
- IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource,
+ IItemColorProvider,
+ IItemFontProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/ShowItemProvider.java b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ShowItemProvider.java
index d2dc9fb8b..a8a2ce7cb 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/ShowItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/internal/extensions/provider/ShowItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider;
import java.util.Collection;
@@ -19,7 +19,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.Show;
+import org.eclipse.emf.compare.diagram.internal.extensions.Show;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemColorProvider;
@@ -31,7 +31,7 @@ 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.compare.diagram.Show} object.
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.diagram.internal.extensions.Show} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -39,7 +39,13 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
public class ShowItemProvider
extends DiagramDiffItemProvider
implements
- IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource,
+ IItemColorProvider,
+ IItemFontProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/LabelChangeItemProvider.java b/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/LabelChangeItemProvider.java
deleted file mode 100644
index 39f58f9ff..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src-gen/org/eclipse/emf/compare/diagram/provider/LabelChangeItemProvider.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Copyright (c) 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- */
-package org.eclipse.emf.compare.diagram.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.compare.DifferenceKind;
-
-import org.eclipse.emf.compare.diagram.DiagramComparePackage;
-import org.eclipse.emf.compare.diagram.LabelChange;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ViewerNotification;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.compare.diagram.LabelChange} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class LabelChangeItemProvider
- extends DiagramDiffItemProvider
- implements
- IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LabelChangeItemProvider(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);
-
- addLeftPropertyDescriptor(object);
- addRightPropertyDescriptor(object);
- addOriginPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Left feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addLeftPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_LabelChange_left_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_LabelChange_left_feature", "_UI_LabelChange_type"),
- DiagramComparePackage.Literals.LABEL_CHANGE__LEFT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Right feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addRightPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_LabelChange_right_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_LabelChange_right_feature", "_UI_LabelChange_type"),
- DiagramComparePackage.Literals.LABEL_CHANGE__RIGHT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Origin feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addOriginPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_LabelChange_origin_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_LabelChange_origin_feature", "_UI_LabelChange_type"),
- DiagramComparePackage.Literals.LABEL_CHANGE__ORIGIN,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns LabelChange.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/LabelChange"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- DifferenceKind labelValue = ((LabelChange)object).getKind();
- String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ?
- getString("_UI_LabelChange_type") :
- getString("_UI_LabelChange_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(LabelChange.class)) {
- case DiagramComparePackage.LABEL_CHANGE__LEFT:
- case DiagramComparePackage.LABEL_CHANGE__RIGHT:
- case DiagramComparePackage.LABEL_CHANGE__ORIGIN:
- 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);
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/DiagramCompareAdapterFactorySpec.java b/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/ExtensionsItemProviderAdapterFactorySpec.java
index f24f341de..068db657c 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/DiagramCompareAdapterFactorySpec.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/ExtensionsItemProviderAdapterFactorySpec.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,16 +8,16 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.compare.diagram.provider.spec;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider.spec;
import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.compare.diagram.provider.DiagramCompareItemProviderAdapterFactory;
+import org.eclipse.emf.compare.diagram.internal.extensions.provider.ExtensionsItemProviderAdapterFactory;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
/**
* @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
-public class DiagramCompareAdapterFactorySpec extends DiagramCompareItemProviderAdapterFactory {
+public class ExtensionsItemProviderAdapterFactorySpec extends ExtensionsItemProviderAdapterFactory {
ForwardingDiagramDiffItemProvider fShowItemProvider;
@@ -48,15 +48,6 @@ public class DiagramCompareAdapterFactorySpec extends DiagramCompareItemProvider
}
@Override
- public Adapter createLabelChangeAdapter() {
- if (fLabelChangeItemProvider == null) {
- fLabelChangeItemProvider = new LabelChangeItemProviderSpec((ItemProviderAdapter)super
- .createLabelChangeAdapter());
- }
- return fLabelChangeItemProvider;
- }
-
- @Override
public Adapter createNodeChangeAdapter() {
if (fNodeChangeItemProvider == null) {
fNodeChangeItemProvider = new NodeChangeItemProviderSpec((ItemProviderAdapter)super
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/ForwardingDiagramDiffItemProvider.java b/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/ForwardingDiagramDiffItemProvider.java
index d15e7bdcf..d310332ed 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/ForwardingDiagramDiffItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/ForwardingDiagramDiffItemProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.compare.diagram.provider.spec;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider.spec;
import com.google.common.base.Preconditions;
@@ -18,7 +18,7 @@ import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.compare.DifferenceKind;
import org.eclipse.emf.compare.DifferenceSource;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
import org.eclipse.emf.compare.provider.AdapterFactoryUtil;
import org.eclipse.emf.compare.provider.ForwardingItemProvider;
import org.eclipse.emf.compare.provider.spec.Strings;
@@ -149,7 +149,8 @@ public class ForwardingDiagramDiffItemProvider extends ForwardingItemProvider {
protected String getValueText(final DiagramDiff diagramDiff) {
String value = "<null>";
if (diagramDiff.getView() instanceof View) {
- value = diagramDiff.getView().eClass().getName() + " "
+ value = diagramDiff.getView().eClass().getName()
+ + " "
+ AdapterFactoryUtil.getText(getRootAdapterFactory(), ((View)diagramDiff.getView())
.getElement());
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/LabelChangeItemProviderSpec.java b/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/LabelChangeItemProviderSpec.java
index fcffb583d..451a7f340 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/LabelChangeItemProviderSpec.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/LabelChangeItemProviderSpec.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,9 +8,9 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider.spec;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider.spec;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
public class LabelChangeItemProviderSpec extends ForwardingDiagramDiffItemProvider {
diff --git a/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/NodeChangeItemProviderSpec.java b/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/NodeChangeItemProviderSpec.java
index e4d7cd812..d98310141 100644
--- a/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/provider/spec/NodeChangeItemProviderSpec.java
+++ b/plugins/org.eclipse.emf.compare.diagram.edit/src/org/eclipse/emf/compare/diagram/internal/extensions/provider/spec/NodeChangeItemProviderSpec.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*/
-package org.eclipse.emf.compare.diagram.provider.spec;
+package org.eclipse.emf.compare.diagram.internal.extensions.provider.spec;
import static com.google.common.base.Predicates.instanceOf;
import static com.google.common.collect.Iterables.filter;
@@ -20,8 +20,8 @@ import java.util.Collection;
import java.util.List;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
-import org.eclipse.emf.compare.diagram.NodeChange;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
+import org.eclipse.emf.compare.diagram.internal.extensions.NodeChange;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
public class NodeChangeItemProviderSpec extends ForwardingDiagramDiffItemProvider {
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/META-INF/MANIFEST.MF
index a4dccd1fe..316a911ac 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/META-INF/MANIFEST.MF
@@ -12,10 +12,10 @@ Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.8.0",
org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
org.eclipse.emf.compare.diagram.ecoretools.tests;bundle-version="1.0.0",
org.eclipse.ui;bundle-version="3.103.0",
- org.eclipse.emf.compare.diagram.ide;bundle-version="2.0.0",
org.eclipse.emf.compare.diagram;bundle-version="2.0.0",
- org.eclipse.emf.compare.ide;bundle-version="3.0.0"
-Import-Package: com.google.common.base;version="[10.0.1,11.0.0)",
- com.google.common.collect;version="[10.0.1,11.0.0)"
+ org.eclipse.emf.compare.ide;bundle-version="3.0.0",
+ org.eclipse.emf.compare.diagram.ide.ui;bundle-version="3.0.0"
+Import-Package: com.google.common.base;version="[11.0.0,15.0.0)",
+ com.google.common.collect;version="[11.0.0,15.0.0)"
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/nodechanges/NodechangesTest.java b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/nodechanges/NodechangesTest.java
index 40d3e07ae..75cb9c1db 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/nodechanges/NodechangesTest.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/nodechanges/NodechangesTest.java
@@ -15,13 +15,12 @@ import java.util.List;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.LabelChange;
-import org.eclipse.emf.compare.diagram.NodeChange;
-import org.eclipse.emf.compare.diagram.diff.util.DiagramCompareConstants;
import org.eclipse.emf.compare.diagram.ecoretools.tests.AbstractTest;
import org.eclipse.emf.compare.diagram.ecoretools.tests.DiagramInputData;
-import org.eclipse.emf.compare.diagram.ide.GMFCompareIDEPlugin;
import org.eclipse.emf.compare.diagram.ide.ecoretools.tests.nodechanges.data.NodeChangesInputData;
+import org.eclipse.emf.compare.diagram.ide.ui.internal.CompareDiagramIDEUIPlugin;
+import org.eclipse.emf.compare.diagram.internal.CompareDiagramConstants;
+import org.eclipse.emf.compare.diagram.internal.extensions.NodeChange;
import org.eclipse.emf.compare.extension.PostProcessorRegistry;
import org.eclipse.emf.compare.ide.EMFCompareIDE;
import org.eclipse.emf.compare.scope.IComparisonScope;
@@ -50,7 +49,7 @@ public class NodechangesTest extends AbstractTest {
@Test
public void testA10UseCase() throws IOException {
- GMFCompareIDEPlugin.getDefault().getPreferenceStore().setValue(DiagramCompareConstants.PREFERENCES_KEY_MOVE_THRESHOLD, 0);
+ CompareDiagramIDEUIPlugin.getDefault().getPreferenceStore().setValue(CompareDiagramConstants.PREFERENCES_KEY_MOVE_THRESHOLD, 0);
testMove(true);
@@ -59,7 +58,7 @@ public class NodechangesTest extends AbstractTest {
@Test
public void testA11UseCase() throws IOException {
- GMFCompareIDEPlugin.getDefault().getPreferenceStore().setValue(DiagramCompareConstants.PREFERENCES_KEY_MOVE_THRESHOLD, 200);
+ CompareDiagramIDEUIPlugin.getDefault().getPreferenceStore().setValue(CompareDiagramConstants.PREFERENCES_KEY_MOVE_THRESHOLD, 200);
testMove(false);
@@ -76,10 +75,10 @@ public class NodechangesTest extends AbstractTest {
final List<Diff> differences = comparison.getDifferences();
- assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+ assertSame(Integer.valueOf(1), Integer.valueOf(differences.size()));
- final Diff changeLabel = Iterators.find(differences.iterator(), and(instanceOf(LabelChange.class), ofKind(DifferenceKind.CHANGE)));
- assertNotNull(changeLabel);
+// final Diff changeLabel = Iterators.find(differences.iterator(), and(instanceOf(LabelChange.class), ofKind(DifferenceKind.CHANGE)));
+// assertNotNull(changeLabel);
final Diff changeName = Iterators.find(differences.iterator(), changedAttribute("tc01.EClass1", "name", "TheClass", "EClass1"));
assertNotNull(changeName);
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/suite/AllTests.java
index 94f35747c..a5daf3ef2 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/suite/AllTests.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools.tests/src/org/eclipse/emf/compare/diagram/ide/ecoretools/tests/suite/AllTests.java
@@ -15,8 +15,8 @@ import junit.framework.Test;
import junit.textui.TestRunner;
import org.eclipse.emf.compare.ComparePackage;
-import org.eclipse.emf.compare.diagram.DiagramComparePackage;
import org.eclipse.emf.compare.diagram.ide.ecoretools.tests.nodechanges.NodechangesTest;
+import org.eclipse.emf.compare.diagram.internal.extensions.ExtensionsPackage;
import org.eclipse.emf.compare.tests.suite.CompareTestSuite;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EcorePackage;
@@ -59,7 +59,7 @@ public class AllTests {
@BeforeClass
public static void fillEMFRegistries() {
EPackage.Registry.INSTANCE.put(ComparePackage.eNS_URI, ComparePackage.eINSTANCE);
- EPackage.Registry.INSTANCE.put(DiagramComparePackage.eNS_URI, DiagramComparePackage.eINSTANCE);
+ EPackage.Registry.INSTANCE.put(ExtensionsPackage.eNS_URI, ExtensionsPackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(NotationPackage.eNS_URI, NotationPackage.eINSTANCE);
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.checkstyle b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.checkstyle
deleted file mode 100644
index 42c474352..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.checkstyle
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
- <local-check-config name="EMF Compare" location="/org.eclipse.emf.compare-parent/codeStyle/EMFCompareCheckstyle5Configuration.xml" type="project" description="">
- <additional-data name="protect-config-file" value="false"/>
- </local-check-config>
- <fileset name="all" enabled="true" check-config-name="EMF Compare" local="true">
- <file-match-pattern match-pattern="." include-pattern="true"/>
- </fileset>
- <filter name="FilesFromPackage" enabled="true">
- <filter-data value="src/org/eclipse/emf/compare/diff/metamodel"/>
- </filter>
-</fileset-config>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.classpath b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.compare.diagram.ide.ecoretools/.project b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.project
deleted file mode 100644
index 9db19827f..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.compare.diagram.ide.ecoretools</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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 4824b8026..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index f8a67de1d..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.core.runtime.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\r\n
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8199624a5..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,375 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-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.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-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=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeFieldsInNullAnalysis=disabled
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=disabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecInsufficientInfo=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentialNullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-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=warning
-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.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_annotation=0
-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_method_declaration=0
-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_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
-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.alignment_for_union_type_in_multicatch=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=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_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=110
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-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.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-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=true
-org.eclipse.jdt.core.formatter.indentation.size=8
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-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_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=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_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=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=do not 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=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not 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=do not 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_try=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_semicolon_in_try_resources=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_try=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=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=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_semicolon_in_try_resources=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=110
-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=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=true
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=false
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 4ffe0798a..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,61 +0,0 @@
-cleanup_settings_version=2
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_EMF Compare
-formatter_settings_version=12
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=fr;com;java;javax;org;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
-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=false
-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=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-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=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644
index 90e2e6a01..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/.settings/org.eclipse.pde.api.tools.prefs
+++ /dev/null
@@ -1,178 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Warning
-ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Warning
-ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
-ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Warning
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Warning
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Warning
-ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Warning
-ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Warning
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Warning
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Warning
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Warning
-CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
-CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Warning
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Warning
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Warning
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
-CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
-CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Warning
-CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Warning
-CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Warning
-CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Warning
-CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Warning
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
-CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Warning
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Warning
-CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
-CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Warning
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Warning
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Warning
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Warning
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Warning
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Warning
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Warning
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Warning
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Warning
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Warning
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
-ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Warning
-ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Warning
-ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Warning
-ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Warning
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Warning
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Warning
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Warning
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Warning
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Warning
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Warning
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Warning
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Warning
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-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_CLASS_BOUND=Warning
-METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
-METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
-METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
-METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Warning
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Warning
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Warning
-METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
-METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
-METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Warning
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Warning
-MISSING_EE_DESCRIPTIONS=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Warning
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Warning
-malformed_since_tag=Warning
-missing_since_tag=Warning
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/META-INF/MANIFEST.MF
deleted file mode 100644
index 1bd525c19..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.emf.compare.diagram.ide.ecoretools;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ecoretools.EcoreToolsIDECompare
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.gmf.runtime.notation,
- org.eclipse.emf.ecoretools.diagram,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.emf.compare.diagram.ide;bundle-version="2.0.0",
- org.eclipse.emf.compare.diagram;bundle-version="2.0.0",
- org.eclipse.compare
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.emf.compare.diagram.ide.ecoretools
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/about.html b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/about.html
deleted file mode 100644
index 670d10856..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/about.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!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>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation 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 provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/build.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/build.properties
deleted file mode 100644
index b81a5af15..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
- #*******************************************************************************
- # Copyright (c) 2006, 2012 Obeo.
- # 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:
- # Obeo - initial API and implementation
- #******************************************************************************/
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html
-src.includes = about.html
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/plugin.xml
deleted file mode 100644
index 59887d307..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/plugin.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.emf.compare.diagram.ide.viewLabelProvider">
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.ecoretools.EcoreToolsViewLabelProvider"
- diagramType="EcoreTools">
- </viewLabelProvider>
- </extension>
-
-
-</plugin>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/pom.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/pom.xml
deleted file mode 100644
index cd7845d1b..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/pom.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>emf.compare-parent</artifactId>
- <groupId>org.eclipse.emf.compare</groupId>
- <version>2.1.0-SNAPSHOT</version>
- <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
- </parent>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>org.eclipse.emf.compare.diagram.ide.ecoretools</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ecoretools/EcoreToolsIDECompare.java b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ecoretools/EcoreToolsIDECompare.java
deleted file mode 100644
index bbe656c21..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ecoretools/EcoreToolsIDECompare.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ecoretools;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator.
- *
- * @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
- */
-public class EcoreToolsIDECompare extends Plugin {
-
- /** The plug-in ID. */
- public static final String PLUGIN_ID = "org.eclipse.emf.compare.diagram.ide.ecoretools"; //$NON-NLS-1$
-
- /**
- * Context.
- */
- private static EcoreToolsIDECompare plugin;
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- plugin = this;
- super.start(bundleContext);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- super.stop(bundleContext);
- plugin = null;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ecoretools/EcoreToolsViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ecoretools/EcoreToolsViewLabelProvider.java
deleted file mode 100644
index 7802ef562..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ecoretools/EcoreToolsViewLabelProvider.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ecoretools;
-
-import org.eclipse.emf.compare.diagram.provider.AbstractLabelProvider;
-import org.eclipse.emf.ecoretools.diagram.edit.parts.EcoreEditPartFactory;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * The provider for EcoreTools diagram kind.
- *
- * @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
- */
-public class EcoreToolsViewLabelProvider extends AbstractLabelProvider {
-
- /**
- * EcoreEditPartFactory.
- */
- private static final EcoreEditPartFactory EDIT_PART_FACTORY = new EcoreEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.classpath b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.classpath
deleted file mode 100644
index 2d1a4302f..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.compare.diagram.ide.papyrus/.project b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.project
deleted file mode 100644
index 26ba8e900..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.compare.diagram.ide.papyrus</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.compare.diagram.ide.papyrus/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 44217f8c0..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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.compare.diagram.ide.papyrus/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/META-INF/MANIFEST.MF
deleted file mode 100644
index 898c952e8..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.emf.compare.diagram.ide.papyrus;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Activator: org.eclipse.emf.compare.diagram.ide.papyrus.Activator
-Require-Bundle: org.eclipse.emf.compare.diagram;bundle-version="2.0.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="0.9.1",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.activity;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.clazz;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.communication;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.component;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.composite;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.deployment;bundle-version="0.9.1",
- org.eclipse.papyrus.infra.core;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.profile;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.sequence;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.statemachine;bundle-version="0.9.1",
- org.eclipse.papyrus.uml.diagram.usecase;bundle-version="0.9.1"
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.emf.compare.diagram.ide.papyrus
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/about.html b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/about.html
deleted file mode 100644
index 670d10856..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/about.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!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>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation 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 provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/build.properties b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/build.properties
deleted file mode 100644
index 30e2cedf4..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html
-src.includes = about.html
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/plugin.xml
deleted file mode 100644
index 79fa6aec7..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/plugin.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.emf.compare.diagram.ide.viewLabelProvider">
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.ActivityViewLabelProvider"
- diagramType="PapyrusUMLActivityDiagram">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.ClazzViewLabelProvider"
- diagramType="PapyrusUMLClassDiagram">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.CommunicationViewLabelProvider"
- diagramType="PapyrusUMLCommunicationDiagram">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.ComponentViewLabelProvider"
- diagramType="PapyrusUMLComponentDiagram">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.CompositeViewLabelProvider"
- diagramType="CompositeStructure">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.DeploymentViewLabelProvider"
- diagramType="PapyrusUMLDeploymentDiagram">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.ProfileViewLabelProvider"
- diagramType="PapyrusUMLProfileDiagram">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.SequenceViewLabelProvider"
- diagramType="PapyrusUMLSequenceDiagram">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.StateMachineViewLabelProvider"
- diagramType="PapyrusUMLStateMachineDiagram">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.UseCaseViewLabelProvider"
- diagramType="UseCase">
- </viewLabelProvider>
- <viewLabelProvider
- class="org.eclipse.emf.compare.diagram.ide.papyrus.PackageViewLabelProvider"
- diagramType="Package">
- </viewLabelProvider>
- </extension>
-</plugin>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/pom.xml b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/pom.xml
deleted file mode 100644
index 5b8a86ffa..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/pom.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>emf.compare-parent</artifactId>
- <groupId>org.eclipse.emf.compare</groupId>
- <version>2.1.0-SNAPSHOT</version>
- <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
- </parent>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>org.eclipse.emf.compare.diagram.ide.papyrus</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/AbstractUMLViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/AbstractUMLViewLabelProvider.java
deleted file mode 100644
index c61c1af11..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/AbstractUMLViewLabelProvider.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.emf.compare.diagram.diff.util.GMFLabelUtil;
-import org.eclipse.emf.compare.diagram.provider.AbstractLabelProvider;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.tools.utils.CollaborationUseUtil;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
-import org.eclipse.papyrus.uml.tools.utils.InstanceSpecificationUtil;
-import org.eclipse.papyrus.uml.tools.utils.OperationUtil;
-import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.CollaborationUse;
-import org.eclipse.uml2.uml.InstanceSpecification;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.util.UMLSwitch;
-
-/**
- * View label provider for UMLView.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public abstract class AbstractUMLViewLabelProvider extends AbstractLabelProvider {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.AbstractLabelProvider#elementLabel(org.eclipse.gmf.runtime.notation.View)
- */
- @Override
- public String elementLabel(View view) {
- if (view == null) {
- throw new IllegalArgumentException("view"); //$NON-NLS-1$
- }
- final ITextAwareEditPart editPart = GMFLabelUtil.getTextEditPart(view);
- final EObject semanticElement = getSemanticElement(editPart);
-
- final IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy)editPart
- .getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- final String label = getLabelSwitch(policy).doSwitch(semanticElement);
-
- if (label != null && label.length() > 0) {
- return label;
- }
-
- // fall-through super implementation
- return super.elementLabel(view);
- }
-
- /**
- * Get the label switch in relation to the label edit policy.
- *
- * @param labelEditPolicy
- * The policy.
- * @return The switch.
- */
- protected LabelSwitch getLabelSwitch(IMaskManagedLabelEditPolicy labelEditPolicy) {
- return new LabelSwitch(labelEditPolicy);
- }
-
- /**
- * Switch to return the label in relation to the kind of model object.
- *
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
- static class LabelSwitch extends UMLSwitch<String> {
-
- /**
- * The label edit policy.
- */
- private final IMaskManagedLabelEditPolicy labelEditPolicy;
-
- /**
- * Constructor.
- *
- * @param pLabelEditPolicy
- * The edit policy.
- */
- LabelSwitch(IMaskManagedLabelEditPolicy pLabelEditPolicy) {
- this.labelEditPolicy = pLabelEditPolicy;
- }
-
- /**
- * Returns the label edit policy.
- *
- * @return the labelEditPolicy The policy.
- */
- public IMaskManagedLabelEditPolicy getLabelEditPolicy() {
- return labelEditPolicy;
- }
-
- @Override
- public String caseProperty(Property object) {
- int displayValue = ICustomAppearence.DEFAULT_UML_PROPERTY;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return PropertyUtil.getCustomLabel(object, displayValue);
- }
-
- @Override
- public String caseOperation(Operation object) {
- int displayValue = ICustomAppearence.DEFAULT_UML_OPERATION;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return OperationUtil.getCustomLabel(object, displayValue);
- }
-
- @Override
- public String caseInstanceSpecification(InstanceSpecification object) {
- int displayValue = ICustomAppearence.DEFAULT_UML_INSTANCESPECIFICATION;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return InstanceSpecificationUtil.getCustomLabel(object, displayValue);
- }
-
- @Override
- public String caseCollaborationUse(CollaborationUse object) {
- int displayValue = ICustomAppearence.DEFAULT_UML_PROPERTY;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return CollaborationUseUtil.getCustomLabel(object, displayValue);
- }
-
- @Override
- public String caseParameter(Parameter object) {
- int displayValue = ICustomAppearence.DEFAULT_UML_PARAMETER;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return ParameterUtil.getCustomLabel(object, displayValue);
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/Activator.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/Activator.java
deleted file mode 100644
index 11d9711d6..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/Activator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class Activator implements BundleActivator {
-
- /**
- * The bundle context.
- */
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ActivityViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ActivityViewLabelProvider.java
deleted file mode 100644
index 70482badf..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ActivityViewLabelProvider.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.UMLEditPartFactory;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * View label provider for Activity.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class ActivityViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.papyrus.AbstractUMLViewLabelProvider#getLabelSwitch(org.eclipse.papyrus.diagram.common.editpolicies.IMaskManagedLabelEditPolicy)
- */
- protected LabelSwitch getLabelSwitch(IMaskManagedLabelEditPolicy labelEditPolicy) {
- return new ActivityLabelSwitch(labelEditPolicy);
- }
-
- /**
- * Switch to return the label in relation to the kind of model object.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
- class ActivityLabelSwitch extends LabelSwitch {
-
- /**
- * Constructor.
- * @param labelEditPolicy The label edit policy.
- */
- ActivityLabelSwitch(IMaskManagedLabelEditPolicy labelEditPolicy) {
- super(labelEditPolicy);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.papyrus.AbstractUMLViewLabelProvider.LabelSwitch#caseProperty(org.eclipse.uml2.uml.Property)
- */
- @Override
- public String caseProperty(Property object) {
- if (object.getOwningAssociation() != null) {
- int displayValue = ICustomAppearence.DEFAULT_UML_RELATIONEND_PROPERTY;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return PropertyUtil.getCustomLabel(object, displayValue);
- }
- return super.caseProperty(object);
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ClazzViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ClazzViewLabelProvider.java
deleted file mode 100644
index a453b1a55..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ClazzViewLabelProvider.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UMLEditPartFactory;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * View label provider for Class.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class ClazzViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.papyrus.AbstractUMLViewLabelProvider#getLabelSwitch(org.eclipse.papyrus.diagram.common.editpolicies.IMaskManagedLabelEditPolicy)
- */
- @Override
- protected LabelSwitch getLabelSwitch(IMaskManagedLabelEditPolicy labelEditPolicy) {
- return new ClassLabelSwitch(labelEditPolicy);
- }
-
- /**
- * Switch to return the label in relation to the kind of model object.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
- class ClassLabelSwitch extends LabelSwitch {
-
- /**
- * Constructor.
- * @param labelEditPolicy The label edit policy..
- */
- ClassLabelSwitch(IMaskManagedLabelEditPolicy labelEditPolicy) {
- super(labelEditPolicy);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.papyrus.AbstractUMLViewLabelProvider.LabelSwitch#caseProperty(org.eclipse.uml2.uml.Property)
- */
- @Override
- public String caseProperty(Property object) {
- if (object.getOwningAssociation() != null) {
- int displayValue = ICustomAppearence.DEFAULT_UML_RELATIONEND_PROPERTY;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return PropertyUtil.getCustomLabel(object, displayValue);
- }
- return super.caseProperty(object);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/CommunicationViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/CommunicationViewLabelProvider.java
deleted file mode 100644
index ec7b6ba99..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/CommunicationViewLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.UMLEditPartFactory;
-
-/**
- * View label provider for Communication.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class CommunicationViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ComponentViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ComponentViewLabelProvider.java
deleted file mode 100644
index e7d72d001..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ComponentViewLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.component.edit.parts.UMLEditPartFactory;
-
-/**
- * View label provider for Activity.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class ComponentViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/CompositeViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/CompositeViewLabelProvider.java
deleted file mode 100644
index 6a89ca0c9..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/CompositeViewLabelProvider.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UMLEditPartFactory;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
-import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.Port;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * View label provider for Composite.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class CompositeViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
- @Override
- protected LabelSwitch getLabelSwitch(IMaskManagedLabelEditPolicy labelEditPolicy) {
- return new CompositeLabelSwitch(labelEditPolicy);
- }
-
- /**
- * Switch to return the label in relation to the kind of model object.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
- class CompositeLabelSwitch extends LabelSwitch {
-
- /**
- * Constructor.
- * @param labelEditPolicy The label edit policy.
- */
- CompositeLabelSwitch(IMaskManagedLabelEditPolicy labelEditPolicy) {
- super(labelEditPolicy);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.papyrus.AbstractUMLViewLabelProvider.LabelSwitch#caseProperty(org.eclipse.uml2.uml.Property)
- */
- @Override
- public String caseProperty(Property object) {
- int displayValue = ICustomAppearence.DEFAULT_UML_COMPO_PROPERTY;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return PropertyUtil.getCustomLabel(object, displayValue);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.uml2.uml.util.UMLSwitch#casePort(org.eclipse.uml2.uml.Port)
- */
- @Override
- public String casePort(Port object) {
- int displayValue = ICustomAppearence.DEFAULT_UML_PORT;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return PropertyUtil.getCustomLabel(object, displayValue);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.papyrus.AbstractUMLViewLabelProvider.LabelSwitch#caseParameter(org.eclipse.uml2.uml.Parameter)
- */
- @Override
- public String caseParameter(Parameter object) {
- int displayValue = ICustomAppearence.DEFAULT_UML_PARAMETER;
- if (getLabelEditPolicy() != null) {
- displayValue = getLabelEditPolicy().getCurrentDisplayValue();
- }
- return ParameterUtil.getCustomLabel(object, displayValue);
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/DeploymentViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/DeploymentViewLabelProvider.java
deleted file mode 100644
index 8f1ca8d3c..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/DeploymentViewLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.UMLEditPartFactory;
-
-/**
- * View label provider for Deployment.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class DeploymentViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/PackageViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/PackageViewLabelProvider.java
deleted file mode 100644
index 05431e169..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/PackageViewLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UMLEditPartFactory;
-
-/**
- * View label provider for Package.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class PackageViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ProfileViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ProfileViewLabelProvider.java
deleted file mode 100644
index 261b1ea66..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/ProfileViewLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.UMLEditPartFactory;
-
-/**
- * View label provider for Profile.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class ProfileViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/SequenceViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/SequenceViewLabelProvider.java
deleted file mode 100644
index cd7013eb3..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/SequenceViewLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.UMLEditPartFactory;
-
-/**
- * View label provider for Sequence.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class SequenceViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/StateMachineViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/StateMachineViewLabelProvider.java
deleted file mode 100644
index adaa9d493..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/StateMachineViewLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.UMLEditPartFactory;
-
-/**
- * View label provider for StateMachine.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class StateMachineViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/UseCaseViewLabelProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/UseCaseViewLabelProvider.java
deleted file mode 100644
index f1b141bb0..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/UseCaseViewLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UMLEditPartFactory;
-
-/**
- * View label provider for Use Case.
- * @author Mikael Barbero <a href="mailto:mikael.barbero@obeo.fr">Mikael.barbero@obeo.fr</a>
- */
-public class UseCaseViewLabelProvider extends AbstractUMLViewLabelProvider {
-
- /**
- * The edit part factory.
- */
- private static final UMLEditPartFactory EDIT_PART_FACTORY = new UMLEditPartFactory();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.provider.IViewLabelProvider#isManaged(org.eclipse.gmf.runtime.notation.View)
- */
- public boolean isManaged(View view) {
- return EDIT_PART_FACTORY.createEditPart(null, view) instanceof ITextAwareEditPart;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
index 53ff29c39..ec2f1c71a 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/META-INF/MANIFEST.MF
@@ -2,12 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.compare.diagram.ide.ui.ecoretools;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ui.ecoretools.EcoreToolsIDEUICompare
+Bundle-Version: 2.2.0.qualifier
+Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal.EcoreToolsIDEUICompare
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.compare,
- org.eclipse.emf.compare.diagram.ide.ecoretools;bundle-version="2.1.0",
org.eclipse.emf.compare.diagram.ide.ui;bundle-version="2.0.0",
org.eclipse.emf.compare;bundle-version="3.0.0",
org.eclipse.jface;bundle-version="3.5.0",
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/about.ini b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/about.ini
new file mode 100644
index 000000000..eec22440e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/about.ini
@@ -0,0 +1,14 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=modeling32.png
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/about.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/about.properties
new file mode 100644
index 000000000..2e10f27e4
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/about.properties
@@ -0,0 +1,26 @@
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2006, 2012 Obeo 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:
+# * Obeo - Initial API and implementation
+# *
+# * </copyright>
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=EMF Compare EcoreTools Integration
+
+featureText=EMF Compare - EcoreTools Integration\n\
+Version: {featureVersion}\n\
+\n\
+(c) Copyright Obeo and others. 2006, 2012. All rights reserved.\n\
+\n\
+EMF Compare brings comparison to the Eclipse Modeling Framework\n\
+Visit http://www.eclipse.org/emf/compare
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/build.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/build.properties
index 3ff4800e6..2c4329be3 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/build.properties
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/build.properties
@@ -1,7 +1,24 @@
+ #*******************************************************************************
+ # Copyright (c) 2013 Obeo.
+ # 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:
+ # Obeo - initial API and implementation
+ #******************************************************************************/
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
- plugin.properties
-src.includes = about.html
+ plugin.properties,\
+ modeling32.png,\
+ about.properties,\
+ about.html,\
+ about.ini
+src.includes = about.html,\
+ about.ini,\
+ about.properties,\
+ modeling32.png
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/modeling32.png b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/modeling32.png
new file mode 100644
index 000000000..6b08de2ad
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/modeling32.png
Binary files differ
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.properties
index 058633e45..c170a5601 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.properties
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.properties
@@ -8,5 +8,5 @@
# Contributors:
# Obeo - initial API and implementation
################################################################################
-pluginName = EMF Compare EcoreTools Support IDE UI Integration
+pluginName = EMF Compare EcoreTools Integration
providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml
index 8b0c530a7..f8ac7177b 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/plugin.xml
@@ -1,10 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
+
+<!--
+ Copyright (c) 2013 Obeo.
+ 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:
+ Obeo - initial API and implementation
+-->
+
<plugin>
<extension
point="org.eclipse.compare.contentMergeViewers">
<viewer
- class="org.eclipse.emf.compare.diagram.ide.ui.ecoretools.DiagramContentMergeViewerCreator"
+ class="org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal.DiagramContentMergeViewerCreator"
extensions="diagramcompare_match, ecorediag"
id="org.eclipse.emf.compare.ide.ui.internal.ViewContentMergeViewer"
label="Diagram Compare Content Merge Viewer">
@@ -14,7 +26,7 @@
contentTypeId="org.eclipse.emf.compare.diagram.ide.ui.ecoretools">
</contentTypeBinding>
<viewer
- class="org.eclipse.emf.compare.diagram.ide.ui.ecoretools.DiagramContentMergeViewerCreator"
+ class="org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal.DiagramContentMergeViewerCreator"
extensions="diagramcompare_diff, ecorediag"
id="org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.ViewListContentMergeViewer"
label="Diagram Compare Content Merge Viewer">
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/pom.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/pom.xml
index de8e90f7d..299fede5f 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/pom.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/pom.xml
@@ -10,7 +10,7 @@
</parent>
<groupId>org.eclipse.emf.compare</groupId>
<artifactId>org.eclipse.emf.compare.diagram.ide.ui.ecoretools</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/DiagramContentMergeViewerCreator.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/DiagramContentMergeViewerCreator.java
index 8369eaddb..91ce11208 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/DiagramContentMergeViewerCreator.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/DiagramContentMergeViewerCreator.java
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.papyrus;
+package org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.IViewerCreator;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/EcoreToolsIDEUICompare.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/EcoreToolsIDEUICompare.java
index f3672dced..2e18e07c8 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/EcoreToolsIDEUICompare.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/internal/EcoreToolsIDEUICompare.java
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.ecoretools;
+package org.eclipse.emf.compare.diagram.ide.ui.ecoretools.internal;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF
index 6b616bafd..df070b60c 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Papyrus Diagram IDE UI Comparison Support
+Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.compare.diagram.ide.ui.papyrus;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ui.papyrus.PapyrusIDEUICompare
+Bundle-Version: 2.2.0.qualifier
+Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal.PapyrusIDEUICompare
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.compare,
@@ -25,7 +25,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.uml.diagram.common,
org.eclipse.papyrus.infra.emf.diagram.common;bundle-version="0.9.1",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.9.1",
- org.eclipse.emf.compare.diagram.ide.papyrus;bundle-version="2.0.0"
+ org.eclipse.papyrus.infra.core;bundle-version="0.9.1"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: Eclipse Modeling Project
-Export-Package: org.eclipse.emf.compare.diagram.ide.ui.papyrus
+Bundle-Vendor: %providerName
+Export-Package: org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal;x-internal:=true
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/about.ini b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/about.ini
new file mode 100644
index 000000000..eec22440e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/about.ini
@@ -0,0 +1,14 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=modeling32.png
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/about.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/about.properties
new file mode 100644
index 000000000..4c4332d9d
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/about.properties
@@ -0,0 +1,26 @@
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2006, 2012 Obeo 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:
+# * Obeo - Initial API and implementation
+# *
+# * </copyright>
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=EMF Compare Papyrus Integration
+
+featureText=EMF Compare - Papyrus Integration\n\
+Version: {featureVersion}\n\
+\n\
+(c) Copyright Obeo and others. 2006, 2012. All rights reserved.\n\
+\n\
+EMF Compare brings comparison to the Eclipse Modeling Framework\n\
+Visit http://www.eclipse.org/emf/compare
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/build.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/build.properties
index 0ef0f305d..3710dba02 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/build.properties
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/build.properties
@@ -1,5 +1,5 @@
#*******************************************************************************
- # Copyright (c) 2006, 2012 Obeo.
+ # Copyright (c) 2013 Obeo.
# 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
@@ -14,5 +14,11 @@ bin.includes = META-INF/,\
.,\
plugin.xml,\
about.html,\
- plugin.properties
-src.includes = about.html
+ plugin.properties,\
+ about.ini,\
+ about.properties,\
+ modeling32.png
+src.includes = about.html,\
+ about.ini,\
+ about.properties,\
+ modeling32.png
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/modeling32.png b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/modeling32.png
new file mode 100644
index 000000000..6b08de2ad
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/modeling32.png
Binary files differ
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.properties
index 1c9ef2305..a97fbbc68 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.properties
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.properties
@@ -8,5 +8,5 @@
# Contributors:
# Obeo - initial API and implementation
################################################################################
-pluginName = EMF Compare Papyrus Support IDE UI Integration
+pluginName = EMF Compare Papyrus Integration
providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml
index 92a475900..cf62be313 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/plugin.xml
@@ -1,10 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
+
+<!--
+ Copyright (c) 2013 Obeo.
+ 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:
+ Obeo - initial API and implementation
+-->
+
<plugin>
<extension
point="org.eclipse.compare.contentMergeViewers">
<viewer
- class="org.eclipse.emf.compare.diagram.ide.ui.papyrus.DiagramContentMergeViewerCreator"
+ class="org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal.DiagramContentMergeViewerCreator"
extensions="diagramcompare_match, diagramcompare_diff, di, notation"
id="org.eclipse.emf.compare.ui.papyrus.contentviewer"
label="Diagram Compare Content Merge Viewer">
@@ -21,7 +33,7 @@
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
- describer="org.eclipse.emf.compare.diagram.ide.papyrus.DiContentDescriptor"
+ describer="org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal.DiContentDescriptor"
file-extensions="di"
id="org.eclipse.emf.compare.papyrus.ui.papyruscontenttype"
name="Papyrus DI Content Type"
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/pom.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/pom.xml
index e5b6c57a9..b73b43cd2 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/pom.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/pom.xml
@@ -10,7 +10,7 @@
</parent>
<groupId>org.eclipse.emf.compare</groupId>
<artifactId>org.eclipse.emf.compare.diagram.ide.ui.papyrus</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/DiContentDescriptor.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiContentDescriptor.java
index 8d094ff43..93b9c2953 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.papyrus/src/org/eclipse/emf/compare/diagram/ide/papyrus/DiContentDescriptor.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiContentDescriptor.java
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.papyrus;
+package org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal;
import java.io.BufferedReader;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/DiagramContentMergeViewerCreator.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiagramContentMergeViewerCreator.java
index 3c03cc2e5..f3d3a91aa 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.ecoretools/src/org/eclipse/emf/compare/diagram/ide/ui/ecoretools/DiagramContentMergeViewerCreator.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/DiagramContentMergeViewerCreator.java
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.ecoretools;
+package org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.IViewerCreator;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/PapyrusIDEUICompare.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/PapyrusIDEUICompare.java
index 926cd352f..c645648df 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/PapyrusIDEUICompare.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/PapyrusIDEUICompare.java
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.papyrus;
+package org.eclipse.emf.compare.diagram.ide.ui.papyrus.internal;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide.ui/META-INF/MANIFEST.MF
index c806d8934..bd73468dc 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.compare.diagram.ide.ui;singleton:=true
Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ui.GMFCompareUIPlugin
+Bundle-Activator: org.eclipse.emf.compare.diagram.ide.ui.internal.CompareDiagramIDEUIPlugin
Require-Bundle: org.eclipse.compare,
org.eclipse.emf.compare,
org.eclipse.gmf.runtime.diagram.ui,
@@ -11,21 +11,17 @@ Require-Bundle: org.eclipse.compare,
org.eclipse.emf.compare.ide;bundle-version="3.0.0",
org.eclipse.emf.compare.ide.ui;bundle-version="2.1.0",
org.eclipse.emf.compare.rcp.ui;bundle-version="2.1.0",
- org.eclipse.emf.compare.diagram.ide;bundle-version="2.0.0",
org.eclipse.emf.edit.ui;bundle-version="2.5.0",
org.eclipse.emf.ecore.edit;bundle-version="2.5.0",
org.eclipse.emf.compare.edit;bundle-version="3.0.0"
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.emf.compare.diagram.ide.ui,
- org.eclipse.emf.compare.diagram.ide.ui.decoration,
- org.eclipse.emf.compare.diagram.ide.ui.decoration.provider,
- org.eclipse.emf.compare.diagram.ide.ui.internal.accessor,
- org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer,
- org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram,
- org.eclipse.emf.compare.diagram.ide.ui.internal.preferences,
- org.eclipse.emf.compare.diagram.ide.ui.mergeviewer
+Export-Package: org.eclipse.emf.compare.diagram.ide.ui.internal;x-internal:=true,
+ org.eclipse.emf.compare.diagram.ide.ui.internal.accessor;x-internal:=true,
+ org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.factory;x-internal:=true,
+ org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram;x-internal:=true,
+ org.eclipse.emf.compare.diagram.ide.ui.internal.preferences;x-internal:=true
Bundle-Vendor: %providerName
-Import-Package: com.google.common.base;version="10.0.1",
- com.google.common.collect;version="10.0.1"
+Import-Package: com.google.common.base;version="[11.0.0,15.0.0)",
+ com.google.common.collect;version="[11.0.0,15.0.0)"
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/build.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui/build.properties
index c1268f527..70980bf51 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/build.properties
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/build.properties
@@ -1,14 +1,13 @@
-###############################################################################
-# Copyright (c) 2009, 2012 Tobias Jaehnel 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:
-# Tobias Jaehnel - Bug#241385
-# Obeo - rework on generic gmf comparison
-###############################################################################
+ #*******************************************************************************
+ # Copyright (c) 2013 Obeo.
+ # 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:
+ # Obeo - initial API and implementation
+ #******************************************************************************/
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml
index 13f9988af..c870dff40 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/plugin.xml
@@ -1,16 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
+
+<!--
+ Copyright (c) 2013 Obeo.
+ 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:
+ Obeo - initial API and implementation
+-->
+
<plugin>
- <extension
- point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <decoratorProvider
- class="org.eclipse.emf.compare.diagram.ide.ui.decoration.provider.DiffDecoratorProvider">
- <Priority
- name="Lowest">
- </Priority>
- </decoratorProvider>
- </extension>
<extension
point="org.eclipse.ui.preferencePages">
@@ -32,5 +35,13 @@
ranking="40">
</factory>
</extension>
+ <extension
+ point="org.eclipse.emf.compare.rcp.ui.filters">
+ <filter
+ activeByDefault="true"
+ class="org.eclipse.emf.compare.diagram.ide.ui.structuremergeviewer.filters.GMFRefinedElementsFilter"
+ label="Diagram Refined elements">
+ </filter>
+ </extension>
</plugin>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/AbstractEditPartMergeViewer.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/AbstractEditPartMergeViewer.java
deleted file mode 100644
index 908b96ec0..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/AbstractEditPartMergeViewer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui;
-
-import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
-import org.eclipse.gef.ui.parts.AbstractEditPartViewer;
-import org.eclipse.jface.viewers.ISelection;
-
-/**
- * Abstract viewer for comparison of graphical elements.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- * @since 3.0
- */
-public abstract class AbstractEditPartMergeViewer extends AbstractEditPartViewer {
-
- /** The side that manages this viewer. */
- private final MergeViewerSide fSide;
-
- /**
- * Constructor.
- *
- * @param side
- * The side having to be handle.
- */
- public AbstractEditPartMergeViewer(MergeViewerSide side) {
- fSide = side;
- }
-
- /**
- * Set the input of the viewer.
- *
- * @param object
- * The input.
- */
- public abstract void setInput(Object object);
-
- /**
- * Returns the wrapped {@link AbstractEditPartViewer}.
- *
- * @return The viewer.
- */
- protected abstract AbstractEditPartViewer getGraphicalViewer();
-
- /**
- * {@inheritDoc}
- */
- public MergeViewerSide getSide() {
- return fSide;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
- @Override
- public ISelection getSelection() {
- return getGraphicalViewer().getSelection();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionProvider(org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setSelection(ISelection selection) {
- getGraphicalViewer().setSelection(selection);
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/AbstractGraphicalMergeViewer.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/AbstractGraphicalMergeViewer.java
deleted file mode 100644
index 401ee4d0c..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/AbstractGraphicalMergeViewer.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui;
-
-import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
-import org.eclipse.gef.ui.parts.AbstractEditPartViewer;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Abstract graphical merge viewer for comparison of graphical elements.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- * @since 3.0
- */
-public abstract class AbstractGraphicalMergeViewer extends AbstractEditPartMergeViewer {
-
- /** The diagram edit domain. */
- protected DiagramEditDomain editDomain;
-
- /** Listener for forwarding selection. */
- private final ISelectionChangedListener fForwardingSelectionListener;
-
- /**
- * The constructor.
- *
- * @param parent
- * The parent composite.
- * @param side
- * The side having to be handle.
- */
- public AbstractGraphicalMergeViewer(Composite parent, MergeViewerSide side) {
- super(side);
-
- editDomain = new DiagramEditDomain(null);
- editDomain.setCommandStack(new DiagramCommandStack(editDomain));
-
- setControl(createControl(parent));
- hookControl();
-
- fForwardingSelectionListener = new ForwardingViewerSelectionListener();
- // getGraphicalViewer().addSelectionChangedListener(fForwardingSelectionListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gef.ui.parts.AbstractEditPartViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
- */
- @Override
- protected void handleDispose(DisposeEvent event) {
- // getGraphicalViewer().removeSelectionChangedListener(fForwardingSelectionListener);
- super.handleDispose(event);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.AbstractEditPartMergeViewer#getGraphicalViewer()
- */
- @Override
- protected abstract AbstractEditPartViewer getGraphicalViewer();
-
- /**
- * Listener for forwarding selection.
- */
- private class ForwardingViewerSelectionListener implements ISelectionChangedListener {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- fireSelectionChanged();
- }
-
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/GMFCompareUIPlugin.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/GMFCompareUIPlugin.java
deleted file mode 100644
index 2d560452c..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/GMFCompareUIPlugin.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 Tobias Jaehnel 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:
- * Tobias Jaehnel - Bug#241385
- * Obeo - rework on generic gmf comparison
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui;
-
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- *
- * @author Tobias Jaehnel <tjaehnel@gmail.com>
- * @author <a href="mailto:stephane.bouchet@obeo.fr">Stephane Bouchet</a>
- */
-public class GMFCompareUIPlugin extends AbstractUIPlugin {
-
- /** The plug-in ID. */
- public static final String PLUGIN_ID = "org.eclipse.emf.compare.diagram.ide.ui"; //$NON-NLS-1$
-
- /** The constant for the moved icon. */
- public static final String ICON_MOVED = "EMFCompareGMF.icon.moved"; //$NON-NLS-1$
-
- /** The constant for the added icon. */
- public static final String ICON_ADDED = "EMFCompareGMF.icon.added"; //$NON-NLS-1$
-
- /** The constant for the deleted icon. */
- public static final String ICON_DELETED = "EMFCompareGMF.icon.deleted"; //$NON-NLS-1$
-
- /** The shared instance. */
- private static GMFCompareUIPlugin plugin;
-
- /**
- * The constructor.
- */
- public GMFCompareUIPlugin() {
- // Do nothing
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static GMFCompareUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
- */
- @Override
- protected void initializeImageRegistry(ImageRegistry registry) {
- registry.put(ICON_ADDED, PlatformUI.getWorkbench().getSharedImages().getImage(
- ISharedImages.IMG_OBJ_ADD));
- registry.put(ICON_DELETED, PlatformUI.getWorkbench().getSharedImages().getImage(
- ISharedImages.IMG_ETOOL_DELETE));
- registry.put(ICON_MOVED, PlatformUI.getWorkbench().getSharedImages().getImage(
- ISharedImages.IMG_ELCL_SYNCED));
- }
-
- /**
- * Returns a SWT image from registry.
- *
- * @param key
- * the image key
- * @return the image from the registry
- */
- public Image getImage(String key) {
- return getImageRegistry().get(key);
- }
-
- /**
- * Utility method to check if the object is a node or edge. Annotation can be set only on these types.
- *
- * @param gmfView
- * the view to be tested
- * @return true if the object is instance of Node or Edge
- */
- public static boolean isValid(Object gmfView) {
- return gmfView instanceof Node || gmfView instanceof Edge;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/AbstractDifferenceDecorator.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/AbstractDifferenceDecorator.java
deleted file mode 100644
index 560cca676..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/AbstractDifferenceDecorator.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.emf.compare.diagram.ide.ui.decoration;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.LineBorder;
-import org.eclipse.draw2d.PolylineConnection;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
-import org.eclipse.emf.compare.diagram.Hide;
-import org.eclipse.emf.compare.diagram.LabelChange;
-import org.eclipse.emf.compare.diagram.Show;
-import org.eclipse.emf.compare.diagram.ide.ui.decoration.provider.DiffDecoratorProvider;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoration;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * The diff decorator superclass.
- *
- * @author <a href="mailto:stephane.bouchet@obeo.fr">Stephane Bouchet</a>
- */
-public abstract class AbstractDifferenceDecorator implements IDecorator {
-
- /** the notificationListener. */
- protected NotificationListener notificationListener = new NotificationListener() {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
- // on each notification, just refresh the decorator.
- refresh();
- }
- };
-
- /** the view target. */
- private IDecoratorTarget decoratorTarget;
-
- /** the decoration list to place on the target. */
- private List<IDecoration> decorationsTarget;
-
- /**
- * Constructor.
- *
- * @param target
- * the target to decorate.
- */
- protected AbstractDifferenceDecorator(IDecoratorTarget target) {
- this.decoratorTarget = target;
- }
-
- /**
- * Add a list of decoration to the list.
- *
- * @param decorations
- * the decorations to add
- * @return true if add has been correctly done.
- */
- private boolean addDecorations(List<IDecoration> decorations) {
- if (decorationsTarget == null) {
- decorationsTarget = new ArrayList<IDecoration>(decorations.size());
- }
- return decorationsTarget.addAll(decorations);
- }
-
- /**
- * Returns the decoratorTarget.
- *
- * @return The decoratorTarget.
- */
- public IDecoratorTarget getTarget() {
- return decoratorTarget;
- }
-
- /**
- * Removes all the decorations if they exists.
- */
- protected void removeDecorations() {
- if (decorationsTarget != null) {
- for (IDecoration decoration : decorationsTarget) {
- decoratorTarget.removeDecoration(decoration);
- }
- decorationsTarget.clear();
- }
- }
-
- protected IGraphicalEditPart getTargetEditPart() {
- return (IGraphicalEditPart)decoratorTarget.getAdapter(IGraphicalEditPart.class);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator#refresh()
- */
- public final void refresh() {
- removeDecorations();
- if (DiffDecoratorProvider.shouldDecorate(getTarget())) {
- final IGraphicalEditPart gep = getTargetEditPart();
- final View view = gep.getNotationView();
- final DiagramDiff diff = DiffDecoratorProvider.getRelatedSelectedDifference(view);
- if (diff instanceof Hide) {
- addDecorations(getHidedDecorations());
- } else if (diff instanceof Show) {
- addDecorations(getShowedDecorations());
- } else if (diff instanceof LabelChange) {
- addDecorations(getLabelModifiedDecorations());
- } else if (diff.getKind() == DifferenceKind.MOVE) {
- addDecorations(getMovedDecorations());
- } else if (diff.getKind() == DifferenceKind.CHANGE) {
- addDecorations(getModifiedDecorations());
- } else if (diff.getKind() == DifferenceKind.ADD) {
- addDecorations(getAddedDecorations());
- } else if (diff.getKind() == DifferenceKind.DELETE) {
- addDecorations(getRemovedDecorations());
- }
- }
- }
-
- /**
- * Utility method to highlight an edge with specified color and line width.
- *
- * @param figure
- * the connection figure to highlight
- * @param color
- * the highlight color to use
- * @param size
- * the line width
- */
- protected void highlightEdge(IFigure figure, Color color, int size) {
- if (figure instanceof PolylineConnection) {
- figure.setBackgroundColor(color);
- figure.setForegroundColor(color);
- ((PolylineConnection)figure).setLineWidth(size);
- }
- }
-
- /**
- * Utility method to highlight a node.
- *
- * @param figure
- * the node to highlight
- * @param color
- * the highlight color to use
- * @param size
- * the line border width
- */
- protected void highlightNode(IFigure figure, Color color, int size) {
- figure.setBorder(new LineBorder(color, size));
- figure.setOpaque(false);
- }
-
- /**
- * Method used to create a specific set of decorations for the {@link DiffDecoratorProvider#DIFF_MODIFIED}
- * decoration.
- *
- * @return a list of {@link IDecoration}
- */
- protected abstract List<IDecoration> getModifiedDecorations();
-
- /**
- * Method used to create a specific set of decorations for the {@link DiffDecoratorProvider#DIFF_ADDED}
- * decoration.
- *
- * @return a list of {@link IDecoration}
- */
- protected abstract List<IDecoration> getAddedDecorations();
-
- /**
- * Method used to create a specific set of decorations for the {@link DiffDecoratorProvider#DIFF_REMOVED}
- * decoration.
- *
- * @return a list of {@link IDecoration}
- */
- protected abstract List<IDecoration> getRemovedDecorations();
-
- /**
- * Method used to create a specific set of decorations for the {@link DiffDecoratorProvider#DIFF_MOVED}
- * decoration.
- *
- * @return a list of {@link IDecoration}
- */
- protected abstract List<IDecoration> getMovedDecorations();
-
- /**
- * Method used to create a specific set of decorations for the {@link DiffDecoratorProvider#DIFF_HIDED}
- * decoration.
- *
- * @return a list of {@link IDecoration}
- */
- protected abstract List<IDecoration> getHidedDecorations();
-
- /**
- * Method used to create a specific set of decorations for the {@link DiffDecoratorProvider#DIFF_SHOWED}
- * decoration.
- *
- * @return a list of {@link IDecoration}
- */
- protected abstract List<IDecoration> getShowedDecorations();
-
- /**
- * Method used to create a specific set of decorations for the
- * {@link DiffDecoratorProvider#DIFF_LABEL_MODIFIED} decoration.
- *
- * @return a list of {@link IDecoration}
- */
- protected abstract List<IDecoration> getLabelModifiedDecorations();
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DeleteGhostImageFigure.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DeleteGhostImageFigure.java
deleted file mode 100644
index b4f643ac9..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DeleteGhostImageFigure.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.decoration;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.RectangleFigure;
-
-/**
- * Figure to represent a phantom of a graphical object.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- */
-public class DeleteGhostImageFigure extends RectangleFigure {
-
- /**
- * Constructor.
- */
- public DeleteGhostImageFigure() {
- super();
- }
-
- // public DeleteGhostImageFigure(IFigure figure, int alpha, RGB transparency) {
- // super(figure, alpha, transparency);
- // }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.draw2d.Shape#paintFigure(org.eclipse.draw2d.Graphics)
- */
- @Override
- public void paintFigure(Graphics graphics) {
- super.paintFigure(graphics);
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffDecorationEditPolicy.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffDecorationEditPolicy.java
deleted file mode 100644
index e67fd1b81..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffDecorationEditPolicy.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.decoration;
-
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DecorationEditPolicy;
-
-/**
- * DecorationEditPolicy which forces the creation of decorators after each refresh.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- */
-public class DiffDecorationEditPolicy extends DecorationEditPolicy {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.DecorationEditPolicy#refresh()
- */
- @Override
- public void refresh() {
- decorators = null;
- super.refresh();
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffEdgeDecorator.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffEdgeDecorator.java
deleted file mode 100644
index a7fd80c36..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffEdgeDecorator.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.emf.compare.diagram.ide.ui.decoration;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.emf.compare.diagram.ide.ui.GMFCompareUIPlugin;
-import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoration;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Decorator for edges.
- *
- * @author <a href="mailto:stephane.bouchet@obeo.fr">Stephane Bouchet</a>
- */
-public class DiffEdgeDecorator extends AbstractDifferenceDecorator {
-
- /**
- * Constructor.
- *
- * @param target
- * the edge to decorate.
- */
- public DiffEdgeDecorator(IDecoratorTarget target) {
- super(target);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator#activate()
- */
- public void activate() {
- final IGraphicalEditPart gep = getTargetEditPart();
- DiagramEventBroker.getInstance(gep.getEditingDomain()).addNotificationListener(gep.getNotationView(),
- NotationPackage.eINSTANCE.getNode_LayoutConstraint(), notificationListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator#deactivate()
- */
- public void deactivate() {
- removeDecorations();
- final IGraphicalEditPart gep = getTargetEditPart();
- DiagramEventBroker.getInstance(gep.getEditingDomain()).removeNotificationListener(
- gep.getNotationView(), NotationPackage.eINSTANCE.getNode_LayoutConstraint(),
- notificationListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getModifiedDecorations()
- */
- @Override
- protected List<IDecoration> getModifiedDecorations() {
- highlightEdge(getTargetEditPart().getFigure(), ColorConstants.blue, 2);
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getAddedDecorations()
- */
- @Override
- protected List<IDecoration> getAddedDecorations() {
- final ArrayList<IDecoration> decorations = new ArrayList<IDecoration>(1);
- highlightEdge(getTargetEditPart().getFigure(), ColorConstants.green, 2);
- final Image added = GMFCompareUIPlugin.getDefault().getImage(GMFCompareUIPlugin.ICON_ADDED);
- final IDecoration decoration2 = getTarget().addConnectionDecoration(added, 50, false);
- decorations.add(decoration2);
- return decorations;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getRemovedDecorations()
- */
- @Override
- protected List<IDecoration> getRemovedDecorations() {
- final ArrayList<IDecoration> decorations = new ArrayList<IDecoration>(1);
- highlightEdge(getTargetEditPart().getFigure(), ColorConstants.red, 2);
- final Image deleted = GMFCompareUIPlugin.getDefault().getImage(GMFCompareUIPlugin.ICON_DELETED);
- final IDecoration decoration2 = getTarget().addConnectionDecoration(deleted, 50, false);
- decorations.add(decoration2);
- return decorations;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getMovedDecorations()
- */
- @Override
- protected List<IDecoration> getMovedDecorations() {
- final ArrayList<IDecoration> decorations = new ArrayList<IDecoration>(1);
- final Image moved = GMFCompareUIPlugin.getDefault().getImage(GMFCompareUIPlugin.ICON_MOVED);
- final IDecoration decoration = getTarget().addConnectionDecoration(moved, 50, false);
- decorations.add(decoration);
- return decorations;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getHidedDecorations()
- */
- @Override
- protected List<IDecoration> getHidedDecorations() {
- highlightEdge(getTargetEditPart().getFigure(), ColorConstants.orange, 2);
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getShowedDecorations()
- */
- @Override
- protected List<IDecoration> getShowedDecorations() {
- highlightEdge(getTargetEditPart().getFigure(), ColorConstants.orange, 2);
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getLabelModifiedDecorations()
- */
- @Override
- protected List<IDecoration> getLabelModifiedDecorations() {
- return Collections.emptyList();
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffLabelDecorator.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffLabelDecorator.java
deleted file mode 100644
index fffb32e8d..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffLabelDecorator.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.emf.compare.diagram.ide.ui.decoration;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.LineBorder;
-import org.eclipse.emf.compare.diagram.ide.ui.GMFCompareUIPlugin;
-import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoration;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Decorator for labels.
- *
- * @author <a href="mailto:stephane.bouchet@obeo.fr">Stephane Bouchet</a>
- */
-public class DiffLabelDecorator extends AbstractDifferenceDecorator {
-
- /**
- * Constructor.
- *
- * @param target
- * the label to decorate.
- */
- public DiffLabelDecorator(IDecoratorTarget target) {
- super(target);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator#activate()
- */
- public void activate() {
- final IGraphicalEditPart gep = getTargetEditPart();
- DiagramEventBroker.getInstance(gep.getEditingDomain()).addNotificationListener(gep.getNotationView(),
- NotationPackage.eINSTANCE.getNode_LayoutConstraint(), notificationListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator#deactivate()
- */
- public void deactivate() {
- removeDecorations();
- final IGraphicalEditPart gep = getTargetEditPart();
- DiagramEventBroker.getInstance(gep.getEditingDomain()).removeNotificationListener(
- gep.getNotationView(), NotationPackage.eINSTANCE.getNode_LayoutConstraint(),
- notificationListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getModifiedDecorations()
- */
- @Override
- protected List<IDecoration> getModifiedDecorations() {
- getTargetEditPart().getContentPane().setBorder(new LineBorder(ColorConstants.blue, 2));
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getAddedDecorations()
- */
- @Override
- protected List<IDecoration> getAddedDecorations() {
- getTargetEditPart().getContentPane().setBorder(new LineBorder(ColorConstants.green, 2));
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getRemovedDecorations()
- */
- @Override
- protected List<IDecoration> getRemovedDecorations() {
- getTargetEditPart().getContentPane().setBorder(new LineBorder(ColorConstants.red, 2));
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getMovedDecorations()
- */
- @Override
- protected List<IDecoration> getMovedDecorations() {
- final ArrayList<IDecoration> decorations = new ArrayList<IDecoration>(1);
- final Image moved = GMFCompareUIPlugin.getDefault().getImage(GMFCompareUIPlugin.ICON_MOVED);
- final IDecoration decoration = getTarget().addShapeDecoration(moved, Direction.NORTH_EAST, 1, false);
- decorations.add(decoration);
- return decorations;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getHidedDecorations()
- */
- @Override
- protected List<IDecoration> getHidedDecorations() {
- getTargetEditPart().getContentPane().setBorder(new LineBorder(ColorConstants.orange, 2));
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getShowedDecorations()
- */
- @Override
- protected List<IDecoration> getShowedDecorations() {
- getTargetEditPart().getContentPane().setBorder(new LineBorder(ColorConstants.orange, 2));
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getLabelModifiedDecorations()
- */
- @Override
- protected List<IDecoration> getLabelModifiedDecorations() {
- getTargetEditPart().getContentPane().setBorder(new LineBorder(ColorConstants.blue, 2));
- return Collections.emptyList();
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffNodeDecorator.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffNodeDecorator.java
deleted file mode 100644
index 1ba676b97..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/DiffNodeDecorator.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.emf.compare.diagram.ide.ui.decoration;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.emf.compare.diagram.ide.ui.GMFCompareUIPlugin;
-import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoration;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Decorator for nodes.
- *
- * @author <a href="mailto:stephane.bouchet@obeo.fr">Stephane Bouchet</a>
- */
-public class DiffNodeDecorator extends AbstractDifferenceDecorator {
-
- /**
- * Constructor.
- *
- * @param target
- * the node to decorate.
- */
- public DiffNodeDecorator(IDecoratorTarget target) {
- super(target);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator#activate()
- */
- public void activate() {
- final IGraphicalEditPart gep = getTargetEditPart();
- DiagramEventBroker.getInstance(gep.getEditingDomain()).addNotificationListener(gep.getNotationView(),
- NotationPackage.eINSTANCE.getNode_LayoutConstraint(), notificationListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator#deactivate()
- */
- public void deactivate() {
- removeDecorations();
- final IGraphicalEditPart gep = getTargetEditPart();
- DiagramEventBroker.getInstance(gep.getEditingDomain()).removeNotificationListener(
- gep.getNotationView(), NotationPackage.eINSTANCE.getNode_LayoutConstraint(),
- notificationListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getMovedDecorations()
- */
- @Override
- protected List<IDecoration> getMovedDecorations() {
- final ArrayList<IDecoration> decorations = new ArrayList<IDecoration>(1);
- final Image moved = GMFCompareUIPlugin.getDefault().getImage(GMFCompareUIPlugin.ICON_MOVED);
- final IDecoration decoration = getTarget().addShapeDecoration(moved, Direction.NORTH_EAST, 1, false);
- decorations.add(decoration);
- return decorations;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getModifiedDecorations()
- */
- @Override
- protected List<IDecoration> getModifiedDecorations() {
- highlightNode(getTargetEditPart().getFigure(), ColorConstants.blue, 2);
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getAddedDecorations()
- */
- @Override
- protected List<IDecoration> getAddedDecorations() {
- final ArrayList<IDecoration> decorations = new ArrayList<IDecoration>(1);
- highlightNode(getTargetEditPart().getFigure(), ColorConstants.green, 2);
- final Image added = GMFCompareUIPlugin.getDefault().getImage(GMFCompareUIPlugin.ICON_ADDED);
- final IDecoration decoration2 = getTarget().addShapeDecoration(added, Direction.NORTH_WEST, 1, false);
- decorations.add(decoration2);
- return decorations;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getHidedDecorations()
- */
- @Override
- protected List<IDecoration> getHidedDecorations() {
- highlightNode(getTargetEditPart().getFigure(), ColorConstants.orange, 2);
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getLabelModifiedDecorations()
- */
- @Override
- protected List<IDecoration> getLabelModifiedDecorations() {
- highlightNode(getTargetEditPart().getFigure(), ColorConstants.blue, 2);
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getRemovedDecorations()
- */
- @Override
- protected List<IDecoration> getRemovedDecorations() {
- final ArrayList<IDecoration> decorations = new ArrayList<IDecoration>(1);
- highlightNode(getTargetEditPart().getFigure(), ColorConstants.red, 2);
- final Image deleted = GMFCompareUIPlugin.getDefault().getImage(GMFCompareUIPlugin.ICON_DELETED);
- final IDecoration decoration2 = getTarget().addShapeDecoration(deleted, Direction.NORTH_WEST, 1,
- false);
- decorations.add(decoration2);
- return decorations;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.ide.ui.decoration.AbstractDifferenceDecorator#getShowedDecorations()
- */
- @Override
- protected List<IDecoration> getShowedDecorations() {
- highlightNode(getTargetEditPart().getFigure(), ColorConstants.orange, 2);
- return Collections.emptyList();
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/provider/DiffDecoratorProvider.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/provider/DiffDecoratorProvider.java
deleted file mode 100644
index c146f741d..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/provider/DiffDecoratorProvider.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.decoration.provider;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
-import org.eclipse.emf.compare.diagram.ide.ui.EMFCompareDiagramIDEUIMessages;
-import org.eclipse.emf.compare.diagram.ide.ui.GMFCompareUIPlugin;
-import org.eclipse.emf.compare.diagram.ide.ui.decoration.DiffEdgeDecorator;
-import org.eclipse.emf.compare.diagram.ide.ui.decoration.DiffLabelDecorator;
-import org.eclipse.emf.compare.diagram.ide.ui.decoration.DiffNodeDecorator;
-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.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-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;
-
-/**
- * The graphical decorator for comparison.
- *
- * @author <a href="mailto:stephane.bouchet@obeo.fr">Stephane Bouchet</a>
- */
-public class DiffDecoratorProvider extends AbstractProvider implements IDecoratorProvider {
-
- /** The decorator marker for diff. used also to annotate the diagrams during comparison. */
- public static final String DIFF = "diff-marker"; //$NON-NLS-1$
-
- /** Constant for added element. */
- public static final String DIFF_ADDED = "diff-added"; //$NON-NLS-1$
-
- /** Constant for removed element. */
- public static final String DIFF_REMOVED = "diff-removed"; //$NON-NLS-1$
-
- /** Constant for moved element. */
- public static final String DIFF_MOVED = "diff-moved"; //$NON-NLS-1$
-
- /** Constant for hided element. */
- public static final String DIFF_HIDED = "diff-hided"; //$NON-NLS-1$
-
- /** Constant for showed element. */
- public static final String DIFF_SHOWED = "diff-showed"; //$NON-NLS-1$
-
- /** Constant for modified element. */
- public static final String DIFF_MODIFIED = "diff-modified"; //$NON-NLS-1$
-
- /** Constant for modified element. */
- public static final String DIFF_LABEL_MODIFIED = "diff-label-modified"; //$NON-NLS-1$
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.common.core.service.IProvider#provides(org.eclipse.gmf.runtime.common.core.service.IOperation)
- */
- public boolean provides(IOperation operation) {
- if (operation instanceof CreateDecoratorsOperation) {
- final IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation)operation)
- .getDecoratorTarget();
- return shouldDecorate(decoratorTarget);
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider#createDecorators(org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget)
- */
- public void createDecorators(IDecoratorTarget decoratorTarget) {
- final View view = (View)decoratorTarget.getAdapter(View.class);
- if (shouldDecorate(view)) {
- final ITextAwareEditPart label = (ITextAwareEditPart)decoratorTarget
- .getAdapter(ITextAwareEditPart.class);
-
- if (label != null && isNode(view)) {
- // a label = a node representation + a textholder
- decoratorTarget.installDecorator(DIFF, new DiffLabelDecorator(decoratorTarget));
- } else if (isEdge(view)) {
- decoratorTarget.installDecorator(DIFF, new DiffEdgeDecorator(decoratorTarget));
- } else if (isNode(view)) {
- decoratorTarget.installDecorator(DIFF, new DiffNodeDecorator(decoratorTarget));
- } else {
- final String errorMsg = EMFCompareDiagramIDEUIMessages.getString(
- "DiffDecoratorProvider.UnknownView", view); //$NON-NLS-1$
- final IStatus status = new Status(IStatus.WARNING, GMFCompareUIPlugin.PLUGIN_ID, errorMsg);
- GMFCompareUIPlugin.getDefault().getLog().log(status);
- }
- }
- }
-
- /**
- * Check the EAnnotations list of the view to find the diff one.
- *
- * @param decoratorTarget
- * the target to test
- * @return true if target should be decorated ( diff EAnnotation is set )
- */
- public static boolean shouldDecorate(IDecoratorTarget decoratorTarget) {
- return shouldDecorate((View)decoratorTarget.getAdapter(View.class));
- }
-
- /**
- * Check the EAnnotations list of the view to find the diff one.
- *
- * @param view
- * the view element to check
- * @return true if view should be decorated ( diff EAnnotation is set )
- */
- public static boolean shouldDecorate(final View view) {
- return !(view instanceof Diagram) && getRelatedSelectedDifference(view) != null;
- }
-
- /**
- * Check if the view is a link representation.
- *
- * @param view
- * the gmf view
- * @return true if the view is an edge
- */
- private static boolean isEdge(View view) {
- return view != null && (view instanceof Edge) && view.eContainer() instanceof Diagram;
- }
-
- /**
- * Check if the view is a node representation.
- *
- * @param view
- * the gmf view
- * @return true if the view is a node
- */
- private static boolean isNode(View view) {
- return view != null && (view instanceof Node);
- }
-
- /**
- * Get the graphical difference in relation to the given view.
- *
- * @param view
- * The view.
- * @return The graphical difference.
- */
- public static DiagramDiff getRelatedSelectedDifference(View view) {
- SelectedDiffAdapter adapter = getSelectedDiffAdapter(view);
- if (adapter != null) {
- Notifier notifier = adapter.getTarget();
- if (notifier instanceof DiagramDiff) {
- return (DiagramDiff)notifier;
- }
- }
- return null;
- }
-
- /**
- * Get a <code>SelectedDiffAdapter</code> if it exists, on the given view.
- *
- * @param view
- * The view.
- * @return The adapter or null.
- */
- private static SelectedDiffAdapter getSelectedDiffAdapter(View view) {
- Iterator<Adapter> adapters = view.eAdapters().iterator();
- while (adapters.hasNext()) {
- Adapter adapter = adapters.next();
- if (adapter.isAdapterForType(DiagramDiff.class)) {
- return (SelectedDiffAdapter)adapter;
- }
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/provider/SelectedDiffAdapter.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/provider/SelectedDiffAdapter.java
deleted file mode 100644
index 7a72447f4..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/decoration/provider/SelectedDiffAdapter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.decoration.provider;
-
-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.compare.diagram.DiagramDiff;
-
-/**
- * Adapter to retrieve the graphical differences on an object.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- */
-public class SelectedDiffAdapter implements Adapter {
-
- /** A graphical difference. */
- private DiagramDiff diff;
-
- /**
- * Constructor.
- *
- * @param diff
- * A graphical difference.
- */
- public SelectedDiffAdapter(DiagramDiff diff) {
- this.diff = diff;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
- // TODO Auto-generated method stub
-
- }
-
- public Notifier getTarget() {
- return diff;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier)
- */
- public void setTarget(Notifier newTarget) {
- if (newTarget instanceof DiagramDiff) {
- this.diff = (DiagramDiff)newTarget;
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(java.lang.Object)
- */
- public boolean isAdapterForType(Object type) {
- return type == DiagramDiff.class;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/AbstractGraphicalMergeViewer.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/AbstractGraphicalMergeViewer.java
new file mode 100644
index 000000000..74c0bd6a9
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/AbstractGraphicalMergeViewer.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.diagram.ide.ui.internal;
+
+import org.eclipse.emf.compare.rcp.ui.mergeviewer.MergeViewer;
+import org.eclipse.gef.ui.parts.AbstractEditPartViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * Abstract graphical merge viewer for comparison of graphical elements.<br>
+ * Inspired from org.eclipse.emf.compare.rcp.ui.mergeviewer.StructuredMergeViewer.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ * @since 3.0
+ */
+public abstract class AbstractGraphicalMergeViewer extends MergeViewer {
+
+ /**
+ * Control of the viewer.
+ */
+ private final Control fControl;
+
+ /**
+ * The constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param side
+ * The side having to be handle.
+ */
+ public AbstractGraphicalMergeViewer(Composite parent, MergeViewerSide side) {
+ super(side);
+ fControl = createControl(parent);
+ hookControl(fControl);
+ }
+
+ @Override
+ public Control getControl() {
+ return fControl;
+ }
+
+ /**
+ * It creates and returns the control of the viewer.
+ *
+ * @param parent
+ * The parent composite.
+ * @return The control.
+ */
+ protected abstract Control createControl(Composite parent);
+
+ /**
+ * Get the encapsulated GEF viewer.
+ *
+ * @return The graphical viewer.
+ */
+ protected abstract AbstractEditPartViewer getGraphicalViewer();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
+ */
+ @Override
+ public ISelection getSelection() {
+ return getGraphicalViewer().getSelection();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers.ISelection, boolean)
+ */
+ @Override
+ public void setSelection(ISelection selection, boolean reveal) {
+ getGraphicalViewer().setSelection(selection);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/CompareDiagramIDEUIPlugin.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/CompareDiagramIDEUIPlugin.java
new file mode 100644
index 000000000..a60d946e1
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/CompareDiagramIDEUIPlugin.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.diagram.ide.ui.internal;
+
+import org.eclipse.emf.compare.diagram.internal.CompareDiagramConfiguration;
+import org.eclipse.emf.compare.diagram.internal.CompareDiagramConstants;
+import org.eclipse.emf.compare.diagram.internal.CompareDiagramPostProcessor;
+import org.eclipse.emf.compare.extension.PostProcessorDescriptor;
+import org.eclipse.emf.compare.extension.PostProcessorRegistry;
+import org.eclipse.emf.compare.ide.EMFCompareIDEPlugin;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+public class CompareDiagramIDEUIPlugin extends AbstractUIPlugin {
+
+ /** The shared instance. */
+ private static CompareDiagramIDEUIPlugin plugin;
+
+ /** Specific configuration for diagram comparison. */
+ private CompareDiagramConfiguration configuration;
+
+ /**
+ * The constructor.
+ */
+ public CompareDiagramIDEUIPlugin() {
+ // Do nothing
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ configuration = new CompareDiagramConfiguration();
+ getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ // XXX: does it work ?
+
+ if (CompareDiagramConstants.PREFERENCES_KEY_MOVE_THRESHOLD.equals(event.getProperty())) {
+ Object newValue = event.getNewValue();
+ if (newValue != null) {
+ configuration.setMoveThreshold((Integer)newValue);
+ } else {
+ configuration.setMoveThreshold(0);
+ }
+ }
+ }
+ });
+ configuration.setMoveThreshold(getPreferenceStore().getInt(
+ CompareDiagramConstants.PREFERENCES_KEY_MOVE_THRESHOLD));
+
+ PostProcessorRegistry postProcessorRegistry = EMFCompareIDEPlugin.getDefault()
+ .getPostProcessorRegistry();
+ for (PostProcessorDescriptor descriptor : postProcessorRegistry.getRegisteredPostProcessors()) {
+ if (descriptor.getExtensionClassName().equals(CompareDiagramPostProcessor.class.getName())) {
+ CompareDiagramPostProcessor postProcessor = (CompareDiagramPostProcessor)descriptor
+ .getPostProcessor();
+ postProcessor.setConfiguration(configuration);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static CompareDiagramIDEUIPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/EMFCompareDiagramIDEUIMessages.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/EMFCompareDiagramIDEUIMessages.java
index d7a12ac5f..0222821b6 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/EMFCompareDiagramIDEUIMessages.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/EMFCompareDiagramIDEUIMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui;
+package org.eclipse.emf.compare.diagram.ide.ui.internal;
import java.text.MessageFormat;
import java.util.MissingResourceException;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEDiffAccessorImpl.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEDiffAccessorImpl.java
index 2da084afb..2aa59f1cb 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEDiffAccessorImpl.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEDiffAccessorImpl.java
@@ -11,7 +11,7 @@
package org.eclipse.emf.compare.diagram.ide.ui.internal.accessor;
import org.eclipse.emf.compare.Match;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
import org.eclipse.emf.ecore.EObject;
@@ -68,7 +68,10 @@ public class DiagramIDEDiffAccessorImpl extends DiagramIDEMatchAccessorImpl impl
public EObject getEObject(MergeViewerSide side) {
EObject obj = getEObject();
Match eObjectMatch = fComparison.getMatch(obj);
- return getEObject(eObjectMatch, side);
+ if (eObjectMatch != null) {
+ return getEObject(eObjectMatch, side);
+ }
+ return null;
}
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEMatchAccessorImpl.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEMatchAccessorImpl.java
index 82d1f4e92..48e73c5c3 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEMatchAccessorImpl.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/DiagramIDEMatchAccessorImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -27,19 +27,28 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.swt.graphics.Image;
/**
+ * Input of each diagram merge viewer when a match is selected.
+ *
* @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
public class DiagramIDEMatchAccessorImpl implements IDiagramNodeAccessor, ITypedElement, IStreamContentAccessor {
+ /** The comparison. */
+ protected Comparison fComparison;
+
+ /** The related match object. */
private Match fMatch;
+ /** The side to impact. */
private MergeViewerSide fSide;
- protected Comparison fComparison;
-
/**
- * @param adapterFactory
- * @param eObject
+ * Constructor.
+ *
+ * @param match
+ * The related match object.
+ * @param side
+ * The side to impact.
*/
public DiagramIDEMatchAccessorImpl(Match match, MergeViewerSide side) {
this.fMatch = match;
@@ -96,45 +105,78 @@ public class DiagramIDEMatchAccessorImpl implements IDiagramNodeAccessor, ITyped
return new ByteArrayInputStream(new byte[] {' ' });
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor#getEObject(org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide)
+ */
public EObject getEObject(MergeViewerSide side) {
return getEObject(fMatch, side);
}
+ /**
+ * Get the object from the given side.
+ *
+ * @param match
+ * The match of the expected object.
+ * @param side
+ * The side to look for.
+ * @return The found object.
+ */
protected EObject getEObject(Match match, MergeViewerSide side) {
+ EObject result = null;
switch (side) {
case LEFT:
- return match.getLeft();
+ result = match.getLeft();
+ break;
case RIGHT:
- return match.getRight();
+ result = match.getRight();
+ break;
case ANCESTOR:
- return match.getOrigin();
- default:
+ result = match.getOrigin();
break;
+ default:
}
- return null;
+ return result;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor#getDiagram(org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide)
+ */
public Diagram getDiagram(MergeViewerSide side) {
+ Diagram diagram = null;
EObject obj = getEObject(side);
if (obj != null) {
- return getDiagram(obj);
+ diagram = getDiagram(obj);
} else {
obj = getEObject(getOpposite(side));
if (obj != null) {
- Diagram diagram = getDiagram(obj);
+ diagram = getDiagram(obj);
if (diagram != null) {
Match diagramMatch = fComparison.getMatch(diagram);
- return (Diagram)getEObject(diagramMatch, side);
+ diagram = (Diagram)getEObject(diagramMatch, side);
}
}
}
- return null;
+ return diagram;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor#getOwnedDiagram()
+ */
public Diagram getOwnedDiagram() {
return getDiagram(fSide);
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor#getOwnedView()
+ */
public View getOwnedView() {
View result = (View)getEObject(fSide);
if (result == null) {
@@ -143,19 +185,37 @@ public class DiagramIDEMatchAccessorImpl implements IDiagramNodeAccessor, ITyped
return result;
}
+ /**
+ * Get the related diagram from the given object.
+ *
+ * @param obj
+ * The object.
+ * @return The diagram.
+ */
protected Diagram getDiagram(EObject obj) {
+ Diagram diagram = null;
if (obj instanceof Diagram) {
- return (Diagram)obj;
+ diagram = (Diagram)obj;
} else if (obj instanceof View) {
- return ((View)obj).getDiagram();
+ diagram = ((View)obj).getDiagram();
}
- return null;
+ return diagram;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor#getComparison()
+ */
public Comparison getComparison() {
return fComparison;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor#getOriginSide()
+ */
public MergeViewerSide getOriginSide() {
EObject origin = getEObject(MergeViewerSide.ANCESTOR);
if (origin == null) {
@@ -165,14 +225,31 @@ public class DiagramIDEMatchAccessorImpl implements IDiagramNodeAccessor, ITyped
}
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor#getSide()
+ */
public MergeViewerSide getSide() {
return fSide;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor#getAllDiffs()
+ */
public List<Diff> getAllDiffs() {
return fComparison.getDifferences();
}
+ /**
+ * Get the opposite side of the given one.
+ *
+ * @param side
+ * The given side.
+ * @return the opposite one.
+ */
private MergeViewerSide getOpposite(MergeViewerSide side) {
if (side == MergeViewerSide.LEFT) {
return MergeViewerSide.RIGHT;
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramDiffAccessor.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramDiffAccessor.java
index 7d5f6a701..58753c562 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramDiffAccessor.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramDiffAccessor.java
@@ -1,10 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.emf.compare.diagram.ide.ui.internal.accessor;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
import org.eclipse.emf.compare.rcp.ui.mergeviewer.accessor.IEObjectAccessor;
+/**
+ * Input for selection of elements related to a difference.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
public interface IDiagramDiffAccessor extends IDiagramNodeAccessor, IEObjectAccessor {
+ /**
+ * Get the difference related to this input.
+ *
+ * @return The graphical difference.
+ */
DiagramDiff getDiff();
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramNodeAccessor.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramNodeAccessor.java
index 0021e1f04..f26af85ad 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramNodeAccessor.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/IDiagramNodeAccessor.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.emf.compare.diagram.ide.ui.internal.accessor;
import java.util.List;
@@ -9,22 +19,71 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+/**
+ * Input for selection of nodes related to a match.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
public interface IDiagramNodeAccessor {
+ /**
+ * Get the related comparison.
+ *
+ * @return The comparison.
+ */
Comparison getComparison();
+ /**
+ * Get the object from the related match of this input and the given side.
+ *
+ * @param side
+ * The side to scan.
+ * @return The object.
+ */
EObject getEObject(MergeViewerSide side);
+ /**
+ * Get the diagram from the given side.
+ *
+ * @param side
+ * The side t scan.
+ * @return The diagram.
+ */
Diagram getDiagram(MergeViewerSide side);
+ /**
+ * Get the diagram related to this input.
+ *
+ * @return The diagram.
+ */
Diagram getOwnedDiagram();
+ /**
+ * Get the view related to this input.
+ *
+ * @return The view.
+ */
View getOwnedView();
+ /**
+ * Get the side considered as the origin version.
+ *
+ * @return The origin side.
+ */
MergeViewerSide getOriginSide();
+ /**
+ * Get the side of this input.
+ *
+ * @return The side.
+ */
MergeViewerSide getSide();
+ /**
+ * Get all the differences of the comparison.
+ *
+ * @return The differences.
+ */
List<Diff> getAllDiffs();
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEDiffAccessorFactory.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEDiffAccessorFactory.java
index 50ac3c486..65de89758 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEDiffAccessorFactory.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEDiffAccessorFactory.java
@@ -1,18 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.factory;
import org.eclipse.compare.ITypedElement;
import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
import org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.DiagramIDEDiffAccessorImpl;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.accessor.IAccessorFactory.AbstractAccessorFactory;
import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
/**
+ * Factory for graphical differences accessors.
+ *
* @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
public class DiagramIDEDiffAccessorFactory extends AbstractAccessorFactory {
/**
+ * It creates a graphical accessor from the given selected difference and expected side.
+ *
+ * @param diff
+ * The selected difference.
+ * @param side
+ * The side of the input to create.
+ * @return The accessor.
+ */
+ private ITypedElement createAccessor(DiagramDiff diff, MergeViewerSide side) {
+ return new DiagramIDEDiffAccessorImpl(diff, side);
+ }
+
+ /**
* {@inheritDoc}
*
* @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.accessor.IAccessorFactory#isFactoryFor(java.lang.Object)
@@ -21,10 +46,6 @@ public class DiagramIDEDiffAccessorFactory extends AbstractAccessorFactory {
return target instanceof DiagramDiff;
}
- private ITypedElement createAccessor(DiagramDiff diff, MergeViewerSide side) {
- return new DiagramIDEDiffAccessorImpl(diff, side);
- }
-
/**
* {@inheritDoc}
*
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEMatchAccessorFactory.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEMatchAccessorFactory.java
index 8a0e48205..e3ff8aa5e 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEMatchAccessorFactory.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/accessor/factory/DiagramIDEMatchAccessorFactory.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.factory;
import org.eclipse.compare.ITypedElement;
@@ -8,10 +18,16 @@ import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.accessor.IAcce
import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
/**
+ * Factory for graphical matches accessors.
+ *
* @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
public class DiagramIDEMatchAccessorFactory extends AbstractAccessorFactory {
+ /**
+ * Predicate on the namespace URI to create a graphical match accessor and so to be able to open a diagram
+ * comparison on the selection of a graphical match.
+ */
private static final String NS_URI_PATTERN = "http://www.eclipse.org/gmf/runtime/\\d.\\d.\\d/notation";
/**
@@ -20,14 +36,25 @@ public class DiagramIDEMatchAccessorFactory extends AbstractAccessorFactory {
* @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.accessor.IAccessorFactory#isFactoryFor(java.lang.Object)
*/
public boolean isFactoryFor(Object target) {
+ // CHECKSTYLE:OFF
return target instanceof Match
&& (((Match)target).getLeft() != null
&& ((Match)target).getLeft().eClass().getEPackage().getNsURI()
.matches(NS_URI_PATTERN) || ((Match)target).getRight() != null
&& ((Match)target).getRight().eClass().getEPackage().getNsURI().matches(
NS_URI_PATTERN));
+ // CHECKSTYLE:ON
}
+ /**
+ * It creates a graphical accessor from the given selected match and expected side.
+ *
+ * @param match
+ * The selected match.
+ * @param side
+ * The side of the input to create.
+ * @return The accessor.
+ */
private ITypedElement createAccessor(Match match, MergeViewerSide side) {
return new DiagramIDEMatchAccessorImpl(match, side);
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/DiagramCompareContentMergeViewer.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/DiagramCompareContentMergeViewer.java
deleted file mode 100644
index d8f5328d3..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/DiagramCompareContentMergeViewer.java
+++ /dev/null
@@ -1,634 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.ResourceBundle;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareNavigator;
-import org.eclipse.compare.ICompareNavigator;
-import org.eclipse.compare.contentmergeviewer.ContentMergeViewer;
-import org.eclipse.compare.internal.CompareHandlerService;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.Comparison;
-import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.diagram.ide.ui.AbstractEditPartMergeViewer;
-import org.eclipse.emf.compare.domain.ICompareEditingDomain;
-import org.eclipse.emf.compare.ide.EMFCompareIDEPlugin;
-import org.eclipse.emf.compare.ide.ui.internal.EMFCompareConstants;
-import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.TreeContentMergeViewerContentProvider;
-import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.DynamicObject;
-import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.EMFCompareColor;
-import org.eclipse.emf.compare.rcp.ui.mergeviewer.ICompareColor;
-import org.eclipse.emf.compare.rcp.ui.mergeviewer.ICompareColorProvider;
-import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- */
-public abstract class DiagramCompareContentMergeViewer extends ContentMergeViewer implements ISelectionChangedListener, ICompareColorProvider, IAdaptable {
-
- private static final String HANDLER_SERVICE = "fHandlerService";
-
- protected static final int HORIZONTAL = 1;
-
- protected static final int VERTICAL = 2;
-
- protected static final double HSPLIT = 0.5;
-
- protected static final double VSPLIT = 0.3;
-
- /**
- * Width of center bar
- */
- protected static final int CENTER_WIDTH = 34;
-
- protected AbstractEditPartMergeViewer fAncestor;
-
- protected AbstractEditPartMergeViewer fLeft;
-
- protected AbstractEditPartMergeViewer fRight;
-
- private ActionContributionItem fCopyDiffLeftToRightItem;
-
- private ActionContributionItem fCopyDiffRightToLeftItem;
-
- protected final Comparison fComparison;
-
- private final AtomicBoolean fSyncingSelections = new AtomicBoolean(false);
-
- private EMFCompareColor fColors;
-
- private final ICompareEditingDomain fEditingDomain;
-
- private final DynamicObject fDynamicObject;
-
- /**
- * @param style
- * @param bundle
- * @param cc
- */
- protected DiagramCompareContentMergeViewer(Composite parent, int style, ResourceBundle bundle,
- CompareConfiguration cc) {
- super(style, bundle, cc);
- fDynamicObject = new DynamicObject(this);
-
- fComparison = (Comparison)cc.getProperty(EMFCompareConstants.COMPARE_RESULT);
-
- fEditingDomain = (ICompareEditingDomain)getCompareConfiguration().getProperty(
- EMFCompareConstants.EDITING_DOMAIN);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.rcp.ui.mergeviewer.ICompareColorProvider#getCompareColor()
- */
- public ICompareColor getCompareColor() {
- return fColors;
- }
-
- /**
- * @return the fEditingDomain
- */
- protected final ICompareEditingDomain getEditingDomain() {
- return fEditingDomain;
- }
-
- /**
- * @return the fComparison
- */
- protected final Comparison getComparison() {
- return fComparison;
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * Overriden to enhance visibility.
- * </p>
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#isThreeWay()
- */
- @Override
- public boolean isThreeWay() {
- // enhances visibility
- return super.isThreeWay();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#updateContent(java.lang.Object,
- * java.lang.Object, java.lang.Object)
- */
- @Override
- protected void updateContent(Object ancestor, Object left, Object right) {
-
- fAncestor.setInput(ancestor);
- fLeft.setInput(left);
- fRight.setInput(right);
-
- // must update selection after the three viewers input has been set
- // to avoid some NPE/AssertionError (they are calling each other on selectionChanged event to
- // synchronize their selection)
-
- // EObject leftInitialItem = null;
- // if (left instanceof IDiagramNodeAccessor) {
- // leftInitialItem = ((IDiagramNodeAccessor)left).getEObject(MergeViewerSide.LEFT);
- // }
- //
- // ISelection leftSelection = createSelectionOrEmpty(leftInitialItem);
- // fLeft.setSelection(leftSelection); // others will synchronize on this one :)
-
- // getCenterControl().redraw();
-
- // if (ancestor != null) {
- // ancestorTED = EditingDomainUtils.getOrCreateEditingDomain(ancestor);
- // }
- // if (left != null) {
- // leftTED = EditingDomainUtils.getOrCreateEditingDomain(left);
- // annotateSide(DifferenceSource.LEFT);
- // }
- //
- // if (right != null) {
- // rightTED = EditingDomainUtils.getOrCreateEditingDomain(right);
- // annotateSide(DifferenceSource.RIGHT);
- // }
-
- }
-
- // /**
- // * Execute a RecordingCommand to annotate the {@link #getInput() input} of this viewer. Only the given
- // * <code>side</code> is annotated.
- // *
- // * @param side
- // * The side to annotate.
- // */
- // private void annotateSide(final DifferenceSource side) {
- // TransactionalEditingDomain ted = null;
- // if (side == DifferenceSource.LEFT) {
- // ted = leftTED;
- // } else {
- // ted = rightTED;
- // }
- //
- // // annotate models
- // final RecordingCommand command = new RecordingCommand(ted) {
- // @Override
- // protected void doExecute() {
- // if (gmfModelCreator != null) {
- // gmfModelCreator.setInput(getInput());
- // gmfModelCreator.addEAnnotations(side);
- // }
- // }
- // };
- // ted.getCommandStack().execute(command);
- // }
- //
- // /**
- // * Execute a RecordingCommand to annotate the {@link #getInput() input} of this viewer. Only the given
- // * <code>side</code> is annotated.
- // *
- // * @param side
- // * The side to annotate.
- // */
- // protected void unnannotateSide(final DifferenceSource side) {
- // TransactionalEditingDomain ted = null;
- // if (side == DifferenceSource.LEFT) {
- // ted = leftTED;
- // } else {
- // ted = rightTED;
- // }
- //
- // // de-annotate models
- // final RecordingCommand command = new RecordingCommand(ted) {
- // @Override
- // protected void doExecute() {
- // if (gmfModelCreator != null) {
- // gmfModelCreator.setInput(getInput());
- // gmfModelCreator.removeEAnnotations(side);
- // }
- // }
- // };
- // ted.getCommandStack().execute(command);
- // }
-
- private ISelection createSelectionOrEmpty(final Object o) {
- final ISelection selection;
- if (o != null) {
- selection = new StructuredSelection(o);
- } else {
- selection = StructuredSelection.EMPTY;
- }
- return selection;
- }
-
- /**
- * Inhibits this method to avoid asking to save on each input change!!
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#doSave(java.lang.Object,
- * java.lang.Object)
- */
- @Override
- protected boolean doSave(Object newInput, Object oldInput) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#createControls(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected void createControls(Composite composite) {
- fAncestor = createMergeViewer(composite, MergeViewerSide.ANCESTOR, this);
- fAncestor.addSelectionChangedListener(this);
-
- fLeft = createMergeViewer(composite, MergeViewerSide.LEFT, this);
- fLeft.addSelectionChangedListener(this);
-
- fRight = createMergeViewer(composite, MergeViewerSide.RIGHT, this);
- fRight.addSelectionChangedListener(this);
-
- fColors = new EMFCompareColor(this, null, getCompareConfiguration());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#createToolItems(org.eclipse.jface.action.ToolBarManager)
- */
- @Override
- protected void createToolItems(ToolBarManager toolBarManager) {
- // Copy actions
- CompareConfiguration cc = getCompareConfiguration();
- if (cc.isRightEditable()) {
- Action copyLeftToRight = new Action() {
- @Override
- public void run() {
- copyDiff(true);
- // Select next diff
- navigate(true);
- }
- };
- Utilities.initAction(copyLeftToRight, getResourceBundle(), "action.CopyDiffLeftToRight.");
- copyLeftToRight.setEnabled(false);
- fCopyDiffLeftToRightItem = new ActionContributionItem(copyLeftToRight);
- fCopyDiffLeftToRightItem.setVisible(true);
- toolBarManager.appendToGroup("merge", fCopyDiffLeftToRightItem); //$NON-NLS-1$
- getHandlerService().registerAction(copyLeftToRight, "org.eclipse.compare.copyLeftToRight");
- }
-
- if (cc.isLeftEditable()) {
- Action copyRightToLeft = new Action() {
- @Override
- public void run() {
- copyDiff(false);
- // Select next diff
- navigate(true);
- }
- };
- Utilities.initAction(copyRightToLeft, getResourceBundle(), "action.CopyDiffRightToLeft.");
- copyRightToLeft.setEnabled(false);
- fCopyDiffRightToLeftItem = new ActionContributionItem(copyRightToLeft);
- fCopyDiffRightToLeftItem.setVisible(true);
- toolBarManager.appendToGroup("merge", fCopyDiffRightToLeftItem); //$NON-NLS-1$
- getHandlerService().registerAction(copyRightToLeft, "org.eclipse.compare.copyRightToLeft");
- }
-
- // Navigation
- final Action nextDiff = new Action() {
- @Override
- public void run() {
- navigate(true);
- }
- };
- Utilities.initAction(nextDiff, getResourceBundle(), "action.NextDiff.");
- ActionContributionItem contributionNextDiff = new ActionContributionItem(nextDiff);
- contributionNextDiff.setVisible(true);
- toolBarManager.appendToGroup("navigation", contributionNextDiff);
-
- final Action previousDiff = new Action() {
- @Override
- public void run() {
- navigate(false);
- }
- };
- Utilities.initAction(previousDiff, getResourceBundle(), "action.PrevDiff.");
- ActionContributionItem contributionPreviousDiff = new ActionContributionItem(previousDiff);
- contributionPreviousDiff.setVisible(true);
- toolBarManager.appendToGroup("navigation", contributionPreviousDiff);
-
- // Undo/Redo
- // final UndoAction undoAction = new UndoAction(fEditingDomain);
- // final RedoAction redoAction = new RedoAction(fEditingDomain);
- //
- // fEditingDomain.getCommandStack().addCommandStackListener(new CommandStackListener() {
- // public void commandStackChanged(EventObject event) {
- // undoAction.update();
- // redoAction.update();
- // refresh();
- // }
- // });
- //
- // getHandlerService().setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
- // getHandlerService().setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#copy(boolean)
- */
- @Override
- protected void copy(boolean leftToRight) {
- EList<Diff> differences = getComparison().getDifferences();
-
- final Command copyCommand = getEditingDomain().createCopyAllNonConflictingCommand(differences,
- leftToRight, EMFCompareIDEPlugin.getDefault().getMergerRegistry());
-
- getEditingDomain().getCommandStack().execute(copyCommand);
-
- if (leftToRight) {
- setRightDirty(true);
- } else {
- setLeftDirty(true);
- }
- refresh();
- }
-
- /**
- * Called by the framework to navigate to the next (or previous) difference. This will open the content
- * viewer for the next (or previous) diff displayed in the structure viewer.
- *
- * @param next
- * <code>true</code> if we are to open the next structure viewer's diff, <code>false</code> if
- * we should go to the previous instead.
- */
- protected void navigate(boolean next) {
- final Control control = getControl();
- if (control != null && !control.isDisposed()) {
- final ICompareNavigator navigator = getCompareConfiguration().getContainer().getNavigator();
- if (navigator instanceof CompareNavigator && ((CompareNavigator)navigator).hasChange(next)) {
- navigator.selectChange(next);
- }
- }
- }
-
- /**
- *
- */
- protected abstract void copyDiff(boolean leftToRight);
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#handleResizeAncestor(int, int, int, int)
- */
- @Override
- protected void handleResizeAncestor(int x, int y, int width, int height) {
- if (width > 0) {
- getAncestorMergeViewer().getControl().setVisible(true);
- getAncestorMergeViewer().getControl().setBounds(x, y, width, height);
- } else {
- getAncestorMergeViewer().getControl().setVisible(false);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#handleResizeLeftRight(int, int, int,
- * int, int, int)
- */
- @Override
- protected void handleResizeLeftRight(int x, int y, int width1, int centerWidth, int width2, int height) {
- fLeft.getControl().setBounds(x, y, width1, height);
- fRight.getControl().setBounds(x + width1 + centerWidth, y, width2, height);
- }
-
- protected abstract AbstractEditPartMergeViewer createMergeViewer(Composite parent, MergeViewerSide side,
- DiagramCompareContentMergeViewer master);
-
- @Override
- protected final int getCenterWidth() {
- return CENTER_WIDTH;
- }
-
- protected final CompareHandlerService getHandlerService() {
- return (CompareHandlerService)fDynamicObject.get(HANDLER_SERVICE);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#getControl()
- */
- @Override
- public Composite getControl() {
- return (Composite)super.getControl();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#createCenterControl(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createCenterControl(Composite parent) {
- final Control ret = super.createCenterControl(parent);
-
- final PaintListener paintListener = new PaintListener() {
- public void paintControl(PaintEvent e) {
- paintCenter(e.gc);
- }
- };
- ret.addPaintListener(paintListener);
-
- ret.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- ret.removePaintListener(paintListener);
- }
- });
-
- return ret;
- }
-
- protected abstract void paintCenter(GC g);
-
- /**
- * @return the fAncestor
- */
- public AbstractEditPartMergeViewer getAncestorMergeViewer() {
- return fAncestor;
- }
-
- /**
- * @return the fLeft
- */
- public AbstractEditPartMergeViewer getLeftMergeViewer() {
- return fLeft;
- }
-
- /**
- * @return the fRight
- */
- public AbstractEditPartMergeViewer getRightMergeViewer() {
- return fRight;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (fSyncingSelections.compareAndSet(false, true)) { // prevents stack overflow :)
- try {
- ISelectionProvider selectionProvider = event.getSelectionProvider();
- ISelection selection = event.getSelection();
- synchronizeSelection(selectionProvider, selection);
- updateToolItems();
- } finally {
- fSyncingSelections.set(false);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#updateToolItems()
- */
- @Override
- protected void updateToolItems() {
- super.updateToolItems();
-
- Diff diff = getDiffFrom(getRightMergeViewer());
- if (diff == null) {
- diff = getDiffFrom(getLeftMergeViewer());
- }
- boolean enableCopy = false;
- if (diff != null) {
- enableCopy = true;
- }
-
- if (fCopyDiffLeftToRightItem != null) {
- fCopyDiffLeftToRightItem.getAction().setEnabled(enableCopy);
- }
- if (fCopyDiffRightToLeftItem != null) {
- fCopyDiffRightToLeftItem.getAction().setEnabled(enableCopy);
- }
- }
-
- /**
- * Checks the element selected in the given viewer in order to determine whether it can be adapted into a
- * Diff.
- *
- * @param viewer
- * The viewer which selection is to be checked.
- * @return The first of the Diffs selected in the given viewer, if any.
- */
- protected Diff getDiffFrom(AbstractEditPartMergeViewer viewer) {
- Diff diff = null;
- final ISelection selection = viewer.getSelection();
- if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- final Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
- while (diff == null && selectedElements.hasNext()) {
- final Object element = selectedElements.next();
- if (element instanceof GraphicalEditPart
- && ((GraphicalEditPart)element).getModel() instanceof EObject) {
- final List<Diff> diffs = getComparison().getDifferences(
- (EObject)((GraphicalEditPart)element).getModel());
- if (!diffs.isEmpty()) {
- diff = diffs.get(0);
- }
- }
- }
- }
- return diff;
- }
-
- private void synchronizeSelection(final ISelectionProvider selectionProvider, final ISelection selection) {
- if (selectionProvider == fLeft) {
- fRight.setSelection(selection);
- fAncestor.setSelection(selection);
- } else if (selectionProvider == fRight) {
- fLeft.setSelection(selection);
- fAncestor.setSelection(selection);
- } else { // selectionProvider == fAncestor
- fLeft.setSelection(selection);
- fRight.setSelection(selection);
- }
- }
-
- /**
- * Implementation of the model content provider for the GMF comparison.
- *
- * @author <a href="mailto:stephane.bouchet@obeo.fr">Stephane Bouchet</a>
- */
- protected class GMFModelContentMergeContentProvider extends TreeContentMergeViewerContentProvider {
-
- public GMFModelContentMergeContentProvider(CompareConfiguration cc, Comparison comparison) {
- super(cc, comparison);
- }
-
- @Override
- public void saveLeftContent(Object input, byte[] bytes) {
- // unnannotateSide(DifferenceSource.LEFT);
- // unnannotateSide(DifferenceSource.RIGHT);
- super.saveLeftContent(input, bytes);
- }
-
- @Override
- public void saveRightContent(Object input, byte[] bytes) {
- // unnannotateSide(DifferenceSource.LEFT);
- // unnannotateSide(DifferenceSource.RIGHT);
- super.saveRightContent(input, bytes);
- }
-
- }
-
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- if (adapter == CompareHandlerService.class) {
- return getHandlerService();
- }
- if (adapter == CompareHandlerService[].class) {
- return new CompareHandlerService[] {getHandlerService(), };
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.java
index 30cda9a3e..e831c6723 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramContentMergeViewer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Obeo.
+ * Copyright (c) 2013 Obeo.
* 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
@@ -12,67 +12,75 @@ package org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagr
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.instanceOf;
+import static com.google.common.base.Predicates.or;
import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.onFeature;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueIs;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.EventObject;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.ResourceBundle;
import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.draw2d.FreeformLayeredPane;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Polyline;
+import org.eclipse.draw2d.PolylineConnection;
+import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.Shape;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.common.command.CommandStackListener;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.DifferenceSource;
+import org.eclipse.emf.compare.DifferenceState;
import org.eclipse.emf.compare.Match;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
-import org.eclipse.emf.compare.diagram.NodeChange;
-import org.eclipse.emf.compare.diagram.ide.ui.AbstractEditPartMergeViewer;
-import org.eclipse.emf.compare.diagram.ide.ui.AbstractGraphicalMergeViewer;
-import org.eclipse.emf.compare.diagram.ide.ui.decoration.DeleteGhostImageFigure;
+import org.eclipse.emf.compare.command.impl.CopyCommand;
import org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramDiffAccessor;
import org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor;
-import org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.DiagramCompareContentMergeViewer;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
+import org.eclipse.emf.compare.domain.ICompareEditingDomain;
import org.eclipse.emf.compare.ide.EMFCompareIDEPlugin;
+import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer;
import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.tree.TreeContentMergeViewerContentProvider;
-import org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.provider.DiffNode;
+import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.RedoAction;
+import org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.UndoAction;
+import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer;
import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
+import org.eclipse.emf.compare.utils.DiffUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.LayerConstants;
+import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
import org.eclipse.gef.editparts.LayerManager;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
import org.eclipse.gmf.runtime.notation.BasicCompartment;
import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
/**
* Specialized {@link org.eclipse.compare.contentmergeviewer.ContentMergeViewer} that uses
@@ -80,829 +88,1781 @@ import org.eclipse.swt.widgets.Display;
*
* @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
-public class DiagramContentMergeViewer extends DiagramCompareContentMergeViewer {
-
- private Map<IFigure, Phantom> phantomsMap = new HashMap<IFigure, Phantom>();
-
- private Map<IFigure, IFigure> containerMap = new HashMap<IFigure, IFigure>();
-
- private Map<IFigure, Integer> phantomSelection = new HashMap<IFigure, Integer>();
+public class DiagramContentMergeViewer extends EMFCompareContentMergeViewer {
/**
- * Bundle name of the property file containing all displayed strings.
+ * Interface for the management of decorators.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
- private static final String BUNDLE_NAME = DiagramContentMergeViewer.class.getName();
+ private interface IDecoratorManager {
- /**
- * The {@link org.eclipse.emf.common.notify.AdapterFactory} used to create
- * {@link AdapterFactoryContentProvider} and {@link AdapterFactoryLabelProvider} for ancestor, left and
- * right {@link org.eclipse.jface.viewers.TreeViewer}.
- */
- private final ComposedAdapterFactory fAdapterFactory;
+ /**
+ * It hides the revealed decorators.
+ */
+ void hideAll();
- /**
- * Creates a new {@link DiagramContentMergeViewer} by calling the super constructor with the given
- * parameters.
- * <p>
- * It calls {@link #buildControl(Composite)} as stated in its javadoc.
- * <p>
- * It sets a {@link TreeContentMergeViewerContentProvider specific}
- * {@link #setContentProvider(org.eclipse.jface.viewers.IContentProvider) content provider} to properly
- * display ancestor, left and right parts.
- *
- * @param parent
- * the parent composite to build the UI in
- * @param config
- * the {@link CompareConfiguration}
- */
- public DiagramContentMergeViewer(Composite parent, CompareConfiguration config) {
- super(parent, SWT.NONE, ResourceBundle.getBundle(BUNDLE_NAME), config);
- fAdapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- fAdapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
- fAdapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ /**
+ * From a given difference, it hides the related decorators.
+ *
+ * @param difference
+ * The difference.
+ */
+ void hideDecorators(Diff difference);
- buildControl(parent);
- setContentProvider(new GMFModelContentMergeContentProvider(config, fComparison));
+ /**
+ * From a given difference, it reveals the related decorators.
+ *
+ * @param difference
+ * The difference.
+ */
+ void revealDecorators(Diff difference);
}
/**
- * {@inheritDoc}
+ * Decorator manager to create, hide or reveal decorator figures related to deleted or added graphical
+ * objects.
*
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
- @Override
- protected void handleDispose(DisposeEvent event) {
- fAdapterFactory.dispose();
- super.handleDispose(event);
- }
+ private abstract class AbstractDecoratorManager implements IDecoratorManager {
+
+ /**
+ * Decorator represented by a <code>figure</code> on a <code>layer</code>, from the given
+ * <code>side</code> of the merge viewer. An edit part may be linked to the <code>figure</code> in
+ * some cases.<br>
+ * The decorator is related to a <code>difference</code> and it is binded with the reference view and
+ * figure.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+ protected abstract class AbstractDecorator {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#getAncestorMergeViewer()
- */
- @SuppressWarnings("unchecked")
- // see createMergeViewer() to see it is safe
- @Override
- public AbstractGraphicalMergeViewer getAncestorMergeViewer() {
- return (AbstractGraphicalMergeViewer)super.getAncestorMergeViewer();
- }
+ /** The reference <code>View</code> for this decorator. */
+ protected View fOriginView;
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#getLeftMergeViewer()
- */
- @SuppressWarnings("unchecked")
- // see createMergeViewer() to see it is safe
- @Override
- public AbstractGraphicalMergeViewer getLeftMergeViewer() {
- return (AbstractGraphicalMergeViewer)super.getLeftMergeViewer();
- }
+ /** The reference <code>IFigure</code> for this phantom. */
+ protected IFigure fOriginFigure;
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#getRightMergeViewer()
- */
- @SuppressWarnings("unchecked")
- // see createMergeViewer() to see it is safe
- @Override
- public AbstractGraphicalMergeViewer getRightMergeViewer() {
- return (AbstractGraphicalMergeViewer)super.getRightMergeViewer();
- }
+ /** The <code>IFigure</code> representing this phantom. */
+ protected IFigure fFigure;
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#copyDiff(boolean)
- */
- @Override
- protected void copyDiff(boolean leftToRight) {
- /*
- * FIXME change this! For the moment we always do a new setInput() on the content viewer whenever we
- * select a Diagram Difference. This is meant to change so that we use selection synchronization
- * instead. This code will break whenever we implement that change.
- */
- if (getInput() instanceof DiffNode) {
- final Command command = getEditingDomain().createCopyCommand(((DiffNode)getInput()).getTarget(),
- leftToRight, EMFCompareIDEPlugin.getDefault().getMergerRegistry());
- getEditingDomain().getCommandStack().execute(command);
+ /** The layer on which the <code>figure</code> has to be drawn. */
+ protected IFigure fLayer;
- if (leftToRight) {
- setRightDirty(true);
- } else {
- setLeftDirty(true);
+ /** The side of the merge viewer on which the <code>figure</code> has to be drawn. */
+ protected MergeViewerSide fSide;
+
+ /** The difference related to this phantom. */
+ protected Diff fDifference;
+
+ /** The edit part of the figure representing this phantom. May be null. */
+ protected EditPart fEditPart;
+
+ /**
+ * Getter.
+ *
+ * @return the originView {@link Phantom#fOriginView}.
+ */
+ public View getOriginView() {
+ return fOriginView;
}
- refresh();
- return;
- }
- final IStructuredSelection selection;
- if (leftToRight) {
- selection = (IStructuredSelection)getLeftMergeViewer().getSelection();
- } else {
- selection = (IStructuredSelection)getRightMergeViewer().getSelection();
- }
- Object firstElement = selection.getFirstElement();
+ /**
+ * Setter.
+ *
+ * @param originView
+ * {@link Phantom#fOriginView}.
+ */
+ public void setOriginView(View originView) {
+ this.fOriginView = originView;
+ }
- if (firstElement instanceof GraphicalEditPart) {
- Object elt = ((GraphicalEditPart)firstElement).getModel();
- if (elt instanceof EObject) {
- List<Diff> differences = getComparison().getDifferences((EObject)elt);
+ /**
+ * Getter.
+ *
+ * @return the originFigure {@link Phantom#fOriginFigure}.
+ */
+ public IFigure getOriginFigure() {
+ return fOriginFigure;
+ }
- final Command command = getEditingDomain().createCopyAllNonConflictingCommand(differences,
- leftToRight, EMFCompareIDEPlugin.getDefault().getMergerRegistry());
- getEditingDomain().getCommandStack().execute(command);
+ /**
+ * Setter.
+ *
+ * @param originFigure
+ * {@link Phantom#fOriginFigure}.
+ */
+ public void setOriginFigure(IFigure originFigure) {
+ this.fOriginFigure = originFigure;
+ }
- if (leftToRight) {
- setRightDirty(true);
- } else {
- setLeftDirty(true);
- }
- refresh();
+ /**
+ * Getter.
+ *
+ * @return the figure {@link Phantom#fFigure}.
+ */
+ public IFigure getFigure() {
+ return fFigure;
}
- }
- }
+ /**
+ * Setter.
+ *
+ * @param figure
+ * {@link Phantom#fFigure}.
+ */
+ public void setFigure(IFigure figure) {
+ this.fFigure = figure;
+ }
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#getContents(boolean)
- */
- @Override
- protected byte[] getContents(boolean left) {
- return null;
- }
+ /**
+ * Getter.
+ *
+ * @return the layer {@link Phantom#fLayer}.
+ */
+ public IFigure getLayer() {
+ return fLayer;
+ }
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#createMergeViewer(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected AbstractEditPartMergeViewer createMergeViewer(final Composite parent, MergeViewerSide side,
- DiagramCompareContentMergeViewer master) {
- final DiagramMergeViewer mergeTreeViewer = new DiagramMergeViewer(parent, side);
- return mergeTreeViewer;
- }
+ /**
+ * Setter.
+ *
+ * @param layer
+ * {@link Phantom#fLayer}.
+ */
+ public void setLayer(IFigure layer) {
+ this.fLayer = layer;
+ }
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#paintCenter(org.eclipse.swt.widgets.Canvas,
- * org.eclipse.swt.graphics.GC)
- */
- @Override
- protected void paintCenter(GC g) {
+ /**
+ * Getter.
+ *
+ * @return the side {@link Phantom#fSide}.
+ */
+ public MergeViewerSide getSide() {
+ return fSide;
+ }
- }
+ /**
+ * Setter.
+ *
+ * @param side
+ * {@link Phantom#fSide}.
+ */
+ public void setSide(MergeViewerSide side) {
+ this.fSide = side;
+ }
- private class Phantom {
- public IFigure figure;
+ /**
+ * Getter.
+ *
+ * @return the difference {@link Phantom#fDifference}.
+ */
+ public Diff getDifference() {
+ return fDifference;
+ }
- public IFigure layer;
+ /**
+ * Setter.
+ *
+ * @param difference
+ * {@link Phantom#fDifference}.
+ */
+ public void setDifference(Diff difference) {
+ this.fDifference = difference;
+ }
+
+ /**
+ * Getter.
+ *
+ * @return the editPart {@link Phantom#fEditPart}.
+ */
+ public EditPart getEditPart() {
+ return fEditPart;
+ }
+
+ /**
+ * Setter.
+ *
+ * @param editPart
+ * {@link Phantom#fEditPart}.
+ */
+ public void setEditPart(EditPart editPart) {
+ this.fEditPart = editPart;
+ }
- public Phantom(IFigure figure, IFigure layer) {
- this.figure = figure;
- this.layer = layer;
}
- }
- private Predicate<Diff> diffsForPhantoms = and(ofKind(DifferenceKind.DELETE),
- instanceOf(NodeChange.class));
+ /**
+ * From a given difference, it hides the related decorators.
+ *
+ * @param difference
+ * The difference.
+ */
+ public void hideDecorators(Diff difference) {
+ List<? extends AbstractDecorator> oldDecorators = getDecorators(difference);
+ if (oldDecorators != null && !oldDecorators.isEmpty() && getComparison() != null) {
+ handleDecorators(oldDecorators, false, true);
+ }
+ }
- @Override
- protected void updateContent(Object ancestor, Object left, Object right) {
- // TODO: To Fix the problem to locate ghost figures
- // TODO: To test multi-diagrams to clean phantoms
- // TODO: To manage the edge cases for phantoms (display the same figures (composing the edge) but in
- // red color)
- // TODO: To change decorators (to take off the icons (+ for adds) and use the same decoration as
- // changes for moves)
- super.updateContent(ancestor, left, right);
-
- // FIXME: Alternative solution (start of implementation) to correctly manage the position of ghost
- // figures.
- // if (left instanceof IDiagramNodeAccessor) {
- //
- // IDiagramNodeAccessor input = (IDiagramNodeAccessor)left;
- // Comparison comparison = input.getComparison();
- //
- // PhantomsManager manager = new PhantomsManager();
- // manager.initCacheFigures(comparison);
- // manager.initPhantoms(comparison, Collections2.filter(input.getAllDiffs(), diffsForPhantoms));
- // manager.attachPhantoms();
- //
- // }
-
- if (left instanceof IDiagramNodeAccessor) {
- IDiagramNodeAccessor input = (IDiagramNodeAccessor)left;
-
- Collection<Diff> deleteDiffs = Collections2.filter(input.getAllDiffs(), diffsForPhantoms);
-
- // *** BEGIN first solution ***
- // FIXME: In some cases (o.e.e.c.d.ide.ui.papyrus.tests/NodeChange/a9) the position of the ghost
- // is outside the visible containing figure.
- // You have to create the hierarchy of figures between the visible one and the new ghost figure.
- // For that, you have to map all the figures from every side (see alternative solution).
- if (phantomsMap.isEmpty()) {
-
- fLeft.flush();
- ((DiagramMergeViewer)fLeft).getGraphicalViewer().flush();
- fRight.flush();
- ((DiagramMergeViewer)fRight).getGraphicalViewer().flush();
- fAncestor.flush();
- ((DiagramMergeViewer)fAncestor).getGraphicalViewer().flush();
-
- // Create phantoms -> cache them and their possible container
- Iterator<Diff> itDeleteDiffs = deleteDiffs.iterator();
- while (itDeleteDiffs.hasNext()) {
-
- DiagramDiff diff = (DiagramDiff)itDeleteDiffs.next();
-
- View viewRef = (View)diff.getView();
- IFigure ref = getReferenceFigureValue(input.getComparison(), diff);
- Diagram diagram = viewRef.getDiagram();
-
- MergeViewerSide targetSide = getTargetSide(input.getComparison(), viewRef);
- Diagram targetDiagram = (Diagram)getMatchView(input.getComparison(), diagram, targetSide);
- DiagramMergeViewer targetViewer = getViewer(targetSide);
-
- IFigure targetLayer = LayerManager.Helper.find(targetViewer.getEditPart(targetDiagram))
- .getLayer(LayerConstants.SCALABLE_LAYERS);
-
- IFigure ghost = createGhostFigure(ref, targetSide,
- viewRef.eContainer() instanceof BasicCompartment);
- phantomsMap.put(ref, new Phantom(ghost, targetLayer));
-
- View parentViewRef = (View)getMatchView(diff.getMatch(), getSide(input.getComparison(),
- viewRef));
-
- if (parentViewRef != null) {
- IFigure parentRefFigure = getFigure(input.getComparison(), parentViewRef);
- View parentTargetView = (View)getMatchView(diff.getMatch(), getSide(diff));
- if (parentTargetView != null) {
- IFigure parentTargetFigure = getFigure(input.getComparison(), parentTargetView);
- containerMap.put(parentRefFigure, parentTargetFigure);
- }
- }
+ /**
+ * From a given difference, it reveals the related decorators.
+ *
+ * @param difference
+ * The difference.
+ */
+ public void revealDecorators(Diff difference) {
- }
+ List<? super AbstractDecorator> decorators = (List<? super AbstractDecorator>)getDecorators(difference);
- // Iterate on cache to attach phantoms on the correct figures
- for (Entry<IFigure, Phantom> entry : phantomsMap.entrySet()) {
- IFigure ref = entry.getKey();
-
- Phantom target = entry.getValue();
- IFigure ghost = target.figure;
- IFigure targetLayer = target.layer;
-
- IFigure parentGhost = findMatchingParentGhost(ref);
- if (parentGhost != null) {
- addToParent(ref, ghost, parentGhost);
- } else {
- IFigure parent = findMatchingParent(ref);
- if (parent != null) {
- addToParent(ref, ghost, parent);
- } else {
- targetLayer.add(ghost);
- }
- }
- }
- }
- // *** END first solution ***
+ // Create phantoms only if they do not already exist and if the related difference is an ADD or
+ // DELETE
+ if ((decorators == null || decorators.isEmpty()) && isGoodCandidate(difference)) {
- // reset phantom selections
- resetPhantomSelections();
+ DiagramDiff diagramDiff = (DiagramDiff)difference;
- // set phantom selections
- if (input instanceof IDiagramDiffAccessor) {
- IFigure figureRef = getReferenceFigure(input.getComparison(),
- (View)((IDiagramDiffAccessor)left).getDiff().getView());
+ List<View> referenveViews = getReferenceViews(diagramDiff);
- Phantom target = phantomsMap.get(figureRef);
- if (target != null) {
+ for (View referenceView : referenveViews) {
+ IFigure referenceFigure = getFigure(referenceView);
- int oldLineWidth = ((Shape)target.figure).getLineWidth();
+ if (referenceFigure != null) {
+ MergeViewerSide targetSide = getTargetSide(getComparison().getMatch(referenceView),
+ referenceView);
- // save its line width
- phantomSelection.put(target.figure, oldLineWidth);
+ if (decorators == null) {
+ decorators = new ArrayList();
+ }
- // enhance its line width
- ((Shape)target.figure).setLineWidth(oldLineWidth + 2);
+ decorators.add(createAndRegisterDecorator(difference, referenceView, referenceFigure,
+ targetSide));
+ }
}
- }
- }
- }
-
- private void addToParent(IFigure ref, IFigure ghost, IFigure parent) {
- parent.add(ghost);
- Rectangle copyRef = ref.getBounds().getCopy();
- ref.getParent().translateToAbsolute(copyRef);
- ghost.setBounds(copyRef);
- }
+ }
- private void resetPhantomSelections() {
- for (Entry<IFigure, Integer> entry : phantomSelection.entrySet()) {
- IFigure fig = entry.getKey();
- int oldValue = entry.getValue();
- ((Shape)fig).setLineWidth(oldValue);
+ // The selected difference is an ADD or DELETE and decorators exist for it
+ if (decorators != null && !decorators.isEmpty()) {
+ revealDecorators((List<? extends AbstractDecorator>)decorators);
+ }
}
- phantomSelection.clear();
- }
-
- private IFigure getReferenceFigureValue(Comparison comparison, DiagramDiff diff) {
- View viewRef = (View)diff.getView();
- return getReferenceFigure(comparison, viewRef);
- }
- private MergeViewerSide getTargetSide(Comparison comparison, View viewRef) {
- Match matchViewRef = comparison.getMatch(viewRef);
- // looking for null side
- MergeViewerSide side = null;
- if (matchViewRef.getLeft() == null) {
- side = MergeViewerSide.LEFT;
- } else {
- side = MergeViewerSide.RIGHT;
+ /**
+ * It reveals the given decorators.
+ *
+ * @param decorators
+ * The main decorators.
+ */
+ protected void revealDecorators(List<? extends AbstractDecorator> decorators) {
+ handleDecorators(decorators, true, true);
}
- return side;
- }
+ /**
+ * Get the figure related to the given view.
+ *
+ * @param view
+ * The view.
+ * @return the figure.
+ */
+ protected IFigure getFigure(View view) {
+ MergeViewerSide side = getSide(view);
+ GraphicalEditPart originEditPart = (GraphicalEditPart)getViewer(side).getEditPart(view);
+ if (originEditPart != null) {
+ return originEditPart.getFigure();
+ }
+ return null;
+ }
- private IFigure findMatchingParentGhost(IFigure figure) {
- IFigure parent = figure.getParent();
- if (parent != null) {
- Phantom parentTarget = phantomsMap.get(parent);
- if (parentTarget == null) {
- return findMatchingParentGhost(parent);
- } else {
- return parentTarget.figure;
+ /**
+ * It manages the display of the given decorators.
+ *
+ * @param decorators
+ * The decorators to handle.
+ * @param isAdd
+ * True if it has to be revealed, False otherwise.
+ * @param areMain
+ * It indicates if the given decorators to handle are considered as the main ones (the ones
+ * directly linked to the selected difference).
+ */
+ protected void handleDecorators(List<? extends AbstractDecorator> decorators, boolean isAdd,
+ boolean areMain) {
+ for (AbstractDecorator decorator : decorators) {
+ handleDecorator(decorator, isAdd, areMain);
}
}
- return parent;
- }
- private IFigure findMatchingParent(IFigure figure) {
- IFigure parent = figure.getParent();
- if (parent != null) {
- IFigure parentTarget = containerMap.get(parent);
- if (parentTarget == null) {
- return findMatchingParent(parent);
+ /**
+ * It manages the display of the given decorator.
+ *
+ * @param decorator
+ * The decorator to handle.
+ * @param isAdd
+ * True if it has to be revealed, False otherwise.
+ * @param isMain
+ * It indicates if the given decorator to handle is considered as the main one (the one
+ * directly linked to the selected difference).
+ */
+ protected void handleDecorator(AbstractDecorator decorator, boolean isAdd, boolean isMain) {
+ IFigure layer = decorator.getLayer();
+ IFigure figure = decorator.getFigure();
+ EditPart editpart = decorator.getEditPart();
+ if (editpart == null) {
+ if (isAdd && !layer.getChildren().contains(figure)) {
+ handleAddDecorator(decorator, layer, figure, isMain);
+ } else if (layer.getChildren().contains(figure)) {
+ handleDeleteDecorator(decorator, layer, figure, isMain);
+ }
} else {
- return parentTarget;
+ if (isAdd && !editpart.isActive()) {
+ editpart.activate();
+ handleAddDecorator(decorator, layer, figure, isMain);
+ } else if (editpart.isActive()) {
+ editpart.deactivate();
+ handleDeleteDecorator(decorator, layer, figure, isMain);
+ }
}
+
}
- return parent;
- }
- private DiagramMergeViewer getViewer(MergeViewerSide side) {
- switch (side) {
- case LEFT:
- return (DiagramMergeViewer)fLeft;
- case RIGHT:
- return (DiagramMergeViewer)fRight;
- case ANCESTOR:
- return (DiagramMergeViewer)fAncestor;
- default:
- return null;
+ /**
+ * It manages the reveal of the given decorator.
+ *
+ * @param decorator
+ * The decorator.
+ * @param parent
+ * The parent figure which has to get the figure to reveal (<code>toAdd</code>)
+ * @param toAdd
+ * The figure to reveal.
+ * @param isMain
+ * It indicates if the given decorator to reveal is considered as the main one (the one
+ * directly linked to the selected difference).
+ */
+ protected void handleAddDecorator(AbstractDecorator decorator, IFigure parent, IFigure toAdd,
+ boolean isMain) {
+ parent.add(toAdd);
}
- }
- private EObject getMatchView(Comparison comparison, View view, MergeViewerSide side) {
- Match match = comparison.getMatch(view);
- return getMatchView(match, side);
- }
+ /**
+ * It manages the hiding of the given decorator.
+ *
+ * @param decorator
+ * The decorator.
+ * @param parent
+ * The parent figure which has to get the figure to hide (<code>toDelete</code>)
+ * @param toDelete
+ * The figure to hide.
+ * @param isMain
+ * It indicates if the given decorator to hide is considered as the main one (the one
+ * directly linked to the selected difference).
+ */
+ protected void handleDeleteDecorator(AbstractDecorator decorator, IFigure parent, IFigure toDelete,
+ boolean isMain) {
+ parent.remove(toDelete);
+ }
- private EObject getMatchView(Match match, MergeViewerSide side) {
- switch (side) {
- case LEFT:
- return match.getLeft();
- case RIGHT:
- return match.getRight();
- case ANCESTOR:
- return match.getOrigin();
- default:
- return null;
+ /**
+ * It checks if the given difference is a good candidate to manage decorators.<br>
+ *
+ * @see {@link PhantomManager#goodCandidate()}.
+ * @param difference
+ * The difference.
+ * @return True if it is a good candidate, False otherwise.
+ */
+ private boolean isGoodCandidate(Diff difference) {
+ return goodCandidate().apply(difference);
}
- }
- private IFigure getReferenceFigure(Comparison comparison, View view) {
- MergeViewerSide originSide = null;
- if (getMatchView(comparison, view, MergeViewerSide.ANCESTOR) != null) {
- originSide = MergeViewerSide.ANCESTOR;
- } else {
- Match match = comparison.getMatch(view);
- if (match.getLeft() != null) {
- originSide = MergeViewerSide.LEFT;
+ /**
+ * Get the layer on the given side, from the reference view.<br>
+ *
+ * @see @ link PhantomManager#getIDLayer(View)} .
+ * @param referenceView
+ * The reference view.
+ * @param side
+ * The side where the layer has to be found.
+ * @return The layer figure.
+ */
+ protected IFigure getLayer(View referenceView, MergeViewerSide side) {
+ Diagram referenceDiagram = referenceView.getDiagram();
+ Diagram targetDiagram = (Diagram)getMatchView(referenceDiagram, side);
+ DiagramMergeViewer targetViewer = getViewer(side);
+ IFigure targetLayer = LayerManager.Helper.find(targetViewer.getEditPart(targetDiagram)).getLayer(
+ getIDLayer(referenceView));
+ return targetLayer;
+ }
+
+ /**
+ * Get the layer ID to use from the reference view.<br>
+ * If the reference view is an edge, it is the {@link LayerConstants.CONNECTION_LAYER} which is used,
+ * {@link LayerConstants.SCALABLE_LAYERS} otherwise.
+ *
+ * @param referenceView
+ * The reference view.
+ * @return The ID of te layer.
+ */
+ protected Object getIDLayer(View referenceView) {
+ if (referenceView instanceof Edge) {
+ return LayerConstants.CONNECTION_LAYER;
} else {
- originSide = MergeViewerSide.RIGHT;
+ return LayerConstants.SCALABLE_LAYERS;
}
}
- EObject origin = getMatchView(comparison, view, originSide);
+ /**
+ * It translates the coordinates of the given bounds, from the reference figure and the root of this
+ * one, to absolute coordinates.
+ *
+ * @param referenceFigure
+ * The reference figure.
+ * @param rootReferenceFigure
+ * The root of the reference figure.
+ * @param boundsToTranslate
+ * The bounds to translate.
+ */
+ protected void translateCoordinates(IFigure referenceFigure, IFigure rootReferenceFigure,
+ Rectangle boundsToTranslate) {
+ IFigure referenceParentFigure = referenceFigure.getParent();
+ if (referenceParentFigure != null && referenceFigure != rootReferenceFigure) {
+ if (referenceParentFigure.isCoordinateSystem()) {
+ boundsToTranslate.x += referenceParentFigure.getBounds().x;
+ boundsToTranslate.y += referenceParentFigure.getBounds().y;
+ }
+ translateCoordinates(referenceParentFigure, rootReferenceFigure, boundsToTranslate);
+ }
+ }
- if (origin instanceof View) {
+ /**
+ * Get the predicate to know the differences concerned by the display of decorators.
+ *
+ * @return The predicate.
+ */
+ protected abstract Predicate<Diff> goodCandidate();
+
+ /**
+ * Get the views which have to be used as reference to build the related decorators from the given
+ * difference of the value concerned by the difference.<br>
+ *
+ * @param difference
+ * The difference.
+ * @return The list of reference views.
+ */
+ protected abstract List<View> getReferenceViews(DiagramDiff difference);
+
+ /**
+ * Get the side where decorators have to be drawn, according to the given reference view and its
+ * match.<br>
+ *
+ * @param match
+ * The match of the reference view.
+ * @param referenceView
+ * The reference view.
+ * @return The side for phantoms.
+ */
+ protected abstract MergeViewerSide getTargetSide(Match match, View referenceView);
+
+ /**
+ * It creates new decorators and registers them.
+ *
+ * @param diff
+ * The related difference used as index for the main decorator.
+ * @param referenceView
+ * The reference view as base for creation of the decorator.
+ * @param referenceFigure
+ * The reference figure as base for creation of the decorator.
+ * @param targetSide
+ * The side where the decorator has to be created.
+ * @return The list of main decorators.
+ */
+ protected abstract AbstractDecorator createAndRegisterDecorator(Diff diff, View referenceView,
+ IFigure referenceFigure, MergeViewerSide targetSide);
+
+ /**
+ * Get the main decorators related to the given difference.
+ *
+ * @param difference
+ * The difference.
+ * @return The list of main decorators.
+ */
+ protected abstract List<? extends AbstractDecorator> getDecorators(Diff difference);
- return getFigure(comparison, (View)origin);
- }
- return null;
}
- private IFigure getFigure(Comparison comparison, View view) {
- MergeViewerSide side = getSide(comparison, view);
- GraphicalEditPart originEditPart = (GraphicalEditPart)getViewer(side).getEditPart(view);
- return originEditPart.getFigure();
- }
+ /**
+ * Phantom manager to create, hide or reveal phantom figures related to deleted or added graphical
+ * objects.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+ private class PhantomManager extends AbstractDecoratorManager {
+
+ /**
+ * Phantom represented by a <code>figure</code> on a <code>layer</code>, from the given
+ * <code>side</code> of the merge viewer. An edit part may be linked to the <code>figure</code> in
+ * some cases.<br>
+ * The phantom is related to a <code>difference</code> and it is binded with the reference view and
+ * figure.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+ private class Phantom extends AbstractDecorator {
+
+ /**
+ * Constructor.
+ *
+ * @param layer
+ * {@link Phantom#fLayer}.
+ * @param side
+ * {@link Phantom#fSide}.
+ * @param originView
+ * {@link Phantom#fOriginView}.
+ * @param originFigure
+ * {@link Phantom#fOriginFigure}.
+ * @param diff
+ * {@link Phantom#fDifference}.
+ */
+ public Phantom(IFigure layer, MergeViewerSide side, View originView, IFigure originFigure,
+ Diff diff) {
+ setLayer(layer);
+ setSide(side);
+ setOriginView(originView);
+ setOriginFigure(originFigure);
+ setDifference(diff);
+ }
- private IFigure createGhostFigure(IFigure ref, MergeViewerSide side, boolean isEltOfList) {
+ /**
+ * Get the decorator dependencies of this one. The dependencies are the decorator ancestors plus
+ * the extremities of an edge decorator.
+ *
+ * @return The list of found decorators.
+ */
+ public List<? extends AbstractDecorator> getDependencies() {
+ List<AbstractDecorator> result = new ArrayList<AbstractDecorator>();
+ result.addAll(getAncestors());
+ if (fOriginView instanceof Edge) {
+ View source = ((Edge)fOriginView).getSource();
+ View target = ((Edge)fOriginView).getTarget();
+ result.addAll(getOrCreateRelatedDecorators(source));
+ result.addAll(getOrCreateRelatedDecorators(target));
+ }
+ return result;
+ }
+
+ /**
+ * From the given view, get or create the related phantoms.
+ *
+ * @param referenceView
+ * The given view.
+ * @return The list of phantoms.
+ */
+ private List<Phantom> getOrCreateRelatedDecorators(EObject referenceView) {
+ List<Phantom> result = new ArrayList<Phantom>();
+ Collection<Diff> changes = Collections2.filter(getComparison().getDifferences(referenceView),
+ goodCandidate());
+ for (Diff change : changes) {
+ Phantom phantom = fPhantomRegistry.get(change);
+ if (phantom == null) {
+ IFigure referenceFigure = PhantomManager.this.getFigure((View)referenceView);
+ if (referenceFigure != null) {
+ phantom = createAndRegisterDecorator(change, (View)referenceView,
+ referenceFigure, fSide);
+ }
+ }
+ if (phantom != null) {
+ result.add(phantom);
+ }
+ }
+ return result;
+ }
- Rectangle rect = ref.getBounds().getCopy();
+ /**
+ * Get the ancestor decorators of this one.
+ *
+ * @return The list of the ancestors.
+ */
+ private List<? extends AbstractDecorator> getAncestors() {
+ List<AbstractDecorator> result = new ArrayList<AbstractDecorator>();
+ EObject parentOriginView = fOriginView.eContainer();
+ while (parentOriginView != null) {
+ result.addAll(getOrCreateRelatedDecorators(parentOriginView));
+ parentOriginView = parentOriginView.eContainer();
+ }
+ return result;
+ }
+ }
- IFigure ghost = null;
+ /** Registry of created phantoms, indexed by difference. */
+ private final Map<Diff, Phantom> fPhantomRegistry = new HashMap<Diff, Phantom>();
- if (isEltOfList) {
- ghost = new Polyline();
- ((Polyline)ghost).addPoint(new Point(rect.x, rect.y - 1));
- ((Polyline)ghost).addPoint(new Point(rect.x + rect.width, rect.y - 1));
- ghost.setBackgroundColor(new Color(Display.getCurrent(), new RGB(255, 0, 0)));
- ((Shape)ghost).setLineWidth(2);
- } else {
- ghost = new DeleteGhostImageFigure();
- ghost.setBounds(rect);
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#goodCandidate()<br>
+ * Only the diagram differences ADD or DELETE are concerned by this display.
+ */
+ @Override
+ protected Predicate<Diff> goodCandidate() {
+ return new Predicate<Diff>() {
+ public boolean apply(Diff difference) {
+ return and(instanceOf(DiagramDiff.class),
+ or(ofKind(DifferenceKind.ADD), ofKind(DifferenceKind.DELETE))).apply(difference);
+ }
+ };
}
- rect.performScale(((DiagramRootEditPart)getViewer(side).getGraphicalViewer().getRootEditPart())
- .getZoomManager().getZoom());
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#getReferenceViews(org.eclipse.emf.compare.diagram.DiagramDiff)
+ */
+ @Override
+ protected List<View> getReferenceViews(DiagramDiff difference) {
+ List<View> result = new ArrayList<View>();
- ghost.setForegroundColor(new Color(Display.getCurrent(), new RGB(255, 0, 0)));
- ((Shape)ghost).setAlpha(150);
- return ghost;
- }
+ Match match = getComparison().getMatch(difference.getView());
- private MergeViewerSide getSide(Diff diff) {
- if (diff.getSource() == DifferenceSource.LEFT) {
- return MergeViewerSide.LEFT;
- } else {
- return MergeViewerSide.RIGHT;
- }
+ EObject originObj = match.getOrigin();
+ EObject leftObj = match.getLeft();
+ EObject rightObj = match.getRight();
- }
+ if (leftObj instanceof View || rightObj instanceof View) {
+ result.add(getReferenceView((View)originObj, (View)leftObj, (View)rightObj));
+ }
- private MergeViewerSide getSide(Comparison comparison, View view) {
- Match match = comparison.getMatch(view);
- if (match.getLeft() == view) {
- return MergeViewerSide.LEFT;
- } else if (match.getRight() == view) {
- return MergeViewerSide.RIGHT;
- } else if (match.getOrigin() == view) {
- return MergeViewerSide.ANCESTOR;
- } else {
- return null;
+ return result;
}
- }
-
- // *** BEGIN alternative developing solution ***
- final class PhantomsManager {
- /** */
- private Map<IFigure, MatchFigure> relevantFigures = new HashMap<IFigure, MatchFigure>();
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#getTargetSide(org.eclipse.emf.compare.Match,
+ * org.eclipse.gmf.runtime.notation.View)<br>
+ * If the left object is null, a phantom should be drawn instead. Else, it means that the right
+ * object is null and a phantom should be displayed on the right side.
+ */
+ @Override
+ protected MergeViewerSide getTargetSide(Match match, View referenceView) {
+ MergeViewerSide targetSide = null;
+ if (match.getLeft() == null) {
+ targetSide = MergeViewerSide.LEFT;
+ } else {
+ targetSide = MergeViewerSide.RIGHT;
+ }
+ return targetSide;
+ }
- private List<MatchFigure> matchedFigures = new ArrayList<MatchFigure>();
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#createAndRegisterDecorator(org.eclipse.emf.compare.Diff,
+ * org.eclipse.gmf.runtime.notation.View, org.eclipse.draw2d.IFigure,
+ * org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide)
+ */
+ @Override
+ protected Phantom createAndRegisterDecorator(Diff diff, View referenceView, IFigure referenceFigure,
+ MergeViewerSide targetSide) {
+ Phantom phantom = createPhantom(diff, referenceView, referenceFigure, targetSide);
+ fPhantomRegistry.put(diff, phantom);
+ return phantom;
+ }
- private Map<IFigure, IFigure> phantoms = new HashMap<IFigure, IFigure>();
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#getDecorators(org.eclipse.emf.compare.Diff)
+ */
+ @Override
+ protected List<Phantom> getDecorators(Diff difference) {
+ List<Phantom> result = new ArrayList<DiagramContentMergeViewer.PhantomManager.Phantom>();
+ Phantom phantom = fPhantomRegistry.get(difference);
+ if (phantom != null) {
+ result.add(phantom);
+ }
+ return result;
+ }
- public void initCacheFigures(Comparison comparison) {
- List<Match> matches = getAllMatches(comparison);
- for (Match match : matches) {
- createMatchFigure(match);
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#handleDecorator(org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager.AbstractDecorator,
+ * boolean)
+ */
+ @Override
+ protected void handleDecorator(AbstractDecorator decorator, boolean isAdd, boolean isMain) {
+ super.handleDecorator(decorator, isAdd, isMain);
+ // Display the dependencies (context) of this decorator
+ for (AbstractDecorator ancestor : ((Phantom)decorator).getDependencies()) {
+ super.handleDecorator(ancestor, isAdd, false);
}
- // Add glue to the figures
- for (MatchFigure matchFigure : matchedFigures) {
- createParentMatchFigures(matchFigure);
+ }
+
+ @Override
+ protected void handleAddDecorator(AbstractDecorator decorator, IFigure parent, IFigure toAdd,
+ boolean isMain) {
+ super.handleAddDecorator(decorator, parent, toAdd, isMain);
+ // Set the highlight of the figure
+ Color strokeColor = null;
+ if (isMain) {
+ ((Shape)toAdd).setLineWidth(((Shape)toAdd).getLineWidth() + 1);
+ strokeColor = getCompareColor().getStrokeColor(decorator.getDifference(), isThreeWay(),
+ false, true);
+ // figure.setBorder(new FocusBorder());
+
+ // FIXME: Find a way to set the focus on this figure.
+ getViewer(decorator.getSide()).getGraphicalViewer().reveal(toAdd);
+ } else {
+ strokeColor = getCompareColor().getStrokeColor(decorator.getDifference(), isThreeWay(),
+ false, false);
+
}
+ toAdd.setForegroundColor(strokeColor);
}
- public void initPhantoms(Comparison comparison, Collection<Diff> deleteDifferences) {
- Iterator<Diff> itDeleteDiffs = deleteDifferences.iterator();
- while (itDeleteDiffs.hasNext()) {
+ @Override
+ protected void handleDeleteDecorator(AbstractDecorator decorator, IFigure parent, IFigure toDelete,
+ boolean isMain) {
+ super.handleDeleteDecorator(decorator, parent, toDelete, isMain);
+ // Re-initialize the highlight of the figure
+ if (isMain) {
+ ((Shape)toDelete).setLineWidth(((Shape)toDelete).getLineWidth() - 1);
+ Color strokeColor = getCompareColor().getStrokeColor(decorator.getDifference(), isThreeWay(),
+ false, false);
+ toDelete.setForegroundColor(strokeColor);
+ // figure.setBorder(null);
+ }
+ }
- DiagramDiff diff = (DiagramDiff)itDeleteDiffs.next();
+ /**
+ * Get the view which has to be used as reference to build a phantom.<br>
+ * The reference is the non null object among the given objects. In case of delete object, in the
+ * context of three-way comparison, the reference will be the ancestor one (<code>originObj</code>).
+ *
+ * @param originObj
+ * The ancestor object.
+ * @param leftView
+ * The left object.
+ * @param rightView
+ * The right object.
+ * @return The reference object.
+ */
+ private View getReferenceView(View originObj, View leftView, View rightView) {
+ View referenceView;
+ if (originObj != null) {
+ referenceView = originObj;
+ } else if (leftView != null) {
+ referenceView = leftView;
+ } else {
+ referenceView = rightView;
+ }
+ return referenceView;
+ }
- Map<MergeViewerSide, IFigure> figures = getFigures(comparison, diff);
+ /**
+ * It creates a new phantom from the given difference, view and figure.
+ *
+ * @param diff
+ * The related difference used as index for the main phantom.
+ * @param referenceView
+ * The reference view as base for creation of the phantom.
+ * @param referenceFigure
+ * The reference figure as base for creation of the phantom.
+ * @param side
+ * The side where the phantom has to be created.
+ * @return The phantom.
+ */
+ private Phantom createPhantom(Diff diff, View referenceView, IFigure referenceFigure,
+ MergeViewerSide side) {
- View refView = (View)diff.getView();
- Match match = comparison.getMatch(refView);
+ MergeViewerSide referenceSide = getSide(referenceView);
- MergeViewerSide refSide = getReferenceSide(match);
- IFigure refFigure = figures.get(refSide);
+ Rectangle rect = referenceFigure.getBounds().getCopy();
- MatchFigure matchFigure = new MatchFigure(figures.get(MergeViewerSide.ANCESTOR), figures
- .get(MergeViewerSide.LEFT), figures.get(MergeViewerSide.RIGHT));
+ IFigure referenceLayer = getLayer(referenceView, referenceSide);
+ translateCoordinates(referenceFigure, referenceLayer, rect);
- MergeViewerSide targetSide = getTargetSide(comparison, refView);
+ IFigure ghost = null;
- IFigure ghost = createGhostFigure(refFigure, targetSide,
- refView.eContainer() instanceof BasicCompartment);
- matchFigure.setGhost(targetSide, ghost);
+ IFigure targetLayer = getLayer(referenceView, side);
+ Phantom phantom = new Phantom(targetLayer, side, referenceView, referenceFigure, diff);
- relevantFigures.put(refFigure, matchFigure);
- relevantFigures.put(ghost, matchFigure);
- phantoms.put(refFigure, ghost);
+ // Container "list" case
+ if (referenceView.eContainer() instanceof BasicCompartment) {
+ ghost = new Polyline();
- }
- }
+ Diff refiningDiff = Iterators.find(diff.getRefinedBy().iterator(), and(
+ valueIs(referenceView), onFeature(NotationPackage.Literals.VIEW__PERSISTED_CHILDREN
+ .getName())));
- public void attachPhantoms() {
- for (Entry<IFigure, IFigure> entry : phantoms.entrySet()) {
- IFigure refFigure = entry.getKey();
- MatchFigure matchFigure = relevantFigures.get(refFigure);
- MatchFigure matchFigureParent = relevantFigures.get(refFigure.getParent());
- IFigure ghost = matchFigure.ghost;
- if (ghost != null) {
- IFigure targetParent = matchFigureParent.getFigure(matchFigure.getSide(ghost));
+ // FIXME:
+ // - It has to manage visible views.
+ // - What about transient children ?
+ int index = DiffUtil.findInsertionIndex(getComparison(), refiningDiff,
+ side == MergeViewerSide.LEFT);
- // Retrieve the target layer. FIXME: retrieve the target diagram view to get its editpart.
- IFigure targetLayer = LayerManager.Helper.find(
- getViewer(matchFigure.getSide(ghost)).getEditPart(null)).getLayer(
- LayerConstants.SCALABLE_LAYERS);
+ IFigure referenceParentFigure = referenceFigure.getParent();
+ Rectangle referenceParentBounds = referenceParentFigure.getBounds().getCopy();
+ translateCoordinates(referenceParentFigure, referenceLayer, referenceParentBounds);
- if (targetParent instanceof FreeformLayeredPane) {
- targetLayer.add(ghost);
- } else {
- targetParent.add(ghost);
+ View parentView = (View)getMatchView(referenceView.eContainer(), side);
+ if (parentView != null) {
+ int nbElements = getVisibleViews(parentView).size();
+ if (index > nbElements) {
+ index = nbElements;
}
+ }
+ // FIXME: The add of decorators modifies the physical coordinates of elements
+ // FIXME: Compute position from the y position of the first child + sum of height of the
+ // children.
+ int pos = rect.height * index + referenceParentBounds.y + 1;
+
+ ((Polyline)ghost).setEndpoints(new Point(rect.x, pos), new Point(rect.x + rect.width, pos));
+
+ // Edge case
+ } else if (referenceView instanceof Edge) {
+ // If the edge phantom ties shapes where their coordinates changed
+ if (hasAnExtremityChange((Edge)referenceView, side)) {
+ EditPart edgeEditPart = createEdgeEditPart((Edge)referenceView, referenceSide, side);
+ if (edgeEditPart instanceof GraphicalEditPart) {
+ phantom.setEditPart(edgeEditPart);
+ ghost = ((GraphicalEditPart)edgeEditPart).getFigure();
+ ghost.getChildren().clear();
+ }
+ // Else, it creates only a polyline connection figure with the same properties as the
+ // reference
+ } else {
+ if (referenceFigure instanceof PolylineConnection) {
+ ghost = new PolylineConnection();
+ ghost.setBounds(rect);
+ ((PolylineConnection)ghost).setPoints(((PolylineConnection)referenceFigure)
+ .getPoints().getCopy());
+ }
}
}
- }
- private MergeViewerSide getReferenceSide(Match match) {
- EObject origin = match.getOrigin();
- if (origin != null) {
- return MergeViewerSide.ANCESTOR;
- } else {
- EObject left = match.getLeft();
- EObject right = match.getRight();
- if (left != null) {
- return MergeViewerSide.LEFT;
- } else if (right != null) {
- return MergeViewerSide.RIGHT;
- }
+ // Default case: Nodes
+ if (ghost == null) {
+ ghost = new RectangleFigure();
+ ghost.setBounds(rect);
}
- return null;
- }
- private ViewSide getReferenceView(Match match) {
- switch (getReferenceSide(match)) {
- case ANCESTOR:
- return new ViewSide(MergeViewerSide.ANCESTOR, (View)match.getOrigin());
- case LEFT:
- return new ViewSide(MergeViewerSide.LEFT, (View)match.getLeft());
- case RIGHT:
- return new ViewSide(MergeViewerSide.RIGHT, (View)match.getRight());
+ if (ghost instanceof Shape) {
+ ((Shape)ghost).setFill(false);
}
- return null;
+
+ phantom.setFigure(ghost);
+
+ translateWhenInsideContainerChange(phantom);
+
+ return phantom;
}
- private List<Match> getAllMatches(Comparison comparison) {
- List<Match> result = new ArrayList<Match>();
- for (Match match : comparison.getMatches()) {
- result.add(match);
- result.addAll(Lists.newArrayList(match.getAllSubmatches()));
- }
- return result;
+ /**
+ * Get the visible view under the given parent view.
+ *
+ * @param parent
+ * The parent view.
+ * @return The list of views.
+ */
+ private List<View> getVisibleViews(View parent) {
+ return (List<View>)Lists.newArrayList(Iterators.filter(parent.getChildren().iterator(),
+ new Predicate<Object>() {
+ public boolean apply(Object input) {
+ return input instanceof View && ((View)input).isVisible();
+ }
+ }));
}
- private List<Match> getDeepestMatches(Comparison comparison) {
- List<Match> result = new ArrayList<Match>();
- for (Match match : comparison.getMatches()) {
- result.addAll(getDeepestMatches(match));
+ /**
+ * It translates and resizes the figure of the given phantom when this one is nested in a container
+ * which is subjected to a coordinates change.
+ *
+ * @param phantom
+ * The phantom.
+ */
+ private void translateWhenInsideContainerChange(Phantom phantom) {
+ // FIXME: It was "phantom.getDifference().getMatch()" replaced by
+ // "getDiffAncestors(phantom.getDifference())" to fix a regression due to an other regression
+ // about
+ // the location of the extensions under matches.
+ Collection<Diff> changes = Collections2.filter(getDiffAncestors(phantom.getDifference()),
+ new Predicate<Diff>() {
+
+ public boolean apply(Diff difference) {
+ // FIXME: it will be changed to CHANGE (change coordinates (or dimension))
+ return difference.getKind() == DifferenceKind.MOVE;
+ }
+
+ });
+ if (changes.size() > 0) {
+ View referenceView = phantom.getOriginView();
+ View parentReferenceView = (View)referenceView.eContainer();
+ if (parentReferenceView != null) {
+ View parentView = (View)getMatchView(parentReferenceView, phantom.getSide());
+ IFigure parentFigure = getFigure(parentView);
+ if (parentFigure != null) {
+ Rectangle parentRect = parentFigure.getBounds().getCopy();
+ translateCoordinates(parentFigure,
+ getLayer(parentReferenceView, getSide(parentView)), parentRect);
+
+ IFigure parentReferenceFigure = getFigure(parentReferenceView);
+ // CHECKSTYLE:OFF
+ if (parentReferenceFigure != null) {
+ Rectangle parentReferenceRect = parentReferenceFigure.getBounds().getCopy();
+ translateCoordinates(parentReferenceFigure, getLayer(parentReferenceView,
+ getSide(parentReferenceView)), parentReferenceRect);
+
+ int deltaX = parentRect.x - parentReferenceRect.x;
+ int deltaY = parentRect.y - parentReferenceRect.y;
+ int deltaWidth = parentRect.width - parentReferenceRect.width;
+ int deltaHeight = parentRect.height - parentReferenceRect.height;
+
+ IFigure figure = phantom.getFigure();
+
+ Rectangle rect = figure.getBounds().getCopy();
+ rect.x += deltaX;
+ rect.y += deltaY;
+ rect.width += deltaWidth;
+ if (!(figure instanceof Polyline)) {
+ rect.height += deltaHeight;
+ }
+ figure.setBounds(rect);
+
+ if (figure instanceof Polyline) {
+
+ Point firstPoint = ((Polyline)figure).getPoints().getFirstPoint().getCopy();
+ Point lastPoint = ((Polyline)figure).getPoints().getLastPoint().getCopy();
+
+ firstPoint.x += deltaX;
+ firstPoint.y += deltaY;
+
+ lastPoint.x += deltaX + deltaWidth;
+ lastPoint.y += deltaY;
+
+ ((Polyline)figure).setEndpoints(firstPoint, lastPoint);
+
+ }
+ }
+ // CHECKSTYLE:ON
+ }
+ }
}
- return result;
}
- private List<Match> getDeepestMatches(Match match) {
+ /**
+ * Get all the ancestor matches from the given difference.
+ *
+ * @param difference
+ * The difference.
+ * @return the list of ancestor matches.
+ */
+ private List<Match> getMatchAncestors(Diff difference) {
List<Match> result = new ArrayList<Match>();
- Iterator<Match> subMatches = match.getAllSubmatches().iterator();
- if (!subMatches.hasNext()) {
- result.add(match);
- } else {
- while (subMatches.hasNext()) {
- Match subMatch = subMatches.next();
- if (subMatch.getSubmatches().isEmpty()) {
- result.add(subMatch);
- }
+ EObject match = difference.getMatch();
+ while (match != null) {
+ if (match instanceof Match) {
+ result.add((Match)match);
}
+ match = match.eContainer();
}
return result;
}
- private Map<MergeViewerSide, IFigure> getFigures(Comparison comparison, DiagramDiff diff) {
- Map<MergeViewerSide, IFigure> result = new HashMap<MergeViewerSide, IFigure>();
- View view = (View)diff.getView();
- Match match = comparison.getMatch(view);
- View origin = (View)match.getOrigin();
- result.putAll(getFigure(comparison, origin));
- View left = (View)match.getLeft();
- result.putAll(getFigure(comparison, left));
- View right = (View)match.getRight();
- result.putAll(getFigure(comparison, right));
+ /**
+ * Get all the differences above the given one.
+ *
+ * @param difference
+ * The difference.
+ * @return the list of parent differences.
+ */
+ private List<Diff> getDiffAncestors(Diff difference) {
+ List<Diff> result = new ArrayList<Diff>();
+ Iterator<Match> matches = getMatchAncestors(difference).iterator();
+ while (matches.hasNext()) {
+ Match match = matches.next();
+ result.addAll(match.getDifferences());
+ }
return result;
}
- private IFigure getFigure(ViewSide viewSide) {
- GraphicalEditPart originEditPart = (GraphicalEditPart)getViewer(viewSide.side).getEditPart(
- viewSide.view);
- return originEditPart.getFigure();
+ /**
+ * It checks that the given edge is linked to graphical objects subjected to coordinate changes, on
+ * the given side.
+ *
+ * @param edge
+ * The edge to check.
+ * @param targetSide
+ * The side to check extremities (side of the phantom).
+ * @return True if an extremity at least changed its location, False otherwise.
+ */
+ private boolean hasAnExtremityChange(Edge edge, MergeViewerSide targetSide) {
+ View referenceSource = edge.getSource();
+ View referenceTarget = edge.getTarget();
+ return hasChange(referenceSource, targetSide) || hasChange(referenceTarget, targetSide);
}
- private Map<MergeViewerSide, IFigure> getFigure(Comparison comparison, View view) {
- Map<MergeViewerSide, IFigure> result = new HashMap<MergeViewerSide, IFigure>();
- if (view != null) {
- MergeViewerSide side = getSide(comparison, view);
- GraphicalEditPart editPart = (GraphicalEditPart)getViewer(side).getEditPart(view);
- result.put(side, editPart.getFigure());
+ /**
+ * It checks that the coordinates of the given view changed between left and right, from the given
+ * side.
+ *
+ * @param referenceView
+ * The view to check.
+ * @param targetSide
+ * The side to focus.
+ * @return True if the view changed its location, False otherwise.
+ */
+ private boolean hasChange(View referenceView, MergeViewerSide targetSide) {
+ DifferenceKind lookup = DifferenceKind.MOVE; // FIXME: it will be change to CHANGE (change
+ // coordinates)
+ View extremity = (View)getMatchView(referenceView, targetSide);
+ // Look for a related change coordinates on the extremity of the edge reference.
+ Collection<Diff> diffs = Collections2.filter(getComparison().getDifferences(referenceView), and(
+ instanceOf(DiagramDiff.class), ofKind(lookup)));
+ if (diffs.isEmpty()) {
+ // Look for a related change coordinates on the matching extremity (other side) of the edge
+ // reference.
+ diffs = Collections2.filter(getComparison().getDifferences(extremity), and(
+ instanceOf(DiagramDiff.class), ofKind(lookup)));
}
- return result;
+ return !diffs.isEmpty();
}
- private MatchFigure createMatchFigure(Match match) {
-
- IFigure originFigure = null;
- IFigure leftFigure = null;
- IFigure rightFigure = null;
-
- if (match.getOrigin() != null) {
- originFigure = getFigure(new ViewSide(MergeViewerSide.ANCESTOR, (View)match.getOrigin()));
+ /**
+ * It creates and returns a new edit part from the given edge. This edit part listens the reference
+ * edge but is attached to the controllers of the target (phantom) side.
+ *
+ * @param referenceEdge
+ * The edge as base of the edit part.
+ * @param referenceSide
+ * The side of this edge.
+ * @param targetSide
+ * The side where the edit part has to be created to draw the related phantom.
+ * @return The new edit part.
+ */
+ private EditPart createEdgeEditPart(Edge referenceEdge, MergeViewerSide referenceSide,
+ MergeViewerSide targetSide) {
+ EditPart edgeEditPartReference = getViewer(referenceSide).getEditPart(referenceEdge);
+ EditPart edgeEditPart = null;
+ if (edgeEditPartReference instanceof ConnectionEditPart) {
+ edgeEditPart = createEditPartForPhantoms(referenceEdge, referenceSide, targetSide);
+ if (edgeEditPart instanceof ConnectionEditPart) {
+ View source = (View)((ConnectionEditPart)edgeEditPartReference).getSource().getModel();
+ if (source == null) {
+ source = referenceEdge.getSource();
+ }
+ View target = (View)((ConnectionEditPart)edgeEditPartReference).getTarget().getModel();
+ if (target == null) {
+ target = referenceEdge.getTarget();
+ }
+ EditPart sourceEp = createEditPartForPhantoms(source, referenceSide, targetSide);
+ ((AbstractGraphicalEditPart)sourceEp).activate();
+ ((AbstractGraphicalEditPart)sourceEp).getFigure();
+ ((ConnectionEditPart)edgeEditPart).setSource(sourceEp);
+ EditPart targetEp = createEditPartForPhantoms(target, referenceSide, targetSide);
+ ((AbstractGraphicalEditPart)targetEp).activate();
+ ((AbstractGraphicalEditPart)targetEp).getFigure();
+ ((ConnectionEditPart)edgeEditPart).setTarget(targetEp);
+ }
}
- if (match.getLeft() != null) {
- leftFigure = getFigure(new ViewSide(MergeViewerSide.LEFT, (View)match.getLeft()));
+ return edgeEditPart;
+ }
+ /**
+ * It creates and returns a new edit part from the given view. This edit part listens the reference
+ * view but is attached to the controllers of the target (phantom) side.
+ *
+ * @param referenceView
+ * The view as base of the edit part.
+ * @param referenceSide
+ * The side of this view.
+ * @param targetSide
+ * The side where the edit part has to be created to draw the related phantom.
+ * @return The new edit part.
+ */
+ private EditPart createEditPartForPhantoms(EObject referenceView, MergeViewerSide referenceSide,
+ MergeViewerSide targetSide) {
+ EditPart editPartParent = null;
+ EditPart editPart = null;
+ EditPart editPartReference = getViewer(referenceSide).getEditPart(referenceView);
+ EditPart editPartReferenceParent = editPartReference.getParent();
+ Object referenceViewParent = editPartReferenceParent.getModel();
+ if (!(referenceViewParent instanceof EObject)) {
+ referenceViewParent = referenceView.eContainer();
}
- if (match.getRight() != null) {
- rightFigure = getFigure(new ViewSide(MergeViewerSide.RIGHT, (View)match.getRight()));
+ View viewParent = (View)getMatchView((EObject)referenceViewParent, targetSide);
+ if (viewParent != null) {
+ editPartParent = getViewer(targetSide).getEditPart(viewParent);
}
+ if (editPartParent == null) {
+ editPartParent = createEditPartForPhantoms((EObject)referenceViewParent, referenceSide,
+ targetSide);
- MatchFigure matchFigure = createMatchFigure(originFigure, leftFigure, rightFigure);
- matchedFigures.add(matchFigure);
- matchFigure.match = match;
+ }
+ if (editPartParent != null) {
+ View view = (View)getMatchView(referenceView, targetSide);
+ if (view != null) {
+ editPart = getViewer(targetSide).getEditPart(view);
+ }
+ if (editPart == null) {
+ editPart = getViewer(targetSide).getGraphicalViewer().getEditPartFactory()
+ .createEditPart(editPartParent, referenceView);
+ editPart.setParent(editPartParent);
+ getViewer(targetSide).getGraphicalViewer().getEditPartRegistry().put(referenceView,
+ editPart);
+ }
- return matchFigure;
+ }
+ return editPart;
}
- private MatchFigure createMatchFigure(IFigure origin, IFigure left, IFigure right) {
- MatchFigure matchFigure = new MatchFigure(origin, left, right);
- if (origin != null) {
- relevantFigures.put(origin, matchFigure);
- }
- if (left != null) {
- relevantFigures.put(left, matchFigure);
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.IDecoratorManager#hideAll()
+ */
+ public void hideAll() {
+ Iterator<Phantom> visiblePhantoms = Iterators.filter(fPhantomRegistry.values().iterator(),
+ new Predicate<Phantom>() {
+ public boolean apply(Phantom phantom) {
+ return phantom.getFigure().getParent() != null;
+ }
+ });
+ while (visiblePhantoms.hasNext()) {
+ Phantom phantom = (Phantom)visiblePhantoms.next();
+ handleDecorator(phantom, false, true);
}
- if (right != null) {
- relevantFigures.put(right, matchFigure);
+ }
+ }
+
+ /**
+ * Marker manager to create, hide or reveal marker figures related to deleted or added graphical objects.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+ private class MarkerManager extends AbstractDecoratorManager {
+
+ /**
+ * Marker represented by a <code>figure</code> on a <code>layer</code>, from the given
+ * <code>side</code> of the merge viewer. An edit part may be linked to the <code>figure</code> in
+ * some cases.<br>
+ * The marker is related to a <code>difference</code> and it is binded with the reference view and
+ * figure.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+ private class Marker extends AbstractDecorator {
+
+ /** Thickness of the marker. */
+ public static final int THICKNESS = 6;
+
+ /** The alpha number for the figure. */
+ public static final int ALPHA = 30;
+
+ /**
+ * Constructor.
+ *
+ * @param layer
+ * {@link Marker#fLayer}.
+ * @param side
+ * {@link Marker#fSide}.
+ * @param originView
+ * {@link Marker#fOriginView}.
+ * @param originFigure
+ * {@link Marker#fOriginFigure}.
+ * @param diff
+ * {@link Marker#fDifference}.
+ */
+ public Marker(IFigure layer, MergeViewerSide side, View originView, IFigure originFigure,
+ Diff diff) {
+ setLayer(layer);
+ setSide(side);
+ setOriginView(originView);
+ setOriginFigure(originFigure);
+ setDifference(diff);
}
- return matchFigure;
}
- private void createParentMatchFigures(MatchFigure matchFigure) {
- IFigure origin = matchFigure.origin;
- IFigure left = matchFigure.left;
- IFigure right = matchFigure.right;
- while (createParentMatchFigure(origin, left, right)) {
- if (origin != null) {
- origin = origin.getParent();
+ /** Registry of created markers, indexed by difference. */
+ private Map<Diff, List<Marker>> fMarkerRegistry = new HashMap<Diff, List<Marker>>();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#getReferenceViews(org.eclipse.emf.compare.diagram.DiagramDiff)
+ */
+ @Override
+ protected List<View> getReferenceViews(DiagramDiff difference) {
+ List<View> result = new ArrayList<View>();
+ Match matchValue = getComparison().getMatch(difference.getView());
+ if (matchValue != null) {
+ if (matchValue.getLeft() != null) {
+ result.add((View)matchValue.getLeft());
}
- if (left != null) {
- left = left.getParent();
+ if (matchValue.getRight() != null) {
+ result.add((View)matchValue.getRight());
}
- if (right != null) {
- right = right.getParent();
+ if (getComparison().isThreeWay()) {
+ switch (difference.getKind()) {
+ case DELETE:
+ case CHANGE:
+ case MOVE:
+ result.add((View)matchValue.getOrigin());
+ break;
+ default:
+ break;
+ }
}
}
+ return result;
}
- private boolean createParentMatchFigure(IFigure origin, IFigure left, IFigure right) {
- IFigure originParent = null;
- IFigure leftParent = null;
- IFigure rightParent = null;
- if (left != null) {
- leftParent = left.getParent();
- if (leftParent == null || relevantFigures.get(leftParent) != null) {
- return false;
- }
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#getTargetSide(org.eclipse.emf.compare.Match,
+ * org.eclipse.gmf.runtime.notation.View)
+ */
+ @Override
+ protected MergeViewerSide getTargetSide(Match match, View referenceView) {
+ return getSide(referenceView);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#createAndRegisterDecorator(org.eclipse.emf.compare.Diff,
+ * org.eclipse.gmf.runtime.notation.View, org.eclipse.draw2d.IFigure,
+ * org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide)
+ */
+ @Override
+ protected Marker createAndRegisterDecorator(Diff diff, View referenceView, IFigure referenceFigure,
+ MergeViewerSide targetSide) {
+ Marker marker = createMarker(diff, referenceView, referenceFigure, targetSide);
+ List<Marker> markers = fMarkerRegistry.get(diff);
+ if (markers == null) {
+ markers = new ArrayList<Marker>();
+ fMarkerRegistry.put(diff, markers);
}
- if (right != null) {
- rightParent = right.getParent();
- if (rightParent == null || relevantFigures.get(rightParent) != null) {
- return false;
+ markers.add(marker);
+ return marker;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#getDecorators(org.eclipse.emf.compare.Diff)
+ */
+ @Override
+ protected List<Marker> getDecorators(Diff difference) {
+ return fMarkerRegistry.get(difference);
+ }
+
+ @Override
+ protected void handleAddDecorator(AbstractDecorator decorator, IFigure parent, IFigure toAdd,
+ boolean isMain) {
+ super.handleAddDecorator(decorator, parent, toAdd, isMain);
+ DiagramMergeViewer viewer = getViewer(decorator.getSide());
+ viewer.getGraphicalViewer().reveal(viewer.getEditPart(decorator.getOriginView()));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.AbstractDecoratorManager#goodCandidate()<br>
+ * All graphical differences are concerned.
+ */
+ @Override
+ protected Predicate<Diff> goodCandidate() {
+ return new Predicate<Diff>() {
+ public boolean apply(Diff difference) {
+ return instanceOf(DiagramDiff.class).apply(difference);
}
- }
- if (origin != null) {
- originParent = origin.getParent();
- if (originParent == null || relevantFigures.get(originParent) != null) {
- return false;
+ };
+ }
+
+ /**
+ * It creates a new marker from the given difference, view and figure.
+ *
+ * @param diff
+ * The related difference used as index for the main marker.
+ * @param referenceView
+ * The reference view as base for creation of the marker.
+ * @param referenceFigure
+ * The reference figure as base for creation of the marker.
+ * @param side
+ * The side where the marker has to be created.
+ * @return The phantom.
+ */
+ private Marker createMarker(Diff diff, View referenceView, IFigure referenceFigure,
+ MergeViewerSide side) {
+
+ Rectangle referenceBounds = referenceFigure.getBounds().getCopy();
+ IFigure referenceLayer = getLayer(referenceView, side);
+ translateCoordinates(referenceFigure, referenceLayer, referenceBounds);
+
+ IFigure markerFigure = null;
+
+ IFigure targetLayer = getLayer(referenceView, side);
+ Marker marker = new Marker(targetLayer, side, referenceView, referenceFigure, diff);
+
+ if (referenceView.eContainer() instanceof BasicCompartment) {
+
+ markerFigure = new RectangleFigure();
+ markerFigure.setBounds(referenceBounds);
+
+ } else if (referenceView instanceof Edge) {
+
+ if (referenceFigure instanceof PolylineConnection) {
+
+ markerFigure = new PolylineConnection();
+
+ markerFigure.setBounds(referenceBounds);
+
+ ((PolylineConnection)markerFigure).setPoints(((PolylineConnection)referenceFigure)
+ .getPoints().getCopy());
+
+ int oldWidth = ((Shape)referenceFigure).getLineWidth();
+ int newWidth = oldWidth + Marker.THICKNESS * 2;
+ ((PolylineConnection)markerFigure).setLineWidth(newWidth);
}
+
}
- createMatchFigure(originParent, leftParent, rightParent);
- return true;
+ // Default case: Nodes
+ if (markerFigure == null) {
+
+ markerFigure = new RectangleFigure();
+
+ referenceBounds.x -= Marker.THICKNESS;
+ referenceBounds.y -= Marker.THICKNESS;
+ referenceBounds.width += Marker.THICKNESS * 2;
+ referenceBounds.height += Marker.THICKNESS * 2;
+
+ markerFigure.setBounds(referenceBounds);
+ }
+
+ Color strokeColor = getCompareColor().getStrokeColor(diff, isThreeWay(), false, true);
+ markerFigure.setForegroundColor(strokeColor);
+ markerFigure.setBackgroundColor(strokeColor);
+ // markerFigure.setBorder(new FocusBorder());
+ ((Shape)markerFigure).setAlpha(Marker.ALPHA);
+
+ marker.setFigure(markerFigure);
+
+ return marker;
}
- private IFigure getFigure(MatchFigure matchFigure, MergeViewerSide side) {
- switch (side) {
- case LEFT:
- return matchFigure.left;
- case RIGHT:
- return matchFigure.right;
- case ANCESTOR:
- return matchFigure.origin;
- default:
- return null;
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.IDecoratorManager#hideAll()
+ */
+ public void hideAll() {
+ Iterator<Marker> visibleMarkers = Iterators.filter(Iterables.concat(fMarkerRegistry.values())
+ .iterator(), new Predicate<Marker>() {
+ public boolean apply(Marker marker) {
+ return marker.getFigure().getParent() != null;
+ }
+ });
+ while (visibleMarkers.hasNext()) {
+ Marker marker = (Marker)visibleMarkers.next();
+ handleDecorator(marker, false, true);
}
}
- final class ViewSide {
- public MergeViewerSide side;
+ }
- public View view;
+ /**
+ * Decorator manager to create, hide or reveal all decorator figures related to graphical changes.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+ private class DecoratorsManager implements IDecoratorManager {
+ /** Phantoms manager. */
+ private IDecoratorManager fPhantomManager = new PhantomManager();
- public ViewSide(MergeViewerSide side, View view) {
- this.side = side;
- this.view = view;
- }
+ /** Markers manager. */
+ private IDecoratorManager fMarkerManager = new MarkerManager();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.IDecoratorManager#hideDecorators(org.eclipse.emf.compare.Diff)
+ */
+ public void hideDecorators(Diff difference) {
+ fMarkerManager.hideDecorators(difference);
+ fPhantomManager.hideDecorators(difference);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.IDecoratorManager#revealDecorators(org.eclipse.emf.compare.Diff)
+ */
+ public void revealDecorators(Diff difference) {
+ fMarkerManager.revealDecorators(difference);
+ fPhantomManager.revealDecorators(difference);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram.DiagramContentMergeViewer.IDecoratorManager#hideAll()
+ */
+ public void hideAll() {
+ fMarkerManager.hideAll();
+ fPhantomManager.hideAll();
}
- final class MatchFigure {
+ }
+
+ /**
+ * Bundle name of the property file containing all displayed strings.
+ */
+ private static final String BUNDLE_NAME = DiagramContentMergeViewer.class.getName();
+
+ /** The editing domain. */
+ private ICompareEditingDomain fEditingDomain;
- public IFigure origin;
+ /** Listener to manage the update of the decorators on events about the command stack. */
+ private CommandStackListener fDecoratorsCommandStackListener;
- public IFigure left;
+ /** The phantom manager to use in the context of this viewer. */
+ private final DecoratorsManager fDecoratorsManager = new DecoratorsManager();
- public IFigure right;
+ /** The current "opened" difference. */
+ private Diff fCurrentSelectedDiff;
+
+ /**
+ * The adapter factory used to create the content and label provider for ancestor, left and right
+ * {@link DiagramMergeViewer}.
+ */
+ private final ComposedAdapterFactory fAdapterFactory;
+
+ /**
+ * Creates a new {@link DiagramContentMergeViewer} by calling the super constructor with the given
+ * parameters.
+ * <p>
+ * It calls {@link #buildControl(Composite)} as stated in its javadoc.
+ * <p>
+ * {@link #setContentProvider(org.eclipse.jface.viewers.IContentProvider) content provider} to properly
+ * display ancestor, left and right parts.
+ *
+ * @param parent
+ * the parent composite to build the UI in
+ * @param config
+ * the {@link CompareConfiguration}
+ */
+ public DiagramContentMergeViewer(Composite parent, CompareConfiguration config) {
+ super(SWT.NONE, ResourceBundle.getBundle(BUNDLE_NAME), config);
+
+ fAdapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ fAdapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ fAdapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+
+ buildControl(parent);
+ setContentProvider(new TreeContentMergeViewerContentProvider(config, getComparison()));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
+ */
+ @Override
+ protected void handleDispose(DisposeEvent event) {
+ fEditingDomain.getCommandStack().removeCommandStackListener(fDecoratorsCommandStackListener);
+ fAdapterFactory.dispose();
+ super.handleDispose(event);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#getAncestorMergeViewer()
+ */
+ @SuppressWarnings("unchecked")
+ // see createMergeViewer() to see it is safe
+ @Override
+ public DiagramMergeViewer getAncestorMergeViewer() {
+ return (DiagramMergeViewer)super.getAncestorMergeViewer();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#getLeftMergeViewer()
+ */
+ @SuppressWarnings("unchecked")
+ // see createMergeViewer() to see it is safe
+ @Override
+ public DiagramMergeViewer getLeftMergeViewer() {
+ return (DiagramMergeViewer)super.getLeftMergeViewer();
+ }
- public Match match;
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#getRightMergeViewer()
+ */
+ @SuppressWarnings("unchecked")
+ // see createMergeViewer() to see it is safe
+ @Override
+ public DiagramMergeViewer getRightMergeViewer() {
+ return (DiagramMergeViewer)super.getRightMergeViewer();
+ }
- public IFigure ghost;
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#copyDiff(boolean)
+ */
+ @Override
+ protected void copyDiff(boolean leftToRight) {
+ /*
+ * FIXME change this! For the moment we always do a new setInput() on the content viewer whenever we
+ * select a Diagram Difference. This is meant to change so that we use selection synchronization
+ * instead. This code will break whenever we implement that change.
+ */
+ if (fCurrentSelectedDiff != null) {
+ final Command command = getEditingDomain().createCopyCommand(fCurrentSelectedDiff, leftToRight,
+ EMFCompareIDEPlugin.getDefault().getMergerRegistry());
+ getEditingDomain().getCommandStack().execute(command);
- public MatchFigure(IFigure origin, IFigure left, IFigure right) {
- this.origin = origin;
- this.left = left;
- this.right = right;
+ if (leftToRight) {
+ setRightDirty(true);
+ } else {
+ setLeftDirty(true);
}
+ // refresh();
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#getContents(boolean)
+ */
+ @Override
+ protected byte[] getContents(boolean left) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.DiagramCompareContentMergeViewer#createMergeViewer(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide)
+ */
+ @Override
+ protected IMergeViewer createMergeViewer(Composite parent, MergeViewerSide side) {
+ final DiagramMergeViewer diagramMergeViewer = new DiagramMergeViewer(parent, side);
+ return diagramMergeViewer;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.DiagramCompareContentMergeViewer#paintCenter(org.eclipse.swt.graphics.GC)
+ */
+ @Override
+ protected void paintCenter(GC g) {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.DiagramCompareContentMergeViewer#updateContent(java.lang.Object,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ protected void updateContent(Object ancestor, Object left, Object right) {
+ initStackListenerAndUpdateContent(ancestor, left, right);
+
+ getLeftMergeViewer().getGraphicalViewer().flush();
+ getRightMergeViewer().getGraphicalViewer().flush();
+ getAncestorMergeViewer().getGraphicalViewer().flush();
- public MatchFigure(IFigure origin, IFigure left, IFigure right, Match match) {
- this.origin = origin;
- this.left = left;
- this.right = right;
- this.match = match;
+ if (left instanceof IDiagramDiffAccessor) {
+ IDiagramDiffAccessor input = (IDiagramDiffAccessor)left;
+
+ // initialization: reset the current difference selection hiding potential visible phantoms
+ if (fCurrentSelectedDiff != null && fCurrentSelectedDiff.getState() != DifferenceState.MERGED) {
+ fDecoratorsManager.hideDecorators(fCurrentSelectedDiff);
}
- public void setGhost(MergeViewerSide side, IFigure ghost) {
- this.ghost = ghost;
- switch (side) {
- case ANCESTOR:
- origin = ghost;
- break;
- case LEFT:
- left = ghost;
- break;
- case RIGHT:
- right = ghost;
- break;
- }
+ Diff diff = input.getDiff(); // equivalent to getInput().getTarget()
+ fCurrentSelectedDiff = diff;
+
+ if (diff.getState() != DifferenceState.MERGED) {
+ fDecoratorsManager.revealDecorators(diff);
}
- public MergeViewerSide getSide(IFigure figure) {
- if (figure == origin) {
- return MergeViewerSide.ANCESTOR;
- } else if (figure == left) {
- return MergeViewerSide.LEFT;
- } else if (figure == right) {
- return MergeViewerSide.RIGHT;
- }
- return null;
+ // FIXME use the decorator manager to refresh decorators after a merge and using undo/redo
+ // actions.
+ } else if (left instanceof IDiagramNodeAccessor) {
+ if (fCurrentSelectedDiff != null && fCurrentSelectedDiff.getState() != DifferenceState.MERGED) {
+ fDecoratorsManager.hideDecorators(fCurrentSelectedDiff);
}
+ fCurrentSelectedDiff = null;
+ }
- public IFigure getFigure(MergeViewerSide side) {
- switch (side) {
- case ANCESTOR:
- return origin;
- case LEFT:
- return left;
- case RIGHT:
- return right;
+ updateToolItems();
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#installCommandStackListener(org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.UndoAction,
+ * org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.RedoAction)
+ */
+ @Override
+ protected CommandStackListener installCommandStackListener(UndoAction undoAction, RedoAction redoAction) {
+ CommandStackListener cmdStackListener = super.installCommandStackListener(undoAction, redoAction);
+ fEditingDomain = getEditingDomain();
+ fDecoratorsCommandStackListener = new CommandStackListener() {
+
+ public void commandStackChanged(EventObject event) {
+ Object source = event.getSource();
+ if (source instanceof TransactionalCommandStack) {
+ Command command = ((TransactionalCommandStack)source).getMostRecentCommand();
+ if (command instanceof CopyCommand) {
+ Iterator<DiagramDiff> diffs = Iterators.filter(command.getAffectedObjects()
+ .iterator(), DiagramDiff.class);
+ while (diffs.hasNext()) {
+ DiagramDiff diagramDiff = diffs.next();
+ if (diagramDiff.getState() != DifferenceState.UNRESOLVED) {
+ fDecoratorsManager.hideDecorators(diagramDiff);
+ }
+ }
+ }
}
- return null;
}
+ };
+ fEditingDomain.getCommandStack().addCommandStackListener(fDecoratorsCommandStackListener);
+ return cmdStackListener;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ // No selection synchronization (content to structure merge viewer).
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#getDiffFrom(org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer)
+ */
+ @Override
+ protected Diff getDiffFrom(IMergeViewer viewer) {
+ return fCurrentSelectedDiff;
+ }
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer#createControls(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected void createControls(Composite composite) {
+ super.createControls(composite);
+ getAncestorMergeViewer().removeSelectionChangedListener(this);
+ getLeftMergeViewer().removeSelectionChangedListener(this);
+ getRightMergeViewer().removeSelectionChangedListener(this);
+ }
+
+ /**
+ * Utility method to retrieve the {@link DiagramMergeViewer} from the given side.
+ *
+ * @param side
+ * The side to focus.
+ * @return The viewer.
+ */
+ private DiagramMergeViewer getViewer(MergeViewerSide side) {
+ DiagramMergeViewer result = null;
+ switch (side) {
+ case LEFT:
+ result = getLeftMergeViewer();
+ break;
+ case RIGHT:
+ result = getRightMergeViewer();
+ break;
+ case ANCESTOR:
+ result = getAncestorMergeViewer();
+ break;
+ default:
}
+ return result;
+ }
+ /**
+ * Utility method to know the side where is located the given view.
+ *
+ * @param view
+ * The view.
+ * @return The side of the view.
+ */
+ private MergeViewerSide getSide(View view) {
+ MergeViewerSide result = null;
+ Match match = getComparison().getMatch(view);
+ if (match.getLeft() == view) {
+ result = MergeViewerSide.LEFT;
+ } else if (match.getRight() == view) {
+ result = MergeViewerSide.RIGHT;
+ } else if (match.getOrigin() == view) {
+ result = MergeViewerSide.ANCESTOR;
+ }
+ return result;
}
- // *** END alternative developing solution ***
+ /**
+ * Utility method to get the object matching with the given one, to the given side.
+ *
+ * @param object
+ * The object as base of the lookup.
+ * @param side
+ * The side where the potential matching object has to be retrieved.
+ * @return The matching object.
+ */
+ private EObject getMatchView(EObject object, MergeViewerSide side) {
+ Match match = getComparison().getMatch(object);
+ return getMatchView(match, side);
+ }
+
+ /**
+ * Utility method to get the object in the given side from the given match.
+ *
+ * @param match
+ * The match.
+ * @param side
+ * The side where the potential matching object has to be retrieved.
+ * @return The matching object.
+ */
+ private EObject getMatchView(Match match, MergeViewerSide side) {
+ EObject result = null;
+ switch (side) {
+ case LEFT:
+ result = match.getLeft();
+ break;
+ case RIGHT:
+ result = match.getRight();
+ break;
+ case ANCESTOR:
+ result = match.getOrigin();
+ break;
+ default:
+ }
+ return result;
+ }
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramMergeViewer.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramMergeViewer.java
index 2ca90cc4a..e65769499 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/contentmergeviewer/diagram/DiagramMergeViewer.java
@@ -10,155 +10,210 @@
*******************************************************************************/
package org.eclipse.emf.compare.diagram.ide.ui.internal.contentmergeviewer.diagram;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Viewport;
+import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.diagram.DiagramDiff;
-import org.eclipse.emf.compare.diagram.EdgeChange;
-import org.eclipse.emf.compare.diagram.Hide;
-import org.eclipse.emf.compare.diagram.LabelChange;
-import org.eclipse.emf.compare.diagram.NodeChange;
-import org.eclipse.emf.compare.diagram.Show;
-import org.eclipse.emf.compare.diagram.ide.ui.AbstractGraphicalMergeViewer;
-import org.eclipse.emf.compare.diagram.ide.ui.decoration.DiffDecorationEditPolicy;
-import org.eclipse.emf.compare.diagram.ide.ui.decoration.provider.DiffDecoratorProvider;
-import org.eclipse.emf.compare.diagram.ide.ui.decoration.provider.SelectedDiffAdapter;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.compare.diagram.ide.ui.internal.AbstractGraphicalMergeViewer;
+import org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramDiffAccessor;
import org.eclipse.emf.compare.diagram.ide.ui.internal.accessor.IDiagramNodeAccessor;
-import org.eclipse.emf.compare.diagram.util.DiagramCompareSwitch;
-import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
-import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditDomain;
import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.MouseWheelHandler;
import org.eclipse.gef.MouseWheelZoomHandler;
+import org.eclipse.gef.SelectionManager;
import org.eclipse.gef.editparts.ZoomManager;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gef.ui.parts.DomainEventDispatcher;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer;
import org.eclipse.gmf.runtime.diagram.ui.services.editpart.EditPartService;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
/**
+ * The graphical viewer on each side of the compare viewer.
+ *
* @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
class DiagramMergeViewer extends AbstractGraphicalMergeViewer {
- private IDiagramNodeAccessor fInput;
+ /**
+ * Selection manager to forbid manual selections on graphical objects.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+ protected class NonEditingManager extends SelectionManager {
+
+ @Override
+ public void appendSelection(EditPart editpart) {
+ // needed to disable manual selection on every objects.
+ }
+ }
+
+ /**
+ * Event dispatcher to forbid external mouse actions on diagrams.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ */
+ protected class NonEditingEventDispatcher extends DomainEventDispatcher {
+
+ /**
+ * Constructor.
+ *
+ * @param d
+ * The edit domain.
+ * @param v
+ * The edit part viewer.
+ */
+ public NonEditingEventDispatcher(EditDomain d, EditPartViewer v) {
+ super(d, v);
+ }
+
+ @Override
+ public void dispatchMousePressed(MouseEvent me) {
+ // needed not to get a change of the cursor releasing from a connector.
+ }
+
+ @Override
+ public void dispatchMouseReleased(MouseEvent me) {
+ // needed not to get a change of the cursor releasing from a connector.
+ }
- private DiagramGraphicalViewer fGraphicalViewer;
+ @Override
+ public void dispatchMouseDoubleClicked(MouseEvent me) {
+ // needed not to get a change of the cursor double-clicking on a connector.
+ }
+
+ @Override
+ public void dispatchMouseHover(MouseEvent me) {
+ // needed not to get a change of the cursor hovering a connector.
+ }
+
+ @Override
+ public void dispatchMouseMoved(MouseEvent me) {
+ // needed not to get a change of the cursor hovering a connector.
+ }
+
+ }
/** the zoom factor of displayed diagrams. */
private static final double ZOOM_FACTOR = 1;
+ /** The graphical viewer. */
+ private DiagramGraphicalViewerForCompare fGraphicalViewer;
+
/** the current diagram used. */
private Diagram currentDiag;
+ /** The diagram edit domain. */
+ private DiagramEditDomain editDomain;
+
/**
+ * Constructor.
+ *
* @param parent
+ * The parent composite.
+ * @param side
+ * The side having to be managed by this viewer.
*/
public DiagramMergeViewer(Composite parent, MergeViewerSide side) {
super(parent, side);
+ ((FigureCanvas)fGraphicalViewer.getControl()).getLightweightSystem().setEventDispatcher(
+ new NonEditingEventDispatcher(editDomain, fGraphicalViewer));
}
/**
* {@inheritDoc}
*
- * @see org.eclipse.emf.compare.rcp.ui.mergeviewer.MergeViewer#createControl(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.AbstractGraphicalMergeViewer#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public Control createControl(Composite parent) {
+ editDomain = new DiagramEditDomain(null);
+ editDomain.setCommandStack(new DiagramCommandStack(editDomain));
createDiagramGraphicalViewer(parent);
return fGraphicalViewer.getControl();
}
+ /**
+ * It creates and initialize the graphical viewer.
+ *
+ * @param composite
+ * The composite.
+ */
private void createDiagramGraphicalViewer(Composite composite) {
- fGraphicalViewer = new DiagramGraphicalViewer();
+ fGraphicalViewer = new DiagramGraphicalViewerForCompare();
fGraphicalViewer.createControl(composite);
fGraphicalViewer.setEditDomain(editDomain);
fGraphicalViewer.setEditPartFactory(EditPartService.getInstance());
fGraphicalViewer.getControl().setBackground(ColorConstants.listBackground);
fGraphicalViewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.CTRL),
MouseWheelZoomHandler.SINGLETON);
+
+ fGraphicalViewer.setSelectionManager(new NonEditingManager());
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.internal.AbstractGraphicalMergeViewer#getGraphicalViewer()
+ */
@Override
- public DiagramGraphicalViewer getGraphicalViewer() {
+ public DiagramGraphicalViewerForCompare getGraphicalViewer() {
return fGraphicalViewer;
}
- private void installDecoratorPolicy(EditPart editPart) {
- editPart.removeEditPolicy(EditPolicyRoles.DECORATION_ROLE);
- editPart.installEditPolicy(EditPolicyRoles.DECORATION_ROLE, new DiffDecorationEditPolicy());
- }
-
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diagram.ide.ui.AbstractEditPartMergeViewer#setInput(java.lang.Object)
+ */
@Override
public void setInput(final Object input) {
if (input instanceof IDiagramNodeAccessor) {
- fInput = (IDiagramNodeAccessor)input;
Diagram diagram = ((IDiagramNodeAccessor)input).getOwnedDiagram();
- View view = ((IDiagramNodeAccessor)input).getOwnedView();
-
initEditingDomain(diagram);
-
- if (diagram != null) {
- Iterator<EObject> contents = diagram.eAllContents();
- while (contents.hasNext()) {
- EObject obj = contents.next();
- if (obj instanceof View) {
- for (Diff diff : ((IDiagramNodeAccessor)input).getComparison().getDifferences(obj)) {
- if (diff instanceof DiagramDiff) {
- if (diff.getKind() != DifferenceKind.DELETE) {
- obj.eAdapters().add(new SelectedDiffAdapter((DiagramDiff)diff));
- EditPart editPart = getEditPart((View)obj);
- if (editPart != null) {
- installDecoratorPolicy(editPart);
- editPart.refresh();
- }
- }
- }
- }
- }
- }
+ EditPart editPart = null;
+ View view = ((IDiagramNodeAccessor)input).getOwnedView();
+ if (view != null) {
+ editPart = getEditPart(view);
}
-
- // Selection
fGraphicalViewer.deselectAll();
- if (view != null) {
-
- EditPart viewPart = getEditPart(view);
-
- if (viewPart != null) {
-
- while (!viewPart.isSelectable()) {
- viewPart = viewPart.getParent();
- }
-
- setSelection(new StructuredSelection(viewPart));
- getGraphicalViewer().reveal(viewPart);
-
+ // Selection only on matches.
+ if (!(input instanceof IDiagramDiffAccessor) && editPart != null) {
+ while (editPart != null && !editPart.isSelectable()) {
+ editPart = editPart.getParent();
}
+ if (editPart != null) {
+ setSelection(new StructuredSelection(editPart));
+ fGraphicalViewer.reveal(editPart);
+ }
}
+
}
}
+ /**
+ * It creates an editing domain for this diagram.
+ *
+ * @param diagram
+ * The diagram.
+ */
private void initEditingDomain(Diagram diagram) {
ResourceSet resourceSet = null;
if (diagram != null) {
@@ -170,23 +225,21 @@ class DiagramMergeViewer extends AbstractGraphicalMergeViewer {
}
}
- public Object getInput() {
- return fInput;
- }
-
- public EditPart findObjectAtExcluding(Point location, Collection exclusionSet, Conditional conditional) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public EditPart getEditPart(final View view) {
+ /**
+ * Get the editpart from the given view.
+ *
+ * @param view
+ * The view.
+ * @return The editpart.
+ */
+ public EditPart getEditPart(final EObject view) {
final EditPart editPart = (EditPart)fGraphicalViewer.getEditPartRegistry().get(view);
if (editPart == null) {
Diagram diagram = null;
if (view instanceof Diagram) {
diagram = (Diagram)view;
- } else {
- diagram = view.getDiagram();
+ } else if (view instanceof View) {
+ diagram = ((View)view).getDiagram();
}
if (diagram != null && !diagram.equals(currentDiag)) {
currentDiag = diagram;
@@ -194,206 +247,76 @@ class DiagramMergeViewer extends AbstractGraphicalMergeViewer {
final DiagramRootEditPart rootEditPart = new DiagramRootEditPart(diagram.getMeasurementUnit());
fGraphicalViewer.setRootEditPart(rootEditPart);
fGraphicalViewer.setContents(diagram);
- disableEditMode((DiagramEditPart)fGraphicalViewer.getContents());
rootEditPart.getZoomManager().setZoomAnimationStyle(ZoomManager.ANIMATE_NEVER);
rootEditPart.getZoomManager().setZoom(ZOOM_FACTOR);
+
}
}
return (EditPart)fGraphicalViewer.getEditPartRegistry().get(view);
}
- public EditPart findEditPart(final EObject eobj) {
- // check viewer
- if (eobj instanceof View) {
- final Diagram d = ((View)eobj).getDiagram();
- checkAndDisplayDiagram(d);
- }
- return (EditPart)fGraphicalViewer.getEditPartRegistry().get(eobj);
- }
-
- private void checkAndDisplayDiagram(final Diagram d) {
- if (d != null && !d.equals(currentDiag)) {
- currentDiag = d;
- displayDiagram(d);
- }
- }
-
- protected final void displayDiagram(final Diagram diag) {
- if (diag == null) {
- return;
- }
- currentDiag = diag;
- // be sure the viewer will be correctly refreshed ( connections )
- fGraphicalViewer.getEditPartRegistry().clear();
- final DiagramRootEditPart rootEditPart = new DiagramRootEditPart(diag.getMeasurementUnit());
- fGraphicalViewer.setRootEditPart(rootEditPart);
- fGraphicalViewer.setContents(diag);
- disableEditMode((DiagramEditPart)fGraphicalViewer.getContents());
- rootEditPart.getZoomManager().setZoomAnimationStyle(ZoomManager.ANIMATE_NEVER);
- rootEditPart.getZoomManager().setZoom(ZOOM_FACTOR);
- }
-
- private void disableEditMode(DiagramEditPart diagEditPart) {
- diagEditPart.disableEditMode();
- for (Object obj : diagEditPart.getPrimaryEditParts()) {
- if (obj instanceof IGraphicalEditPart) {
- disableEditMode((IGraphicalEditPart)obj);
- }
- }
- }
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.Viewer#refresh()
+ */
+ @Override
+ public void refresh() {
- private void disableEditMode(IGraphicalEditPart obj) {
- obj.disableEditMode();
- obj.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
- for (Object child : obj.getChildren()) {
- if (child instanceof IGraphicalEditPart) {
- disableEditMode((IGraphicalEditPart)child);
- }
- }
}
/**
- * Inner class for visit dagramDiffs.
+ * {@link DiagramGraphicalViewer} which enables to make a reveal on a given figure, without editpart.
*
- * @author <a href="mailto:stephane.bouchet@obeo.fr">Stephane Bouchet</a>
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
*/
- private class DiagramdiffSwitchVisitor extends DiagramCompareSwitch<IStatus> {
-
- private View view;
-
- private boolean annotate;
-
- public DiagramdiffSwitchVisitor(View view, boolean annotate) {
- this.view = view;
- this.annotate = annotate;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.diagramdiff.util.DiagramdiffSwitch#caseDiagramLabelChange(org.eclipse.emf.compare.diagram.diagramdiff.DiagramLabelChange)
- */
- @Override
- public IStatus caseLabelChange(LabelChange diff) {
- return checkResult(annotateNotation(view, DiffDecoratorProvider.DIFF_LABEL_MODIFIED));
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.diagramdiff.util.DiagramdiffSwitch#caseDiagramShowElement(org.eclipse.emf.compare.diagram.diagramdiff.DiagramShowElement)
- */
- @Override
- public IStatus caseShow(Show diff) {
- return checkResult(annotateNotation(view, DiffDecoratorProvider.DIFF_SHOWED));
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.diagramdiff.util.DiagramdiffSwitch#caseDiagramHideElement(org.eclipse.emf.compare.diagram.diagramdiff.DiagramHideElement)
- */
- @Override
- public IStatus caseHide(Hide diff) {
- return checkResult(annotateNotation(view, DiffDecoratorProvider.DIFF_SHOWED));
- }
+ public class DiagramGraphicalViewerForCompare extends DiagramGraphicalViewer {
/**
- * {@inheritDoc}
+ * It reveals the given figure. It is a partial copy of
+ * {@link DiagramGraphicalViewer#reveal(EditPart)}.<br>
+ * FIXME: Find a better solution to make the reveal.
*
- * @see org.eclipse.emf.compare.diagram.diagramdiff.util.DiagramdiffSwitch#caseDiagramMoveNode(org.eclipse.emf.compare.diagram.diagramdiff.DiagramMoveNode)
+ * @param figure
+ * The figure.
*/
- @Override
- public IStatus caseNodeChange(NodeChange diff) {
- boolean result = true;
- if (diff.getKind() == DifferenceKind.MOVE) {
- return checkResult(annotateNotation(view, DiffDecoratorProvider.DIFF_MOVED));
- } else if (diff.getKind() == DifferenceKind.ADD) {
- return checkResult(annotateNotation(view, DiffDecoratorProvider.DIFF_ADDED));
- } else if (diff.getKind() == DifferenceKind.DELETE) {
- return checkResult(annotateNotation(view, DiffDecoratorProvider.DIFF_REMOVED));
+ public void reveal(IFigure figure) {
+ IFigure target = figure;
+ Viewport port = getFigureCanvas().getViewport();
+ Rectangle exposeRegion = target.getBounds().getCopy();
+ target = target.getParent();
+ while (target != null && target != port) {
+ target.translateToParent(exposeRegion);
+ target = target.getParent();
}
- return checkResult(result);
- }
+ exposeRegion.expand(5, 5);
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.diagramdiff.util.DiagramdiffSwitch#caseDiagramEdgeChange(org.eclipse.emf.compare.diagram.diagramdiff.DiagramEdgeChange)
- */
- @Override
- public IStatus caseEdgeChange(EdgeChange diff) {
- return checkResult(annotateNotation(view, DiffDecoratorProvider.DIFF_MOVED));
- }
+ Dimension viewportSize = port.getClientArea().getSize();
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.diagram.diagramdiff.util.DiagramdiffSwitch#defaultCase(org.eclipse.emf.ecore.EObject)
- */
- @Override
- public IStatus defaultCase(EObject diff) {
- // we don't care about generic diffs
- return Status.OK_STATUS;
- }
-
- /**
- * Set the given annotation to the given notation element.
- *
- * @param element
- * the notation element to annotate
- * @param annotation
- * the diff annotation
- * @return true if annotation has been added to the view
- */
- protected boolean annotateNotation(View element, String annotation) {
- boolean result = false;
- if (annotate) {
- EAnnotation diffAnnotation = null;
- if (element.getEAnnotation(DiffDecoratorProvider.DIFF) == null) {
- diffAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- diffAnnotation.setSource(DiffDecoratorProvider.DIFF);
- result = element.getEAnnotations().add(diffAnnotation);
- } else {
- diffAnnotation = element.getEAnnotation(DiffDecoratorProvider.DIFF);
- }
- // FIXME should this string be externalized?
- diffAnnotation.getDetails().put(annotation, "diffDetail"); //$NON-NLS-1$
- result = true;
+ Point topLeft = exposeRegion.getTopLeft();
+ Point bottomRight = exposeRegion.getBottomRight().translate(viewportSize.getNegated());
+ Point finalLocation = new Point();
+ if (viewportSize.width < exposeRegion.width) {
+ finalLocation.x = Math.min(bottomRight.x, Math.max(topLeft.x, port.getViewLocation().x));
} else {
- if (element.getEAnnotation(DiffDecoratorProvider.DIFF) != null) {
- final EAnnotation diffAnnotation = element.getEAnnotation(DiffDecoratorProvider.DIFF);
- result = element.getEAnnotations().remove(diffAnnotation);
- }
+ finalLocation.x = Math.min(topLeft.x, Math.max(bottomRight.x, port.getViewLocation().x));
}
- return result;
- }
- /**
- * Utility method to transform a boolean result into status.
- *
- * @param ok
- * the boolean state
- * @return a status corresponding to the state of the boolean
- */
- protected IStatus checkResult(boolean ok) {
- if (ok) {
- return Status.OK_STATUS;
+ if (viewportSize.height < exposeRegion.height) {
+ finalLocation.y = Math.min(bottomRight.y, Math.max(topLeft.y, port.getViewLocation().y));
+ } else {
+ finalLocation.y = Math.min(topLeft.y, Math.max(bottomRight.y, port.getViewLocation().y));
}
- return Status.CANCEL_STATUS;
- }
- }
+ getFigureCanvas().scrollSmoothTo(finalLocation.x, finalLocation.y);
- private boolean hasSelectedDiffAdapter(View view) {
- Iterator<Adapter> adapters = view.eAdapters().iterator();
- while (adapters.hasNext()) {
- Adapter adapter = adapters.next();
- if (adapter.isAdapterForType(DiagramDiff.class)) {
- return true;
- }
}
- return false;
+
+ @Override
+ protected DomainEventDispatcher getEventDispatcher() {
+ return new NonEditingEventDispatcher(editDomain, this);
+ }
+
}
}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/diagram_ide_ui_messages.properties b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/diagram_ide_ui_messages.properties
index d04add314..34885779b 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/diagram_ide_ui_messages.properties
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/diagram_ide_ui_messages.properties
@@ -1,5 +1,5 @@
################################################################################
-# Copyright (c) 2012 Obeo.
+# Copyright (c) 2013 Obeo.
# 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
@@ -9,5 +9,3 @@
# Obeo - initial API and implementation
################################################################################
## ! note ! double the apostrophes if you need one in the printed String
-
-DiffDecoratorProvider.UnknownView = Unable to decorate target view : {0}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/preferences/DiagramComparePreferencesPage.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/preferences/DiagramComparePreferencesPage.java
index 8c48084be..c8daf09bd 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/preferences/DiagramComparePreferencesPage.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/internal/preferences/DiagramComparePreferencesPage.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.emf.compare.diagram.ide.ui.internal.preferences;
-import org.eclipse.emf.compare.diagram.diff.util.DiagramCompareConstants;
-import org.eclipse.emf.compare.diagram.diff.util.DiagramCompareUIMessages;
-import org.eclipse.emf.compare.diagram.ide.GMFCompareIDEPlugin;
+import org.eclipse.emf.compare.diagram.ide.ui.internal.CompareDiagramIDEUIPlugin;
+import org.eclipse.emf.compare.diagram.internal.CompareDiagramConstants;
+import org.eclipse.emf.compare.diagram.internal.CompareDiagramUIMessages;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IntegerFieldEditor;
import org.eclipse.swt.SWT;
@@ -34,8 +34,8 @@ public class DiagramComparePreferencesPage extends FieldEditorPreferencePage imp
*/
public DiagramComparePreferencesPage() {
super(GRID);
- setPreferenceStore(GMFCompareIDEPlugin.getDefault().getPreferenceStore());
- setDescription(DiagramCompareUIMessages.getString("DiagramComparePreferencesPage.description")); //$NON-NLS-1$
+ setPreferenceStore(CompareDiagramIDEUIPlugin.getDefault().getPreferenceStore());
+ setDescription(CompareDiagramUIMessages.getString("DiagramComparePreferencesPage.description")); //$NON-NLS-1$
}
/**
@@ -43,7 +43,7 @@ public class DiagramComparePreferencesPage extends FieldEditorPreferencePage imp
*/
public void createDiagramComparisonGroup() {
final Group diagramGroup = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);
- diagramGroup.setText(DiagramCompareUIMessages
+ diagramGroup.setText(CompareDiagramUIMessages
.getString("DiagramComparePreferencesPage.diagramComparisonGroupTitle")); //$NON-NLS-1$
diagramGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -53,8 +53,8 @@ public class DiagramComparePreferencesPage extends FieldEditorPreferencePage imp
diagramGroup.setLayout(diagramLayout);
diagramGroup.setFont(getFieldEditorParent().getFont());
- addField(new IntegerFieldEditor(DiagramCompareConstants.PREFERENCES_KEY_MOVE_THRESHOLD,
- DiagramCompareConstants.PREFERENCES_DESCRIPTION_MOVE_THRESHOLD, diagramGroup, 3) {
+ addField(new IntegerFieldEditor(CompareDiagramConstants.PREFERENCES_KEY_MOVE_THRESHOLD,
+ CompareDiagramConstants.PREFERENCES_DESCRIPTION_MOVE_THRESHOLD, diagramGroup, 3) {
@Override
protected void adjustForNumColumns(int numColumns) {
// do nothing
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/mergeviewer/EditingDomainUtils.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/mergeviewer/EditingDomainUtils.java
deleted file mode 100644
index 01111351a..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/mergeviewer/EditingDomainUtils.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.ui.mergeviewer;
-
-import java.util.List;
-
-import org.eclipse.emf.compare.rcp.ui.mergeviewer.accessor.IEObjectAccessor;
-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.ecore.util.FeatureMap;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.emf.edit.provider.IWrapperItemProvider;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.diagram.core.DiagramEditingDomainFactory;
-
-/**
- * Utility Class to retrieve an editing domain.
- *
- * @author Cedric Notot <a href="mailto:cedric.notot@obeo.fr">cedric.notot@obeo.fr</a>
- */
-public final class EditingDomainUtils {
-
- /**
- * Constructor.
- */
- private EditingDomainUtils() {
- // no-op
- }
-
- /**
- * Get or create an editing domain to handle the given object.
- *
- * @param object
- * The object.
- * @return The editing domain.
- */
- public static TransactionalEditingDomain getOrCreateEditingDomain(Object object) {
- EditingDomain editingDomain = getEditingDomainFor(object);
- if (editingDomain == null || !(editingDomain instanceof TransactionalEditingDomain)) {
- if (object instanceof EObject) {
- editingDomain = registerEditingDomain((EObject)object);
- } else if (object instanceof List<?>) {
- final List<?> list = (List<?>)object;
- for (Object object2 : list) {
- editingDomain = getOrCreateEditingDomain(object2);
- if (editingDomain != null) {
- break;
- }
- }
- } else if (object instanceof Resource) {
- editingDomain = registerEditingDomain((Resource)object);
- } else if (object instanceof ResourceSet) {
- editingDomain = registerEditingDomain((ResourceSet)object);
- } else {
- // XXX: fix this case
- }
- }
- return (TransactionalEditingDomain)editingDomain;
- }
-
- /**
- * Retrieve the editing domain for the given object.
- *
- * @param object
- * the object.
- * @return the editing domain.
- */
- private static EditingDomain getEditingDomainFor(Object object) {
- EditingDomain editingDomain = null;
- if (object instanceof IEditingDomainProvider) {
- editingDomain = ((IEditingDomainProvider)object).getEditingDomain();
- } else if (object instanceof EObject) {
- editingDomain = getEditingDomainFor((EObject)object);
- } else if (object instanceof FeatureMap.Entry) {
- editingDomain = getEditingDomainFor(((FeatureMap.Entry)object).getValue());
- } else if (object instanceof IWrapperItemProvider) {
- editingDomain = getEditingDomainFor(((IWrapperItemProvider)object).getValue());
- } else if (object instanceof IEObjectAccessor) {
- editingDomain = getEditingDomainFor(((IEObjectAccessor)object).getEObject());
- }
- return editingDomain;
-
- }
-
- /**
- * Retrieve the editing domain for the given {@link EObject}.
- *
- * @param object
- * The {@link EObject}
- * @return The editing domain.
- */
- private static EditingDomain getEditingDomainFor(EObject object) {
- final Resource resource = object.eResource();
- if (resource != null) {
- return getEditingDomainFor(resource);
- }
-
- return null;
- }
-
- /**
- * Retrieve the editing domain for the given {@link Resource}.
- *
- * @param resource
- * The {@link Resource}
- * @return The editing domain.
- */
- private static EditingDomain getEditingDomainFor(Resource resource) {
- EditingDomain editingDomain = null;
- final IEditingDomainProvider editingDomainProvider = (IEditingDomainProvider)EcoreUtil
- .getExistingAdapter(resource, IEditingDomainProvider.class);
- if (editingDomainProvider != null) {
- editingDomain = editingDomainProvider.getEditingDomain();
- } else {
- final ResourceSet resourceSet = resource.getResourceSet();
- editingDomain = getEditingDomainFor(resourceSet);
- }
- return editingDomain;
- }
-
- /**
- * Retrieve the editing domain for the given {@link ResourceSet}.
- *
- * @param resourceSet
- * The {@link ResourceSet}
- * @return The editing domain.
- */
- private static EditingDomain getEditingDomainFor(ResourceSet resourceSet) {
- EditingDomain editingDomain = null;
- if (resourceSet instanceof IEditingDomainProvider) {
- editingDomain = ((IEditingDomainProvider)resourceSet).getEditingDomain();
- } else if (resourceSet != null) {
- final IEditingDomainProvider editingDomainProvider = (IEditingDomainProvider)EcoreUtil
- .getExistingAdapter(resourceSet, IEditingDomainProvider.class);
- if (editingDomainProvider != null) {
- editingDomain = editingDomainProvider.getEditingDomain();
- }
- }
- return editingDomain;
- }
-
- /**
- * Register the editing domain from the given {@link EObject}.
- *
- * @param eObject
- * The {@link EObject}
- * @return The editing domain.
- */
- private static TransactionalEditingDomain registerEditingDomain(EObject eObject) {
- TransactionalEditingDomain editingDomain = null;
- final Resource eResource = eObject.eResource();
- if (eResource != null) {
- editingDomain = registerEditingDomain(eResource);
- } else {
- // XXX: fix this case
- }
- return editingDomain;
- }
-
- /**
- * Register the editing domain from the given {@link Resource}.
- *
- * @param eResource
- * The {@link Resource}
- * @return The editing domain.
- */
- private static TransactionalEditingDomain registerEditingDomain(Resource eResource) {
- TransactionalEditingDomain editingDomain = null;
- final ResourceSet resourceSet = eResource.getResourceSet();
- if (resourceSet != null) {
- editingDomain = registerEditingDomain(resourceSet);
- } else {
- // XXX: fix this case
- }
- return editingDomain;
- }
-
- /**
- * Register the editing domain from the given {@link ResourceSet}.
- *
- * @param resourceSet
- * The {@link ResourceSet}
- * @return The editing domain.
- */
- private static TransactionalEditingDomain registerEditingDomain(ResourceSet resourceSet) {
- return DiagramEditingDomainFactory.getInstance().createEditingDomain(resourceSet);
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/structuremergeviewer/filters/GMFRefinedElementsFilter.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/structuremergeviewer/filters/GMFRefinedElementsFilter.java
new file mode 100644
index 000000000..8f56df68a
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui/src/org/eclipse/emf/compare/diagram/ide/ui/structuremergeviewer/filters/GMFRefinedElementsFilter.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.diagram.ide.ui.structuremergeviewer.filters;
+
+import static com.google.common.base.Predicates.instanceOf;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.diagram.internal.extensions.DiagramDiff;
+import org.eclipse.emf.compare.rcp.ui.structuremergeviewer.filters.AbstractDifferenceFilter;
+import org.eclipse.emf.compare.scope.IComparisonScope;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * A filter used by default that filtered out refined GMF differences.
+ *
+ * @author <a href="mailto:axel.richard@obeo.fr">Axel Richard</a>
+ * @since 3.0
+ */
+public class GMFRefinedElementsFilter extends AbstractDifferenceFilter {
+
+ /**
+ * The predicate use by this filter when it is selected.
+ */
+ private static final Predicate<? super EObject> predicateWhenSelected = new Predicate<EObject>() {
+ public boolean apply(EObject input) {
+ if (input instanceof Diff) {
+ Diff diff = (Diff)input;
+ return Iterables.any(diff.getRefines(), instanceOf(DiagramDiff.class));
+ }
+ return false;
+ }
+ };
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.rcp.ui.structuremergeviewer.filters.IDifferenceFilter#isEnabled(org.eclipse.emf.compare.scope.IComparisonScope,
+ * org.eclipse.emf.compare.Comparison)
+ */
+ @Override
+ public boolean isEnabled(IComparisonScope scope, Comparison comparison) {
+ if (scope != null) {
+ for (String nsURI : scope.getNsURIs()) {
+ if (nsURI.startsWith("http://www\\.eclipse\\.org/gmf/")) { //$NON-NLS-1$
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.rcp.ui.structuremergeviewer.filters.IDifferenceFilter#getPredicateWhenSelected()
+ */
+ @Override
+ public Predicate<? super EObject> getPredicateWhenSelected() {
+ return predicateWhenSelected;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/.classpath b/plugins/org.eclipse.emf.compare.diagram.ide/.classpath
deleted file mode 100644
index 2d1a4302f..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.compare.diagram.ide/.project b/plugins/org.eclipse.emf.compare.diagram.ide/.project
deleted file mode 100644
index bd7c02531..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.compare.diagram.ide</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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.compare.diagram.ide/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 44217f8c0..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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.compare.diagram.ide/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.compare.diagram.ide/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644
index c2991f347..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/.settings/org.eclipse.pde.api.tools.prefs
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Warning
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Warning
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Warning
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Warning
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Warning
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Warning
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Warning
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Warning
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Warning
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Warning
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Warning
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Warning
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Warning
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Warning
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Warning
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Warning
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Warning
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Warning
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Warning
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-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=Warning
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Warning
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Warning
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Warning
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Warning
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Warning
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Warning
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Warning
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Warning
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Warning
-MISSING_EE_DESCRIPTIONS=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Warning
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Warning
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Warning
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Warning
-malformed_since_tag=Warning
-missing_since_tag=Warning
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram.ide/META-INF/MANIFEST.MF
deleted file mode 100644
index 2e4e56042..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.emf.compare.diagram.ide;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-Activator: org.eclipse.emf.compare.diagram.ide.GMFCompareIDEPlugin
-Require-Bundle: org.eclipse.emf.compare;bundle-version="2.0.0",
- org.eclipse.emf.compare.diagram;bundle-version="2.0.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.3.0",
- org.eclipse.emf.compare.ide;bundle-version="3.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Import-Package: com.google.common.base;version="10.0.1"
-Export-Package: org.eclipse.emf.compare.diagram.ide,
- org.eclipse.emf.compare.diagram.ide.diff
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/about.html b/plugins/org.eclipse.emf.compare.diagram.ide/about.html
deleted file mode 100644
index 670d10856..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/about.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!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>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation 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 provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/build.properties b/plugins/org.eclipse.emf.compare.diagram.ide/build.properties
deleted file mode 100644
index 31298fbcf..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- schema/,\
- src/,\
- about.html
-src.includes = about.html,\
- schema/
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/plugin.xml b/plugins/org.eclipse.emf.compare.diagram.ide/plugin.xml
deleted file mode 100644
index 3deebc005..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/plugin.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="org.eclipse.emf.compare.diagram.ide.viewLabelProvider" name="View Label Provider" schema="schema/viewLabelProvider.exsd"/>
- <extension
- point="org.eclipse.emf.compare.postProcessor">
- <postProcessor
- class="org.eclipse.emf.compare.diagram.ide.diff.DiagramDiffIDEExtensionPostProcessor">
- <nsURI
- value="http://www.eclipse.org/gmf/runtime/\d.\d.\d/notation">
- </nsURI>
- </postProcessor>
- </extension>
-</plugin>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/pom.xml b/plugins/org.eclipse.emf.compare.diagram.ide/pom.xml
deleted file mode 100644
index b7119f841..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/pom.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>emf.compare-parent</artifactId>
- <groupId>org.eclipse.emf.compare</groupId>
- <version>2.1.0-SNAPSHOT</version>
- <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
- </parent>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>org.eclipse.emf.compare.diagram.ide</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/schema/viewLabelProvider.exsd b/plugins/org.eclipse.emf.compare.diagram.ide/schema/viewLabelProvider.exsd
deleted file mode 100644
index d1db61a66..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/schema/viewLabelProvider.exsd
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.emf.compare.diagram.ide" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.emf.compare.diagram.ide" id="viewLabelProvider" name="View Label Provider"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="viewLabelProvider" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="viewLabelProvider">
- <complexType>
- <attribute name="diagramType" type="string" use="required">
- <annotation>
- <documentation>
- The supported diagram type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The fully qualified Java class name of an view label type provider.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.emf.compare.diagram.provider.IViewLabelProvider"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/GMFCompareIDEPlugin.java b/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/GMFCompareIDEPlugin.java
deleted file mode 100644
index 9dbbea0f0..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/GMFCompareIDEPlugin.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.emf.compare.diagram.ide;
-
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.compare.diagram.diff.DiagramComparisonConfiguration;
-import org.eclipse.emf.compare.diagram.diff.DiagramDiffExtensionPostProcessor;
-import org.eclipse.emf.compare.diagram.diff.util.DiagramCompareConstants;
-import org.eclipse.emf.compare.diagram.provider.ViewLabelProviderExtensionRegistry;
-import org.eclipse.emf.compare.diagram.provider.internal.ViewLabelProviderRegistryListener;
-import org.eclipse.emf.compare.extension.PostProcessorDescriptor;
-import org.eclipse.emf.compare.extension.PostProcessorRegistry;
-import org.eclipse.emf.compare.ide.EMFCompareIDEPlugin;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-public class GMFCompareIDEPlugin extends AbstractUIPlugin {
-
- /** The plug-in ID. */
- public static final String PLUGIN_ID = "org.eclipse.emf.compare.diagram.ide"; //$NON-NLS-1$
-
- /** This plugin's shared instance. */
- private static GMFCompareIDEPlugin plugin;
-
- /** The registry listener that will be used to listen to extension changes. */
- private ViewLabelProviderRegistryListener registryListener = new ViewLabelProviderRegistryListener();
-
- private DiagramComparisonConfiguration configuration;
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- plugin = this;
- super.start(context);
- final IExtensionRegistry registry = Platform.getExtensionRegistry();
- registry.addListener(registryListener, ViewLabelProviderRegistryListener.VIEW_LABELPROVIDER_EXTENSION_POINT);
- registryListener.parseInitialContributions();
-
- configuration = new DiagramComparisonConfiguration();
- getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- // XXX: does it work ?
-
- if (DiagramCompareConstants.PREFERENCES_KEY_MOVE_THRESHOLD.equals(event.getProperty())) {
- Object newValue = event.getNewValue();
- if (newValue != null) {
- configuration.setMoveThreshold((Integer)newValue);
- } else {
- configuration.setMoveThreshold(0);
- }
- }
- }
- });
- configuration.setMoveThreshold(getPreferenceStore().getInt(DiagramCompareConstants.PREFERENCES_KEY_MOVE_THRESHOLD));
-
- PostProcessorRegistry postProcessorRegistry = EMFCompareIDEPlugin.getDefault().getPostProcessorRegistry();
- for (PostProcessorDescriptor descriptor : postProcessorRegistry.getRegisteredPostProcessors()) {
- if (descriptor.getExtensionClassName().equals(DiagramDiffExtensionPostProcessor.class.getName())) {
- DiagramDiffExtensionPostProcessor postProcessor = (DiagramDiffExtensionPostProcessor)descriptor.getPostProcessor();
- postProcessor.setConfiguration(configuration);
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- final IExtensionRegistry registry = Platform.getExtensionRegistry();
- registry.removeListener(registryListener);
- ViewLabelProviderExtensionRegistry.clearRegistry();
-
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static GMFCompareIDEPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/DiagramDiffIDEExtensionPostProcessor.java b/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/DiagramDiffIDEExtensionPostProcessor.java
deleted file mode 100644
index 95cb8805c..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/DiagramDiffIDEExtensionPostProcessor.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package org.eclipse.emf.compare.diagram.ide.diff;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.util.Monitor;
-import org.eclipse.emf.compare.CompareFactory;
-import org.eclipse.emf.compare.Comparison;
-import org.eclipse.emf.compare.Conflict;
-import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.DifferenceSource;
-import org.eclipse.emf.compare.Match;
-import org.eclipse.emf.compare.diagram.DiagramCompareFactory;
-import org.eclipse.emf.compare.diagram.LabelChange;
-import org.eclipse.emf.compare.diagram.diff.util.GMFLabelUtil;
-import org.eclipse.emf.compare.diagram.ide.GMFCompareIDEPlugin;
-import org.eclipse.emf.compare.diagram.ide.diff.internal.extension.IDiffExtensionFactory;
-import org.eclipse.emf.compare.diagram.provider.IViewLabelProvider;
-import org.eclipse.emf.compare.diagram.provider.ViewLabelProviderExtensionRegistry;
-import org.eclipse.emf.compare.extension.IPostProcessor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-
-public class DiagramDiffIDEExtensionPostProcessor implements IPostProcessor {
-
- private Set<IDiffExtensionFactory> diagramExtensionFactories;
-
- public DiagramDiffIDEExtensionPostProcessor() {
- // TODO Auto-generated constructor stub
- }
-
- public void postMatch(Comparison comparison, Monitor monitor) {
- // TODO Auto-generated method stub
-
- }
-
- public void postDiff(Comparison comparison, Monitor monitor) {
- // TODO Auto-generated method stub
-
- }
-
- public void postRequirements(Comparison comparison, Monitor monitor) {
- // computeLabels
- computeLabels(comparison);
- }
-
- public void postEquivalences(Comparison comparison, Monitor monitor) {
- // TODO Auto-generated method stub
-
- }
-
- public void postConflicts(Comparison comparison, Monitor monitor) {
- // TODO Auto-generated method stub
-
- }
-
- private void computeLabels(Comparison comparison) {
- final Iterator<Match> matches = getAllMatches(comparison).iterator();
- while (matches.hasNext()) {
- final Match match = (Match)matches.next();
-
- final EObject leftElement = match.getLeft();
-
- if (leftElement instanceof View) {
- LabelChange diff = null;
- final EObject rightElement = match.getRight();
- final View view = (View)leftElement;
- final Diagram diagram = view.getDiagram();
-
- if (diagram != null) {
- final String diagramType = diagram.getType();
-
- IViewLabelProvider extensionForType = ViewLabelProviderExtensionRegistry.getExtensionForType(diagramType);
-
- if (extensionForType == null) { // no extension registered for handling label in this
- // diagram,
- // use the default one
- GMFCompareIDEPlugin.getDefault().getLog().log(
- new Status(IStatus.INFO, GMFCompareIDEPlugin.PLUGIN_ID,
- "No IViewLabelProvider registered for diagram " + diagramType)); //$NON-NLS-1$
- extensionForType = IViewLabelProvider.DEFAULT_INSTANCE;
- }
- if (rightElement instanceof View && extensionForType.isManaged(view) && isVisible(view)
- && isVisible((View)rightElement)) {
- final String leftLabel = extensionForType.elementLabel(view);
- final String rightLabel = extensionForType.elementLabel((View)rightElement);
- if (!leftLabel.equals(rightLabel)) {
- diff = DiagramCompareFactory.eINSTANCE.createLabelChange();
- diff.setKind(DifferenceKind.CHANGE);
- diff.setLeft(leftLabel);
- diff.setRight(rightLabel);
- diff.setView(leftElement);
- if (match.eContainer() instanceof Match) {
- ((Match) match.eContainer()).getDifferences().add(diff);
- } else {
- match.getDifferences().add(diff);
- }
- }
- }
- }
-
- if (comparison.isThreeWay() && diff != null) {
- final EObject ancestor = match.getOrigin();
- if (ancestor instanceof View) {
- final ITextAwareEditPart ancestorEp = GMFLabelUtil.getTextEditPart((View)ancestor);
- if (ancestorEp != null) {
- final String ancestorLabel = ancestorEp.getEditText();
- final String leftLabel = diff.getLeft();
- final String rightLabel = diff.getRight();
- if (ancestorLabel.equals(leftLabel)) {
- diff.setSource(DifferenceSource.RIGHT);
- diff.setView(rightElement);
- } else if (!ancestorLabel.equals(rightLabel)) {
- diff.setView(leftElement);
- final Conflict conflict = CompareFactory.eINSTANCE.createConflict();
- conflict.getDifferences().add(diff);
- comparison.getConflicts().add(conflict);
- }
- }
-
- }
- }
- }
- }
- GMFLabelUtil.cleanup();
- }
-
- /**
- * Checks if the view is visible.
- *
- * @param view
- * The tested view.
- * @return True if visible.
- */
- public static boolean isVisible(View view) {
- boolean result = view.isVisible();
- if (result) {
- final View container = getNextParent(view);
- if (container != null) {
- result = isVisible(container);
- }
- }
- return result;
- }
-
- /**
- * Get the closest parent view.
- *
- * @param obj
- * The current view.
- * @return The parent view.
- */
- private static View getNextParent(EObject obj) {
- View result = null;
- if (obj != null) {
- final EObject parent = obj.eContainer();
- if (parent instanceof View) {
- result = (View)parent;
- } else {
- result = getNextParent(parent);
- }
- }
- return result;
- }
-
- private List<Match> getAllMatches(Comparison comparison) {
- final List<Match> result = new ArrayList<Match>();
- final Iterator<Match> matches = comparison.getMatches().iterator();
- while (matches.hasNext()) {
- final Match match = (Match)matches.next();
- result.add(match);
- final Iterator<Match> subMatches = match.getAllSubmatches().iterator();
- while (subMatches.hasNext()) {
- Match match2 = (Match)subMatches.next();
- result.add(match2);
- }
- }
- return result;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/AbstractDiffExtensionFactory.java b/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/AbstractDiffExtensionFactory.java
deleted file mode 100644
index c539bdfa4..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/AbstractDiffExtensionFactory.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.diff.internal.extension;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.compare.AttributeChange;
-import org.eclipse.emf.compare.CompareFactory;
-import org.eclipse.emf.compare.Comparison;
-import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.Match;
-import org.eclipse.emf.compare.ReferenceChange;
-import org.eclipse.emf.compare.ResourceAttachmentChange;
-import org.eclipse.emf.compare.util.CompareSwitch;
-import org.eclipse.emf.ecore.EObject;
-
-import com.google.common.base.Predicate;
-
-/**
- * Factory for the difference extensions.
- */
-public abstract class AbstractDiffExtensionFactory implements IDiffExtensionFactory {
-
- private final Predicate<Diff> REFINING_PREDICATE = new Predicate<Diff>() {
- public boolean apply(Diff diff) {
- return isPartOfRefiningDifference(diff);
- }
- };
-
- private CompareSwitch<DifferenceKind> differenceKindCompareSwitch = new CompareSwitch<DifferenceKind>() {
-
- @Override
- public DifferenceKind caseAttributeChange(AttributeChange object) {
- if (isRelatedToAnExtensionAdd(object)) {
- return DifferenceKind.ADD;
- } else if (isRelatedToAnExtensionDelete(object)) {
- return DifferenceKind.DELETE;
- } else if (isRelatedToAnExtensionChange(object)) {
- return DifferenceKind.CHANGE;
- } else if (isRelatedToAnExtensionMove(object)) {
- return DifferenceKind.MOVE;
- } else {
- return super.caseAttributeChange(object);
- }
- }
-
- @Override
- public DifferenceKind caseReferenceChange(ReferenceChange object) {
- if (isRelatedToAnExtensionAdd(object)) {
- return DifferenceKind.ADD;
- } else if (isRelatedToAnExtensionDelete(object)) {
- return DifferenceKind.DELETE;
- } else if (isRelatedToAnExtensionChange(object)) {
- return DifferenceKind.CHANGE;
- } else if (isRelatedToAnExtensionMove(object)) {
- return DifferenceKind.MOVE;
- } else {
- return super.caseReferenceChange(object);
- }
- }
-
- @Override
- public DifferenceKind caseResourceAttachmentChange(ResourceAttachmentChange object) {
- if (isRelatedToAnExtensionAdd(object)) {
- return DifferenceKind.ADD;
- } else if (isRelatedToAnExtensionDelete(object)) {
- return DifferenceKind.DELETE;
- } else if (isRelatedToAnExtensionChange(object)) {
- return DifferenceKind.CHANGE;
- } else if (isRelatedToAnExtensionMove(object)) {
- return DifferenceKind.MOVE;
- } else {
- return super.caseResourceAttachmentChange(object);
- }
- }
- };
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.uml2.diff.internal.extension.IDiffExtensionFactory#handles(org.eclipse.emf.compare.diff.metamodel.DiffElement)
- */
- public boolean handles(Diff input) {
- return getRelatedExtensionKind(input) != null && !isExtensionAlreadyExist(input)
- && !isChangeOnAddOrDelete(input);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.uml2.diff.internal.extension.IDiffExtensionFactory#create(org.eclipse.emf.
- * compare.diff.metamodel.DiffElement)
- */
- public Diff create(Diff input) {
-
- final Diff ret = createExtension();
-
- final EObject discriminant = getDiscriminantFromDiff(input);
-
- final DifferenceKind extensionKind = getRelatedExtensionKind(input);
-
- if (discriminant != null) {
- if (extensionKind == DifferenceKind.DELETE) {
- ret.getRefinedBy().add(input);
- } else {
- fillRefiningDifferences(input.getMatch().getComparison(), ret, discriminant);
- }
- }
-
- // ret.setDiscriminant(discriminant);
- ret.setKind(extensionKind);
- if (extensionKind == DifferenceKind.ADD || extensionKind == DifferenceKind.DELETE) {
- if (input instanceof ReferenceChange) {
- // ret.setEReference(((ReferenceChange)input).getReference());
- }
- }
-
- ret.setSource(input.getSource());
-
- return ret;
- }
-
- protected void fillRefiningDifferences(final Comparison comparison, final Diff diffExtension,
- final EObject discriminant) {
- // Find Diffs through ComparePackage.Literals.REFERENCE_CHANGE__VALUE
- for (EObject elt : getPotentialChangedValuesFromDiscriminant(discriminant)) {
- beRefinedByCrossReferences(comparison, elt, diffExtension, REFINING_PREDICATE);
- }
- }
-
- public void fillRequiredDifferences(Comparison comparison, Diff extension) {
- if (getExtensionKind().isInstance(extension)) {
- // final EObject discriminant = extension.getDiscriminant();
- // if (discriminant != null) {
- // if (extension.getKind().equals(DifferenceKind.CHANGE)) {
- // extension.getRequires()
- // .addAll(findCrossReferences(comparison, discriminant,
- // REQUIRES_ADD_DISCRIMINANT_PREDICATE));
- // } else if (extension.getKind().equals(DifferenceKind.DELETE)) {
- // extension.getRequires().addAll(
- // findCrossReferences(comparison, discriminant,
- // REQUIRES_CHANGE_DISCRIMINANT_PREDICATE));
- // }
- // }
- }
- }
-
- public Match getParentMatch(Diff input) {
- return input.getMatch();
- }
-
- protected Diff createExtension() {
- return CompareFactory.eINSTANCE.createDiff();
- }
-
- protected boolean isPartOfRefiningDifference(Diff diff) {
- return diff instanceof ReferenceChange && getRelatedExtensionKind(diff) == DifferenceKind.CHANGE;
- }
-
- private boolean isExtensionAlreadyExist(Diff input) {
- return false;
- }
-
- private boolean isChangeOnAddOrDelete(Diff input) {
- if (getRelatedExtensionKind(input) == DifferenceKind.CHANGE) {
- final List<Diff> differences = input.getMatch().getComparison().getDifferences();
- differences.remove(input);
- for (Diff diff : differences) {
- if ((getRelatedExtensionKind(diff) == DifferenceKind.ADD || getRelatedExtensionKind(diff) == DifferenceKind.DELETE)
- && getDiscriminantFromDiff(diff) == getDiscriminantFromDiff(input)) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected EObject getDiscriminantFromDiff(Diff input) {
- return null;
- }
-
- protected List<EObject> getPotentialChangedValuesFromDiscriminant(EObject discriminant) {
- return Collections.EMPTY_LIST;
- }
-
- protected DifferenceKind getRelatedExtensionKind(Diff input) {
- return differenceKindCompareSwitch.doSwitch(input);
- }
-
- protected boolean isRelatedToAnExtensionAdd(ReferenceChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionDelete(ReferenceChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionChange(ReferenceChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionMove(ReferenceChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionAdd(AttributeChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionDelete(AttributeChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionChange(AttributeChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionMove(AttributeChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionAdd(ResourceAttachmentChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionDelete(ResourceAttachmentChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionChange(ResourceAttachmentChange input) {
- return false;
- }
-
- protected boolean isRelatedToAnExtensionMove(ResourceAttachmentChange input) {
- return false;
- }
-
- /**
- * Find the cross references of the given model object, through the specified feature, with a cross
- * referencer and a predicate.
- *
- * @param comparison
- * The comparison.
- * @param lookup
- * The model object.
- * @param inFeature
- * The feature.
- * @param p
- * The predicate.
- * @param crossReferencer
- * The cross referencer.
- * @return The cross references.
- */
- protected final List<Diff> findCrossReferences(Comparison comparison, EObject lookup, Predicate<Diff> p) {
- final List<Diff> result = new ArrayList<Diff>();
- for (Diff diff : comparison.getDifferences(lookup)) {
- if (p.apply(diff)) {
- result.add(diff);
- }
- }
- return result;
- }
-
- /**
- * Hide the difference elements from the given extension, from the specified model object, the feature and
- * cross referencer, with a predicate.
- *
- * @param lookup
- * The model object.
- * @param inFeature
- * The feature.
- * @param hiddingExtension
- * The extension
- * @param p
- * The predicate
- * @param crossReferencer
- * The cross referencer.
- */
- protected final void beRefinedByCrossReferences(Comparison comparison, EObject lookup,
- Diff refinedExtension, Predicate<Diff> p) {
- for (Diff diffElement : findCrossReferences(comparison, lookup, p)) {
- refinedExtension.getRefinedBy().add(diffElement);
- }
- }
-
- public Class<? extends Diff> getExtensionKind() {
- return Diff.class;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/DiffExtensionFactoryRegistry.java b/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/DiffExtensionFactoryRegistry.java
deleted file mode 100644
index cb1aeb52c..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/DiffExtensionFactoryRegistry.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.diff.internal.extension;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.compare.Diff;
-
-/**
- * Registry of all {@link IDiffExtensionFactory}.
- */
-public final class DiffExtensionFactoryRegistry {
-
- /**
- * Constructor.
- */
- private DiffExtensionFactoryRegistry() {
- // TODO Auto-generated constructor stub
- }
-
- /**
- * Creates and returns all {@link IDiffExtensionFactory} available in this plugin. The returned Set in
- * unmodifiable.
- *
- * @param engine
- * The UML2 difference engine.
- * @return an unmodifiable set of all {@link IDiffExtensionFactory}.
- */
- public static Map<Class<? extends Diff>, IDiffExtensionFactory> createExtensionFactories() {
- final Map<Class<? extends Diff>, IDiffExtensionFactory> dataset = new HashMap<Class<? extends Diff>, IDiffExtensionFactory>();
-
- List<IDiffExtensionFactory> factories = new ArrayList<IDiffExtensionFactory>();
-
- for (IDiffExtensionFactory iDiffExtensionFactory : factories) {
- dataset.put(iDiffExtensionFactory.getExtensionKind(), iDiffExtensionFactory);
- }
-
- return Collections.unmodifiableMap(dataset);
- }
-
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/IDiffExtensionFactory.java b/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/IDiffExtensionFactory.java
deleted file mode 100644
index 5a824ad7b..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/ide/diff/internal/extension/IDiffExtensionFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.ide.diff.internal.extension;
-
-import org.eclipse.emf.compare.Comparison;
-import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.Match;
-
-/**
- * An {@link IDiffExtensionFactory} is a factory capable to create an {@link AbstractDiffExtension} from a
- * {@link DiffElement} if and only if this factory can {@link #handles(DiffElement) handle} the given
- * {@link DiffElement}.
- * <p>
- * A factory must be able to say in which parent a {@link AbstractDiffExtension} must be attached if it
- * handles the {@link DiffElement} from which it has been {@link #create(DiffElement) created}.
- */
-public interface IDiffExtensionFactory {
-
- Class<? extends Diff> getExtensionKind();
-
- /**
- * Returns true if this factory handles the given kind of DiffElement, i.e., if it can create an
- * {@link AbstractDiffExtension}.
- * <p>
- * <b>Performance note: </b> this method should return as quickly as possible as it will called on every
- * {@link DiffElement} of the DiffModel.
- *
- * @param input
- * the element to test
- * @return true if this factory handles the given input, false otherwise.
- */
- boolean handles(Diff input);
-
- /**
- * Creates and returns an {@link AbstractDiffExtension} from the given {@link DiffElement}. The returned
- * element MUST NOT be added to its parent, it will be done by the UML2DiffEngine.
- *
- * @param input
- * The input difference element.
- * @return The difference extension.
- */
- Diff create(Diff input);
-
- /**
- * Returns the {@link DiffElement} in which the {@link #create(DiffElement) created}
- * {@link AbstractDiffExtension} will be added as a sub diff element. This {@link DiffElement} can be from
- * the model or newly created.
- *
- * @param input
- * The input difference element.
- * @return The difference extension.
- */
- Match getParentMatch(Diff input);
-
- /**
- * Sets the required link of the difference extension created by the related factory.
- *
- * @param diff
- * The difference extension.
- * @param comaprison
- * The comparison.
- */
- void fillRequiredDifferences(Comparison comparison, Diff extension);
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/provider/internal/ViewLabelProviderIDEExtensionDescriptor.java b/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/provider/internal/ViewLabelProviderIDEExtensionDescriptor.java
deleted file mode 100644
index 3b6fdf042..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/provider/internal/ViewLabelProviderIDEExtensionDescriptor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.provider.internal;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.compare.diagram.ide.GMFCompareIDEPlugin;
-import org.eclipse.emf.compare.diagram.provider.IViewLabelProvider;
-import org.eclipse.emf.compare.diagram.provider.ViewLabelProviderExtensionDescriptor;
-
-/**
- * Describes a extension as contributed to the "" extension point.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public class ViewLabelProviderIDEExtensionDescriptor extends ViewLabelProviderExtensionDescriptor{
- /** Names of the extension point's attributes. */
- public static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
-
- /** Name of the type of diagram. */
- public static final String ATTRIBUTE_DIAGRAM_TYPE = "diagramType"; //$NON-NLS-1$
-
- /** Configuration element of this descriptor. */
- private final IConfigurationElement element;
-
- /**
- * Instantiates a descriptor with all information.
- *
- * @param configuration
- * Configuration element from which to create this descriptor.
- */
- public ViewLabelProviderIDEExtensionDescriptor(IConfigurationElement configuration) {
- super();
- this.element = configuration;
- className = element.getAttribute(ATTRIBUTE_CLASS);
- diagramType = element.getAttribute(ATTRIBUTE_DIAGRAM_TYPE);
- }
-
- /**
- * Returns this descriptor's "extension" class name.
- *
- * @return This descriptor's "extension" class name.
- */
- public String getExtensionClassName() {
- return className;
- }
-
- public String getDiagramType() {
- return diagramType;
- }
-
- /**
- * Creates an instance of this descriptor's {@link IViewLabelProvider}.
- *
- * @return A new instance of this descriptor's {@link IViewLabelProvider}.
- */
- public IViewLabelProvider getViewLabelTypeProviderExtension() {
- if (extension == null) {
- try {
- extension = (IViewLabelProvider)element.createExecutableExtension(ATTRIBUTE_CLASS);
- } catch (CoreException e) {
- GMFCompareIDEPlugin.getDefault().getLog()
- .log(new Status(IStatus.ERROR, GMFCompareIDEPlugin.PLUGIN_ID, e.getMessage(), e));
- }
- }
- return extension;
- }
-
- @Override
- public IViewLabelProvider getExtension() {
- return getViewLabelTypeProviderExtension();
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/provider/internal/ViewLabelProviderRegistryListener.java b/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/provider/internal/ViewLabelProviderRegistryListener.java
deleted file mode 100644
index d8f4c977f..000000000
--- a/plugins/org.eclipse.emf.compare.diagram.ide/src/org/eclipse/emf/compare/diagram/provider/internal/ViewLabelProviderRegistryListener.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.compare.diagram.provider.internal;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IRegistryEventListener;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.compare.diagram.provider.ViewLabelProviderExtensionRegistry;
-
-/**
- * This listener will allow us to be aware of contribution changes against the extension point.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public class ViewLabelProviderRegistryListener implements IRegistryEventListener {
-
- /** Name of the extension point's tag. */
- public static final String VIEW_LABELPROVIDER_EXTENSION_POINT = "org.eclipse.emf.compare.diagram.ide.viewLabelProvider"; //$NON-NLS-1$
-
- /** Name of the extension tag point's tag. */
- private static final String VIEW_LABELPROVIDER_TAG = "viewLabelProvider"; //$NON-NLS-1$
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.IRegistryEventListener#added(org.eclipse.core.runtime.IExtension[])
- */
- public void added(IExtension[] extensions) {
- for (IExtension extension : extensions) {
- parseExtension(extension);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.IRegistryEventListener#added(org.eclipse.core.runtime.IExtensionPoint[])
- */
- public void added(IExtensionPoint[] extensionPoints) {
- // no need to listen to this event
- }
-
- /**
- * Though this listener reacts to the extension point changes, there could have been contributions before
- * it's been registered. This will parse these initial contributions.
- */
- public void parseInitialContributions() {
- final IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- final IExtensionPoint extensionPoint = registry.getExtensionPoint(VIEW_LABELPROVIDER_EXTENSION_POINT);
- if (extensionPoint != null) {
- for (IExtension extension :extensionPoint.getExtensions()) {
- parseExtension(extension);
- }
- }
-
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.IRegistryEventListener#removed(org.eclipse.core.runtime.IExtension[])
- */
- public void removed(IExtension[] extensions) {
- for (IExtension extension : extensions) {
- final IConfigurationElement[] configElements = extension.getConfigurationElements();
- for (IConfigurationElement elem : configElements) {
- if (VIEW_LABELPROVIDER_TAG.equals(elem.getName())) {
- final String extensionClassName = elem
- .getAttribute(ViewLabelProviderIDEExtensionDescriptor.ATTRIBUTE_CLASS);
- ViewLabelProviderExtensionRegistry.removeExtension(extensionClassName);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.IRegistryEventListener#removed(org.eclipse.core.runtime.IExtensionPoint[])
- */
- public void removed(IExtensionPoint[] extensionPoints) {
- // no need to listen to this event
- }
-
- /**
- * Parses a single extension contribution.
- *
- * @param extension
- * Parses the given extension and adds its contribution to the registry.
- */
- private static void parseExtension(IExtension extension) {
- final IConfigurationElement[] configElements = extension.getConfigurationElements();
- for (IConfigurationElement elem : configElements) {
- if (VIEW_LABELPROVIDER_TAG.equals(elem.getName())) {
- ViewLabelProviderExtensionRegistry.addViewLabelProvider(new ViewLabelProviderIDEExtensionDescriptor(elem));
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.compare.diagram/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.diagram/META-INF/MANIFEST.MF
index 224332ea4..c11d679da 100644
--- a/plugins/org.eclipse.emf.compare.diagram/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.compare.diagram/META-INF/MANIFEST.MF
@@ -7,12 +7,6 @@ Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.emf.compare.diagram,
- org.eclipse.emf.compare.diagram.diff,
- org.eclipse.emf.compare.diagram.diff.util,
- org.eclipse.emf.compare.diagram.merge,
- org.eclipse.emf.compare.diagram.provider,
- org.eclipse.emf.compare.diagram.util
Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.gmf.runtime.notation,
org.eclipse.gmf.runtime.diagram.ui,
@@ -21,4 +15,11 @@ Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport,
Import-Package: com.google.common.base;version="10.0.1",
com.google.common.collect;version="10.0.1"
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.emf.compare.diagram.DiagramDiffEnginePlugin
+Bundle-Activator: org.eclipse.emf.compare.diagram.internal.CompareDiagramPlugin
+Export-Package: org.eclipse.emf.compare.diagram.internal;x-internal:=true,
+ org.eclipse.emf.compare.diagram.internal.extensions;x-internal:=true,
+ org.eclipse.emf.compare.diagram.internal.extensions.impl;x-internal:=true,
+ org.eclipse.emf.compare.diagram.internal.extensions.util;x-internal:=true,
+ org.eclipse.emf.compare.diagram.internal.factories;x-internal:=true,
+ org.eclipse.emf.compare.diagram.internal.factories.extensions;x-internal:=true,
+ org.eclipse.emf.compare.diagram.internal.merge;x-internal:=true
diff --git a/plugins/org.eclipse.emf.compare.diagram/about.ini b/plugins/org.eclipse.emf.compare.diagram/about.ini
new file mode 100644
index 000000000..eec22440e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram/about.ini
@@ -0,0 +1,14 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=modeling32.png
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
diff --git a/plugins/org.eclipse.emf.compare.diagram/about.properties b/plugins/org.eclipse.emf.compare.diagram/about.properties
new file mode 100644
index 000000000..f733cb679
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.diagram/about.properties
@@ -0,0 +1,26 @@
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2006, 2012 Obeo 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:
+# * Obeo - Initial API and implementation
+# *
+# * </copyright>
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+featureName=EMF Compare GMF Integration
+
+featureText=EMF Compare - GMF Integration\n\
+Version: {featureVersion}\n\
+\n\
+(c) Copyright Obeo and others. 2006, 2012. All rights reserved.\n\
+\n\
+EMF Compare brings comparison to the Eclipse Modeling Framework\n\
+Visit http://www.eclipse.org/emf/compare
diff --git a/plugins/org.eclipse.emf.compare.diagram/build.properties b/plugins/org.eclipse.emf.compare.diagram/build.properties
index f74ea1c6b..7c1e9e5d1 100644
--- a/plugins/org.eclipse.emf.compare.diagram/build.properties
+++ b/plugins/org.eclipse.emf.compare.diagram/build.properties
@@ -1,5 +1,5 @@
#*******************************************************************************
- # Copyright (c) 2006, 2012 Obeo.
+ # Copyright (c) 2013 Obeo.
# 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
@@ -13,10 +13,16 @@ bin.includes = .,\
META-INF/,\
plugin.xml,\
plugin.properties,\
- about.html
+ about.html,\
+ about.ini,\
+ about.properties,\
+ modeling32.png
jars.compile.order = .
source.. = src-gen/,\
src/
output.. = bin/
src.includes = about.html,\
- model/
+ model/,\
+ about.ini,\
+ about.properties,\
+ modeling32.png
diff --git a/plugins/org.eclipse.emf.compare.diagram/model/diagramdiff.ecore b/plugins/org.eclipse.emf.compare.diagram/model/diagramCompare.ecore
index b294fa119..53bac7b05 100644
--- a/plugins/org.eclipse.emf.compare.diagram/model/diagramdiff.ecore
+++ b/plugins/org.eclipse.emf.compare.diagram/model/diagramCompare.ecore
@@ -1,16 +1,11 @@
<?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="diagram" nsURI="http://www.eclipse.org/emf/compare/diagram/2.0"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="extensions" nsURI="http://www.eclipse.org/emf/compare/diagram/2.0"
nsPrefix="diagramcompare">
<eClassifiers xsi:type="ecore:EClass" name="Show" eSuperTypes="#//DiagramDiff"/>
<eClassifiers xsi:type="ecore:EClass" name="Hide" eSuperTypes="#//DiagramDiff"/>
<e