Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Goubet2014-03-13 08:04:17 -0400
committerLaurent Goubet2014-03-13 08:05:08 -0400
commit286c8af9cd4992a33779149fef0c455e655af690 (patch)
treeba4097c147b47b00a6224780620e8aad39bbba54
parent8538ce3ddd29ad2248400e18734649e84e8da7f6 (diff)
downloadorg.eclipse.emf.compare-286c8af9cd4992a33779149fef0c455e655af690.tar.gz
org.eclipse.emf.compare-286c8af9cd4992a33779149fef0c455e655af690.tar.xz
org.eclipse.emf.compare-286c8af9cd4992a33779149fef0c455e655af690.zip
normalize EOLs in the core (first pass)
-rw-r--r--packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomMediaWikiLanguage.java106
-rw-r--r--packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomTableOfContentsBlock.java202
-rw-r--r--packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/PrimaryTOCWriter.java220
-rw-r--r--packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/WikiTextToHTML.java1284
-rw-r--r--plugins/org.eclipse.emf.compare.doc/.settings/org.eclipse.core.runtime.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.runtime.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.emf.compare.edit/build.properties42
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/AttributeChangeItemProvider.java342
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/CompareItemProviderAdapterFactory.java628
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ConflictItemProvider.java368
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/DiffItemProvider.java682
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/EquivalenceItemProvider.java302
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchItemProvider.java476
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchResourceItemProvider.java528
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ReferenceChangeItemProvider.java322
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ResourceAttachmentChangeItemProvider.java304
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/DelegatingCommandStack.java268
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCommandStack.java92
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCopyCommand.java56
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/AbstractCopyCommand.java182
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/CompareCommandStack.java744
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/DualCompareCommandStack.java574
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/MergeCommand.java134
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/domain/IMergeRunnable.java78
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedAdapterFactoryItemDelegator.java168
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedItemProviderDecorator.java226
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ForwardingItemProvider.java822
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/Strings.java94
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/ComposedStyledString.java316
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/IStyledString.java846
-rw-r--r--plugins/org.eclipse.emf.compare.ide.tests/.project56
-rw-r--r--plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.runtime.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.emf.compare.ide.tests/build.properties14
-rw-r--r--plugins/org.eclipse.emf.compare.ide.tests/pom.xml84
-rw-r--r--plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/Activator.java80
-rw-r--r--plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/suite/AllTests.java84
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.git/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.git/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/.project56
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.runtime.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/build.properties14
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/pom.xml84
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/Activator.java80
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/CompareTestCase.java478
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/suite/AllTests.java86
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/unit/DependenciesTest.java414
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/workspace/TestProject.java306
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui.tests/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui.tests/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.tests.fuzzy/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.tests.fuzzy/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--plugins/org.eclipse.emf.compare.tests/.project56
-rw-r--r--plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.runtime.prefs4
-rw-r--r--plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.jdt.ui.prefs120
-rw-r--r--plugins/org.eclipse.emf.compare.tests/build.properties40
-rw-r--r--plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel94
-rw-r--r--plugins/org.eclipse.emf.compare.tests/plugin.xml88
-rw-r--r--plugins/org.eclipse.emf.compare.tests/pom.xml100
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java168
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java110
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java110
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java144
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefManyToMany.java152
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToMany.java172
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToOne.java190
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java128
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java128
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueReference.java128
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java276
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesPackage.java2160
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeImpl.java472
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValueReferenceImpl.java298
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValuedAttributeImpl.java328
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultipleContainmentImpl.java406
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeOppositeRefManyToManyImpl.java438
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeOppositeRefOneToManyImpl.java544
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeOppositeRefOneToOneImpl.java626
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueAttributeImpl.java358
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueContainmentImpl.java432
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueReferenceImpl.java346
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesFactoryImpl.java418
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesPackageImpl.java994
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesAdapterFactory.java594
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceFactoryImpl.java112
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceImpl.java108
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesSwitch.java682
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/EMFCompareTestsPlugin.java80
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/AbstractTestCompareCommandStack.java1112
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/CommandStackTestSuite.java50
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/MockCompareCommand.java268
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestCompareCommandStack.java64
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestCompareSideCommandStack.java380
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/command/TestDualCompareCommandStack.java64
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/ConflictDetectionTest.java4336
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/conflict/data/ConflictInputData.java1224
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/ComparisonUtilTest.java240
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/LCSPerformanceTest.java322
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/diff/URIDistanceTest.java316
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AllEditTests.java50
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java88
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ResourceScopeProvider.java54
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryLeft.ecore218
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryOrigin.ecore222
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryRight.ecore224
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/EquiComputingTest.java2226
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/equi/data/EquiInputData.java676
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/FragmentationTest.java2530
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fragmentation/data/FragmentationInputData.java162
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractInputData.java202
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/AbstractMatchValidator.java112
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareAssert.java588
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/EMFCompareTestBase.java92
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/IdentifierMatchValidator.java202
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/NotifierTuple.java148
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/EMFCompareTestRunner.java152
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/annotation/BeforeMatch.java80
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/annotation/ConflictTest.java130
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/annotation/DiffTest.java130
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/annotation/MatchTest.java112
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/annotation/UseCase.java64
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ConflictStatement.java374
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/DiffStatement.java360
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/MatchStatement.java318
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/ResultStatement.java60
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseRunner.java254
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/framework/junit/internal/UseCaseStatement.java144
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/DynamicInstanceComparisonTest.java202
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/IdentifierComparisonTest.java758
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/MatchPerformanceComparisonTest.java190
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/390666-ancestor.ecore10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/390666-left.ecore16
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/390666-right.ecore10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/391657-left.ecore10
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/391657-right.ecore22
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/391798-left.ecore46
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/391798-right.ecore46
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/DistanceMatchInputData.java218
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/add-remove-norename.ecore14
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/add-remove-norenamev2.ecore16
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/feature-update-delete.ecore16
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/feature-update-deletev2.ecore22
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/package-add-delete.ecore14
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/distance/package-add-deletev2.ecore12
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/dynamic/DynamicInstancesInputData.java180
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/identifier/IdentifierMatchInputData.java72
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/identifier/extlibraryLeft.ecore218
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/identifier/extlibraryOrigin.ecore222
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/fullcomparison/data/identifier/extlibraryRight.ecore224
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ExtensionMergeTest.java190
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeOutOfScopeValuesTest.java4372
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/IndividualMergeTest.java4776
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/MultipleMergeTest.java2254
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/data/IndividualDiffInputData.java672
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/postprocess/data/PostProcessInputData.java52
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/ReqComputingTest.java3334
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/req/data/ReqInputData.java836
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/scope/DefaultComparisonScopeTest.java538
166 files changed, 31090 insertions, 31076 deletions
diff --git a/packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.resources.prefs b/packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.resources.prefs
index 4824b8026..99f26c020 100644
--- a/packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.resources.prefs
+++ b/packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.resources.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.runtime.prefs b/packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/packaging/org.eclipse.emf.compare.gendoc/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomMediaWikiLanguage.java b/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomMediaWikiLanguage.java
index ed3ea1870..9fccd12dd 100644
--- a/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomMediaWikiLanguage.java
+++ b/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomMediaWikiLanguage.java
@@ -1,54 +1,54 @@
-/*******************************************************************************
- * 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.doc;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.mylyn.internal.wikitext.mediawiki.core.block.TableOfContentsBlock;
-import org.eclipse.mylyn.wikitext.core.parser.markup.Block;
-import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage;
-import org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage;
-
-/**
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- *
- */
-public class CustomMediaWikiLanguage extends MediaWikiLanguage {
-
- public CustomMediaWikiLanguage() {
- super();
- setName("CustomMediaWikiLanguage");
- }
-
- @Override
- protected void addStandardBlocks(List<Block> blocks,
- List<Block> paragraphBreakingBlocks) {
- super.addStandardBlocks(blocks, paragraphBreakingBlocks);
- CustomTableOfContentsBlock customTOCBlock = new CustomTableOfContentsBlock();
- replaceTOCBlock(blocks, customTOCBlock);
- replaceTOCBlock(paragraphBreakingBlocks, customTOCBlock);
- }
-
- private void replaceTOCBlock(List<Block> blocksList, CustomTableOfContentsBlock customTOCBlock) {
- for (Block block : new ArrayList<>(blocksList)) {
- if (block instanceof TableOfContentsBlock) {
-
- blocksList.set(blocksList.indexOf(block), customTOCBlock);
- }
- }
- }
-
- @Override
- public MarkupLanguage clone() {
- return (CustomMediaWikiLanguage) super.clone();
- }
+/*******************************************************************************
+ * 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.doc;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.mylyn.internal.wikitext.mediawiki.core.block.TableOfContentsBlock;
+import org.eclipse.mylyn.wikitext.core.parser.markup.Block;
+import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage;
+import org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ *
+ */
+public class CustomMediaWikiLanguage extends MediaWikiLanguage {
+
+ public CustomMediaWikiLanguage() {
+ super();
+ setName("CustomMediaWikiLanguage");
+ }
+
+ @Override
+ protected void addStandardBlocks(List<Block> blocks,
+ List<Block> paragraphBreakingBlocks) {
+ super.addStandardBlocks(blocks, paragraphBreakingBlocks);
+ CustomTableOfContentsBlock customTOCBlock = new CustomTableOfContentsBlock();
+ replaceTOCBlock(blocks, customTOCBlock);
+ replaceTOCBlock(paragraphBreakingBlocks, customTOCBlock);
+ }
+
+ private void replaceTOCBlock(List<Block> blocksList, CustomTableOfContentsBlock customTOCBlock) {
+ for (Block block : new ArrayList<>(blocksList)) {
+ if (block instanceof TableOfContentsBlock) {
+
+ blocksList.set(blocksList.indexOf(block), customTOCBlock);
+ }
+ }
+ }
+
+ @Override
+ public MarkupLanguage clone() {
+ return (CustomMediaWikiLanguage) super.clone();
+ }
} \ No newline at end of file
diff --git a/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomTableOfContentsBlock.java b/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomTableOfContentsBlock.java
index a4b3017d9..ce369edaf 100644
--- a/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomTableOfContentsBlock.java
+++ b/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/CustomTableOfContentsBlock.java
@@ -1,101 +1,101 @@
-/*******************************************************************************
- * 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.doc;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.mylyn.internal.wikitext.mediawiki.core.block.TableOfContentsBlock;
-import org.eclipse.mylyn.wikitext.core.parser.Attributes;
-import org.eclipse.mylyn.wikitext.core.parser.DocumentBuilder.BlockType;
-import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
-import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineParser;
-import org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage;
-
-/**
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- *
- */
-public class CustomTableOfContentsBlock extends TableOfContentsBlock {
-
- static final Pattern startPattern = Pattern.compile("\\s*__TOC__\\s*(.*?)"); //$NON-NLS-1$
-
- private int blockLineNumber = 0;
-
- private Matcher matcher;
-
- protected void emitToc(OutlineItem item) {
- if (item.getChildren().isEmpty()) {
- return;
- }
- if ((item.getLevel() + 1) > maxLevel) {
- return;
- }
- Attributes nullAttributes = new Attributes();
-
- builder.beginBlock(BlockType.NUMERIC_LIST, new Attributes(null, null, "list-style: none", null)); //$NON-NLS-1$ //$NON-NLS-2$
- for (OutlineItem child : item.getChildren()) {
- builder.beginBlock(BlockType.LIST_ITEM, nullAttributes);
- builder.link('#' + child.getId(), child.getLabel());
- emitToc(child);
- builder.endBlock();
- }
- builder.endBlock();
- }
-
- @Override
- public int processLineContent(String line, int offset) {
- if (blockLineNumber++ > 0) {
- setClosed(true);
- return 0;
- }
-
- if (!getMarkupLanguage().isFilterGenerativeContents()) {
- OutlineParser outlineParser = new OutlineParser(new MediaWikiLanguage());
- OutlineItem rootItem = outlineParser.parse(state.getMarkupContent());
-
- builder.beginBlock(BlockType.DIV, new Attributes(null, "toc", null, null));
- builder.beginHeading(3, new Attributes(null, "toc-title", null, null));
- builder.characters("Table of Contents");
- builder.endHeading();
-
- if (rootItem.getChildren().size() == 1 && rootItem.getChildren().get(0).getLevel() == 1) {
- emitToc(rootItem.getChildren().get(0));
- } else {
- emitToc(rootItem);
- }
-
- builder.endBlock();
- }
- int start = matcher.start(1);
- if (start > 0) {
- setClosed(true);
- }
- return start;
- }
-
- @Override
- public boolean canStart(String line, int lineOffset) {
- if (lineOffset == 0 && !getMarkupLanguage().isFilterGenerativeContents()) {
- matcher = startPattern.matcher(line);
- blockLineNumber = 0;
- return matcher.matches();
- } else {
- matcher = null;
- return false;
- }
- }
-
- @Override
- public CustomTableOfContentsBlock clone() {
- return (CustomTableOfContentsBlock) super.clone();
- }
-}
+/*******************************************************************************
+ * 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.doc;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.mylyn.internal.wikitext.mediawiki.core.block.TableOfContentsBlock;
+import org.eclipse.mylyn.wikitext.core.parser.Attributes;
+import org.eclipse.mylyn.wikitext.core.parser.DocumentBuilder.BlockType;
+import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
+import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineParser;
+import org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ *
+ */
+public class CustomTableOfContentsBlock extends TableOfContentsBlock {
+
+ static final Pattern startPattern = Pattern.compile("\\s*__TOC__\\s*(.*?)"); //$NON-NLS-1$
+
+ private int blockLineNumber = 0;
+
+ private Matcher matcher;
+
+ protected void emitToc(OutlineItem item) {
+ if (item.getChildren().isEmpty()) {
+ return;
+ }
+ if ((item.getLevel() + 1) > maxLevel) {
+ return;
+ }
+ Attributes nullAttributes = new Attributes();
+
+ builder.beginBlock(BlockType.NUMERIC_LIST, new Attributes(null, null, "list-style: none", null)); //$NON-NLS-1$ //$NON-NLS-2$
+ for (OutlineItem child : item.getChildren()) {
+ builder.beginBlock(BlockType.LIST_ITEM, nullAttributes);
+ builder.link('#' + child.getId(), child.getLabel());
+ emitToc(child);
+ builder.endBlock();
+ }
+ builder.endBlock();
+ }
+
+ @Override
+ public int processLineContent(String line, int offset) {
+ if (blockLineNumber++ > 0) {
+ setClosed(true);
+ return 0;
+ }
+
+ if (!getMarkupLanguage().isFilterGenerativeContents()) {
+ OutlineParser outlineParser = new OutlineParser(new MediaWikiLanguage());
+ OutlineItem rootItem = outlineParser.parse(state.getMarkupContent());
+
+ builder.beginBlock(BlockType.DIV, new Attributes(null, "toc", null, null));
+ builder.beginHeading(3, new Attributes(null, "toc-title", null, null));
+ builder.characters("Table of Contents");
+ builder.endHeading();
+
+ if (rootItem.getChildren().size() == 1 && rootItem.getChildren().get(0).getLevel() == 1) {
+ emitToc(rootItem.getChildren().get(0));
+ } else {
+ emitToc(rootItem);
+ }
+
+ builder.endBlock();
+ }
+ int start = matcher.start(1);
+ if (start > 0) {
+ setClosed(true);
+ }
+ return start;
+ }
+
+ @Override
+ public boolean canStart(String line, int lineOffset) {
+ if (lineOffset == 0 && !getMarkupLanguage().isFilterGenerativeContents()) {
+ matcher = startPattern.matcher(line);
+ blockLineNumber = 0;
+ return matcher.matches();
+ } else {
+ matcher = null;
+ return false;
+ }
+ }
+
+ @Override
+ public CustomTableOfContentsBlock clone() {
+ return (CustomTableOfContentsBlock) super.clone();
+ }
+}
diff --git a/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/PrimaryTOCWriter.java b/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/PrimaryTOCWriter.java
index 2c6c09faa..83d5afc5b 100644
--- a/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/PrimaryTOCWriter.java
+++ b/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/PrimaryTOCWriter.java
@@ -1,110 +1,110 @@
-/*******************************************************************************
- * 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.doc;
-
-import java.io.StringWriter;
-import java.io.Writer;
-import java.nio.file.Path;
-
-import org.eclipse.mylyn.wikitext.core.util.DefaultXmlStreamWriter;
-import org.eclipse.mylyn.wikitext.core.util.FormattingXMLStreamWriter;
-import org.eclipse.mylyn.wikitext.core.util.XmlStreamWriter;
-
-/**
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- *
- */
-public class PrimaryTOCWriter {
-
- private StringWriter primaryTOCOut;
- private XmlStreamWriter primaryTOCWriter;
-
- private StringWriter pluginOut;
- private XmlStreamWriter pluginWriter;
- private Path baseDir;
-
- void startPrimaryTOC(Path indexHTMLFile, String title) {
- baseDir = indexHTMLFile.getParent();
- primaryTOCOut = new StringWriter(8096);
- primaryTOCWriter = createXmlStreamWriter(primaryTOCOut);
-
- pluginOut = new StringWriter(8096);
- pluginWriter = createXmlStreamWriter(pluginOut);
-
- primaryTOCWriter.writeStartDocument("UTF-8", "1.0");
- primaryTOCWriter.writeStartElement("toc");
- primaryTOCWriter.writeAttribute("topic", indexHTMLFile.toString());
- primaryTOCWriter.writeAttribute("label", title);
-
- pluginWriter.writeStartDocument("UTF-8", "1.0");
- pluginWriter.writeLiteral("\n<?eclipse version=\"3.2\"?>\n");
- pluginWriter.writeStartElement("plugin");
-
- pluginWriter.writeStartElement("extension");
- pluginWriter.writeAttribute("point", "org.eclipse.help.toc");
-
- pluginWriter.writeEmptyElement("toc");
- pluginWriter.writeAttribute("file", "help/toc.xml");
- pluginWriter.writeAttribute("primary", "true");
-
- pluginWriter.writeEndElement();
-
- pluginWriter.writeStartElement("extension");
- pluginWriter.writeAttribute("point", "org.eclipse.help.toc");
-
- }
-
- void endPrimaryTOC() {
- primaryTOCWriter.writeEndElement();
- primaryTOCWriter.writeEndDocument();
- primaryTOCWriter.close();
-
- pluginWriter.writeEndElement();
- pluginWriter.writeEndElement();
- pluginWriter.writeEndDocument();
- pluginWriter.close();
- }
-
- void startTopic(String label, Path href) {
- primaryTOCWriter.writeStartElement("topic");
- primaryTOCWriter.writeAttribute("label", label);
-
- if (href != null) {
- primaryTOCWriter.writeAttribute("href", href.toString());
- }
- }
-
- void createLink(Path linkedTOC) {
- primaryTOCWriter.writeStartElement("link");
- primaryTOCWriter.writeAttribute("toc", baseDir.resolve(linkedTOC).toString());
- primaryTOCWriter.writeEndElement();
-
- pluginWriter.writeEmptyElement("toc");
- pluginWriter.writeAttribute("file", baseDir.resolve(linkedTOC).toString());
- }
-
- void endTopic() {
- primaryTOCWriter.writeEndElement();
- }
-
- String getPrimaryTOCContent() {
- return primaryTOCOut.toString();
- }
-
- String getPluginContent() {
- return pluginOut.toString();
- }
-
- protected XmlStreamWriter createXmlStreamWriter(Writer out) {
- XmlStreamWriter writer = new DefaultXmlStreamWriter(out);
- return new FormattingXMLStreamWriter(writer);
- }
-}
+/*******************************************************************************
+ * 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.doc;
+
+import java.io.StringWriter;
+import java.io.Writer;
+import java.nio.file.Path;
+
+import org.eclipse.mylyn.wikitext.core.util.DefaultXmlStreamWriter;
+import org.eclipse.mylyn.wikitext.core.util.FormattingXMLStreamWriter;
+import org.eclipse.mylyn.wikitext.core.util.XmlStreamWriter;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ *
+ */
+public class PrimaryTOCWriter {
+
+ private StringWriter primaryTOCOut;
+ private XmlStreamWriter primaryTOCWriter;
+
+ private StringWriter pluginOut;
+ private XmlStreamWriter pluginWriter;
+ private Path baseDir;
+
+ void startPrimaryTOC(Path indexHTMLFile, String title) {
+ baseDir = indexHTMLFile.getParent();
+ primaryTOCOut = new StringWriter(8096);
+ primaryTOCWriter = createXmlStreamWriter(primaryTOCOut);
+
+ pluginOut = new StringWriter(8096);
+ pluginWriter = createXmlStreamWriter(pluginOut);
+
+ primaryTOCWriter.writeStartDocument("UTF-8", "1.0");
+ primaryTOCWriter.writeStartElement("toc");
+ primaryTOCWriter.writeAttribute("topic", indexHTMLFile.toString());
+ primaryTOCWriter.writeAttribute("label", title);
+
+ pluginWriter.writeStartDocument("UTF-8", "1.0");
+ pluginWriter.writeLiteral("\n<?eclipse version=\"3.2\"?>\n");
+ pluginWriter.writeStartElement("plugin");
+
+ pluginWriter.writeStartElement("extension");
+ pluginWriter.writeAttribute("point", "org.eclipse.help.toc");
+
+ pluginWriter.writeEmptyElement("toc");
+ pluginWriter.writeAttribute("file", "help/toc.xml");
+ pluginWriter.writeAttribute("primary", "true");
+
+ pluginWriter.writeEndElement();
+
+ pluginWriter.writeStartElement("extension");
+ pluginWriter.writeAttribute("point", "org.eclipse.help.toc");
+
+ }
+
+ void endPrimaryTOC() {
+ primaryTOCWriter.writeEndElement();
+ primaryTOCWriter.writeEndDocument();
+ primaryTOCWriter.close();
+
+ pluginWriter.writeEndElement();
+ pluginWriter.writeEndElement();
+ pluginWriter.writeEndDocument();
+ pluginWriter.close();
+ }
+
+ void startTopic(String label, Path href) {
+ primaryTOCWriter.writeStartElement("topic");
+ primaryTOCWriter.writeAttribute("label", label);
+
+ if (href != null) {
+ primaryTOCWriter.writeAttribute("href", href.toString());
+ }
+ }
+
+ void createLink(Path linkedTOC) {
+ primaryTOCWriter.writeStartElement("link");
+ primaryTOCWriter.writeAttribute("toc", baseDir.resolve(linkedTOC).toString());
+ primaryTOCWriter.writeEndElement();
+
+ pluginWriter.writeEmptyElement("toc");
+ pluginWriter.writeAttribute("file", baseDir.resolve(linkedTOC).toString());
+ }
+
+ void endTopic() {
+ primaryTOCWriter.writeEndElement();
+ }
+
+ String getPrimaryTOCContent() {
+ return primaryTOCOut.toString();
+ }
+
+ String getPluginContent() {
+ return pluginOut.toString();
+ }
+
+ protected XmlStreamWriter createXmlStreamWriter(Writer out) {
+ XmlStreamWriter writer = new DefaultXmlStreamWriter(out);
+ return new FormattingXMLStreamWriter(writer);
+ }
+}
diff --git a/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/WikiTextToHTML.java b/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/WikiTextToHTML.java
index 607f5f69a..419c3e348 100644
--- a/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/WikiTextToHTML.java
+++ b/packaging/org.eclipse.emf.compare.gendoc/src/org/eclipse/emf/compare/doc/WikiTextToHTML.java
@@ -1,642 +1,642 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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.doc;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.nio.charset.Charset;
-import java.nio.file.FileSystem;
-import java.nio.file.FileSystems;
-import java.nio.file.FileVisitResult;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.PathMatcher;
-import java.nio.file.SimpleFileVisitor;
-import java.nio.file.StandardCopyOption;
-import java.nio.file.attribute.BasicFileAttributes;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jgit.api.DescribeCommand;
-import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.api.errors.GitAPIException;
-import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
-import org.eclipse.mylyn.internal.wikitext.core.parser.builder.DefaultSplittingStrategy;
-import org.eclipse.mylyn.internal.wikitext.core.parser.builder.NoSplittingStrategy;
-import org.eclipse.mylyn.internal.wikitext.core.parser.builder.SplitOutlineItem;
-import org.eclipse.mylyn.internal.wikitext.core.parser.builder.SplittingHtmlDocumentBuilder;
-import org.eclipse.mylyn.internal.wikitext.core.parser.builder.SplittingOutlineParser;
-import org.eclipse.mylyn.internal.wikitext.core.parser.builder.SplittingStrategy;
-import org.eclipse.mylyn.internal.wikitext.core.validation.StandaloneMarkupValidator;
-import org.eclipse.mylyn.wikitext.core.parser.MarkupParser;
-import org.eclipse.mylyn.wikitext.core.parser.builder.HtmlDocumentBuilder;
-import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage;
-import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
-import org.eclipse.mylyn.wikitext.core.parser.util.MarkupToEclipseToc;
-import org.eclipse.mylyn.wikitext.core.util.XmlStreamWriter;
-import org.eclipse.mylyn.wikitext.core.validation.ValidationProblem;
-import org.eclipse.mylyn.wikitext.core.validation.ValidationProblem.Severity;
-
-/**
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public class WikiTextToHTML {
-
- private static final FileSystem DEFAULT_FS = FileSystems.getDefault();
-
- private static final boolean FORMAT_OUTPUT = true;
-
- private static final Charset UTF_8 = Charset.forName("UTF-8");
-
- private static final String MEDIA_WIKI = "MediaWiki";
-
- private MarkupLanguage markupLanguage;
-
- private boolean navigationImages = false;
-
- private String title;
-
- private boolean emitDoctype = false;
-
- private boolean multipleOutputFiles;
-
- private String copyrightNotice;
-
- private boolean xhtmlStrict;
-
- private String prependImagePrefix;
-
- private String defaultAbsoluteLinkTarget;
-
- private String linkRel;
-
- private boolean suppressBuiltInCssStyles;
-
- private boolean useInlineCssStyles;
-
- private String htmlDoctype;
-
- private List<Stylesheet> stylesheets;
- private List<Stylesheet> helpStylesheets = new ArrayList<>();
- private List<Stylesheet> websiteStylesheets = new ArrayList<>();
-
- private PrimaryTOCWriter primaryTOCWriter = new PrimaryTOCWriter();
-
- private Path sourceFolder;
-
- private List<Path> foldersToCopy;
-
- private Path targetRootFolder;
-
- private Path targetWebsiteFolder;
-
- private Path targetHelpFolder;
-
- private boolean genEclipseHelp;
-
- private boolean genWebsite;
-
- private static java.util.Date NOW = Calendar.getInstance().getTime();
-
- public static void main(String[] args) throws Exception {
- WikiTextToHTML wikiTextToHTML = new WikiTextToHTML();
- wikiTextToHTML.run(args);
- }
-
- public void run(String[] args) throws Exception {
- processCommandLineArgs(args);
-
- if (targetRootFolder == null) {
- System.err.println("Error: unable to find -location argument");
- usage();
- System.exit(1);
- }
- if (!genEclipseHelp && !genWebsite) {
- System.err.println("Error: you must at least provide a -eclipsehelp or a -website option");
- usage();
- System.exit(1);
- }
-
- markupLanguage = new CustomMediaWikiLanguage();
- markupLanguage.setInternalLinkPattern("{0}");
-
- Stylesheet ss1 = new Stylesheet();
- ss1.setUrl("/help/topic/org.eclipse.emf.compare.doc/help/resources/bootstrap.css");
- helpStylesheets.add(ss1);
- Stylesheet ss2 = new Stylesheet();
- ss2.setUrl("/help/topic/org.eclipse.emf.compare.doc/help/resources/custom.css");
- helpStylesheets.add(ss2);
-
- ss1 = new Stylesheet();
- ss1.setUrl("resources/bootstrap.css");
- websiteStylesheets.add(ss1);
- ss2 = new Stylesheet();
- ss2.setUrl("resources/custom.css");
- websiteStylesheets.add(ss2);
-
- sourceFolder = DEFAULT_FS.getPath("src");
- foldersToCopy = new ArrayList<>();
- foldersToCopy.add(targetRootFolder.resolve(sourceFolder).resolve("images"));
- foldersToCopy.add(targetRootFolder.resolve(sourceFolder).resolve("resources"));
-
- targetWebsiteFolder = DEFAULT_FS.getPath("target", "website").resolve(gitDescribe());
- targetHelpFolder = DEFAULT_FS.getPath("help");
- final Path resolvedTargetHelpFolder = targetRootFolder.resolve(targetHelpFolder);
-
- if (genEclipseHelp) {
- if (Files.exists(resolvedTargetHelpFolder)) {
- System.out.println("Deleting "+ resolvedTargetHelpFolder + " before regenerating Eclipse help");
- removeRecursiveContent(resolvedTargetHelpFolder);
- }
- primaryTOCWriter.startPrimaryTOC(targetHelpFolder.resolve("index.html"), "EMF Compare Documentation");
- }
-
- final PathMatcher mediawikiPattern = DEFAULT_FS.getPathMatcher("glob:**/*.mediawiki");
-
- Files.walkFileTree(targetRootFolder.resolve(sourceFolder), new SimpleFileVisitor<Path>() {
- @Override
- public FileVisitResult visitFile(Path markupPath, BasicFileAttributes attrs) throws IOException {
- if (mediawikiPattern.matches(markupPath)) {
- processFile(sourceFolder, targetWebsiteFolder, targetHelpFolder, markupPath);
- }
- return FileVisitResult.CONTINUE;
- }
-
- @Override
- public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
- System.err.println("Failed to visit " + file);
- exc.printStackTrace();
- return FileVisitResult.CONTINUE;
- }
-
- /**
- * {@inheritDoc}
- * @see java.nio.file.SimpleFileVisitor#preVisitDirectory(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)
- */
- @Override
- public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
- if (genEclipseHelp && !dir.equals(targetRootFolder.resolve(sourceFolder)) && !foldersToCopy.contains(dir)) {
- if (dir.resolve("index.mediawiki").toFile().exists()) {
- primaryTOCWriter.startTopic(getTitle(dir), dir.resolve("index.html"));
- } else {
- primaryTOCWriter.startTopic(getTitle(dir), null);
- }
- }
- return FileVisitResult.CONTINUE;
- }
-
- /**
- * {@inheritDoc}
- * @see java.nio.file.SimpleFileVisitor#postVisitDirectory(java.lang.Object, java.io.IOException)
- */
- @Override
- public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
- if (genEclipseHelp && !dir.equals(targetRootFolder.resolve(sourceFolder)) && !foldersToCopy.contains(dir)) {
- primaryTOCWriter.endTopic();
- }
- return FileVisitResult.CONTINUE;
- }
- });
-
- if (genEclipseHelp) {
- primaryTOCWriter.endPrimaryTOC();
- writeStringToFile(primaryTOCWriter.getPrimaryTOCContent(), resolvedTargetHelpFolder.resolve("toc.xml"));
- writeStringToFile(primaryTOCWriter.getPluginContent(), targetRootFolder.resolve("plugin.xml"));
- }
-
- for (Path folder : foldersToCopy) {
- if (genWebsite)
- copy(folder, targetRootFolder.resolve(targetWebsiteFolder).resolve(folder.getFileName()), "glob:**/*");
- if (genEclipseHelp)
- copy(folder, resolvedTargetHelpFolder.resolve(folder.getFileName()), "glob:**/*");
- }
- }
-
- /**
- *
- */
- private void usage() {
- System.out.println("Usage: wikiTextToHTML -location path [-eclipsehelp] [-website]");
- }
-
- private void processCommandLineArgs(String[] args) throws Exception {
- if (args == null)
- throw new Exception("No argument provided");
- for (int i = 0; i < args.length; i++) {
- String option = args[i];
- String arg = "";
- if (i == args.length - 1 || args[i + 1].startsWith("-")) {//$NON-NLS-1$
- // do nothgin
- } else {
- arg = args[++i];
- }
-
- if (option.equalsIgnoreCase("-location")) { //$NON-NLS-1$
- targetRootFolder = DEFAULT_FS.getPath(arg);
- }
-
- if (option.equalsIgnoreCase("-eclipsehelp")) { //$NON-NLS-1$
- genEclipseHelp = true;
- }
-
- if (option.equalsIgnoreCase("-website")) { //$NON-NLS-1$
- genWebsite = true;
- }
- }
- }
-
- private String getTitle(Path path) {
- String filename = path.getFileName().toString();
- int lastIndexOf = filename.lastIndexOf('.');
- if (lastIndexOf >= 0) {
- filename = filename.substring(0, lastIndexOf);
- }
- String[] split = filename.split("-");
-
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < split.length; i++) {
- String str = split[i].trim();
- if (str.length() > 0) {
- if (i == 0) {
- char firstChar = str.charAt(0);
- sb.append(Character.toUpperCase(firstChar));
- sb.append(str.substring(1));
- } else {
- sb.append(str);
- }
- sb.append(' ');
- }
- }
- return sb.toString().trim();
- }
-
- private void processFile(final Path sourceFolder,
- final Path targetWebsiteFolder,
- final Path targetHelpFolder, Path markupPath)
- throws IOException, FileNotFoundException,
- UnsupportedEncodingException {
- System.out.println("Processing " + markupPath);
-
- Path relativeMarkupPath = targetRootFolder.resolve(sourceFolder).relativize(markupPath);
-
- Path targetHTML = targetWebsiteFolder.resolve(changeFilename(relativeMarkupPath, ".html"));
-
- Path relativeTOCPath = changeFilename(relativeMarkupPath, "toc-", ".xml");
- Path targetTOC = targetHelpFolder.resolve(relativeTOCPath);
- Path targetHelp = targetHelpFolder.resolve(changeFilename(relativeMarkupPath, ".html"));
-
- if (genWebsite) {
- mkdirs(targetRootFolder.resolve(targetHTML));
- }
- if (genEclipseHelp) {
- mkdirs(targetRootFolder.resolve(targetTOC));
- mkdirs(targetRootFolder.resolve(targetHelp));
- }
-
- String markupContent = new String(Files.readAllBytes(markupPath), UTF_8);
-
- final String markupContentWithTOC;
- if ("index.mediawiki".equals(markupPath.getFileName().toString())) {
- markupContentWithTOC = markupContent.replaceFirst("=(.*)=", "=EMF Compare — $1=\n\nVersion " + gitDescribe() +"\n\n") +
- "\n\nVersion " + gitDescribe() +
- "\n\nLast updated " + NOW;
- } else {
- Path relativeToRoot = targetHTML.getParent().relativize(targetWebsiteFolder.resolve("index.html"));
- markupContentWithTOC = markupContent.replaceFirst("=(.*)=", "=EMF Compare — $1=\n\nVersion " + gitDescribe() +"\n\n__TOC__\n\n") +
- "\n\nPart of ["+relativeToRoot+" EMF Compare Documentation]" +
- "\n\nVersion " + gitDescribe() +
- "\n\nLast updated " + NOW;
- }
-
- if (performValidation(markupPath, markupContent)) {
- // for website
- if (genWebsite) {
- stylesheets = websiteStylesheets;
- genHTML(getTitle(targetHTML), markupContentWithTOC, targetRootFolder.resolve(targetHTML));
- }
-
- // for eclipse help
- if (genEclipseHelp) {
- stylesheets = helpStylesheets;
- genHTML(getTitle(targetHTML), markupContent, targetRootFolder.resolve(targetHelp));
-
-
- final PathMatcher indexPattern = DEFAULT_FS.getPathMatcher("glob:**/index.mediawiki");
- if (!indexPattern.matches(markupPath)) {
- genTOC(getTitle(targetHelp), markupContent, targetRootFolder.resolve(targetTOC), targetHelp);
- primaryTOCWriter.startTopic(getTitle(targetHelp), targetHelp);
- primaryTOCWriter.createLink(relativeTOCPath);
- primaryTOCWriter.endTopic();
- }
- }
- }
- }
-
-
- private void mkdirs(Path file) {
- File parentFile = file.getParent().toFile();
- if (!parentFile.exists()) {
- file.getParent().toFile().mkdirs();
- }
- }
-
- private static void removeRecursiveContent(final Path path) throws IOException {
- Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
- @Override
- public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
- Files.delete(file);
- return FileVisitResult.CONTINUE;
- }
-
- @Override
- public FileVisitResult visitFileFailed(Path file, IOException exc)
- throws IOException {
- // try to delete the file anyway, even if its attributes
- // could not be read, since delete-only access is
- // theoretically possible
- Files.delete(file);
- return FileVisitResult.CONTINUE;
- }
-
- @Override
- public FileVisitResult postVisitDirectory(Path dir, IOException exc)
- throws IOException {
- if (exc == null) {
- if (!dir.equals(path)) {
- Files.delete(dir);
- }
- return FileVisitResult.CONTINUE;
- } else {
- // directory iteration failed; propagate exception
- throw exc;
- }
- }
- });
- }
-
- private Path changeFilename(Path source, String newFileExtension) {
- return changeFilename(source, "", newFileExtension);
- }
-
- private Path changeFilename(Path source, String prefix, String newFileExtension) {
- String filename = source.getFileName().toString();
- int lastIndexOf = filename.lastIndexOf(".");
- String newFileName = prefix + filename.substring(0, lastIndexOf) + newFileExtension;
- return source.resolveSibling(newFileName);
- }
-
- private void genTOC(String name, String markupContent, Path targetToc, Path targetHTML) throws IOException, UnsupportedEncodingException, FileNotFoundException {
- MarkupToEclipseToc toEclipseToc = new MarkupToEclipseToc() {
- public String createToc(OutlineItem root) {
- StringWriter out = new StringWriter(8096);
-
- XmlStreamWriter writer = createXmlStreamWriter(out);
-
- writer.writeStartDocument("utf-8", "1.0"); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (copyrightNotice != null) {
- writer.writeComment(copyrightNotice);
- }
-
- Method method = null;
- try {
- method = MarkupToEclipseToc.class.getDeclaredMethod("emitToc", XmlStreamWriter.class, List.class);
- method.setAccessible(true);
- } catch (NoSuchMethodException | SecurityException | IllegalArgumentException e) {
- throw new RuntimeException(e);
- }
-
- if (root.getChildren().size() == 1 && root.getChildren().get(0).getLevel() == 1) {
- OutlineItem innerRoot = root.getChildren().get(0);
- writer.writeStartElement("toc"); //$NON-NLS-1$
- writer.writeAttribute("topic", getHtmlFile() + "#" + innerRoot.getId()); //$NON-NLS-1$
- writer.writeAttribute("label", innerRoot.getLabel()); //$NON-NLS-1$
- try {
- method.invoke(this, writer, innerRoot.getChildren());
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- throw new RuntimeException(e);
- }
- } else {
- writer.writeStartElement("toc"); //$NON-NLS-1$
- writer.writeAttribute("topic", getHtmlFile()); //$NON-NLS-1$
- writer.writeAttribute("label", root.getLabel()); //$NON-NLS-1$
- try {
- method.invoke(this, writer, root.getChildren());
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- throw new RuntimeException(e);
- }
- }
-
- writer.writeEndElement(); // toc
-
- writer.writeEndDocument();
- writer.close();
-
- return out.toString();
- }
- };
- toEclipseToc.setMarkupLanguage(markupLanguage.clone());
- toEclipseToc.setHtmlFile(targetHTML.toString());
- toEclipseToc.setBookTitle(name);
- String tocContents = toEclipseToc.parse(markupContent);
-
- writeStringToFile(tocContents, targetToc);
- }
-
- private void writeStringToFile(String content, Path path) throws UnsupportedEncodingException, FileNotFoundException, IOException {
- try(Writer writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(path.toFile())), "UTF-8")) {
- writer.write(content);
- }
- }
-
- private void genHTML(String name, String markupContent, Path htmlOutputFile) throws IOException, FileNotFoundException {
- try (Writer writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(htmlOutputFile.toFile())), UTF_8)) {
- HtmlDocumentBuilder builder = new HtmlDocumentBuilder(writer, FORMAT_OUTPUT);
- for (Stylesheet stylesheet : stylesheets) {
- HtmlDocumentBuilder.Stylesheet builderStylesheet;
-
- if (stylesheet.url != null) {
- if (stylesheets == websiteStylesheets) {
- Path stylesheetPath = DEFAULT_FS.getPath(stylesheet.url);
- Path targetStylesheetPath = targetRootFolder.resolve(targetWebsiteFolder.resolve(stylesheetPath));
- Path relativeStylesheetPath = htmlOutputFile.getParent().relativize(targetStylesheetPath);
- builderStylesheet = new HtmlDocumentBuilder.Stylesheet(relativeStylesheetPath.toString());
- } else {
- builderStylesheet = new HtmlDocumentBuilder.Stylesheet(stylesheet.url);
- }
- } else {
- builderStylesheet = new HtmlDocumentBuilder.Stylesheet(stylesheet.file);
- }
- builder.addCssStylesheet(builderStylesheet);
-
- if (!stylesheet.attributes.isEmpty()) {
- for (Map.Entry<String, String> attr : stylesheet.attributes.entrySet()) {
- builderStylesheet.getAttributes().put(attr.getKey(), attr.getValue());
- }
- }
- }
-
- builder.setTitle(title == null ? name.toString() : title);
- builder.setEmitDtd(emitDoctype);
- if (emitDoctype && htmlDoctype != null) {
- builder.setHtmlDtd(htmlDoctype);
- }
- builder.setUseInlineStyles(useInlineCssStyles);
- builder.setSuppressBuiltInStyles(suppressBuiltInCssStyles);
- builder.setLinkRel(linkRel);
- builder.setDefaultAbsoluteLinkTarget(defaultAbsoluteLinkTarget);
- builder.setPrependImagePrefix(prependImagePrefix);
- builder.setXhtmlStrict(xhtmlStrict);
- builder.setCopyrightNotice(copyrightNotice);
-
- SplittingStrategy splittingStrategy = multipleOutputFiles
- ? new DefaultSplittingStrategy()
- : new NoSplittingStrategy();
- SplittingOutlineParser outlineParser = new SplittingOutlineParser();
- outlineParser.setMarkupLanguage(markupLanguage.clone());
- outlineParser.setSplittingStrategy(splittingStrategy);
- SplitOutlineItem item = outlineParser.parse(markupContent);
- item.setSplitTarget(htmlOutputFile.toFile().getName());
- SplittingHtmlDocumentBuilder splittingBuilder = new SplittingHtmlDocumentBuilder();
- splittingBuilder.setRootBuilder(builder);
- splittingBuilder.setOutline(item);
- splittingBuilder.setRootFile(htmlOutputFile.toFile());
- splittingBuilder.setNavigationImages(navigationImages);
- splittingBuilder.setFormatting(FORMAT_OUTPUT);
-
- MarkupParser parser = new MarkupParser();
- parser.setMarkupLanguage(markupLanguage);
- parser.setBuilder(splittingBuilder);
- parser.parse(markupContent);
- }
- }
-
- private String gitDescribe() {
- FileRepositoryBuilder builder = new FileRepositoryBuilder();
- try {
- Repository repo = builder.setWorkTree(new File("."))
- .readEnvironment() // scan environment GIT_* variables
- .findGitDir() // scan up the file system tree
- .build();
- Git git = new Git(repo);
- DescribeCommand command = git.describe();
- return command.call();
- } catch (IOException e) {
- new RuntimeException(e);
- } catch (GitAPIException e) {
- new RuntimeException(e);
- }
- return "";
- }
-
- private void copy(final Path sourceFolder,
- final Path targetFolder, String pattern) throws IOException {
- final PathMatcher imageMatcher = DEFAULT_FS.getPathMatcher(pattern);
- Files.walkFileTree(sourceFolder, new SimpleFileVisitor<Path>() {
- @Override
- public FileVisitResult visitFile(Path sourcePath, BasicFileAttributes attrs) throws IOException {
- if (imageMatcher.matches(sourcePath)) {
- String targetFile = sourcePath.toString().replace(sourceFolder.toString(), targetFolder.toString());
- Path targetPath = DEFAULT_FS.getPath(targetFile);
- targetPath.getParent().toFile().mkdirs();
- Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);
- }
- return FileVisitResult.CONTINUE;
- }
- });
- }
-
- /**
- * Returns true if valid (may have warning).
- * @param source
- * @param markupContent
- * @return
- */
- private boolean performValidation(Path source, String markupContent) {
- StandaloneMarkupValidator markupValidator = StandaloneMarkupValidator.getValidator(MEDIA_WIKI);
-
- List<ValidationProblem> problems = markupValidator.validate(markupContent);
-
- int errorCount = 0;
- for (ValidationProblem problem : problems) {
- String messageLevel = problem.getSeverity().name();
- if (problem.getSeverity() == Severity.ERROR) {
- errorCount++;
- }
- System.out.println(String.format("%s: %s:%s %s", messageLevel, source.toString(), problem.getOffset(), problem.getMessage())); //$NON-NLS-1$
- }
-
- return errorCount == 0;
- }
-
- public static class Stylesheet {
- private File file;
-
- private String url;
-
- private final Map<String, String> attributes = new HashMap<>();
-
- public File getFile() {
- return file;
- }
-
- public void setFile(File file) {
- this.file = file;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public void addConfiguredAttribute(Attribute attribute) {
- attributes.put(attribute.getName(), attribute.getValue());
- }
- }
-
- public static class Attribute {
- private String name;
-
- private String value;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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.doc;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.charset.Charset;
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.PathMatcher;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.StandardCopyOption;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jgit.api.DescribeCommand;
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.errors.GitAPIException;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
+import org.eclipse.mylyn.internal.wikitext.core.parser.builder.DefaultSplittingStrategy;
+import org.eclipse.mylyn.internal.wikitext.core.parser.builder.NoSplittingStrategy;
+import org.eclipse.mylyn.internal.wikitext.core.parser.builder.SplitOutlineItem;
+import org.eclipse.mylyn.internal.wikitext.core.parser.builder.SplittingHtmlDocumentBuilder;
+import org.eclipse.mylyn.internal.wikitext.core.parser.builder.SplittingOutlineParser;
+import org.eclipse.mylyn.internal.wikitext.core.parser.builder.SplittingStrategy;
+import org.eclipse.mylyn.internal.wikitext.core.validation.StandaloneMarkupValidator;
+import org.eclipse.mylyn.wikitext.core.parser.MarkupParser;
+import org.eclipse.mylyn.wikitext.core.parser.builder.HtmlDocumentBuilder;
+import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage;
+import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
+import org.eclipse.mylyn.wikitext.core.parser.util.MarkupToEclipseToc;
+import org.eclipse.mylyn.wikitext.core.util.XmlStreamWriter;
+import org.eclipse.mylyn.wikitext.core.validation.ValidationProblem;
+import org.eclipse.mylyn.wikitext.core.validation.ValidationProblem.Severity;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class WikiTextToHTML {
+
+ private static final FileSystem DEFAULT_FS = FileSystems.getDefault();
+
+ private static final boolean FORMAT_OUTPUT = true;
+
+ private static final Charset UTF_8 = Charset.forName("UTF-8");
+
+ private static final String MEDIA_WIKI = "MediaWiki";
+
+ private MarkupLanguage markupLanguage;
+
+ private boolean navigationImages = false;
+
+ private String title;
+
+ private boolean emitDoctype = false;
+
+ private boolean multipleOutputFiles;
+
+ private String copyrightNotice;
+
+ private boolean xhtmlStrict;
+
+ private String prependImagePrefix;
+
+ private String defaultAbsoluteLinkTarget;
+
+ private String linkRel;
+
+ private boolean suppressBuiltInCssStyles;
+
+ private boolean useInlineCssStyles;
+
+ private String htmlDoctype;
+
+ private List<Stylesheet> stylesheets;
+ private List<Stylesheet> helpStylesheets = new ArrayList<>();
+ private List<Stylesheet> websiteStylesheets = new ArrayList<>();
+
+ private PrimaryTOCWriter primaryTOCWriter = new PrimaryTOCWriter();
+
+ private Path sourceFolder;
+
+ private List<Path> foldersToCopy;
+
+ private Path targetRootFolder;
+
+ private Path targetWebsiteFolder;
+
+ private Path targetHelpFolder;
+
+ private boolean genEclipseHelp;
+
+ private boolean genWebsite;
+
+ private static java.util.Date NOW = Calendar.getInstance().getTime();
+
+ public static void main(String[] args) throws Exception {
+ WikiTextToHTML wikiTextToHTML = new WikiTextToHTML();
+ wikiTextToHTML.run(args);
+ }
+
+ public void run(String[] args) throws Exception {
+ processCommandLineArgs(args);
+
+ if (targetRootFolder == null) {
+ System.err.println("Error: unable to find -location argument");
+ usage();
+ System.exit(1);
+ }
+ if (!genEclipseHelp && !genWebsite) {
+ System.err.println("Error: you must at least provide a -eclipsehelp or a -website option");
+ usage();
+ System.exit(1);
+ }
+
+ markupLanguage = new CustomMediaWikiLanguage();
+ markupLanguage.setInternalLinkPattern("{0}");
+
+ Stylesheet ss1 = new Stylesheet();
+ ss1.setUrl("/help/topic/org.eclipse.emf.compare.doc/help/resources/bootstrap.css");
+ helpStylesheets.add(ss1);
+ Stylesheet ss2 = new Stylesheet();
+ ss2.setUrl("/help/topic/org.eclipse.emf.compare.doc/help/resources/custom.css");
+ helpStylesheets.add(ss2);
+
+ ss1 = new Stylesheet();
+ ss1.setUrl("resources/bootstrap.css");
+ websiteStylesheets.add(ss1);
+ ss2 = new Stylesheet();
+ ss2.setUrl("resources/custom.css");
+ websiteStylesheets.add(ss2);
+
+ sourceFolder = DEFAULT_FS.getPath("src");
+ foldersToCopy = new ArrayList<>();
+ foldersToCopy.add(targetRootFolder.resolve(sourceFolder).resolve("images"));
+ foldersToCopy.add(targetRootFolder.resolve(sourceFolder).resolve("resources"));
+
+ targetWebsiteFolder = DEFAULT_FS.getPath("target", "website").resolve(gitDescribe());
+ targetHelpFolder = DEFAULT_FS.getPath("help");
+ final Path resolvedTargetHelpFolder = targetRootFolder.resolve(targetHelpFolder);
+
+ if (genEclipseHelp) {
+ if (Files.exists(resolvedTargetHelpFolder)) {
+ System.out.println("Deleting "+ resolvedTargetHelpFolder + " before regenerating Eclipse help");
+ removeRecursiveContent(resolvedTargetHelpFolder);
+ }
+ primaryTOCWriter.startPrimaryTOC(targetHelpFolder.resolve("index.html"), "EMF Compare Documentation");
+ }
+
+ final PathMatcher mediawikiPattern = DEFAULT_FS.getPathMatcher("glob:**/*.mediawiki");
+
+ Files.walkFileTree(targetRootFolder.resolve(sourceFolder), new SimpleFileVisitor<Path>() {
+ @Override
+ public FileVisitResult visitFile(Path markupPath, BasicFileAttributes attrs) throws IOException {
+ if (mediawikiPattern.matches(markupPath)) {
+ processFile(sourceFolder, targetWebsiteFolder, targetHelpFolder, markupPath);
+ }
+ return FileVisitResult.CONTINUE;
+ }
+
+ @Override
+ public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
+ System.err.println("Failed to visit " + file);
+ exc.printStackTrace();
+ return FileVisitResult.CONTINUE;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see java.nio.file.SimpleFileVisitor#preVisitDirectory(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)
+ */
+ @Override
+ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+ if (genEclipseHelp && !dir.equals(targetRootFolder.resolve(sourceFolder)) && !foldersToCopy.contains(dir)) {
+ if (dir.resolve("index.mediawiki").toFile().exists()) {
+ primaryTOCWriter.startTopic(getTitle(dir), dir.resolve("index.html"));
+ } else {
+ primaryTOCWriter.startTopic(getTitle(dir), null);
+ }
+ }
+ return FileVisitResult.CONTINUE;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see java.nio.file.SimpleFileVisitor#postVisitDirectory(java.lang.Object, java.io.IOException)
+ */
+ @Override
+ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
+ if (genEclipseHelp && !dir.equals(targetRootFolder.resolve(sourceFolder)) && !foldersToCopy.contains(dir)) {
+ primaryTOCWriter.endTopic();
+ }
+ return FileVisitResult.CONTINUE;
+ }
+ });
+
+ if (genEclipseHelp) {
+ primaryTOCWriter.endPrimaryTOC();
+ writeStringToFile(primaryTOCWriter.getPrimaryTOCContent(), resolvedTargetHelpFolder.resolve("toc.xml"));
+ writeStringToFile(primaryTOCWriter.getPluginContent(), targetRootFolder.resolve("plugin.xml"));
+ }
+
+ for (Path folder : foldersToCopy) {
+ if (genWebsite)
+ copy(folder, targetRootFolder.resolve(targetWebsiteFolder).resolve(folder.getFileName()), "glob:**/*");
+ if (genEclipseHelp)
+ copy(folder, resolvedTargetHelpFolder.resolve(folder.getFileName()), "glob:**/*");
+ }
+ }
+
+ /**
+ *
+ */
+ private void usage() {
+ System.out.println("Usage: wikiTextToHTML -location path [-eclipsehelp] [-website]");
+ }
+
+ private void processCommandLineArgs(String[] args) throws Exception {
+ if (args == null)
+ throw new Exception("No argument provided");
+ for (int i = 0; i < args.length; i++) {
+ String option = args[i];
+ String arg = "";
+ if (i == args.length - 1 || args[i + 1].startsWith("-")) {//$NON-NLS-1$
+ // do nothgin
+ } else {
+ arg = args[++i];
+ }
+
+ if (option.equalsIgnoreCase("-location")) { //$NON-NLS-1$
+ targetRootFolder = DEFAULT_FS.getPath(arg);
+ }
+
+ if (option.equalsIgnoreCase("-eclipsehelp")) { //$NON-NLS-1$
+ genEclipseHelp = true;
+ }
+
+ if (option.equalsIgnoreCase("-website")) { //$NON-NLS-1$
+ genWebsite = true;
+ }
+ }
+ }
+
+ private String getTitle(Path path) {
+ String filename = path.getFileName().toString();
+ int lastIndexOf = filename.lastIndexOf('.');
+ if (lastIndexOf >= 0) {
+ filename = filename.substring(0, lastIndexOf);
+ }
+ String[] split = filename.split("-");
+
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < split.length; i++) {
+ String str = split[i].trim();
+ if (str.length() > 0) {
+ if (i == 0) {
+ char firstChar = str.charAt(0);
+ sb.append(Character.toUpperCase(firstChar));
+ sb.append(str.substring(1));
+ } else {
+ sb.append(str);
+ }
+ sb.append(' ');
+ }
+ }
+ return sb.toString().trim();
+ }
+
+ private void processFile(final Path sourceFolder,
+ final Path targetWebsiteFolder,
+ final Path targetHelpFolder, Path markupPath)
+ throws IOException, FileNotFoundException,
+ UnsupportedEncodingException {
+ System.out.println("Processing " + markupPath);
+
+ Path relativeMarkupPath = targetRootFolder.resolve(sourceFolder).relativize(markupPath);
+
+ Path targetHTML = targetWebsiteFolder.resolve(changeFilename(relativeMarkupPath, ".html"));
+
+ Path relativeTOCPath = changeFilename(relativeMarkupPath, "toc-", ".xml");
+ Path targetTOC = targetHelpFolder.resolve(relativeTOCPath);
+ Path targetHelp = targetHelpFolder.resolve(changeFilename(relativeMarkupPath, ".html"));
+
+ if (genWebsite) {
+ mkdirs(targetRootFolder.resolve(targetHTML));
+ }
+ if (genEclipseHelp) {
+ mkdirs(targetRootFolder.resolve(targetTOC));
+ mkdirs(targetRootFolder.resolve(targetHelp));
+ }
+
+ String markupContent = new String(Files.readAllBytes(markupPath), UTF_8);
+
+ final String markupContentWithTOC;
+ if ("index.mediawiki".equals(markupPath.getFileName().toString())) {
+ markupContentWithTOC = markupContent.replaceFirst("=(.*)=", "=EMF Compare — $1=\n\nVersion " + gitDescribe() +"\n\n") +
+ "\n\nVersion " + gitDescribe() +
+ "\n\nLast updated " + NOW;
+ } else {
+ Path relativeToRoot = targetHTML.getParent().relativize(targetWebsiteFolder.resolve("index.html"));
+ markupContentWithTOC = markupContent.replaceFirst("=(.*)=", "=EMF Compare — $1=\n\nVersion " + gitDescribe() +"\n\n__TOC__\n\n") +
+ "\n\nPart of ["+relativeToRoot+" EMF Compare Documentation]" +
+ "\n\nVersion " + gitDescribe() +
+ "\n\nLast updated " + NOW;
+ }
+
+ if (performValidation(markupPath, markupContent)) {
+ // for website
+ if (genWebsite) {
+ stylesheets = websiteStylesheets;
+ genHTML(getTitle(targetHTML), markupContentWithTOC, targetRootFolder.resolve(targetHTML));
+ }
+
+ // for eclipse help
+ if (genEclipseHelp) {
+ stylesheets = helpStylesheets;
+ genHTML(getTitle(targetHTML), markupContent, targetRootFolder.resolve(targetHelp));
+
+
+ final PathMatcher indexPattern = DEFAULT_FS.getPathMatcher("glob:**/index.mediawiki");
+ if (!indexPattern.matches(markupPath)) {
+ genTOC(getTitle(targetHelp), markupContent, targetRootFolder.resolve(targetTOC), targetHelp);
+ primaryTOCWriter.startTopic(getTitle(targetHelp), targetHelp);
+ primaryTOCWriter.createLink(relativeTOCPath);
+ primaryTOCWriter.endTopic();
+ }
+ }
+ }
+ }
+
+
+ private void mkdirs(Path file) {
+ File parentFile = file.getParent().toFile();
+ if (!parentFile.exists()) {
+ file.getParent().toFile().mkdirs();
+ }
+ }
+
+ private static void removeRecursiveContent(final Path path) throws IOException {
+ Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
+ @Override
+ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+ Files.delete(file);
+ return FileVisitResult.CONTINUE;
+ }
+
+ @Override
+ public FileVisitResult visitFileFailed(Path file, IOException exc)
+ throws IOException {
+ // try to delete the file anyway, even if its attributes
+ // could not be read, since delete-only access is
+ // theoretically possible
+ Files.delete(file);
+ return FileVisitResult.CONTINUE;
+ }
+
+ @Override
+ public FileVisitResult postVisitDirectory(Path dir, IOException exc)
+ throws IOException {
+ if (exc == null) {
+ if (!dir.equals(path)) {
+ Files.delete(dir);
+ }
+ return FileVisitResult.CONTINUE;
+ } else {
+ // directory iteration failed; propagate exception
+ throw exc;
+ }
+ }
+ });
+ }
+
+ private Path changeFilename(Path source, String newFileExtension) {
+ return changeFilename(source, "", newFileExtension);
+ }
+
+ private Path changeFilename(Path source, String prefix, String newFileExtension) {
+ String filename = source.getFileName().toString();
+ int lastIndexOf = filename.lastIndexOf(".");
+ String newFileName = prefix + filename.substring(0, lastIndexOf) + newFileExtension;
+ return source.resolveSibling(newFileName);
+ }
+
+ private void genTOC(String name, String markupContent, Path targetToc, Path targetHTML) throws IOException, UnsupportedEncodingException, FileNotFoundException {
+ MarkupToEclipseToc toEclipseToc = new MarkupToEclipseToc() {
+ public String createToc(OutlineItem root) {
+ StringWriter out = new StringWriter(8096);
+
+ XmlStreamWriter writer = createXmlStreamWriter(out);
+
+ writer.writeStartDocument("utf-8", "1.0"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (copyrightNotice != null) {
+ writer.writeComment(copyrightNotice);
+ }
+
+ Method method = null;
+ try {
+ method = MarkupToEclipseToc.class.getDeclaredMethod("emitToc", XmlStreamWriter.class, List.class);
+ method.setAccessible(true);
+ } catch (NoSuchMethodException | SecurityException | IllegalArgumentException e) {
+ throw new RuntimeException(e);
+ }
+
+ if (root.getChildren().size() == 1 && root.getChildren().get(0).getLevel() == 1) {
+ OutlineItem innerRoot = root.getChildren().get(0);
+ writer.writeStartElement("toc"); //$NON-NLS-1$
+ writer.writeAttribute("topic", getHtmlFile() + "#" + innerRoot.getId()); //$NON-NLS-1$
+ writer.writeAttribute("label", innerRoot.getLabel()); //$NON-NLS-1$
+ try {
+ method.invoke(this, writer, innerRoot.getChildren());
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+ } else {
+ writer.writeStartElement("toc"); //$NON-NLS-1$
+ writer.writeAttribute("topic", getHtmlFile()); //$NON-NLS-1$
+ writer.writeAttribute("label", root.getLabel()); //$NON-NLS-1$
+ try {
+ method.invoke(this, writer, root.getChildren());
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ writer.writeEndElement(); // toc
+
+ writer.writeEndDocument();
+ writer.close();
+
+ return out.toString();
+ }
+ };
+ toEclipseToc.setMarkupLanguage(markupLanguage.clone());
+ toEclipseToc.setHtmlFile(targetHTML.toString());
+ toEclipseToc.setBookTitle(name);
+ String tocContents = toEclipseToc.parse(markupContent);
+
+ writeStringToFile(tocContents, targetToc);
+ }
+
+ private void writeStringToFile(String content, Path path) throws UnsupportedEncodingException, FileNotFoundException, IOException {
+ try(Writer writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(path.toFile())), "UTF-8")) {
+ writer.write(content);
+ }
+ }
+
+ private void genHTML(String name, String markupContent, Path htmlOutputFile) throws IOException, FileNotFoundException {
+ try (Writer writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(htmlOutputFile.toFile())), UTF_8)) {
+ HtmlDocumentBuilder builder = new HtmlDocumentBuilder(writer, FORMAT_OUTPUT);
+ for (Stylesheet stylesheet : stylesheets) {
+ HtmlDocumentBuilder.Stylesheet builderStylesheet;
+
+ if (stylesheet.url != null) {
+ if (stylesheets == websiteStylesheets) {
+ Path stylesheetPath = DEFAULT_FS.getPath(stylesheet.url);
+ Path targetStylesheetPath = targetRootFolder.resolve(targetWebsiteFolder.resolve(stylesheetPath));
+ Path relativeStylesheetPath = htmlOutputFile.getParent().relativize(targetStylesheetPath);
+ builderStylesheet = new HtmlDocumentBuilder.Stylesheet(relativeStylesheetPath.toString());
+ } else {
+ builderStylesheet = new HtmlDocumentBuilder.Stylesheet(stylesheet.url);
+ }
+ } else {
+ builderStylesheet = new HtmlDocumentBuilder.Stylesheet(stylesheet.file);
+ }
+ builder.addCssStylesheet(builderStylesheet);
+
+ if (!stylesheet.attributes.isEmpty()) {
+ for (Map.Entry<String, String> attr : stylesheet.attributes.entrySet()) {
+ builderStylesheet.getAttributes().put(attr.getKey(), attr.getValue());
+ }
+ }
+ }
+
+ builder.setTitle(title == null ? name.toString() : title);
+ builder.setEmitDtd(emitDoctype);
+ if (emitDoctype && htmlDoctype != null) {
+ builder.setHtmlDtd(htmlDoctype);
+ }
+ builder.setUseInlineStyles(useInlineCssStyles);
+ builder.setSuppressBuiltInStyles(suppressBuiltInCssStyles);
+ builder.setLinkRel(linkRel);
+ builder.setDefaultAbsoluteLinkTarget(defaultAbsoluteLinkTarget);
+ builder.setPrependImagePrefix(prependImagePrefix);
+ builder.setXhtmlStrict(xhtmlStrict);
+ builder.setCopyrightNotice(copyrightNotice);
+
+ SplittingStrategy splittingStrategy = multipleOutputFiles
+ ? new DefaultSplittingStrategy()
+ : new NoSplittingStrategy();
+ SplittingOutlineParser outlineParser = new SplittingOutlineParser();
+ outlineParser.setMarkupLanguage(markupLanguage.clone());
+ outlineParser.setSplittingStrategy(splittingStrategy);
+ SplitOutlineItem item = outlineParser.parse(markupContent);
+ item.setSplitTarget(htmlOutputFile.toFile().getName());
+ SplittingHtmlDocumentBuilder splittingBuilder = new SplittingHtmlDocumentBuilder();
+ splittingBuilder.setRootBuilder(builder);
+ splittingBuilder.setOutline(item);
+ splittingBuilder.setRootFile(htmlOutputFile.toFile());
+ splittingBuilder.setNavigationImages(navigationImages);
+ splittingBuilder.setFormatting(FORMAT_OUTPUT);
+
+ MarkupParser parser = new MarkupParser();
+ parser.setMarkupLanguage(markupLanguage);
+ parser.setBuilder(splittingBuilder);
+ parser.parse(markupContent);
+ }
+ }
+
+ private String gitDescribe() {
+ FileRepositoryBuilder builder = new FileRepositoryBuilder();
+ try {
+ Repository repo = builder.setWorkTree(new File("."))
+ .readEnvironment() // scan environment GIT_* variables
+ .findGitDir() // scan up the file system tree
+ .build();
+ Git git = new Git(repo);
+ DescribeCommand command = git.describe();
+ return command.call();
+ } catch (IOException e) {
+ new RuntimeException(e);
+ } catch (GitAPIException e) {
+ new RuntimeException(e);
+ }
+ return "";
+ }
+
+ private void copy(final Path sourceFolder,
+ final Path targetFolder, String pattern) throws IOException {
+ final PathMatcher imageMatcher = DEFAULT_FS.getPathMatcher(pattern);
+ Files.walkFileTree(sourceFolder, new SimpleFileVisitor<Path>() {
+ @Override
+ public FileVisitResult visitFile(Path sourcePath, BasicFileAttributes attrs) throws IOException {
+ if (imageMatcher.matches(sourcePath)) {
+ String targetFile = sourcePath.toString().replace(sourceFolder.toString(), targetFolder.toString());
+ Path targetPath = DEFAULT_FS.getPath(targetFile);
+ targetPath.getParent().toFile().mkdirs();
+ Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);
+ }
+ return FileVisitResult.CONTINUE;
+ }
+ });
+ }
+
+ /**
+ * Returns true if valid (may have warning).
+ * @param source
+ * @param markupContent
+ * @return
+ */
+ private boolean performValidation(Path source, String markupContent) {
+ StandaloneMarkupValidator markupValidator = StandaloneMarkupValidator.getValidator(MEDIA_WIKI);
+
+ List<ValidationProblem> problems = markupValidator.validate(markupContent);
+
+ int errorCount = 0;
+ for (ValidationProblem problem : problems) {
+ String messageLevel = problem.getSeverity().name();
+ if (problem.getSeverity() == Severity.ERROR) {
+ errorCount++;
+ }
+ System.out.println(String.format("%s: %s:%s %s", messageLevel, source.toString(), problem.getOffset(), problem.getMessage())); //$NON-NLS-1$
+ }
+
+ return errorCount == 0;
+ }
+
+ public static class Stylesheet {
+ private File file;
+
+ private String url;
+
+ private final Map<String, String> attributes = new HashMap<>();
+
+ public File getFile() {
+ return file;
+ }
+
+ public void setFile(File file) {
+ this.file = file;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public void addConfiguredAttribute(Attribute attribute) {
+ attributes.put(attribute.getName(), attribute.getValue());
+ }
+ }
+
+ public static class Attribute {
+ private String name;
+
+ private String value;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.doc/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.doc/.settings/org.eclipse.core.runtime.prefs
index f8a67de1d..5a0ad22d2 100644
--- a/plugins/org.eclipse.emf.compare.doc/.settings/org.eclipse.core.runtime.prefs
+++ b/plugins/org.eclipse.emf.compare.doc/.settings/org.eclipse.core.runtime.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-line.separator=\r\n
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.resources.prefs
index 4824b8026..99f26c020 100644
--- a/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.resources.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.runtime.prefs
index f8a67de1d..5a0ad22d2 100644
--- a/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.runtime.prefs
+++ b/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.core.runtime.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-line.separator=\r\n
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.jdt.ui.prefs
index 4517c0f23..4e1442ee9 100644
--- a/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.emf.compare.edit/.settings/org.eclipse.jdt.ui.prefs
@@ -1,60 +1,60 @@
-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
+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.edit/build.properties b/plugins/org.eclipse.emf.compare.edit/build.properties
index 3ff2c7288..eef98df95 100644
--- a/plugins/org.eclipse.emf.compare.edit/build.properties
+++ b/plugins/org.eclipse.emf.compare.edit/build.properties
@@ -1,21 +1,21 @@
-# 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
-
-bin.includes = .,\
- icons/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties,\
- about.html
-jars.compile.order = .
-source.. = src-gen/,\
- src/
-output.. = bin/
-src.includes = about.html,\
- icons/
+# 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
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src-gen/,\
+ src/
+output.. = bin/
+src.includes = about.html,\
+ icons/
diff --git a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/AttributeChangeItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/AttributeChangeItemProvider.java
index 90ab50c76..9730d71d0 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/AttributeChangeItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/AttributeChangeItemProvider.java
@@ -1,171 +1,171 @@
-/**
- * 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.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.AttributeChange;
-import org.eclipse.emf.compare.ComparePackage;
-import org.eclipse.emf.compare.DifferenceKind;
-
-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.AttributeChange} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-@SuppressWarnings("all")
-// generated code : suppressing warnings
-public class AttributeChangeItemProvider extends DiffItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AttributeChangeItemProvider(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);
-
- addAttributePropertyDescriptor(object);
- addValuePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addAttributePropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AttributeChange_attribute_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_AttributeChange_attribute_feature", "_UI_AttributeChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.ATTRIBUTE_CHANGE__ATTRIBUTE, true, false, true, null, null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Value feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AttributeChange_value_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_AttributeChange_value_feature", "_UI_AttributeChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.ATTRIBUTE_CHANGE__VALUE, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This returns AttributeChange.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/AttributeChange")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- DifferenceKind labelValue = ((AttributeChange)object).getKind();
- String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_AttributeChange_type") : //$NON-NLS-1$
- getString("_UI_AttributeChange_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * 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(AttributeChange.class)) {
- case ComparePackage.ATTRIBUTE_CHANGE__VALUE:
- 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);
- }
-
-}
+/**
+ * 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.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.AttributeChange;
+import org.eclipse.emf.compare.ComparePackage;
+import org.eclipse.emf.compare.DifferenceKind;
+
+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.AttributeChange} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+@SuppressWarnings("all")
+// generated code : suppressing warnings
+public class AttributeChangeItemProvider extends DiffItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AttributeChangeItemProvider(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);
+
+ addAttributePropertyDescriptor(object);
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAttributePropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AttributeChange_attribute_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_AttributeChange_attribute_feature", "_UI_AttributeChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.ATTRIBUTE_CHANGE__ATTRIBUTE, true, false, true, null, null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AttributeChange_value_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_AttributeChange_value_feature", "_UI_AttributeChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.ATTRIBUTE_CHANGE__VALUE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns AttributeChange.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AttributeChange")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ DifferenceKind labelValue = ((AttributeChange)object).getKind();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_AttributeChange_type") : //$NON-NLS-1$
+ getString("_UI_AttributeChange_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * 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(AttributeChange.class)) {
+ case ComparePackage.ATTRIBUTE_CHANGE__VALUE:
+ 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.edit/src-gen/org/eclipse/emf/compare/provider/CompareItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/CompareItemProviderAdapterFactory.java
index 78db1b4d0..f05a54694 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/CompareItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/CompareItemProviderAdapterFactory.java
@@ -1,314 +1,314 @@
-/**
- * Copyright (c) 2012, 2014 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.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.compare.util.CompareAdapterFactory;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.Disposable;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-
-/**
- * This is the factory that is used to provide the interfaces needed to support Viewers. The adapters
- * generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged
- * fireNotifyChanged}. The adapters also support Eclipse property sheets. Note that most of the adapters are
- * shared among multiple instances. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class CompareItemProviderAdapterFactory extends CompareAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @SuppressWarnings("hiding")
- // generated code : suppressing warnings
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the item providers created, so that they can be {@link #dispose disposed}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @since 4.0
- */
- protected Disposable disposable = new Disposable();
-
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected Collection<Object> supportedTypes = new ArrayList<Object>();
-
- /**
- * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public CompareItemProviderAdapterFactory() {
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- supportedTypes.add(IItemColorProvider.class);
- supportedTypes.add(IItemFontProvider.class);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.Comparison}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createComparisonAdapter() {
- return new ComparisonItemProvider(this);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.MatchResource}. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createMatchResourceAdapter() {
- return new MatchResourceItemProvider(this);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.Match}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createMatchAdapter() {
- return new MatchItemProvider(this);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.Diff}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createDiffAdapter() {
- return new DiffItemProvider(this);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.ResourceAttachmentChange}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createResourceAttachmentChangeAdapter() {
- return new ResourceAttachmentChangeItemProvider(this);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.ReferenceChange}. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createReferenceChangeAdapter() {
- return new ReferenceChangeItemProvider(this);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.AttributeChange}. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createAttributeChangeAdapter() {
- return new AttributeChangeItemProvider(this);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.Conflict}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createConflictAdapter() {
- return new ConflictItemProvider(this);
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.compare.Equivalence}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createEquivalenceAdapter() {
- return new EquivalenceItemProvider(this);
- }
-
- /**
- * This returns the root adapter factory that contains this factory. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object type) {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object adapt(Object object, Object type) {
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * Associates an adapter with a notifier via the base implementation, then records it to ensure it will be
- * disposed. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected void associate(Adapter adapter, Notifier target) {
- super.associate(adapter, target);
- if (adapter != null) {
- disposable.add(adapter);
- }
- }
-
- /**
- * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This disposes all of the item providers created by this factory. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public void dispose() {
- disposable.dispose();
- }
-
-}
+/**
+ * Copyright (c) 2012, 2014 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.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.compare.util.CompareAdapterFactory;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.Disposable;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers. The adapters
+ * generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged
+ * fireNotifyChanged}. The adapters also support Eclipse property sheets. Note that most of the adapters are
+ * shared among multiple instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class CompareItemProviderAdapterFactory extends CompareAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ // generated code : suppressing warnings
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the item providers created, so that they can be {@link #dispose disposed}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @since 4.0
+ */
+ protected Disposable disposable = new Disposable();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public CompareItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.Comparison}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createComparisonAdapter() {
+ return new ComparisonItemProvider(this);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.MatchResource}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createMatchResourceAdapter() {
+ return new MatchResourceItemProvider(this);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.Match}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createMatchAdapter() {
+ return new MatchItemProvider(this);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.Diff}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createDiffAdapter() {
+ return new DiffItemProvider(this);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.ResourceAttachmentChange}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createResourceAttachmentChangeAdapter() {
+ return new ResourceAttachmentChangeItemProvider(this);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.ReferenceChange}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createReferenceChangeAdapter() {
+ return new ReferenceChangeItemProvider(this);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.AttributeChange}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createAttributeChangeAdapter() {
+ return new AttributeChangeItemProvider(this);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.Conflict}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createConflictAdapter() {
+ return new ConflictItemProvider(this);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.compare.Equivalence}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createEquivalenceAdapter() {
+ return new EquivalenceItemProvider(this);
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Associates an adapter with a notifier via the base implementation, then records it to ensure it will be
+ * disposed. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void associate(Adapter adapter, Notifier target) {
+ super.associate(adapter, target);
+ if (adapter != null) {
+ disposable.add(adapter);
+ }
+ }
+
+ /**
+ * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public void dispose() {
+ disposable.dispose();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ConflictItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ConflictItemProvider.java
index cc412af61..1d5ea7559 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ConflictItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ConflictItemProvider.java
@@ -1,184 +1,184 @@
-/**
- * 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.provider;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.compare.ComparePackage;
-
-import org.eclipse.emf.compare.Conflict;
-import org.eclipse.emf.compare.ConflictKind;
-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.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.compare.Conflict} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-@SuppressWarnings("all")
-// generated code : suppressing warnings
-public class ConflictItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ConflictItemProvider(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);
-
- addKindPropertyDescriptor(object);
- addDifferencesPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Kind feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addKindPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Conflict_kind_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Conflict_kind_feature", "_UI_Conflict_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.CONFLICT__KIND, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Differences feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addDifferencesPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Conflict_differences_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Conflict_differences_feature", "_UI_Conflict_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.CONFLICT__DIFFERENCES, true, false, true, null, null, null));
- }
-
- /**
- * This returns Conflict.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Conflict")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- ConflictKind labelValue = ((Conflict)object).getKind();
- String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_Conflict_type") : //$NON-NLS-1$
- getString("_UI_Conflict_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * 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(Conflict.class)) {
- case ComparePackage.CONFLICT__KIND:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false,
- true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return EMFCompareEditPlugin.INSTANCE;
- }
-
-}
+/**
+ * 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.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.compare.ComparePackage;
+
+import org.eclipse.emf.compare.Conflict;
+import org.eclipse.emf.compare.ConflictKind;
+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.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.Conflict} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+@SuppressWarnings("all")
+// generated code : suppressing warnings
+public class ConflictItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConflictItemProvider(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);
+
+ addKindPropertyDescriptor(object);
+ addDifferencesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Kind feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addKindPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Conflict_kind_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Conflict_kind_feature", "_UI_Conflict_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.CONFLICT__KIND, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Differences feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDifferencesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Conflict_differences_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Conflict_differences_feature", "_UI_Conflict_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.CONFLICT__DIFFERENCES, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Conflict.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Conflict")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ ConflictKind labelValue = ((Conflict)object).getKind();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_Conflict_type") : //$NON-NLS-1$
+ getString("_UI_Conflict_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * 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(Conflict.class)) {
+ case ComparePackage.CONFLICT__KIND:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false,
+ true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EMFCompareEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/DiffItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/DiffItemProvider.java
index d6c9dce8a..121e5a5b6 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/DiffItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/DiffItemProvider.java
@@ -1,341 +1,341 @@
-/**
- * Copyright (c) 2012, 2014 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.provider;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.compare.ComparePackage;
-import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.DifferenceKind;
-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.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.compare.Diff} object. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
-@SuppressWarnings("all")
-// generated code : suppressing warnings
-public class DiffItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- public DiffItemProvider(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);
-
- addRequiresPropertyDescriptor(object);
- addRequiredByPropertyDescriptor(object);
- addImpliesPropertyDescriptor(object);
- addImpliedByPropertyDescriptor(object);
- addRefinesPropertyDescriptor(object);
- addRefinedByPropertyDescriptor(object);
- addPrimeRefiningPropertyDescriptor(object);
- addKindPropertyDescriptor(object);
- addSourcePropertyDescriptor(object);
- addStatePropertyDescriptor(object);
- addEquivalencePropertyDescriptor(object);
- addConflictPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Requires feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addRequiresPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Diff_requires_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Diff_requires_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__REQUIRES, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Required By feature. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- protected void addRequiredByPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Diff_requiredBy_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Diff_requiredBy_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__REQUIRED_BY, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Implies feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @since 4.0
- */
- protected void addImpliesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Diff_implies_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Diff_implies_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__IMPLIES, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Implied By feature. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @since 4.0
- */
- protected void addImpliedByPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Diff_impliedBy_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Diff_impliedBy_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__IMPLIED_BY, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Refines feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addRefinesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Diff_refines_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Diff_refines_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__REFINES, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Refined By feature. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- protected void addRefinedByPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Diff_refinedBy_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Diff_refinedBy_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__REFINED_BY, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Prime Refining feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @since 4.0
- */
- protected void addPrimeRefiningPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Diff_primeRefining_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Diff_primeRefining_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__PRIME_REFINING, false, false, false, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Kind feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addKindPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Diff_kind_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Diff_kind_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__KIND, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Source feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addSourcePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Diff_source_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Diff_source_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__SOURCE, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the State feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addStatePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Diff_state_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Diff_state_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__STATE, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Equivalence feature. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- protected void addEquivalencePropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Diff_equivalence_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Diff_equivalence_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__EQUIVALENCE, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Conflict feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addConflictPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Diff_conflict_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Diff_conflict_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.DIFF__CONFLICT, true, false, true, null, null, null));
- }
-
- /**
- * This returns Diff.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Diff")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object) {
- DifferenceKind labelValue = ((Diff)object).getKind();
- String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_Diff_type") : //$NON-NLS-1$
- getString("_UI_Diff_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * 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(Diff.class)) {
- case ComparePackage.DIFF__KIND:
- case ComparePackage.DIFF__SOURCE:
- case ComparePackage.DIFF__STATE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false,
- true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
- * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return EMFCompareEditPlugin.INSTANCE;
- }
-
-}
+/**
+ * Copyright (c) 2012, 2014 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.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.compare.ComparePackage;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.DifferenceKind;
+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.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.Diff} object. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@SuppressWarnings("all")
+// generated code : suppressing warnings
+public class DiffItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public DiffItemProvider(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);
+
+ addRequiresPropertyDescriptor(object);
+ addRequiredByPropertyDescriptor(object);
+ addImpliesPropertyDescriptor(object);
+ addImpliedByPropertyDescriptor(object);
+ addRefinesPropertyDescriptor(object);
+ addRefinedByPropertyDescriptor(object);
+ addPrimeRefiningPropertyDescriptor(object);
+ addKindPropertyDescriptor(object);
+ addSourcePropertyDescriptor(object);
+ addStatePropertyDescriptor(object);
+ addEquivalencePropertyDescriptor(object);
+ addConflictPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Requires feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addRequiresPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Diff_requires_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Diff_requires_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__REQUIRES, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Required By feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void addRequiredByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Diff_requiredBy_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Diff_requiredBy_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__REQUIRED_BY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Implies feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @since 4.0
+ */
+ protected void addImpliesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Diff_implies_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Diff_implies_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__IMPLIES, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Implied By feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @since 4.0
+ */
+ protected void addImpliedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Diff_impliedBy_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Diff_impliedBy_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__IMPLIED_BY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Refines feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addRefinesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Diff_refines_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Diff_refines_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__REFINES, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Refined By feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void addRefinedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Diff_refinedBy_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Diff_refinedBy_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__REFINED_BY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Prime Refining feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @since 4.0
+ */
+ protected void addPrimeRefiningPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Diff_primeRefining_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Diff_primeRefining_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__PRIME_REFINING, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Kind feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addKindPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Diff_kind_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Diff_kind_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__KIND, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Source feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSourcePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Diff_source_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Diff_source_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__SOURCE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the State feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addStatePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Diff_state_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Diff_state_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__STATE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Equivalence feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void addEquivalencePropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Diff_equivalence_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Diff_equivalence_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__EQUIVALENCE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Conflict feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addConflictPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Diff_conflict_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Diff_conflict_feature", "_UI_Diff_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.DIFF__CONFLICT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Diff.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Diff")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ DifferenceKind labelValue = ((Diff)object).getKind();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_Diff_type") : //$NON-NLS-1$
+ getString("_UI_Diff_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * 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(Diff.class)) {
+ case ComparePackage.DIFF__KIND:
+ case ComparePackage.DIFF__SOURCE:
+ case ComparePackage.DIFF__STATE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false,
+ true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EMFCompareEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/EquivalenceItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/EquivalenceItemProvider.java
index 9749859a8..c56d150e8 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/EquivalenceItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/EquivalenceItemProvider.java
@@ -1,151 +1,151 @@
-/**
- * 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.provider;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.compare.ComparePackage;
-
-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.ItemProviderAdapter;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.compare.Equivalence} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-@SuppressWarnings("all")
-// generated code : suppressing warnings
-public class EquivalenceItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EquivalenceItemProvider(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);
-
- addDifferencesPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Differences feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addDifferencesPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Equivalence_differences_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Equivalence_differences_feature", "_UI_Equivalence_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.EQUIVALENCE__DIFFERENCES, true, false, true, null, null, null));
- }
-
- /**
- * This returns Equivalence.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Equivalence")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_Equivalence_type"); //$NON-NLS-1$
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return EMFCompareEditPlugin.INSTANCE;
- }
-
-}
+/**
+ * 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.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.compare.ComparePackage;
+
+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.ItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.Equivalence} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+@SuppressWarnings("all")
+// generated code : suppressing warnings
+public class EquivalenceItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EquivalenceItemProvider(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);
+
+ addDifferencesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Differences feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDifferencesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Equivalence_differences_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Equivalence_differences_feature", "_UI_Equivalence_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.EQUIVALENCE__DIFFERENCES, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Equivalence.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Equivalence")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Equivalence_type"); //$NON-NLS-1$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EMFCompareEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchItemProvider.java
index 3620710ad..17af1c397 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchItemProvider.java
@@ -1,238 +1,238 @@
-/**
- * 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.provider;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.compare.CompareFactory;
-import org.eclipse.emf.compare.ComparePackage;
-import org.eclipse.emf.compare.Match;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.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.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.compare.Match} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-@SuppressWarnings("all")
-// generated code : suppressing warnings
-public class MatchItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MatchItemProvider(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_Match_left_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Match_left_feature", "_UI_Match_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH__LEFT, true, false, true, null, 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_Match_right_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Match_right_feature", "_UI_Match_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH__RIGHT, true, false, true, null, 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_Match_origin_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_Match_origin_feature", "_UI_Match_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH__ORIGIN, true, false, true, null, null, null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(ComparePackage.Literals.MATCH__SUBMATCHES);
- childrenFeatures.add(ComparePackage.Literals.MATCH__DIFFERENCES);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns Match.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Match")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_Match_type"); //$NON-NLS-1$
- }
-
- /**
- * 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(Match.class)) {
- case ComparePackage.MATCH__SUBMATCHES:
- case ComparePackage.MATCH__DIFFERENCES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true,
- false));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__SUBMATCHES,
- CompareFactory.eINSTANCE.createMatch()));
-
- newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__DIFFERENCES,
- CompareFactory.eINSTANCE.createDiff()));
-
- newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__DIFFERENCES,
- CompareFactory.eINSTANCE.createResourceAttachmentChange()));
-
- newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__DIFFERENCES,
- CompareFactory.eINSTANCE.createReferenceChange()));
-
- newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__DIFFERENCES,
- CompareFactory.eINSTANCE.createAttributeChange()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return EMFCompareEditPlugin.INSTANCE;
- }
-
-}
+/**
+ * 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.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.compare.CompareFactory;
+import org.eclipse.emf.compare.ComparePackage;
+import org.eclipse.emf.compare.Match;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.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.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.Match} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+@SuppressWarnings("all")
+// generated code : suppressing warnings
+public class MatchItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MatchItemProvider(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_Match_left_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Match_left_feature", "_UI_Match_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH__LEFT, true, false, true, null, 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_Match_right_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Match_right_feature", "_UI_Match_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH__RIGHT, true, false, true, null, 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_Match_origin_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_Match_origin_feature", "_UI_Match_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH__ORIGIN, true, false, true, null, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ComparePackage.Literals.MATCH__SUBMATCHES);
+ childrenFeatures.add(ComparePackage.Literals.MATCH__DIFFERENCES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Match.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Match")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Match_type"); //$NON-NLS-1$
+ }
+
+ /**
+ * 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(Match.class)) {
+ case ComparePackage.MATCH__SUBMATCHES:
+ case ComparePackage.MATCH__DIFFERENCES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true,
+ false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__SUBMATCHES,
+ CompareFactory.eINSTANCE.createMatch()));
+
+ newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__DIFFERENCES,
+ CompareFactory.eINSTANCE.createDiff()));
+
+ newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__DIFFERENCES,
+ CompareFactory.eINSTANCE.createResourceAttachmentChange()));
+
+ newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__DIFFERENCES,
+ CompareFactory.eINSTANCE.createReferenceChange()));
+
+ newChildDescriptors.add(createChildParameter(ComparePackage.Literals.MATCH__DIFFERENCES,
+ CompareFactory.eINSTANCE.createAttributeChange()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EMFCompareEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchResourceItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchResourceItemProvider.java
index bb83b40a9..dca8aba39 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchResourceItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/MatchResourceItemProvider.java
@@ -1,264 +1,264 @@
-/**
- * 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.provider;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.compare.ComparePackage;
-import org.eclipse.emf.compare.MatchResource;
-
-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.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.compare.MatchResource} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-@SuppressWarnings("all")
-// generated code : suppressing warnings
-public class MatchResourceItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MatchResourceItemProvider(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);
-
- addLeftURIPropertyDescriptor(object);
- addRightURIPropertyDescriptor(object);
- addOriginURIPropertyDescriptor(object);
- addLeftPropertyDescriptor(object);
- addRightPropertyDescriptor(object);
- addOriginPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Left URI feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addLeftURIPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_MatchResource_leftURI_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_MatchResource_leftURI_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH_RESOURCE__LEFT_URI, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Right URI feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addRightURIPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_MatchResource_rightURI_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_MatchResource_rightURI_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH_RESOURCE__RIGHT_URI, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Origin URI feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addOriginURIPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_MatchResource_originURI_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_MatchResource_originURI_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH_RESOURCE__ORIGIN_URI, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * 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_MatchResource_left_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_MatchResource_left_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH_RESOURCE__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_MatchResource_right_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_MatchResource_right_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH_RESOURCE__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_MatchResource_origin_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_MatchResource_origin_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.MATCH_RESOURCE__ORIGIN, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This returns MatchResource.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/MatchResource")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((MatchResource)object).getLeftURI();
- return label == null || label.length() == 0 ? getString("_UI_MatchResource_type") : //$NON-NLS-1$
- getString("_UI_MatchResource_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * 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(MatchResource.class)) {
- case ComparePackage.MATCH_RESOURCE__LEFT_URI:
- case ComparePackage.MATCH_RESOURCE__RIGHT_URI:
- case ComparePackage.MATCH_RESOURCE__ORIGIN_URI:
- case ComparePackage.MATCH_RESOURCE__LEFT:
- case ComparePackage.MATCH_RESOURCE__RIGHT:
- case ComparePackage.MATCH_RESOURCE__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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return EMFCompareEditPlugin.INSTANCE;
- }
-
-}
+/**
+ * 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.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.compare.ComparePackage;
+import org.eclipse.emf.compare.MatchResource;
+
+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.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.MatchResource} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+@SuppressWarnings("all")
+// generated code : suppressing warnings
+public class MatchResourceItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MatchResourceItemProvider(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);
+
+ addLeftURIPropertyDescriptor(object);
+ addRightURIPropertyDescriptor(object);
+ addOriginURIPropertyDescriptor(object);
+ addLeftPropertyDescriptor(object);
+ addRightPropertyDescriptor(object);
+ addOriginPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Left URI feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLeftURIPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_MatchResource_leftURI_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_MatchResource_leftURI_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH_RESOURCE__LEFT_URI, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Right URI feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addRightURIPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_MatchResource_rightURI_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_MatchResource_rightURI_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH_RESOURCE__RIGHT_URI, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Origin URI feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addOriginURIPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_MatchResource_originURI_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_MatchResource_originURI_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH_RESOURCE__ORIGIN_URI, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * 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_MatchResource_left_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_MatchResource_left_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH_RESOURCE__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_MatchResource_right_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_MatchResource_right_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH_RESOURCE__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_MatchResource_origin_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_MatchResource_origin_feature", "_UI_MatchResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.MATCH_RESOURCE__ORIGIN, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns MatchResource.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/MatchResource")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((MatchResource)object).getLeftURI();
+ return label == null || label.length() == 0 ? getString("_UI_MatchResource_type") : //$NON-NLS-1$
+ getString("_UI_MatchResource_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * 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(MatchResource.class)) {
+ case ComparePackage.MATCH_RESOURCE__LEFT_URI:
+ case ComparePackage.MATCH_RESOURCE__RIGHT_URI:
+ case ComparePackage.MATCH_RESOURCE__ORIGIN_URI:
+ case ComparePackage.MATCH_RESOURCE__LEFT:
+ case ComparePackage.MATCH_RESOURCE__RIGHT:
+ case ComparePackage.MATCH_RESOURCE__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);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EMFCompareEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ReferenceChangeItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ReferenceChangeItemProvider.java
index 51ffb810b..e1c751481 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ReferenceChangeItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ReferenceChangeItemProvider.java
@@ -1,161 +1,161 @@
-/**
- * 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.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.ComparePackage;
-import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.ReferenceChange;
-
-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;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.compare.ReferenceChange} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-@SuppressWarnings("all")
-// generated code : suppressing warnings
-public class ReferenceChangeItemProvider extends DiffItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ReferenceChangeItemProvider(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);
-
- addReferencePropertyDescriptor(object);
- addValuePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addReferencePropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ReferenceChange_reference_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_ReferenceChange_reference_feature", "_UI_ReferenceChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.REFERENCE_CHANGE__REFERENCE, true, false, true, null, null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Value feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
- .getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ReferenceChange_value_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_ReferenceChange_value_feature", "_UI_ReferenceChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.REFERENCE_CHANGE__VALUE, true, false, true, null, null, null));
- }
-
- /**
- * This returns ReferenceChange.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/ReferenceChange")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- DifferenceKind labelValue = ((ReferenceChange)object).getKind();
- String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_ReferenceChange_type") : //$NON-NLS-1$
- getString("_UI_ReferenceChange_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
-}
+/**
+ * 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.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.ComparePackage;
+import org.eclipse.emf.compare.DifferenceKind;
+import org.eclipse.emf.compare.ReferenceChange;
+
+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;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.compare.ReferenceChange} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+@SuppressWarnings("all")
+// generated code : suppressing warnings
+public class ReferenceChangeItemProvider extends DiffItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReferenceChangeItemProvider(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);
+
+ addReferencePropertyDescriptor(object);
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addReferencePropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ReferenceChange_reference_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ReferenceChange_reference_feature", "_UI_ReferenceChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.REFERENCE_CHANGE__REFERENCE, true, false, true, null, null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ReferenceChange_value_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ReferenceChange_value_feature", "_UI_ReferenceChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.REFERENCE_CHANGE__VALUE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns ReferenceChange.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ReferenceChange")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ DifferenceKind labelValue = ((ReferenceChange)object).getKind();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_ReferenceChange_type") : //$NON-NLS-1$
+ getString("_UI_ReferenceChange_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ResourceAttachmentChangeItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ResourceAttachmentChangeItemProvider.java
index 85b7f283d..974a938e4 100644
--- a/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ResourceAttachmentChangeItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src-gen/org/eclipse/emf/compare/provider/ResourceAttachmentChangeItemProvider.java
@@ -1,152 +1,152 @@
-/**
- * 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.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.ComparePackage;
-import org.eclipse.emf.compare.DifferenceKind;
-import org.eclipse.emf.compare.ResourceAttachmentChange;
-
-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.ResourceAttachmentChange} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-@SuppressWarnings("all")
-// generated code : suppressing warnings
-public class ResourceAttachmentChangeItemProvider extends DiffItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceAttachmentChangeItemProvider(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);
-
- addResourceURIPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Resource URI feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addResourceURIPropertyDescriptor(Object object) {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ResourceAttachmentChange_resourceURI_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_ResourceAttachmentChange_resourceURI_feature", "_UI_ResourceAttachmentChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ComparePackage.Literals.RESOURCE_ATTACHMENT_CHANGE__RESOURCE_URI, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This returns ResourceAttachmentChange.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/ResourceAttachmentChange")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- DifferenceKind labelValue = ((ResourceAttachmentChange)object).getKind();
- String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_ResourceAttachmentChange_type") : //$NON-NLS-1$
- getString("_UI_ResourceAttachmentChange_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * 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(ResourceAttachmentChange.class)) {
- case ComparePackage.RESOURCE_ATTACHMENT_CHANGE__RESOURCE_URI:
- 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);
- }
-
-}
+/**
+ * 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.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.ComparePackage;
+import org.eclipse.emf.compare.DifferenceKind;
+import org.eclipse.emf.compare.ResourceAttachmentChange;
+
+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.ResourceAttachmentChange} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+@SuppressWarnings("all")
+// generated code : suppressing warnings
+public class ResourceAttachmentChangeItemProvider extends DiffItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceAttachmentChangeItemProvider(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);
+
+ addResourceURIPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Resource URI feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addResourceURIPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ResourceAttachmentChange_resourceURI_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ResourceAttachmentChange_resourceURI_feature", "_UI_ResourceAttachmentChange_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ComparePackage.Literals.RESOURCE_ATTACHMENT_CHANGE__RESOURCE_URI, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns ResourceAttachmentChange.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ResourceAttachmentChange")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ DifferenceKind labelValue = ((ResourceAttachmentChange)object).getKind();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_ResourceAttachmentChange_type") : //$NON-NLS-1$
+ getString("_UI_ResourceAttachmentChange_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * 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(ResourceAttachmentChange.class)) {
+ case ComparePackage.RESOURCE_ATTACHMENT_CHANGE__RESOURCE_URI:
+ 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.edit/src/org/eclipse/emf/compare/command/DelegatingCommandStack.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/DelegatingCommandStack.java
index 02135b2d4..374db02a1 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/DelegatingCommandStack.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/DelegatingCommandStack.java
@@ -1,134 +1,134 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2014 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.command;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-/**
- * Abstract implementation that forward method calls to a {@link #delegate() delegatating}
- * {@link CommandStack}.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- * @since 4.0
- */
-// CHECKSTYLE:OFF
-public abstract class DelegatingCommandStack implements CommandStack {
- // CHECKSTYLE:ON
-
- /**
- * Returns the backing delegate instance that methods are forwarded to.
- *
- * @return the backing delegate instance that methods are forwarded to.
- */
- protected abstract CommandStack delegate();
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#execute(org.eclipse.emf.common.command.Command)
- */
- public void execute(Command command) {
- delegate().execute(command);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#canUndo()
- */
- public boolean canUndo() {
- return delegate().canUndo();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#undo()
- */
- public void undo() {
- delegate().undo();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#canRedo()
- */
- public boolean canRedo() {
- return delegate().canRedo();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#getUndoCommand()
- */
- public Command getUndoCommand() {
- return delegate().getUndoCommand();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#getRedoCommand()
- */
- public Command getRedoCommand() {
- return delegate().getRedoCommand();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#getMostRecentCommand()
- */
- public Command getMostRecentCommand() {
- return delegate().getMostRecentCommand();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#redo()
- */
- public void redo() {
- delegate().redo();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#flush()
- */
- public void flush() {
- delegate().flush();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#addCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
- */
- public void addCommandStackListener(CommandStackListener listener) {
- delegate().addCommandStackListener(listener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#removeCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
- */
- public void removeCommandStackListener(CommandStackListener listener) {
- delegate().removeCommandStackListener(listener);
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 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.command;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+
+/**
+ * Abstract implementation that forward method calls to a {@link #delegate() delegatating}
+ * {@link CommandStack}.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ * @since 4.0
+ */
+// CHECKSTYLE:OFF
+public abstract class DelegatingCommandStack implements CommandStack {
+ // CHECKSTYLE:ON
+
+ /**
+ * Returns the backing delegate instance that methods are forwarded to.
+ *
+ * @return the backing delegate instance that methods are forwarded to.
+ */
+ protected abstract CommandStack delegate();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#execute(org.eclipse.emf.common.command.Command)
+ */
+ public void execute(Command command) {
+ delegate().execute(command);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#canUndo()
+ */
+ public boolean canUndo() {
+ return delegate().canUndo();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#undo()
+ */
+ public void undo() {
+ delegate().undo();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#canRedo()
+ */
+ public boolean canRedo() {
+ return delegate().canRedo();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#getUndoCommand()
+ */
+ public Command getUndoCommand() {
+ return delegate().getUndoCommand();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#getRedoCommand()
+ */
+ public Command getRedoCommand() {
+ return delegate().getRedoCommand();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#getMostRecentCommand()
+ */
+ public Command getMostRecentCommand() {
+ return delegate().getMostRecentCommand();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#redo()
+ */
+ public void redo() {
+ delegate().redo();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#flush()
+ */
+ public void flush() {
+ delegate().flush();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#addCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
+ */
+ public void addCommandStackListener(CommandStackListener listener) {
+ delegate().addCommandStackListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#removeCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
+ */
+ public void removeCommandStackListener(CommandStackListener listener) {
+ delegate().removeCommandStackListener(listener);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCommandStack.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCommandStack.java
index e05a39cb3..e5e072d40 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCommandStack.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCommandStack.java
@@ -1,46 +1,46 @@
-/*******************************************************************************
- * 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.command;
-
-import org.eclipse.emf.common.command.CommandStack;
-
-/**
- * An extended {@link CommandStack command stack} that knows about each save state of the comparison.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public interface ICompareCommandStack extends CommandStack {
-
- /**
- * Returns whether the left model has changes since {@link #leftSaveIsDone} was call the last.
- *
- * @return whether the left model has changes since {@link #leftSaveIsDone} was call the last.
- */
- boolean isLeftSaveNeeded();
-
- /**
- * Returns whether the right model has changes since {@link #rightSaveIsDone} was call the last.
- *
- * @return whether the right model has changes since {@link #rightSaveIsDone} was call the last.
- */
- boolean isRightSaveNeeded();
-
- /**
- * Called after a save of the left model has been successfully performed.
- */
- void leftSaveIsDone();
-
- /**
- * Called after a save of the right model has been successfully performed.
- */
- void rightSaveIsDone();
-
-}
+/*******************************************************************************
+ * 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.command;
+
+import org.eclipse.emf.common.command.CommandStack;
+
+/**
+ * An extended {@link CommandStack command stack} that knows about each save state of the comparison.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public interface ICompareCommandStack extends CommandStack {
+
+ /**
+ * Returns whether the left model has changes since {@link #leftSaveIsDone} was call the last.
+ *
+ * @return whether the left model has changes since {@link #leftSaveIsDone} was call the last.
+ */
+ boolean isLeftSaveNeeded();
+
+ /**
+ * Returns whether the right model has changes since {@link #rightSaveIsDone} was call the last.
+ *
+ * @return whether the right model has changes since {@link #rightSaveIsDone} was call the last.
+ */
+ boolean isRightSaveNeeded();
+
+ /**
+ * Called after a save of the left model has been successfully performed.
+ */
+ void leftSaveIsDone();
+
+ /**
+ * Called after a save of the right model has been successfully performed.
+ */
+ void rightSaveIsDone();
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCopyCommand.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCopyCommand.java
index 508bc7f92..fc23351cf 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCopyCommand.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/ICompareCopyCommand.java
@@ -1,28 +1,28 @@
-/*******************************************************************************
- * 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.command;
-
-import org.eclipse.emf.common.command.Command;
-
-/**
- * Interface of compare copy (merge) command. It knows on which side of the copy will be applied.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public interface ICompareCopyCommand extends Command {
-
- /**
- * Returns true if the command will be applied from left to right side, false otherwise.
- *
- * @return true if the command will be applied from left to right side, false otherwise.
- */
- boolean isLeftToRight();
-}
+/*******************************************************************************
+ * 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.command;
+
+import org.eclipse.emf.common.command.Command;
+
+/**
+ * Interface of compare copy (merge) command. It knows on which side of the copy will be applied.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public interface ICompareCopyCommand extends Command {
+
+ /**
+ * Returns true if the command will be applied from left to right side, false otherwise.
+ *
+ * @return true if the command will be applied from left to right side, false otherwise.
+ */
+ boolean isLeftToRight();
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/AbstractCopyCommand.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/AbstractCopyCommand.java
index 80ed91b42..fb7f8a9f2 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/AbstractCopyCommand.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/AbstractCopyCommand.java
@@ -1,91 +1,91 @@
-/*******************************************************************************
- * Copyright (c) 2012, 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.command.impl;
-
-import com.google.common.collect.ImmutableList;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.command.ICompareCopyCommand;
-import org.eclipse.emf.compare.merge.IMerger;
-import org.eclipse.emf.ecore.change.util.ChangeRecorder;
-import org.eclipse.emf.edit.command.ChangeCommand;
-
-/**
- * This command can be used to copy a number of diffs (or a single one) in a given direction.
- *
- * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
- * @since 3.0
- */
-public abstract class AbstractCopyCommand extends ChangeCommand implements ICompareCopyCommand {
- /** The list of differences we are to merge. */
- protected final List<? extends Diff> differences;
-
- /** Direction of the merge operation. */
- protected final boolean leftToRight;
-
- /** Merger registry. */
- protected final IMerger.Registry mergerRegistry;
-
- /**
- * Constructs an instance of this command given the list of differences that it needs to merge.
- *
- * @param changeRecorder
- * The change recorder associated to this command.
- * @param notifiers
- * The collection of notifiers that will be notified of this command's execution.
- * @param differences
- * The list of differences that this command should merge.
- * @param leftToRight
- * The direction in which {@code differences} should be merged.
- * @param mergerRegistry
- * The registry of mergers.
- */
- public AbstractCopyCommand(ChangeRecorder changeRecorder, Collection<Notifier> notifiers,
- List<? extends Diff> differences, boolean leftToRight, IMerger.Registry mergerRegistry) {
- super(changeRecorder, notifiers);
- this.differences = ImmutableList.copyOf(differences);
- this.leftToRight = leftToRight;
- this.mergerRegistry = mergerRegistry;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCopyCommand#isLeftToRight()
- */
- public boolean isLeftToRight() {
- return leftToRight;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#getAffectedObjects()
- */
- @Override
- public Collection<?> getAffectedObjects() {
- return differences;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.AbstractCommand#canExecute()
- */
- @Override
- public boolean canExecute() {
- return super.canExecute() && !differences.isEmpty();
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012, 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.command.impl;
+
+import com.google.common.collect.ImmutableList;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.command.ICompareCopyCommand;
+import org.eclipse.emf.compare.merge.IMerger;
+import org.eclipse.emf.ecore.change.util.ChangeRecorder;
+import org.eclipse.emf.edit.command.ChangeCommand;
+
+/**
+ * This command can be used to copy a number of diffs (or a single one) in a given direction.
+ *
+ * @author <a href="mailto:cedric.notot@obeo.fr">Cedric Notot</a>
+ * @since 3.0
+ */
+public abstract class AbstractCopyCommand extends ChangeCommand implements ICompareCopyCommand {
+ /** The list of differences we are to merge. */
+ protected final List<? extends Diff> differences;
+
+ /** Direction of the merge operation. */
+ protected final boolean leftToRight;
+
+ /** Merger registry. */
+ protected final IMerger.Registry mergerRegistry;
+
+ /**
+ * Constructs an instance of this command given the list of differences that it needs to merge.
+ *
+ * @param changeRecorder
+ * The change recorder associated to this command.
+ * @param notifiers
+ * The collection of notifiers that will be notified of this command's execution.
+ * @param differences
+ * The list of differences that this command should merge.
+ * @param leftToRight
+ * The direction in which {@code differences} should be merged.
+ * @param mergerRegistry
+ * The registry of mergers.
+ */
+ public AbstractCopyCommand(ChangeRecorder changeRecorder, Collection<Notifier> notifiers,
+ List<? extends Diff> differences, boolean leftToRight, IMerger.Registry mergerRegistry) {
+ super(changeRecorder, notifiers);
+ this.differences = ImmutableList.copyOf(differences);
+ this.leftToRight = leftToRight;
+ this.mergerRegistry = mergerRegistry;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCopyCommand#isLeftToRight()
+ */
+ public boolean isLeftToRight() {
+ return leftToRight;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.AbstractCommand#getAffectedObjects()
+ */
+ @Override
+ public Collection<?> getAffectedObjects() {
+ return differences;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.AbstractCommand#canExecute()
+ */
+ @Override
+ public boolean canExecute() {
+ return super.canExecute() && !differences.isEmpty();
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/CompareCommandStack.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/CompareCommandStack.java
index 043758a7e..e72f73785 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/CompareCommandStack.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/CompareCommandStack.java
@@ -1,372 +1,372 @@
-/*******************************************************************************
- * 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.command.impl;
-
-import static com.google.common.collect.Lists.newArrayList;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.compare.command.DelegatingCommandStack;
-import org.eclipse.emf.compare.command.ICompareCommandStack;
-import org.eclipse.emf.compare.command.ICompareCopyCommand;
-
-/**
- * A simple {@link ICompareCommandStack} that delegate execution to another command stack but keep
- * informations about execution to properly reply to {@link ICompareCommandStack} protocol.
- * <p>
- * This implementation is not robust. If an error occurs during execution of a command, the whole state will
- * be corrupted and the undo/redo may have an unknown behavior.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public class CompareCommandStack extends DelegatingCommandStack implements ICompareCommandStack {
-
- /** The data structure to keep info of command executed on the right side. */
- private final CompareSideCommandStack rightCommandStack;
-
- /** The data structure to keep info of command executed on the left side. */
- private final CompareSideCommandStack leftCommandStack;
-
- /** The command to which we delegate to. */
- private final CommandStack delegate;
-
- /**
- * Creates a new instance that delegates to the given {@code commandStack}.
- *
- * @param commandStack
- * the command stack to which this instance will delegate.
- */
- public CompareCommandStack(CommandStack commandStack) {
- this.delegate = commandStack;
- this.rightCommandStack = new CompareSideCommandStack();
- this.leftCommandStack = new CompareSideCommandStack();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.DelegatingCommandStack#delegate()
- */
- @Override
- protected CommandStack delegate() {
- return delegate;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.DelegatingCommandStack#execute(org.eclipse.emf.common.command.Command)
- */
- @Override
- public void execute(Command command) {
- // should do that AFTER delegate.execute, but in this this case, notifiers will not see change in
- // side lists.
- if (command instanceof ICompareCopyCommand) {
- ICompareCopyCommand compareCommand = (ICompareCopyCommand)command;
- if (compareCommand.isLeftToRight()) {
- rightCommandStack.executed(compareCommand);
- } else {
- leftCommandStack.executed(compareCommand);
- }
- }
- super.execute(command);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.BasicCommandStack#undo()
- */
- @Override
- public void undo() {
- // should do that AFTER delegate.execute, but in this this case, notifiers will not see change in
- // side lists.
- if (canUndo()) {
- if (getUndoCommand() instanceof ICompareCopyCommand) {
- ICompareCopyCommand compareCommand = (ICompareCopyCommand)getUndoCommand();
- if (compareCommand.isLeftToRight()) {
- rightCommandStack.undone();
- } else {
- leftCommandStack.undone();
- }
- }
- }
- super.undo();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.BasicCommandStack#redo()
- */
- @Override
- public void redo() {
- // should do that AFTER delegate.execute, but in this this case, notifiers will not see change in
- // side lists.
- if (canRedo()) {
- if (getRedoCommand() instanceof ICompareCopyCommand) {
- ICompareCopyCommand compareCommand = (ICompareCopyCommand)getRedoCommand();
- if (compareCommand.isLeftToRight()) {
- rightCommandStack.redone();
- } else {
- leftCommandStack.redone();
- }
- }
- }
- super.redo();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#flush()
- */
- @Override
- public void flush() {
- rightCommandStack.flushed();
- leftCommandStack.flushed();
- super.flush();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCommandStack#isLeftSaveNeeded()
- */
- public boolean isLeftSaveNeeded() {
- return leftCommandStack.isSaveNeeded();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCommandStack#isRightSaveNeeded()
- */
- public boolean isRightSaveNeeded() {
- return rightCommandStack.isSaveNeeded();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCommandStack#leftSaveIsDone()
- */
- public void leftSaveIsDone() {
- leftCommandStack.saveIsDone();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCommandStack#rightSaveIsDone()
- */
- public void rightSaveIsDone() {
- rightCommandStack.saveIsDone();
- }
-
- /**
- * Simple data structure acting like a command stack but without any execution capability. It is used to
- * record execution of {@link ICompareCopyCommand} on each side.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
- public static class CompareSideCommandStack {
-
- /**
- * This will force the {@link #isSaveNeeded()} to return <code>true</code>.
- */
- private static final int IS_SAVE_NEEDED_WILL_BE_TRUE = -2;
-
- /**
- * The list of commands.
- */
- private final List<ICompareCopyCommand> commandList;
-
- /**
- * The current position within the list from which the next execute, undo, or redo, will be performed.
- */
- private int top;
-
- /**
- * The command most recently executed, undone, or redone.
- */
- private Command mostRecentCommand;
-
- /**
- * The value of {@link #top} when {@link #saveIsDone} is called.
- */
- private int saveIndex = -1;
-
- /**
- * Creates a new empty instance.
- */
- public CompareSideCommandStack() {
- commandList = newArrayList();
- top = -1;
- }
-
- /**
- * Record the execution of the given command.
- *
- * @param command
- * the command to record.
- */
- public void executed(ICompareCopyCommand command) {
- // If the command is executable, record it.
- //
- if (command != null) {
- if (command.canExecute()) {
- // Clear the list past the top.
- //
- Iterator<ICompareCopyCommand> commands = commandList.listIterator(top + 1);
- while (commands.hasNext()) {
- commands.next();
- commands.remove();
- }
-
- // Record the successfully executed command.
- //
- mostRecentCommand = command;
- commandList.add(command);
- ++top;
-
- // This is kind of tricky.
- // If the saveIndex was in the redo part of the command list which has now been wiped
- // out,
- // then we can never reach a point where a save is not necessary, not even if we undo
- // all the way back to the beginning.
- //
- if (saveIndex >= top) {
- // This forces isSaveNeded to always be true.
- //
- saveIndex = IS_SAVE_NEEDED_WILL_BE_TRUE;
- }
- }
- }
- }
-
- /**
- * Record that the top of the command list has been undone.
- */
- public void undone() {
- Command command = commandList.get(top--);
- mostRecentCommand = command;
- }
-
- /**
- * Record that the top of the command list has been redone.
- */
- public void redone() {
- Command command = commandList.get(++top);
- mostRecentCommand = command;
- }
-
- /**
- * Disposes all the commands in the stack.
- */
- public void flushed() {
- // Clear the list.
- //
- Iterator<ICompareCopyCommand> commands = commandList.listIterator();
- while (commands.hasNext()) {
- commands.next();
- commands.remove();
- }
- commandList.clear();
- top = -1;
- saveIndex = -1;
- mostRecentCommand = null;
- }
-
- /**
- * Called after a save has been successfully performed.
- */
- public void saveIsDone() {
- // Remember where we are now.
- //
- saveIndex = top;
- }
-
- /**
- * Returns whether the model has changes since {@link #saveIsDone} was call the last.
- *
- * @return whether the model has changes since <code>saveIsDone</code> was call the last.
- */
- public boolean isSaveNeeded() {
- boolean ret = false;
-
- if (saveIndex < -1) {
- ret = true;
- }
-
- if (!ret) {
- if (top > saveIndex) {
- for (int i = top; !ret && i > saveIndex; --i) {
- if (!(commandList.get(i) instanceof AbstractCommand.NonDirtying)) {
- ret = true;
- }
- }
- } else {
- for (int i = saveIndex; !ret && i > top; --i) {
- if (!(commandList.get(i) instanceof AbstractCommand.NonDirtying)) {
- ret = true;
- }
- }
- }
- }
-
- return ret;
- }
-
- /**
- * Returns the command that will be undone if {@link #undo} is called.
- *
- * @return the command that will be undone if {@link #undo} is called.
- */
- public Command getUndoCommand() {
- final Command undoCommand;
- if (top == -1 || top == commandList.size()) {
- undoCommand = null;
- } else {
- undoCommand = commandList.get(top);
- }
- return undoCommand;
- }
-
- /**
- * Returns the command that will be redone if {@link #redo} is called.
- *
- * @return the command that will be redone if {@link #redo} is called.
- */
- public Command getRedoCommand() {
- final Command redoCommand;
- if (top + 1 >= commandList.size()) {
- redoCommand = null;
- } else {
- redoCommand = commandList.get(top + 1);
- }
- return redoCommand;
- }
-
- /**
- * Returns the command most recently executed, undone, or redone.
- *
- * @return the command most recently executed, undone, or redone.
- */
- public Command getMostRecentCommand() {
- return mostRecentCommand;
- }
- }
-}
+/*******************************************************************************
+ * 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.command.impl;
+
+import static com.google.common.collect.Lists.newArrayList;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.compare.command.DelegatingCommandStack;
+import org.eclipse.emf.compare.command.ICompareCommandStack;
+import org.eclipse.emf.compare.command.ICompareCopyCommand;
+
+/**
+ * A simple {@link ICompareCommandStack} that delegate execution to another command stack but keep
+ * informations about execution to properly reply to {@link ICompareCommandStack} protocol.
+ * <p>
+ * This implementation is not robust. If an error occurs during execution of a command, the whole state will
+ * be corrupted and the undo/redo may have an unknown behavior.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class CompareCommandStack extends DelegatingCommandStack implements ICompareCommandStack {
+
+ /** The data structure to keep info of command executed on the right side. */
+ private final CompareSideCommandStack rightCommandStack;
+
+ /** The data structure to keep info of command executed on the left side. */
+ private final CompareSideCommandStack leftCommandStack;
+
+ /** The command to which we delegate to. */
+ private final CommandStack delegate;
+
+ /**
+ * Creates a new instance that delegates to the given {@code commandStack}.
+ *
+ * @param commandStack
+ * the command stack to which this instance will delegate.
+ */
+ public CompareCommandStack(CommandStack commandStack) {
+ this.delegate = commandStack;
+ this.rightCommandStack = new CompareSideCommandStack();
+ this.leftCommandStack = new CompareSideCommandStack();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.DelegatingCommandStack#delegate()
+ */
+ @Override
+ protected CommandStack delegate() {
+ return delegate;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.DelegatingCommandStack#execute(org.eclipse.emf.common.command.Command)
+ */
+ @Override
+ public void execute(Command command) {
+ // should do that AFTER delegate.execute, but in this this case, notifiers will not see change in
+ // side lists.
+ if (command instanceof ICompareCopyCommand) {
+ ICompareCopyCommand compareCommand = (ICompareCopyCommand)command;
+ if (compareCommand.isLeftToRight()) {
+ rightCommandStack.executed(compareCommand);
+ } else {
+ leftCommandStack.executed(compareCommand);
+ }
+ }
+ super.execute(command);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.BasicCommandStack#undo()
+ */
+ @Override
+ public void undo() {
+ // should do that AFTER delegate.execute, but in this this case, notifiers will not see change in
+ // side lists.
+ if (canUndo()) {
+ if (getUndoCommand() instanceof ICompareCopyCommand) {
+ ICompareCopyCommand compareCommand = (ICompareCopyCommand)getUndoCommand();
+ if (compareCommand.isLeftToRight()) {
+ rightCommandStack.undone();
+ } else {
+ leftCommandStack.undone();
+ }
+ }
+ }
+ super.undo();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.BasicCommandStack#redo()
+ */
+ @Override
+ public void redo() {
+ // should do that AFTER delegate.execute, but in this this case, notifiers will not see change in
+ // side lists.
+ if (canRedo()) {
+ if (getRedoCommand() instanceof ICompareCopyCommand) {
+ ICompareCopyCommand compareCommand = (ICompareCopyCommand)getRedoCommand();
+ if (compareCommand.isLeftToRight()) {
+ rightCommandStack.redone();
+ } else {
+ leftCommandStack.redone();
+ }
+ }
+ }
+ super.redo();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#flush()
+ */
+ @Override
+ public void flush() {
+ rightCommandStack.flushed();
+ leftCommandStack.flushed();
+ super.flush();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCommandStack#isLeftSaveNeeded()
+ */
+ public boolean isLeftSaveNeeded() {
+ return leftCommandStack.isSaveNeeded();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCommandStack#isRightSaveNeeded()
+ */
+ public boolean isRightSaveNeeded() {
+ return rightCommandStack.isSaveNeeded();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCommandStack#leftSaveIsDone()
+ */
+ public void leftSaveIsDone() {
+ leftCommandStack.saveIsDone();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCommandStack#rightSaveIsDone()
+ */
+ public void rightSaveIsDone() {
+ rightCommandStack.saveIsDone();
+ }
+
+ /**
+ * Simple data structure acting like a command stack but without any execution capability. It is used to
+ * record execution of {@link ICompareCopyCommand} on each side.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+ public static class CompareSideCommandStack {
+
+ /**
+ * This will force the {@link #isSaveNeeded()} to return <code>true</code>.
+ */
+ private static final int IS_SAVE_NEEDED_WILL_BE_TRUE = -2;
+
+ /**
+ * The list of commands.
+ */
+ private final List<ICompareCopyCommand> commandList;
+
+ /**
+ * The current position within the list from which the next execute, undo, or redo, will be performed.
+ */
+ private int top;
+
+ /**
+ * The command most recently executed, undone, or redone.
+ */
+ private Command mostRecentCommand;
+
+ /**
+ * The value of {@link #top} when {@link #saveIsDone} is called.
+ */
+ private int saveIndex = -1;
+
+ /**
+ * Creates a new empty instance.
+ */
+ public CompareSideCommandStack() {
+ commandList = newArrayList();
+ top = -1;
+ }
+
+ /**
+ * Record the execution of the given command.
+ *
+ * @param command
+ * the command to record.
+ */
+ public void executed(ICompareCopyCommand command) {
+ // If the command is executable, record it.
+ //
+ if (command != null) {
+ if (command.canExecute()) {
+ // Clear the list past the top.
+ //
+ Iterator<ICompareCopyCommand> commands = commandList.listIterator(top + 1);
+ while (commands.hasNext()) {
+ commands.next();
+ commands.remove();
+ }
+
+ // Record the successfully executed command.
+ //
+ mostRecentCommand = command;
+ commandList.add(command);
+ ++top;
+
+ // This is kind of tricky.
+ // If the saveIndex was in the redo part of the command list which has now been wiped
+ // out,
+ // then we can never reach a point where a save is not necessary, not even if we undo
+ // all the way back to the beginning.
+ //
+ if (saveIndex >= top) {
+ // This forces isSaveNeded to always be true.
+ //
+ saveIndex = IS_SAVE_NEEDED_WILL_BE_TRUE;
+ }
+ }
+ }
+ }
+
+ /**
+ * Record that the top of the command list has been undone.
+ */
+ public void undone() {
+ Command command = commandList.get(top--);
+ mostRecentCommand = command;
+ }
+
+ /**
+ * Record that the top of the command list has been redone.
+ */
+ public void redone() {
+ Command command = commandList.get(++top);
+ mostRecentCommand = command;
+ }
+
+ /**
+ * Disposes all the commands in the stack.
+ */
+ public void flushed() {
+ // Clear the list.
+ //
+ Iterator<ICompareCopyCommand> commands = commandList.listIterator();
+ while (commands.hasNext()) {
+ commands.next();
+ commands.remove();
+ }
+ commandList.clear();
+ top = -1;
+ saveIndex = -1;
+ mostRecentCommand = null;
+ }
+
+ /**
+ * Called after a save has been successfully performed.
+ */
+ public void saveIsDone() {
+ // Remember where we are now.
+ //
+ saveIndex = top;
+ }
+
+ /**
+ * Returns whether the model has changes since {@link #saveIsDone} was call the last.
+ *
+ * @return whether the model has changes since <code>saveIsDone</code> was call the last.
+ */
+ public boolean isSaveNeeded() {
+ boolean ret = false;
+
+ if (saveIndex < -1) {
+ ret = true;
+ }
+
+ if (!ret) {
+ if (top > saveIndex) {
+ for (int i = top; !ret && i > saveIndex; --i) {
+ if (!(commandList.get(i) instanceof AbstractCommand.NonDirtying)) {
+ ret = true;
+ }
+ }
+ } else {
+ for (int i = saveIndex; !ret && i > top; --i) {
+ if (!(commandList.get(i) instanceof AbstractCommand.NonDirtying)) {
+ ret = true;
+ }
+ }
+ }
+ }
+
+ return ret;
+ }
+
+ /**
+ * Returns the command that will be undone if {@link #undo} is called.
+ *
+ * @return the command that will be undone if {@link #undo} is called.
+ */
+ public Command getUndoCommand() {
+ final Command undoCommand;
+ if (top == -1 || top == commandList.size()) {
+ undoCommand = null;
+ } else {
+ undoCommand = commandList.get(top);
+ }
+ return undoCommand;
+ }
+
+ /**
+ * Returns the command that will be redone if {@link #redo} is called.
+ *
+ * @return the command that will be redone if {@link #redo} is called.
+ */
+ public Command getRedoCommand() {
+ final Command redoCommand;
+ if (top + 1 >= commandList.size()) {
+ redoCommand = null;
+ } else {
+ redoCommand = commandList.get(top + 1);
+ }
+ return redoCommand;
+ }
+
+ /**
+ * Returns the command most recently executed, undone, or redone.
+ *
+ * @return the command most recently executed, undone, or redone.
+ */
+ public Command getMostRecentCommand() {
+ return mostRecentCommand;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/DualCompareCommandStack.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/DualCompareCommandStack.java
index ea1305922..5994dd3cb 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/DualCompareCommandStack.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/DualCompareCommandStack.java
@@ -1,287 +1,287 @@
-/*******************************************************************************
- * 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.command.impl;
-
-import static com.google.common.collect.Lists.newArrayList;
-
-import com.google.common.base.Preconditions;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStackListener;
-import org.eclipse.emf.compare.command.ICompareCommandStack;
-import org.eclipse.emf.compare.command.ICompareCopyCommand;
-
-/**
- * {@link ICompareCommandStack} implementation that will delegates to two given command stacks; one for each
- * side of the comparison.
- * <p>
- * This implementation is not robust. If an error occurs during execution of a command, the whole state will
- * be corrupted and the undo/redo may have an unknown behavior.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public class DualCompareCommandStack implements ICompareCommandStack {
-
- /**
- * This value forces isSaveNeded to always be true.
- */
- private static final int IS_SAVE_NEEDED_WILL_BE_TRUE = -2;
-
- /** The left command stack. */
- private final BasicCommandStack leftCommandStack;
-
- /** The right command stack. */
- private final BasicCommandStack rightCommandStack;
-
- /**
- * The list of command stack; it will record the stack of which command stack has been used to execute the
- * commands.
- */
- private final List<BasicCommandStack> commandStackStack;
-
- /**
- * The current position within the list from which the next execute, undo, or redo, will be performed.
- */
- private int top;
-
- /**
- * The command stack on which a command has been most recently executed, undone, or redone.
- */
- private BasicCommandStack mostRecentCommandStack;
-
- /**
- * The value of {@link #top} when {@link #saveIsDone} is called.
- */
- private int saveIndex = -1;
-
- /**
- * Creates an instance that delegates to two given {@link BasicCommandStack}.
- *
- * @param leftCommandStack
- * the left command stack.
- * @param rightCommandStack
- * the right command stack.
- */
- public DualCompareCommandStack(BasicCommandStack leftCommandStack, BasicCommandStack rightCommandStack) {
- this.leftCommandStack = Preconditions.checkNotNull(leftCommandStack);
- this.rightCommandStack = Preconditions.checkNotNull(rightCommandStack);
- this.commandStackStack = newArrayList();
- this.top = -1;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#execute(org.eclipse.emf.common.command.Command)
- */
- public void execute(Command command) {
- // should do that AFTER delegate.execute, but in this this case, notifiers will not see change in
- // side lists.
- if (command instanceof ICompareCopyCommand) {
- final BasicCommandStack commandStack;
- final ICompareCopyCommand compareCommand = (ICompareCopyCommand)command;
- if (compareCommand.isLeftToRight()) {
- commandStack = rightCommandStack;
- } else {
- commandStack = leftCommandStack;
- }
-
- // Clear the list past the top.
- //
- Iterator<BasicCommandStack> commandStacks = commandStackStack.listIterator(top + 1);
- while (commandStacks.hasNext()) {
- commandStacks.next();
- commandStacks.remove();
- }
-
- // Record the successfully executed command.
- //
- mostRecentCommandStack = commandStack;
- commandStackStack.add(commandStack);
- ++top;
-
- // This is kind of tricky.
- // If the saveIndex was in the redo part of the command list which has now been wiped out,
- // then we can never reach a point where a save is not necessary, not even if we undo all the
- // way back to the beginning.
- //
- if (saveIndex >= top) {
- saveIndex = IS_SAVE_NEEDED_WILL_BE_TRUE;
- }
-
- commandStack.execute(compareCommand);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#canUndo()
- */
- public boolean canUndo() {
- return top != -1 && commandStackStack.get(top).canUndo();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#undo()
- */
- public void undo() {
- if (canUndo()) {
- BasicCommandStack commandStack = commandStackStack.get(top--);
- commandStack.undo();
- mostRecentCommandStack = commandStack;
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#canRedo()
- */
- public boolean canRedo() {
- return top < commandStackStack.size() - 1;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#getUndoCommand()
- */
- public Command getUndoCommand() {
- final Command undoCommand;
- if (top == -1 || top == commandStackStack.size()) {
- undoCommand = null;
- } else {
- undoCommand = commandStackStack.get(top).getUndoCommand();
- }
- return undoCommand;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#getRedoCommand()
- */
- public Command getRedoCommand() {
- final Command redoCommand;
- if (top + 1 >= commandStackStack.size()) {
- redoCommand = null;
- } else {
- redoCommand = commandStackStack.get(top + 1).getRedoCommand();
- }
- return redoCommand;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#getMostRecentCommand()
- */
- public Command getMostRecentCommand() {
- if (mostRecentCommandStack != null) {
- return mostRecentCommandStack.getMostRecentCommand();
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#redo()
- */
- public void redo() {
- if (canRedo()) {
- BasicCommandStack commandStack = commandStackStack.get(++top);
- commandStack.redo();
- mostRecentCommandStack = commandStack;
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#flush()
- */
- public void flush() {
- Iterator<BasicCommandStack> commands = commandStackStack.listIterator();
- while (commands.hasNext()) {
- commands.next();
- commands.remove();
- }
- commandStackStack.clear();
- top = -1;
- saveIndex = -1;
- mostRecentCommandStack = null;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#addCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
- */
- public void addCommandStackListener(CommandStackListener listener) {
- leftCommandStack.addCommandStackListener(listener);
- rightCommandStack.addCommandStackListener(listener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.command.CommandStack#removeCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
- */
- public void removeCommandStackListener(CommandStackListener listener) {
- leftCommandStack.removeCommandStackListener(listener);
- rightCommandStack.removeCommandStackListener(listener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCommandStack#isLeftSaveNeeded()
- */
- public boolean isLeftSaveNeeded() {
- return leftCommandStack.isSaveNeeded();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCommandStack#isRightSaveNeeded()
- */
- public boolean isRightSaveNeeded() {
- return rightCommandStack.isSaveNeeded();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCommandStack#leftSaveIsDone()
- */
- public void leftSaveIsDone() {
- leftCommandStack.saveIsDone();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.command.ICompareCommandStack#rightSaveIsDone()
- */
- public void rightSaveIsDone() {
- rightCommandStack.saveIsDone();
- }
-
-}
+/*******************************************************************************
+ * 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.command.impl;
+
+import static com.google.common.collect.Lists.newArrayList;
+
+import com.google.common.base.Preconditions;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.compare.command.ICompareCommandStack;
+import org.eclipse.emf.compare.command.ICompareCopyCommand;
+
+/**
+ * {@link ICompareCommandStack} implementation that will delegates to two given command stacks; one for each
+ * side of the comparison.
+ * <p>
+ * This implementation is not robust. If an error occurs during execution of a command, the whole state will
+ * be corrupted and the undo/redo may have an unknown behavior.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class DualCompareCommandStack implements ICompareCommandStack {
+
+ /**
+ * This value forces isSaveNeded to always be true.
+ */
+ private static final int IS_SAVE_NEEDED_WILL_BE_TRUE = -2;
+
+ /** The left command stack. */
+ private final BasicCommandStack leftCommandStack;
+
+ /** The right command stack. */
+ private final BasicCommandStack rightCommandStack;
+
+ /**
+ * The list of command stack; it will record the stack of which command stack has been used to execute the
+ * commands.
+ */
+ private final List<BasicCommandStack> commandStackStack;
+
+ /**
+ * The current position within the list from which the next execute, undo, or redo, will be performed.
+ */
+ private int top;
+
+ /**
+ * The command stack on which a command has been most recently executed, undone, or redone.
+ */
+ private BasicCommandStack mostRecentCommandStack;
+
+ /**
+ * The value of {@link #top} when {@link #saveIsDone} is called.
+ */
+ private int saveIndex = -1;
+
+ /**
+ * Creates an instance that delegates to two given {@link BasicCommandStack}.
+ *
+ * @param leftCommandStack
+ * the left command stack.
+ * @param rightCommandStack
+ * the right command stack.
+ */
+ public DualCompareCommandStack(BasicCommandStack leftCommandStack, BasicCommandStack rightCommandStack) {
+ this.leftCommandStack = Preconditions.checkNotNull(leftCommandStack);
+ this.rightCommandStack = Preconditions.checkNotNull(rightCommandStack);
+ this.commandStackStack = newArrayList();
+ this.top = -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#execute(org.eclipse.emf.common.command.Command)
+ */
+ public void execute(Command command) {
+ // should do that AFTER delegate.execute, but in this this case, notifiers will not see change in
+ // side lists.
+ if (command instanceof ICompareCopyCommand) {
+ final BasicCommandStack commandStack;
+ final ICompareCopyCommand compareCommand = (ICompareCopyCommand)command;
+ if (compareCommand.isLeftToRight()) {
+ commandStack = rightCommandStack;
+ } else {
+ commandStack = leftCommandStack;
+ }
+
+ // Clear the list past the top.
+ //
+ Iterator<BasicCommandStack> commandStacks = commandStackStack.listIterator(top + 1);
+ while (commandStacks.hasNext()) {
+ commandStacks.next();
+ commandStacks.remove();
+ }
+
+ // Record the successfully executed command.
+ //
+ mostRecentCommandStack = commandStack;
+ commandStackStack.add(commandStack);
+ ++top;
+
+ // This is kind of tricky.
+ // If the saveIndex was in the redo part of the command list which has now been wiped out,
+ // then we can never reach a point where a save is not necessary, not even if we undo all the
+ // way back to the beginning.
+ //
+ if (saveIndex >= top) {
+ saveIndex = IS_SAVE_NEEDED_WILL_BE_TRUE;
+ }
+
+ commandStack.execute(compareCommand);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#canUndo()
+ */
+ public boolean canUndo() {
+ return top != -1 && commandStackStack.get(top).canUndo();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#undo()
+ */
+ public void undo() {
+ if (canUndo()) {
+ BasicCommandStack commandStack = commandStackStack.get(top--);
+ commandStack.undo();
+ mostRecentCommandStack = commandStack;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#canRedo()
+ */
+ public boolean canRedo() {
+ return top < commandStackStack.size() - 1;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#getUndoCommand()
+ */
+ public Command getUndoCommand() {
+ final Command undoCommand;
+ if (top == -1 || top == commandStackStack.size()) {
+ undoCommand = null;
+ } else {
+ undoCommand = commandStackStack.get(top).getUndoCommand();
+ }
+ return undoCommand;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#getRedoCommand()
+ */
+ public Command getRedoCommand() {
+ final Command redoCommand;
+ if (top + 1 >= commandStackStack.size()) {
+ redoCommand = null;
+ } else {
+ redoCommand = commandStackStack.get(top + 1).getRedoCommand();
+ }
+ return redoCommand;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#getMostRecentCommand()
+ */
+ public Command getMostRecentCommand() {
+ if (mostRecentCommandStack != null) {
+ return mostRecentCommandStack.getMostRecentCommand();
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#redo()
+ */
+ public void redo() {
+ if (canRedo()) {
+ BasicCommandStack commandStack = commandStackStack.get(++top);
+ commandStack.redo();
+ mostRecentCommandStack = commandStack;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#flush()
+ */
+ public void flush() {
+ Iterator<BasicCommandStack> commands = commandStackStack.listIterator();
+ while (commands.hasNext()) {
+ commands.next();
+ commands.remove();
+ }
+ commandStackStack.clear();
+ top = -1;
+ saveIndex = -1;
+ mostRecentCommandStack = null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#addCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
+ */
+ public void addCommandStackListener(CommandStackListener listener) {
+ leftCommandStack.addCommandStackListener(listener);
+ rightCommandStack.addCommandStackListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.command.CommandStack#removeCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)
+ */
+ public void removeCommandStackListener(CommandStackListener listener) {
+ leftCommandStack.removeCommandStackListener(listener);
+ rightCommandStack.removeCommandStackListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCommandStack#isLeftSaveNeeded()
+ */
+ public boolean isLeftSaveNeeded() {
+ return leftCommandStack.isSaveNeeded();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCommandStack#isRightSaveNeeded()
+ */
+ public boolean isRightSaveNeeded() {
+ return rightCommandStack.isSaveNeeded();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCommandStack#leftSaveIsDone()
+ */
+ public void leftSaveIsDone() {
+ leftCommandStack.saveIsDone();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.command.ICompareCommandStack#rightSaveIsDone()
+ */
+ public void rightSaveIsDone() {
+ rightCommandStack.saveIsDone();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/MergeCommand.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/MergeCommand.java
index cfed3f80e..1bfa27aff 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/MergeCommand.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/command/impl/MergeCommand.java
@@ -1,67 +1,67 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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.command.impl;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.domain.IMergeRunnable;
-import org.eclipse.emf.compare.merge.IMerger;
-import org.eclipse.emf.ecore.change.util.ChangeRecorder;
-
-/**
- * A merge command that delegates it {@link #doExecute()} to the
- * {@link IMergeRunnable#merge(List, boolean, IMerger.Registry)} method.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- * @since 4.0
- */
-public class MergeCommand extends AbstractCopyCommand {
-
- /** The merge runnable to delegate to. */
- private final IMergeRunnable runnable;
-
- /**
- * Creates a new instance.
- *
- * @param changeRecorder
- * The change recorder associated to this command.
- * @param notifiers
- * The collection of notifiers that will be notified of this command's execution.
- * @param differences
- * The list of differences that this command should merge.
- * @param leftToRight
- * The direction in which {@code differences} should be merged.
- * @param mergerRegistry
- * The registry of mergers.
- * @param runnable
- * The merge runnable to delegate to.
- */
- public MergeCommand(ChangeRecorder changeRecorder, Collection<Notifier> notifiers,
- List<? extends Diff> differences, boolean leftToRight, IMerger.Registry mergerRegistry,
- IMergeRunnable runnable) {
- super(changeRecorder, notifiers, differences, leftToRight, mergerRegistry);
- this.runnable = runnable;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.command.ChangeCommand#doExecute()
- */
- @Override
- protected void doExecute() {
- runnable.merge(differences, leftToRight, mergerRegistry);
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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.command.impl;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.domain.IMergeRunnable;
+import org.eclipse.emf.compare.merge.IMerger;
+import org.eclipse.emf.ecore.change.util.ChangeRecorder;
+
+/**
+ * A merge command that delegates it {@link #doExecute()} to the
+ * {@link IMergeRunnable#merge(List, boolean, IMerger.Registry)} method.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ * @since 4.0
+ */
+public class MergeCommand extends AbstractCopyCommand {
+
+ /** The merge runnable to delegate to. */
+ private final IMergeRunnable runnable;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param changeRecorder
+ * The change recorder associated to this command.
+ * @param notifiers
+ * The collection of notifiers that will be notified of this command's execution.
+ * @param differences
+ * The list of differences that this command should merge.
+ * @param leftToRight
+ * The direction in which {@code differences} should be merged.
+ * @param mergerRegistry
+ * The registry of mergers.
+ * @param runnable
+ * The merge runnable to delegate to.
+ */
+ public MergeCommand(ChangeRecorder changeRecorder, Collection<Notifier> notifiers,
+ List<? extends Diff> differences, boolean leftToRight, IMerger.Registry mergerRegistry,
+ IMergeRunnable runnable) {
+ super(changeRecorder, notifiers, differences, leftToRight, mergerRegistry);
+ this.runnable = runnable;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.command.ChangeCommand#doExecute()
+ */
+ @Override
+ protected void doExecute() {
+ runnable.merge(differences, leftToRight, mergerRegistry);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/domain/IMergeRunnable.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/domain/IMergeRunnable.java
index b09d08c2f..dbc10c7ba 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/domain/IMergeRunnable.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/domain/IMergeRunnable.java
@@ -1,39 +1,39 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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.domain;
-
-import java.util.List;
-
-import org.eclipse.emf.compare.Diff;
-import org.eclipse.emf.compare.merge.IMerger.Registry;
-
-/**
- * Interface for executing merge commands from the {@link ICompareEditingDomain}.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- * @since 4.0
- */
-public interface IMergeRunnable {
-
- /**
- * Execute the merge operation.
- *
- * @param differences
- * the differences to merge.
- * @param leftToRight
- * whether the merge has to be merge from left to right or right to left.
- * @param mergerRegistry
- * the merger registry to query to get the appropriate mergers for each difference to be
- * merged.
- */
- void merge(List<? extends Diff> differences, boolean leftToRight, Registry mergerRegistry);
-
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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.domain;
+
+import java.util.List;
+
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.merge.IMerger.Registry;
+
+/**
+ * Interface for executing merge commands from the {@link ICompareEditingDomain}.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ * @since 4.0
+ */
+public interface IMergeRunnable {
+
+ /**
+ * Execute the merge operation.
+ *
+ * @param differences
+ * the differences to merge.
+ * @param leftToRight
+ * whether the merge has to be merge from left to right or right to left.
+ * @param mergerRegistry
+ * the merger registry to query to get the appropriate mergers for each difference to be
+ * merged.
+ */
+ void merge(List<? extends Diff> differences, boolean leftToRight, Registry mergerRegistry);
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedAdapterFactoryItemDelegator.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedAdapterFactoryItemDelegator.java
index 7f463544b..d828475fb 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedAdapterFactoryItemDelegator.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedAdapterFactoryItemDelegator.java
@@ -1,84 +1,84 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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.provider;
-
-import static com.google.common.collect.Iterables.isEmpty;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.compare.provider.utils.ComposedStyledString;
-import org.eclipse.emf.compare.provider.utils.IStyledString;
-import org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString;
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
-
-/**
- * An item provider adapter factory delegator that supports our custom item provider interfaces:
- * {@link IItemStyledLabelProvider} and {@link IItemDescriptionProvider}.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- * @since 4.0
- */
-public class ExtendedAdapterFactoryItemDelegator extends AdapterFactoryItemDelegator implements IItemStyledLabelProvider, IItemDescriptionProvider {
-
- /**
- * Creates a new instance that will use the given adapter factory to respond to its implemented protocol.
- *
- * @param adapterFactory
- * the adapter factory use to adapt.
- */
- public ExtendedAdapterFactoryItemDelegator(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.provider.IItemDescriptionProvider#getDescription(java.lang.Object)
- */
- public String getDescription(Object object) {
- return getText(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.provider.IItemStyledLabelProvider#getStyledText(java.lang.Object)
- */
- public IComposedStyledString getStyledText(Object object) {
- final IComposedStyledString result;
- if (object instanceof EList<?>) {
- result = new ComposedStyledString();
- for (Object child : (List<?>)object) {
- if (!isEmpty(result)) {
- result.append(", "); //$NON-NLS-1$
- }
- IComposedStyledString styledText = getStyledText(child);
- for (IStyledString styledString : styledText) {
- result.append(styledString.getString(), styledString.getStyle());
- }
- }
- } else {
- IItemStyledLabelProvider itemStyledLabelProvider = (IItemStyledLabelProvider)adapterFactory
- .adapt(object, IItemStyledLabelProvider.class);
-
- if (itemStyledLabelProvider != null) {
- result = itemStyledLabelProvider.getStyledText(object);
- } else if (object == null) {
- result = new ComposedStyledString();
- } else {
- result = new ComposedStyledString(getText(object));
- }
- }
- return result;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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.provider;
+
+import static com.google.common.collect.Iterables.isEmpty;
+
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.compare.provider.utils.ComposedStyledString;
+import org.eclipse.emf.compare.provider.utils.IStyledString;
+import org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+
+/**
+ * An item provider adapter factory delegator that supports our custom item provider interfaces:
+ * {@link IItemStyledLabelProvider} and {@link IItemDescriptionProvider}.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ * @since 4.0
+ */
+public class ExtendedAdapterFactoryItemDelegator extends AdapterFactoryItemDelegator implements IItemStyledLabelProvider, IItemDescriptionProvider {
+
+ /**
+ * Creates a new instance that will use the given adapter factory to respond to its implemented protocol.
+ *
+ * @param adapterFactory
+ * the adapter factory use to adapt.
+ */
+ public ExtendedAdapterFactoryItemDelegator(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.provider.IItemDescriptionProvider#getDescription(java.lang.Object)
+ */
+ public String getDescription(Object object) {
+ return getText(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.provider.IItemStyledLabelProvider#getStyledText(java.lang.Object)
+ */
+ public IComposedStyledString getStyledText(Object object) {
+ final IComposedStyledString result;
+ if (object instanceof EList<?>) {
+ result = new ComposedStyledString();
+ for (Object child : (List<?>)object) {
+ if (!isEmpty(result)) {
+ result.append(", "); //$NON-NLS-1$
+ }
+ IComposedStyledString styledText = getStyledText(child);
+ for (IStyledString styledString : styledText) {
+ result.append(styledString.getString(), styledString.getStyle());
+ }
+ }
+ } else {
+ IItemStyledLabelProvider itemStyledLabelProvider = (IItemStyledLabelProvider)adapterFactory
+ .adapt(object, IItemStyledLabelProvider.class);
+
+ if (itemStyledLabelProvider != null) {
+ result = itemStyledLabelProvider.getStyledText(object);
+ } else if (object == null) {
+ result = new ComposedStyledString();
+ } else {
+ result = new ComposedStyledString(getText(object));
+ }
+ }
+ return result;
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedItemProviderDecorator.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedItemProviderDecorator.java
index 856db7d7d..55eb3c040 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedItemProviderDecorator.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ExtendedItemProviderDecorator.java
@@ -1,113 +1,113 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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.provider;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.compare.provider.spec.OverlayImageProvider;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ItemProviderDecorator;
-
-/**
- * And extended {@link ItemProviderDecorator} that provides an {@link OverlayImageProvider} and and
- * {@link ExtendedAdapterFactoryItemDelegator}.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- * @since 4.0
- */
-public class ExtendedItemProviderDecorator extends ItemProviderDecorator implements Adapter.Internal {
-
- /** The item delegator to reuse root adapter factory (if any). */
- private final ExtendedAdapterFactoryItemDelegator itemDelegator;
-
- /** The image provider used with this item provider. */
- private final OverlayImageProvider overlayProvider;
-
- /** The list of target notifier we are installed on. */
- private final List<Notifier> targets;
-
- /**
- * An instance is created from an adapter factory. The factory is used as a key so that we always know
- * which factory created this adapter.
- *
- * @param adapterFactory
- * the adapter factory to use to adapt.
- */
- public ExtendedItemProviderDecorator(ComposeableAdapterFactory adapterFactory) {
- super(adapterFactory);
- itemDelegator = new ExtendedAdapterFactoryItemDelegator(adapterFactory.getRootAdapterFactory());
- overlayProvider = new OverlayImageProvider(EMFCompareEditPlugin.INSTANCE.getPluginResourceLocator());
- targets = new BasicEList.FastCompare<Notifier>();
- }
-
- /**
- * Returns the overlay provider.
- *
- * @return the overlayProvider
- */
- protected OverlayImageProvider getOverlayProvider() {
- return overlayProvider;
- }
-
- /**
- * Returns the itemDelegator.
- *
- * @return the itemDelegator
- */
- protected ExtendedAdapterFactoryItemDelegator getItemDelegator() {
- return itemDelegator;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#getTarget()
- */
- public Notifier getTarget() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier)
- */
- public void setTarget(Notifier newTarget) {
- targets.add(newTarget);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter.Internal#unsetTarget(org.eclipse.emf.common.notify.Notifier)
- */
- public void unsetTarget(Notifier oldTarget) {
- targets.remove(oldTarget);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderDecorator#dispose()
- */
- @Override
- public void dispose() {
- for (Notifier otherTarget : targets) {
- otherTarget.eAdapters().remove(this);
- }
- targets.clear();
-
- super.dispose();
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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.provider;
+
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.compare.provider.spec.OverlayImageProvider;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ItemProviderDecorator;
+
+/**
+ * And extended {@link ItemProviderDecorator} that provides an {@link OverlayImageProvider} and and
+ * {@link ExtendedAdapterFactoryItemDelegator}.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ * @since 4.0
+ */
+public class ExtendedItemProviderDecorator extends ItemProviderDecorator implements Adapter.Internal {
+
+ /** The item delegator to reuse root adapter factory (if any). */
+ private final ExtendedAdapterFactoryItemDelegator itemDelegator;
+
+ /** The image provider used with this item provider. */
+ private final OverlayImageProvider overlayProvider;
+
+ /** The list of target notifier we are installed on. */
+ private final List<Notifier> targets;
+
+ /**
+ * An instance is created from an adapter factory. The factory is used as a key so that we always know
+ * which factory created this adapter.
+ *
+ * @param adapterFactory
+ * the adapter factory to use to adapt.
+ */
+ public ExtendedItemProviderDecorator(ComposeableAdapterFactory adapterFactory) {
+ super(adapterFactory);
+ itemDelegator = new ExtendedAdapterFactoryItemDelegator(adapterFactory.getRootAdapterFactory());
+ overlayProvider = new OverlayImageProvider(EMFCompareEditPlugin.INSTANCE.getPluginResourceLocator());
+ targets = new BasicEList.FastCompare<Notifier>();
+ }
+
+ /**
+ * Returns the overlay provider.
+ *
+ * @return the overlayProvider
+ */
+ protected OverlayImageProvider getOverlayProvider() {
+ return overlayProvider;
+ }
+
+ /**
+ * Returns the itemDelegator.
+ *
+ * @return the itemDelegator
+ */
+ protected ExtendedAdapterFactoryItemDelegator getItemDelegator() {
+ return itemDelegator;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#getTarget()
+ */
+ public Notifier getTarget() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier)
+ */
+ public void setTarget(Notifier newTarget) {
+ targets.add(newTarget);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.notify.Adapter.Internal#unsetTarget(org.eclipse.emf.common.notify.Notifier)
+ */
+ public void unsetTarget(Notifier oldTarget) {
+ targets.remove(oldTarget);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.ItemProviderDecorator#dispose()
+ */
+ @Override
+ public void dispose() {
+ for (Notifier otherTarget : targets) {
+ otherTarget.eAdapters().remove(this);
+ }
+ targets.clear();
+
+ super.dispose();
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ForwardingItemProvider.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ForwardingItemProvider.java
index 33d1c9841..d950dd463 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ForwardingItemProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/ForwardingItemProvider.java
@@ -1,411 +1,411 @@
-/*******************************************************************************
- * 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.provider;
-
-import java.net.URL;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.command.CreateChildCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.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.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-
-/**
- * A simple implementation that forward every call to a delegating instance.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- * @deprecated Use {@link org.eclipse.emf.edit.provider.IItemProviderDecorator} and
- * {@link org.eclipse.emf.edit.provider.DecoratorAdapterFactory} instead.
- */
-@Deprecated
-public class ForwardingItemProvider implements Adapter.Internal, IChangeNotifier, IDisposable, CreateChildCommand.Helper, ResourceLocator, IEditingDomainItemProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
-
- /** The instance to delegate to. */
- private final ItemProviderAdapter fDelegate;
-
- /**
- * Creates a new instance that delegate to the given object.
- *
- * @param delegate
- * the object to delegate to.
- */
- public ForwardingItemProvider(ItemProviderAdapter delegate) {
- this.fDelegate = delegate;
- }
-
- /**
- * Returns the object to delegate to.
- *
- * @return the object to delegate to.
- */
- protected ItemProviderAdapter delegate() {
- return fDelegate;
- }
-
- /**
- * This provides access to the factory.
- *
- * @return the adapter factory.
- */
- public AdapterFactory getAdapterFactory() {
- return delegate().getAdapterFactory();
- }
-
- /**
- * This convenience method returns the first adapter factory that doesn't have a parent, i.e., the root.
- *
- * @return the first adapter factory that doesn't have a parent, i.e., the root.
- */
- protected AdapterFactory getRootAdapterFactory() {
- if (delegate().getAdapterFactory() instanceof ComposeableAdapterFactory) {
- return ((ComposeableAdapterFactory)delegate().getAdapterFactory()).getRootAdapterFactory();
- }
-
- return delegate().getAdapterFactory();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
- delegate().notifyChanged(notification);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#getTarget()
- */
- public Notifier getTarget() {
- return delegate().getTarget();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier)
- */
- public void setTarget(Notifier newTarget) {
- delegate().setTarget(newTarget);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(java.lang.Object)
- */
- public boolean isAdapterForType(Object type) {
- return delegate().isAdapterForType(type);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IItemPropertySource#getPropertyDescriptors(java.lang.Object)
- */
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- return delegate().getPropertyDescriptors(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IItemPropertySource#getPropertyDescriptor(java.lang.Object,
- * java.lang.Object)
- */
- public IItemPropertyDescriptor getPropertyDescriptor(Object object, Object propertyID) {
- return delegate().getPropertyDescriptor(object, propertyID);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IItemPropertySource#getEditableValue(java.lang.Object)
- */
- public Object getEditableValue(Object object) {
- return delegate().getEditableValue(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(java.lang.Object)
- */
- public String getText(Object object) {
- return delegate().getText(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getImage(java.lang.Object)
- */
- public Object getImage(Object object) {
- return delegate().getImage(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return delegate().hasChildren(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IStructuredItemContentProvider#getElements(java.lang.Object)
- */
- public Collection<?> getElements(Object object) {
- return delegate().getElements(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#getChildren(java.lang.Object)
- */
- public Collection<?> getChildren(Object object) {
- return delegate().getChildren(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return delegate().getParent(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#getNewChildDescriptors(java.lang.Object,
- * org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object)
- */
- public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain, Object sibling) {
- return delegate().getNewChildDescriptors(object, editingDomain, sibling);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#createCommand(java.lang.Object,
- * org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class,
- * org.eclipse.emf.edit.command.CommandParameter)
- */
- public Command createCommand(Object object, EditingDomain editingDomain,
- Class<? extends Command> commandClass, CommandParameter commandParameter) {
- return delegate().createCommand(object, editingDomain, commandClass, commandParameter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.util.ResourceLocator#getBaseURL()
- */
- public URL getBaseURL() {
- return delegate().getBaseURL();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.util.ResourceLocator#getImage(java.lang.String)
- */
- public Object getImage(String key) {
- return delegate().getImage(key);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.util.ResourceLocator#getString(java.lang.String)
- */
- public String getString(String key) {
- return delegate().getString(key);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.util.ResourceLocator#getString(java.lang.String, boolean)
- */
- public String getString(String key, boolean translate) {
- return delegate().getString(key, translate);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.util.ResourceLocator#getString(java.lang.String, java.lang.Object[])
- */
- public String getString(String key, Object[] substitutions) {
- return delegate().getString(key, substitutions);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.util.ResourceLocator#getString(java.lang.String, java.lang.Object[],
- * boolean)
- */
- public String getString(String key, Object[] substitutions, boolean translate) {
- return delegate().getString(key, substitutions, translate);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildResult(java.lang.Object)
- */
- public Collection<?> getCreateChildResult(Object child) {
- return delegate().getCreateChildResult(child);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildText(java.lang.Object,
- * java.lang.Object, java.lang.Object, java.util.Collection)
- */
- public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
- return delegate().getCreateChildText(owner, feature, child, selection);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildDescription(java.lang.Object,
- * java.lang.Object, java.lang.Object, java.util.Collection)
- */
- public String getCreateChildDescription(Object owner, Object feature, Object child,
- Collection<?> selection) {
- return delegate().getCreateChildDescription(owner, feature, child, selection);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildToolTipText(java.lang.Object,
- * java.lang.Object, java.lang.Object, java.util.Collection)
- */
- public String getCreateChildToolTipText(Object owner, Object feature, Object child,
- Collection<?> selection) {
- return delegate().getCreateChildToolTipText(owner, feature, child, selection);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildImage(java.lang.Object,
- * java.lang.Object, java.lang.Object, java.util.Collection)
- */
- public Object getCreateChildImage(Object owner, Object feature, Object child, Collection<?> selection) {
- return delegate().getCreateChildImage(owner, feature, child, selection);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IDisposable#dispose()
- */
- public void dispose() {
- delegate().dispose();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IChangeNotifier#fireNotifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void fireNotifyChanged(Notification notification) {
- delegate().fireNotifyChanged(notification);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IChangeNotifier#addListener(org.eclipse.emf.edit.provider.INotifyChangedListener)
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- delegate().addListener(notifyChangedListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IChangeNotifier#removeListener(org.eclipse.emf.edit.provider.INotifyChangedListener)
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- delegate().removeListener(notifyChangedListener);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.common.notify.Adapter.Internal#unsetTarget(org.eclipse.emf.common.notify.Notifier)
- */
- public void unsetTarget(Notifier oldTarget) {
- delegate().unsetTarget(oldTarget);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IItemFontProvider#getFont(java.lang.Object)
- */
- public Object getFont(Object object) {
- return delegate().getFont(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IItemColorProvider#getForeground(java.lang.Object)
- */
- public Object getForeground(Object object) {
- return delegate().getForeground(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.edit.provider.IItemColorProvider#getBackground(java.lang.Object)
- */
- public Object getBackground(Object object) {
- return delegate().getBackground(object);
- }
-
-}
+/*******************************************************************************
+ * 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.provider;
+
+import java.net.URL;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.command.CreateChildCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.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.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * A simple implementation that forward every call to a delegating instance.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ * @deprecated Use {@link org.eclipse.emf.edit.provider.IItemProviderDecorator} and
+ * {@link org.eclipse.emf.edit.provider.DecoratorAdapterFactory} instead.
+ */
+@Deprecated
+public class ForwardingItemProvider implements Adapter.Internal, IChangeNotifier, IDisposable, CreateChildCommand.Helper, ResourceLocator, IEditingDomainItemProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IItemColorProvider, IItemFontProvider {
+
+ /** The instance to delegate to. */
+ private final ItemProviderAdapter fDelegate;
+
+ /**
+ * Creates a new instance that delegate to the given object.
+ *
+ * @param delegate
+ * the object to delegate to.
+ */
+ public ForwardingItemProvider(ItemProviderAdapter delegate) {
+ this.fDelegate = delegate;
+ }
+
+ /**
+ * Returns the object to delegate to.
+ *
+ * @return the object to delegate to.
+ */
+ protected ItemProviderAdapter delegate() {
+ return fDelegate;
+ }
+
+ /**
+ * This provides access to the factory.
+ *
+ * @return the adapter factory.
+ */
+ public AdapterFactory getAdapterFactory() {
+ return delegate().getAdapterFactory();
+ }
+
+ /**
+ * This convenience method returns the first adapter factory that doesn't have a parent, i.e., the root.
+ *
+ * @return the first adapter factory that doesn't have a parent, i.e., the root.
+ */
+ protected AdapterFactory getRootAdapterFactory() {
+ if (delegate().getAdapterFactory() instanceof ComposeableAdapterFactory) {
+ return ((ComposeableAdapterFactory)delegate().getAdapterFactory()).getRootAdapterFactory();
+ }
+
+ return delegate().getAdapterFactory();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
+ public void notifyChanged(Notification notification) {
+ delegate().notifyChanged(notification);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#getTarget()
+ */
+ public Notifier getTarget() {
+ return delegate().getTarget();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier)
+ */
+ public void setTarget(Notifier newTarget) {
+ delegate().setTarget(newTarget);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(java.lang.Object)
+ */
+ public boolean isAdapterForType(Object type) {
+ return delegate().isAdapterForType(type);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IItemPropertySource#getPropertyDescriptors(java.lang.Object)
+ */
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ return delegate().getPropertyDescriptors(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IItemPropertySource#getPropertyDescriptor(java.lang.Object,
+ * java.lang.Object)
+ */
+ public IItemPropertyDescriptor getPropertyDescriptor(Object object, Object propertyID) {
+ return delegate().getPropertyDescriptor(object, propertyID);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IItemPropertySource#getEditableValue(java.lang.Object)
+ */
+ public Object getEditableValue(Object object) {
+ return delegate().getEditableValue(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(java.lang.Object)
+ */
+ public String getText(Object object) {
+ return delegate().getText(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getImage(java.lang.Object)
+ */
+ public Object getImage(Object object) {
+ return delegate().getImage(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object object) {
+ return delegate().hasChildren(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IStructuredItemContentProvider#getElements(java.lang.Object)
+ */
+ public Collection<?> getElements(Object object) {
+ return delegate().getElements(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#getChildren(java.lang.Object)
+ */
+ public Collection<?> getChildren(Object object) {
+ return delegate().getChildren(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object object) {
+ return delegate().getParent(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#getNewChildDescriptors(java.lang.Object,
+ * org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object)
+ */
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain, Object sibling) {
+ return delegate().getNewChildDescriptors(object, editingDomain, sibling);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#createCommand(java.lang.Object,
+ * org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class,
+ * org.eclipse.emf.edit.command.CommandParameter)
+ */
+ public Command createCommand(Object object, EditingDomain editingDomain,
+ Class<? extends Command> commandClass, CommandParameter commandParameter) {
+ return delegate().createCommand(object, editingDomain, commandClass, commandParameter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.util.ResourceLocator#getBaseURL()
+ */
+ public URL getBaseURL() {
+ return delegate().getBaseURL();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.util.ResourceLocator#getImage(java.lang.String)
+ */
+ public Object getImage(String key) {
+ return delegate().getImage(key);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.util.ResourceLocator#getString(java.lang.String)
+ */
+ public String getString(String key) {
+ return delegate().getString(key);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.util.ResourceLocator#getString(java.lang.String, boolean)
+ */
+ public String getString(String key, boolean translate) {
+ return delegate().getString(key, translate);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.util.ResourceLocator#getString(java.lang.String, java.lang.Object[])
+ */
+ public String getString(String key, Object[] substitutions) {
+ return delegate().getString(key, substitutions);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.util.ResourceLocator#getString(java.lang.String, java.lang.Object[],
+ * boolean)
+ */
+ public String getString(String key, Object[] substitutions, boolean translate) {
+ return delegate().getString(key, substitutions, translate);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildResult(java.lang.Object)
+ */
+ public Collection<?> getCreateChildResult(Object child) {
+ return delegate().getCreateChildResult(child);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildText(java.lang.Object,
+ * java.lang.Object, java.lang.Object, java.util.Collection)
+ */
+ public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
+ return delegate().getCreateChildText(owner, feature, child, selection);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildDescription(java.lang.Object,
+ * java.lang.Object, java.lang.Object, java.util.Collection)
+ */
+ public String getCreateChildDescription(Object owner, Object feature, Object child,
+ Collection<?> selection) {
+ return delegate().getCreateChildDescription(owner, feature, child, selection);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildToolTipText(java.lang.Object,
+ * java.lang.Object, java.lang.Object, java.util.Collection)
+ */
+ public String getCreateChildToolTipText(Object owner, Object feature, Object child,
+ Collection<?> selection) {
+ return delegate().getCreateChildToolTipText(owner, feature, child, selection);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.command.CreateChildCommand.Helper#getCreateChildImage(java.lang.Object,
+ * java.lang.Object, java.lang.Object, java.util.Collection)
+ */
+ public Object getCreateChildImage(Object owner, Object feature, Object child, Collection<?> selection) {
+ return delegate().getCreateChildImage(owner, feature, child, selection);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IDisposable#dispose()
+ */
+ public void dispose() {
+ delegate().dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IChangeNotifier#fireNotifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
+ public void fireNotifyChanged(Notification notification) {
+ delegate().fireNotifyChanged(notification);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IChangeNotifier#addListener(org.eclipse.emf.edit.provider.INotifyChangedListener)
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ delegate().addListener(notifyChangedListener);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IChangeNotifier#removeListener(org.eclipse.emf.edit.provider.INotifyChangedListener)
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ delegate().removeListener(notifyChangedListener);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.common.notify.Adapter.Internal#unsetTarget(org.eclipse.emf.common.notify.Notifier)
+ */
+ public void unsetTarget(Notifier oldTarget) {
+ delegate().unsetTarget(oldTarget);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IItemFontProvider#getFont(java.lang.Object)
+ */
+ public Object getFont(Object object) {
+ return delegate().getFont(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IItemColorProvider#getForeground(java.lang.Object)
+ */
+ public Object getForeground(Object object) {
+ return delegate().getForeground(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.edit.provider.IItemColorProvider#getBackground(java.lang.Object)
+ */
+ public Object getBackground(Object object) {
+ return delegate().getBackground(object);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/Strings.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/Strings.java
index f45d086ee..b08f9b7bc 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/Strings.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/spec/Strings.java
@@ -1,47 +1,47 @@
-/*******************************************************************************
- * 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.provider.spec;
-
-/**
- * Utility class for {@link String}s objects.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public final class Strings {
-
- /**
- * Private constructor to avoid instantiation.
- */
- private Strings() {
- }
-
- /**
- * Shorten the given {@code original} string and append the given {@code suffix} if it is longest than the
- * defined {@code max} length minus the length of the {@code suffix}.
- * <p>
- * The returned String length will always be in {@code Math.min(original.length, max)}.
- *
- * @param original
- * the original string to elide if necessary.
- * @param max
- * the maximum length of the returned string.
- * @param suffix
- * the suffix to append in case the original String is too long.
- * @return the elided string or the original string.
- */
- public static String elide(String original, int max, String suffix) {
- if (original.length() > max) {
- String elided = original.substring(0, max - suffix.length());
- return elided + suffix;
- }
- return original;
- }
-}
+/*******************************************************************************
+ * 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.provider.spec;
+
+/**
+ * Utility class for {@link String}s objects.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public final class Strings {
+
+ /**
+ * Private constructor to avoid instantiation.
+ */
+ private Strings() {
+ }
+
+ /**
+ * Shorten the given {@code original} string and append the given {@code suffix} if it is longest than the
+ * defined {@code max} length minus the length of the {@code suffix}.
+ * <p>
+ * The returned String length will always be in {@code Math.min(original.length, max)}.
+ *
+ * @param original
+ * the original string to elide if necessary.
+ * @param max
+ * the maximum length of the returned string.
+ * @param suffix
+ * the suffix to append in case the original String is too long.
+ * @return the elided string or the original string.
+ */
+ public static String elide(String original, int max, String suffix) {
+ if (original.length() > max) {
+ String elided = original.substring(0, max - suffix.length());
+ return elided + suffix;
+ }
+ return original;
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/ComposedStyledString.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/ComposedStyledString.java
index 3fd33e513..da1cb2614 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/ComposedStyledString.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/ComposedStyledString.java
@@ -1,158 +1,158 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2014 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.provider.utils;
-
-import static com.google.common.collect.Lists.newArrayList;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString;
-import org.eclipse.emf.compare.provider.utils.IStyledString.Style;
-
-/**
- * Composed styled string implementation backed by an {@link java.util.ArrayList}.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public class ComposedStyledString implements IComposedStyledString {
-
- /** the backing list. */
- private final List<IStyledString> content;
-
- /** Creates a new empty instance. */
- public ComposedStyledString() {
- content = newArrayList();
- }
-
- /**
- * Creates a new instance with the given text without style.
- *
- * @param text
- * the text.
- */
- public ComposedStyledString(String text) {
- this(text, Style.NO_STYLE);
- }
-
- /**
- * Creates a new instance with the given text and the given style.
- *
- * @param text
- * the text.
- * @param style
- * the style of the text.
- */
- public ComposedStyledString(String text, Style style) {
- this();
- append(text, style);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString#getString()
- */
- public String getString() {
- StringBuilder sb = new StringBuilder();
- for (IStyledString styledString : this) {
- sb.append(styledString.getString());
- }
- return sb.toString();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString#append(java.lang.String)
- */
- public IComposedStyledString append(String str) {
- content.add(new StyledString(str, IStyledString.Style.NO_STYLE));
- return this;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString#append(java.lang.String,
- * org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString.Style)
- */
- public IComposedStyledString append(String str, Style style) {
- content.add(new StyledString(str, style));
- return this;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString#append(org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString)
- * @since 4.0
- */
- public IComposedStyledString append(IComposedStyledString composedStyledString) {
- for (IStyledString styledString : composedStyledString) {
- content.add(styledString);
- }
- return this;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Iterable#iterator()
- */
- public Iterator<IStyledString> iterator() {
- return content.iterator();
- }
-
- /**
- * Private implementation of {@link IStyledString} backed by the tuple String and Style.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
- private static final class StyledString implements IStyledString {
- /** The string. */
- private final String str;
-
- /** The style. */
- private final Style style;
-
- /**
- * Creates a new styled string.
- *
- * @param str
- * the text value
- * @param style
- * the style.
- */
- StyledString(String str, Style style) {
- this.str = str;
- this.style = style;
- }
-
- /**
- * Returns the string value.
- *
- * @return the string value.
- */
- public String getString() {
- return str;
- }
-
- /**
- * Returns the style.
- *
- * @return the style.
- */
- public Style getStyle() {
- return style;
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 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.provider.utils;
+
+import static com.google.common.collect.Lists.newArrayList;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString;
+import org.eclipse.emf.compare.provider.utils.IStyledString.Style;
+
+/**
+ * Composed styled string implementation backed by an {@link java.util.ArrayList}.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class ComposedStyledString implements IComposedStyledString {
+
+ /** the backing list. */
+ private final List<IStyledString> content;
+
+ /** Creates a new empty instance. */
+ public ComposedStyledString() {
+ content = newArrayList();
+ }
+
+ /**
+ * Creates a new instance with the given text without style.
+ *
+ * @param text
+ * the text.
+ */
+ public ComposedStyledString(String text) {
+ this(text, Style.NO_STYLE);
+ }
+
+ /**
+ * Creates a new instance with the given text and the given style.
+ *
+ * @param text
+ * the text.
+ * @param style
+ * the style of the text.
+ */
+ public ComposedStyledString(String text, Style style) {
+ this();
+ append(text, style);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString#getString()
+ */
+ public String getString() {
+ StringBuilder sb = new StringBuilder();
+ for (IStyledString styledString : this) {
+ sb.append(styledString.getString());
+ }
+ return sb.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString#append(java.lang.String)
+ */
+ public IComposedStyledString append(String str) {
+ content.add(new StyledString(str, IStyledString.Style.NO_STYLE));
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString#append(java.lang.String,
+ * org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString.Style)
+ */
+ public IComposedStyledString append(String str, Style style) {
+ content.add(new StyledString(str, style));
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString#append(org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString)
+ * @since 4.0
+ */
+ public IComposedStyledString append(IComposedStyledString composedStyledString) {
+ for (IStyledString styledString : composedStyledString) {
+ content.add(styledString);
+ }
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Iterable#iterator()
+ */
+ public Iterator<IStyledString> iterator() {
+ return content.iterator();
+ }
+
+ /**
+ * Private implementation of {@link IStyledString} backed by the tuple String and Style.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+ private static final class StyledString implements IStyledString {
+ /** The string. */
+ private final String str;
+
+ /** The style. */
+ private final Style style;
+
+ /**
+ * Creates a new styled string.
+ *
+ * @param str
+ * the text value
+ * @param style
+ * the style.
+ */
+ StyledString(String str, Style style) {
+ this.str = str;
+ this.style = style;
+ }
+
+ /**
+ * Returns the string value.
+ *
+ * @return the string value.
+ */
+ public String getString() {
+ return str;
+ }
+
+ /**
+ * Returns the style.
+ *
+ * @return the style.
+ */
+ public Style getStyle() {
+ return style;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/IStyledString.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/IStyledString.java
index e946d60da..2024fe915 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/IStyledString.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/provider/utils/IStyledString.java
@@ -1,423 +1,423 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2014 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.provider.utils;
-
-import org.eclipse.emf.common.util.URI;
-
-/**
- * Utility class that mimics the JFace's StyledString.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
-public interface IStyledString {
-
- /**
- * Returns the Java string for this styled string.
- *
- * @return the Java string for this styled string.
- */
- String getString();
-
- /**
- * Returns the style associated with this string.
- *
- * @return the style associated with this string.
- */
- Style getStyle();
-
- /**
- * An iterable of {@link IStyledString}. It is appendable.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
- interface IComposedStyledString extends Iterable<IStyledString> {
-
- /**
- * Append the given string with no style.
- *
- * @param str
- * the string to append.
- * @return this instance to let you chain the calls.
- */
- IComposedStyledString append(String str);
-
- /**
- * Append the given string with the given style.
- *
- * @param str
- * the string to append.
- * @param style
- * the style of the appended string.
- * @return this instance to let you chain the calls.
- */
- IComposedStyledString append(String str, Style style);
-
- /**
- * Appends the given composed styled string to this.
- *
- * @param composedStyledString
- * the styled string to append.
- * @return this instance.
- * @since 4.0
- */
- IComposedStyledString append(IComposedStyledString composedStyledString);
-
- /**
- * Returns the Java string for this composed styled string.
- *
- * @return the Java string for this composed styled string.
- */
- String getString();
- }
-
- /**
- * A style class for {@link IStyledString}.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
- public static final class Style {
-
- /** Instance that represent a default unstyled string. */
- public static final Style NO_STYLE = new Style(null, null, null, false, null, null, null, null, null);
-
- /** Constant that will eventually map to org.eclipse.jface.viewers.StyledString.QUALIFIER_STYLER. */
- public static final Style QUALIFIER_STYLER = new Style(null, null, null, false, null, null, null,
- null, null);
-
- /** Constant that will eventually map to org.eclipse.jface.viewers.StyledString.COUNTER_STYLER. */
- public static final Style COUNTER_STYLER = new Style(null, null, null, false, null, null, null, null,
- null);
-
- /** Constant that will eventually map to org.eclipse.jface.viewers.StyledString.DECORATIONS_STYLER. */
- public static final Style DECORATIONS_STYLER = new Style(null, null, null, false, null, null, null,
- null, null);
-
- /** The font URI. */
- private final URI font;
-
- /** The background color URI. */
- private final URI backgroundColor;
-
- /** The foreground color URI. */
- private final URI foregroundColor;
-
- /** Is the string strikedout. */
- private final boolean isStrikedout;
-
- /** The strikeout color URI. */
- private final URI strikeoutColor;
-
- /** The style of the underline. */
- private final UnderLineStyle underlineStyle;
-
- /** The underline color URI. */
- private final URI underlineColor;
-
- /** The border style. */
- private final BorderStyle borderStyle;
-
- /** The border color URI. */
- private final URI borderColor;
-
- /**
- * Creates a new instance with the given values for each component of this style.
- *
- * @param font
- * the font
- * @param backgroundColor
- * the background color
- * @param foregroundColor
- * the foreground color
- * @param isStrikedout
- * whether to strikedout the text
- * @param strikeoutColor
- * the color of the strikedout
- * @param underlineStyle
- * the style of the underline
- * @param underlineColor
- * the color of the underline
- * @param borderStyle
- * the style of the border
- * @param borderColor
- * the color of the border
- */
- // CHECKSTYLE:OFF private method
- private Style(URI font, URI backgroundColor, URI foregroundColor, boolean isStrikedout,
- URI strikeoutColor, UnderLineStyle underlineStyle, URI underlineColor,
- BorderStyle borderStyle, URI borderColor) {
- // CHECKSTYLE:ON
- this.font = font;
- this.backgroundColor = backgroundColor;
- this.foregroundColor = foregroundColor;
- this.isStrikedout = isStrikedout;
- this.strikeoutColor = strikeoutColor;
- this.underlineStyle = underlineStyle;
- this.underlineColor = underlineColor;
- this.borderStyle = borderStyle;
- this.borderColor = borderColor;
- }
-
- public URI getFont() {
- return font;
- }
-
- public URI getBackgoundColor() {
- return backgroundColor;
- }
-
- public URI getForegroundColor() {
- return foregroundColor;
- }
-
- public boolean isStrikedout() {
- return isStrikedout;
- }
-
- public URI getStrikeoutColor() {
- return strikeoutColor;
- }
-
- public UnderLineStyle getUnderlineStyle() {
- return underlineStyle;
- }
-
- public URI getUnderlineColor() {
- return underlineColor;
- }
-
- public BorderStyle getBorderStyle() {
- return borderStyle;
- }
-
- public URI getBorderColor() {
- return borderColor;
- }
-
- /**
- * The possible styles of the underline. These are those supported by JFace 3.8. Other versions or
- * other widgets toolkit may not support all of these or may support more than these.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
- public static enum UnderLineStyle {
- /** No underline. */
- NONE,
- /** Single line. */
- SINGLE,
- /** Double line. */
- DOUBLE,
- /** Squiggle line. */
- SQUIGGLE,
- /** Error line (often dash line). */
- ERROR,
- /** Hyperlink. */
- LINK;
- }
-
- /**
- * The possible styles of the border. These are those supported by JFace 3.8. Other versions or other
- * widgets toolkit may not support all of these or may support more than these.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
- public static enum BorderStyle {
- /** No border. */
- NONE,
- /** Solid thin border. */
- SOLID,
- /** Dot thin border. */
- DOT,
- /** Dash thin border. */
- DASH;
- }
-
- /**
- * Returns a new builder for the style.
- *
- * @return a new builder for the style.
- */
- public static StyleBuilder builder() {
- return new StyleBuilder();
- }
-
- /**
- * A {@link Style} builder.
- *
- * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
- */
- public static final class StyleBuilder {
-
- /** The black color URI constant. */
- private static final URI BLACK = URI.createURI("color://rgb/0/0/0"); //$NON-NLS-1$
-
- /** The font. */
- private URI font;
-
- /** The background color. */
- private URI backgroundColor;
-
- /** The foreground color. */
- private URI foregroundColor;
-
- /** Is the text strikedout. */
- private boolean isStrikedout;
-
- /** The strikedout color. */
- private URI strikeoutColor;
-
- /** The underline style. */
- private UnderLineStyle underlineStyle = UnderLineStyle.NONE;
-
- /** The underline color. */
- private URI underlineColor;
-
- /** The border style. */
- private BorderStyle borderStyle = BorderStyle.NONE;
-
- /** The border color. */
- private URI borderColor;
-
- /**
- * Set the font.
- *
- * @param pFont
- * the font to set.
- * @return this.
- */
- public StyleBuilder setFont(URI pFont) {
- this.font = pFont;
- return this;
- }
-
- /**
- * Set the background color.
- *
- * @param pBackgroundColor
- * the backgroundColor to set
- * @return this.
- */
- public StyleBuilder setBackgroundColor(URI pBackgroundColor) {
- this.backgroundColor = pBackgroundColor;
- return this;
- }
-
- /**
- * Set the foreground color.
- *
- * @param pForegroundColor
- * the forregroundColor to set
- * @return this
- */
- public StyleBuilder setForegroundColor(URI pForegroundColor) {
- this.foregroundColor = pForegroundColor;
- return this;
- }
-
- /**
- * Set the strikedout.
- *
- * @param pIsStrikedout
- * the isStrikedout to set
- * @return this.
- */
- public StyleBuilder setStrikedout(boolean pIsStrikedout) {
- this.isStrikedout = pIsStrikedout;
- if (strikeoutColor == null) {
- strikeoutColor = BLACK;
- }
- return this;
- }
-
- /**
- * Set the strikeout color.
- *
- * @param pStrikeoutColor
- * the strikeoutColor to set
- * @return this.
- */
- public StyleBuilder setStrikeoutColor(URI pStrikeoutColor) {
- this.strikeoutColor = pStrikeoutColor;
- isStrikedout = true;
- return this;
- }
-
- /**
- * Set the border color.
- *
- * @param pBorderColor
- * the borderColor to set
- * @return this.
- */
- public StyleBuilder setBorderColor(URI pBorderColor) {
- this.borderColor = pBorderColor;
- if (borderStyle == BorderStyle.NONE) {
- borderStyle = BorderStyle.SOLID;
- }
- return this;
- }
-
- /**
- * Set the border color.
- *
- * @param pBorderStyle
- * the borderStyle to set
- * @return this.
- */
- public StyleBuilder setBorderStyle(BorderStyle pBorderStyle) {
- this.borderStyle = pBorderStyle;
- if (borderColor == null) {
- borderColor = BLACK;
- }
- return this;
- }
-
- /**
- * Set the underline color.
- *
- * @param pUnderlineColor
- * the underlineColor to set
- * @return this.
- */
- public StyleBuilder setUnderlineColor(URI pUnderlineColor) {
- this.underlineColor = pUnderlineColor;
- if (underlineStyle == UnderLineStyle.NONE) {
- underlineStyle = UnderLineStyle.SINGLE;
- }
- return this;
- }
-
- /**
- * Set the underline style.
- *
- * @param pUnderlineStyle
- * the underlineStyle to set
- * @return this.
- */
- public StyleBuilder setUnderlineStyle(UnderLineStyle pUnderlineStyle) {
- this.underlineStyle = pUnderlineStyle;
- if (pUnderlineStyle == null) {
- underlineColor = BLACK;
- }
- return this;
- }
-
- /**
- * Builds and returns a new Style instance regarding the values that have been given beforehands.
- *
- * @return a new Style instance regarding the values that have been given beforehands.
- */
- public Style build() {
- return new Style(font, backgroundColor, foregroundColor, isStrikedout, strikeoutColor,
- underlineStyle, underlineColor, borderStyle, borderColor);
- }
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 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.provider.utils;
+
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * Utility class that mimics the JFace's StyledString.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public interface IStyledString {
+
+ /**
+ * Returns the Java string for this styled string.
+ *
+ * @return the Java string for this styled string.
+ */
+ String getString();
+
+ /**
+ * Returns the style associated with this string.
+ *
+ * @return the style associated with this string.
+ */
+ Style getStyle();
+
+ /**
+ * An iterable of {@link IStyledString}. It is appendable.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+ interface IComposedStyledString extends Iterable<IStyledString> {
+
+ /**
+ * Append the given string with no style.
+ *
+ * @param str
+ * the string to append.
+ * @return this instance to let you chain the calls.
+ */
+ IComposedStyledString append(String str);
+
+ /**
+ * Append the given string with the given style.
+ *
+ * @param str
+ * the string to append.
+ * @param style
+ * the style of the appended string.
+ * @return this instance to let you chain the calls.
+ */
+ IComposedStyledString append(String str, Style style);
+
+ /**
+ * Appends the given composed styled string to this.
+ *
+ * @param composedStyledString
+ * the styled string to append.
+ * @return this instance.
+ * @since 4.0
+ */
+ IComposedStyledString append(IComposedStyledString composedStyledString);
+
+ /**
+ * Returns the Java string for this composed styled string.
+ *
+ * @return the Java string for this composed styled string.
+ */
+ String getString();
+ }
+
+ /**
+ * A style class for {@link IStyledString}.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+ public static final class Style {
+
+ /** Instance that represent a default unstyled string. */
+ public static final Style NO_STYLE = new Style(null, null, null, false, null, null, null, null, null);
+
+ /** Constant that will eventually map to org.eclipse.jface.viewers.StyledString.QUALIFIER_STYLER. */
+ public static final Style QUALIFIER_STYLER = new Style(null, null, null, false, null, null, null,
+ null, null);
+
+ /** Constant that will eventually map to org.eclipse.jface.viewers.StyledString.COUNTER_STYLER. */
+ public static final Style COUNTER_STYLER = new Style(null, null, null, false, null, null, null, null,
+ null);
+
+ /** Constant that will eventually map to org.eclipse.jface.viewers.StyledString.DECORATIONS_STYLER. */
+ public static final Style DECORATIONS_STYLER = new Style(null, null, null, false, null, null, null,
+ null, null);
+
+ /** The font URI. */
+ private final URI font;
+
+ /** The background color URI. */
+ private final URI backgroundColor;
+
+ /** The foreground color URI. */
+ private final URI foregroundColor;
+
+ /** Is the string strikedout. */
+ private final boolean isStrikedout;
+
+ /** The strikeout color URI. */
+ private final URI strikeoutColor;
+
+ /** The style of the underline. */
+ private final UnderLineStyle underlineStyle;
+
+ /** The underline color URI. */
+ private final URI underlineColor;
+
+ /** The border style. */
+ private final BorderStyle borderStyle;
+
+ /** The border color URI. */
+ private final URI borderColor;
+
+ /**
+ * Creates a new instance with the given values for each component of this style.
+ *
+ * @param font
+ * the font
+ * @param backgroundColor
+ * the background color
+ * @param foregroundColor
+ * the foreground color
+ * @param isStrikedout
+ * whether to strikedout the text
+ * @param strikeoutColor
+ * the color of the strikedout
+ * @param underlineStyle
+ * the style of the underline
+ * @param underlineColor
+ * the color of the underline
+ * @param borderStyle
+ * the style of the border
+ * @param borderColor
+ * the color of the border
+ */
+ // CHECKSTYLE:OFF private method
+ private Style(URI font, URI backgroundColor, URI foregroundColor, boolean isStrikedout,
+ URI strikeoutColor, UnderLineStyle underlineStyle, URI underlineColor,
+ BorderStyle borderStyle, URI borderColor) {
+ // CHECKSTYLE:ON
+ this.font = font;
+ this.backgroundColor = backgroundColor;
+ this.foregroundColor = foregroundColor;
+ this.isStrikedout = isStrikedout;
+ this.strikeoutColor = strikeoutColor;
+ this.underlineStyle = underlineStyle;
+ this.underlineColor = underlineColor;
+ this.borderStyle = borderStyle;
+ this.borderColor = borderColor;
+ }
+
+ public URI getFont() {
+ return font;
+ }
+
+ public URI getBackgoundColor() {
+ return backgroundColor;
+ }
+
+ public URI getForegroundColor() {
+ return foregroundColor;
+ }
+
+ public boolean isStrikedout() {
+ return isStrikedout;
+ }
+
+ public URI getStrikeoutColor() {
+ return strikeoutColor;
+ }
+
+ public UnderLineStyle getUnderlineStyle() {
+ return underlineStyle;
+ }
+
+ public URI getUnderlineColor() {
+ return underlineColor;
+ }
+
+ public BorderStyle getBorderStyle() {
+ return borderStyle;
+ }
+
+ public URI getBorderColor() {
+ return borderColor;
+ }
+
+ /**
+ * The possible styles of the underline. These are those supported by JFace 3.8. Other versions or
+ * other widgets toolkit may not support all of these or may support more than these.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+ public static enum UnderLineStyle {
+ /** No underline. */
+ NONE,
+ /** Single line. */
+ SINGLE,
+ /** Double line. */
+ DOUBLE,
+ /** Squiggle line. */
+ SQUIGGLE,
+ /** Error line (often dash line). */
+ ERROR,
+ /** Hyperlink. */
+ LINK;
+ }
+
+ /**
+ * The possible styles of the border. These are those supported by JFace 3.8. Other versions or other
+ * widgets toolkit may not support all of these or may support more than these.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+ public static enum BorderStyle {
+ /** No border. */
+ NONE,
+ /** Solid thin border. */
+ SOLID,
+ /** Dot thin border. */
+ DOT,
+ /** Dash thin border. */
+ DASH;
+ }
+
+ /**
+ * Returns a new builder for the style.
+ *
+ * @return a new builder for the style.
+ */
+ public static StyleBuilder builder() {
+ return new StyleBuilder();
+ }
+
+ /**
+ * A {@link Style} builder.
+ *
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+ public static final class StyleBuilder {
+
+ /** The black color URI constant. */
+ private static final URI BLACK = URI.createURI("color://rgb/0/0/0"); //$NON-NLS-1$
+
+ /** The font. */
+ private URI font;
+
+ /** The background color. */
+ private URI backgroundColor;
+
+ /** The foreground color. */
+ private URI foregroundColor;
+
+ /** Is the text strikedout. */
+ private boolean isStrikedout;
+
+ /** The strikedout color. */
+ private URI strikeoutColor;
+
+ /** The underline style. */
+ private UnderLineStyle underlineStyle = UnderLineStyle.NONE;
+
+ /** The underline color. */
+ private URI underlineColor;
+
+ /** The border style. */
+ private BorderStyle borderStyle = BorderStyle.NONE;
+
+ /** The border color. */
+ private URI borderColor;
+
+ /**
+ * Set the font.
+ *
+ * @param pFont
+ * the font to set.
+ * @return this.
+ */
+ public StyleBuilder setFont(URI pFont) {
+ this.font = pFont;
+ return this;
+ }
+
+ /**
+ * Set the background color.
+ *
+ * @param pBackgroundColor
+ * the backgroundColor to set
+ * @return this.
+ */
+ public StyleBuilder setBackgroundColor(URI pBackgroundColor) {
+ this.backgroundColor = pBackgroundColor;
+ return this;
+ }
+
+ /**
+ * Set the foreground color.
+ *
+ * @param pForegroundColor
+ * the forregroundColor to set
+ * @return this
+ */
+ public StyleBuilder setForegroundColor(URI pForegroundColor) {
+ this.foregroundColor = pForegroundColor;
+ return this;
+ }
+
+ /**
+ * Set the strikedout.
+ *
+ * @param pIsStrikedout
+ * the isStrikedout to set
+ * @return this.
+ */
+ public StyleBuilder setStrikedout(boolean pIsStrikedout) {
+ this.isStrikedout = pIsStrikedout;
+ if (strikeoutColor == null) {
+ strikeoutColor = BLACK;
+ }
+ return this;
+ }
+
+ /**
+ * Set the strikeout color.
+ *
+ * @param pStrikeoutColor
+ * the strikeoutColor to set
+ * @return this.
+ */
+ public StyleBuilder setStrikeoutColor(URI pStrikeoutColor) {
+ this.strikeoutColor = pStrikeoutColor;
+ isStrikedout = true;
+ return this;
+ }
+
+ /**
+ * Set the border color.
+ *
+ * @param pBorderColor
+ * the borderColor to set
+ * @return this.
+ */
+ public StyleBuilder setBorderColor(URI pBorderColor) {
+ this.borderColor = pBorderColor;
+ if (borderStyle == BorderStyle.NONE) {
+ borderStyle = BorderStyle.SOLID;
+ }
+ return this;
+ }
+
+ /**
+ * Set the border color.
+ *
+ * @param pBorderStyle
+ * the borderStyle to set
+ * @return this.
+ */
+ public StyleBuilder setBorderStyle(BorderStyle pBorderStyle) {
+ this.borderStyle = pBorderStyle;
+ if (borderColor == null) {
+ borderColor = BLACK;
+ }
+ return this;
+ }
+
+ /**
+ * Set the underline color.
+ *
+ * @param pUnderlineColor
+ * the underlineColor to set
+ * @return this.
+ */
+ public StyleBuilder setUnderlineColor(URI pUnderlineColor) {
+ this.underlineColor = pUnderlineColor;
+ if (underlineStyle == UnderLineStyle.NONE) {
+ underlineStyle = UnderLineStyle.SINGLE;
+ }
+ return this;
+ }
+
+ /**
+ * Set the underline style.
+ *
+ * @param pUnderlineStyle
+ * the underlineStyle to set
+ * @return this.
+ */
+ public StyleBuilder setUnderlineStyle(UnderLineStyle pUnderlineStyle) {
+ this.underlineStyle = pUnderlineStyle;
+ if (pUnderlineStyle == null) {
+ underlineColor = BLACK;
+ }
+ return this;
+ }
+
+ /**
+ * Builds and returns a new Style instance regarding the values that have been given beforehands.
+ *
+ * @return a new Style instance regarding the values that have been given beforehands.
+ */
+ public Style build() {
+ return new Style(font, backgroundColor, foregroundColor, isStrikedout, strikeoutColor,
+ underlineStyle, underlineColor, borderStyle, borderColor);
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.ide.tests/.project b/plugins/org.eclipse.emf.compare.ide.tests/.project
index 5c122774c..a5e452802 100644
--- a/plugins/org.eclipse.emf.compare.ide.tests/.project
+++ b/plugins/org.eclipse.emf.compare.ide.tests/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.compare.ide.tests</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>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.compare.ide.tests</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.ide.tests/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.resources.prefs
index 3d916f296..99f26c020 100644
--- a/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.resources.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-encoding/<project>=Cp1252
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.runtime.prefs
index f8a67de1d..5a0ad22d2 100644
--- a/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.runtime.prefs
+++ b/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.core.runtime.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-line.separator=\r\n
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.jdt.ui.prefs
index 4517c0f23..4e1442ee9 100644
--- a/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.emf.compare.ide.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -1,60 +1,60 @@
-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
+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.ide.tests/build.properties b/plugins/org.eclipse.emf.compare.ide.tests/build.properties
index 1b08f841b..cdd2db7f1 100644
--- a/plugins/org.eclipse.emf.compare.ide.tests/build.properties
+++ b/plugins/org.eclipse.emf.compare.ide.tests/build.properties
@@ -1,7 +1,7 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/plugins/org.eclipse.emf.compare.ide.tests/pom.xml b/plugins/org.eclipse.emf.compare.ide.tests/pom.xml
index 6a7a08408..9ef55a4bf 100644
--- a/plugins/org.eclipse.emf.compare.ide.tests/pom.xml
+++ b/plugins/org.eclipse.emf.compare.ide.tests/pom.xml
@@ -1,42 +1,42 @@
-<?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>3.0.0-SNAPSHOT</version>
- <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
- </parent>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>org.eclipse.emf.compare.ide.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <build>
- <resources>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <includes>
- <include>org/eclipse/emf/compare/ide/tests/suite/AllTests.class</include>
- </includes>
- <useUIHarness>false</useUIHarness>
- <useUIThread>false</useUIThread>
- <appArgLine>-Xmx1024m -XX:MaxPermSize=256m</appArgLine>
- <testFailureIgnore>true</testFailureIgnore>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<?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>3.0.0-SNAPSHOT</version>
+ <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
+ </parent>
+ <groupId>org.eclipse.emf.compare</groupId>
+ <artifactId>org.eclipse.emf.compare.ide.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <includes>
+ <include>org/eclipse/emf/compare/ide/tests/suite/AllTests.class</include>
+ </includes>
+ <useUIHarness>false</useUIHarness>
+ <useUIThread>false</useUIThread>
+ <appArgLine>-Xmx1024m -XX:MaxPermSize=256m</appArgLine>
+ <testFailureIgnore>true</testFailureIgnore>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/Activator.java b/plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/Activator.java
index 347b6d5da..d306130b2 100644
--- a/plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/Activator.java
+++ b/plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/Activator.java
@@ -1,40 +1,40 @@
-/*******************************************************************************
- * 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.ide.tests;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
+/*******************************************************************************
+ * 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.ide.tests;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @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.ide.tests/src/org/eclipse/emf/compare/ide/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/suite/AllTests.java
index ce40ad7dd..23e6bc3bc 100644
--- a/plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/suite/AllTests.java
+++ b/plugins/org.eclipse.emf.compare.ide.tests/src/org/eclipse/emf/compare/ide/tests/suite/AllTests.java
@@ -1,42 +1,42 @@
-/*******************************************************************************
- * 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.ide.tests.suite;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.textui.TestRunner;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(Suite.class)
-@SuiteClasses({})
-public class AllTests {
- /**
- * Launches the test with the given arguments.
- *
- * @param args
- * Arguments of the testCase.
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * Creates the {@link junit.framework.TestSuite TestSuite} for all the test.
- *
- * @return The test suite containing all the tests
- */
- public static Test suite() {
- return new JUnit4TestAdapter(AllTests.class);
- }
-}
+/*******************************************************************************
+ * 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.ide.tests.suite;
+
+import junit.framework.JUnit4TestAdapter;
+import junit.framework.Test;
+import junit.textui.TestRunner;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({})
+public class AllTests {
+ /**
+ * Launches the test with the given arguments.
+ *
+ * @param args
+ * Arguments of the testCase.
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * Creates the {@link junit.framework.TestSuite TestSuite} for all the test.
+ *
+ * @return The test suite containing all the tests
+ */
+ public static Test suite() {
+ return new JUnit4TestAdapter(AllTests.class);
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.git/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.ide.ui.tests.git/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.git/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.git/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.ide.ui.tests.git/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.git/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests/.project b/plugins/org.eclipse.emf.compare.ide.ui.tests/.project
index 70a74c275..7af89db38 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/.project
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.compare.ide.ui.tests</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>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.compare.ide.ui.tests</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.ide.ui.tests/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.resources.prefs
index 3d916f296..99f26c020 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.resources.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-encoding/<project>=Cp1252
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.runtime.prefs
index f8a67de1d..5a0ad22d2 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.runtime.prefs
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.core.runtime.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-line.separator=\r\n
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.jdt.ui.prefs
index 4517c0f23..4e1442ee9 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -1,60 +1,60 @@
-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
+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.ide.ui.tests/build.properties b/plugins/org.eclipse.emf.compare.ide.ui.tests/build.properties
index 1b08f841b..cdd2db7f1 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/build.properties
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/build.properties
@@ -1,7 +1,7 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests/pom.xml b/plugins/org.eclipse.emf.compare.ide.ui.tests/pom.xml
index a80f8df9d..20d09f5a9 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/pom.xml
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/pom.xml
@@ -1,42 +1,42 @@
-<?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>3.0.0-SNAPSHOT</version>
- <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
- </parent>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>org.eclipse.emf.compare.ide.ui.tests</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <build>
- <resources>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <includes>
- <include>org/eclipse/emf/compare/ide/ui/tests/suite/AllTests.class</include>
- </includes>
- <useUIHarness>true</useUIHarness>
- <useUIThread>false</useUIThread>
- <appArgLine>-Xmx1024m -XX:MaxPermSize=256m</appArgLine>
- <testFailureIgnore>true</testFailureIgnore>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<?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>3.0.0-SNAPSHOT</version>
+ <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
+ </parent>
+ <groupId>org.eclipse.emf.compare</groupId>
+ <artifactId>org.eclipse.emf.compare.ide.ui.tests</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <includes>
+ <include>org/eclipse/emf/compare/ide/ui/tests/suite/AllTests.class</include>
+ </includes>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>false</useUIThread>
+ <appArgLine>-Xmx1024m -XX:MaxPermSize=256m</appArgLine>
+ <testFailureIgnore>true</testFailureIgnore>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/Activator.java b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/Activator.java
index 7ded85e92..55cd42b1f 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/Activator.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/Activator.java
@@ -1,40 +1,40 @@
-/*******************************************************************************
- * 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.ide.ui.tests;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
+/*******************************************************************************
+ * 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.ide.ui.tests;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @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.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/CompareTestCase.java b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/CompareTestCase.java
index 160c5c159..5972bae2e 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/CompareTestCase.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/CompareTestCase.java
@@ -1,239 +1,239 @@
-/*******************************************************************************
- * Copyright (C) 2013 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
- *******************************************************************************/
-package org.eclipse.emf.compare.ide.ui.tests;
-
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterators.filter;
-import static org.eclipse.emf.ecore.util.EcoreUtil.getAllProperContents;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.compare.ide.ui.tests.workspace.TestProject;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcoreFactory;
-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.xmi.impl.XMIResourceImpl;
-import org.junit.After;
-import org.junit.Before;
-
-@SuppressWarnings("nls")
-public class CompareTestCase {
- protected static final String PACKAGE_NAME_PREFIX = "package";
-
- protected static final String CLASS1_NAME_PREFIX = "Class_A";
-
- protected static final String CLASS2_NAME_PREFIX = "Class_B";
-
- protected static final String CLASS3_NAME_PREFIX = "Class_C";
-
- protected static final String CLASS4_NAME_PREFIX = "Class_D";
-
- protected TestProject project;
-
- @Before
- public void setUp() throws Exception {
- project = new TestProject();
- }
-
- @After
- public void tearDown() throws Exception {
- project.dispose();
- }
-
- /**
- * The base model for both our files will be one package containing two classes. There are no references
- * and no attributes set, save for the name of these objects.
- *
- * @param nameSuffix
- * Suffix that will be appended to all names for this model.
- * @return A basic model to be used by these tests.
- */
- protected EPackage createBasicModel(String nameSuffix) {
- EPackage root = createPackage(null, PACKAGE_NAME_PREFIX + nameSuffix);
- createClass(root, CLASS1_NAME_PREFIX + nameSuffix);
- createClass(root, CLASS2_NAME_PREFIX + nameSuffix);
- return root;
- }
-
- protected EPackage createPackage(EPackage parent, String name) {
- final EPackage newPackage = EcoreFactory.eINSTANCE.createEPackage();
- newPackage.setName(name);
- if (parent != null) {
- parent.getESubpackages().add(newPackage);
- }
- return newPackage;
- }
-
- protected EClass createClass(EPackage parent, String name) {
- final EClass newClass = EcoreFactory.eINSTANCE.createEClass();
- newClass.setName(name);
- if (parent != null) {
- parent.getEClassifiers().add(newClass);
- }
- return newClass;
- }
-
- protected EObject findObject(Resource resource, String namePrefix) {
- Iterator<EObject> children = EcoreUtil.getAllProperContents(resource, false);
- while (children.hasNext()) {
- final EObject child = children.next();
- if (child instanceof ENamedElement && ((ENamedElement)child).getName().startsWith(namePrefix)) {
- return child;
- }
- }
- return null;
- }
-
- /**
- * Connects an EMF resource to the given File within the given project. The resource will be created with
- * a workspace-relative "{@code platform:/resource}" URI.
- *
- * @param file
- * The file we're attaching an EMF Resource on.
- * @param resourceSet
- * The resource set in which the new Resource will be created.
- * @return The created EMF Resource.
- */
- protected Resource connectResource(IFile file, ResourceSet resourceSet) throws CoreException {
- URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
-
- return createResource(uri, resourceSet);
- }
-
- private static Resource createResource(URI modelURI, ResourceSet resourceSet) {
- final Resource resource = new XMIResourceImpl(modelURI) {
- @Override
- protected boolean useUUIDs() {
- return true;
- }
- };
- resourceSet.getResources().add(resource);
- return resource;
- }
-
- /**
- * This will seek for a random EClass in both given resources, then use the "eSuperTypes" reference of the
- * source one to create a reference towards the target.
- *
- * @param source
- * Resource within which we'll search for our source EClass (the class which will have a
- * superType).
- * @param target
- * Resource within which we'll search for our target EClass (the superType).
- */
- protected void makeCrossReference(Resource source, Resource target) {
- final Iterator<EClass> sourceChildren = filter(getAllProperContents(source, false), EClass.class);
- final Iterator<EClass> targetChildren = filter(getAllProperContents(target, false), EClass.class);
- assertTrue(sourceChildren.hasNext());
- assertTrue(targetChildren.hasNext());
- final EClass sourceClass = sourceChildren.next();
- final EClass targetClass = targetChildren.next();
-
- sourceClass.getESuperTypes().add(targetClass);
- }
-
- /**
- * This will seek and break all cross-references from <code>source</code> to <code>target</code>.
- *
- * @param source
- * Resource within which we'll search for our cross-references.
- * @param target
- * Target of the cross-references to break.
- */
- protected void breakCrossReferences(Resource source, Resource target) {
- final Iterator<EObject> sourceChildren = getAllProperContents(source, false);
-
- while (sourceChildren.hasNext()) {
- final EObject child = sourceChildren.next();
- breakCrossReferences(child, target);
- }
- }
-
- private void breakCrossReferences(EObject source, Resource target) {
- for (EReference ref : source.eClass().getEAllReferences()) {
- final Object value = source.eGet(ref);
- if (!ref.isMany()) {
- if (value instanceof EObject && ((EObject)value).eResource() == target && !ref.isDerived()) {
- source.eSet(ref, null);
- }
- } else if (value instanceof Collection<?>) {
- final Collection<?> valueList = (Collection<?>)value;
- final Iterable<EObject> copy = filter(new ArrayList<Object>(valueList), EObject.class);
- for (EObject targetEObject : copy) {
- if (targetEObject.eResource() == target) {
- valueList.remove(targetEObject);
- }
- }
- }
- }
- }
-
- /**
- * Create a cross-resource reference through the "superType" reference of a given EClass.
- * <p>
- * The source EClass will be searched within the {@code source} Resource and its name should have a set
- * prefix. Similarly, the target EClass will be searched withi the {@code target} Resource.
- * </p>
- *
- * @param source
- * Resource within which we'll search for our source EClass (the class which will have a
- * superType).
- * @param target
- * Resource within which we'll search for our target EClass (the superType).
- * @param sourceNamePrefix
- * Prefix (or exact name) of the source EClass.
- * @param targetNamePrefix
- * Prefix (or exact name) of the target EClass.
- */
- protected void makeCrossReference(Resource source, Resource target, String sourceNamePrefix,
- String targetNamePrefix) {
- final EObject sourceObject = findObject(source, sourceNamePrefix);
- final EObject targetObject = findObject(target, targetNamePrefix);
-
- assertTrue(sourceObject instanceof EClass);
- assertTrue(targetObject instanceof EClass);
-
- ((EClass)sourceObject).getESuperTypes().add((EClass)targetObject);
- }
-
- protected void reload(Resource... resources) throws IOException {
- for (Resource resource : resources) {
- resource.getContents().clear();
- resource.unload();
- }
- // separate loop to reload so that we are sure everything has been unloaded
- for (Resource resource : resources) {
- resource.load(Collections.emptyMap());
- }
- // And a third loop to re-resolve every cross-references between the reloaded resources
- for (Resource resource : resources) {
- EcoreUtil.resolveAll(resource);
- }
- }
-
- protected void save(Resource... resources) throws IOException {
- for (Resource resource : resources) {
- resource.save(Collections.emptyMap());
- }
- }
-}
+/*******************************************************************************
+ * Copyright (C) 2013 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
+ *******************************************************************************/
+package org.eclipse.emf.compare.ide.ui.tests;
+
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterators.filter;
+import static org.eclipse.emf.ecore.util.EcoreUtil.getAllProperContents;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.ide.ui.tests.workspace.TestProject;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcoreFactory;
+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.xmi.impl.XMIResourceImpl;
+import org.junit.After;
+import org.junit.Before;
+
+@SuppressWarnings("nls")
+public class CompareTestCase {
+ protected static final String PACKAGE_NAME_PREFIX = "package";
+
+ protected static final String CLASS1_NAME_PREFIX = "Class_A";
+
+ protected static final String CLASS2_NAME_PREFIX = "Class_B";
+
+ protected static final String CLASS3_NAME_PREFIX = "Class_C";
+
+ protected static final String CLASS4_NAME_PREFIX = "Class_D";
+
+ protected TestProject project;
+
+ @Before
+ public void setUp() throws Exception {
+ project = new TestProject();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ project.dispose();
+ }
+
+ /**
+ * The base model for both our files will be one package containing two classes. There are no references
+ * and no attributes set, save for the name of these objects.
+ *
+ * @param nameSuffix
+ * Suffix that will be appended to all names for this model.
+ * @return A basic model to be used by these tests.
+ */
+ protected EPackage createBasicModel(String nameSuffix) {
+ EPackage root = createPackage(null, PACKAGE_NAME_PREFIX + nameSuffix);
+ createClass(root, CLASS1_NAME_PREFIX + nameSuffix);
+ createClass(root, CLASS2_NAME_PREFIX + nameSuffix);
+ return root;
+ }
+
+ protected EPackage createPackage(EPackage parent, String name) {
+ final EPackage newPackage = EcoreFactory.eINSTANCE.createEPackage();
+ newPackage.setName(name);
+ if (parent != null) {
+ parent.getESubpackages().add(newPackage);
+ }
+ return newPackage;
+ }
+
+ protected EClass createClass(EPackage parent, String name) {
+ final EClass newClass = EcoreFactory.eINSTANCE.createEClass();
+ newClass.setName(name);
+ if (parent != null) {
+ parent.getEClassifiers().add(newClass);
+ }
+ return newClass;
+ }
+
+ protected EObject findObject(Resource resource, String namePrefix) {
+ Iterator<EObject> children = EcoreUtil.getAllProperContents(resource, false);
+ while (children.hasNext()) {
+ final EObject child = children.next();
+ if (child instanceof ENamedElement && ((ENamedElement)child).getName().startsWith(namePrefix)) {
+ return child;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Connects an EMF resource to the given File within the given project. The resource will be created with
+ * a workspace-relative "{@code platform:/resource}" URI.
+ *
+ * @param file
+ * The file we're attaching an EMF Resource on.
+ * @param resourceSet
+ * The resource set in which the new Resource will be created.
+ * @return The created EMF Resource.
+ */
+ protected Resource connectResource(IFile file, ResourceSet resourceSet) throws CoreException {
+ URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+
+ return createResource(uri, resourceSet);
+ }
+
+ private static Resource createResource(URI modelURI, ResourceSet resourceSet) {
+ final Resource resource = new XMIResourceImpl(modelURI) {
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+ };
+ resourceSet.getResources().add(resource);
+ return resource;
+ }
+
+ /**
+ * This will seek for a random EClass in both given resources, then use the "eSuperTypes" reference of the
+ * source one to create a reference towards the target.
+ *
+ * @param source
+ * Resource within which we'll search for our source EClass (the class which will have a
+ * superType).
+ * @param target
+ * Resource within which we'll search for our target EClass (the superType).
+ */
+ protected void makeCrossReference(Resource source, Resource target) {
+ final Iterator<EClass> sourceChildren = filter(getAllProperContents(source, false), EClass.class);
+ final Iterator<EClass> targetChildren = filter(getAllProperContents(target, false), EClass.class);
+ assertTrue(sourceChildren.hasNext());
+ assertTrue(targetChildren.hasNext());
+ final EClass sourceClass = sourceChildren.next();
+ final EClass targetClass = targetChildren.next();
+
+ sourceClass.getESuperTypes().add(targetClass);
+ }
+
+ /**
+ * This will seek and break all cross-references from <code>source</code> to <code>target</code>.
+ *
+ * @param source
+ * Resource within which we'll search for our cross-references.
+ * @param target
+ * Target of the cross-references to break.
+ */
+ protected void breakCrossReferences(Resource source, Resource target) {
+ final Iterator<EObject> sourceChildren = getAllProperContents(source, false);
+
+ while (sourceChildren.hasNext()) {
+ final EObject child = sourceChildren.next();
+ breakCrossReferences(child, target);
+ }
+ }
+
+ private void breakCrossReferences(EObject source, Resource target) {
+ for (EReference ref : source.eClass().getEAllReferences()) {
+ final Object value = source.eGet(ref);
+ if (!ref.isMany()) {
+ if (value instanceof EObject && ((EObject)value).eResource() == target && !ref.isDerived()) {
+ source.eSet(ref, null);
+ }
+ } else if (value instanceof Collection<?>) {
+ final Collection<?> valueList = (Collection<?>)value;
+ final Iterable<EObject> copy = filter(new ArrayList<Object>(valueList), EObject.class);
+ for (EObject targetEObject : copy) {
+ if (targetEObject.eResource() == target) {
+ valueList.remove(targetEObject);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Create a cross-resource reference through the "superType" reference of a given EClass.
+ * <p>
+ * The source EClass will be searched within the {@code source} Resource and its name should have a set
+ * prefix. Similarly, the target EClass will be searched withi the {@code target} Resource.
+ * </p>
+ *
+ * @param source
+ * Resource within which we'll search for our source EClass (the class which will have a
+ * superType).
+ * @param target
+ * Resource within which we'll search for our target EClass (the superType).
+ * @param sourceNamePrefix
+ * Prefix (or exact name) of the source EClass.
+ * @param targetNamePrefix
+ * Prefix (or exact name) of the target EClass.
+ */
+ protected void makeCrossReference(Resource source, Resource target, String sourceNamePrefix,
+ String targetNamePrefix) {
+ final EObject sourceObject = findObject(source, sourceNamePrefix);
+ final EObject targetObject = findObject(target, targetNamePrefix);
+
+ assertTrue(sourceObject instanceof EClass);
+ assertTrue(targetObject instanceof EClass);
+
+ ((EClass)sourceObject).getESuperTypes().add((EClass)targetObject);
+ }
+
+ protected void reload(Resource... resources) throws IOException {
+ for (Resource resource : resources) {
+ resource.getContents().clear();
+ resource.unload();
+ }
+ // separate loop to reload so that we are sure everything has been unloaded
+ for (Resource resource : resources) {
+ resource.load(Collections.emptyMap());
+ }
+ // And a third loop to re-resolve every cross-references between the reloaded resources
+ for (Resource resource : resources) {
+ EcoreUtil.resolveAll(resource);
+ }
+ }
+
+ protected void save(Resource... resources) throws IOException {
+ for (Resource resource : resources) {
+ resource.save(Collections.emptyMap());
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/suite/AllTests.java
index e347d0138..b5d39d900 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/suite/AllTests.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/suite/AllTests.java
@@ -1,43 +1,43 @@
-/*******************************************************************************
- * 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.ide.ui.tests.suite;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.textui.TestRunner;
-
-import org.eclipse.emf.compare.ide.ui.tests.unit.DependenciesTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(Suite.class)
-@SuiteClasses({DependenciesTest.class, })
-public class AllTests {
- /**
- * Launches the test with the given arguments.
- *
- * @param args
- * Arguments of the testCase.
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * Creates the {@link junit.framework.TestSuite TestSuite} for all the test.
- *
- * @return The test suite containing all the tests
- */
- public static Test suite() {
- return new JUnit4TestAdapter(AllTests.class);
- }
-}
+/*******************************************************************************
+ * 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.ide.ui.tests.suite;
+
+import junit.framework.JUnit4TestAdapter;
+import junit.framework.Test;
+import junit.textui.TestRunner;
+
+import org.eclipse.emf.compare.ide.ui.tests.unit.DependenciesTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({DependenciesTest.class, })
+public class AllTests {
+ /**
+ * Launches the test with the given arguments.
+ *
+ * @param args
+ * Arguments of the testCase.
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * Creates the {@link junit.framework.TestSuite TestSuite} for all the test.
+ *
+ * @return The test suite containing all the tests
+ */
+ public static Test suite() {
+ return new JUnit4TestAdapter(AllTests.class);
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/unit/DependenciesTest.java b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/unit/DependenciesTest.java
index dee17f54b..d2d1adad5 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/unit/DependenciesTest.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/unit/DependenciesTest.java
@@ -1,207 +1,207 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.emf.compare.ide.ui.tests.unit;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.compare.ide.ui.internal.logical.ProjectModelResolver;
-import org.eclipse.emf.compare.ide.ui.logical.IModelResolver;
-import org.eclipse.emf.compare.ide.ui.tests.CompareTestCase;
-import org.eclipse.emf.compare.ide.utils.StorageTraversal;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-@SuppressWarnings("nls")
-public class DependenciesTest extends CompareTestCase {
- private static final String FILE1_SUFFIX = "_file1";
-
- private static final String FILE2_SUFFIX = "_file2";
-
- private static final String FILE3_SUFFIX = "_file3";
-
- private IFile iFile1;
-
- private IFile iFile2;
-
- private IFile iFile3;
-
- private Resource resource1;
-
- private Resource resource2;
-
- private Resource resource3;
-
- private IModelResolver resolver;
-
- private IProgressMonitor monitor;
-
- @Override
- @Before
- public void setUp() throws Exception {
- super.setUp();
- resolver = new ProjectModelResolver();
- resolver.initialize();
- monitor = new NullProgressMonitor();
-
- final IProject iProject = project.getProject();
- final ResourceSet resourceSet = new ResourceSetImpl();
-
- final File file1 = project.getOrCreateFile(iProject, "file1.ecore");
- final File file2 = project.getOrCreateFile(iProject, "file2.ecore");
- final File file3 = project.getOrCreateFile(iProject, "file3.ecore");
-
- iFile1 = project.getIFile(iProject, file1);
- iFile2 = project.getIFile(iProject, file2);
- iFile3 = project.getIFile(iProject, file3);
-
- resource1 = connectResource(iFile1, resourceSet);
- resource2 = connectResource(iFile2, resourceSet);
- resource3 = connectResource(iFile3, resourceSet);
-
- resource1.getContents().add(createBasicModel(FILE1_SUFFIX));
- resource2.getContents().add(createBasicModel(FILE2_SUFFIX));
- resource3.getContents().add(createBasicModel(FILE3_SUFFIX));
-
- save(resource1, resource2, resource3);
- }
-
- @Override
- @After
- public void tearDown() throws Exception {
- resolver.dispose();
- super.tearDown();
- }
-
- @Test
- public void testScopeNoDependencies() {
- StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
- assertEquals(traversal.getStorages().size(), 1);
- assertTrue(traversal.getStorages().contains(iFile1));
-
- traversal = resolver.resolveLocalModel(iFile2, monitor);
- assertEquals(traversal.getStorages().size(), 1);
- assertTrue(traversal.getStorages().contains(iFile2));
-
- traversal = resolver.resolveLocalModel(iFile3, monitor);
- assertEquals(traversal.getStorages().size(), 1);
- assertTrue(traversal.getStorages().contains(iFile3));
- }
-
- @Test
- public void testScopeAddedDependency() throws Exception {
- makeCrossReference(resource2, resource1);
- save(resource2);
-
- StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
- assertEquals(traversal.getStorages().size(), 2);
- assertTrue(traversal.getStorages().contains(iFile1));
- assertTrue(traversal.getStorages().contains(iFile2));
-
- traversal = resolver.resolveLocalModel(iFile2, monitor);
- assertEquals(traversal.getStorages().size(), 2);
- assertTrue(traversal.getStorages().contains(iFile1));
- assertTrue(traversal.getStorages().contains(iFile2));
- }
-
- @Test
- public void testScopeRemovedDependency() throws Exception {
- makeCrossReference(resource2, resource1);
- save(resource2);
-
- breakCrossReferences(resource2, resource1);
- save(resource2);
-
- StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
- assertEquals(traversal.getStorages().size(), 1);
- assertTrue(traversal.getStorages().contains(iFile1));
-
- traversal = resolver.resolveLocalModel(iFile2, monitor);
- assertEquals(traversal.getStorages().size(), 1);
- assertTrue(traversal.getStorages().contains(iFile2));
- }
-
- @Test
- public void testScopeDepth() throws Exception {
- makeCrossReference(resource2, resource1);
- makeCrossReference(resource3, resource2);
- save(resource2, resource3);
-
- StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
- assertEquals(traversal.getStorages().size(), 3);
- assertTrue(traversal.getStorages().contains(iFile1));
- assertTrue(traversal.getStorages().contains(iFile2));
- assertTrue(traversal.getStorages().contains(iFile3));
-
- traversal = resolver.resolveLocalModel(iFile2, monitor);
- assertEquals(traversal.getStorages().size(), 3);
- assertTrue(traversal.getStorages().contains(iFile1));
- assertTrue(traversal.getStorages().contains(iFile2));
- assertTrue(traversal.getStorages().contains(iFile3));
-
- traversal = resolver.resolveLocalModel(iFile3, monitor);
- assertEquals(traversal.getStorages().size(), 3);
- assertTrue(traversal.getStorages().contains(iFile1));
- assertTrue(traversal.getStorages().contains(iFile2));
- assertTrue(traversal.getStorages().contains(iFile3));
- }
-
- @Test
- public void testScopeUpdate() throws Exception {
- makeCrossReference(resource2, resource1);
- makeCrossReference(resource3, resource2);
- save(resource2, resource3);
-
- StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
- assertEquals(traversal.getStorages().size(), 3);
- assertTrue(traversal.getStorages().contains(iFile1));
- assertTrue(traversal.getStorages().contains(iFile2));
- assertTrue(traversal.getStorages().contains(iFile3));
-
- breakCrossReferences(resource2, resource1);
- save(resource2);
-
- traversal = resolver.resolveLocalModel(iFile1, monitor);
- assertEquals(traversal.getStorages().size(), 1);
- assertTrue(traversal.getStorages().contains(iFile1));
-
- traversal = resolver.resolveLocalModel(iFile2, monitor);
- assertEquals(traversal.getStorages().size(), 2);
- assertTrue(traversal.getStorages().contains(iFile2));
- assertTrue(traversal.getStorages().contains(iFile3));
-
- breakCrossReferences(resource3, resource2);
- makeCrossReference(resource3, resource1);
- save(resource3);
-
- traversal = resolver.resolveLocalModel(iFile1, monitor);
- assertEquals(traversal.getStorages().size(), 2);
- assertTrue(traversal.getStorages().contains(iFile1));
- assertTrue(traversal.getStorages().contains(iFile3));
-
- traversal = resolver.resolveLocalModel(iFile2, monitor);
- assertEquals(traversal.getStorages().size(), 1);
- assertTrue(traversal.getStorages().contains(iFile2));
-
- traversal = resolver.resolveLocalModel(iFile3, monitor);
- assertEquals(traversal.getStorages().size(), 2);
- assertTrue(traversal.getStorages().contains(iFile1));
- assertTrue(traversal.getStorages().contains(iFile3));
- }
-}
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.emf.compare.ide.ui.tests.unit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.compare.ide.ui.internal.logical.ProjectModelResolver;
+import org.eclipse.emf.compare.ide.ui.logical.IModelResolver;
+import org.eclipse.emf.compare.ide.ui.tests.CompareTestCase;
+import org.eclipse.emf.compare.ide.utils.StorageTraversal;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+@SuppressWarnings("nls")
+public class DependenciesTest extends CompareTestCase {
+ private static final String FILE1_SUFFIX = "_file1";
+
+ private static final String FILE2_SUFFIX = "_file2";
+
+ private static final String FILE3_SUFFIX = "_file3";
+
+ private IFile iFile1;
+
+ private IFile iFile2;
+
+ private IFile iFile3;
+
+ private Resource resource1;
+
+ private Resource resource2;
+
+ private Resource resource3;
+
+ private IModelResolver resolver;
+
+ private IProgressMonitor monitor;
+
+ @Override
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ resolver = new ProjectModelResolver();
+ resolver.initialize();
+ monitor = new NullProgressMonitor();
+
+ final IProject iProject = project.getProject();
+ final ResourceSet resourceSet = new ResourceSetImpl();
+
+ final File file1 = project.getOrCreateFile(iProject, "file1.ecore");
+ final File file2 = project.getOrCreateFile(iProject, "file2.ecore");
+ final File file3 = project.getOrCreateFile(iProject, "file3.ecore");
+
+ iFile1 = project.getIFile(iProject, file1);
+ iFile2 = project.getIFile(iProject, file2);
+ iFile3 = project.getIFile(iProject, file3);
+
+ resource1 = connectResource(iFile1, resourceSet);
+ resource2 = connectResource(iFile2, resourceSet);
+ resource3 = connectResource(iFile3, resourceSet);
+
+ resource1.getContents().add(createBasicModel(FILE1_SUFFIX));
+ resource2.getContents().add(createBasicModel(FILE2_SUFFIX));
+ resource3.getContents().add(createBasicModel(FILE3_SUFFIX));
+
+ save(resource1, resource2, resource3);
+ }
+
+ @Override
+ @After
+ public void tearDown() throws Exception {
+ resolver.dispose();
+ super.tearDown();
+ }
+
+ @Test
+ public void testScopeNoDependencies() {
+ StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
+ assertEquals(traversal.getStorages().size(), 1);
+ assertTrue(traversal.getStorages().contains(iFile1));
+
+ traversal = resolver.resolveLocalModel(iFile2, monitor);
+ assertEquals(traversal.getStorages().size(), 1);
+ assertTrue(traversal.getStorages().contains(iFile2));
+
+ traversal = resolver.resolveLocalModel(iFile3, monitor);
+ assertEquals(traversal.getStorages().size(), 1);
+ assertTrue(traversal.getStorages().contains(iFile3));
+ }
+
+ @Test
+ public void testScopeAddedDependency() throws Exception {
+ makeCrossReference(resource2, resource1);
+ save(resource2);
+
+ StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
+ assertEquals(traversal.getStorages().size(), 2);
+ assertTrue(traversal.getStorages().contains(iFile1));
+ assertTrue(traversal.getStorages().contains(iFile2));
+
+ traversal = resolver.resolveLocalModel(iFile2, monitor);
+ assertEquals(traversal.getStorages().size(), 2);
+ assertTrue(traversal.getStorages().contains(iFile1));
+ assertTrue(traversal.getStorages().contains(iFile2));
+ }
+
+ @Test
+ public void testScopeRemovedDependency() throws Exception {
+ makeCrossReference(resource2, resource1);
+ save(resource2);
+
+ breakCrossReferences(resource2, resource1);
+ save(resource2);
+
+ StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
+ assertEquals(traversal.getStorages().size(), 1);
+ assertTrue(traversal.getStorages().contains(iFile1));
+
+ traversal = resolver.resolveLocalModel(iFile2, monitor);
+ assertEquals(traversal.getStorages().size(), 1);
+ assertTrue(traversal.getStorages().contains(iFile2));
+ }
+
+ @Test
+ public void testScopeDepth() throws Exception {
+ makeCrossReference(resource2, resource1);
+ makeCrossReference(resource3, resource2);
+ save(resource2, resource3);
+
+ StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
+ assertEquals(traversal.getStorages().size(), 3);
+ assertTrue(traversal.getStorages().contains(iFile1));
+ assertTrue(traversal.getStorages().contains(iFile2));
+ assertTrue(traversal.getStorages().contains(iFile3));
+
+ traversal = resolver.resolveLocalModel(iFile2, monitor);
+ assertEquals(traversal.getStorages().size(), 3);
+ assertTrue(traversal.getStorages().contains(iFile1));
+ assertTrue(traversal.getStorages().contains(iFile2));
+ assertTrue(traversal.getStorages().contains(iFile3));
+
+ traversal = resolver.resolveLocalModel(iFile3, monitor);
+ assertEquals(traversal.getStorages().size(), 3);
+ assertTrue(traversal.getStorages().contains(iFile1));
+ assertTrue(traversal.getStorages().contains(iFile2));
+ assertTrue(traversal.getStorages().contains(iFile3));
+ }
+
+ @Test
+ public void testScopeUpdate() throws Exception {
+ makeCrossReference(resource2, resource1);
+ makeCrossReference(resource3, resource2);
+ save(resource2, resource3);
+
+ StorageTraversal traversal = resolver.resolveLocalModel(iFile1, monitor);
+ assertEquals(traversal.getStorages().size(), 3);
+ assertTrue(traversal.getStorages().contains(iFile1));
+ assertTrue(traversal.getStorages().contains(iFile2));
+ assertTrue(traversal.getStorages().contains(iFile3));
+
+ breakCrossReferences(resource2, resource1);
+ save(resource2);
+
+ traversal = resolver.resolveLocalModel(iFile1, monitor);
+ assertEquals(traversal.getStorages().size(), 1);
+ assertTrue(traversal.getStorages().contains(iFile1));
+
+ traversal = resolver.resolveLocalModel(iFile2, monitor);
+ assertEquals(traversal.getStorages().size(), 2);
+ assertTrue(traversal.getStorages().contains(iFile2));
+ assertTrue(traversal.getStorages().contains(iFile3));
+
+ breakCrossReferences(resource3, resource2);
+ makeCrossReference(resource3, resource1);
+ save(resource3);
+
+ traversal = resolver.resolveLocalModel(iFile1, monitor);
+ assertEquals(traversal.getStorages().size(), 2);
+ assertTrue(traversal.getStorages().contains(iFile1));
+ assertTrue(traversal.getStorages().contains(iFile3));
+
+ traversal = resolver.resolveLocalModel(iFile2, monitor);
+ assertEquals(traversal.getStorages().size(), 1);
+ assertTrue(traversal.getStorages().contains(iFile2));
+
+ traversal = resolver.resolveLocalModel(iFile3, monitor);
+ assertEquals(traversal.getStorages().size(), 2);
+ assertTrue(traversal.getStorages().contains(iFile1));
+ assertTrue(traversal.getStorages().contains(iFile3));
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/workspace/TestProject.java b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/workspace/TestProject.java
index 8e4aa2cf4..848dce770 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/workspace/TestProject.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/workspace/TestProject.java
@@ -1,153 +1,153 @@
-/*******************************************************************************
- * Copyright (C) 2013 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
- *******************************************************************************/
-package org.eclipse.emf.compare.ide.ui.tests.workspace;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-
-@SuppressWarnings("nls")
-public class TestProject {
- /** The underlying eclipse project. */
- private IProject project;
-
- /**
- * Creates a new project in the workspace with a default name. An existing test project with that name
- * will be deleted and re-created.
- */
- public TestProject() throws CoreException {
- this("Project-1");
- }
-
- /**
- * This will create a new project with the given name inside the workspace. If this project already
- * existed, it will be deleted and re-created.
- *
- * @param name
- * Name of our project.
- */
- public TestProject(String name) throws CoreException {
- final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription(name);
- project = root.getProject(description.getName());
- if (project.exists()) {
- project.delete(true, true, new NullProgressMonitor());
- }
- project.create(description, new NullProgressMonitor());
- project.open(new NullProgressMonitor());
- }
-
- public IProject getProject() {
- return project;
- }
-
- /**
- * Create or get a file for the given path.
- *
- * @param project
- * Instance of project inside which a file will be created.
- * @param path
- * Project-relative path for the new file.
- * @return Newly created file
- */
- public File getOrCreateFile(IProject aProject, String path) throws IOException {
- String fullPath = aProject.getLocation().append(path).toOSString();
- int lastSeparator = fullPath.lastIndexOf(File.separator);
- mkdirs(new File(fullPath.substring(0, lastSeparator)), true);
-
- File file = new File(fullPath);
- if (!file.exists()) {
- createNewFile(file);
- }
-
- return file;
- }
-
- /**
- * Find an IFile corresponding to the given java.io.File within the given project.
- *
- * @param aProject
- * The project within which we're searching for a file.
- * @param file
- * java.io.File for which we're searching a corresponding eclipse IFile.
- * @return The IFile we found for the given file.
- */
- public IFile getIFile(IProject aProject, File file) throws CoreException {
- IPath filePath = new Path(file.getAbsolutePath());
- String relativePath = filePath.makeRelativeTo(aProject.getLocation()).toString();
-
- String quotedProjectName = Pattern.quote(aProject.getName());
- relativePath = relativePath.replaceFirst(quotedProjectName, "");
-
- IFile iFile = aProject.getFile(relativePath);
- iFile.refreshLocal(0, new NullProgressMonitor());
-
- return iFile;
- }
-
- /**
- * Creates the directory named by this abstract pathname, including any necessary but nonexistent parent
- * directories. Note that if this operation fails it may have succeeded in creating some of the necessary
- * parent directories.
- *
- * @param d
- * directory to be created
- * @param skipExisting
- * if {@code true} skip creation of the given directory if it already exists in the file system
- * @throws IOException
- * if creation of {@code d} fails. This may occur if {@code d} did exist when the method was
- * called. This can therefore cause IOExceptions during race conditions when multiple
- * concurrent threads all try to create the same directory.
- */
- private static void mkdirs(final File d, boolean skipExisting) throws IOException {
- if (!d.mkdirs()) {
- if (skipExisting && d.isDirectory()) {
- return;
- }
- }
- }
-
- private static void createNewFile(File f) throws IOException {
- f.createNewFile();
- }
-
- public IFile createFile(String name, byte[] content) throws Exception {
- IFile file = project.getFile(name);
- InputStream inputStream = new ByteArrayInputStream(content);
- file.create(inputStream, true, new NullProgressMonitor());
-
- return file;
- }
-
- public IFolder createFolder(String name) throws Exception {
- IFolder folder = project.getFolder(name);
- folder.create(true, true, new NullProgressMonitor());
-
- return folder;
- }
-
- public void dispose() throws CoreException, IOException {
- if (project.exists()) {
- project.delete(true, true, new NullProgressMonitor());
- }
- }
-}
+/*******************************************************************************
+ * Copyright (C) 2013 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
+ *******************************************************************************/
+package org.eclipse.emf.compare.ide.ui.tests.workspace;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+@SuppressWarnings("nls")
+public class TestProject {
+ /** The underlying eclipse project. */
+ private IProject project;
+
+ /**
+ * Creates a new project in the workspace with a default name. An existing test project with that name
+ * will be deleted and re-created.
+ */
+ public TestProject() throws CoreException {
+ this("Project-1");
+ }
+
+ /**
+ * This will create a new project with the given name inside the workspace. If this project already
+ * existed, it will be deleted and re-created.
+ *
+ * @param name
+ * Name of our project.
+ */
+ public TestProject(String name) throws CoreException {
+ final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription(name);
+ project = root.getProject(description.getName());
+ if (project.exists()) {
+ project.delete(true, true, new NullProgressMonitor());
+ }
+ project.create(description, new NullProgressMonitor());
+ project.open(new NullProgressMonitor());
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ /**
+ * Create or get a file for the given path.
+ *
+ * @param project
+ * Instance of project inside which a file will be created.
+ * @param path
+ * Project-relative path for the new file.
+ * @return Newly created file
+ */
+ public File getOrCreateFile(IProject aProject, String path) throws IOException {
+ String fullPath = aProject.getLocation().append(path).toOSString();
+ int lastSeparator = fullPath.lastIndexOf(File.separator);
+ mkdirs(new File(fullPath.substring(0, lastSeparator)), true);
+
+ File file = new File(fullPath);
+ if (!file.exists()) {
+ createNewFile(file);
+ }
+
+ return file;
+ }
+
+ /**
+ * Find an IFile corresponding to the given java.io.File within the given project.
+ *
+ * @param aProject
+ * The project within which we're searching for a file.
+ * @param file
+ * java.io.File for which we're searching a corresponding eclipse IFile.
+ * @return The IFile we found for the given file.
+ */
+ public IFile getIFile(IProject aProject, File file) throws CoreException {
+ IPath filePath = new Path(file.getAbsolutePath());
+ String relativePath = filePath.makeRelativeTo(aProject.getLocation()).toString();
+
+ String quotedProjectName = Pattern.quote(aProject.getName());
+ relativePath = relativePath.replaceFirst(quotedProjectName, "");
+
+ IFile iFile = aProject.getFile(relativePath);
+ iFile.refreshLocal(0, new NullProgressMonitor());
+
+ return iFile;
+ }
+
+ /**
+ * Creates the directory named by this abstract pathname, including any necessary but nonexistent parent
+ * directories. Note that if this operation fails it may have succeeded in creating some of the necessary
+ * parent directories.
+ *
+ * @param d
+ * directory to be created
+ * @param skipExisting
+ * if {@code true} skip creation of the given directory if it already exists in the file system
+ * @throws IOException
+ * if creation of {@code d} fails. This may occur if {@code d} did exist when the method was
+ * called. This can therefore cause IOExceptions during race conditions when multiple
+ * concurrent threads all try to create the same directory.
+ */
+ private static void mkdirs(final File d, boolean skipExisting) throws IOException {
+ if (!d.mkdirs()) {
+ if (skipExisting && d.isDirectory()) {
+ return;
+ }
+ }
+ }
+
+ private static void createNewFile(File f) throws IOException {
+ f.createNewFile();
+ }
+
+ public IFile createFile(String name, byte[] content) throws Exception {
+ IFile file = project.getFile(name);
+ InputStream inputStream = new ByteArrayInputStream(content);
+ file.create(inputStream, true, new NullProgressMonitor());
+
+ return file;
+ }
+
+ public IFolder createFolder(String name) throws Exception {
+ IFolder folder = project.getFolder(name);
+ folder.create(true, true, new NullProgressMonitor());
+
+ return folder;
+ }
+
+ public void dispose() throws CoreException, IOException {
+ if (project.exists()) {
+ project.delete(true, true, new NullProgressMonitor());
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui.tests/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.rcp.ui.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.rcp.ui.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui.tests/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.rcp.ui.tests/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.rcp.ui.tests/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.tests.fuzzy/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.tests.fuzzy/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests.fuzzy/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.tests.fuzzy/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.tests.fuzzy/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..5a0ad22d2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests.fuzzy/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.tests/.project b/plugins/org.eclipse.emf.compare.tests/.project
index 436d6c947..10615551b 100644
--- a/plugins/org.eclipse.emf.compare.tests/.project
+++ b/plugins/org.eclipse.emf.compare.tests/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.compare.tests</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>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.compare.tests</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.tests/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.resources.prefs
index 4824b8026..99f26c020 100644
--- a/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.resources.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.runtime.prefs
index f8a67de1d..5a0ad22d2 100644
--- a/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.runtime.prefs
+++ b/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.core.runtime.prefs
@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-line.separator=\r\n
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.jdt.ui.prefs
index 4517c0f23..4e1442ee9 100644
--- a/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.emf.compare.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -1,60 +1,60 @@
-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
+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.tests/build.properties b/plugins/org.eclipse.emf.compare.tests/build.properties
index 395e6a4c0..94eb7bb2d 100644
--- a/plugins/org.eclipse.emf.compare.tests/build.properties
+++ b/plugins/org.eclipse.emf.compare.tests/build.properties
@@ -1,20 +1,20 @@
-# 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
-
-bin.includes = .,\
- model/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties,\
- about.html
-jars.compile.order = .
-source.. = src/,\
- src-gen/
-output.. = bin/
-src.includes = about.html
+# 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
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src/,\
+ src-gen/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel b/plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel
index 54e348a7d..f71641ec5 100644
--- a/plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel
+++ b/plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel
@@ -1,47 +1,47 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2011, 2012 Obeo.&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Obeo - initial API and implementation"
- modelDirectory="/org.eclipse.emf.compare.tests/src-gen" modelPluginID="org.eclipse.emf.compare.tests"
- modelName="Nodes" nonNLSMarkers="true" importerID="org.eclipse.emf.importer.ecore"
- containmentProxies="true" complianceLevel="5.0" runtimeVersion="2.4">
- <foreignModel>nodes.ecore</foreignModel>
- <genPackages prefix="Nodes" basePackage="org.eclipse.emf.compare.tests" resource="XMI"
- disposableProviderFactory="true" contentTypeIdentifier="org.eclipse.emf.compare.test.nodes.contenttype"
- ecorePackage="nodes.ecore#/">
- <genClasses ecoreClass="nodes.ecore#//Node">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//Node/name"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//Node/containmentRef1"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeMultipleContainment">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeMultipleContainment/containmentRef2"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeMultipleContainment/containmentRef3"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeSingleValueContainment">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeSingleValueContainment/singleValueContainment"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeSingleValueAttribute">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//NodeSingleValueAttribute/singleValuedAttribute"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeMultiValuedAttribute">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//NodeMultiValuedAttribute/multiValuedAttribute"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeSingleValueReference">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeSingleValueReference/singleValuedReference"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeMultiValueReference">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeMultiValueReference/multiValuedReference"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeOppositeRefOneToOne">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefOneToOne/source"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefOneToOne/destination"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeOppositeRefOneToMany">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefOneToMany/source"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefOneToMany/destination"/>
- </genClasses>
- <genClasses ecoreClass="nodes.ecore#//NodeOppositeRefManyToMany">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefManyToMany/source"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefManyToMany/destination"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2011, 2012 Obeo.&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Obeo - initial API and implementation"
+ modelDirectory="/org.eclipse.emf.compare.tests/src-gen" modelPluginID="org.eclipse.emf.compare.tests"
+ modelName="Nodes" nonNLSMarkers="true" importerID="org.eclipse.emf.importer.ecore"
+ containmentProxies="true" complianceLevel="5.0" runtimeVersion="2.4">
+ <foreignModel>nodes.ecore</foreignModel>
+ <genPackages prefix="Nodes" basePackage="org.eclipse.emf.compare.tests" resource="XMI"
+ disposableProviderFactory="true" contentTypeIdentifier="org.eclipse.emf.compare.test.nodes.contenttype"
+ ecorePackage="nodes.ecore#/">
+ <genClasses ecoreClass="nodes.ecore#//Node">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//Node/name"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//Node/containmentRef1"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeMultipleContainment">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeMultipleContainment/containmentRef2"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeMultipleContainment/containmentRef3"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeSingleValueContainment">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeSingleValueContainment/singleValueContainment"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeSingleValueAttribute">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//NodeSingleValueAttribute/singleValuedAttribute"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeMultiValuedAttribute">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//NodeMultiValuedAttribute/multiValuedAttribute"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeSingleValueReference">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeSingleValueReference/singleValuedReference"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeMultiValueReference">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeMultiValueReference/multiValuedReference"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeOppositeRefOneToOne">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefOneToOne/source"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefOneToOne/destination"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeOppositeRefOneToMany">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefOneToMany/source"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefOneToMany/destination"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//NodeOppositeRefManyToMany">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefManyToMany/source"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//NodeOppositeRefManyToMany/destination"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.compare.tests/plugin.xml b/plugins/org.eclipse.emf.compare.tests/plugin.xml
index 19422b1af..cff36fcb8 100644
--- a/plugins/org.eclipse.emf.compare.tests/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.tests/plugin.xml
@@ -1,44 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.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
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="http://www.eclipse.org/emf/compare/tests/nodes"
- class="org.eclipse.emf.compare.tests.nodes.NodesPackage"
- genModel="model/nodes.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="nodes"
- class="org.eclipse.emf.compare.tests.nodes.util.NodesResourceFactoryImpl"/>
- </extension>
-
- <extension point="org.eclipse.core.contenttype.contentTypes">
- <content-type
- base-type="org.eclipse.emf.ecore.xmi"
- file-extensions="nodes"
- id="org.eclipse.emf.compare.test.nodes.contenttype"
- name="%_UI_Nodes_content_type"
- priority="normal">
- <describer class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
- <parameter name="namespace" value="http://www.eclipse.org/emf/compare/tests/nodes"/>
- <parameter name="kind" value="xmi"/>
- </describer>
- </content-type>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.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
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/emf/compare/tests/nodes"
+ class="org.eclipse.emf.compare.tests.nodes.NodesPackage"
+ genModel="model/nodes.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ type="nodes"
+ class="org.eclipse.emf.compare.tests.nodes.util.NodesResourceFactoryImpl"/>
+ </extension>
+
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="org.eclipse.emf.ecore.xmi"
+ file-extensions="nodes"
+ id="org.eclipse.emf.compare.test.nodes.contenttype"
+ name="%_UI_Nodes_content_type"
+ priority="normal">
+ <describer class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
+ <parameter name="namespace" value="http://www.eclipse.org/emf/compare/tests/nodes"/>
+ <parameter name="kind" value="xmi"/>
+ </describer>
+ </content-type>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.emf.compare.tests/pom.xml b/plugins/org.eclipse.emf.compare.tests/pom.xml
index 611eb3398..8ac99ff98 100644
--- a/plugins/org.eclipse.emf.compare.tests/pom.xml
+++ b/plugins/org.eclipse.emf.compare.tests/pom.xml
@@ -1,50 +1,50 @@
-<?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>3.0.0-SNAPSHOT</version>
- <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
- </parent>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>org.eclipse.emf.compare.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <build>
- <resources>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>src-gen</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <includes>
- <include>org/eclipse/emf/compare/tests/suite/AllTests.class</include>
- <!--
- <include>org/eclipse/emf/compare/tests/suite/AllPluginTests.class</include>
- -->
- </includes>
- <useUIHarness>false</useUIHarness>
- <useUIThread>false</useUIThread>
- <appArgLine>-Xmx1024m -XX:MaxPermSize=256m</appArgLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<?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>3.0.0-SNAPSHOT</version>
+ <relativePath>../../org.eclipse.emf.compare-parent</relativePath>
+ </parent>
+ <groupId>org.eclipse.emf.compare</groupId>
+ <artifactId>org.eclipse.emf.compare.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src-gen</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <includes>
+ <include>org/eclipse/emf/compare/tests/suite/AllTests.class</include>
+ <!--
+ <include>org/eclipse/emf/compare/tests/suite/AllPluginTests.class</include>
+ -->
+ </includes>
+ <useUIHarness>false</useUIHarness>
+ <useUIThread>false</useUIThread>
+ <appArgLine>-Xmx1024m -XX:MaxPermSize=256m</appArgLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java
index 717859577..0eac182ec 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java
@@ -1,84 +1,84 @@
-/**
- * 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.tests.nodes;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.Node#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.Node#getContainmentRef1 <em>Containment Ref1</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode()
- * @model
- * @generated
- */
-public interface Node extends EObject {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode_Name()
- * @model id="true"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Node#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Containment Ref1</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Containment Ref1</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Containment Ref1</em>' containment reference list.
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode_ContainmentRef1()
- * @model containment="true" resolveProxies="true"
- * @generated
- */
- EList<Node> getContainmentRef1();
-
-} // Node
+/**
+ * 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.tests.nodes;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Node#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Node#getContainmentRef1 <em>Containment Ref1</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode()
+ * @model
+ * @generated
+ */
+public interface Node extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode_Name()
+ * @model id="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Node#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Containment Ref1</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Containment Ref1</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Containment Ref1</em>' containment reference list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode_ContainmentRef1()
+ * @model containment="true" resolveProxies="true"
+ * @generated
+ */
+ EList<Node> getContainmentRef1();
+
+} // Node
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java
index b80791f8c..57d33c54e 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java
@@ -1,55 +1,55 @@
-/**
- * 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.tests.nodes;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Multi Value Reference</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference#getMultiValuedReference <em>Multi Valued Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValueReference()
- * @model
- * @generated
- */
-public interface NodeMultiValueReference extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Multi Valued Reference</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Multi Valued Reference</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Multi Valued Reference</em>' reference list.
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValueReference_MultiValuedReference()
- * @model
- * @generated
- */
- EList<Node> getMultiValuedReference();
-
-} // NodeMultiValueReference
+/**
+ * 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.tests.nodes;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Multi Value Reference</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference#getMultiValuedReference <em>Multi Valued Reference</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValueReference()
+ * @model
+ * @generated
+ */
+public interface NodeMultiValueReference extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Multi Valued Reference</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Multi Valued Reference</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Multi Valued Reference</em>' reference list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValueReference_MultiValuedReference()
+ * @model
+ * @generated
+ */
+ EList<Node> getMultiValuedReference();
+
+} // NodeMultiValueReference
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java
index 6486107b2..4a7eec1a7 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java
@@ -1,55 +1,55 @@
-/**
- * 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.tests.nodes;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Multi Valued Attribute</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute#getMultiValuedAttribute <em>Multi Valued Attribute</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValuedAttribute()
- * @model
- * @generated
- */
-public interface NodeMultiValuedAttribute extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Multi Valued Attribute</b></em>' attribute list.
- * The list contents are of type {@link java.lang.String}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Multi Valued Attribute</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Multi Valued Attribute</em>' attribute list.
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValuedAttribute_MultiValuedAttribute()
- * @model
- * @generated
- */
- EList<String> getMultiValuedAttribute();
-
-} // NodeMultiValuedAttribute
+/**
+ * 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.tests.nodes;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Multi Valued Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute#getMultiValuedAttribute <em>Multi Valued Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValuedAttribute()
+ * @model
+ * @generated
+ */
+public interface NodeMultiValuedAttribute extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Multi Valued Attribute</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Multi Valued Attribute</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Multi Valued Attribute</em>' attribute list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValuedAttribute_MultiValuedAttribute()
+ * @model
+ * @generated
+ */
+ EList<String> getMultiValuedAttribute();
+
+} // NodeMultiValuedAttribute
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java
index f0bfccd8e..64526dd40 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java
@@ -1,72 +1,72 @@
-/**
- * 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.tests.nodes;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Multiple Containment</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef2 <em>Containment Ref2</em>}</li>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef3 <em>Containment Ref3</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment()
- * @model
- * @generated
- */
-public interface NodeMultipleContainment extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Containment Ref2</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Containment Ref2</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Containment Ref2</em>' containment reference list.
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment_ContainmentRef2()
- * @model containment="true" resolveProxies="true"
- * @generated
- */
- EList<Node> getContainmentRef2();
-
- /**
- * Returns the value of the '<em><b>Containment Ref3</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Containment Ref3</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Containment Ref3</em>' containment reference list.
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment_ContainmentRef3()
- * @model containment="true" resolveProxies="true"
- * @generated
- */
- EList<Node> getContainmentRef3();
-
-} // NodeMultipleContainment
+/**
+ * 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.tests.nodes;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Multiple Containment</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef2 <em>Containment Ref2</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef3 <em>Containment Ref3</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment()
+ * @model
+ * @generated
+ */
+public interface NodeMultipleContainment extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Containment Ref2</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Containment Ref2</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Containment Ref2</em>' containment reference list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment_ContainmentRef2()
+ * @model containment="true" resolveProxies="true"
+ * @generated
+ */
+ EList<Node> getContainmentRef2();
+
+ /**
+ * Returns the value of the '<em><b>Containment Ref3</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Containment Ref3</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Containment Ref3</em>' containment reference list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment_ContainmentRef3()
+ * @model containment="true" resolveProxies="true"
+ * @generated
+ */
+ EList<Node> getContainmentRef3();
+
+} // NodeMultipleContainment
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefManyToMany.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefManyToMany.java
index 6c50342ef..836a13a92 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefManyToMany.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefManyToMany.java
@@ -1,76 +1,76 @@
-/**
- * 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.tests.nodes;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Opposite Ref Many To Many</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getSource <em>Source</em>}</li>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getDestination <em>Destination</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefManyToMany()
- * @model
- * @generated
- */
-public interface NodeOppositeRefManyToMany extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Source</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany}.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getDestination <em>Destination</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Source</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Source</em>' reference list.
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefManyToMany_Source()
- * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getDestination
- * @model opposite="destination"
- * @generated
- */
- EList<NodeOppositeRefManyToMany> getSource();
-
- /**
- * Returns the value of the '<em><b>Destination</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany}.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getSource <em>Source</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Destination</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Destination</em>' reference list.
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefManyToMany_Destination()
- * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getSource
- * @model opposite="source"
- * @generated
- */
- EList<NodeOppositeRefManyToMany> getDestination();
-
-} // NodeOppositeRefManyToMany
+/**
+ * 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.tests.nodes;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Opposite Ref Many To Many</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getDestination <em>Destination</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefManyToMany()
+ * @model
+ * @generated
+ */
+public interface NodeOppositeRefManyToMany extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Source</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getDestination <em>Destination</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Source</em>' reference list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefManyToMany_Source()
+ * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getDestination
+ * @model opposite="destination"
+ * @generated
+ */
+ EList<NodeOppositeRefManyToMany> getSource();
+
+ /**
+ * Returns the value of the '<em><b>Destination</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getSource <em>Source</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Destination</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Destination</em>' reference list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefManyToMany_Destination()
+ * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefManyToMany#getSource
+ * @model opposite="source"
+ * @generated
+ */
+ EList<NodeOppositeRefManyToMany> getDestination();
+
+} // NodeOppositeRefManyToMany
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToMany.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToMany.java
index fb4c0e498..ce511a572 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToMany.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToMany.java
@@ -1,86 +1,86 @@
-/**
- * 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.tests.nodes;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Opposite Ref One To Many</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getSource <em>Source</em>}</li>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getDestination <em>Destination</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToMany()
- * @model
- * @generated
- */
-public interface NodeOppositeRefOneToMany extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Source</b></em>' reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getDestination <em>Destination</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Source</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Source</em>' reference.
- * @see #setSource(NodeOppositeRefOneToMany)
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToMany_Source()
- * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getDestination
- * @model opposite="destination"
- * @generated
- */
- NodeOppositeRefOneToMany getSource();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getSource <em>Source</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Source</em>' reference.
- * @see #getSource()
- * @generated
- */
- void setSource(NodeOppositeRefOneToMany value);
-
- /**
- * Returns the value of the '<em><b>Destination</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany}.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getSource <em>Source</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Destination</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Destination</em>' reference list.
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToMany_Destination()
- * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getSource
- * @model opposite="source"
- * @generated
- */
- EList<NodeOppositeRefOneToMany> getDestination();
-
-} // NodeOppositeRefOneToMany
+/**
+ * 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.tests.nodes;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Opposite Ref One To Many</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getDestination <em>Destination</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToMany()
+ * @model
+ * @generated
+ */
+public interface NodeOppositeRefOneToMany extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Source</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getDestination <em>Destination</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Source</em>' reference.
+ * @see #setSource(NodeOppositeRefOneToMany)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToMany_Source()
+ * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getDestination
+ * @model opposite="destination"
+ * @generated
+ */
+ NodeOppositeRefOneToMany getSource();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getSource <em>Source</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Source</em>' reference.
+ * @see #getSource()
+ * @generated
+ */
+ void setSource(NodeOppositeRefOneToMany value);
+
+ /**
+ * Returns the value of the '<em><b>Destination</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getSource <em>Source</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Destination</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Destination</em>' reference list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToMany_Destination()
+ * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToMany#getSource
+ * @model opposite="source"
+ * @generated
+ */
+ EList<NodeOppositeRefOneToMany> getDestination();
+
+} // NodeOppositeRefOneToMany
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToOne.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToOne.java
index faf5541f3..4531296b1 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToOne.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeOppositeRefOneToOne.java
@@ -1,95 +1,95 @@
-/**
- * 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.tests.nodes;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Opposite Ref One To One</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getSource <em>Source</em>}</li>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getDestination <em>Destination</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToOne()
- * @model
- * @generated
- */
-public interface NodeOppositeRefOneToOne extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Source</b></em>' reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getDestination <em>Destination</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Source</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Source</em>' reference.
- * @see #setSource(NodeOppositeRefOneToOne)
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToOne_Source()
- * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getDestination
- * @model opposite="destination"
- * @generated
- */
- NodeOppositeRefOneToOne getSource();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getSource <em>Source</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Source</em>' reference.
- * @see #getSource()
- * @generated
- */
- void setSource(NodeOppositeRefOneToOne value);
-
- /**
- * Returns the value of the '<em><b>Destination</b></em>' reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getSource <em>Source</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Destination</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Destination</em>' reference.
- * @see #setDestination(NodeOppositeRefOneToOne)
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToOne_Destination()
- * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getSource
- * @model opposite="source"
- * @generated
- */
- NodeOppositeRefOneToOne getDestination();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getDestination <em>Destination</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Destination</em>' reference.
- * @see #getDestination()
- * @generated
- */
- void setDestination(NodeOppositeRefOneToOne value);
-
-} // NodeOppositeRefOneToOne
+/**
+ * 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.tests.nodes;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Opposite Ref One To One</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getDestination <em>Destination</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToOne()
+ * @model
+ * @generated
+ */
+public interface NodeOppositeRefOneToOne extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Source</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getDestination <em>Destination</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Source</em>' reference.
+ * @see #setSource(NodeOppositeRefOneToOne)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToOne_Source()
+ * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getDestination
+ * @model opposite="destination"
+ * @generated
+ */
+ NodeOppositeRefOneToOne getSource();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getSource <em>Source</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Source</em>' reference.
+ * @see #getSource()
+ * @generated
+ */
+ void setSource(NodeOppositeRefOneToOne value);
+
+ /**
+ * Returns the value of the '<em><b>Destination</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getSource <em>Source</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Destination</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Destination</em>' reference.
+ * @see #setDestination(NodeOppositeRefOneToOne)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeOppositeRefOneToOne_Destination()
+ * @see org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getSource
+ * @model opposite="source"
+ * @generated
+ */
+ NodeOppositeRefOneToOne getDestination();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeOppositeRefOneToOne#getDestination <em>Destination</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Destination</em>' reference.
+ * @see #getDestination()
+ * @generated
+ */
+ void setDestination(NodeOppositeRefOneToOne value);
+
+} // NodeOppositeRefOneToOne
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java
index c5b7d5898..7a4942d02 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java
@@ -1,64 +1,64 @@
-/**
- * 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.tests.nodes;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Single Value Attribute</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute#getSingleValuedAttribute <em>Single Valued Attribute</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueAttribute()
- * @model
- * @generated
- */
-public interface NodeSingleValueAttribute extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Single Valued Attribute</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Single Valued Attribute</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Single Valued Attribute</em>' attribute.
- * @see #setSingleValuedAttribute(String)
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueAttribute_SingleValuedAttribute()
- * @model
- * @generated
- */
- String getSingleValuedAttribute();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute#getSingleValuedAttribute <em>Single Valued Attribute</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Single Valued Attribute</em>' attribute.
- * @see #getSingleValuedAttribute()
- * @generated
- */
- void setSingleValuedAttribute(String value);
-
-} // NodeSingleValueAttribute
+/**
+ * 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.tests.nodes;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Single Value Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute#getSingleValuedAttribute <em>Single Valued Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueAttribute()
+ * @model
+ * @generated
+ */
+public interface NodeSingleValueAttribute extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Single Valued Attribute</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Single Valued Attribute</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Single Valued Attribute</em>' attribute.
+ * @see #setSingleValuedAttribute(String)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueAttribute_SingleValuedAttribute()
+ * @model
+ * @generated
+ */
+ String getSingleValuedAttribute();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute#getSingleValuedAttribute <em>Single Valued Attribute</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Single Valued Attribute</em>' attribute.
+ * @see #getSingleValuedAttribute()
+ * @generated
+ */
+ void setSingleValuedAttribute(String value);
+
+} // NodeSingleValueAttribute
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java
index dd737a843..11c04755e 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java
@@ -1,64 +1,64 @@
-/**
- * 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.tests.nodes;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Single Value Containment</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment#getSingleValueContainment <em>Single Value Containment</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueContainment()
- * @model
- * @generated
- */
-public interface NodeSingleValueContainment extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Single Value Containment</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Single Value Containment</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Single Value Containment</em>' containment reference.
- * @see #setSingleValueContainment(Node)
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueContainment_SingleValueContainment()
- * @model containment="true" resolveProxies="true"
- * @generated
- */
- Node getSingleValueContainment();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment#getSingleValueContainment <em>Single Value Containment</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Single Value Containment</em>' containment reference.
- * @see #getSingleValueContainment()
- * @generated
- */
- void setSingleValueContainment(Node value);
-
-} // NodeSingleValueContainment
+/**
+ * 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.tests.nodes;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Single Value Containment</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment#getSingleValueContainment <em>Single Value Containment</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueContainment()
+ * @model
+ * @generated
+ */
+public interface NodeSingleValueContainment extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Single Value Containment</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Single Value Containment</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Single Value Containment</em>' containment reference.
+ * @see #setSingleValueContainment(Node)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueContainment_SingleValueContainment()
+ * @model containment="true" resolveProxies="true"
+ * @generated
+ */
+ Node getSingleValueContainment();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment#getSingleValueContainment <em>Single Value Containment</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Single Value Containment</em>' containment reference.
+ * @see #getSingleValueContainment()
+ * @generated
+ */
+ void setSingleValueContainment(Node value);
+
+} // NodeSingleValueContainment
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueReference.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueReference.java
index e19bbb34f..598afc863 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueReference.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueReference.java
@@ -1,64 +1,64 @@
-/**
- * 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.tests.nodes;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Node Single Value Reference</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference#getSingleValuedReference <em>Single Valued Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueReference()
- * @model
- * @generated
- */
-public interface NodeSingleValueReference extends Node {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * Returns the value of the '<em><b>Single Valued Reference</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Single Valued Reference</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Single Valued Reference</em>' reference.
- * @see #setSingleValuedReference(Node)
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueReference_SingleValuedReference()
- * @model
- * @generated
- */
- Node getSingleValuedReference();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference#getSingleValuedReference <em>Single Valued Reference</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Single Valued Reference</em>' reference.
- * @see #getSingleValuedReference()
- * @generated
- */
- void setSingleValuedReference(Node value);
-
-} // NodeSingleValueReference
+/**
+ * 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.tests.nodes;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Single Value Reference</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference#getSingleValuedReference <em>Single Valued Reference</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueReference()
+ * @model
+ * @generated
+ */
+public interface NodeSingleValueReference extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Single Valued Reference</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Single Valued Reference</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Single Valued Reference</em>' reference.
+ * @see #setSingleValuedReference(Node)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueReference_SingleValuedReference()
+ * @model
+ * @generated
+ */
+ Node getSingleValuedReference();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference#getSingleValuedReference <em>Single Valued Reference</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Single Valued Reference</em>' reference.
+ * @see #getSingleValuedReference()
+ * @generated
+ */
+ void setSingleValuedReference(Node value);
+
+} // NodeSingleValueReference
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java
index ebb370ccf..00e88b927 100644
--- a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java
@@ -1,138 +1,138 @@
-/**
- * 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.tests.nodes;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.compare.tests.nodes.NodesPackage
- * @generated
- */
-public interface NodesFactory extends EFactory {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String copyright = "Copyright (c) 2011, 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- NodesFactory eINSTANCE = org.eclipse.emf.compare.tests.nodes.impl.NodesFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Node</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node</em>'.
- * @generated
- */
- Node createNode();
-
- /**
- * Returns a new object of class '<em>Node Multiple Containment</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node Multiple Containment</em>'.
- * @generated
- */
- NodeMultipleContainment createNodeMultipleContainment();
-
- /**
- * Returns a new object of class '<em>Node Single Value Containment</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node Single Value Containment</em>'.
- * @generated
- */
- NodeSingleValueContainment createNodeSingleValueContainment();
-
- /**
- * Returns a new object of class '<em>Node Single Value Attribute</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node Single Value Attribute</em>'.
- * @generated
- */
- NodeSingleValueAttribute createNodeSingleValueAttribute();
-
- /**
- * Returns a new object of class '<em>Node Multi Valued Attribute</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node Multi Valued Attribute</em>'.
- * @generated
- */
- NodeMultiValuedAttribute createNodeMultiValuedAttribute();
-
- /**
- * Returns a new object of class '<em>Node Single Value Reference</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node Single Value Reference</em>'.
- * @generated
- */
- NodeSingleValueReference createNodeSingleValueReference();
-
- /**
- * Returns a new object of class '<em>Node Multi Value Reference</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node Multi Value Reference</em>'.
- * @generated
- */
- NodeMultiValueReference createNodeMultiValueReference();
-
- /**
- * Returns a new object of class '<em>Node Opposite Ref One To One</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node Opposite Ref One To One</em>'.
- * @generated
- */
- NodeOppositeRefOneToOne createNodeOppositeRefOneToOne();
-
- /**
- * Returns a new object of class '<em>Node Opposite Ref One To Many</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Node Opposite Ref One To Many</em>'.
- * @generated
- */
- NodeOppositeRefOneToMany createNodeOppositeRefOneToMany();
-
- /**
- * Returns a new object of class '<em>Node Opposite Ref Many To Many</em>'.
- * <!-- begin-user-doc -->