Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/cdo
diff options
context:
space:
mode:
authorQuentin Le Menez2018-10-18 16:34:32 +0000
committerQuentin Le Menez2018-10-18 16:34:32 +0000
commit9f8fddd820e0f9f4488f1dbebce270d97bab2ba6 (patch)
treef4cc76bbcd0f3d65f9259a5d46faed95b9d28a71 /cdo
parentecd1dcd809a49ab48ee59032ea4d0aadf91cf6dc (diff)
downloadorg.eclipse.papyrus-collaborativemodeling-9f8fddd820e0f9f4488f1dbebce270d97bab2ba6.tar.gz
org.eclipse.papyrus-collaborativemodeling-9f8fddd820e0f9f4488f1dbebce270d97bab2ba6.tar.xz
org.eclipse.papyrus-collaborativemodeling-9f8fddd820e0f9f4488f1dbebce270d97bab2ba6.zip
[Releng] Update the repository architecture
- Move all the sub-modules to the root - Delete the now obsolete root releng configuration Change-Id: I32352bbc949111c523b606107ac3fa3110e2dd95 Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'cdo')
-rwxr-xr-xcdo/LICENSE277
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.classpath11
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.project28
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.core.prefs294
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/Benchmarks results.xlsxbin0 -> 38708 bytes
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/META-INF/MANIFEST.MF23
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/README8
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/about.html28
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/build.properties18
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/pom.xml17
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractModelCreation.java275
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractPerfTest.java94
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractQuickIndexCreationTest.java55
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractUniqueIndexCreationTest.java55
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOPapyrusModelCreation.java210
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOQuickIndexCreationTest.java53
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOUniqueIndexCreationTest.java50
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelper.java146
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelperMerger.java164
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/IPapyrusModelCreation.java70
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ModelConstructor.java177
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PapyrusModelCreation.java69
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusQuickIndexCreationTest.java53
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusUniqueIndexCreationTest.java53
-rwxr-xr-xcdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/~$Benchmarks results.xlsxbin0 -> 165 bytes
-rwxr-xr-xcdo/benchmarks/pom.xml23
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/.classpath8
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.core.resources.prefs3
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF70
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/build.properties26
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.ecore19
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.ecorediag65
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.genmodel33
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/plugin.properties19
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/plugin.xml104
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoriesFactory.java68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoriesPackage.java365
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/Repository.java152
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoryRegistry.java53
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoriesFactoryImpl.java130
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoriesPackageImpl.java299
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoryImpl.java371
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoryRegistryImpl.java169
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesAdapterFactory.java161
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesResourceFactoryImpl.java64
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesResourceImpl.java42
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesSwitch.java158
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesXMLProcessor.java62
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/CommitException.java47
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/IResourceSetDisposalApprover.java38
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/IPapyrusRepositoryAdminListener.java27
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/PapyrusRepositoryAdminEvent.java60
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/PapyrusRepositoryAdminManager.java124
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/exporter/IModelExportMapping.java31
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/exporter/IModelExporter.java32
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelDependentsProvider.java30
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelImportMapping.java32
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelImporter.java32
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferConfiguration.java78
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferListener.java28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferMapping.java41
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferMappingListener.java28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferNode.java58
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferOperation.java30
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/ModelTransferListenerAdapter.java43
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/ModelTransferMappingListenerAdapter.java42
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareCommandStack.java85
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java492
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java51
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareProxyModificationTrackingAdapter.java66
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareTransactionalEditingDomain.java90
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareTransactionalEditingDomainProvider.java44
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOReadOnlyHandler.java97
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOUndoContext.java112
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/PapyrusCDOResourceFactory.java48
-rw-r--r--cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/PapyrusCDOResourceImpl.java48
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/CDOFunctions.java188
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/CDOPredicates.java136
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/JobWaiter.java235
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/Activator.java62
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CDOProxyResolvingResourceSet.java53
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CDOUtils.java553
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CompositeResourceSetDisposalApprover.java79
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/GMFSafePackageProcessor.java75
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/IRepositoryModelStorage.java48
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/controlmode/CDOControlModeParticipant.java835
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/controlmode/CDOProxyManager.java163
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/CDODIDependentsProvider.java127
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/DefaultModelExportConfigurationFactory.java41
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/DefaultModelExportMappingFactory.java33
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExportMapping.java96
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExporter.java185
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExporterFactory.java32
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/expressions/EObjectPropertyTester.java48
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/AbstractModelImportMapping.java78
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/AbstractModelTransferMapping.java195
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/DefaultModelImportConfigurationFactory.java39
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/DependencyAdapter.java209
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ManyToOneModelImportMapping.java57
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ManyToOneModelImportMappingFactory.java35
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelImporter.java386
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelImporterFactory.java34
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelTransferConfiguration.java387
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelTransferNode.java243
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/OneToOneModelImportMapping.java28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/OneToOneModelImportMappingFactory.java35
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ReentrantOperationContext.java58
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/WorkspaceDIDependentsProvider.java155
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/l10n/Messages.java89
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/l10n/messages.properties42
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/resource/CDOSashModelProvider.java65
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/services/localizer/CDOAwareObjectLocalizer.java98
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.classpath7
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.core.resources.prefs2
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF26
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/build.properties21
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/plugin.properties18
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/plugin.xml44
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/Activator.java66
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/Messages.java53
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/messages.properties24
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOContextStorageProvider.java246
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOTextDelegatingResourceFactory.java42
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOTextURIHandler.java162
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/ClobInputStream.java138
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/ClobOutputStream.java54
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/AbstractCDOContextAction.java86
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextCopyAction.java318
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextDeleteAction.java55
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextEditAction.java147
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextStorageActionProvider.java59
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOResourceEditorInput.java47
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.project58
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.core.resources.prefs2
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.m2e.core.prefs4
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.pde.api.tools.prefs98
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/META-INF/MANIFEST.MF11
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/build.properties9
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/plugin.properties17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/plugin.xml40
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/pom.xml52
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/bugs/cdo-bugs.markdown20
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/cdo-main-toc.xml10
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/addrepo.pngbin0 -> 26870 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/cdo-start.markdown45
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/discovery_dialog.pngbin0 -> 38329 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/importmodels.pngbin0 -> 77036 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/modelreposview.pngbin0 -> 11068 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/validation.pngbin0 -> 515692 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/cdo-team.markdown28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/conflict.pngbin0 -> 116583 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/locked.pngbin0 -> 119126 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/remotely_locked.pngbin0 -> 159428 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.classpath7
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.core.resources.prefs4
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/META-INF/MANIFEST.MF31
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/build.properties22
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/icons/full/obj16/document.pngbin0 -> 1645 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/plugin.properties18
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/plugin.xml40
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/Activator.java68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOHyperlinkConstants.java35
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlink.java160
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkEditorShell.java139
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkHelper.java125
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkLabelProvider.java55
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceURIDropStrategy.java118
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CreateCDOResourceHyperlinkCommand.java68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/Messages.java51
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/messages.properties23
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/.classpath7
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.core.resources.prefs4
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF67
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/build.properties27
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/add_repo.gifbin0 -> 592 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/add_repo.pxmbin0 -> 25053 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/link_editor.gifbin0 -> 160 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/connect_co.gifbin0 -> 264 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/connect_co.pxmbin0 -> 20871 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/disconnect_co.gifbin0 -> 110 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/connect_co.gifbin0 -> 587 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/connect_co.pxmbin0 -> 20872 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/disconnect_co.gifbin0 -> 114 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/newfolder_co.gifbin0 -> 352 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/papyrus_model.gifbin0 -> 3487 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_closed.gifbin0 -> 258 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_closed.pxmbin0 -> 16668 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_open.gifbin0 -> 594 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/conflicted.gifbin0 -> 3487 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/dependent.gifbin0 -> 3441 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/dependent.pxmbin0 -> 20770 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/other_locked.gifbin0 -> 3453 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/self_locked.gifbin0 -> 3457 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/conflicted.gifbin0 -> 3952 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/conflicted.pxmbin0 -> 24871 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/other_locked.gifbin0 -> 3870 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/other_locked.pxmbin0 -> 20771 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/self_locked.gifbin0 -> 4282 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/self_locked.pxmbin0 -> 24871 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/view16/model_repositories.gifbin0 -> 594 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/view16/model_repositories.pxmbin0 -> 20871 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/wizban/Papyrus_CDO.pngbin0 -> 6696 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/wizban/Papyrus_CDO.pxmbin0 -> 194280 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/model/DND.ecore10
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/model/DND.ecorediag32
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/plugin.properties38
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/plugin.xml406
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/schema/repositoryFilters.exsd210
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/Activator.java185
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/SharedImages.java45
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/adapters/CDOAdapterFactory.java93
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/adapters/EditorAdapterFactory.java54
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateAdapter.java182
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateDiagramDecorator.java92
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateLabelDecorator.java192
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/DiagramDecoratorProvider.java62
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusConnectionEditPartStylizer.java25
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusEditPartStylizer.java104
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusElementStylizer.java101
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusElementStylizerFactory.java66
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusNodeEditPartStylizer.java25
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CheckoutBrowseDialog.java449
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CheckoutSelectionDialog.java115
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CreateCDOModelFragmentDialog.java257
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/CDOResourceURITransferData.java105
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDragAdapter.java102
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropActionDelegate.java56
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropAdapter.java394
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropAdapterAssistant.java188
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnEditorAdapter.java254
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnGraphicalEditorSupport.java247
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnGraphicalEditorSupportServiceFactory.java66
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorInput.java90
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorManager.java517
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorOpener.java46
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFEditorSupport.java287
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFHandler.java242
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFLockingHandler.java49
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusTransactionListener.java308
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/expressions/CDOObjectPropertyTester.java85
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ExportModelHandler.java99
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ImportModelsHandler.java58
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/LockObjectsHandler.java39
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ResolveConflictsHandler.java49
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/UIHandlerUtil.java65
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/UnlockObjectsHandler.java39
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/l10n/Messages.java208
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/l10n/messages.properties102
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOMarkerMonitor.java76
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOMarkerProvider.java362
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOPapyrusMarker.java391
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/CDOResourceLabelProvider.java132
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java118
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/CompositeLabelProvider.java112
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/UISafeProgressMonitor.java132
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/UIUtil.java224
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/CheckoutItemProvider.java201
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIModel.java138
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java341
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/ItemProviderFilterRegistry.java436
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/widgets/ActionButton.java188
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/CheckoutSelectionBlock.java219
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/CheckoutSelectionPage.java97
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/LocalRepositoryView.java162
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelExportMappingsPage.java351
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelExportWizard.java201
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelImportWizard.java176
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelImportWizardPage.java118
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelMappingsPage.java477
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelReferencesPage.java495
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/WizardOperationContext.java67
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.classpath7
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF24
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/build.properties23
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/icons/full/elcl16/newmodel_co.gifbin0 -> 3502 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/icons/full/elcl16/newmodel_co.pxmbin0 -> 24974 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/plugin.properties22
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/plugin.xml99
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/Activator.java67
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/handlers/NewModelHandler.java66
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/l10n/Messages.java51
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/l10n/messages.properties23
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java245
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/NewModelPage.java480
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.classpath7
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/META-INF/MANIFEST.MF30
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/build.properties21
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/plugin.properties18
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/plugin.xml33
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/Activator.java67
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/open/CDOOpenElementService.java48
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/AttributeMatchStrategy.java171
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/CDOPapyrusQuery.java169
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/CDOSearchQueryProvider.java393
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/PatternUtil.java121
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/scope/CDOScopeProvider.java107
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.classpath7
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF21
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/build.properties21
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/plugin.properties19
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/plugin.xml41
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/Activator.java66
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/importsources/CDOPackageImportSource.java235
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/l10n/Messages.java35
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/l10n/messages.properties15
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.classpath7
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/META-INF/MANIFEST.MF19
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/build.properties25
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblem_attributes_Attribute.gifbin0 -> 223 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblemsContainer_problems_EProblem.gifbin0 -> 223 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblemsContainer_subcontainers_EProblemsContainer.gifbin0 -> 223 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/Attribute.gifbin0 -> 129 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/EProblem.gifbin0 -> 129 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/EProblemsContainer.gifbin0 -> 129 bytes
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/plugin.properties60
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/plugin.xml39
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/IProblemTypeProvider.java25
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/ProblemEditUtil.java122
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/ProblemTypeItemProviderAdapter.java35
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/AttributeItemProvider.java189
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/EProblemItemProvider.java290
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/EProblemsContainerItemProvider.java201
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/ProblemsEditPlugin.java101
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/ProblemsItemProviderAdapterFactory.java332
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.classpath7
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.project28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.settings/org.eclipse.jdt.core.prefs291
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/META-INF/CDO.MF1
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/META-INF/MANIFEST.MF22
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/about.html28
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/build.properties27
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.ecore102
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.ecorediag278
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.genmodel64
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/plugin.properties19
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/plugin.xml29
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/pom.xml17
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/EProblem.java289
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/EProblemsContainer.java167
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ESeverity.java307
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ProblemsFactory.java65
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ProblemsPackage.java955
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/AttributeImpl.java203
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/EProblemImpl.java276
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/EProblemsContainerImpl.java279
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/ProblemsFactoryImpl.java194
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/ProblemsPackageImpl.java585
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/internal/ProblemsPlugin.java107
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsAdapterFactory.java178
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsEvent.java55
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsListener.java27
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsManager.java618
-rwxr-xr-xcdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsSwitch.java178
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.classpath7
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.project48
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.jdt.core.prefs390
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.pde.api.tools.prefs104
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/META-INF/MANIFEST.MF19
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/Migrate gmfdiag.css to CDO.launch18
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/about.html28
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/build.properties9
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/migrate.ant57
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/plugin.properties3
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/plugin.xml10
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/pom.xml13
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSArrowStyleImpl.java151
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSBasicCompartmentImpl.java194
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSBasicSemanticCompartmentImpl.java145
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSCanonicalStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSCompartmentImpl.java162
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSConnectorImpl.java414
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSConnectorStyleImpl.java330
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDataTypeStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDecorationNodeImpl.java171
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDescriptionStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDiagramLinkStyleImpl.java86
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDiagramStyleImpl.java206
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDrawerStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSEdgeImpl.java179
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFillStyleImpl.java158
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFilteringStyleImpl.java135
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFontStyleImpl.java255
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSGuideStyleImpl.java86
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSHintedDiagramLinkStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSImageBufferStyleImpl.java134
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSImageStyleImpl.java134
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSLineStyleImpl.java134
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSLineTypeStyleImpl.java111
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSListCompartmentImpl.java214
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSMultiDiagramLinkStyleImpl.java86
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSNamedStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSNodeImpl.java179
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSPageStyleImpl.java184
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSPropertiesSetStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSRoundedCornersStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSRoutingStyleImpl.java282
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSSemanticListCompartmentImpl.java187
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSShapeImpl.java534
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSShapeStyleImpl.java424
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSSortingStyleImpl.java135
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSStandardDiagramImpl.java232
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSTextStyleImpl.java111
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSTitleStyleImpl.java110
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/factory/CSSNotationFactory.java312
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/notation/CSSDiagramImpl.java193
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.classpath7
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.project45
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.jdt.core.prefs296
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.pde.api.tools.prefs104
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/META-INF/MANIFEST.MF15
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/Migrate gmfdiag.style to CDO.launch18
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/about.html28
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/build.properties25
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/migrate.ant112
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/plugin.properties16
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/plugin.xml27
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/pom.xml13
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl/PapyrusDiagramStyleImpl.java198
-rw-r--r--cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl/StyleFactoryImpl.java109
-rwxr-xr-xcdo/bundles/pom.xml35
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.feature/.project17
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.feature/build.properties15
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.feature/feature.properties35
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.feature/feature.xml102
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.feature/pom.xml18
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.models.feature/.project17
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.models.feature/build.properties2
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.models.feature/feature.properties35
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.models.feature/feature.xml53
-rwxr-xr-xcdo/features/org.eclipse.papyrus.cdo.models.feature/pom.xml18
-rwxr-xr-xcdo/features/pom.xml23
-rwxr-xr-xcdo/pom.xml449
-rwxr-xr-xcdo/releng/org.eclipse.papyrus.cdo.p2/.project11
-rwxr-xr-xcdo/releng/org.eclipse.papyrus.cdo.p2/category.xml26
-rwxr-xr-xcdo/releng/org.eclipse.papyrus.cdo.p2/pom.xml27
-rwxr-xr-xcdo/releng/pom.xml23
-rwxr-xr-xcdo/releng/targetplatforms/eclipse/org.eclipse.papyrus.cdo.targetplatform.target37
-rwxr-xr-xcdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/org.eclipse.papyrus.cdo.targetplatform.target37
-rwxr-xr-xcdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/org.eclipse.papyrus.cdo.targetplatform.tpd42
-rwxr-xr-xcdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/pom.xml14
-rwxr-xr-xcdo/releng/targetplatforms/pom.xml18
-rwxr-xr-xcdo/releng/toolkit/server/build-after.sh59
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/.classpath7
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/.project28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/.settings/org.eclipse.jdt.core.prefs294
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF35
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/Papyrus CDO Core Tests.launch41
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/about.html28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/build.properties21
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/plugin.properties19
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/pom.xml17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.di17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.notation5
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.uml2
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/has_dependencies.zipbin0 -> 4022 bytes
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/has_dependents.zipbin0 -> 2203 bytes
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/isolated.zipbin0 -> 3881 bytes
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/xmi/A.ecore8
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/xmi/B.ecore6
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/resource/tests/CDOAwareModelSetTest.java357
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java461
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AllTests.java44
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/ResourceSetFactory.java29
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/TestProject.java187
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/AllUtilTests.java32
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/CDOFunctionsTest.java217
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/CDOPredicatesTest.java222
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/JobWaiterTest.java158
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/controlmode/tests/CDOControlModeTest.java357
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/AbstractModelExportTest.java161
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/AllModelExportTests.java31
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/ModelExportMappingTest.java172
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/ModelExporterTest.java165
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/expressions/tests/AllExpressionsTests.java32
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/expressions/tests/EObjectPropertyTesterTest.java42
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/AllModelImportTests.java33
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ManyToOneModelImportMappingTest.java140
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ModelImportConfigurationTest.java198
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ModelImporterTest.java202
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/OneToOneModelImportMappingTest.java182
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/tests/AllInternalCoreTests.java33
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/tests/CDOUtilsTest.java148
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/.classpath7
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/.project28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/.settings/org.eclipse.jdt.core.prefs294
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/META-INF/MANIFEST.MF15
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch55
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/about.html28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/build.properties20
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/plugin.properties19
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/pom.xml17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.tests/src/org/eclipse/papyrus/cdo/tests/AllTests.java35
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/.classpath7
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/.project28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/.settings/org.eclipse.jdt.core.prefs294
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF39
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/Papyrus CDO UI Tests.launch43
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/about.html28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/build.properties22
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/plugin.properties18
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/plugin.xml27
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/pom.xml17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.di40
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.notation865
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.uml136
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java227
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java271
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/CDOPapyrusMarkerTest.java150
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java185
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/views/tests/ItemProviderFilterRegistryTest.java68
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java365
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AllTests.java40
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.classpath7
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.project28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs294
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF21
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/Papyrus CDO Search UI Tests.launch42
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/about.html28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/build.properties20
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/plugin.properties19
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/pom.xml17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.di17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.notation37
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.uml10
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.di23
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.notation479
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.uml65
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.di17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.notation126
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.uml72
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.di23
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.notation765
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.uml155
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AbstractPapyrusCDOSearchTest.java263
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AdvancedTextSearchTest.java134
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AllTests.java31
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/BasicTextSearchTest.java84
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/SearchScopingTest.java93
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.classpath7
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.project28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.settings/org.eclipse.jdt.core.prefs294
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF22
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/Papyrus CDO UML UI Tests.launch42
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/about.html28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/build.properties20
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/plugin.properties19
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/pom.xml17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/internal/ui/importsources/tests/CDOPackageImportSourceTest.java185
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/ui/tests/AllTests.java33
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.classpath7
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.project28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.settings/org.eclipse.jdt.core.prefs294
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.settings/org.eclipse.jdt.ui.prefs68
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF26
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/about.html28
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/build.properties24
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/plugin.properties19
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/pom.xml17
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/edit/tests/AllProblemsEditTests.java42
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/edit/tests/ProblemEditUtilTest.java75
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java102
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/EProblemTest.java156
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/EProblemsContainerTest.java242
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/ProblemsAllTests.java65
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/ProblemsTests.java54
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/util/tests/AllUtilTests.java30
-rwxr-xr-xcdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/util/tests/ProblemsManagerTest.java553
-rwxr-xr-xcdo/tests/pom.xml26
624 files changed, 63654 insertions, 0 deletions
diff --git a/cdo/LICENSE b/cdo/LICENSE
new file mode 100755
index 00000000..e23ece2c
--- /dev/null
+++ b/cdo/LICENSE
@@ -0,0 +1,277 @@
+Eclipse Public License - v 2.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+ a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+ i) changes to the Program, and
+ ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ "originates" from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+
+"Contributor" means any person or entity that Distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+"Program" means the Contributions Distributed in accordance with this
+Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+"Derivative Works" shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+"Modified Works" shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+"Distribute" means the acts of a) distributing or b) making available
+in any manner that enables the transfer of a copy.
+
+"Source Code" means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+"Secondary License" means either the GNU General Public License,
+Version 2.0, or any later versions of that license, including any
+exceptions or additional permissions as identified by the initial
+Contributor.
+
+2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby
+ assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party
+ patent license is required to allow Recipient to Distribute the
+ Program, it is Recipient's responsibility to acquire that license
+ before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+
+ e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License
+ (if permitted under the terms of Section 3).
+
+3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+
+ ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+
+ iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+
+ iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements
+ of this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ a) it must be made available under this Agreement, or if the
+ Program (i) is combined with other material in a separate file or
+ files made available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+
+ b) a copy of this Agreement must be included with each copy of
+ the Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability ("notices") contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program,
+the Contributor who includes the Program in a commercial product
+offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes
+the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify every
+other Contributor ("Indemnified Contributor") against any losses,
+damages and costs (collectively "Losses") arising from claims, lawsuits
+and other legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the Program
+in a commercial product offering. The obligations in this section do not
+apply to any claims or Losses relating to any actual or alleged
+intellectual property infringement. In order to qualify, an Indemnified
+Contributor must: a) promptly notify the Commercial Contributor in
+writing of such claim, and b) allow the Commercial Contributor to control,
+and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those performance
+claims and warranties, and if a court requires any other Contributor to
+pay any damages as a result, the Commercial Contributor must pay
+those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs
+or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further
+action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software
+or hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of
+time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use
+and distribution of the Program as soon as reasonably practicable.
+However, Recipient's obligations under this Agreement and any licenses
+granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and
+may only be modified in the following manner. The Agreement Steward
+reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement
+Steward has the right to modify this Agreement. The Eclipse Foundation
+is the initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is published,
+Contributor may elect to Distribute the Program (including its
+Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+
+Exhibit A - Form of Secondary Licenses Notice
+
+"This Source Code may also be made available under the following
+Secondary Licenses when the conditions for such availability set forth
+in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+version(s), and exceptions or additional permissions here}."
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a LICENSE
+ file in a relevant directory) where a recipient would be likely to
+ look for such a notice.
+
+ You may add additional accurate notices of copyright ownership. \ No newline at end of file
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.classpath b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.classpath
new file mode 100755
index 00000000..3e5654f1
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src">
+ <attributes>
+ <attribute name="test" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.project b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.project
new file mode 100755
index 00000000..cda13e66
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.benchmarks</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/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.core.prefs b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..e82ec2bb
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,294 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.ui.prefs b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/Benchmarks results.xlsx b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/Benchmarks results.xlsx
new file mode 100755
index 00000000..a891faea
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/Benchmarks results.xlsx
Binary files differ
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/META-INF/MANIFEST.MF b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..a9560d90
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Papyrus CDO Integration Perfo Tests
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.benchmarks
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: Eclipse Modeling Project
+Automatic-Module-Name: org.eclipse.papyrus.cdo.perfo.tests
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.junit,
+ org.eclipse.gmf.runtime.notation;bundle-version="1.8.0",
+ org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="1.0.0",
+ org.eclipse.papyrus.cdo.core.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="4.1.0",
+ org.eclipse.papyrus.uml.diagram.wizards;bundle-version="3.1.0",
+ org.eclipse.net4j.tcp,
+ org.eclipse.emf.transaction;bundle-version="1.9.1",
+ org.eclipse.papyrus.uml.service.types;bundle-version="4.1.0",
+ org.eclipse.uml2.uml;bundle-version="5.4.0",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.3.0",
+ org.eclipse.papyrus.infra.types.core;bundle-version="4.0.0",
+ org.eclipse.papyrus.sysml14.service.types;bundle-version="1.3.0",
+ org.eclipse.papyrus.infra.architecture;bundle-version="2.0.0"
+Bundle-ActivationPolicy: lazy
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/README b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/README
new file mode 100755
index 00000000..fe387e24
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/README
@@ -0,0 +1,8 @@
+This plugin has been created to get time creation using pure Papyrus and Papyrus on CDO.
+To execute them, you need to launch a CDO server on your computer, with the expected parameter
+user:Administrator
+Password: 0000
+host and port : localhost:2036
+repo name : PapyrusCDOSecuredRepository
+
+These tests have been developed on Eclipse 2018.09 \ No newline at end of file
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/about.html b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/build.properties b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/build.properties
new file mode 100755
index 00000000..2d0496e9
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/build.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2018 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/pom.xml b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/pom.xml
new file mode 100755
index 00000000..de7a816d
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-benchmarks</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.benchmarks</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractModelCreation.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractModelCreation.java
new file mode 100755
index 00000000..b0adadd0
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractModelCreation.java
@@ -0,0 +1,275 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.papyrus.infra.architecture.ArchitectureDescriptionUtils;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServiceMultiException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.uml.diagram.wizards.command.NewPapyrusModelCommand;
+import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile;
+import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
+import org.eclipse.papyrus.uml.tools.commands.ApplyProfileCommand;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @author VL222926
+ *
+ */
+public abstract class AbstractModelCreation implements IPapyrusModelCreation {
+
+
+ protected ServicesRegistry servicesRegistry;
+
+ protected ModelSet modelSet;
+
+
+ public ModelSet getModelSet() {
+ return this.modelSet;
+ }
+
+ private URI diURi = null;
+
+ private Resource umlResource;
+
+ private Model rootModel;
+
+ private List<String> profilesToApply;
+
+ protected void createModelSet(final String folderName, final String modelName, final List<String> profilesToApply) throws IOException, ServiceException {
+ if (null == profilesToApply) {
+ this.profilesToApply = Collections.emptyList();
+ } else {
+ this.profilesToApply = profilesToApply;
+ }
+ servicesRegistry = createServicesRegistry();
+ Assert.isNotNull(servicesRegistry);
+
+
+ this.modelSet = servicesRegistry.getService(ModelSet.class);
+ Assert.isNotNull(this.modelSet);
+
+
+
+ diURi = createBaseURI();
+ if (null == diURi) {
+ diURi = URI.createPlatformResourceURI(folderName, true);
+ } else {
+ diURi = diURi.appendSegment(folderName);
+ }
+ diURi = diURi.appendSegment(modelName);
+ diURi = diURi.appendFileExtension(DiModel.MODEL_FILE_EXTENSION);
+
+ RecordingCommand command = new NewPapyrusModelCommand(this.modelSet, diURi);
+
+ modelSet.getTransactionalEditingDomain().getCommandStack().execute(command);
+ modelSet.save(new NullProgressMonitor());
+ final URI umlURi = diURi.trimFileExtension().appendFileExtension("uml");
+ umlResource = modelSet.getResource(umlURi, true);
+
+
+ // create the architecture context
+ ArchitectureDescriptionUtils helper = new ArchitectureDescriptionUtils(modelSet);
+
+
+ final String contextId;
+ final List<String> viewpointsIds = new ArrayList<String>();
+ if (profilesToApply.contains("SysML 1.4")) {
+ contextId = "org.eclipse.papyrus.sysml.architecture.SysML14";
+ viewpointsIds.add("org.eclipse.papyrus.sysml14.standard.modeling");
+ } else {
+ // we assume we are in pure UML
+ contextId = "org.eclipse.papyrus.infra.services.edit.TypeContext";
+ viewpointsIds.add("org.eclipse.papyrus.uml.analysis");
+ viewpointsIds.add("org.eclipse.papyrus.uml.design");
+ }
+ // CompoundCommand cc = new CompoundCommand();
+ // final Command cmd1 = helper.switchArchitectureContextId(contextId);
+ // cc.append(cmd1);
+ String[] stringsViewPointIds = new String[viewpointsIds.size()];
+ stringsViewPointIds = viewpointsIds.toArray(stringsViewPointIds);
+ // final Command cmd2 = helper.switchArchitectureViewpointIds(stringsViewPointIds);
+ // cc.append(cmd2);
+
+ modelSet.getTransactionalEditingDomain().getCommandStack().execute(helper.createNewModel(contextId, stringsViewPointIds));
+ modelSet.save(new NullProgressMonitor());
+
+
+ Assert.isNotNull(umlResource);
+ final Model model = (Model) umlResource.getContents().get(0);
+ // UMLFactory.eINSTANCE.createModel();
+ // model.setName(modelName);
+
+ RecordingCommand rc = new RecordingCommand(modelSet.getTransactionalEditingDomain()) {
+
+ @Override
+ protected void doExecute() {
+ model.setName(modelName);
+ // umlResource.getContents().add(model);
+ }
+ };
+
+ modelSet.getTransactionalEditingDomain().getCommandStack().execute(rc);
+ rootModel = model;
+ initServicesRegistry(servicesRegistry);// we need to have a root in the model to init it!?!?
+
+
+ modelSet.save(new NullProgressMonitor());
+ if (this.profilesToApply.size() > 0) {
+ applyRequiredProfilesFromName(getProfilesToApply());
+ modelSet.save(new NullProgressMonitor());
+ }
+
+
+ }
+
+ protected void createModelSet(final String folderName, final String modelName) throws IOException, ServiceException {
+ createModelSet(folderName, modelName, Collections.<String> emptyList());
+
+ }
+
+ protected void applyRequiredProfilesFromName(final List<String> profileNames) {
+ if (profileNames.size() >= 0) {
+ final List<Profile> profilesToApply = new ArrayList<Profile>();
+ for (final String current : profileNames) {
+ IRegisteredProfile profile = RegisteredProfile.getRegisteredProfile(current);
+ org.junit.Assert.assertNotNull(profile);
+ URI uri = profile.getUri();
+ Resource resource = modelSet.getResource(uri, true);
+ Profile profileToApply = (Profile) resource.getContents().get(0);
+ org.junit.Assert.assertNotNull(profileToApply);
+ profilesToApply.add(profileToApply);
+ }
+ applyRequiredProfiles(profilesToApply);
+ }
+ }
+
+ protected void applyRequiredProfiles(final List<Profile> profiles) {
+ if (profiles.size() > 0) {
+ final CompoundCommand cc = new CompoundCommand("Apply Profiles");
+ for (Profile current : profiles) {
+ cc.append(new ApplyProfileCommand(rootModel, current, modelSet.getTransactionalEditingDomain()));
+ }
+ modelSet.getTransactionalEditingDomain().getCommandStack().execute(cc);
+ org.junit.Assert.assertTrue(profiles.size() <= rootModel.getAppliedProfiles().size());
+ }
+ }
+
+ protected List<String> getProfilesToApply() {
+ return this.profilesToApply;
+ }
+
+ /**
+ * @throws ServiceMultiException
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.IPapyrusModelCreation#disposeAll()
+ *
+ */
+ @Override
+ public void disposeAll() throws ServiceMultiException {
+ this.modelSet.unload();
+ this.modelSet = null;
+ this.servicesRegistry.disposeRegistry();
+ this.servicesRegistry = null;
+ }
+
+ /**
+ * @return
+ */
+ protected abstract URI createBaseURI();
+
+ /**
+ *
+ *
+ * TODO : duplicated code from CreateModelWizard
+ *
+ *
+ * @return
+ */
+ protected ServicesRegistry createServicesRegistry() {
+ ServicesRegistry result = null;
+
+ try {
+ result = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ } catch (ServiceException e) {
+ // couldn't create the registry? Fatal problem
+ // Activator.log.error(e); //TODO
+ }
+
+ try {
+ // have to create the model set and populate it with the DI model
+ // before initializing other services that actually need the DI
+ // model, such as the SashModel Manager service
+ result.startServicesByClassKeys(ModelSet.class);
+ } catch (ServiceException ex) {
+ // Ignore this exception: some services may not have been loaded,
+ // which is probably normal at this point
+ }
+
+ return result;
+ }
+
+ /**
+ *
+ *
+ * TODO : duplicated code from CreateModelWizard
+ *
+ *
+ * @return
+ */
+ protected void initServicesRegistry(ServicesRegistry registry) throws ServiceException {
+ try {
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore this exception: some services may not have been loaded,
+ // which is probably normal at this point
+ }
+
+ registry.getService(IPageManager.class);
+ }
+
+ public ServicesRegistry getServicesRegistry() {
+ return this.servicesRegistry;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.IPapyrusModelCreation#getModelRoot()
+ *
+ * @return
+ */
+ @Override
+ public Model getModelRoot() {
+ return this.rootModel;
+ }
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractPerfTest.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractPerfTest.java
new file mode 100755
index 00000000..43cf7f5a
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractPerfTest.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.sysml14.service.types.util.SysMLServiceTypeUtil;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author VL222926
+ *
+ */
+public abstract class AbstractPerfTest extends AbstractPapyrusTest {
+
+
+
+
+ protected void runCreation(List<String> profilesToApply, IHintedType elementTypeToCreate, final int nbElementsToCreate) throws Exception {
+ IPapyrusModelCreation helper = createPapyrusModelCreation();
+ if(null==profilesToApply) {
+ profilesToApply = Collections.<String>emptyList();
+ }
+ final ExecutionTimeHelper timeHelper = createTimeExecutionHelper(nbElementsToCreate, elementTypeToCreate);
+ ModelConstructor<IPapyrusModelCreation> test = new ModelConstructor<IPapyrusModelCreation>(helper, timeHelper);
+ test.createElementsInModel(Long.toString(System.currentTimeMillis()), nbElementsToCreate, elementTypeToCreate, profilesToApply);
+ timeHelper.toString();
+ }
+
+ protected abstract IPapyrusModelCreation createPapyrusModelCreation();
+
+ protected abstract ExecutionTimeHelper createTimeExecutionHelper(final int nbElementsToCreate, IHintedType elementType);
+
+
+//
+// @Test
+// public void create_100_Classes() throws Exception {
+// runCreation(null, UMLElementTypes.CLASS, 100);
+// }
+//
+// @Test
+// public void create_1000_Classes() throws Exception {
+// runCreation(null, UMLElementTypes.CLASS, 1000);
+// }
+
+ @Test
+ public void create_10000_Classes() throws Exception {
+ runCreation(null, UMLElementTypes.CLASS, 10000);
+ }
+
+
+// @Test
+// public void create_1000_Blocks() throws Exception {
+// Object value = ElementTypeRegistry.getInstance().getType(SysMLServiceTypeUtil.ORG_ECLIPSE_PAPYRUS_SYSML14_BLOCK);
+// Assert.assertTrue(value instanceof IHintedType);
+// runCreation(Collections.<String> singletonList("SysML 1.4"), (IHintedType) value, 1000);
+// }
+
+ @Test
+ public void create_10000_Blocks() throws Exception {
+ Object value = ElementTypeRegistry.getInstance().getType(SysMLServiceTypeUtil.ORG_ECLIPSE_PAPYRUS_SYSML14_BLOCK);
+ Assert.assertTrue(value instanceof IHintedType);
+ runCreation(Collections.<String> singletonList("SysML 1.4"), (IHintedType) value, 10000);
+ }
+
+// @Test
+// public void create_50000_Blocks() throws Exception {
+// Object value = ElementTypeRegistry.getInstance().getType(SysMLServiceTypeUtil.ORG_ECLIPSE_PAPYRUS_SYSML14_BLOCK);
+// Assert.assertTrue(value instanceof IHintedType);
+// runCreation(Collections.<String> singletonList("SysML 1.4"), (IHintedType) value, 50000);
+// }
+
+
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractQuickIndexCreationTest.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractQuickIndexCreationTest.java
new file mode 100755
index 00000000..0aa91cb0
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractQuickIndexCreationTest.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry;
+import org.eclipse.papyrus.uml.tools.utils.internal.preferences.NameElementNamingStrategyPreferenceInitializer;
+import org.eclipse.papyrus.uml.tools.utils.internal.preferences.NamedElementIndexNamingStrategyEnum;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+
+/**
+ * @author VL222926
+ *
+ */
+public abstract class AbstractQuickIndexCreationTest extends AbstractPerfTest {
+
+ protected static final ExecutionTimeHelperMerger merger = new ExecutionTimeHelperMerger("Time for creation with quick index");
+
+ @BeforeClass
+ public static final void initTest() {
+ // we need to initialize it before usingUMLElementTypes.CLASS, because, it is Papyrus that fills the GMF registry used by UMLElementTypes.CLASS.
+ // without doing that, the value will be null
+ ElementTypeSetConfigurationRegistry.getInstance();
+
+ IPreferenceStore store = org.eclipse.papyrus.uml.tools.utils.Activator.getDefault().getPreferenceStore();
+ store.setValue(NameElementNamingStrategyPreferenceInitializer.NAMED_ELEMENT_INDEX_INITIALIZATION, NamedElementIndexNamingStrategyEnum.QUICK_INDEX_INITIALIZATION.toString());
+ }
+
+
+ @AfterClass
+ public static final void endTest() {
+ IPreferenceStore store = org.eclipse.papyrus.uml.tools.utils.Activator.getDefault().getPreferenceStore();
+ store.setToDefault(NameElementNamingStrategyPreferenceInitializer.NAMED_ELEMENT_INDEX_INITIALIZATION);
+
+ if (merger.isFull()) {
+ System.out.println(merger.toString());
+ }
+ }
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractUniqueIndexCreationTest.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractUniqueIndexCreationTest.java
new file mode 100755
index 00000000..1d6501dc
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractUniqueIndexCreationTest.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry;
+import org.eclipse.papyrus.uml.tools.utils.internal.preferences.NameElementNamingStrategyPreferenceInitializer;
+import org.eclipse.papyrus.uml.tools.utils.internal.preferences.NamedElementIndexNamingStrategyEnum;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+
+/**
+ * @author VL222926
+ *
+ */
+public abstract class AbstractUniqueIndexCreationTest extends AbstractPerfTest {
+
+ protected static final ExecutionTimeHelperMerger merger = new ExecutionTimeHelperMerger("Time for creation with unique index");
+
+
+ @BeforeClass
+ public static final void initTest() {
+
+ // we need to initialize it before usingUMLElementTypes.CLASS, because, it is Papyrus that fills the GMF registry used by UMLElementTypes.CLASS.
+ // without doing that, the value will be null
+ ElementTypeSetConfigurationRegistry.getInstance();
+ IPreferenceStore store = org.eclipse.papyrus.uml.tools.utils.Activator.getDefault().getPreferenceStore();
+ store.setValue(NameElementNamingStrategyPreferenceInitializer.NAMED_ELEMENT_INDEX_INITIALIZATION, NamedElementIndexNamingStrategyEnum.UNIQUE_INDEX_INITIALIZATION.toString());
+ }
+
+
+ @AfterClass
+ public static final void endTest() {
+ IPreferenceStore store = org.eclipse.papyrus.uml.tools.utils.Activator.getDefault().getPreferenceStore();
+ store.setToDefault(NameElementNamingStrategyPreferenceInitializer.NAMED_ELEMENT_INDEX_INITIALIZATION);
+ if (merger.isFull()) {
+ System.out.println(merger.toString());
+ }
+ }
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOPapyrusModelCreation.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOPapyrusModelCreation.java
new file mode 100755
index 00000000..c07e9b14
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOPapyrusModelCreation.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.repositories.CDORepository;
+import org.eclipse.emf.cdo.internal.explorer.AbstractElement;
+import org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutImpl;
+import org.eclipse.emf.cdo.internal.explorer.repositories.CDORepositoryImpl;
+import org.eclipse.emf.cdo.internal.explorer.repositories.RemoteCDORepository;
+import org.eclipse.emf.cdo.net4j.CDONet4jSessionConfiguration;
+import org.eclipse.emf.cdo.net4j.CDONet4jUtil;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.net4j.Net4jUtil;
+import org.eclipse.net4j.connector.IConnector;
+import org.eclipse.net4j.tcp.TCPUtil;
+import org.eclipse.net4j.util.container.ContainerUtil;
+import org.eclipse.net4j.util.container.IManagedContainer;
+import org.eclipse.net4j.util.security.IPasswordCredentialsProvider;
+import org.eclipse.net4j.util.security.PasswordCredentialsProvider;
+import org.eclipse.papyrus.infra.core.services.ServiceMultiException;
+
+/**
+ * @author VL222926
+ *
+ */
+public class CDOPapyrusModelCreation extends AbstractModelCreation {
+
+ private static final String HOST_AND_PORT = "localhost:2036";
+
+ private static final String USER_NAME = "Administrator";
+
+ private static final String PASSWORD = "0000";
+
+
+ private CDOSession session;
+ private CDOCheckout checkout;
+ private CDORepository repository;
+ private CDOTransaction transaction;
+
+ final String PAPYRUS_CDO_SECURED_REPOSITORY = "PapyrusCDOSecuredRepository";
+
+
+
+ public final void connect() throws Exception {
+ connect(getHostAndPort(), getUser(), getPassword());
+ }
+
+ /**
+ * @return
+ */
+ private String getPassword() {
+ return PASSWORD;
+ }
+
+ /**
+ * @return
+ */
+ private String getUser() {
+ return USER_NAME;
+ }
+
+ /**
+ * @return
+ */
+ private String getHostAndPort() {
+ return HOST_AND_PORT;
+ }
+
+ private void connect(final String serverURI, final String login, final String password) throws Exception {
+ try {
+ // Prepare container
+ final IManagedContainer container = ContainerUtil.createContainer();
+ Net4jUtil.prepareContainer(container); // Register Net4j factories
+ TCPUtil.prepareContainer(container); // Register TCP factories
+ CDONet4jUtil.prepareContainer(container); // Register CDO factories
+ container.activate();
+
+ // Create connector
+ final IConnector connector = TCPUtil.getConnector(container, serverURI);
+
+ // Create configuration
+ final CDONet4jSessionConfiguration configuration = CDONet4jUtil.createNet4jSessionConfiguration();
+ configuration.setConnector(connector);
+ configuration.setRepositoryName(PAPYRUS_CDO_SECURED_REPOSITORY);
+ final IPasswordCredentialsProvider credentialsProvider = new PasswordCredentialsProvider(login, password);
+ configuration.setCredentialsProvider(credentialsProvider);
+
+ final Properties properties = new Properties();
+
+ properties.setProperty(AbstractElement.PROP_TYPE, CDORepository.TYPE_REMOTE);
+ properties.setProperty(AbstractElement.PROP_LABEL, PAPYRUS_CDO_SECURED_REPOSITORY);
+ properties.setProperty(CDORepositoryImpl.PROP_NAME, PAPYRUS_CDO_SECURED_REPOSITORY);
+ properties.setProperty(RemoteCDORepository.PROP_CONNECTOR_TYPE, "tcp"); //$NON-NLS-1$
+ // TODO : is it serverURI?
+ properties.setProperty(RemoteCDORepository.PROP_CONNECTOR_DESCRIPTION, serverURI);
+
+ repository = CDOExplorerUtil.getRepositoryManager().addRepository(properties, credentialsProvider.getCredentials());
+ repository.connect();
+
+ // Open session
+ session = configuration.openNet4jSession();
+
+ this.checkout = createCheckout("PapyrusPerfoTestCheckout"); //$NON-NLS-1$
+
+
+ } catch (final Exception e) {
+ throw e;
+ }
+
+ }
+
+ private CDOCheckout createCheckout(final String checkoutName) {
+ final Properties properties = new Properties();
+ properties.setProperty(AbstractElement.PROP_TYPE, CDOCheckout.TYPE_ONLINE_HISTORICAL);
+ properties.setProperty(AbstractElement.PROP_LABEL, checkoutName);
+ properties.setProperty(CDOCheckoutImpl.PROP_REPOSITORY, this.repository.getID());
+ properties.setProperty(CDOCheckoutImpl.PROP_BRANCH_ID, Integer.toString(CDOBranch.MAIN_BRANCH_ID));
+ properties.setProperty(CDOCheckoutImpl.PROP_TIME_STAMP, Long.toString(CDOBranchPoint.UNSPECIFIED_DATE));
+ properties.setProperty(CDOCheckoutImpl.PROP_READ_ONLY, Boolean.toString(false));
+
+ final CDOCheckout checkout = CDOExplorerUtil.getCheckoutManager().addCheckout(properties);
+ checkout.open();
+ return checkout;
+ }
+
+ /**
+ * Gets the running session.
+ *
+ * @return the running session
+ */
+ protected CDOSession getSession() {
+ return this.session;
+ }
+
+
+
+ public CDOTransaction getOpenTransaction() {
+ if (transaction != null) {
+ return transaction;
+ }
+
+ transaction = session.openTransaction(this.modelSet);
+
+
+ return transaction;
+ }
+
+
+ public void closeTransaction() {
+ if (null != this.transaction) {
+ this.transaction.close();
+ }
+ transaction = null;// TODO : probably missing in QS
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.cdo.perfo.tests.impl.IPapyrusModelCreation#initPapyrusEnvironnement(java.lang.String, java.lang.String, List<String>)
+ *
+ * @param folderName
+ * @param modelName
+ * @throws Exception
+ */
+ @Override
+ public void initPapyrusEnvironnement(final String folderName, final String modelName, final List<String> profilesName) throws Exception {
+ connect();
+ createModelSet(folderName, modelName, profilesName);
+ }
+
+
+ protected URI createBaseURI() {
+ URI uri = URI.createURI("cdo.checkout://1/home");
+ return uri.appendSegment(getUser());
+
+ }
+
+ /**
+ * @throws ServiceMultiException
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.IPapyrusModelCreation#disposeAll()
+ *
+ */
+ @Override
+ public void disposeAll() throws ServiceMultiException {
+ closeTransaction();
+ super.disposeAll();
+ }
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOQuickIndexCreationTest.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOQuickIndexCreationTest.java
new file mode 100755
index 00000000..d500cdce
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOQuickIndexCreationTest.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+/**
+ * @author VL222926
+ *
+ */
+public class CDOQuickIndexCreationTest extends AbstractQuickIndexCreationTest {
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createPapyrusModelCreation()
+ *
+ * @return
+ */
+ @Override
+ protected IPapyrusModelCreation createPapyrusModelCreation() {
+ return new CDOPapyrusModelCreation();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createTimeExecutionHelper(int, IHintedType)
+ *
+ * @param nbClasses
+ * @return
+ */
+ @Override
+ protected ExecutionTimeHelper createTimeExecutionHelper(int nbClasses, IHintedType elementType) {
+ final String id = elementType.getId();
+ ExecutionTimeHelper helper = new ExecutionTimeHelper("CDO Project: Create " + nbClasses + " " + id + " with quick Index.", ExecutionTimeHelper.CDO_TYPE, nbClasses, id);
+ merger.addTimeHelper(helper);
+ return helper;
+ }
+
+
+
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOUniqueIndexCreationTest.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOUniqueIndexCreationTest.java
new file mode 100755
index 00000000..55739ab6
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOUniqueIndexCreationTest.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+/**
+ * @author VL222926
+ *
+ */
+public class CDOUniqueIndexCreationTest extends AbstractUniqueIndexCreationTest {
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createPapyrusModelCreation()
+ *
+ * @return
+ */
+ @Override
+ protected IPapyrusModelCreation createPapyrusModelCreation() {
+ return new CDOPapyrusModelCreation();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createTimeExecutionHelper(int, IHintedType)
+ *
+ * @param nbClasses
+ * @return
+ */
+ @Override
+ protected ExecutionTimeHelper createTimeExecutionHelper(int nbClasses, IHintedType elementType) {
+ final String id = elementType.getId();
+ ExecutionTimeHelper helper = new ExecutionTimeHelper("CDO Project: Create " + nbClasses + " " + id + " with Unique Index.", ExecutionTimeHelper.CDO_TYPE, nbClasses, id);
+ merger.addTimeHelper(helper);
+ return helper;
+ }
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelper.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelper.java
new file mode 100755
index 00000000..038e1168
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelper.java
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+
+import org.eclipse.osgi.framework.util.ArrayMap;
+import org.junit.Assert;
+
+/**
+ * @author VL222926
+ *
+ */
+public class ExecutionTimeHelper {
+
+ public static final String STEP_1 = "Step 1 : Creating Model Set";
+ public static final String STEP_2 = "Step 2 : Creating elements";
+ public static final String STEP_3 = "Step 3 : Saving the model";
+ public static final String STEP_4 = "Step 4 : Accessing Element";
+ public static final String STEP_5 = "Step 5 : Accessing 5 000th Element";
+ public static final String STEP_6 = "Step 6 : Get stereotype application on 5 000th Element";
+ public static final String STEP_7 = "Step 7 : Add 100 elements to the root of the resource";
+
+
+ public static final String CDO_TYPE = "CDO Type";
+
+ public static final String Papyrus_TYPE = "Papyrus Type";
+
+ private String title;
+
+ private String type;
+
+ private int nbElementToCreate;
+
+ private Map<String, List<Long>> count = new HashMap<String, List<Long>>();
+
+ private List<Long> currentList = null;
+
+ private static final String NEWLINE = "\n";
+
+ private String createdElement;
+
+ public String getElementType() {
+ return this.createdElement;
+ }
+
+ public ExecutionTimeHelper(final String title, final String type, final int nbElementToCreate, String createdElement) {
+ this.title = title;
+ this.type = type;
+ this.nbElementToCreate = nbElementToCreate;
+ this.createdElement = createdElement;
+ }
+
+ public void startCounting(final String step) {
+ Assert.assertNull("The stop method has not been called", currentList);
+ currentList = new LinkedList<Long>();
+ count.put(step, currentList);
+ currentList.add(System.currentTimeMillis());
+ }
+
+
+ public void top() {
+ currentList.add(System.currentTimeMillis());
+ }
+
+ public void stop() {
+ currentList.add(System.currentTimeMillis());
+ currentList = null;
+ }
+
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ *
+ * @return
+ */
+ @Override
+ public String toString() {
+ final StringBuilder builder = new StringBuilder();
+ builder.append("------");
+ builder.append(title);
+ builder.append("------");
+ builder.append(NEWLINE);
+ final Iterator<Entry<String, List<Long>>> iter = count.entrySet().iterator();
+ while (iter.hasNext()) {
+ final Entry<String, List<Long>> current = iter.next();
+ builder.append("# ");
+ builder.append(current.getKey());
+ builder.append(NEWLINE);
+ builder.append("## ");
+ for (int i = 0; i < current.getValue().size() - 1; i++) {
+ long diff = current.getValue().get(i + 1) - current.getValue().get(i);
+ builder.append(diff);
+ builder.append(NEWLINE);
+ }
+ builder.append(NEWLINE);
+ builder.append(NEWLINE);
+ }
+
+ return builder.toString();
+ }
+
+
+ public Map<String, List<Long>> getCount() {
+ return this.count;
+ }
+
+
+ public List<Long> getValuesForStep(final String step) {
+ return this.count.get(step);
+ }
+
+
+ /**
+ * @return
+ */
+ public int getNbCreation() {
+ return this.nbElementToCreate;
+ }
+
+}
+
+
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelperMerger.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelperMerger.java
new file mode 100755
index 00000000..7c7316e9
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelperMerger.java
@@ -0,0 +1,164 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import junit.framework.Assert;
+
+/**
+ * @author VL222926
+ *
+ */
+public class ExecutionTimeHelperMerger {
+
+ private String testResultDescription;
+
+ public ExecutionTimeHelperMerger(final String testResultDescription) {
+ this.testResultDescription = testResultDescription;
+ }
+
+ // nb elements created, elementTypeID, execution
+ private Map<Integer, Map<String, List<ExecutionTimeHelper>>> timeHelperMap = new HashMap<Integer, Map<String, List<ExecutionTimeHelper>>>();
+
+
+
+ public void addTimeHelper(final ExecutionTimeHelper helper) {
+ int nbCreatedElement = helper.getNbCreation();
+ Map<String, List<ExecutionTimeHelper>> subMap = timeHelperMap.get(Integer.valueOf(nbCreatedElement));
+ if (null == subMap) {
+ subMap = new HashMap<String, List<ExecutionTimeHelper>>();
+ subMap.put(helper.getElementType(), new ArrayList<ExecutionTimeHelper>());
+ timeHelperMap.put(Integer.valueOf(nbCreatedElement), subMap);
+ }
+
+ List<ExecutionTimeHelper> helpers = subMap.get(helper.getElementType());
+ if (null == helpers) {
+ helpers = new ArrayList<ExecutionTimeHelper>();
+ subMap.put(helper.getElementType(), helpers);
+ }
+ helpers.add(helper);
+ }
+
+ public boolean isFull() {
+ final Iterator<Entry<Integer, Map<String, List<ExecutionTimeHelper>>>> iter = timeHelperMap.entrySet().iterator();
+ while (iter.hasNext()) {
+ final Entry<Integer, Map<String, List<ExecutionTimeHelper>>> current = iter.next();
+ final Map<String, List<ExecutionTimeHelper>> curr = current.getValue();
+ final Iterator<Entry<String, List<ExecutionTimeHelper>>> iter2 = curr.entrySet().iterator();
+ while (iter2.hasNext()) {
+ if (2 != iter2.next().getValue().size()) {
+ return false;
+ }
+ }
+
+ }
+ return true;
+ }
+
+
+ /**
+ * @see java.lang.Object#toString()
+ *
+ * @return
+ */
+ @Override
+ public String toString() {
+ final List<Integer> keys = new ArrayList<Integer>(timeHelperMap.keySet());
+ Collections.sort(keys);
+
+ final StringBuilder builder = new StringBuilder(testResultDescription);
+ builder.append("\n");
+ for (int i = 0; i < keys.size(); i++) {
+ ExecutionTimeHelper papyrusTimeHelper;
+ ExecutionTimeHelper CDOTimeHelper;
+ Map<String, List<ExecutionTimeHelper>> subMap = timeHelperMap.get(keys.get(i));
+ final Iterator<Entry<String, List<ExecutionTimeHelper>>> subIter = subMap.entrySet().iterator();
+ while (subIter.hasNext()) {
+ final Entry<String, List<ExecutionTimeHelper>> current = subIter.next();
+
+ List<ExecutionTimeHelper> helpers = current.getValue();
+ if (ExecutionTimeHelper.CDO_TYPE.equals(helpers.get(0).getType())) {
+ CDOTimeHelper = helpers.get(0);
+ papyrusTimeHelper = helpers.get(1);
+ } else {
+ CDOTimeHelper = helpers.get(1);
+ papyrusTimeHelper = helpers.get(0);
+ }
+
+
+ builder.append("Creating " + keys.get(i) + " " + current.getKey());
+ builder.append("\n");
+
+ builder.append(" ");
+ builder.append("\t");
+ builder.append(ExecutionTimeHelper.Papyrus_TYPE);
+ builder.append("\t");
+ builder.append(ExecutionTimeHelper.CDO_TYPE);
+ builder.append("\n");
+
+ builder.append(createStepsRows(ExecutionTimeHelper.STEP_1, papyrusTimeHelper, CDOTimeHelper));
+ builder.append(createStepsRows(ExecutionTimeHelper.STEP_2, papyrusTimeHelper, CDOTimeHelper));
+ builder.append(createStepsRows(ExecutionTimeHelper.STEP_3, papyrusTimeHelper, CDOTimeHelper));
+ builder.append(createStepsRows(ExecutionTimeHelper.STEP_4, papyrusTimeHelper, CDOTimeHelper));
+ builder.append(createStepsRows(ExecutionTimeHelper.STEP_5, papyrusTimeHelper, CDOTimeHelper));
+ builder.append(createStepsRows(ExecutionTimeHelper.STEP_6, papyrusTimeHelper, CDOTimeHelper));
+ builder.append(createStepsRows(ExecutionTimeHelper.STEP_7, papyrusTimeHelper, CDOTimeHelper));
+
+ }
+ }
+ return builder.toString();
+ }
+
+
+ private String createStepsRows(final String step, final ExecutionTimeHelper papyrusHelper, final ExecutionTimeHelper cdoHelper) {
+ final StringBuilder builder = new StringBuilder(step);
+ builder.append("\t");
+ builder.append(" ");
+ builder.append("\t");
+ builder.append(" ");
+ builder.append("\n");
+
+ builder.append(createValueList(papyrusHelper.getValuesForStep(step), cdoHelper.getValuesForStep(step)));
+ builder.append("\n");
+
+ return builder.toString();
+ }
+
+ private String createValueList(final List<Long> papyrusValues, final List<Long> cdoValues) {
+ if (papyrusValues != null && cdoValues != null) {
+ final StringBuilder builder = new StringBuilder();
+ org.junit.Assert.assertEquals(papyrusValues.size(), cdoValues.size());
+ for (int i = 0; i < papyrusValues.size() - 1; i++) {
+ builder.append(" ");
+ builder.append("\t");
+ builder.append(Long.valueOf(papyrusValues.get(i + 1) - papyrusValues.get(i)) + "ms");
+ builder.append("\t");
+ builder.append(Long.valueOf(cdoValues.get(i + 1) - cdoValues.get(i)) + "ms");
+ builder.append("\n");
+ }
+ return builder.toString();
+ }
+ return "";
+ }
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/IPapyrusModelCreation.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/IPapyrusModelCreation.java
new file mode 100755
index 00000000..1c86f498
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/IPapyrusModelCreation.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceMultiException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.uml2.uml.Model;
+
+/**
+ * @author VL222926
+ *
+ */
+public interface IPapyrusModelCreation {
+
+ /**
+ * This methods creates:
+ * <ul>
+ * <li>the Papyrus service registry</li>
+ * <li>the ModelSet</li>
+ * <li>all the required Papyrus files (uml, notation, di and others)</li>
+ *
+ * </ul>
+ *
+ * @param folderName
+ * the name of the folder where the files will be created
+ * @param modelName
+ * the name of the root model
+ * @param profilesName TODO
+ * @throws Exception
+ */
+ public void initPapyrusEnvironnement(final String folderName, final String modelName, List<String> profilesName) throws Exception;
+
+ /**
+ *
+ * @return
+ * the created {@link ModelSet} or <code>null</code>
+ */
+ public ModelSet getModelSet();
+
+ /**
+ *
+ * @return
+ * the created {@link ServicesRegistry} or <code>null</code>
+ */
+ public ServicesRegistry getServicesRegistry();
+
+ public void disposeAll() throws ServiceMultiException;
+
+ public Model getModelRoot();
+
+
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ModelConstructor.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ModelConstructor.java
new file mode 100755
index 00000000..14402ff6
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ModelConstructor.java
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @author VL222926
+ *
+ */
+public class ModelConstructor<T extends IPapyrusModelCreation> {
+
+ private T creationHelper;
+
+ protected ExecutionTimeHelper timeHelper;
+
+ public ModelConstructor(final T creationHelper, final ExecutionTimeHelper timeHelper) {
+ this.creationHelper = creationHelper;
+ this.timeHelper = timeHelper;
+ }
+
+
+ /**
+ * r
+ *
+ * @param folderName
+ * @param nbElementsToCreate
+ * @param elementType
+ * @param profilesName
+ * @throws Exception
+ */
+ public void createElementsInModel(final String folderName, int nbElementsToCreate, IHintedType elementType, List<String> profilesName) throws Exception {
+
+ String modelName = Long.toString(System.currentTimeMillis());
+
+ // creating model set
+ timeHelper.startCounting(ExecutionTimeHelper.STEP_1);
+ this.creationHelper.initPapyrusEnvironnement(folderName, modelName, profilesName);
+ timeHelper.stop();
+
+ Assert.isNotNull(creationHelper.getServicesRegistry());
+ Assert.isNotNull(creationHelper.getModelSet());
+
+ // creating classes
+ final Model model = this.creationHelper.getModelRoot();
+ final ModelSet modelSet = this.creationHelper.getModelSet();
+
+
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(model);
+ int modulo = 100;
+ timeHelper.startCounting(ExecutionTimeHelper.STEP_2);
+ for (int i = 0; i < nbElementsToCreate; i++) {
+ CreateElementRequest request = new CreateElementRequest(modelSet.getTransactionalEditingDomain(), model, elementType);
+ final ICommand cmd = provider.getEditCommand(request);
+ modelSet.getTransactionalEditingDomain().getCommandStack().execute(GMFtoEMFCommandWrapper.wrap(cmd));
+ if (i % modulo == 0) {
+ timeHelper.top();
+ }
+ }
+
+ timeHelper.stop();
+
+ // saving the models
+ timeHelper.startCounting(ExecutionTimeHelper.STEP_3);
+ try {
+ modelSet.save(new NullProgressMonitor());
+ // modelSet.
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ timeHelper.stop();
+
+
+ // accessing to an element
+ List<String> names = Arrays.asList(elementType.getId().split("\\."));
+ Collections.reverse(names);
+ String name = names.get(0);
+ int i = 0;
+ timeHelper.startCounting(ExecutionTimeHelper.STEP_4);
+ while (i + modulo <= nbElementsToCreate) {
+ i = i + modulo;
+ final NamedElement element = model.getMember(name + i);
+ // TODO !
+ Assert.isNotNull(element);
+ if (profilesName.size() > 0) {
+ Assert.isTrue(element.getAppliedStereotypes().size() > 0);
+ }
+ timeHelper.top();
+ }
+
+ timeHelper.stop();
+
+ name = name + "5000";
+ NamedElement element = null;
+ if (nbElementsToCreate > 5000) {
+ timeHelper.startCounting(ExecutionTimeHelper.STEP_5);
+ for (int j = 0; j < 100; j++) {// we do it 100 times
+ element = model.getMember(name);
+ }
+ timeHelper.stop();
+ }
+
+ if (nbElementsToCreate > 5000) {
+
+ if (profilesName.size() > 0) {
+ timeHelper.startCounting(ExecutionTimeHelper.STEP_6);
+ for (int j = 0; j < 100; j++) {// we do it 100 times
+ element.getAppliedStereotypes();
+ }
+ timeHelper.stop();
+ }
+ }
+
+ final Resource res = element.eResource();
+ Assert.isNotNull(res);
+ timeHelper.startCounting(ExecutionTimeHelper.STEP_7);
+ for (int k = 0; k < 100; k++) {
+ final EObject newModel = UMLFactory.eINSTANCE.createModel();
+ RecordingCommand rc = new RecordingCommand(modelSet.getTransactionalEditingDomain()) {
+
+ @Override
+ protected void doExecute() {
+ res.getContents().add(newModel);
+
+ }
+ };
+ modelSet.getTransactionalEditingDomain().getCommandStack().execute(rc);
+ }
+ timeHelper.stop();
+ try {
+ modelSet.save(new NullProgressMonitor());
+ // modelSet.
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+
+ this.creationHelper.disposeAll();
+ }
+
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PapyrusModelCreation.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PapyrusModelCreation.java
new file mode 100755
index 00000000..d03092ca
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PapyrusModelCreation.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.core.services.ServiceMultiException;
+
+/**
+ * @author VL222926
+ *
+ */
+public class PapyrusModelCreation extends AbstractModelCreation {
+
+ /**
+ * @see org.eclipse.papyrus.cdo.perfo.tests.impl.IPapyrusModelCreation#initPapyrusEnvironnement(java.lang.String, java.lang.String, List<String>)
+ *
+ * @param folderName
+ * @param modelName
+ * @throws Exception
+ */
+ @Override
+ public void initPapyrusEnvironnement(String folderName, String modelName, List<String> profilesName) throws Exception {
+ createProject(folderName);
+ createModelSet(folderName, modelName, profilesName);
+ }
+
+ private void createProject(final String projectName) throws CoreException {
+ IProgressMonitor progressMonitor = new NullProgressMonitor();
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = root.getProject(projectName);
+ project.create(progressMonitor);
+ project.open(progressMonitor);
+ }
+
+
+
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractModelCreation#createBaseURI()
+ *
+ * @return
+ */
+ @Override
+ protected URI createBaseURI() {
+ return null;
+ }
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusQuickIndexCreationTest.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusQuickIndexCreationTest.java
new file mode 100755
index 00000000..0e452435
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusQuickIndexCreationTest.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+/**
+ * @author VL222926
+ *
+ */
+public class PurePapyrusQuickIndexCreationTest extends AbstractQuickIndexCreationTest {
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createPapyrusModelCreation()
+ *
+ * @return
+ */
+ @Override
+ protected IPapyrusModelCreation createPapyrusModelCreation() {
+ return new PapyrusModelCreation();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createTimeExecutionHelper(int, IHintedType)
+ *
+ * @param nbClasses
+ * @return
+ */
+ @Override
+ protected ExecutionTimeHelper createTimeExecutionHelper(int nbClasses, IHintedType elementType) {
+ final String id = elementType.getId();
+
+ ExecutionTimeHelper helper = new ExecutionTimeHelper("Papyrus Project: Create " + nbClasses + " " + id + " with quick Index.", ExecutionTimeHelper.Papyrus_TYPE, nbClasses, id);
+ merger.addTimeHelper(helper);
+ return helper;
+ }
+
+
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusUniqueIndexCreationTest.java b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusUniqueIndexCreationTest.java
new file mode 100755
index 00000000..4ef3ae1f
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusUniqueIndexCreationTest.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.benchmarks.tests;
+
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+/**
+ * @author VL222926
+ *
+ */
+public class PurePapyrusUniqueIndexCreationTest extends AbstractUniqueIndexCreationTest {
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createPapyrusModelCreation()
+ *
+ * @return
+ */
+ @Override
+ protected IPapyrusModelCreation createPapyrusModelCreation() {
+ return new PapyrusModelCreation();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createTimeExecutionHelper(int, IHintedType)
+ *
+ * @param nbClasses
+ * @return
+ */
+ @Override
+ protected ExecutionTimeHelper createTimeExecutionHelper(int nbClasses, IHintedType elementType) {
+ final String id = elementType.getId();
+
+ ExecutionTimeHelper helper = new ExecutionTimeHelper("Papyrus Project: Create " + nbClasses + " " + id + " with unique Index.", ExecutionTimeHelper.Papyrus_TYPE, nbClasses, id);
+ merger.addTimeHelper(helper);
+ return helper;
+ }
+
+
+
+}
diff --git a/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/~$Benchmarks results.xlsx b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/~$Benchmarks results.xlsx
new file mode 100755
index 00000000..d06f542e
--- /dev/null
+++ b/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/~$Benchmarks results.xlsx
Binary files differ
diff --git a/cdo/benchmarks/pom.xml b/cdo/benchmarks/pom.xml
new file mode 100755
index 00000000..7450eabf
--- /dev/null
+++ b/cdo/benchmarks/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo.root</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM (aggregator) -->
+ <artifactId>org.eclipse.papyrus.cdo-benchmarks</artifactId>
+
+ <packaging>pom</packaging>
+
+ <!-- Children modules to build -->
+ <modules>
+ <module>org.eclipse.papyrus.cdo.benchmarks</module>
+ </modules>
+
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.core/.classpath
new file mode 100755
index 00000000..dbc46ec7
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/.project b/cdo/bundles/org.eclipse.papyrus.cdo.core/.project
new file mode 100755
index 00000000..7e3c1618
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.core</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/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.core.resources.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000..b100be5b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//model/repositories.ecore=UTF-8
+encoding//model/repositories.ecorediag=UTF-8
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..b3aa6d60
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..3cebc626
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF
@@ -0,0 +1,70 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.cdo.explorer;bundle-version="[4.3.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.emf.workspace;bundle-version="[1.5.1,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
+ org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.cdo.dawn.gmf;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.4.0,2.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.notation;bundle-version="[1.5.0,2.0.0)",
+ org.eclipse.equinox.security;bundle-version="[1.1.100,2.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.infra.services.localizer;bundle-version="1.2.0",
+ org.eclipse.net4j;bundle-version="[4.3.0,5.0.0)",
+ org.eclipse.emf.cdo.admin;bundle-version="[4.1.200,5.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.cdo.core,
+ org.eclipse.papyrus.cdo.core.admin,
+ org.eclipse.papyrus.cdo.core.exporter,
+ org.eclipse.papyrus.cdo.core.importer,
+ org.eclipse.papyrus.cdo.core.resource,
+ org.eclipse.papyrus.cdo.core.util,
+ org.eclipse.papyrus.cdo.internal.core; x-friends:="org.eclipse.papyrus.cdo.core.tests,
+ org.eclipse.papyrus.cdo.ui,
+ org.eclipse.papyrus.cdo.ui.tests,
+ org.eclipse.papyrus.cdo.uml.diagram.ui,
+ org.eclipse.papyrus.cdo.uml.ui,
+ org.eclipse.papyrus.cdo.ui.customization.properties,
+ org.eclipse.papyrus.cdo.uml.ui.tests,
+ org.eclipse.papyrus.cdo.uml.search.ui,
+ org.eclipse.papyrus.cdo.uml.search.ui.tests,
+ org.eclipse.papyrus.cdo.ui.hyperlink",
+ org.eclipse.papyrus.cdo.internal.core.controlmode;x-friends:="org.eclipse.papyrus.cdo.ui,
+ org.eclipse.papyrus.cdo.core.tests",
+ org.eclipse.papyrus.cdo.internal.core.exporter;x-friends:="org.eclipse.papyrus.cdo.core.tests,
+ org.eclipse.papyrus.cdo.ui",
+ org.eclipse.papyrus.cdo.internal.core.expressions;x-friends:="org.eclipse.papyrus.cdo.core.tests,
+ org.eclipse.papyrus.cdo.ui",
+ org.eclipse.papyrus.cdo.internal.core.importer;x-friends:="org.eclipse.papyrus.cdo.core.tests,
+ org.eclipse.papyrus.cdo.ui",
+ org.eclipse.papyrus.cdo.internal.core.l10n;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.core.repositories;x-friends:="org.eclipse.papyrus.cdo.core.tests,
+ org.eclipse.papyrus.cdo.ui",
+ org.eclipse.papyrus.cdo.internal.core.repositories.impl;x-friends:="org.eclipse.papyrus.cdo.core.tests,
+ org.eclipse.papyrus.cdo.ui",
+ org.eclipse.papyrus.cdo.internal.core.repositories.util;x-friends:="org.eclipse.papyrus.cdo.core.tests,
+ org.eclipse.papyrus.cdo.ui",
+ org.eclipse.papyrus.cdo.internal.core.resource;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.core.services.localizer;x-internal:=true
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 2.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.cdo.internal.core.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.core;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.core/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.core/build.properties
new file mode 100755
index 00000000..40511624
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/build.properties
@@ -0,0 +1,26 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+bin.excludes = model/*.ecorediag
+jars.compile.order = .
+source.. = src/,\
+ src-gen/
+output.. = bin/
+src.includes = about.html
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.ecore b/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.ecore
new file mode 100755
index 00000000..b400c2ec
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.ecore
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="repositories" nsURI="http://www.eclipse.org/papyrus/repositories/0.10.0"
+ nsPrefix="repositories">
+ <eClassifiers xsi:type="ecore:EClass" name="RepositoryRegistry">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="repositories" upperBound="-1"
+ eType="#//Repository" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Repository">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="uRL" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="url"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="uUID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.ecorediag b/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.ecorediag
new file mode 100755
index 00000000..3776998e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.ecorediag
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_DRuIEF5XEeKVz4CWs4rkiA" type="EcoreTools" name="repositories" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_OS9A4F5XEeKVz4CWs4rkiA" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_OS-2EF5XEeKVz4CWs4rkiA" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_OTAEMF5XEeKVz4CWs4rkiA" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_OTAEMV5XEeKVz4CWs4rkiA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OTAEMl5XEeKVz4CWs4rkiA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OTAEM15XEeKVz4CWs4rkiA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_OTArQF5XEeKVz4CWs4rkiA" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_OTArQV5XEeKVz4CWs4rkiA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OTArQl5XEeKVz4CWs4rkiA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OTArQ15XEeKVz4CWs4rkiA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_OS9A4V5XEeKVz4CWs4rkiA" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="repositories.ecore#//RepositoryRegistry"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OS9A4l5XEeKVz4CWs4rkiA" x="104" y="91" width="124"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_P7MKAF5XEeKVz4CWs4rkiA" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_P7MKA15XEeKVz4CWs4rkiA" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_P7MKBF5XEeKVz4CWs4rkiA" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_VleMQF5XEeKVz4CWs4rkiA" type="2001">
+ <element xmi:type="ecore:EAttribute" href="repositories.ecore#//Repository/name"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VleMQV5XEeKVz4CWs4rkiA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i4ObwF5XEeKVz4CWs4rkiA" type="2001">
+ <element xmi:type="ecore:EAttribute" href="repositories.ecore#//Repository/description"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i4ObwV5XEeKVz4CWs4rkiA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_dScfAF5XEeKVz4CWs4rkiA" type="2001">
+ <element xmi:type="ecore:EAttribute" href="repositories.ecore#//Repository/uRL"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_dScfAV5XEeKVz4CWs4rkiA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_qfYY4CVhEeOe3PUVH5W0Qg" type="2001">
+ <element xmi:type="ecore:EAttribute" href="repositories.ecore#//Repository/uUID"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qfYY4SVhEeOe3PUVH5W0Qg"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_P7MKBV5XEeKVz4CWs4rkiA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_P7MKBl5XEeKVz4CWs4rkiA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_P7MKB15XEeKVz4CWs4rkiA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_P7MKCF5XEeKVz4CWs4rkiA" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_P7MKCV5XEeKVz4CWs4rkiA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_P7MKCl5XEeKVz4CWs4rkiA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_P7MKC15XEeKVz4CWs4rkiA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_P7MKAV5XEeKVz4CWs4rkiA" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="repositories.ecore#//Repository"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_P7MKAl5XEeKVz4CWs4rkiA" x="99" y="198"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_DRuIEV5XEeKVz4CWs4rkiA"/>
+ <element xmi:type="ecore:EPackage" href="repositories.ecore#/"/>
+ <edges xmi:type="notation:Edge" xmi:id="_Rw68kF5XEeKVz4CWs4rkiA" type="3002" source="_OS9A4F5XEeKVz4CWs4rkiA" target="_P7MKAF5XEeKVz4CWs4rkiA">
+ <children xmi:type="notation:Node" xmi:id="_Rw8KsF5XEeKVz4CWs4rkiA" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Rw8KsV5XEeKVz4CWs4rkiA" x="-2" y="-42"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Rw8xwF5XEeKVz4CWs4rkiA" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Rw8xwV5XEeKVz4CWs4rkiA" x="-3" y="14"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_Rw68kV5XEeKVz4CWs4rkiA" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_Rw68kl5XEeKVz4CWs4rkiA" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="repositories.ecore#//RepositoryRegistry/repositories"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Rw68k15XEeKVz4CWs4rkiA" points="[1, 20, -25, -105]$[-24, 127, -50, 2]"/>
+ </edges>
+</notation:Diagram>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.genmodel b/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.genmodel
new file mode 100755
index 00000000..ae741c8c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/model/repositories.genmodel
@@ -0,0 +1,33 @@
+<?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) 2013 CEA LIST.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License 2.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-2.0/&#xA;&#xA;Contributors:&#xA; CEA LIST - Initial API and implementation&#xA;"
+ modelDirectory="/org.eclipse.papyrus.cdo.core/src-gen" modelPluginID="org.eclipse.papyrus.cdo.core"
+ modelName="Repositories" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
+ runtimeVersion="2.8" operationReflection="true" importOrganizing="true">
+ <foreignModel>repositories.ecore</foreignModel>
+ <genPackages prefix="Repositories" basePackage="org.eclipse.papyrus.cdo.internal.core"
+ resource="XML" disposableProviderFactory="true" ecorePackage="repositories.ecore#/">
+ <genClasses ecoreClass="repositories.ecore#//RepositoryRegistry">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference repositories.ecore#//RepositoryRegistry/repositories"/>
+ </genClasses>
+ <genClasses ecoreClass="repositories.ecore#//Repository">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute repositories.ecore#//Repository/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute repositories.ecore#//Repository/uRL"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute repositories.ecore#//Repository/description"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute repositories.ecore#//Repository/uUID"/>
+ </genClasses>
+ <nestedGenPackages prefix="Repositories" basePackage="org.eclipse.papyrus.cdo.internal.core"
+ resource="XML" disposableProviderFactory="true" ecorePackage="repositories.ecore#/">
+ <genClasses ecoreClass="repositories.ecore#//RepositoryRegistry">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference repositories.ecore#//RepositoryRegistry/repositories"/>
+ </genClasses>
+ <genClasses ecoreClass="repositories.ecore#//Repository">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute repositories.ecore#//Repository/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute repositories.ecore#//Repository/uRL"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute repositories.ecore#//Repository/description"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute repositories.ecore#//Repository/uUID"/>
+ </genClasses>
+ </nestedGenPackages>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.core/plugin.properties
new file mode 100755
index 00000000..2defce99
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+pluginName = Papyrus CDO Model Repository Core (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=The core APIs and implementation of CDO integration in the Papyrus modeler workbench. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.core/plugin.xml
new file mode 100755
index 00000000..a84c144a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/plugin.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2013, 2017 CEA LIST and others.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ Christian W. Damus (CEA) - bug 429242
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated repositories -->
+ <package
+ uri="http://www.eclipse.org/papyrus/repositories/0.10.0"
+ class="org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage"
+ genModel="model/repositories.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <!-- @generated repositories -->
+ <parser
+ type="repositories"
+ class="org.eclipse.papyrus.cdo.internal.core.repositories.util.RepositoriesResourceFactoryImpl"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.core.service">
+ <!-- Priority of OnDemandLoadingModelSet is 5 -->
+ <serviceFactory
+ classname="org.eclipse.papyrus.cdo.core.resource.CDOAwareModelSetServiceFactory"
+ description="A provider of CDO-aware ModelSets."
+ id="org.eclipse.papyrus.infra.core.resource.ModelSet"
+ priority="10"
+ startKind="startup">
+ </serviceFactory>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.core.transactionalEditingDomainProvider">
+ <transactionalEditingDomainProvider
+ class="org.eclipse.papyrus.cdo.core.resource.CDOAwareTransactionalEditingDomainProvider"
+ priority="11">
+ </transactionalEditingDomainProvider>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.emf.readonly.readOnlyHandler">
+
+ <!-- Priority of AppliedProfileReadOnlyHandler is 15 -->
+ <readOnlyHandler
+ class="org.eclipse.papyrus.cdo.core.resource.CDOReadOnlyHandler"
+ priority="16">
+ <affinity
+ axis="permission">
+ </affinity>
+ </readOnlyHandler>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.cdo.internal.core.expressions.EObjectPropertyTester"
+ id="org.eclipse.papyrus.cdo.eObjectTester"
+ namespace="org.eclipse.papyrus.cdo.core"
+ properties="isCDOObject"
+ type="org.eclipse.emf.ecore.EObject">
+ </propertyTester>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.services.controlmode.participant">
+ <participant
+ class="org.eclipse.papyrus.cdo.internal.core.controlmode.CDOControlModeParticipant">
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.core.service">
+ <serviceFactory
+ classname="org.eclipse.papyrus.cdo.internal.core.services.localizer.CDOAwareObjectLocalizer$Factory"
+ description="A customized object localizer that is aware of the special semantics of CDO resource nodes."
+ id="org.eclipse.papyrus.infra.services.localizer.IObjectLocalizer"
+ priority="50"
+ startKind="lazy">
+ </serviceFactory>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.core.sashModelProvider">
+ <sashModelProvider
+ class="org.eclipse.papyrus.cdo.internal.core.resource.CDOSashModelProvider"
+ scheme="cdo.checkout">
+ </sashModelProvider>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.core/pom.xml
new file mode 100755
index 00000000..d51e8178
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.core</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoriesFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoriesFactory.java
new file mode 100755
index 00000000..9afa19f2
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoriesFactory.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories;
+
+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.papyrus.cdo.internal.core.repositories.RepositoriesPackage
+ * @generated
+ */
+public interface RepositoriesFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ RepositoriesFactory eINSTANCE = org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoriesFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Repository Registry</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Repository Registry</em>'.
+ * @generated
+ */
+ RepositoryRegistry createRepositoryRegistry();
+
+ /**
+ * Returns a new object of class '<em>Repository</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Repository</em>'.
+ * @generated
+ */
+ Repository createRepository();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ RepositoriesPackage getRepositoriesPackage();
+
+} // RepositoriesFactory
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoriesPackage.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoriesPackage.java
new file mode 100755
index 00000000..2f1fcaad
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoriesPackage.java
@@ -0,0 +1,365 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface RepositoriesPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "repositories"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/repositories/0.10.0"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "repositories"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ RepositoriesPackage eINSTANCE = org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoriesPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryRegistryImpl <em>Repository Registry</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryRegistryImpl
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoriesPackageImpl#getRepositoryRegistry()
+ * @generated
+ */
+ int REPOSITORY_REGISTRY = 0;
+
+ /**
+ * The feature id for the '<em><b>Repositories</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY_REGISTRY__REPOSITORIES = 0;
+
+ /**
+ * The number of structural features of the '<em>Repository Registry</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY_REGISTRY_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Repository Registry</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY_REGISTRY_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryImpl <em>Repository</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryImpl
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoriesPackageImpl#getRepository()
+ * @generated
+ */
+ int REPOSITORY = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>URL</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY__URL = 1;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY__DESCRIPTION = 2;
+
+ /**
+ * The feature id for the '<em><b>UUID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY__UUID = 3;
+
+ /**
+ * The number of structural features of the '<em>Repository</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY_FEATURE_COUNT = 4;
+
+ /**
+ * The number of operations of the '<em>Repository</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REPOSITORY_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry <em>Repository Registry</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Repository Registry</em>'.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry
+ * @generated
+ */
+ EClass getRepositoryRegistry();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry#getRepositories <em>Repositories</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Repositories</em>'.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry#getRepositories()
+ * @see #getRepositoryRegistry()
+ * @generated
+ */
+ EReference getRepositoryRegistry_Repositories();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository <em>Repository</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Repository</em>'.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.Repository
+ * @generated
+ */
+ EClass getRepository();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getName()
+ * @see #getRepository()
+ * @generated
+ */
+ EAttribute getRepository_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getURL <em>URL</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>URL</em>'.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getURL()
+ * @see #getRepository()
+ * @generated
+ */
+ EAttribute getRepository_URL();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getDescription <em>Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Description</em>'.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getDescription()
+ * @see #getRepository()
+ * @generated
+ */
+ EAttribute getRepository_Description();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getUUID <em>UUID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>UUID</em>'.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getUUID()
+ * @see #getRepository()
+ * @generated
+ */
+ EAttribute getRepository_UUID();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ RepositoriesFactory getRepositoriesFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryRegistryImpl <em>Repository Registry</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryRegistryImpl
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoriesPackageImpl#getRepositoryRegistry()
+ * @generated
+ */
+ EClass REPOSITORY_REGISTRY = eINSTANCE.getRepositoryRegistry();
+
+ /**
+ * The meta object literal for the '<em><b>Repositories</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REPOSITORY_REGISTRY__REPOSITORIES = eINSTANCE.getRepositoryRegistry_Repositories();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryImpl <em>Repository</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryImpl
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoriesPackageImpl#getRepository()
+ * @generated
+ */
+ EClass REPOSITORY = eINSTANCE.getRepository();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute REPOSITORY__NAME = eINSTANCE.getRepository_Name();
+
+ /**
+ * The meta object literal for the '<em><b>URL</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute REPOSITORY__URL = eINSTANCE.getRepository_URL();
+
+ /**
+ * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute REPOSITORY__DESCRIPTION = eINSTANCE.getRepository_Description();
+
+ /**
+ * The meta object literal for the '<em><b>UUID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute REPOSITORY__UUID = eINSTANCE.getRepository_UUID();
+
+ }
+
+} // RepositoriesPackage
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/Repository.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/Repository.java
new file mode 100755
index 00000000..bc129720
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/Repository.java
@@ -0,0 +1,152 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Repository</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getURL <em>URL</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getUUID <em>UUID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage#getRepository()
+ * @model
+ * @generated
+ */
+public interface Repository extends EObject {
+ /**
+ * 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.papyrus.cdo.internal.core.repositories.RepositoriesPackage#getRepository_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#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>URL</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>URL</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>URL</em>' attribute.
+ * @see #setURL(String)
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage#getRepository_URL()
+ * @model required="true"
+ * extendedMetaData="name='url'"
+ * @generated
+ */
+ String getURL();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getURL <em>URL</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>URL</em>' attribute.
+ * @see #getURL()
+ * @generated
+ */
+ void setURL(String value);
+
+ /**
+ * Returns the value of the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Description</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Description</em>' attribute.
+ * @see #setDescription(String)
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage#getRepository_Description()
+ * @model
+ * @generated
+ */
+ String getDescription();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getDescription <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Description</em>' attribute.
+ * @see #getDescription()
+ * @generated
+ */
+ void setDescription(String value);
+
+ /**
+ * Returns the value of the '<em><b>UUID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>UUID</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>UUID</em>' attribute.
+ * @see #setUUID(String)
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage#getRepository_UUID()
+ * @model
+ * @generated
+ */
+ String getUUID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository#getUUID <em>UUID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>UUID</em>' attribute.
+ * @see #getUUID()
+ * @generated
+ */
+ void setUUID(String value);
+
+} // Repository
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoryRegistry.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoryRegistry.java
new file mode 100755
index 00000000..ee9e34a4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/RepositoryRegistry.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Repository Registry</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry#getRepositories <em>Repositories</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage#getRepositoryRegistry()
+ * @model
+ * @generated
+ */
+public interface RepositoryRegistry extends EObject {
+ /**
+ * Returns the value of the '<em><b>Repositories</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Repositories</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>Repositories</em>' containment reference list.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage#getRepositoryRegistry_Repositories()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Repository> getRepositories();
+
+} // RepositoryRegistry
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoriesFactoryImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoriesFactoryImpl.java
new file mode 100755
index 00000000..1313337f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoriesFactoryImpl.java
@@ -0,0 +1,130 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesFactory;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage;
+import org.eclipse.papyrus.cdo.internal.core.repositories.Repository;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class RepositoriesFactoryImpl extends EFactoryImpl implements RepositoriesFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static RepositoriesFactory init() {
+ try {
+ RepositoriesFactory theRepositoriesFactory = (RepositoriesFactory) EPackage.Registry.INSTANCE.getEFactory(RepositoriesPackage.eNS_URI);
+ if (theRepositoriesFactory != null) {
+ return theRepositoriesFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new RepositoriesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RepositoriesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case RepositoriesPackage.REPOSITORY_REGISTRY:
+ return createRepositoryRegistry();
+ case RepositoriesPackage.REPOSITORY:
+ return createRepository();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public RepositoryRegistry createRepositoryRegistry() {
+ RepositoryRegistryImpl repositoryRegistry = new RepositoryRegistryImpl();
+ return repositoryRegistry;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Repository createRepository() {
+ RepositoryImpl repository = new RepositoryImpl();
+ return repository;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public RepositoriesPackage getRepositoriesPackage() {
+ return (RepositoriesPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static RepositoriesPackage getPackage() {
+ return RepositoriesPackage.eINSTANCE;
+ }
+
+} // RepositoriesFactoryImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoriesPackageImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoriesPackageImpl.java
new file mode 100755
index 00000000..6a7df6b9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoriesPackageImpl.java
@@ -0,0 +1,299 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesFactory;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage;
+import org.eclipse.papyrus.cdo.internal.core.repositories.Repository;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class RepositoriesPackageImpl extends EPackageImpl implements RepositoriesPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass repositoryRegistryEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass repositoryEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private RepositoriesPackageImpl() {
+ super(eNS_URI, RepositoriesFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link RepositoriesPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static RepositoriesPackage init() {
+ if (isInited) {
+ return (RepositoriesPackage) EPackage.Registry.INSTANCE.getEPackage(RepositoriesPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ RepositoriesPackageImpl theRepositoriesPackage = (RepositoriesPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RepositoriesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RepositoriesPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theRepositoriesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theRepositoriesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theRepositoriesPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(RepositoriesPackage.eNS_URI, theRepositoriesPackage);
+ return theRepositoriesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getRepositoryRegistry() {
+ return repositoryRegistryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getRepositoryRegistry_Repositories() {
+ return (EReference) repositoryRegistryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getRepository() {
+ return repositoryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getRepository_Name() {
+ return (EAttribute) repositoryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getRepository_URL() {
+ return (EAttribute) repositoryEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getRepository_Description() {
+ return (EAttribute) repositoryEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getRepository_UUID() {
+ return (EAttribute) repositoryEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public RepositoriesFactory getRepositoriesFactory() {
+ return (RepositoriesFactory) getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ repositoryRegistryEClass = createEClass(REPOSITORY_REGISTRY);
+ createEReference(repositoryRegistryEClass, REPOSITORY_REGISTRY__REPOSITORIES);
+
+ repositoryEClass = createEClass(REPOSITORY);
+ createEAttribute(repositoryEClass, REPOSITORY__NAME);
+ createEAttribute(repositoryEClass, REPOSITORY__URL);
+ createEAttribute(repositoryEClass, REPOSITORY__DESCRIPTION);
+ createEAttribute(repositoryEClass, REPOSITORY__UUID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(repositoryRegistryEClass, RepositoryRegistry.class, "RepositoryRegistry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getRepositoryRegistry_Repositories(), this.getRepository(), null,
+ "repositories", null, 0, -1, RepositoryRegistry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(repositoryEClass, Repository.class, "Repository", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getRepository_Name(), ecorePackage.getEString(), "name", null, 1, 1, Repository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getRepository_URL(), ecorePackage.getEString(), "uRL", null, 1, 1, Repository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getRepository_Description(), ecorePackage.getEString(), "description", null, 0, 1, Repository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getRepository_UUID(), ecorePackage.getEString(), "uUID", null, 0, 1, Repository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations() {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$
+ addAnnotation(getRepository_URL(),
+ source,
+ new String[] { "name", "url" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+} // RepositoriesPackageImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoryImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoryImpl.java
new file mode 100755
index 00000000..c9706d2a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoryImpl.java
@@ -0,0 +1,371 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage;
+import org.eclipse.papyrus.cdo.internal.core.repositories.Repository;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Repository</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryImpl#getURL <em>URL</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryImpl#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryImpl#getUUID <em>UUID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RepositoryImpl extends MinimalEObjectImpl.Container implements Repository {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getURL() <em>URL</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getURL()
+ * @generated
+ * @ordered
+ */
+ protected static final String URL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getURL() <em>URL</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getURL()
+ * @generated
+ * @ordered
+ */
+ protected String uRL = URL_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected static final String DESCRIPTION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected String description = DESCRIPTION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getUUID() <em>UUID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getUUID()
+ * @generated
+ * @ordered
+ */
+ protected static final String UUID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getUUID() <em>UUID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getUUID()
+ * @generated
+ * @ordered
+ */
+ protected String uUID = UUID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RepositoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RepositoriesPackage.Literals.REPOSITORY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RepositoriesPackage.REPOSITORY__NAME, oldName, name));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getURL() {
+ return uRL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setURL(String newURL) {
+ String oldURL = uRL;
+ uRL = newURL;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RepositoriesPackage.REPOSITORY__URL, oldURL, uRL));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setDescription(String newDescription) {
+ String oldDescription = description;
+ description = newDescription;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RepositoriesPackage.REPOSITORY__DESCRIPTION, oldDescription, description));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getUUID() {
+ return uUID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setUUID(String newUUID) {
+ String oldUUID = uUID;
+ uUID = newUUID;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RepositoriesPackage.REPOSITORY__UUID, oldUUID, uUID));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY__NAME:
+ return getName();
+ case RepositoriesPackage.REPOSITORY__URL:
+ return getURL();
+ case RepositoriesPackage.REPOSITORY__DESCRIPTION:
+ return getDescription();
+ case RepositoriesPackage.REPOSITORY__UUID:
+ return getUUID();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY__NAME:
+ setName((String) newValue);
+ return;
+ case RepositoriesPackage.REPOSITORY__URL:
+ setURL((String) newValue);
+ return;
+ case RepositoriesPackage.REPOSITORY__DESCRIPTION:
+ setDescription((String) newValue);
+ return;
+ case RepositoriesPackage.REPOSITORY__UUID:
+ setUUID((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case RepositoriesPackage.REPOSITORY__URL:
+ setURL(URL_EDEFAULT);
+ return;
+ case RepositoriesPackage.REPOSITORY__DESCRIPTION:
+ setDescription(DESCRIPTION_EDEFAULT);
+ return;
+ case RepositoriesPackage.REPOSITORY__UUID:
+ setUUID(UUID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case RepositoriesPackage.REPOSITORY__URL:
+ return URL_EDEFAULT == null ? uRL != null : !URL_EDEFAULT.equals(uRL);
+ case RepositoriesPackage.REPOSITORY__DESCRIPTION:
+ return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ case RepositoriesPackage.REPOSITORY__UUID:
+ return UUID_EDEFAULT == null ? uUID != null : !UUID_EDEFAULT.equals(uUID);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(", uRL: "); //$NON-NLS-1$
+ result.append(uRL);
+ result.append(", description: "); //$NON-NLS-1$
+ result.append(description);
+ result.append(", uUID: "); //$NON-NLS-1$
+ result.append(uUID);
+ result.append(')');
+ return result.toString();
+ }
+
+} // RepositoryImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoryRegistryImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoryRegistryImpl.java
new file mode 100755
index 00000000..633f8199
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/impl/RepositoryRegistryImpl.java
@@ -0,0 +1,169 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage;
+import org.eclipse.papyrus.cdo.internal.core.repositories.Repository;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Repository Registry</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.internal.core.repositories.impl.RepositoryRegistryImpl#getRepositories <em>Repositories</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RepositoryRegistryImpl extends MinimalEObjectImpl.Container implements RepositoryRegistry {
+ /**
+ * The cached value of the '{@link #getRepositories() <em>Repositories</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getRepositories()
+ * @generated
+ * @ordered
+ */
+ protected EList<Repository> repositories;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RepositoryRegistryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RepositoriesPackage.Literals.REPOSITORY_REGISTRY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<Repository> getRepositories() {
+ if (repositories == null) {
+ repositories = new EObjectContainmentEList<Repository>(Repository.class, this, RepositoriesPackage.REPOSITORY_REGISTRY__REPOSITORIES);
+ }
+ return repositories;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY_REGISTRY__REPOSITORIES:
+ return ((InternalEList<?>) getRepositories()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY_REGISTRY__REPOSITORIES:
+ return getRepositories();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY_REGISTRY__REPOSITORIES:
+ getRepositories().clear();
+ getRepositories().addAll((Collection<? extends Repository>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY_REGISTRY__REPOSITORIES:
+ getRepositories().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RepositoriesPackage.REPOSITORY_REGISTRY__REPOSITORIES:
+ return repositories != null && !repositories.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // RepositoryRegistryImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesAdapterFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesAdapterFactory.java
new file mode 100755
index 00000000..96f00878
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesAdapterFactory.java
@@ -0,0 +1,161 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage;
+import org.eclipse.papyrus.cdo.internal.core.repositories.Repository;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage
+ * @generated
+ */
+public class RepositoriesAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static RepositoriesPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RepositoriesAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = RepositoriesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RepositoriesSwitch<Adapter> modelSwitch =
+ new RepositoriesSwitch<Adapter>() {
+ @Override
+ public Adapter caseRepositoryRegistry(RepositoryRegistry object) {
+ return createRepositoryRegistryAdapter();
+ }
+
+ @Override
+ public Adapter caseRepository(Repository object) {
+ return createRepositoryAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry <em>Repository Registry</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry
+ * @generated
+ */
+ public Adapter createRepositoryRegistryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.cdo.internal.core.repositories.Repository <em>Repository</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.Repository
+ * @generated
+ */
+ public Adapter createRepositoryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} // RepositoriesAdapterFactory
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesResourceFactoryImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesResourceFactoryImpl.java
new file mode 100755
index 00000000..28051d35
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesResourceFactoryImpl.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.util.RepositoriesResourceImpl
+ * @generated
+ */
+public class RepositoriesResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RepositoriesResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new RepositoriesResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // RepositoriesResourceFactoryImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesResourceImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesResourceImpl.java
new file mode 100755
index 00000000..96d72192
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesResourceImpl.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.util.RepositoriesResourceFactoryImpl
+ * @generated
+ */
+public class RepositoriesResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public RepositoriesResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // RepositoriesResourceImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesSwitch.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesSwitch.java
new file mode 100755
index 00000000..72c13f51
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesSwitch.java
@@ -0,0 +1,158 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage;
+import org.eclipse.papyrus.cdo.internal.core.repositories.Repository;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoryRegistry;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage
+ * @generated
+ */
+public class RepositoriesSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static RepositoriesPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RepositoriesSwitch() {
+ if (modelPackage == null) {
+ modelPackage = RepositoriesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case RepositoriesPackage.REPOSITORY_REGISTRY: {
+ RepositoryRegistry repositoryRegistry = (RepositoryRegistry) theEObject;
+ T result = caseRepositoryRegistry(repositoryRegistry);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case RepositoriesPackage.REPOSITORY: {
+ Repository repository = (Repository) theEObject;
+ T result = caseRepository(repository);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Repository Registry</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Repository Registry</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRepositoryRegistry(RepositoryRegistry object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Repository</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Repository</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRepository(Repository object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // RepositoriesSwitch
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesXMLProcessor.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesXMLProcessor.java
new file mode 100755
index 00000000..86a47718
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src-gen/org/eclipse/papyrus/cdo/internal/core/repositories/util/RepositoriesXMLProcessor.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.core.repositories.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.cdo.internal.core.repositories.RepositoriesPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class RepositoriesXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RepositoriesXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ RepositoriesPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the RepositoriesResourceFactoryImpl factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new RepositoriesResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new RepositoriesResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // RepositoriesXMLProcessor
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/CommitException.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/CommitException.java
new file mode 100755
index 00000000..ec4055dc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/CommitException.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+
+
+/**
+ * This is the CommitException type. Enjoy.
+ */
+public class CommitException
+ extends CoreException {
+
+ private static final long serialVersionUID = 1L;
+
+ public CommitException() {
+ this(Messages.CommitException_0);
+ }
+
+ public CommitException(String message) {
+ super(new Status(IStatus.ERROR, Activator.PLUGIN_ID, message));
+ }
+
+ public CommitException(Throwable cause) {
+ this(Messages.CommitException_0, cause);
+ }
+
+ public CommitException(String message, Throwable cause) {
+ super(new Status(IStatus.ERROR, Activator.PLUGIN_ID, message, cause));
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/IResourceSetDisposalApprover.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/IResourceSetDisposalApprover.java
new file mode 100755
index 00000000..4580f383
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/IResourceSetDisposalApprover.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core;
+
+import java.util.Collection;
+
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+/**
+ * A protocol for objects that a {@link CDOCheckout} may consult to
+ * approve the closure of resource sets that have uncommitted changes.
+ */
+public interface IResourceSetDisposalApprover {
+
+ DisposeAction disposalRequested(CDOCheckout checkout,
+ Collection<ResourceSet> resourceSets);
+
+ //
+ // Nested types
+ //
+
+ enum DisposeAction {
+ NONE, SAVE, CLOSE;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/IPapyrusRepositoryAdminListener.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/IPapyrusRepositoryAdminListener.java
new file mode 100755
index 00000000..f09aad53
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/IPapyrusRepositoryAdminListener.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.admin;
+
+import java.util.EventListener;
+
+
+/**
+ * This is the IPapyrusRepositoryAdminListener type. Enjoy.
+ */
+public interface IPapyrusRepositoryAdminListener extends EventListener {
+
+ void repositoryAdded(PapyrusRepositoryAdminEvent event);
+
+ void repositoryRemoved(PapyrusRepositoryAdminEvent event);
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/PapyrusRepositoryAdminEvent.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/PapyrusRepositoryAdminEvent.java
new file mode 100755
index 00000000..0aa1e279
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/PapyrusRepositoryAdminEvent.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.admin;
+
+import java.util.EventObject;
+
+
+/**
+ * This is the PapyrusRepositoryAdminEvent type. Enjoy.
+ */
+public class PapyrusRepositoryAdminEvent extends EventObject {
+
+ public static final int REPOSITORY_ADDED = 0;
+
+ public static final int REPOSITORY_REMOVED = 1;
+
+ private static final long serialVersionUID = 1L;
+
+ private final int eventType;
+
+ private final String url;
+
+ private final String name;
+
+ public PapyrusRepositoryAdminEvent(PapyrusRepositoryAdminManager source, int eventType, String url, String name) {
+ super(source);
+
+ this.eventType = eventType;
+ this.url = url;
+ this.name = name;
+ }
+
+ @Override
+ public PapyrusRepositoryAdminManager getSource() {
+ return (PapyrusRepositoryAdminManager) super.getSource();
+ }
+
+ public int getEventType() {
+ return eventType;
+ }
+
+ public String getRepositoryURL() {
+ return url;
+ }
+
+ public String getRepositoryName() {
+ return name;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/PapyrusRepositoryAdminManager.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/PapyrusRepositoryAdminManager.java
new file mode 100755
index 00000000..7a31c463
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/admin/PapyrusRepositoryAdminManager.java
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.admin;
+
+import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.emf.cdo.admin.CDOAdminClient;
+import org.eclipse.emf.cdo.common.admin.CDOAdminRepository;
+import org.eclipse.net4j.util.container.ContainerEventAdapter;
+import org.eclipse.net4j.util.container.IContainer;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+
+import com.google.common.collect.Maps;
+
+
+/**
+ * This is the PapyrusRepositoryAdminManager type. Enjoy.
+ */
+public class PapyrusRepositoryAdminManager extends ContainerEventAdapter<CDOAdminClient> {
+
+ private final RepositoryListener repositoryListener = new RepositoryListener();
+
+ private final CopyOnWriteArrayList<IPapyrusRepositoryAdminListener> listeners = new CopyOnWriteArrayList<IPapyrusRepositoryAdminListener>();
+
+ private final Map<CDOAdminRepository, String> repositories = Maps.newConcurrentMap();
+
+ public PapyrusRepositoryAdminManager() {
+ super(true);
+ }
+
+ public void install(IContainer<? extends CDOAdminClient> container) {
+ container.addListener(this);
+
+ for (CDOAdminClient next : container.getElements()) {
+ next.addListener(repositoryListener);
+ }
+ }
+
+ @Override
+ protected void onAdded(IContainer<CDOAdminClient> container, CDOAdminClient element) {
+ element.addListener(repositoryListener);
+ }
+
+ @Override
+ protected void onRemoved(IContainer<CDOAdminClient> container, CDOAdminClient element) {
+ element.removeListener(repositoryListener);
+ }
+
+ public void addRepositoryAdminListener(IPapyrusRepositoryAdminListener listener) {
+ listeners.addIfAbsent(listener);
+ }
+
+ public void removeRepositoryAdminListener(IPapyrusRepositoryAdminListener listener) {
+ listeners.remove(listener);
+ }
+
+ protected void fireRepositoryAdminEvent(int eventType, String url, String name) {
+ if (!listeners.isEmpty()) {
+ PapyrusRepositoryAdminEvent event = new PapyrusRepositoryAdminEvent(this, eventType, url, name);
+ for (IPapyrusRepositoryAdminListener next : listeners) {
+ try {
+ switch (eventType) {
+ case PapyrusRepositoryAdminEvent.REPOSITORY_ADDED:
+ next.repositoryAdded(event);
+ break;
+ case PapyrusRepositoryAdminEvent.REPOSITORY_REMOVED:
+ next.repositoryRemoved(event);
+ break;
+ }
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in repository admin listener.", e); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ private class RepositoryListener extends ContainerEventAdapter<CDOAdminRepository> {
+
+ @Override
+ protected void onAdded(IContainer<CDOAdminRepository> container, CDOAdminRepository element) {
+ if (container instanceof CDOAdminClient) {
+ CDOAdminClient client = (CDOAdminClient) container;
+ String url = String.format("%s?repositoryName=%s", client.getURL(), element.getName()); //$NON-NLS-1$
+ repositories.put(element, url);
+
+ if (client.isConnected()) {
+ // Only notify for repositories added while connected, which ensures that we don't
+ // get a cascade of events on initial connection and discovery of existing repositories
+ fireRepositoryAdminEvent(PapyrusRepositoryAdminEvent.REPOSITORY_ADDED, url, element.getName());
+ }
+ }
+ }
+
+ @Override
+ protected void onRemoved(IContainer<CDOAdminRepository> container, CDOAdminRepository element) {
+ if (container instanceof CDOAdminClient) {
+ CDOAdminClient client = (CDOAdminClient) container;
+ String url = repositories.remove(element);
+
+ if ((url != null) && client.isConnected()) {
+ // Only notify for repositories removed while connected, which ensures that we don't
+ // get a cascade of events on disconnection from the server
+ fireRepositoryAdminEvent(PapyrusRepositoryAdminEvent.REPOSITORY_REMOVED, url, element.getName());
+ }
+ }
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/exporter/IModelExportMapping.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/exporter/IModelExportMapping.java
new file mode 100755
index 00000000..e8c2ca7f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/exporter/IModelExportMapping.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.exporter;
+
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferMapping;
+import org.eclipse.papyrus.cdo.internal.core.exporter.DefaultModelExportMappingFactory;
+
+/**
+ * This is the IModelExportMapping type. Enjoy.
+ */
+public interface IModelExportMapping extends IModelTransferMapping {
+
+ interface Factory {
+
+ Factory DEFAULT = new DefaultModelExportMappingFactory();
+
+ IModelExportMapping create(IModelTransferConfiguration configuration);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/exporter/IModelExporter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/exporter/IModelExporter.java
new file mode 100755
index 00000000..5308c2a1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/exporter/IModelExporter.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.exporter;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.papyrus.cdo.internal.core.exporter.ModelExporterFactory;
+
+/**
+ * This is the IModelExporter type. Enjoy.
+ */
+public interface IModelExporter {
+
+ Diagnostic exportModels(IModelExportMapping mapping);
+
+ interface Factory {
+
+ Factory DEFAULT = new ModelExporterFactory();
+
+ IModelExporter create();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelDependentsProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelDependentsProvider.java
new file mode 100755
index 00000000..2825ff0b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelDependentsProvider.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * This is the IModelDependentsProvider type. Enjoy.
+ */
+public interface IModelDependentsProvider {
+
+ Collection<URI> getDependents(Resource resource, IProgressMonitor monitor);
+
+ Collection<URI> getComponents(Resource diResource, IProgressMonitor monitor);
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelImportMapping.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelImportMapping.java
new file mode 100755
index 00000000..f4b3336a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelImportMapping.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import org.eclipse.papyrus.cdo.internal.core.importer.ManyToOneModelImportMappingFactory;
+import org.eclipse.papyrus.cdo.internal.core.importer.OneToOneModelImportMappingFactory;
+
+/**
+ * This is the IModelImportMapping type. Enjoy.
+ */
+public interface IModelImportMapping extends IModelTransferMapping {
+
+ interface Factory {
+
+ Factory ONE_TO_ONE = new OneToOneModelImportMappingFactory();
+
+ Factory MANY_TO_ONE = new ManyToOneModelImportMappingFactory();
+
+ IModelImportMapping create(IModelTransferConfiguration configuration);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelImporter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelImporter.java
new file mode 100755
index 00000000..0c3528ac
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelImporter.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.papyrus.cdo.internal.core.importer.ModelImporterFactory;
+
+/**
+ * This is the IModelImporter type. Enjoy.
+ */
+public interface IModelImporter {
+
+ Diagnostic importModels(IModelImportMapping mapping);
+
+ interface Factory {
+
+ Factory DEFAULT = new ModelImporterFactory();
+
+ IModelImporter create();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferConfiguration.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferConfiguration.java
new file mode 100755
index 00000000..5df0d72a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferConfiguration.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.cdo.internal.core.exporter.DefaultModelExportConfigurationFactory;
+import org.eclipse.papyrus.cdo.internal.core.importer.DefaultModelImportConfigurationFactory;
+
+/**
+ * This is the IModelTransferConfiguration type. Enjoy.
+ */
+public interface IModelTransferConfiguration {
+
+ Collection<IModelTransferNode> getModelsToTransfer();
+
+ IModelTransferNode addModelToTransfer(URI resourceURI);
+
+ void removeModelToTransfer(IModelTransferNode node);
+
+ ResourceSet getResourceSet();
+
+ void addModelDependentsProvider(IModelDependentsProvider provider);
+
+ IModelTransferOperation.Context getOperationContext();
+
+ boolean hasSashModelContent();
+
+ boolean isStripSashModelContent();
+
+ void setStripSashModelContent(boolean stripSashModelContent);
+
+ Diagnostic validate();
+
+ void dispose();
+
+ void addModelTransferListener(IModelTransferListener listener);
+
+ void removeModelTransferListener(IModelTransferListener listener);
+
+ interface Factory {
+
+ Factory IMPORT = new DefaultModelImportConfigurationFactory();
+
+ Factory EXPORT = new DefaultModelExportConfigurationFactory();
+
+ /**
+ * Creates a new model transfer configuration. If a {@code ResourceSet} is provided,
+ * then the configuration will use it to load resources for dependency analysis. It will
+ * then be the caller's responsibility to clean up that resource set, if necessary,
+ * after completion of the transfer process.
+ *
+ * @param operationContext
+ * a context in which to run model transfer operations
+ * @param resourceSet
+ * an optional resource set for the configuration to use for dependency analysis; may be {@code null}
+ *
+ * @return the model transfer configuration
+ */
+ IModelTransferConfiguration create(IModelTransferOperation.Context operationContext, ResourceSet resourceSet);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferListener.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferListener.java
new file mode 100755
index 00000000..8b99f7f9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferListener.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import org.eclipse.emf.common.util.Diagnostic;
+
+/**
+ * This is the IModelTransferListener type. Enjoy.
+ */
+public interface IModelTransferListener {
+
+ void modelsToTransferChanged(IModelTransferConfiguration configuration);
+
+ void modelDependentsChanged(IModelTransferNode node);
+
+ void modelTransferProblemsOccurred(Diagnostic problems);
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferMapping.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferMapping.java
new file mode 100755
index 00000000..77bac5d7
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferMapping.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.common.util.Diagnostic;
+
+/**
+ * This is the IModelTransferMapping type. Enjoy.
+ */
+public interface IModelTransferMapping {
+
+ IModelTransferConfiguration getConfiguration();
+
+ void mapTo(IModelTransferNode source, IPath path);
+
+ IPath getMapping(IModelTransferNode node);
+
+ CDOCheckout getCheckout();
+
+ void setCheckout(CDOCheckout checkout);
+
+ Diagnostic validate();
+
+ void addModelTransferMappingListener(IModelTransferMappingListener listener);
+
+ void removeModelTransferMappingListener(IModelTransferMappingListener listener);
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferMappingListener.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferMappingListener.java
new file mode 100755
index 00000000..f67cb265
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferMappingListener.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import org.eclipse.emf.common.util.Diagnostic;
+
+/**
+ * This is the IModelTransferMappingListener type. Enjoy.
+ */
+public interface IModelTransferMappingListener {
+
+ void modelTransferRepositoryChanged(IModelTransferMapping mapping);
+
+ void modelTransferMappingChanged(IModelTransferNode node);
+
+ void modelTransferMappingProblemsOccurred(Diagnostic problems);
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferNode.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferNode.java
new file mode 100755
index 00000000..65603cf2
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferNode.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * This is the IModelTransferNode type. Enjoy.
+ */
+public interface IModelTransferNode {
+
+ String getName();
+
+ IModelTransferConfiguration getConfiguration();
+
+ URI getPrimaryResourceURI();
+
+ Collection<URI> getResourceURIs();
+
+ Collection<IModelTransferNode> getDependencies();
+
+ Collection<IModelTransferNode> getDependents();
+
+ /**
+ * Queries whether an{@code other} node represents a model sub-unit of me.
+ *
+ * @param other
+ * another model unit
+ *
+ * @return whether the {@code other} it is a logical model sub-unit of me
+ */
+ boolean isModelSubUnit(IModelTransferNode other);
+
+ /**
+ * Queries whether an{@code other} node represents my model super-unit.
+ *
+ * @param other
+ * another model unit
+ *
+ * @return whether the {@code other} it is the logical model super-unit of me
+ */
+ boolean isModelParentUnit(IModelTransferNode other);
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferOperation.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferOperation.java
new file mode 100755
index 00000000..f9fec94b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/IModelTransferOperation.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.Diagnostic;
+
+/**
+ * This is the IModelTransferOperation type. Enjoy.
+ */
+public interface IModelTransferOperation {
+
+ Diagnostic run(IProgressMonitor monitor);
+
+ interface Context {
+
+ Diagnostic run(IModelTransferOperation operation);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/ModelTransferListenerAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/ModelTransferListenerAdapter.java
new file mode 100755
index 00000000..c21f7b41
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/ModelTransferListenerAdapter.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import org.eclipse.emf.common.util.Diagnostic;
+
+/**
+ * This is the ModelTransferListenerAdapter type. Enjoy.
+ */
+public class ModelTransferListenerAdapter
+ implements IModelTransferListener {
+
+ public ModelTransferListenerAdapter() {
+ super();
+ }
+
+ @Override
+ public void modelsToTransferChanged(IModelTransferConfiguration configuration) {
+ // pass
+ }
+
+ @Override
+ public void modelDependentsChanged(IModelTransferNode node) {
+ // pass
+ }
+
+ @Override
+ public void modelTransferProblemsOccurred(Diagnostic problems) {
+ // pass
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/ModelTransferMappingListenerAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/ModelTransferMappingListenerAdapter.java
new file mode 100755
index 00000000..82fe5770
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/importer/ModelTransferMappingListenerAdapter.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.importer;
+
+import org.eclipse.emf.common.util.Diagnostic;
+
+/**
+ * This is the ModelTransferMappingListenerAdapter type. Enjoy.
+ */
+public class ModelTransferMappingListenerAdapter implements IModelTransferMappingListener {
+
+ public ModelTransferMappingListenerAdapter() {
+ super();
+ }
+
+ @Override
+ public void modelTransferRepositoryChanged(IModelTransferMapping mapping) {
+ // pass
+ }
+
+ @Override
+ public void modelTransferMappingChanged(IModelTransferNode node) {
+ // pass
+ }
+
+ @Override
+ public void modelTransferMappingProblemsOccurred(Diagnostic problems) {
+ // pass
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareCommandStack.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareCommandStack.java
new file mode 100755
index 00000000..28c0b25c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareCommandStack.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 402525
+ * Christian W. Damus (CEA) - bug 432813
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import java.util.Set;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.ResourceSetChangeEvent;
+import org.eclipse.papyrus.commands.NestingNotifyingWorkspaceCommandStack;
+
+import com.google.common.collect.Sets;
+
+
+/**
+ * A CDO-specific command-stack that attaches undo contexts describing object-level
+ * details of the scope of a change.
+ */
+public class CDOAwareCommandStack extends NestingNotifyingWorkspaceCommandStack {
+
+ public CDOAwareCommandStack(IOperationHistory history) {
+ super(history);
+ }
+
+ protected CDOAwareCommandStack(boolean nested, IOperationHistory history) {
+ super(nested, history);
+ }
+
+ @Override
+ public void dispose() {
+ IOperationHistory history = getOperationHistory();
+ if (history != null) {
+ CDOUndoContext.flushAll(history);
+ }
+
+ super.dispose();
+ }
+
+ @Override
+ protected NestingNotifyingWorkspaceCommandStack createNestedCommandStack(IOperationHistory history) {
+ return new CDOAwareCommandStack(true, history);
+ }
+
+ @Override
+ protected void hookUndoContexts(IUndoableOperation operation, ResourceSetChangeEvent event) {
+ super.hookUndoContexts(operation, event);
+
+ Set<EObject> affectedObjects = Sets.newHashSet();
+ for (Notification next : event.getNotifications()) {
+ Object notifier = next.getNotifier();
+
+ // don't exclude CDOResources, which are EObjects as well as Resources, unless the change
+ // is in some other property than the contents
+ if (notifier instanceof EObject) {
+ EObject object = (EObject) notifier;
+ if (object.eClass() != EresourcePackage.Literals.CDO_RESOURCE) {
+ affectedObjects.add(object);
+ } else if (next.getFeature() == EresourcePackage.Literals.CDO_RESOURCE__CONTENTS) {
+ affectedObjects.add(object);
+ }
+ }
+ }
+
+ if (!affectedObjects.isEmpty()) {
+ operation.addContext(new CDOUndoContext(affectedObjects));
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java
new file mode 100755
index 00000000..d72736be
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java
@@ -0,0 +1,492 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus (CEA) - bug 437052
+ * Christian W. Damus - bug 436998
+ * Eike Stepper (CEA) - bug 466520
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.CDOState;
+import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
+import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutViewProvider;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.util.CommitException;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.view.CDOViewInvalidationEvent;
+import org.eclipse.emf.cdo.view.CDOViewSet;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.spi.cdo.FSMUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.core.controlmode.CDOControlModeParticipant;
+import org.eclipse.papyrus.cdo.internal.core.controlmode.CDOProxyManager;
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
+import org.eclipse.papyrus.infra.services.resourceloading.OnDemandLoadingModelSet;
+
+import com.google.common.base.Predicates;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the CDOAwareModelSet type. Enjoy.
+ */
+public class CDOAwareModelSet extends OnDemandLoadingModelSet {
+
+ private static final Set<CDOState> DIRTY_STATES = EnumSet.of(CDOState.NEW, CDOState.DIRTY, CDOState.CONFLICT, CDOState.INVALID_CONFLICT);
+
+ private final ThreadLocal<Boolean> inGetResource = new ThreadLocal<Boolean>();
+
+ private final CDOProxyManager proxyManager = new CDOProxyManager(this);
+
+ private final PapyrusCDOResourceFactory resourceFactory = new PapyrusCDOResourceFactory(this);
+ private CDOCheckout checkout;
+
+ private CDOView view;
+
+ private IListener invalidationListener;
+
+ public CDOAwareModelSet() {
+ super();
+
+ this.resources = new SafeResourceList();
+
+ Map<String, Object> map = getResourceFactoryRegistry().getProtocolToFactoryMap();
+ map.put(CDOProtocolConstants.PROTOCOL_NAME, resourceFactory);
+ map.put(CDOCheckoutViewProvider.SCHEME, resourceFactory);
+ }
+
+ @Override
+ protected Adapter createModificationTrackingAdapter() {
+ return new CDOAwareProxyModificationTrackingAdapter();
+ }
+
+ @Override
+ public EObject getEObject(URI uri, boolean loadOnDemand) {
+ return CDOUtils.isCDOURI(uri) ? getCDOObject(uri, loadOnDemand) : super.getEObject(uri, loadOnDemand);
+ }
+
+ protected EObject getCDOObject(URI uri, boolean loadOnDemand) {
+ EObject result = null;
+
+ if (CDOProxyManager.isCDOProxyURI(uri)) {
+ // get a real proxy object, out of thin air, to give CDO the non-null
+ // instance that it needs (otherwise the 'non-null constraint' of
+ // all kinds of reference lists will be violated)
+ result = proxyManager.getProxy(uri);
+ } else {
+ result = super.getEObject(uri, loadOnDemand);
+ }
+
+ return result;
+ }
+
+ @Override
+ public Resource getResource(URI uri, boolean loadOnDemand) {
+ Boolean oldValue = inGetResource.get();
+ inGetResource.set(Boolean.TRUE);
+
+ try {
+ return super.getResource(uri, loadOnDemand);
+ } finally {
+ inGetResource.set(oldValue);
+ }
+ }
+
+ boolean isInGetResource() {
+ return inGetResource.get() == Boolean.TRUE;
+ }
+
+ @Override
+ public Resource createResource(URI uri, String contentType) {
+ Resource resource = super.createResource(uri, contentType);
+ initTransaction(resource);
+ return resource;
+ }
+
+ @Override
+ protected void demandLoad(Resource resource) throws IOException {
+ URI uri = resource.getURI();
+
+ // if (CDOCheckoutViewProvider.SCHEME.equals(uri.scheme())) {
+ //
+ // } else
+
+ if (CDOUtils.isCDOURI(uri)) {
+ // XML options not applicable to CDO resources
+ resource.load(null);
+
+ resourceLoadedHook(resource);
+ } else {
+ super.demandLoad(resource);
+ }
+
+ initTransaction(resource);
+ }
+
+ @Override
+ protected Resource setResourceOptions(Resource r) {
+ if (r instanceof CDOResource) {
+ return r;
+ }
+
+ return super.setResourceOptions(r);
+ }
+
+ protected void resourceLoadedHook(Resource resource) {
+ for (Diagram next : Iterables.filter(resource.getContents(), Diagram.class)) {
+
+ DawnDiagramUpdater.initializeElement(next);
+ }
+ }
+
+ public CDOView getCDOView() {
+ return view;
+ }
+
+ @Override
+ public void createModels(URI newURI) {
+ super.createModels(newURI);
+ }
+
+ @Override
+ public void loadModels(URI uri) throws ModelMultiException {
+
+ super.loadModels(uri);
+
+ // Did any of the models create a new resource? (the DiModel and/or HistoryModel may have done)
+ // If so, commit them now so that they don't dangle if we later close the editor without saving.
+ out: for (CDOResource next : Iterables.filter(getResources(), CDOResource.class)) {
+ switch (next.cdoState()) {
+ case NEW:
+ case DIRTY:
+ try {
+ ((CDOTransaction) getCDOView()).commit(new NullProgressMonitor());
+ } catch (CommitException e) {
+ Activator.log.error("Commit implicitly created resources failed.", e); //$NON-NLS-1$
+ }
+ break out;
+ default:
+ // Pass
+ break;
+ }
+ }
+ }
+
+ /**
+ * @param resource
+ */
+ protected void initTransaction(Resource resource) {
+ if (resource instanceof CDOResource) {
+ CDOResource cdoResource = (CDOResource) resource;
+ view = cdoResource.cdoView();
+
+ if (view != null) {
+ view.addListener(getInvalidationListener());
+ checkout = CDOExplorerUtil.getCheckout(view);
+
+ // URI from = URI.createURI("cdo://" + view.getSession().getRepositoryInfo().getName() + "/");
+ // URI to = URI.createURI("cdo.checkout://" + checkout.getID() + "/" + checkout.getRepository().getID() + "/");
+ // getURIConverter().getURIMap().put(from, to);
+ }
+ }
+ }
+
+ @Override
+ public void unload() {
+ boolean logError = true;
+ try {
+ logError = view == null || !view.isClosed();
+
+ // CDOResources don't implement unload(), but we can remove adapters from
+ // all of the objects that we have loaded in this view
+ if (view != null && !view.isClosed()) {
+ CDOUtils.unload(view);
+ }
+ } finally {
+ try {
+ super.unload();
+ } catch (Exception ex) {
+ if (logError)
+ {
+ Activator.log.error(ex);
+ }
+ } finally {
+ LifecycleUtil.deactivate(view);
+ CDOCheckoutViewProvider.disposeResourceSet(this);
+
+ // now, we can remove the CDOViewSet adapter
+ eAdapters().clear();
+ }
+ }
+ }
+
+ protected final IListener getInvalidationListener() {
+ if (invalidationListener == null) {
+ invalidationListener = createInvalidationListener();
+ }
+ return invalidationListener;
+ }
+
+ protected IListener createInvalidationListener() {
+ return new IListener() {
+
+ @Override
+ public void notifyEvent(IEvent event) {
+ if (event instanceof CDOViewInvalidationEvent) {
+ TransactionalEditingDomain domain = getTransactionalEditingDomain();
+ if (domain instanceof CDOAwareTransactionalEditingDomain) {
+ ((CDOAwareTransactionalEditingDomain) domain).fireResourceSetChanged((CDOViewInvalidationEvent) event);
+ }
+ }
+ }
+ };
+ }
+
+ @Override
+ public boolean isUserModelResource(URI uri) {
+ return super.isUserModelResource(uri) || CDOUtils.isCDOURI(uri);
+ }
+
+ @Override
+ public EList<Adapter> eAdapters() {
+ if (eAdapters == null) {
+ eAdapters = new EAdapterList<Adapter>(this) {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Adapter remove(int index) {
+ Adapter toRemove = primitiveGet(index);
+ if ((toRemove instanceof CDOViewSet) && !canDisconnectCDOViewSet()) {
+ // don't allow its removal if my view is still open!
+ // (Papyrus attempts to clear the resource set's adapters when disposing a ModelSet)
+ return null;
+ }
+
+ return super.remove(index);
+ }
+
+ @Override
+ public void clear() {
+ if (!canDisconnectCDOViewSet()) {
+ // we can remove everything but the view-set adapter
+ Adapter viewSetAdapter = getViewSetAdapter();
+ if (viewSetAdapter != null) {
+ retainAll(Collections.singleton(viewSetAdapter));
+ } else {
+ super.clear();
+ }
+ } else {
+ super.clear();
+ }
+ }
+
+ private Adapter getViewSetAdapter() {
+ return Iterables.find(this, Predicates.instanceOf(CDOViewSet.class), null);
+ }
+ };
+ }
+
+ return eAdapters;
+ }
+
+ private boolean canDisconnectCDOViewSet() {
+ CDOView view = getCDOView();
+ return ((view == null) || view.isClosed()) && getResources().isEmpty();
+ }
+
+ boolean isDirty(Resource resource) {
+ return (resource instanceof CDOResource) && DIRTY_STATES.contains(((CDOResource) resource).cdoState());
+ }
+
+ @Override
+ protected void cleanModelSet() {
+ Set<URI> toDelete = getResourcesToDeleteOnSave();
+ for (Iterator<Resource> iter = getResources().iterator(); iter.hasNext();) {
+ Resource next = iter.next();
+
+ // Can't remove a dirty CDO resource
+ if (toDelete.contains(next.getURI()) && (!(next instanceof CDOResource) || FSMUtil.isClean((CDOResource) next) || FSMUtil.isTransient((CDOResource) next))) {
+ iter.remove();
+ }
+ }
+ }
+
+ @Override
+ protected void handleResourcesToDelete() {
+ final int initialCount = getResourcesToDeleteOnSave().size();
+
+ super.handleResourcesToDelete();
+
+ // any changes made by resource deletions?
+ CDOView view = getCDOView();
+ if ((view instanceof CDOTransaction) && (getResourcesToDeleteOnSave().size() < initialCount)) {
+ try {
+ ((CDOTransaction) view).commit();
+ } catch (CommitException e) {
+ Activator.log.error("Failed to commit resource deletions.", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ @Override
+ protected boolean validateDeleteResource(URI uri) {
+ boolean result = true;
+
+ Resource resource = getResource(uri, false);
+
+ // if it was meant to be deleted, an attempt would have been made to remove it. That may
+ // have been prevented if it was dirty. If it isn't now, then delete it. Otherwise,
+ // block again
+ if ((resource != null) && isDirty(resource)) {
+ result = false;
+ Activator.log.warn("Attempt to delete a dirty CDO resource: " + uri); //$NON-NLS-1$
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean deleteResource(URI uri) {
+ Resource res = getResource(uri, false);
+ boolean result = res instanceof CDOResource;
+
+ if (!result) {
+ // not a CDO resource. Default behaviour
+ result = super.deleteResource(uri);
+ } else {
+ try {
+ res.delete(null);
+ if (res.getResourceSet() != null) {
+ res.unload();
+ res.getResourceSet().getResources().remove(res);
+ }
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public void save(IProgressMonitor monitor) throws IOException {
+ CDOView view = getCDOView();
+ CDOTransaction transaction = null;
+
+ Collection<CDOObject> updates;
+ if ((view instanceof CDOTransaction) && view.isDirty()) {
+ // collect updated objects to post-process for cross-unit references
+ transaction = (CDOTransaction) view;
+ updates = ImmutableList.<CDOObject> builder() //
+ .addAll(transaction.getNewObjects().values()) //
+ .addAll(transaction.getDirtyObjects().values()) //
+ .build();
+ } else {
+ updates = Collections.emptyList();
+ }
+
+ SubMonitor sub = SubMonitor.convert(monitor, updates.isEmpty() ? 1 : 2);
+
+ super.save(sub.newChild(1));
+
+ if (!updates.isEmpty()) {
+ CDOControlModeParticipant control = new CDOControlModeParticipant();
+ CDOControlModeParticipant.IUpdate run = CDOControlModeParticipant.IUpdate.EMPTY;
+
+ for (CDOObject next : updates) {
+ // Resources don't have cross-references that we need to refactor
+ if (!(next instanceof CDOResourceNode)) {
+ EObject object = CDOUtil.getEObject(next);
+ if (object != null) {
+ for (EReference xref : object.eClass().getEAllReferences()) {
+ // do include containment references because we may have added a model
+ // element and controlled it in the same transaction
+ if (xref.isChangeable() && !xref.isDerived() && !xref.isTransient()) {
+ run = run.chain(control.getProxyCrossReferencesUpdate(object, xref));
+ }
+ }
+ }
+ }
+ }
+
+ if (!run.isEmpty()) {
+ run.apply();
+
+ try {
+ transaction.commit(sub.newChild(1));
+ } catch (CommitException e) {
+ Activator.log.error("Follow-up commit after save failed.", e); //$NON-NLS-1$
+ }
+ } else {
+ sub.done();
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * CDO doesn't permit resources to be removed from the resource set if they are {@linkplain CDOState#DIRTY dirty}, so this specialized list
+ * prevents that.
+ */
+ private class SafeResourceList extends ResourcesEList<Resource> {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean remove(Object object) {
+ boolean result = !(object instanceof CDOResource) || !isDirty((CDOResource) object);
+
+ if (result) {
+ result = super.remove(object);
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java
new file mode 100755
index 00000000..839f211d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 431953 (pre-requisite refactoring of ModelSet service start-up)
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+import org.eclipse.papyrus.infra.core.editor.ModelSetServiceFactory;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+
+/**
+ * This is the CDOAwareModelSetServiceFactory type. Enjoy.
+ */
+public class CDOAwareModelSetServiceFactory extends ModelSetServiceFactory {
+
+ @Override
+ public void init(ServicesRegistry servicesRegistry) throws ServiceException {
+ super.init(servicesRegistry);
+ }
+
+ @Override
+ public void disposeService() throws ServiceException {
+ try {
+ super.disposeService();
+ } catch (ServiceException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new ServiceException(Messages.CDOAwareModelSetServiceFactory_0, e);
+ }
+ }
+
+ @Override
+ protected ModelSet createModelSet() {
+ return new CDOAwareModelSet();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareProxyModificationTrackingAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareProxyModificationTrackingAdapter.java
new file mode 100755
index 00000000..e1718122
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareProxyModificationTrackingAdapter.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.infra.core.resource.ProxyModificationTrackingAdapter;
+
+
+/**
+ * A specialization of the {@link ProxyModificationTrackingAdapter} that knows how to deal with
+ * CDO resources. In particular, that their dirty/save semantics is completely different from
+ * that of workspace resources.
+ */
+public class CDOAwareProxyModificationTrackingAdapter extends ProxyModificationTrackingAdapter {
+
+ public CDOAwareProxyModificationTrackingAdapter() {
+ super();
+ }
+
+ @Override
+ public boolean shouldSave(Resource resource) {
+ boolean result;
+
+ if (resource instanceof CDOResource) {
+ CDOView view = ((CDOResource) resource).cdoView();
+ if (view instanceof CDOTransaction) {
+ // Saving CDO resources is done by committing the transaction
+ result = ((CDOTransaction) view).isDirty();
+ } else {
+ // If there's no view or it's not a transaction, then saving is a non-starter
+ result = false;
+ }
+ } else {
+ result = super.shouldSave(resource);
+ }
+
+ return result;
+ }
+
+ @Override
+ public void notifyChanged(Notification msg) {
+ Object notifier = msg.getNotifier();
+
+ // Only for non-CDO resources do we care if the URI has changed or contents been added, because
+ // references within the repository use OIDs and are, therefore, not susceptible to URI changes
+ if (!(notifier instanceof CDOResource)) {
+ super.notifyChanged(msg);
+ }
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareTransactionalEditingDomain.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareTransactionalEditingDomain.java
new file mode 100755
index 00000000..950c7885
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareTransactionalEditingDomain.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 323802
+ * Christian W. Damus (CEA) - bug 415639
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.cdo.dawn.transaction.DawnTransactionChangeRecorder;
+import org.eclipse.emf.cdo.view.CDOViewInvalidationEvent;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.NotificationFilter;
+import org.eclipse.emf.transaction.ResourceSetChangeEvent;
+import org.eclipse.emf.transaction.ResourceSetListener;
+import org.eclipse.emf.transaction.Transaction;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.emf.transaction.impl.TransactionChangeRecorder;
+import org.eclipse.emf.transaction.impl.TransactionImpl;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain;
+
+/**
+ * This is the CDOAwareTransactionalEditingDomain type. Enjoy.
+ */
+public class CDOAwareTransactionalEditingDomain extends PapyrusROTransactionalEditingDomain {
+
+ public CDOAwareTransactionalEditingDomain(AdapterFactory adapterFactory, TransactionalCommandStack stack, ResourceSet resourceSet) {
+ super(adapterFactory, stack, resourceSet);
+ }
+
+ @Override
+ protected TransactionChangeRecorder doCreateChangeRecorder(ResourceSet rset) {
+ return new DawnTransactionChangeRecorder(this, rset) {
+
+ @Override
+ protected void appendNotification(Notification notification) {
+ // Append to the transaction first
+ super.appendNotification(notification);
+
+ if (!NotificationFilter.READ.matches(notification)) {
+ // Check whether we are modifying a read-only object
+ assertNotReadOnly(notification.getNotifier());
+ } else {
+ // Maybe we resolved a cross-resource containment proxy
+ handleCrossResourceContainmentProxy(notification);
+ }
+ }
+ };
+ }
+
+ protected void fireResourceSetChanged(CDOViewInvalidationEvent event) {
+ final ResourceSetListener[] listeners = getPostcommitListeners();
+ final Transaction transaction = new TransactionImpl(this, false, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+
+ // TODO: Compute notifications from the revision deltas? Model Explorer
+ // doesn't need any, and this is here primarily to kick the explorer.
+ final List<Notification> notifications = Collections.emptyList();
+
+ CDOUtils.notify(this, new Runnable() {
+
+ @Override
+ public void run() {
+ for (ResourceSetListener element : listeners) {
+ try {
+ element.resourceSetChanged(new ResourceSetChangeEvent(CDOAwareTransactionalEditingDomain.this, transaction, notifications));
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in resource set change listener.", //$NON-NLS-1$
+ e);
+ }
+ }
+ }
+ });
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareTransactionalEditingDomainProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareTransactionalEditingDomainProvider.java
new file mode 100755
index 00000000..d1024ae3
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareTransactionalEditingDomainProvider.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.IResourceUndoContextPolicy;
+import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
+import org.eclipse.papyrus.commands.CheckedOperationHistory;
+import org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomainProvider;
+
+/**
+ * This is the CDOAwareTransactionalEditingDomainProvider type. Enjoy.
+ */
+public class CDOAwareTransactionalEditingDomainProvider extends PapyrusROTransactionalEditingDomainProvider {
+
+ public CDOAwareTransactionalEditingDomainProvider() {
+ super();
+ }
+
+ @Override
+ public TransactionalEditingDomain createTransactionalEditingDomain(ResourceSet resourceSet) {
+ CDOAwareCommandStack stack = new CDOAwareCommandStack(CheckedOperationHistory.getInstance());
+ stack.setResourceUndoContextPolicy(IResourceUndoContextPolicy.DEFAULT);
+
+ TransactionalEditingDomain result = new CDOAwareTransactionalEditingDomain(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), stack, resourceSet);
+
+ WorkspaceEditingDomainFactory.INSTANCE.mapResourceSet(result);
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOReadOnlyHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOReadOnlyHandler.java
new file mode 100755
index 00000000..d204e532
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOReadOnlyHandler.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429826
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import java.util.Set;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler;
+import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
+
+import com.google.common.base.Optional;
+
+/**
+ * The CDO read handler is permission-based.
+ */
+public class CDOReadOnlyHandler extends AbstractReadOnlyHandler {
+
+ public CDOReadOnlyHandler(EditingDomain editingDomain) {
+ super(editingDomain);
+ }
+
+ @Override
+ public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
+ Optional<Boolean> result = Optional.absent();
+
+ if (axes.contains(ReadOnlyAxis.PERMISSION) && (uris.length > 0) && CDOUtils.isCDOEditingDomain(getEditingDomain())) {
+ for (int i = 0; !result.or(Boolean.FALSE) && (i < uris.length); i++) {
+ // if it's a cdo:// URI, then I have a definitive answer
+ if (CDOUtils.isCDOURI(uris[i])) {
+ result = Optional.of(isReadOnly(uris[i]));
+ }
+ }
+ }
+
+ return result;
+ }
+
+ protected boolean isReadOnly(URI uri) {
+ boolean result = false;
+
+ Resource resource = getEditingDomain().getResourceSet().getResource(uri.trimFragment(), false);
+ if (resource instanceof CDOObject) {
+ result = CDOUtils.isReadOnly((CDOObject) resource);
+ }
+
+ return result;
+ }
+
+ @Override
+ public Optional<Boolean> isReadOnly(Set<ReadOnlyAxis> axes, EObject eObject) {
+ Optional<Boolean> result = Optional.absent();
+
+ if (axes.contains(ReadOnlyAxis.PERMISSION)) {
+ Resource resource = eObject.eResource();
+ if ((resource == null) || CDOUtils.isCDOURI(resource.getURI())) {
+ CDOObject cdo = CDOUtils.getCDOObject(eObject);
+ if (cdo != null) {
+ // I have a definitive answer for CDO objects
+ result = Optional.of(CDOUtils.isReadOnly(cdo));
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
+ // CDO requires the administrative UI to edit user permissions
+ return Optional.absent();
+ }
+
+ @Override
+ public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, EObject eObject) {
+ // CDO requires the administrative UI to edit user permissions
+ return Optional.absent();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOUndoContext.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOUndoContext.java
new file mode 100755
index 00000000..3fb4d746
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOUndoContext.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 432813
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+
+
+/**
+ * A CDO-specific undo context that records at the level of objects the scope of what is affected by an operation.
+ */
+public final class CDOUndoContext implements IUndoContext {
+
+ private static CDOUndoContext ALL_CDO = new CDOUndoContext();
+
+ private final Set<EObject> affectedObjects;
+
+ private String cachedLabel;
+
+ /**
+ * Initializes me with a non-empty aggregate of affected objects.
+ *
+ * @param affectedObjects
+ * the affected objects to record
+ *
+ * @throws IllegalArgumentException
+ * if the {@code affectedObjects} is empty
+ */
+ public CDOUndoContext(Iterable<? extends EObject> affectedObjects) {
+ super();
+
+ if (Iterables.isEmpty(affectedObjects)) {
+ throw new IllegalArgumentException("affectedObjects is empty"); //$NON-NLS-1$
+ }
+
+ this.affectedObjects = ImmutableSet.copyOf(affectedObjects);
+ }
+
+ private CDOUndoContext() {
+ super();
+
+ this.affectedObjects = Collections.<EObject> emptySet();
+ }
+
+ /**
+ * Flushes all {@code CDOUndoContext}s from the specified operation {@code history}.
+ *
+ * @param history
+ * a history to flush
+ */
+ public static void flushAll(IOperationHistory history) {
+ history.dispose(ALL_CDO, true, true, true);
+ }
+
+ /**
+ * Obtains an immutable set of the objects affected by the operation.
+ *
+ * @return my affected objects. This set is immutable
+ */
+ public Set<EObject> getAffectedObjects() {
+ return affectedObjects;
+ }
+
+ @Override
+ public boolean matches(IUndoContext context) {
+ return (context == ALL_CDO) || (context instanceof CDOUndoContext) && !Sets.intersection(getAffectedObjects(), ((CDOUndoContext) context).getAffectedObjects()).isEmpty();
+ }
+
+ @Override
+ public String getLabel() {
+ if (cachedLabel == null) {
+ StringBuilder buf = new StringBuilder();
+ Joiner.on(", ").appendTo(buf, Iterables.limit(affectedObjects, 3)); //$NON-NLS-1$
+ if (affectedObjects.size() > 3) {
+ buf.append(", ..."); //$NON-NLS-1$
+ }
+
+ cachedLabel = NLS.bind(Messages.CDOUndoContext_0, buf);
+ }
+
+ return cachedLabel;
+ }
+
+ @Override
+ public String toString() {
+ return getLabel();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/PapyrusCDOResourceFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/PapyrusCDOResourceFactory.java
new file mode 100755
index 00000000..f0579df0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/PapyrusCDOResourceFactory.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource;
+
+import org.eclipse.emf.cdo.eresource.impl.CDOResourceFactoryImpl;
+import org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * This is the PapyrusCDOResourceFactory type. Enjoy.
+ */
+public class PapyrusCDOResourceFactory
+ extends CDOResourceFactoryImpl {
+
+ private final CDOAwareModelSet modelSet;
+
+ public PapyrusCDOResourceFactory(CDOAwareModelSet modelSet) {
+ super();
+
+ this.modelSet = modelSet;
+ }
+
+ @Override
+ protected boolean isGetResource() {
+ return modelSet.isInGetResource() || super.isGetResource();
+ }
+
+ /**
+ * @since 4.0
+ */
+ protected CDOResourceImpl createCDOResource(URI uri)
+ {
+ return new PapyrusCDOResourceImpl(uri);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/PapyrusCDOResourceImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/PapyrusCDOResourceImpl.java
new file mode 100644
index 00000000..66efef4c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/PapyrusCDOResourceImpl.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.core.resource;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * @author XZ223605
+ * needed to be compatible with internationnalization
+ */
+public class PapyrusCDOResourceImpl extends CDOResourceImpl {
+
+ /**
+ * Constructor.
+ *
+ */
+ public PapyrusCDOResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl#getDefaultSaveOptions()
+ *
+ * @return
+ */
+ @Override
+ public Map<Object, Object> getDefaultSaveOptions() {
+ return new HashMap<Object, Object>();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/CDOFunctions.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/CDOFunctions.java
new file mode 100755
index 00000000..0e28eb34
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/CDOFunctions.java
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.util;
+
+import java.util.Collections;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the CDOFunctions type. Enjoy.
+ */
+public class CDOFunctions {
+
+ // Not instantiable by clients.
+ private CDOFunctions() {
+ super();
+ }
+
+ public static <F, T> Function<F, T> adapt(Class<? extends T> adapterType) {
+ return new AdaptFunction<F, T>(adapterType);
+ }
+
+ public static <T> Function<Resource, T> getRoot(Class<? extends T> rootElementType) {
+ return new ResourceRootFunction<T>(rootElementType);
+ }
+
+ public static Function<CDOResourceNode, Iterable<CDOResourceNode>> getFolderContents() {
+ return new FolderContentsFunction<CDOResourceNode>(CDOResourceNode.class);
+ }
+
+ public static <T extends CDOResourceNode> Function<CDOResourceNode, Iterable<T>> getFolderContents(Class<T> nodeType) {
+ return new FolderContentsFunction<T>(nodeType);
+ }
+
+ public static Function<CDOObject, EObject> getEObject() {
+ return GetEObjectFunction.INSTANCE;
+ }
+
+ //
+ // Nested types
+ //
+
+ private static final class AdaptFunction<F, T> implements Function<F, T> {
+
+ private final Class<? extends T> adapterType;
+
+ AdaptFunction(Class<? extends T> adapterType) {
+ this.adapterType = adapterType;
+ }
+
+ @Override
+ public T apply(F input) {
+ return CDOUtils.adapt(input, adapterType);
+ }
+
+ @Override
+ public String toString() {
+ return String.format("adapt(%s)", adapterType.getName()); //$NON-NLS-1$
+ }
+
+ @Override
+ public int hashCode() {
+ return adapterType.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return (other instanceof AdaptFunction<?, ?>) && (((AdaptFunction<?, ?>) other).adapterType == adapterType);
+ }
+ }
+
+ private static final class ResourceRootFunction<T> implements Function<Resource, T> {
+
+ private final Class<? extends T> rootElementType;
+
+ ResourceRootFunction(Class<? extends T> rootElementType) {
+ this.rootElementType = rootElementType;
+ }
+
+ @Override
+ public T apply(Resource input) {
+ if (!input.isLoaded()) {
+ try {
+ input.load(null);
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+ }
+
+ return Iterables.getFirst(Iterables.filter(input.getContents(), rootElementType), null);
+ }
+
+ @Override
+ public String toString() {
+ return String.format("getRoot(%s)", rootElementType.getName()); //$NON-NLS-1$
+ }
+
+ @Override
+ public int hashCode() {
+ return rootElementType.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return (other instanceof ResourceRootFunction<?>) && (((ResourceRootFunction<?>) other).rootElementType == rootElementType);
+ }
+ }
+
+ private static final class FolderContentsFunction<T extends CDOResourceNode> implements Function<CDOResourceNode, Iterable<T>> {
+
+ private final Class<T> nodeType;
+
+ FolderContentsFunction(Class<T> nodeType) {
+ this.nodeType = nodeType;
+ }
+
+ @Override
+ public Iterable<T> apply(CDOResourceNode input) {
+ Iterable<T> result;
+
+ if (input instanceof CDOResourceFolder) {
+ result = Iterables.filter(((CDOResourceFolder) input).getNodes(), nodeType);
+ } else if (input.isRoot()) {
+ result = Iterables.filter(((CDOResource) input).getContents(), nodeType);
+ } else {
+ result = Collections.emptyList();
+ }
+
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return String.format("getFolderContents(%s)", nodeType.getName()); //$NON-NLS-1$
+ }
+
+ @Override
+ public int hashCode() {
+ return nodeType.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return (other instanceof FolderContentsFunction<?>) && (((FolderContentsFunction<?>) other).nodeType == nodeType);
+ }
+ }
+
+ private static final class GetEObjectFunction implements Function<CDOObject, EObject> {
+
+ static final GetEObjectFunction INSTANCE = new GetEObjectFunction();
+
+ private GetEObjectFunction() {
+ super();
+ }
+
+ @Override
+ public EObject apply(CDOObject input) {
+ return CDOUtil.getEObject(input);
+ }
+
+ @Override
+ public String toString() {
+ return "getEObject()"; //$NON-NLS-1$
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/CDOPredicates.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/CDOPredicates.java
new file mode 100755
index 00000000..cf349bc9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/CDOPredicates.java
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.util;
+
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.common.util.URI;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+
+/**
+ * This is the CDOPredicates type. Enjoy.
+ */
+public class CDOPredicates {
+
+ // Not instantiable by clients.
+ private CDOPredicates() {
+ super();
+ }
+
+ public static <T> Predicate<T> adaptsTo(Class<?> adapterType) {
+ return Predicates.<T, Object> compose(Predicates.notNull(), CDOFunctions.<T, Object> adapt(adapterType));
+ }
+
+ public static Predicate<CDOResourceNode> hasExtension(String fileExtension) {
+ return (fileExtension == null) ? new HasNoExtension() : new HasExtension(fileExtension);
+ }
+
+ public static Predicate<CDOResourceNode> hasURIPrefix(URI prefix) {
+ if (!prefix.isPrefix()) {
+ throw new IllegalArgumentException("not a URI prefix"); //$NON-NLS-1$
+ }
+
+ return new HasURIPrefix(prefix);
+ }
+
+ //
+ // Nested types
+ //
+
+ private static final class HasExtension implements Predicate<CDOResourceNode> {
+
+ private final String fileExtension;
+
+ HasExtension(String fileExtension) {
+ this.fileExtension = fileExtension;
+ }
+
+ @Override
+ public boolean apply(CDOResourceNode input) {
+ return fileExtension.equals(input.getURI().fileExtension());
+ }
+
+ @Override
+ public String toString() {
+ return String.format("hasExtension(%s)", fileExtension); //$NON-NLS-1$
+ }
+
+ @Override
+ public int hashCode() {
+ return fileExtension.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return (other instanceof HasExtension) && ((HasExtension) other).fileExtension.equals(fileExtension);
+ }
+ }
+
+ private static final class HasNoExtension implements Predicate<CDOResourceNode> {
+
+ HasNoExtension() {
+ super();
+ }
+
+ @Override
+ public boolean apply(CDOResourceNode input) {
+ return input.getURI().fileExtension() == null;
+ }
+
+ @Override
+ public String toString() {
+ return "hasNoExtension()"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int hashCode() {
+ return HasNoExtension.class.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return (other instanceof HasNoExtension);
+ }
+ }
+
+ private static final class HasURIPrefix implements Predicate<CDOResourceNode> {
+
+ private final URI prefix;
+
+ HasURIPrefix(URI prefix) {
+ this.prefix = prefix;
+ }
+
+ @Override
+ public boolean apply(CDOResourceNode input) {
+ return input.getURI().toString().startsWith(prefix.toString());
+ }
+
+ @Override
+ public String toString() {
+ return String.format("hasURIPrefix(%s)", prefix); //$NON-NLS-1$
+ }
+
+ @Override
+ public int hashCode() {
+ return prefix.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ return (other instanceof HasURIPrefix) && ((HasURIPrefix) other).prefix.equals(prefix);
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/JobWaiter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/JobWaiter.java
new file mode 100755
index 00000000..3e9f92a9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/util/JobWaiter.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 439725
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.util;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+
+
+/**
+ * An utility that provides interruptible wait for a {@code Job} or
+ * job {@linkplain Job#belongsTo(Object) family} with a time-out.
+ */
+public class JobWaiter {
+
+ private static final ScheduledExecutorService timeoutService = Executors.newSingleThreadScheduledExecutor();
+
+ private final Object targetFamily;
+
+ private final Job targetJob;
+
+ final long start = System.currentTimeMillis();
+
+ /**
+ * Not instantiable by clients.
+ */
+ private JobWaiter(Job job, Object family) {
+ super();
+
+ this.targetJob = job;
+ this.targetFamily = family;
+ }
+
+ /**
+ * Wait for all jobs (if any) in the given {@code family} to finish.
+ *
+ * @param family
+ * a job family to wait for
+ * @param timeout
+ * a positive timeout
+ * @param unit
+ * the time unit for the {@code timeout}
+ *
+ * @return {@code true} on successful wait (if required); {@code false} on time-out
+ *
+ * @throws InterruptedException
+ * if the wait is interrupted
+ */
+ public static boolean waitFor(Object family, long timeout, TimeUnit unit) throws InterruptedException {
+ return new JobWaiter(null, family).doWait(timeout, unit);
+ }
+
+ /**
+ * Wait for a specific {@code job} to finish.
+ *
+ * @param job
+ * a job to wait for
+ * @param timeout
+ * a positive timeout
+ * @param unit
+ * the time unit for the {@code timeout}
+ *
+ * @return {@code true} on successful wait (if required); {@code false} on time-out
+ *
+ * @throws InterruptedException
+ * if the wait is interrupted
+ */
+ public static boolean waitFor(Job job, long timeout, TimeUnit unit) throws InterruptedException {
+ return new JobWaiter(job, null).doWait(timeout, unit);
+ }
+
+ protected boolean doWait(long timeout, TimeUnit unit) throws InterruptedException {
+ if (timeout <= 0) {
+ throw new IllegalArgumentException("Non-positive timeout"); //$NON-NLS-1$
+ }
+
+ boolean result = false;
+
+ // create and schedule a task that will time-out the join
+ Timeout timeoutTask = new Timeout();
+
+ timeoutService.schedule(timeoutTask, timeout, unit);
+
+ try {
+ if (targetJob != null) {
+ // the Job::join() API documents that it is interruptible, but the
+ // actual implementation in the JobManager is not
+ new JobFinishListener(targetJob).await();
+ } else {
+ // On some platforms, cancellation of a family join is not reliable
+ new FamilyFinishListener(targetFamily).await();
+ }
+
+ result = true;
+ timeoutTask.cancel();
+
+ if (Thread.interrupted()) {
+ throw new InterruptedException();
+ }
+ } catch (InterruptedException e) {
+ if (timeoutTask.timedOut()) {
+ // normal condition: time-out task interrupted us
+ } else {
+ // "real" interruption
+ throw e;
+ }
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class Timeout implements Runnable {
+
+ private final Thread toInterrupt = Thread.currentThread();
+
+ private final AtomicBoolean cancelled = new AtomicBoolean();
+
+ private final AtomicBoolean timedOut = new AtomicBoolean();
+
+ @Override
+ public void run() {
+ if (!cancelled.get()) {
+ timedOut.set(true);
+ toInterrupt.interrupt();
+ }
+ }
+
+ void cancel() {
+ cancelled.set(true);
+ }
+
+ boolean timedOut() {
+ return timedOut.get();
+ }
+ }
+
+ private static abstract class FinishListener extends JobChangeAdapter {
+
+ private boolean done;
+
+ FinishListener() {
+ super();
+
+ Job.getJobManager().addJobChangeListener(this);
+ }
+
+ void dispose() {
+ Job.getJobManager().removeJobChangeListener(this);
+ }
+
+ synchronized void await() throws InterruptedException {
+ try {
+ for (;;) {
+ // Check done condition because our job/family may have finished already before we got here
+ if (done || checkDone()) {
+ break;
+ }
+
+ wait();
+ }
+ } finally {
+ // Can only wait on me once
+ dispose();
+ }
+ }
+
+ @Override
+ public synchronized void done(IJobChangeEvent event) {
+ if (checkDone()) {
+ try {
+ done = true;
+ dispose();
+ } finally {
+ notifyAll();
+ }
+ }
+ }
+
+ protected abstract boolean checkDone();
+ }
+
+ private static final class JobFinishListener extends FinishListener {
+
+ private final Job job;
+
+ JobFinishListener(Job job) {
+ super();
+
+ this.job = job;
+ }
+
+ @Override
+ protected boolean checkDone() {
+ return job.getState() != Job.RUNNING;
+ }
+ }
+
+ private static final class FamilyFinishListener extends FinishListener {
+
+ private final Object family;
+
+ FamilyFinishListener(Object family) {
+ super();
+
+ this.family = family;
+ }
+
+ @Override
+ protected boolean checkDone() {
+ return Job.getJobManager().find(family).length == 0;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/Activator.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/Activator.java
new file mode 100755
index 00000000..e4e5b1f1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/Activator.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.core"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the log helper
+ log.setPlugin(plugin);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CDOProxyResolvingResourceSet.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CDOProxyResolvingResourceSet.java
new file mode 100755
index 00000000..bf21f75e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CDOProxyResolvingResourceSet.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core;
+
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.papyrus.cdo.internal.core.controlmode.CDOProxyManager;
+
+
+/**
+ * A specialized {@link ResourceSet} that resolves CDO-style cross-resource proxies in the context of the attached {@linkplain CDOView view}.
+ */
+public class CDOProxyResolvingResourceSet extends ResourceSetImpl {
+
+ public CDOProxyResolvingResourceSet() {
+ super();
+ }
+
+ /**
+ * Extends the inherited implementation to handle CDO-style cross-resource proxies.
+ */
+ @Override
+ public EObject getEObject(URI uri, boolean loadOnDemand) {
+ EObject result;
+
+ if (CDOProxyManager.isCDOProxyURI(uri)) {
+ // force loading (ignore 'loadOnDemand') because export requires a complete model
+ Resource res = getResource(uri.trimFragment(), true);
+ result = (res == null) ? null : res.getEObject(CDOProxyManager.extractOIDFragment(uri));
+ } else {
+ result = super.getEObject(uri, loadOnDemand);
+ }
+
+ return result;
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CDOUtils.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CDOUtils.java
new file mode 100755
index 00000000..b0cac3cf
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CDOUtils.java
@@ -0,0 +1,553 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core;
+
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.getFirst;
+
+import java.util.ListIterator;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.concurrent.Executor;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.CDOLock;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutViewProvider;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.view.CDOViewInvalidationEvent;
+import org.eclipse.emf.cdo.view.CDOViewSet;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentsEList.FeatureListIterator;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.spi.cdo.InternalCDOView;
+import org.eclipse.emf.transaction.ResourceSetChangeEvent;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.net4j.util.lifecycle.LifecycleEvent;
+import org.eclipse.papyrus.cdo.core.resource.CDOAwareTransactionalEditingDomain;
+import org.eclipse.papyrus.cdo.core.util.CDOFunctions;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.UnmodifiableListIterator;
+
+/**
+ * This is the CDOUtils type. Enjoy.
+ */
+public class CDOUtils {
+
+ private static final Set<String> CDO_URI_SCHEMES = ImmutableSet.of("cdo", "dawn", CDOCheckoutViewProvider.SCHEME); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private static Executor broadcastExecutor = new DirectExecutor();
+
+ @SuppressWarnings("restriction")
+ private static final Predicate<Object> IS_LEGACY_WRAPPER = Predicates.instanceOf(org.eclipse.emf.internal.cdo.object.CDOObjectWrapperBase.class);
+
+ /**
+ * Not instantiable by clients.
+ */
+ private CDOUtils() {
+ super();
+ }
+
+ public static <T> T adapt(Object object, Class<? extends T> type) {
+ T result = tryCast(object, type);
+
+ if (result == null) {
+ if (object instanceof IAdaptable) {
+ result = type.cast(((IAdaptable) object).getAdapter(type));
+ }
+
+ if ((result == null) && (type == CDOObject.class)) {
+ EObject eObject = adapt(object, EObject.class);
+ if (eObject != null) {
+ result = type.cast(getCDOObject(eObject));
+ }
+ }
+
+ if ((result == null) && (object instanceof Notifier)) {
+ result = getFirst(filter(((Notifier) object).eAdapters(), type), null);
+ }
+ }
+
+ return result;
+ }
+
+ public static <T> T tryCast(Object object, Class<? extends T> type) {
+ T result = null;
+
+ if (type.isInstance(object)) {
+ result = type.cast(object);
+ }
+
+ return result;
+ }
+
+ public static boolean isCDOURI(URI uri) {
+ return CDO_URI_SCHEMES.contains(uri.scheme());
+ }
+
+ public static boolean isCDOEditingDomain(EditingDomain domain) {
+ return domain instanceof CDOAwareTransactionalEditingDomain;
+ }
+
+ public static ResourceSet getResourceSet(Notifier notifier) {
+ ResourceSet result = null;
+
+ if (notifier instanceof CDOViewSet) {
+ result = ((CDOViewSet) notifier).getResourceSet();
+ } else if (notifier instanceof ResourceSet) {
+ result = (ResourceSet) notifier;
+ } else if (notifier instanceof Resource) {
+ result = ((Resource) notifier).getResourceSet();
+ } else if (notifier instanceof CDOResourceNode) {
+ // folders (resource nodes that aren't resources) are not in a
+ // resource set, so get the associated view's resource set
+ CDOView view = ((CDOResourceNode) notifier).cdoView();
+ if (view != null) {
+ result = view.getResourceSet();
+ }
+ } else if (notifier instanceof EObject) {
+ result = getResourceSet(((EObject) notifier).eResource());
+ }
+
+ return result;
+ }
+
+ public static boolean isCDOObject(EObject object) {
+ ResourceSet resourceSet = getResourceSet(object);
+
+ return (resourceSet != null) && (CDOUtil.getViewSet(resourceSet) != null);
+ }
+
+ public static CDOObject getCDOObject(EObject object) {
+ CDOObject result = null;
+
+ if (isCDOObject(object)) {
+ result = CDOUtil.getCDOObject(object);
+ }
+
+ return result;
+ }
+
+ public static CDOID getCDOID(EObject object) {
+ CDOObject cdo = getCDOObject(object);
+ return (cdo == null) ? CDOIDUtil.createExternal(EcoreUtil.getURI(object).toString()) : cdo.cdoID();
+ }
+
+ public static CDOView getView(ResourceSet resourceSet) {
+ CDOView result = null;
+
+ CDOViewSet viewSet = CDOUtil.getViewSet(resourceSet);
+ if (viewSet != null) {
+ CDOView[] views = viewSet.getViews();
+ if (views.length > 0) {
+ result = views[0];
+ }
+ }
+
+ return result;
+ }
+
+ public static CDOView getView(EObject object) {
+ CDOObject cdo = getCDOObject(object);
+ return (cdo == null) ? null : cdo.cdoView();
+ }
+
+ public static boolean isLockable(CDOObject object) {
+ // transient objects do not have lock states, nor do those that are not
+ // in a view or are in a closed view
+ CDOView view = object.cdoView();
+ return (view != null) && !view.isClosed() && (object.cdoLockState() != null);
+ }
+
+ public static boolean isLocked(CDOObject object, boolean remotely) {
+ CDOLock lock = isLockable(object) ? object.cdoWriteLock() : null;
+
+ return (lock != null) && (remotely ? lock.isLockedByOthers() : lock.isLocked());
+ }
+
+ public static void lock(CDOObject object) {
+ object.cdoWriteLock().lock();
+ }
+
+ public static void unlock(CDOObject object) {
+ object.cdoWriteLock().unlock();
+ }
+
+ public static DawnState computeState(EObject object) {
+ DawnState result = DawnState.CLEAN;
+
+ CDOObject cdo = getCDOObject(object);
+ if (cdo != null) {
+ if (cdo.cdoConflict()) {
+ result = DawnState.CONFLICT;
+ } else if (isLocked(cdo, true)) {
+ result = DawnState.LOCKED_REMOTELY;
+ } else if (isLocked(cdo, false)) {
+ result = DawnState.LOCKED_LOCALLY;
+ }
+ }
+
+ return result;
+ }
+
+ public static boolean isReadOnly(CDOObject object) {
+ // an object is read-only if somebody else has it locked
+ boolean result = CDOUtils.isLocked(object, true);
+
+ // or if the current user doesn't have permission to write it
+ if (!result) {
+ result = !object.cdoPermission().isWritable();
+ }
+
+ return result;
+ }
+
+ public static Iterable<EObject> getEObjects(Iterable<? extends CDOObject> cdoObjects) {
+ return Iterables.transform(cdoObjects, CDOFunctions.getEObject());
+ }
+
+ public static Iterable<EStructuralFeature.Setting> crossReference(EObject object) {
+ Iterable<EStructuralFeature.Setting> result;
+
+ ECrossReferenceAdapter adapter = adapt(object, ECrossReferenceAdapter.class);
+ if (adapter != null) {
+ result = adapter.getInverseReferences(object);
+ } else {
+ EObject tree = EcoreUtil.getRootContainer(object);
+ Resource resource = tree.eResource();
+ ResourceSet rset = (resource == null) ? null : resource.getResourceSet();
+
+ if (rset != null) {
+ result = EcoreUtil.UsageCrossReferencer.find(object, rset);
+ } else if (resource != null) {
+ result = EcoreUtil.UsageCrossReferencer.find(object, resource);
+ } else {
+ result = EcoreUtil.UsageCrossReferencer.find(object, tree);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Obtains an unmodifiable iterator over the values in the specified {@code feature} of an {@code object}. The resulting iterator supplies zero
+ * or one element for scalar features, according to whether the feature's value is {@code null} or not. In the case of a scalar feature,
+ * the index of the element as reported by {@link ListIterator#nextIndex()} and {@link ListIterator#previousIndex()} is {@code -1}.
+ *
+ * @param object
+ * an object
+ * @param feature
+ * a feature of the {@code object}
+ * @param resolve
+ * whether to resolve proxies (in the case of an {@link EReference}
+ *
+ * @return the unmodifiable feature list iterator
+ */
+ public static <E> FeatureListIterator<E> iterator(EObject object, final EStructuralFeature feature, boolean resolve) {
+ FeatureListIterator<E> result;
+
+ Object value = object.eGet(feature, resolve);
+ if (value instanceof InternalEList<?>) {
+ @SuppressWarnings("unchecked")
+ InternalEList<E> list = (InternalEList<E>) value;
+ final ListIterator<E> delegate = (resolve) ? list.listIterator() : list.basicListIterator();
+
+ class NonEmpty extends UnmodifiableListIterator<E>implements FeatureListIterator<E> {
+
+ @Override
+ public EStructuralFeature feature() {
+ return feature;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return delegate.hasNext();
+ }
+
+ @Override
+ public E next() {
+ return delegate.next();
+ }
+
+ @Override
+ public int nextIndex() {
+ return delegate.nextIndex();
+ }
+
+ @Override
+ public boolean hasPrevious() {
+ return delegate.hasPrevious();
+ }
+
+ @Override
+ public E previous() {
+ return delegate.previous();
+ }
+
+ @Override
+ public int previousIndex() {
+ return delegate.previousIndex();
+ }
+ }
+ ;
+
+ result = new NonEmpty();
+ } else if (value == null) {
+ class Empty extends UnmodifiableListIterator<E>implements FeatureListIterator<E> {
+
+ @Override
+ public EStructuralFeature feature() {
+ return feature;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return false;
+ }
+
+ @Override
+ public E next() {
+ throw new NoSuchElementException();
+ }
+
+ @Override
+ public int nextIndex() {
+ return -1;
+ }
+
+ @Override
+ public boolean hasPrevious() {
+ return false;
+ }
+
+ @Override
+ public E previous() {
+ throw new NoSuchElementException();
+ }
+
+ @Override
+ public int previousIndex() {
+ return -2;
+ }
+ }
+ ;
+
+ result = new Empty();
+ } else {
+ @SuppressWarnings("unchecked")
+ final E onlyValue = (E) value;
+
+ class Singleton extends UnmodifiableListIterator<E>implements FeatureListIterator<E> {
+
+ private int index = -1;
+
+ @Override
+ public EStructuralFeature feature() {
+ return feature;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return index < 0;
+ }
+
+ @Override
+ public E next() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+ index++;
+ return onlyValue;
+ }
+
+ @Override
+ public int nextIndex() {
+ return index;
+ }
+
+ @Override
+ public boolean hasPrevious() {
+ return index == 0;
+ }
+
+ @Override
+ public E previous() {
+ if (!hasPrevious()) {
+ throw new NoSuchElementException();
+ }
+ index--;
+ return onlyValue;
+ }
+
+ @Override
+ public int previousIndex() {
+ return index - 1;
+ }
+ }
+ ;
+
+ result = new Singleton();
+ }
+
+ return result;
+ }
+
+ /**
+ * <p>
+ * Runs a code block that broadcasts notification of {@link ResourceSetChangeEvent}s, {@link CDOViewInvalidationEvent}s, etc. to listeners using the most appropriate {@linkplain #setBroadcastExecutor() executor} available. This allows a UI-safe execution
+ * to be injected if necessary.
+ * </p>
+ * <p>
+ * <strong>Note</strong> that there is no assurance that this block will be executed either synchronously or asynchronously.
+ * </p>
+ *
+ * @param broadcastCommand
+ * the notification command to execute
+ */
+ public static void notify(Runnable broadcastCommand) {
+ broadcastExecutor.execute(broadcastCommand);
+ }
+
+ public static void notify(final TransactionalEditingDomain domain, final Runnable broadcastCommand) {
+
+ broadcastExecutor.execute(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ domain.runExclusive(broadcastCommand);
+ } catch (Exception e) {
+ Activator.log.error("Exception in execution of notification broadcast.", e); //$NON-NLS-1$
+ }
+ }
+ });
+ }
+
+ public static void setBroadcastExecutor(Executor executor) {
+ broadcastExecutor = (executor == null) ? new DirectExecutor() : executor;
+ }
+
+ /**
+ * Remove the given {@code listener} if the event it received is a lifecycle deactivation event.
+ *
+ * @param listener
+ * a listener that received a possible deactivation event
+ * @param possibleDeactivation
+ * the event that may be a lifecycle deactivation
+ *
+ * @return whether the listener was removed because the event was a deactivation
+ */
+ public static boolean removeListenerFromDeactivatedLifecycle(IListener listener, IEvent possibleDeactivation) {
+ boolean result = false;
+
+ if (possibleDeactivation instanceof LifecycleEvent) {
+ switch (((LifecycleEvent) possibleDeactivation).getKind()) {
+ case DEACTIVATED:
+ possibleDeactivation.getSource().removeListener(listener);
+ result = true;
+ break;
+ default:
+ // Pass
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Unloads a {@code cdoObject} (because {@link CDOResource}s don't implement unloading) by clearing its adapters.
+ *
+ * @param cdoObject
+ * a CDO object to unload
+ *
+ * @see #unload(CDOView)
+ */
+ public static void unload(CDOObject cdoObject) {
+ EObject eObject = CDOUtil.getEObject(cdoObject);
+ if (eObject != null) {
+ // Remove all adapters *except* the all-important legacy wrapper!
+ EList<Adapter> adapters = eObject.eAdapters();
+ if (!adapters.isEmpty()) {
+ Adapter legacyWrapper = Iterables.find(eObject.eAdapters(), IS_LEGACY_WRAPPER, null);
+
+ // Don't do anything if the only adapter is the legacy wrapper
+ if ((legacyWrapper == null) || (adapters.size() > 1)) {
+ adapters.clear();
+ if (legacyWrapper != null) {
+ // Restore it, otherwise references to this CDOObject will break
+ adapters.add(0, legacyWrapper);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Unloads all of the objects in a {@code cdoView} (because {@link CDOResource}s don't implement unloading) by clearing their adapters.
+ *
+ * @param cdoView
+ * a view to unload
+ *
+ * @see #unload(CDOObject)
+ */
+ public static void unload(CDOView cdoView) {
+ if (cdoView instanceof InternalCDOView) {
+ for (CDOObject next : ((InternalCDOView) cdoView).getObjectsList()) {
+ // Don't clear adapters of the resource because ECrossReferenceAdapters would try to crawl the contents
+ if (!(next instanceof CDOResourceNode)) {
+ CDOUtils.unload(next);
+ }
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ private static final class DirectExecutor implements Executor {
+
+ @Override
+ public void execute(Runnable command) {
+ command.run();
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CompositeResourceSetDisposalApprover.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CompositeResourceSetDisposalApprover.java
new file mode 100755
index 00000000..53f0e615
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/CompositeResourceSetDisposalApprover.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.cdo.core.IResourceSetDisposalApprover;
+
+import com.google.common.collect.Lists;
+
+/**
+ * This is the CompositeResourceSetDisposalApprover type. Enjoy.
+ */
+class CompositeResourceSetDisposalApprover
+ implements IResourceSetDisposalApprover {
+
+ private final List<IResourceSetDisposalApprover> approvers = Lists
+ .newArrayListWithExpectedSize(1);
+
+ CompositeResourceSetDisposalApprover() {
+ super();
+ }
+
+ @Override
+ public DisposeAction disposalRequested(CDOCheckout checkout,
+ Collection<ResourceSet> resourceSets) {
+
+ DisposeAction result = DisposeAction.CLOSE;
+
+ if (!resourceSets.isEmpty() && !approvers.isEmpty()) {
+ for (IResourceSetDisposalApprover next : approvers) {
+ DisposeAction action = wrapNull(next
+ .disposalRequested(checkout, resourceSets));
+
+ result = result.compareTo(action) > 0
+ ? action
+ : result;
+
+ if (result == DisposeAction.NONE) {
+ // no need to consult anyone else
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private DisposeAction wrapNull(DisposeAction action) {
+ return (action == null)
+ ? DisposeAction.NONE
+ : action;
+ }
+
+ void addApprover(IResourceSetDisposalApprover approver) {
+ if (!approvers.contains(approver)) {
+ approvers.add(approver);
+ }
+ }
+
+ void removeApprover(IResourceSetDisposalApprover approver) {
+ approvers.remove(approver);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/GMFSafePackageProcessor.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/GMFSafePackageProcessor.java
new file mode 100755
index 00000000..f933414a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/GMFSafePackageProcessor.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core;
+
+import java.util.Collections;
+
+import org.eclipse.emf.cdo.common.model.EMFUtil;
+import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry.PackageProcessor;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.Transaction;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+
+
+/**
+ * A package processor that ensures the contextual {@linkplain TransactionalEditingDomain GMF editing domain} (if any) is writable.
+ */
+class GMFSafePackageProcessor implements PackageProcessor {
+
+ private final Object NOT_PROCESSED_TOKEN = new Object();
+
+ private final PackageProcessor delegate;
+
+ public GMFSafePackageProcessor(PackageProcessor processor) {
+ super();
+
+ this.delegate = processor;
+ }
+
+ @Override
+ public Object processPackage(Object value) {
+ Object result = NOT_PROCESSED_TOKEN;
+
+ if (EMFUtil.isDynamicEPackage(value)) {
+ EPackage ePackage = (EPackage) value;
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(ePackage);
+ if (domain != null) {
+ InternalTransactionalEditingDomain internalDomain = (InternalTransactionalEditingDomain) domain;
+ Transaction transaction = null;
+
+ try {
+ transaction = internalDomain.startTransaction(false, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ result = delegate.processPackage(value);
+ transaction.commit();
+ } catch (RollbackException e) {
+ Activator.log.error("Failed to commit processed package.", e); //$NON-NLS-1$
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in processing package.", e); //$NON-NLS-1$
+ transaction.rollback();
+ }
+ }
+ }
+
+ if (result == NOT_PROCESSED_TOKEN) {
+ // just delegate
+ result = delegate.processPackage(value);
+ }
+
+ return result;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/IRepositoryModelStorage.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/IRepositoryModelStorage.java
new file mode 100755
index 00000000..397541d4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/IRepositoryModelStorage.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * This is the IRepositoryModelStorage type. Enjoy.
+ */
+public interface IRepositoryModelStorage {
+
+ /**
+ * Obtains an input stream on the repository model storage, if any.
+ *
+ * @return an input stream, or {@code null} if there is no repository model
+ * currently stored
+ *
+ * @throws IOException
+ * on any failure to get an input stream that is not simply that
+ * the storage doesn't yet exist
+ */
+ InputStream createInputStream()
+ throws IOException;
+
+ /**
+ * Obtains an output stream on the repository model storage.
+ *
+ * @return an output stream (may not be {@code null})
+ *
+ * @throws IOException
+ * on any failure to get an output stream
+ */
+ OutputStream createOutputStream()
+ throws IOException;
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/controlmode/CDOControlModeParticipant.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/controlmode/CDOControlModeParticipant.java
new file mode 100755
index 00000000..e79ca2e6
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/controlmode/CDOControlModeParticipant.java
@@ -0,0 +1,835 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.controlmode;
+
+import static com.google.common.collect.Iterables.concat;
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.transform;
+import static org.eclipse.emf.ecore.util.EcoreUtil.getRootContainer;
+import static org.eclipse.papyrus.cdo.internal.core.controlmode.CDOProxyManager.createPapyrusCDOURI;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.CDOState;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.InternalEObject.EStore;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.spi.cdo.CDOStore;
+import org.eclipse.emf.spi.cdo.InternalCDOView;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.IdentityCommand;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.infra.services.controlmode.commands.AbstractControlCommand;
+import org.eclipse.papyrus.infra.services.controlmode.participants.IControlCommandParticipant;
+import org.eclipse.papyrus.infra.services.controlmode.participants.IControlModeParticipant;
+import org.eclipse.papyrus.infra.services.controlmode.participants.IUncontrolCommandParticipant;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+
+/**
+ * A {@link IControlModeParticipant} for CDO resources that handles replacing references to controlled
+ * elements with proxies that, even in a CDO view, must be resolved by the usual EMF mechanism.
+ */
+public class CDOControlModeParticipant implements IControlCommandParticipant, IUncontrolCommandParticipant {
+
+ private static final Set<CDOState> TEMPORARY_ID_STATES = EnumSet.of(CDOState.TRANSIENT, CDOState.NEW);
+
+ private List<EObject> objectsToClearResource;
+
+ public CDOControlModeParticipant() {
+ super();
+ }
+
+ @Override
+ public String getID() {
+ return CDOControlModeParticipant.class.getName();
+ }
+
+ @Override
+ public int getPriority() {
+ return 255;
+ }
+
+ @Override
+ public boolean provideControlCommand(ControlModeRequest request) {
+ return isCDOResource(request);
+ }
+
+ private boolean isCDOResource(ControlModeRequest request) {
+ return CDOUtils.isCDOURI(request.getSourceURI());
+ }
+
+ @Override
+ public boolean provideUnControlCommand(ControlModeRequest request) {
+ return isCDOResource(request);
+ }
+
+ @Override
+ public ICommand getPreControlCommand(ControlModeRequest request) {
+ return IdentityCommand.INSTANCE;
+ }
+
+ @Override
+ public ICommand getPostControlCommand(ControlModeRequest request) {
+ return new AbstractCDOControlCommand(request) {
+
+ @Override
+ protected void buildUpdates(ControlModeRequest request, IUpdate.Collector updates) {
+ collectProxyCrossReferenceUpdates(updates, request.getModelSet(), request.getNewURI());
+ }
+ };
+ }
+
+ /**
+ * Obtains an {@linkplain IUpdate update} operation that converts external cross-references to the elements
+ * in a logical model unit indicated by the given representative {@code resource} to proxies.
+ *
+ * @param resource
+ * a resource that is a component of a logical model unit
+ *
+ * @return an operation that, when {@linkplain IUpdate#apply() applied}, will convert incoming cross-references to proxies
+ */
+ public IUpdate getProxyCrossReferencesUpdate(Resource resource) {
+ IUpdate.Compound result = new CompoundUpdate();
+
+ collectProxyCrossReferenceUpdates(result, resource.getResourceSet(), resource.getURI());
+
+ return result;
+ }
+
+ private void collectProxyCrossReferenceUpdates(IUpdate.Collector updates, ResourceSet resourceSet, URI unitURI) {
+ for (final EObject object : getAllPersistentSubunitContents(resourceSet, unitURI)) {
+ // replace references to the element by a proxy
+ CDOID proxy = null;
+ for (EStructuralFeature.Setting next : getExternalCrossReferences(object)) {
+ if (proxy == null) {
+ proxy = CDOIDUtil.createExternal(CDOProxyManager.createPapyrusCDOURI(object));
+ }
+ updates.add(new ControlUpdate(next, object, proxy));
+ }
+ }
+ }
+
+ public IUpdate getProxyCrossReferencesUpdate(final EObject owner, final EReference crossReference) {
+ IUpdate result = IUpdate.EMPTY;
+ final CDOStore[] store = { null };
+
+ for (ListIterator<? extends EObject> xrefs = CDOUtils.iterator(owner, crossReference, false); xrefs.hasNext();) {
+ final int index = xrefs.nextIndex();
+ final EObject referent = xrefs.next();
+
+ if (!referent.eIsProxy() && !inSameUnit(owner, referent) && inSameModel(owner, referent)) {
+ if (store[0] == null) {
+ store[0] = ((InternalCDOView) CDOUtils.getCDOObject(owner).cdoView()).getStore();
+ }
+
+ result = result.chain(new OneWayUpdate() {
+
+ @Override
+ public void apply() {
+ store[0].set((InternalEObject) owner, crossReference, index, CDOIDUtil.createExternal(createPapyrusCDOURI(referent)));
+ }
+ });
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public ICommand getPreUncontrolCommand(ControlModeRequest request) {
+ return new AbstractCDOControlCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ objectsToClearResource = Lists.newArrayList();
+
+ return super.doExecuteWithResult(monitor, info);
+ }
+
+ @Override
+ protected void buildUpdates(ControlModeRequest request, IUpdate.Collector updates) {
+ final URI sourceURI = getRequest().getSourceURI();
+
+ IUpdate resolveProxies = IUpdate.EMPTY;
+
+ // update references from other units to the unit being re-integrated
+ for (final EObject object : getAllPersistentSubunitContents(getRequest().getModelSet(), sourceURI)) {
+ // replace proxy references to the element by the element or an updated proxy
+ // which will be located in the destination resource
+ CDOID sourceProxy = null;
+ URI destinationResourceURI = null;
+ CDOID proxy = null;
+
+ // internal cross-references within the unit won't be affected, as they are all moving
+ for (final EStructuralFeature.Setting next : getExternalCrossReferences(object)) {
+ if (next.getEObject().eIsProxy()) {
+ // the cross-reference will be from a proxy only when it is a proxy owned by the cross-referenced object,
+ // by virtue of an opposite reference. In this case, it's only interesting if the proxy targets the
+ // parent (re-integrated-into) resource. So, resolve this proxy because we need to update the
+ // reference, below
+ resolveProxies = resolveProxies.chain(new OneWayUpdate() {
+
+ @Override
+ public void apply() {
+ resolve(object, (EReference) next.getEStructuralFeature(), next.getEObject());
+ }
+ });
+
+ } else {
+ if (sourceProxy == null) {
+ // create the source proxy
+ sourceProxy = CDOIDUtil.createExternal(CDOProxyManager.createPapyrusCDOURI(object));
+
+ // and the destination proxy
+ destinationResourceURI = request.getTargetResource(object.eResource().getURI().fileExtension()).getURI();
+ String proxyURI = CDOProxyManager.createPapyrusCDOURI(destinationResourceURI, object);
+ proxy = CDOIDUtil.createExternal(proxyURI);
+ }
+ updates.add(new UncontrolUpdate(next, object, sourceProxy, destinationResourceURI, proxy));
+ }
+ }
+
+ // upon removal from their resources, root elements will nonetheless retain a
+ // reference to the resource that formerly contained them. We need to force
+ // clearing of this reference in the CDO store
+ if (((InternalEObject) object).eDirectResource() != null) {
+ objectsToClearResource.add(object);
+ }
+ }
+
+ // resolve proxies as per above, after completing the loop, to avoid concurrent modifications
+ resolveProxies.apply();
+
+ // update references from the unit being re-integrated to the unit it is re-integrating into
+ for (final EObject object : getAllPersistentSubunitContents(getRequest().getModelSet(), getRequest().getNewURI())) {
+ // replace proxy references to the element by the element or an updated proxy
+ // which will be located in the destination resource
+ CDOID targetProxy = null;
+
+ for (EStructuralFeature.Setting next : getExternalCrossReferences(object)) {
+ if (inUnit(next.getEObject(), sourceURI)) {
+ // replace proxy references from the sub-unit into the parent with a direct reference, as this will
+ // no longer be a cross-unit reference
+ if (targetProxy == null) {
+ targetProxy = CDOIDUtil.createExternal(CDOProxyManager.createPapyrusCDOURI(object));
+ }
+ updates.add(new UncontrolUpdate(next, object, targetProxy));
+ }
+ }
+ }
+ }
+ };
+ }
+
+ void resolve(EObject object, EReference reference, EObject proxy) {
+ EReference opposite = reference.getEOpposite();
+ if (opposite != null) {
+ if (opposite.isMany()) {
+ InternalEList<?> list = (InternalEList<?>) object.eGet(opposite, false);
+ int index = list.basicIndexOf(proxy);
+ if (index >= 0) {
+ list.get(index); // resolve just this index
+ }
+ } else {
+ object.eGet(opposite, true); // resolve the scalar reference
+ }
+ }
+ }
+
+ @Override
+ public ICommand getPostUncontrolCommand(ControlModeRequest request) {
+ return new AbstractCDOControlCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ CommandResult result = super.doExecuteWithResult(monitor, info);
+
+ objectsToClearResource = null;
+
+ return result;
+ }
+
+ @Override
+ protected void buildUpdates(ControlModeRequest request, IUpdate.Collector updates) {
+ for (EObject next : objectsToClearResource) {
+ // some former resource roots may not be reattached (e.g., SashWindowsMgr)
+ if (CDOUtil.getCDOObject(next).cdoState() != CDOState.TRANSIENT) {
+ updates.add(new ClearResourceUpdate(next));
+ }
+ }
+ }
+ };
+ }
+
+ /**
+ * Get all cross-references to an {@code object} from outside of its own controlled unit <em>within</em> the same model (cross-model references do
+ * not count).
+ *
+ * @param object
+ * an object being controlled
+ * @return references to it from outside of its (new) controlled unit
+ */
+ Iterable<EStructuralFeature.Setting> getExternalCrossReferences(final EObject object) {
+ return Iterables.filter(CDOUtils.crossReference(object), new Predicate<EStructuralFeature.Setting>() {
+
+ @Override
+ public boolean apply(EStructuralFeature.Setting input) {
+ boolean result = false;
+
+ EStructuralFeature ref = input.getEStructuralFeature();
+ if ((ref != EresourcePackage.Literals.CDO_RESOURCE__CONTENTS) && ref.isChangeable() && !ref.isDerived()) {
+ result = !inSameUnit(input.getEObject(), object) && inSameModel(input.getEObject(), object);
+ }
+
+ return result;
+ }
+ });
+
+ }
+
+ static boolean isPersistentObject(EObject object) {
+ boolean result = !object.eIsProxy();
+
+ if (result) {
+ CDOObject cdo = CDOUtils.getCDOObject(object);
+ result = (cdo != null) && !TEMPORARY_ID_STATES.contains(cdo.cdoState());
+ }
+
+ return result;
+ }
+
+ private static boolean inSameModel(EObject object, EObject other) {
+ // is the one object in the other's logical Papyrus model?
+ URI model1 = getResourceURI(getRootContainer(object));
+ URI model2 = getResourceURI(getRootContainer(other));
+
+ return (model1 != null) && (model2 != null) && model1.trimFileExtension().equals(model2.trimFileExtension());
+ }
+
+ private static URI getResourceURI(EObject object) {
+ URI result;
+
+ if (object.eIsProxy()) {
+ result = ((InternalEObject) object).eProxyURI().trimFragment();
+ } else {
+ Resource res = object.eResource();
+ result = (res == null) ? null : res.getURI();
+ }
+
+ return result;
+ }
+
+ private static boolean inSameUnit(EObject object, EObject other) {
+ // is the one object in the other's unit?
+ URI uri = getResourceURI(other);
+ return inUnit(object, uri);
+ }
+
+ private static boolean inUnit(EObject object, URI unit) {
+ boolean result = false;
+
+ if (unit != null) {
+ // get the extension-less model URIs
+ URI uri = getResourceURI(object);
+
+ if (uri != null) {
+ uri = uri.trimFileExtension();
+ URI otherURI = unit.trimFileExtension();
+
+ result = uri.equals(otherURI);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Iterates all of the proper contents of the resources comprising the logical model unit
+ * indicated by the representative {@code unitURI}.
+ *
+ * @param rset
+ * a resource set in which to load and/or iterate the resource contents
+ * @param unitURI
+ * the URI of one of the resources in the logical model unit, which therefore is representative of the unit
+ *
+ * @return an iterator over the entire logical model unit's proper contents
+ */
+ static Iterable<EObject> getAllPersistentSubunitContents(ResourceSet rset, URI unitURI) {
+ final URI base = unitURI.trimFileExtension();
+ Iterable<Resource> resources = filter(rset.getResources(), new Predicate<Resource>() {
+
+ @Override
+ public boolean apply(Resource input) {
+ return input.getURI().trimFileExtension().equals(base);
+ }
+ });
+
+ Iterable<EObject> result = concat(transform(resources, new Function<Resource, Iterable<EObject>>() {
+
+ @Override
+ public Iterable<EObject> apply(final Resource input) {
+ return new Iterable<EObject>() {
+
+ @Override
+ public Iterator<EObject> iterator() {
+ return EcoreUtil.getAllProperContents(input, false);
+ }
+ };
+ }
+ }));
+
+ result = filter(result, new Predicate<EObject>() {
+
+ @Override
+ public boolean apply(EObject input) {
+ return isPersistentObject(input);
+ }
+ });
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ public static interface IUpdate {
+
+ /**
+ * An update that does nothing. It is {@linkplain IUpdate#isEmpty() empty}.
+ */
+ IUpdate EMPTY = new IUpdate() {
+
+ @Override
+ public boolean isEmpty() {
+ return true;
+ }
+
+ @Override
+ public void apply() {
+ // pass
+ }
+
+ @Override
+ public void revert() {
+ // revert
+ }
+
+ @Override
+ public IUpdate chain(IUpdate update) {
+ return (update == null) ? this : update;
+ }
+
+ };
+
+ /**
+ * Queries whether I have nothing to do on {@link #apply() apply}.
+ *
+ * @return whether I am empty
+ */
+ boolean isEmpty();
+
+ void apply();
+
+ void revert();
+
+ IUpdate chain(IUpdate update);
+
+ interface Collector {
+
+ void add(IUpdate update);
+ }
+
+ interface Compound extends IUpdate, Collector {
+ // all methods inherited
+ }
+
+ }
+
+ static final class CompoundUpdate implements IUpdate.Compound {
+
+ private final List<IUpdate> updates = Lists.newArrayList();
+
+ @Override
+ public void add(IUpdate update) {
+ updates.add(update);
+ }
+
+ @Override
+ public Compound chain(IUpdate update) {
+ if ((update != null) && !update.isEmpty()) {
+ add(update);
+ }
+
+ return this;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return updates.isEmpty();
+ }
+
+ @Override
+ public void apply() {
+ for (IUpdate next : updates) {
+ next.apply();
+ }
+ }
+
+ @Override
+ public void revert() {
+ for (ListIterator<IUpdate> iter = updates.listIterator(updates.size()); iter.hasPrevious();) {
+ iter.previous().revert();
+ }
+ }
+
+ static IUpdate compose(IUpdate first, IUpdate second) {
+ IUpdate result;
+
+ if ((second == null) || second.isEmpty()) {
+ result = (first == null) ? IUpdate.EMPTY : first;
+ } else if ((first == null) || first.isEmpty()) {
+ // we already know it's not null or empty
+ result = second;
+ } else {
+ IUpdate.Compound compound = new CompoundUpdate();
+ compound.add(first);
+ compound.add(second);
+ result = compound;
+ }
+
+ return result;
+ }
+ }
+
+ private static abstract class OneWayUpdate implements IUpdate {
+
+ @Override
+ public void revert() {
+ throw new UnsupportedOperationException("OneWayUpdate cannot be reverted"); //$NON-NLS-1$
+ }
+
+ @Override
+ public IUpdate chain(IUpdate update) {
+ return CompoundUpdate.compose(this, update);
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return false;
+ }
+ }
+
+ private static abstract class Update implements IUpdate {
+
+ final EStructuralFeature.Setting setting;
+
+ final CDOStore store;
+
+ Update(EStructuralFeature.Setting setting) {
+ this.setting = setting;
+
+ InternalEObject owner = (InternalEObject) setting.getEObject();
+ CDOObject cdoOwner = CDOUtil.getCDOObject(owner);
+
+ InternalCDOView view = (InternalCDOView) cdoOwner.cdoView();
+ store = view.getStore();
+ }
+
+ Update(EObject object) {
+ this.setting = null;
+
+ CDOObject cdo = CDOUtil.getCDOObject(object);
+ CDOView view = cdo.cdoView();
+ this.store = (view instanceof InternalCDOView) ? ((InternalCDOView) view).getStore() : null;
+ }
+
+ @Override
+ public IUpdate chain(IUpdate update) {
+ return CompoundUpdate.compose(this, update);
+ }
+
+ @Override
+ public boolean isEmpty() {
+ // a leaf update is, by definition, not empty
+ return false;
+ }
+ }
+
+ private static final class ControlUpdate extends Update {
+
+ final EObject originalObject;
+
+ final CDOID proxy;
+
+ final int index;
+
+ ControlUpdate(EStructuralFeature.Setting setting, EObject originalObject, CDOID proxy) {
+ super(setting);
+ this.originalObject = originalObject;
+ this.proxy = proxy;
+
+ EStructuralFeature feature = setting.getEStructuralFeature();
+ InternalEObject owner = (InternalEObject) setting.getEObject();
+
+ if (!feature.isMany()) {
+ index = EStore.NO_INDEX;
+ } else {
+ // don't go directly to the store because it may have proxies.
+ // Use the resolved view in the EObject, instead
+ index = ((EList<?>) owner.eGet(feature)).indexOf(originalObject);
+ if (index < 0) {
+ Activator.log.error("Setting does not include the object being replaced by a proxy.", null); //$NON-NLS-1$
+ }
+ }
+ }
+
+ @Override
+ public void apply() {
+ EStructuralFeature feature = setting.getEStructuralFeature();
+
+ if ((index >= 0) || !feature.isMany()) {
+ InternalEObject owner = (InternalEObject) setting.getEObject();
+ store.set(owner, feature, index, proxy);
+ }
+ }
+
+ @Override
+ public void revert() {
+ EStructuralFeature feature = setting.getEStructuralFeature();
+
+ if (index >= 0 || !feature.isMany()) {
+ InternalEObject owner = (InternalEObject) setting.getEObject();
+ store.set(owner, feature, index, CDOUtils.getCDOID(originalObject));
+ }
+ }
+ }
+
+ private static final class UncontrolUpdate extends Update {
+
+ final EObject originalObject;
+
+ final CDOID originalProxy;
+
+ final URI destinationURI;
+
+ final CDOID destinationProxy;
+
+ final int index;
+
+ UncontrolUpdate(EStructuralFeature.Setting setting, EObject originalObject, CDOID originalProxy, URI destinationURI, CDOID destinationProxy) {
+ super(setting);
+ this.originalObject = originalObject;
+ this.originalProxy = originalProxy;
+ this.destinationURI = destinationURI;
+ this.destinationProxy = destinationProxy;
+
+ EStructuralFeature feature = setting.getEStructuralFeature();
+ InternalEObject owner = (InternalEObject) setting.getEObject();
+
+ if (!feature.isMany()) {
+ index = EStore.NO_INDEX;
+ } else {
+ // don't go directly to the store because it may have proxies.
+ // Use the resolved view in the EObject, instead
+ index = ((EList<?>) owner.eGet(feature)).indexOf(originalObject);
+ if (index < 0) {
+ Activator.log.error("Setting does not include the object being replaced by a proxy.", null); //$NON-NLS-1$
+ }
+ }
+ }
+
+ UncontrolUpdate(EStructuralFeature.Setting setting, EObject originalObject, CDOID originalProxy) {
+ this(setting, originalObject, originalProxy, null, null);
+ }
+
+ @Override
+ public void apply() {
+ EStructuralFeature feature = setting.getEStructuralFeature();
+
+ if ((index >= 0) || !feature.isMany()) {
+ InternalEObject owner = (InternalEObject) setting.getEObject();
+
+ if ((destinationURI == null) || inUnit(owner, destinationURI)) {
+ // direct reference
+ store.set(owner, feature, index, CDOUtils.getCDOID(originalObject));
+ } else {
+ // proxy reference for cross-unit
+ store.set(owner, feature, index, destinationProxy);
+ }
+ }
+ }
+
+ @Override
+ public void revert() {
+ EStructuralFeature feature = setting.getEStructuralFeature();
+
+ if (index >= 0 || !feature.isMany()) {
+ InternalEObject owner = (InternalEObject) setting.getEObject();
+
+ // on reversion, we are processing only references that were external
+ // to the unit that was to be re-integrated, so necessarily all
+ // references must be set to the original proxies
+ store.set(owner, feature, index, originalProxy);
+ }
+ }
+ }
+
+ private static final class ClearResourceUpdate extends Update {
+
+ private CDOObject object;
+
+ ClearResourceUpdate(EObject object) {
+ super(object);
+
+ this.object = CDOUtil.getCDOObject(object);
+ }
+
+ @Override
+ public void apply() {
+ InternalEObject object = (InternalEObject) CDOUtil.getEObject(this.object);
+ store.setContainer(object, null, object.eInternalContainer(), object.eContainerFeatureID());
+ }
+
+ @Override
+ public void revert() {
+ // there is no need to revert clearing the resource reference; it will be
+ // reestablished naturally by undo of the base command
+ }
+ }
+
+ private static abstract class AbstractCDOControlCommand extends AbstractControlCommand implements IUpdate.Compound {
+
+ AbstractCDOControlCommand(ControlModeRequest request) {
+ super(Messages.CDOControlModeParticipant_commandLabel, Collections.emptyList(), request);
+ }
+
+ private List<IUpdate> updates;
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ final ImmutableListCollector collector = new ImmutableListCollector();
+
+ buildUpdates(getRequest(), collector);
+
+ this.updates = collector.close();
+
+ apply();
+
+ return CommandResult.newOKCommandResult();
+ }
+
+ protected abstract void buildUpdates(ControlModeRequest request, IUpdate.Collector updates);
+
+ @Override
+ protected IStatus doUndo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IStatus result = super.doUndo(monitor, info);
+
+ if (result.isOK()) {
+ // setting proxies in the way we did is not recorded by EMF, so we have to undo it ourselves
+ revert();
+ }
+
+ return result;
+ }
+
+ @Override
+ protected IStatus doRedo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IStatus result = super.doRedo(monitor, info);
+
+ if (result.isOK()) {
+ // setting proxies in the way we did is not recorded by EMF, so we have to redo it ourselves
+ apply();
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return (updates == null) || updates.isEmpty();
+ }
+
+ @Override
+ public void apply() {
+ for (IUpdate next : updates) {
+ next.apply();
+ }
+ }
+
+ @Override
+ public void revert() {
+ for (ListIterator<IUpdate> iter = updates.listIterator(updates.size()); iter.hasPrevious();) {
+ iter.previous().revert();
+ }
+ }
+
+ @Override
+ public void add(IUpdate update) {
+ throw new UnsupportedOperationException("AbtsractCDOControlCommand is not externally modifiable"); //$NON-NLS-1$
+ }
+
+ @Override
+ public Compound chain(IUpdate update) {
+ throw new UnsupportedOperationException("AbtsractCDOControlCommand is not externally modifiable"); //$NON-NLS-1$
+ }
+ };
+
+ private static final class ImmutableListCollector implements IUpdate.Collector {
+
+ private final ImmutableList.Builder<IUpdate> builder = ImmutableList.builder();
+
+ @Override
+ public void add(IUpdate update) {
+ builder.add(update);
+ }
+
+ List<IUpdate> close() {
+ return builder.build();
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/controlmode/CDOProxyManager.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/controlmode/CDOProxyManager.java
new file mode 100755
index 00000000..86926298
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/controlmode/CDOProxyManager.java
@@ -0,0 +1,163 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.controlmode;
+
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
+import org.eclipse.emf.cdo.common.model.CDOClassifierRef;
+import org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutViewProvider;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.net4j.util.ref.Interner;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+
+
+/**
+ * A canonical cache of proxy {@link EObject}s by URI.
+ */
+public class CDOProxyManager {
+
+ private static final String URI_SCHEME = CDOCheckoutViewProvider.SCHEME;
+
+ private final ResourceSet resourceSet;
+
+ private final ProxyInterner proxies = new ProxyInterner();
+
+ public CDOProxyManager(ResourceSet resourceSet) {
+ this.resourceSet = resourceSet;
+ }
+
+ public EObject getProxy(URI proxyURI) {
+ return proxies.intern(proxyURI);
+ }
+
+ protected InternalEObject createProxy(URI uri) {
+ InternalEObject result = null;
+
+ CDOID cdoid = CDOIDUtil.read(uri.fragment());
+ long oid = CDOIDUtil.getLong(cdoid);
+ CDOClassifierRef typeRef = CDOIDUtil.getClassifierRef(cdoid);
+
+ EClassifier resolvedType = typeRef.resolve(resourceSet.getPackageRegistry());
+
+ if (resolvedType instanceof EClass) {
+ EClass actualType = (EClass) resolvedType;
+ result = (InternalEObject) EcoreUtil.create(actualType);
+
+ StringBuilder fragment = new StringBuilder();
+ CDOIDUtil.write(fragment, CDOIDUtil.createLong(oid));
+
+ result.eSetProxyURI(uri.trimFragment().appendFragment(fragment.toString()));
+ }
+
+ return result;
+ }
+
+ public static boolean isCDOProxyURI(URI uri) {
+ boolean result = uri.hasFragment() && URI_SCHEME.equals(uri.scheme());
+
+ if (result) {
+ CDOID oid = CDOIDUtil.read(uri.fragment());
+ result = oid instanceof CDOClassifierRef.Provider;
+ }
+
+ return result;
+ }
+
+ public static String createPapyrusCDOURI(EObject object) {
+ return createPapyrusCDOURI(object.eResource().getURI(), object);
+ }
+
+ public static String createPapyrusCDOURI(URI resourceURI, EObject object) {
+ long oid = CDOIDUtil.getLong(CDOUtils.getCDOID(object));
+ CDOClassifierRef typeRef = new CDOClassifierRef(object.eClass());
+ CDOID oidWithTypeRef = CDOIDUtil.createLongWithClassifier(oid, typeRef);
+
+ StringBuilder result = new StringBuilder();
+ result.append(resourceURI);
+ result.append('#');
+ CDOIDUtil.write(result, oidWithTypeRef);
+
+ return result.toString();
+ }
+
+ public static String extractOIDFragment(URI proxyURI) {
+ String result = null;
+
+ CDOID oid = CDOIDUtil.read(proxyURI.fragment());
+ if (oid.isObject()) {
+ StringBuilder buf = new StringBuilder();
+ CDOIDUtil.write(buf, CDOIDUtil.createLong(CDOIDUtil.getLong(oid)));
+ result = buf.toString();
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ private final class ProxyInterner extends Interner<InternalEObject> {
+
+ public synchronized InternalEObject intern(URI proxyURI) {
+ InternalEObject result = null;
+
+ long oid = CDOIDUtil.getLong(CDOIDUtil.read(proxyURI.fragment()));
+ final int hashCode = hashCode(oid);
+
+ for (Entry<InternalEObject> entry = getEntry(hashCode); (entry != null) && (result == null); entry = entry.getNextEntry()) {
+ result = entry.get();
+
+ if ((result != null) && getOID(result) != oid) {
+ result = null;
+ }
+ }
+
+ if (result == null) {
+ result = createProxy(proxyURI);
+ addEntry(createEntry(result, hashCode));
+ }
+
+ return result;
+ }
+
+ private long getOID(InternalEObject object) {
+ long result;
+
+ if (object.eIsProxy()) {
+ result = CDOIDUtil.getLong(CDOIDUtil.read(object.eProxyURI().fragment()));
+ } else {
+ result = CDOIDUtil.getLong(CDOUtils.getCDOID(object));
+ }
+
+ return result;
+ }
+
+ @Override
+ protected int hashCode(InternalEObject proxy) {
+ return hashCode(getOID(proxy));
+ }
+
+ int hashCode(long oid) {
+ return (int) (oid & 0xFFFFFFFF);
+ }
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/CDODIDependentsProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/CDODIDependentsProvider.java
new file mode 100755
index 00000000..417f29f3
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/CDODIDependentsProvider.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter;
+
+import static com.google.common.collect.Iterables.filter;
+import static org.eclipse.papyrus.cdo.internal.core.importer.DependencyAdapter.getDIResource;
+import static org.eclipse.papyrus.cdo.internal.core.importer.DependencyAdapter.isDIResource;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.cdo.core.importer.IModelDependentsProvider;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.core.importer.DependencyAdapter;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the CDODIDependentsProvider type. Enjoy.
+ */
+public class CDODIDependentsProvider implements IModelDependentsProvider {
+
+ private boolean completedScan;
+
+ public CDODIDependentsProvider() {
+ super();
+ }
+
+ @Override
+ public Collection<URI> getDependents(Resource resource, IProgressMonitor monitor) {
+ if (!completedScan) {
+ // TODO Find a more efficient way to determine cross-references than walking the repository. Don't walk, for now
+ // scanRepository(resource.getResourceSet());
+ }
+
+ Set<URI> result = Sets.newHashSet();
+
+ // if it's a DI resource, get its dependencies' dependents and find
+ // their dependents that are unique DIs
+ Resource di = getDIResource(resource);
+ if (di != null) {
+ // the DI's dependencies are the model components
+ for (Resource component : DependencyAdapter.getDependencies(di)) {
+ // the components' dependents in other models are what we are
+ // interested in
+ for (Resource next : DependencyAdapter.getDependents(component)) {
+ Resource dependentDI = getDIResource(next);
+ if ((dependentDI != null) && (dependentDI != di)) {
+ result.add(dependentDI.getURI());
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Collection<URI> getComponents(Resource diResource, IProgressMonitor monitor) {
+ Collection<URI> result;
+
+ if (!(diResource instanceof CDOResource)) {
+ result = Collections.emptyList();
+ } else {
+ ImmutableList.Builder<URI> uris = ImmutableList.builder();
+ CDOResource cdo = (CDOResource) diResource;
+ CDOView view = cdo.cdoView();
+
+ final URI baseURI = cdo.getURI().trimFileExtension();
+ final CDOResourceFolder folder = cdo.getFolder();
+
+ Iterable<CDOResource> inSameFolder = filter((folder == null) ? view.getRootResource().getContents() : folder.getNodes(), CDOResource.class);
+ for (CDOResource next : inSameFolder) {
+ URI uri = next.getURI();
+ if ((next != cdo) && uri.trimFileExtension().equals(baseURI)) {
+ uris.add(next.getURI());
+ }
+ }
+
+ result = uris.build();
+ }
+
+ return result;
+ }
+
+ @SuppressWarnings("unused")
+ private void scanRepository(final ResourceSet resourceSet) {
+ completedScan = true;
+
+ TreeIterator<?> repositoryIterator = CDOUtils.getView(resourceSet).getRootResource().eAllContents();
+ while (repositoryIterator.hasNext()) {
+ CDOResourceNode next = (CDOResourceNode) repositoryIterator.next();
+ if (next instanceof CDOResource) {
+ CDOResource resource = (CDOResource) next;
+ if (isDIResource(resource)) {
+ // it's a Papyrus model. Initialize the dependencies
+ DependencyAdapter.getInstance(resource);
+ }
+ repositoryIterator.prune();
+ } else if (!(next instanceof CDOResourceFolder)) {
+ repositoryIterator.prune();
+ }
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/DefaultModelExportConfigurationFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/DefaultModelExportConfigurationFactory.java
new file mode 100755
index 00000000..a5b2e593
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/DefaultModelExportConfigurationFactory.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration.Factory;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.internal.core.importer.ModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.internal.core.importer.ModelTransferConfiguration.Direction;
+
+/**
+ * This is the DefaultModelExportConfigurationFactory type. Enjoy.
+ */
+public class DefaultModelExportConfigurationFactory implements Factory {
+
+ public DefaultModelExportConfigurationFactory() {
+ super();
+ }
+
+ @Override
+ public IModelTransferConfiguration create(IModelTransferOperation.Context operationContext, ResourceSet resourceSet) {
+ ModelTransferConfiguration result = new ModelTransferConfiguration(operationContext, resourceSet, Direction.EXPORT);
+
+ result.addModelDependentsProvider(new CDODIDependentsProvider());
+
+ return result;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/DefaultModelExportMappingFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/DefaultModelExportMappingFactory.java
new file mode 100755
index 00000000..baad09bd
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/DefaultModelExportMappingFactory.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter;
+
+import org.eclipse.papyrus.cdo.core.exporter.IModelExportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+
+/**
+ * This is the DefaultModelExportMappingFactory type. Enjoy.
+ */
+public class DefaultModelExportMappingFactory implements IModelExportMapping.Factory {
+
+ public DefaultModelExportMappingFactory() {
+ super();
+ }
+
+ @Override
+ public IModelExportMapping create(IModelTransferConfiguration configuration) {
+ return new ModelExportMapping(configuration);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExportMapping.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExportMapping.java
new file mode 100755
index 00000000..54080291
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExportMapping.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.core.exporter.IModelExportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.importer.AbstractModelTransferMapping;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+
+/**
+ * This is the AbstractModelImportMapping type. Enjoy.
+ */
+public class ModelExportMapping extends AbstractModelTransferMapping implements IModelExportMapping {
+
+ private final IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
+
+ public ModelExportMapping(IModelTransferConfiguration config) {
+ super(config);
+ }
+
+ @Override
+ protected boolean validateMapping(IModelTransferNode node, DiagnosticChain diagnostics) {
+ boolean result = true;
+
+ IPath mapping = getMapping(node);
+ if (mapping == null) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.ModelExportMapping_0, node.getName()), new Object[] { node }));
+ result = false;
+ } else {
+ for (URI next : node.getResourceURIs()) {
+ IPath resourcePath = mapping.removeFileExtension().addFileExtension(next.fileExtension());
+ IPath containerPath = mapping.removeLastSegments(1);
+
+ IContainer container = (containerPath.segmentCount() == 1) ? wsRoot.getProject(containerPath.segment(0)) : wsRoot.getFolder(containerPath);
+ if (!container.getProject().exists()) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.ModelExportMapping_1, mapping, node.getName()), new Object[] { node }));
+ result = false;
+ break;
+ } else if (!container.exists()) {
+ // does it not exist because there is a file of that name?
+ IFile file = wsRoot.getFile(containerPath);
+ if (file.exists()) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.ModelExportMapping_2, containerPath, node.getName()), new Object[] { node }));
+ result = false;
+ break;
+ }
+ } else {
+ // the container exists. Does the mapped file clash?
+ IFile file = wsRoot.getFile(resourcePath);
+ if (file.exists()) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.ModelExportMapping_3, resourcePath, node.getName()), new Object[] { node }));
+ result = false;
+ break;
+ } else {
+ // final check is whether the workspace will allow creation of this resource
+ IStatus status = wsRoot.getWorkspace().validatePath(resourcePath.toString(), IResource.FILE);
+ if (!status.isOK()) {
+ diagnostics.add(BasicDiagnostic.toDiagnostic(status));
+ if (status.getSeverity() > IStatus.WARNING) {
+ result = false;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExporter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExporter.java
new file mode 100755
index 00000000..08be6b00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExporter.java
@@ -0,0 +1,185 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.core.exporter.IModelExportMapping;
+import org.eclipse.papyrus.cdo.core.exporter.IModelExporter;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.CDOProxyResolvingResourceSet;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+/**
+ * This is the ModelExporter type. Enjoy.
+ */
+public class ModelExporter implements IModelExporter {
+
+ public ModelExporter() {
+ super();
+ }
+
+ @Override
+ public Diagnostic exportModels(final IModelExportMapping mapping) {
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ add(result, mapping.getConfiguration().validate());
+ add(result, mapping.validate());
+
+ if (result.getSeverity() < Diagnostic.ERROR) {
+ add(result, mapping.getConfiguration().getOperationContext().run(new IModelTransferOperation() {
+
+ @Override
+ public Diagnostic run(IProgressMonitor monitor) {
+ return doExport(mapping, monitor);
+ }
+ }));
+ }
+
+ return result;
+ }
+
+ protected Diagnostic doExport(IModelExportMapping mapping, IProgressMonitor monitor) {
+ BasicDiagnostic result = new BasicDiagnostic();
+ IModelTransferConfiguration configuration = mapping.getConfiguration();
+
+ // 1/resource for loading, 1/resource for exporting,
+ // 1 for proxy resolution, 1 for resource saving, and 1 for clean-up
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.ModelExporter_0, 2 * configuration.getModelsToTransfer().size() + 3);
+
+ CDOCheckout checkout = mapping.getCheckout();
+ CDOTransaction transaction = checkout.openTransaction(new CDOProxyResolvingResourceSet());
+ ResourceSet source = transaction.getResourceSet();
+ ResourceSet destination = new ResourceSetImpl();
+
+ try {
+ // load all models to be exported and resolve their cross-references so that CDO-style
+ // cross-resource proxies will be resolved
+ for (IModelTransferNode model : configuration.getModelsToTransfer()) {
+ add(result, loadModel(model, transaction, sub.newChild(1)));
+ }
+ EcoreUtil.resolveAll(source);
+ sub.worked(1);
+
+ for (IModelTransferNode model : configuration.getModelsToTransfer()) {
+ add(result, exportModel(model, transaction, mapping.getMapping(model), destination, sub.newChild(1)));
+ }
+
+ for (IModelTransferNode model : configuration.getModelsToTransfer()) {
+ add(result, saveModel(model, transaction, mapping.getMapping(model), destination));
+ }
+ sub.worked(1);
+ } finally {
+ // don't clean up the configuration's resource set because it is not owned by the configuration
+ EMFHelper.unload(destination);
+ CDOUtils.unload(transaction);
+ transaction.close();
+ EMFHelper.unload(source);
+ sub.worked(1);
+ }
+
+ sub.done();
+
+ return result;
+ }
+
+ protected Diagnostic loadModel(IModelTransferNode model, CDOView view, IProgressMonitor monitor) {
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ SubMonitor sub = SubMonitor.convert(monitor, model.getName(), model.getResourceURIs().size());
+
+ for (URI next : model.getResourceURIs()) {
+ Resource source = view.getResourceSet().getResource(next, true);
+ for (Iterator<?> iter = source.getContents().iterator(); iter.hasNext(); iter.next()) {
+ // just iterate them to load the contents; we will walk over the content trees later to resolve proxies
+ }
+ sub.worked(1);
+ }
+
+ sub.done();
+
+ return result;
+ }
+
+ protected Diagnostic exportModel(IModelTransferNode model, CDOView view, IPath toPath, ResourceSet rset, IProgressMonitor monitor) {
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ IPath basePath = toPath.removeFileExtension();
+
+ SubMonitor sub = SubMonitor.convert(monitor, model.getName(), model.getResourceURIs().size());
+
+ for (URI next : model.getResourceURIs()) {
+ Resource source = view.getResourceSet().getResource(next, true);
+ Resource destination = rset.createResource(URI.createPlatformResourceURI(basePath.addFileExtension(next.fileExtension()).toString(), true));
+ add(result, exportResource(source, destination));
+ sub.worked(1);
+ }
+
+ sub.done();
+
+ return result;
+ }
+
+ protected Diagnostic exportResource(Resource source, Resource destination) {
+ destination.getContents().addAll(source.getContents());
+
+ return Diagnostic.OK_INSTANCE;
+ }
+
+ protected Diagnostic saveModel(IModelTransferNode model, CDOView view, IPath toPath, ResourceSet rset) {
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ IPath basePath = toPath.removeFileExtension();
+
+ for (URI next : model.getResourceURIs()) {
+ Resource destination = rset.getResource(URI.createPlatformResourceURI(basePath.addFileExtension(next.fileExtension()).toString(), true), false);
+ try {
+ destination.save(null);
+ } catch (Exception e) {
+ add(result, new BasicDiagnostic(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.ModelExporter_1, new Object[] { e }));
+ }
+ }
+
+ return result;
+ }
+
+ private static void add(DiagnosticChain diagnostics, Diagnostic diagnostic) {
+ if (diagnostic.getSeverity() > Diagnostic.OK) {
+ diagnostics.merge(diagnostic);
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExporterFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExporterFactory.java
new file mode 100755
index 00000000..06834968
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/exporter/ModelExporterFactory.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter;
+
+import org.eclipse.papyrus.cdo.core.exporter.IModelExporter;
+
+/**
+ * This is the ModelExporterFactory type. Enjoy.
+ */
+public class ModelExporterFactory implements IModelExporter.Factory {
+
+ public ModelExporterFactory() {
+ super();
+ }
+
+ @Override
+ public IModelExporter create() {
+ return new ModelExporter();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/expressions/EObjectPropertyTester.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/expressions/EObjectPropertyTester.java
new file mode 100755
index 00000000..24a72970
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/expressions/EObjectPropertyTester.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.expressions;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+
+/**
+ * This is the EObjectPropertyTester type. Enjoy.
+ */
+public class EObjectPropertyTester
+ extends PropertyTester {
+
+ public static final String IS_CDO_OBJECT = "isCDOObject"; //$NON-NLS-1$
+
+ public EObjectPropertyTester() {
+ super();
+ }
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args,
+ Object expectedValue) {
+
+ boolean result = false;
+
+ CDOObject cdoObject = CDOUtils.getCDOObject((EObject) receiver);
+ if (cdoObject != null) {
+ if (IS_CDO_OBJECT.equals(property)) {
+ result = true;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/AbstractModelImportMapping.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/AbstractModelImportMapping.java
new file mode 100755
index 00000000..2f455992
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/AbstractModelImportMapping.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+
+/**
+ * This is the AbstractModelImportMapping type. Enjoy.
+ */
+abstract class AbstractModelImportMapping extends AbstractModelTransferMapping implements IModelImportMapping {
+
+ public AbstractModelImportMapping(IModelTransferConfiguration config) {
+ super(config);
+ }
+
+ @Override
+ protected boolean validateMapping(IModelTransferNode node, DiagnosticChain diagnostics) {
+ boolean result = true;
+
+ IPath mapping = getMapping(node);
+ if (mapping == null) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.AbstractModelImportMapping_0, node.getName()), new Object[] { node }));
+ result = false;
+ } else {
+ for (URI next : node.getResourceURIs()) {
+ String resourcePath = mapping.removeFileExtension().addFileExtension(next.fileExtension()).toString();
+
+ if (getView().hasResource(resourcePath)) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.AbstractModelImportMapping_1, mapping, node.getName()), new Object[] { node }));
+ result = false;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ protected CDOView getView() {
+ CDOCheckout checkout = getCheckout();
+
+ return (checkout == null) ? null : checkout.getView();
+ }
+
+ @Override
+ protected void computeDefaultMappings(IModelTransferConfiguration configuration) {
+ for (IModelTransferNode next : configuration.getModelsToTransfer()) {
+ if (getMapping(next) == null) {
+ mapTo(next, new Path(next.getName()));
+ }
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/AbstractModelTransferMapping.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/AbstractModelTransferMapping.java
new file mode 100755
index 00000000..092fd8e7
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/AbstractModelTransferMapping.java
@@ -0,0 +1,195 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferListener;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferMappingListener;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.ModelTransferListenerAdapter;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+
+import com.google.common.base.Objects;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the AbstractModelTransferMapping type. Enjoy.
+ */
+public abstract class AbstractModelTransferMapping implements IModelTransferMapping {
+
+ private final IModelTransferConfiguration config;
+
+ private final Map<IModelTransferNode, IPath> mappings = Maps.newHashMap();
+
+ private CDOCheckout checkout;
+
+ private final CopyOnWriteArrayList<IModelTransferMappingListener> listeners = new CopyOnWriteArrayList<IModelTransferMappingListener>();
+
+ public AbstractModelTransferMapping(IModelTransferConfiguration config) {
+ super();
+
+ this.config = config;
+
+ config.addModelTransferListener(createConfigurationListener());
+ }
+
+ @Override
+ public IModelTransferConfiguration getConfiguration() {
+ return config;
+ }
+
+ @Override
+ public void mapTo(IModelTransferNode source, IPath path) {
+ if (!Objects.equal(getMapping(source), path)) {
+ mappings.put(source, path);
+
+ fireMappingChanged(source);
+ }
+ }
+
+ @Override
+ public IPath getMapping(IModelTransferNode node) {
+ return mappings.get(node);
+ }
+
+ @Override
+ public CDOCheckout getCheckout() {
+ return checkout;
+ }
+
+ @Override
+ public void setCheckout(CDOCheckout checkout) {
+ if (checkout != this.checkout) {
+ this.checkout = checkout;
+
+ fireCheckoutChanged();
+ }
+ }
+
+ @Override
+ public Diagnostic validate() {
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ if (validateRepository(result)) {
+ for (IModelTransferNode node : getConfiguration().getModelsToTransfer()) {
+ validateMapping(node, result);
+ }
+
+ validateUniqueMappings(result);
+ }
+
+ fireProblemsEvent(result);
+
+ return result;
+ }
+
+ protected abstract boolean validateMapping(IModelTransferNode node, DiagnosticChain diagnostics);
+
+ protected void validateUniqueMappings(DiagnosticChain diagnostics) {
+ Set<IPath> paths = Sets.newHashSet();
+
+ for (IModelTransferNode next : getConfiguration().getModelsToTransfer()) {
+ IPath mapping = getMapping(next);
+
+ if ((mapping != null) && !paths.add(mapping)) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.AbstractModelTransferMapping_0, mapping), new Object[] { next }));
+ break;
+ }
+ }
+ }
+
+ protected boolean validateRepository(DiagnosticChain diagnostics) {
+ boolean result = true;
+
+ if (getCheckout() == null) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, Messages.AbstractModelTransferMapping_1, null));
+ result = false;
+ } else if (!getCheckout().isOpen()) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.AbstractModelTransferMapping_2, getCheckout().getLabel()), new Object[] { getCheckout() }));
+ result = false;
+ }
+
+ return result;
+ }
+
+ @Override
+ public void addModelTransferMappingListener(IModelTransferMappingListener listener) {
+ listeners.addIfAbsent(listener);
+ }
+
+ @Override
+ public void removeModelTransferMappingListener(IModelTransferMappingListener listener) {
+ listeners.remove(listener);
+ }
+
+ protected void fireProblemsEvent(Diagnostic problems) {
+ if (problems.getSeverity() > Diagnostic.OK) {
+ for (IModelTransferMappingListener next : listeners) {
+ try {
+ next.modelTransferMappingProblemsOccurred(problems);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in model transfer mapping listener.", e); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ protected void fireMappingChanged(IModelTransferNode node) {
+ for (IModelTransferMappingListener next : listeners) {
+ try {
+ next.modelTransferMappingChanged(node);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in model transfer mapping listener.", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ protected void fireCheckoutChanged() {
+ for (IModelTransferMappingListener next : listeners) {
+ try {
+ next.modelTransferRepositoryChanged(this);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in model transfer mapping listener.", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ private IModelTransferListener createConfigurationListener() {
+ return new ModelTransferListenerAdapter() {
+
+ @Override
+ public void modelsToTransferChanged(IModelTransferConfiguration configuration) {
+ computeDefaultMappings(configuration);
+ }
+ };
+ }
+
+ protected void computeDefaultMappings(IModelTransferConfiguration configuration) {
+ // pass
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/DefaultModelImportConfigurationFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/DefaultModelImportConfigurationFactory.java
new file mode 100755
index 00000000..6d111501
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/DefaultModelImportConfigurationFactory.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration.Factory;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+
+/**
+ * This is the DefaultModelImportConfigurationFactory type. Enjoy.
+ */
+public class DefaultModelImportConfigurationFactory implements Factory {
+
+ public DefaultModelImportConfigurationFactory() {
+ super();
+ }
+
+ @Override
+ public IModelTransferConfiguration create(IModelTransferOperation.Context operationContext, ResourceSet resourceSet) {
+ ModelTransferConfiguration result = new ModelTransferConfiguration(operationContext, resourceSet);
+
+ result.addModelDependentsProvider(new WorkspaceDIDependentsProvider());
+
+ return result;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/DependencyAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/DependencyAdapter.java
new file mode 100755
index 00000000..bb951489
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/DependencyAdapter.java
@@ -0,0 +1,209 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import java.util.Collection;
+import java.util.Set;
+
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelsReader;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
+import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the DependencyAdapter type. Enjoy.
+ */
+public class DependencyAdapter extends AdapterImpl {
+
+ private final ModelsReader modelsMetadata = new ModelsReader();
+
+ private final Set<Resource> dependencies = Sets.newLinkedHashSet();
+
+ private final Set<Resource> dependents = Sets.newLinkedHashSet();
+
+ private DependencyAdapter() {
+ super();
+ }
+
+ public static DependencyAdapter getInstance(Resource resource) {
+ DependencyAdapter result = getExistingInstance(resource);
+
+ if (result == null) {
+ result = new DependencyAdapter();
+ resource.eAdapters().add(Math.min(1, resource.eAdapters().size()), result);
+
+ result.analyze(resource);
+ }
+
+ return result;
+ }
+
+ static DependencyAdapter getExistingInstance(Resource resource) {
+ DependencyAdapter result = null;
+
+ for (Object next : resource.eAdapters()) {
+ if (next instanceof DependencyAdapter) {
+ result = (DependencyAdapter) next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ public Set<Resource> getDependencies() {
+ return dependencies;
+ }
+
+ public static Set<Resource> getDependencies(Resource resource) {
+ return getInstance(resource).getDependencies();
+ }
+
+ public Set<Resource> getDependents() {
+ return dependents;
+ }
+
+ public static Set<Resource> getDependents(Resource resource) {
+ return getInstance(resource).getDependents();
+ }
+
+ private void analyze(Resource resource) {
+ if (resource.getContents().isEmpty() && isDIResource(resource)) {
+ // similarly-named resources that are recognized by Papyrus are implicitly components
+ for (Resource next : getImplicitComponents(resource)) {
+ if (isUserModelResource(next.getURI())) {
+ addDependency(next);
+ }
+ }
+ } else {
+ for (TreeIterator<EObject> iter = EcoreUtil.getAllProperContents(resource, false); iter.hasNext();) {
+ EObject next = iter.next();
+
+ // ignore annotations, such as are used for hyperlinks
+ if (next instanceof EAnnotation) {
+ iter.prune();
+ } else {
+ for (EObject xref : next.eCrossReferences()) {
+ Resource xrefRes = xref.eResource();
+ if ((xrefRes != null) && (isUserModelResource(xrefRes.getURI()))) {
+ addDependency(xrefRes);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private Resource getResource() {
+ return (Resource) getTarget();
+ }
+
+ void addDependency(Resource resource) {
+ Resource self = getResource();
+
+ if ((resource != self) && dependencies.add(resource)) {
+ getInstance(resource).addDependent(self);
+ }
+ }
+
+ private void addDependent(Resource resource) {
+ if (resource != getResource()) {
+ dependents.add(resource);
+ }
+ }
+
+ boolean isUserModelResource(URI uri) {
+ ModelSet modelSet = getModelSet();
+ boolean result = (modelSet != null) ? modelSet.isUserModelResource(uri) :
+ // config.hasResource(uri) &&
+ uri.isPlatformResource() || uri.isFile() || CDOUtils.isCDOURI(uri);
+
+ return result && !uri.isArchive();
+ }
+
+ private ModelSet getModelSet() {
+ return CDOUtils.adapt(getResource().getResourceSet(), ModelSet.class);
+ }
+
+ private Iterable<Resource> getImplicitComponents(Resource diResource) {
+ // usually only two components: diagrams and semantics
+ Collection<Resource> result = Lists.newArrayListWithExpectedSize(2);
+
+ ResourceSet rset = diResource.getResourceSet();
+ URIConverter converter = rset.getURIConverter();
+
+ for (URI next : modelsMetadata.getKnownModelURIs(diResource.getURI())) {
+ if (!next.equals(diResource.getURI()) && converter.exists(next, null)) {
+ try {
+ result.add(rset.getResource(next, true));
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in loading component of Papyrus model.", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public static boolean isDIResource(Resource resource) {
+ boolean result = false;
+
+ if (resource.getContents().isEmpty()) {
+ // DI resources are typically empty; just markers
+ result = DiModel.DI_FILE_EXTENSION.equals(resource.getURI().fileExtension());
+ } else {
+ // Look for legacy DI content (the Sash Model that now is in a *.sash resource in the workspace metadata area)
+ result = DiUtils.lookupSashWindowsMngr(resource) != null;
+ }
+
+ return result;
+ }
+
+ public static Resource getDIResource(Resource resource) {
+ Resource result = null;
+
+ if (isDIResource(resource)) {
+ result = resource;
+ } else {
+ // find the the DI resource
+ ResourceSet rset = resource.getResourceSet();
+ URI uri = resource.getURI().trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION);
+ if (rset.getURIConverter().exists(uri, null)) {
+ Resource di = rset.getResource(uri, true);
+
+ if ((di != null) && isDIResource(di)) {
+ result = di;
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ManyToOneModelImportMapping.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ManyToOneModelImportMapping.java
new file mode 100755
index 00000000..585aebca
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ManyToOneModelImportMapping.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+
+import com.google.common.base.Objects;
+
+/**
+ * This is the ManyToOneModelImportMapping type. Enjoy.
+ */
+public class ManyToOneModelImportMapping extends AbstractModelImportMapping {
+
+ private IPath mapping;
+
+ public ManyToOneModelImportMapping(IModelTransferConfiguration config) {
+ super(config);
+
+ computeDefaultMappings(config);
+ }
+
+ @Override
+ public void mapTo(IModelTransferNode source, IPath path) {
+ if (!Objects.equal(this.mapping, path)) {
+ this.mapping = path;
+
+ for (IModelTransferNode next : getConfiguration().getModelsToTransfer()) {
+ fireMappingChanged(next);
+ }
+ }
+ }
+
+ @Override
+ public IPath getMapping(IModelTransferNode node) {
+ return mapping;
+ }
+
+ @Override
+ protected void validateUniqueMappings(DiagnosticChain diagnostics) {
+ // pass. The whole point of this mapping is that all inputs map to one output
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ManyToOneModelImportMappingFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ManyToOneModelImportMappingFactory.java
new file mode 100755
index 00000000..c83a5ef6
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ManyToOneModelImportMappingFactory.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping.Factory;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+
+/**
+ * This is the ManyToOneModelImportMappingFactory type. Enjoy.
+ */
+public class ManyToOneModelImportMappingFactory
+ implements Factory {
+
+ public ManyToOneModelImportMappingFactory() {
+ super();
+ }
+
+ @Override
+ public IModelImportMapping create(IModelTransferConfiguration configuration) {
+ return new ManyToOneModelImportMapping(configuration);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelImporter.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelImporter.java
new file mode 100755
index 00000000..db893639
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelImporter.java
@@ -0,0 +1,386 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import java.util.Collection;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CommitException;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelImporter;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.core.controlmode.CDOControlModeParticipant;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.core.resource.CDOSashModelProvider;
+import org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage;
+import org.eclipse.papyrus.infra.core.sashwindows.di.PageList;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashModel;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
+import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+import com.google.common.collect.Sets;
+
+/**
+ * This is the ModelImporter type. Enjoy.
+ */
+public class ModelImporter implements IModelImporter {
+
+ protected static final ContentType DI_CONTENT = new ContentType("DI"); //$NON-NLS-1$
+
+ protected static final ContentType UML_CONTENT = new ContentType("UML"); //$NON-NLS-1$
+
+ protected static final ContentType NOTATION_CONTENT = new ContentType("Notation"); //$NON-NLS-1$
+
+ protected static final ContentType UNKNOWN_CONTENT = new ContentType("unknown"); //$NON-NLS-1$
+
+ public ModelImporter() {
+ super();
+ }
+
+ @Override
+ public Diagnostic importModels(final IModelImportMapping mapping) {
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ add(result, mapping.getConfiguration().validate());
+ add(result, mapping.validate());
+
+ if (result.getSeverity() < Diagnostic.ERROR) {
+ add(result, mapping.getConfiguration().getOperationContext().run(new IModelTransferOperation() {
+
+ @Override
+ public Diagnostic run(IProgressMonitor monitor) {
+ return doImport(mapping, monitor);
+ }
+ }));
+ }
+
+ return result;
+ }
+
+ protected Diagnostic doImport(IModelImportMapping mapping, IProgressMonitor monitor) {
+ BasicDiagnostic result = new BasicDiagnostic();
+ IModelTransferConfiguration configuration = mapping.getConfiguration();
+
+ // by the time the configuration has analyzed every model to be
+ // imported, all proxies have been resolved that can be. So,
+ // there's no need for a further EcoreUtil.resolveAll() or such
+
+ // 1/resource for import and 1/resource for sub-unit proxies
+ // 1 for each transaction commit, 1 for saving affected non-imported models, and 1 for clean-up
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.ModelImporter_4, configuration.getModelsToTransfer().size() + 4);
+
+ CDOCheckout checkout = mapping.getCheckout();
+ CDOTransaction transaction = checkout.openTransaction(new ResourceSetImpl());
+ ResourceSet destination = transaction.getResourceSet();
+
+ try {
+ for (IModelTransferNode model : configuration.getModelsToTransfer()) {
+ add(result, importModel(model, configuration.getResourceSet(), mapping.getMapping(model), transaction, sub.newChild(1)));
+ }
+
+ try {
+ transaction.commit(sub.newChild(1));
+
+ // save sash resources (if any)
+ for (Resource next : destination.getResources()) {
+ // sash resource would have been saved by commit if it were a CDO URI
+ if (DependencyAdapter.isDIResource(next) && !CDOUtils.isCDOURI(next.getURI())) {
+ next.save(null);
+ }
+ }
+ } catch (Exception e) {
+ result.add(new BasicDiagnostic(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.ModelImporter_5, new Object[] { e }));
+ }
+
+ // can't create CDO-style proxies until the resources have been committed, because only then
+ // will the objects be persisted and have OIDs to reference
+ boolean hasSubUnits = false;
+ for (IModelTransferNode model : configuration.getModelsToTransfer()) {
+ if (createSubUnitProxies(model, mapping.getMapping(model), transaction, sub.newChild(1))) {
+ hasSubUnits = true;
+ }
+ }
+ if (hasSubUnits) {
+ try {
+ transaction.commit(sub.newChild(1));
+ } catch (CommitException e) {
+ result.add(new BasicDiagnostic(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.ModelImporter_5, new Object[] { e }));
+ }
+ } else {
+ sub.worked(1); // nothing to commit but still count progress
+ }
+
+ try {
+ saveNonimportedModels(mapping, transaction, sub.newChild(1));
+ } catch (Exception e) {
+ result.add(new BasicDiagnostic(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.ModelImporter_6, new Object[] { e }));
+ }
+ } finally {
+ EMFHelper.unload(configuration.getResourceSet());
+ CDOUtils.unload(transaction);
+ transaction.close();
+ EMFHelper.unload(destination);
+ sub.worked(1);
+ }
+
+ sub.done();
+
+ return result;
+ }
+
+ protected Diagnostic importModel(IModelTransferNode model, ResourceSet rset, IPath toPath, CDOTransaction transaction, IProgressMonitor monitor) {
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ IPath basePath = toPath.removeFileExtension();
+
+ SubMonitor sub = SubMonitor.convert(monitor, model.getName(), model.getResourceURIs().size());
+
+ for (URI next : model.getResourceURIs()) {
+ Resource destination = transaction.getOrCreateResource(basePath.addFileExtension(next.fileExtension()).toString());
+ Resource source = rset.getResource(next, true);
+
+ if (model.getConfiguration().isStripSashModelContent() && DependencyAdapter.isDIResource(source)) {
+ // import *.di content into the *.sash
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(transaction);
+ URI sashURI = new CDOSashModelProvider().initialize(checkout).getSashModelURI(destination.getURI());
+ ResourceSet dset = destination.getResourceSet();
+ Resource sashResource = dset.getURIConverter().exists(sashURI, null) ? dset.getResource(sashURI, true) : null;
+ if (sashResource == null) {
+ sashResource = dset.createResource(sashURI);
+ }
+ destination = sashResource;
+ }
+
+ add(result, importResource(source, destination));
+ sub.worked(1);
+ }
+
+ sub.done();
+
+ return result;
+ }
+
+ protected boolean createSubUnitProxies(IModelTransferNode model, IPath toPath, CDOTransaction transaction, IProgressMonitor monitor) {
+ boolean result;
+
+ IPath basePath = toPath.removeFileExtension();
+ URI uri = model.getPrimaryResourceURI();
+
+ SubMonitor sub = SubMonitor.convert(monitor, model.getName(), 1);
+
+ Resource destination = transaction.getResource(basePath.addFileExtension(uri.fileExtension()).toString());
+ CDOControlModeParticipant.IUpdate update = new CDOControlModeParticipant().getProxyCrossReferencesUpdate(destination);
+ result = !update.isEmpty();
+ update.apply(); // no harm in applying an empty update
+ sub.worked(1);
+
+ sub.done();
+
+ return result;
+ }
+
+ protected Diagnostic importResource(Resource source, Resource destination) {
+ if (!destination.getContents().isEmpty()) {
+ ContentType contentType = getContentType(source);
+ if (contentType == DI_CONTENT) {
+ mergeDIContent(source, destination);
+ } else {
+ // just append the additional content
+ destination.getContents().addAll(source.getContents());
+ }
+ } else {
+ destination.getContents().addAll(source.getContents());
+ }
+
+ return Diagnostic.OK_INSTANCE;
+ }
+
+ /**
+ * Determines the content-type of a resource for the purpose of combining
+ * content.
+ *
+ * @param resource
+ * a resource to be combined with existing content
+ *
+ * @return the content type
+ */
+ protected ContentType getContentType(Resource resource) {
+ ContentType result = UNKNOWN_CONTENT;
+
+ for (EObject next : resource.getContents()) {
+ EPackage ePackage = next.eClass().getEPackage();
+ if (ePackage == DiPackage.eINSTANCE) {
+ result = DI_CONTENT;
+ break;
+ }
+ if (ePackage.getName().equalsIgnoreCase("uml")) { //$NON-NLS-1$
+ result = UML_CONTENT;
+ break;
+ }
+ if (ePackage.getName().equalsIgnoreCase("notation")) { //$NON-NLS-1$
+ result = NOTATION_CONTENT;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ protected void mergeDIContent(Resource source, Resource destination) {
+ // snip out the source window manager and get its counterpart
+ SashWindowsMngr srcMngr = DiUtils.lookupSashWindowsMngr(source);
+ EcoreUtil.remove(srcMngr);
+ SashWindowsMngr dstMngr = DiUtils.lookupSashWindowsMngr(destination);
+
+ // merge the window manager contents
+ if (dstMngr == null) {
+ destination.getContents().add(0, srcMngr);
+ } else {
+ SashModel dstModel = dstMngr.getSashModel();
+ SashModel srcModel = srcMngr.getSashModel();
+
+ if (dstModel == null) {
+ dstMngr.setSashModel(srcModel);
+ } else {
+ dstModel.getWindows().addAll(srcModel.getWindows());
+ if (dstModel.getCurrentSelection() == null) {
+ dstModel.setCurrentSelection(srcModel.getCurrentSelection());
+ }
+ }
+
+ PageList dstPages = dstMngr.getPageList();
+ PageList srcPages = srcMngr.getPageList();
+
+ if (dstPages == null) {
+ dstMngr.setPageList(srcPages);
+ } else {
+ dstPages.getAvailablePage().addAll(srcPages.getAvailablePage());
+ }
+ }
+
+ // and add all of the tables and other content
+ destination.getContents().addAll(source.getContents());
+ }
+
+ protected Diagnostic saveNonimportedModels(IModelImportMapping mapping, CDOTransaction transaction, IProgressMonitor monitor) {
+ IModelTransferConfiguration configuration = mapping.getConfiguration();
+
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ Collection<IModelTransferNode> imported = configuration.getModelsToTransfer();
+ Set<IModelTransferNode> nonImported = Sets.newHashSet();
+
+ for (IModelTransferNode next : configuration.getModelsToTransfer()) {
+ for (IModelTransferNode dependent : next.getDependents()) {
+ if (!imported.contains(dependent)) {
+ nonImported.add(dependent);
+ }
+ }
+ }
+
+ if (!nonImported.isEmpty()) {
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.ModelImporter_9, nonImported.size());
+
+ ResourceSet rset = configuration.getResourceSet();
+
+ try {
+ for (IModelTransferNode next : nonImported) {
+ for (URI uri : next.getResourceURIs()) {
+ Resource resource = rset.getResource(uri, false);
+
+ // if the resource is modified, then we imported it, so
+ // don't save
+ if ((resource != null) && !resource.isModified()) {
+ try {
+ resource.save(null);
+ } catch (Exception e) {
+ add(result, new BasicDiagnostic(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.ModelImporter_10, new Object[] { e }));
+ }
+ }
+ }
+
+ sub.worked(1);
+ }
+ } finally {
+ sub.done();
+ }
+ }
+
+ return result;
+ }
+
+ private static void add(DiagnosticChain diagnostics, Diagnostic diagnostic) {
+ if (diagnostic.getSeverity() > Diagnostic.OK) {
+ diagnostics.merge(diagnostic);
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ protected static class ContentType {
+
+ private final String name;
+
+ protected ContentType(String name) {
+ this.name = name;
+ }
+
+ public final String getName() {
+ return name;
+ }
+
+ @Override
+ public int hashCode() {
+ return getName().hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return (obj instanceof ContentType) && ((ContentType) obj).getName().equals(getName());
+ }
+
+ @Override
+ public String toString() {
+ return getName() + " content"; //$NON-NLS-1$
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelImporterFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelImporterFactory.java
new file mode 100755
index 00000000..f335fe5e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelImporterFactory.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import org.eclipse.papyrus.cdo.core.importer.IModelImporter;
+import org.eclipse.papyrus.cdo.core.importer.IModelImporter.Factory;
+
+/**
+ * This is the ModelImporterFactory type. Enjoy.
+ */
+public class ModelImporterFactory
+ implements Factory {
+
+ public ModelImporterFactory() {
+ super();
+ }
+
+ @Override
+ public IModelImporter create() {
+ return new ModelImporter();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelTransferConfiguration.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelTransferConfiguration.java
new file mode 100755
index 00000000..7def03e9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelTransferConfiguration.java
@@ -0,0 +1,387 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.core.importer.IModelDependentsProvider;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferListener;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation.Context;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the ModelTransferConfiguration type. Enjoy.
+ */
+public class ModelTransferConfiguration implements IModelTransferConfiguration {
+
+ private final Direction direction;
+
+ private Map<URI, Resource> resources = Maps.newHashMap();
+
+ private ResourceSet resourceSet;
+
+ private boolean stripSashModelContent;
+
+ private final boolean ownResourceSet;
+
+ private final IModelTransferOperation.Context operationContext;
+
+ private final Map<Resource, IModelTransferNode> importNodes = Maps.newHashMap();
+
+ private final Set<IModelTransferNode> modelsToImport = Sets.newHashSet();
+
+ private final Collection<IModelDependentsProvider> dependentsProviders = Lists.newArrayList();
+
+ private final CopyOnWriteArrayList<IModelTransferListener> listeners = new CopyOnWriteArrayList<IModelTransferListener>();
+
+ public ModelTransferConfiguration(IModelTransferOperation.Context operationContext, ResourceSet resourceSet) {
+ this(operationContext, resourceSet, Direction.IMPORT);
+ }
+
+ public ModelTransferConfiguration(IModelTransferOperation.Context operationContext, ResourceSet resourceSet, Direction direction) {
+ super();
+
+ this.direction = direction;
+ this.operationContext = new ReentrantOperationContext(operationContext);
+
+ if (resourceSet != null) {
+ this.resourceSet = resourceSet;
+ this.ownResourceSet = false;
+ } else {
+ this.resourceSet = new ResourceSetImpl();
+ ((ResourceSetImpl) this.resourceSet).setURIResourceMap(resources);
+ this.ownResourceSet = true;
+ }
+ }
+
+ public final Direction getDirection() {
+ return direction;
+ }
+
+ @Override
+ public void dispose() {
+ if (resourceSet != null) {
+ if (ownResourceSet) {
+ EMFHelper.unload(resourceSet);
+ resourceSet = null;
+ } else {
+ // even if not owned, we should remove DependencyAdapters
+ for (Resource next : resourceSet.getResources()) {
+ DependencyAdapter adapter = DependencyAdapter.getExistingInstance(next);
+ next.eAdapters().remove(adapter);
+ }
+ }
+
+ resources.clear();
+ resources = null;
+ }
+
+ listeners.clear();
+ }
+
+ @Override
+ public ResourceSet getResourceSet() {
+ return resourceSet;
+ }
+
+ @Override
+ public Context getOperationContext() {
+ return operationContext;
+ }
+
+ @Override
+ public Collection<IModelTransferNode> getModelsToTransfer() {
+ return Collections.unmodifiableSet(modelsToImport);
+ }
+
+ @Override
+ public IModelTransferNode addModelToTransfer(URI resourceURI) {
+ IModelTransferNode result = getNode(resourceURI);
+
+ if (modelsToImport.add(result)) {
+ fireModelsToImportChanged();
+ }
+
+ return result;
+ }
+
+ protected IModelTransferNode getNode(URI resourceURI) {
+ IModelTransferNode result = null;
+
+ final Resource resource = resourceSet.getResource(resourceURI, true);
+ if (resource != null) {
+ result = importNodes.get(resource);
+ if (result == null) {
+ final ModelTransferNode newNode = new ModelTransferNode(this, resource);
+ importNodes.put(resource, newNode);
+
+ newNode.initialize(getOperationContext());
+
+ Diagnostic problems = getOperationContext().run(new IModelTransferOperation() {
+
+ @Override
+ public Diagnostic run(IProgressMonitor monitor) {
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.ModelTransferConfiguration_0, dependentsProviders.size());
+
+ for (IModelDependentsProvider next : dependentsProviders) {
+ // first, if it's a DI resource, ensure that it gets its components
+ if (DependencyAdapter.isDIResource(resource)) {
+ DependencyAdapter adapter = DependencyAdapter.getInstance(resource);
+ final int oldCount = adapter.getDependencies().size();
+
+ for (URI uri : next.getComponents(resource, monitor)) {
+ // this is an implicit dependency, even if there are no references
+ // to it (which occurs, e.g., in model sub-units that have no diagrams)
+ Resource implicitDependency = resource.getResourceSet().getResource(uri, true);
+ if (implicitDependency != null) {
+ adapter.addDependency(implicitDependency);
+ }
+ }
+
+ if (adapter.getDependencies().size() > oldCount) {
+ // scan for components and dependencies again
+ newNode.scanForComponents();
+ newNode.scanForDependencies();
+ }
+ }
+
+ for (URI uri : next.getDependents(newNode.getPrimaryResource(), monitor)) {
+ newNode.addDependent(getNode(uri));
+ }
+
+ sub.worked(1);
+ }
+
+ sub.done();
+ return Diagnostic.OK_INSTANCE;
+ }
+ });
+
+ fireModelDependentsChanged(newNode);
+ fireProblemsEvent(problems);
+
+ result = newNode;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public void removeModelToTransfer(IModelTransferNode node) {
+ if (modelsToImport.remove(node)) {
+ fireModelsToImportChanged();
+ }
+ }
+
+ @Override
+ public void addModelDependentsProvider(IModelDependentsProvider provider) {
+ if (!dependentsProviders.contains(provider)) {
+ dependentsProviders.add(provider);
+ }
+ }
+
+ @Override
+ public Diagnostic validate() {
+ BasicDiagnostic result = new BasicDiagnostic();
+
+ Set<IModelTransferNode> toImport = ImmutableSet.copyOf(getModelsToTransfer());
+ for (IModelTransferNode node : toImport) {
+ checkDependents(node, toImport, result);
+ checkDependencies(node, toImport, result);
+ }
+
+ fireProblemsEvent(result);
+
+ return result;
+ }
+
+ protected void checkDependents(IModelTransferNode node, Set<IModelTransferNode> toImport, DiagnosticChain diagnostics) {
+ Set<IModelTransferNode> dependents = ImmutableSet.copyOf(node.getDependents());
+ Set<IModelTransferNode> leftOut = Sets.difference(dependents, toImport);
+ if (!leftOut.isEmpty()) {
+ IModelTransferNode parentUnit = findParentUnit(node, leftOut);
+ if (parentUnit != null) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.ModelTransferConfiguration_3, new Object[] { node.getName(), direction, parentUnit.getName() }), new Object[] { node, parentUnit }));
+ } else {
+ int severity = direction.isImport() ? Diagnostic.WARNING : Diagnostic.INFO;
+ diagnostics.add(new BasicDiagnostic(severity, Activator.PLUGIN_ID, 0, NLS.bind(Messages.ModelTransferConfiguration_1, node.getName(), direction), new Object[] { node, leftOut }));
+ }
+ }
+ }
+
+ protected void checkDependencies(IModelTransferNode node, Set<IModelTransferNode> toImport, DiagnosticChain diagnostics) {
+ Set<IModelTransferNode> dependencies = ImmutableSet.copyOf(node.getDependencies());
+ Set<IModelTransferNode> leftOut = Sets.difference(dependencies, toImport);
+ if (!leftOut.isEmpty()) {
+ Set<IModelTransferNode> subUnits = findSubUnits(node, leftOut);
+ if (!subUnits.isEmpty()) {
+ diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, NLS.bind(Messages.ModelTransferConfiguration_4, new Object[] { node.getName(), direction }), new Object[] { node, subUnits }));
+ } else {
+ int severity = direction.isImport() ? Diagnostic.INFO : Diagnostic.WARNING;
+ diagnostics.add(new BasicDiagnostic(severity, Activator.PLUGIN_ID, 0, NLS.bind(Messages.ModelTransferConfiguration_2, node.getName(), direction), new Object[] { node, leftOut }));
+ }
+ }
+ }
+
+ private IModelTransferNode findParentUnit(IModelTransferNode node, Collection<? extends IModelTransferNode> possibleParents) {
+ IModelTransferNode result = null;
+
+ for (IModelTransferNode next : possibleParents) {
+ if (node.isModelParentUnit(next)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ private Set<IModelTransferNode> findSubUnits(IModelTransferNode node, Collection<? extends IModelTransferNode> possibleChildren) {
+ ImmutableSet.Builder<IModelTransferNode> result = ImmutableSet.builder();
+
+ for (IModelTransferNode next : possibleChildren) {
+ if (node.isModelSubUnit(next)) {
+ result.add(next);
+ }
+ }
+
+ return result.build();
+ }
+
+ @Override
+ public void addModelTransferListener(IModelTransferListener listener) {
+ listeners.addIfAbsent(listener);
+ }
+
+ @Override
+ public void removeModelTransferListener(IModelTransferListener listener) {
+ listeners.remove(listener);
+ }
+
+ void fireProblemsEvent(Diagnostic problems) {
+ if (problems.getSeverity() > Diagnostic.OK) {
+ for (IModelTransferListener next : listeners) {
+ try {
+ next.modelTransferProblemsOccurred(problems);
+ } catch (Exception e) {
+ Activator.log.error(NLS.bind("Uncaught exception in model {0} listener.", direction.name()), e); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ void fireModelsToImportChanged() {
+ for (IModelTransferListener next : listeners) {
+ try {
+ next.modelsToTransferChanged(this);
+ } catch (Exception e) {
+ Activator.log.error(NLS.bind("Uncaught exception in model {0} listener.", direction.name()), e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ void fireModelDependentsChanged(IModelTransferNode node) {
+ for (IModelTransferListener next : listeners) {
+ try {
+ next.modelDependentsChanged(node);
+ } catch (Exception e) {
+ Activator.log.error(NLS.bind("Uncaught exception in model {0} listener.", direction.name()), e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ boolean hasResource(URI uri) {
+ return resources.containsKey(uri);
+ }
+
+ @Override
+ public boolean hasSashModelContent() {
+ boolean result = false;
+
+ ResourceSet rset = getResourceSet();
+ if (rset != null) {
+ for (IModelTransferNode next : importNodes.values()) {
+ Resource primary = rset.getResource(next.getPrimaryResourceURI(), false);
+ if ((primary != null) && (DiUtils.lookupSashWindowsMngr(primary) != null)) {
+ result = true;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isStripSashModelContent() {
+ return stripSashModelContent;
+ }
+
+ @Override
+ public void setStripSashModelContent(boolean stripSashModelContent) {
+ this.stripSashModelContent = stripSashModelContent;
+ }
+
+ //
+ // Nested types
+ //
+
+ public static enum Direction {
+ IMPORT(Messages.ModelTransferConfiguration_6), EXPORT(Messages.ModelTransferConfiguration_7);
+
+ private final String label;
+
+ private Direction(String label) {
+ this.label = label;
+ }
+
+ public boolean isImport() {
+ return this == IMPORT;
+ }
+
+ @Override
+ public String toString() {
+ return label;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelTransferNode.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelTransferNode.java
new file mode 100755
index 00000000..7d3d9885
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ModelTransferNode.java
@@ -0,0 +1,243 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.internal.core.l10n.Messages;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the ModelTransferNode type. Enjoy.
+ */
+public class ModelTransferNode implements IModelTransferNode {
+
+ private final ModelTransferConfiguration config;
+
+ private Resource resource;
+
+ private String name;
+
+ private Set<Resource> components = Sets.newLinkedHashSet();
+
+ private Set<IModelTransferNode> dependencies = Sets.newLinkedHashSet();
+
+ private Set<IModelTransferNode> dependents = Sets.newLinkedHashSet();
+
+ public ModelTransferNode(ModelTransferConfiguration config, Resource resource) {
+ super();
+
+ this.config = config;
+ this.resource = resource;
+ }
+
+ void initialize(IModelTransferOperation.Context context) {
+
+ context.run(new IModelTransferOperation() {
+
+ @Override
+ public Diagnostic run(IProgressMonitor monitor) {
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.ModelTransferNode_0, 2);
+
+ components.add(resource);
+ scanForComponents();
+ sub.worked(1);
+
+ scanForDependencies();
+ sub.worked(1);
+
+ sub.done();
+
+ return Diagnostic.OK_INSTANCE;
+ }
+ });
+ }
+
+ @Override
+ public String getName() {
+ if (name == null) {
+ URI uri = getPrimaryResourceURI();
+
+ String path = uri.path();
+ if (uri.isPlatformResource()) {
+ // trim the project segment
+ path = path.substring(("/" + uri.segment(0)).length()); //$NON-NLS-1$
+ } // else a file: URI's path does not include the device, so it's OK
+
+ this.name = path;
+ }
+
+ return name;
+ }
+
+ @Override
+ public IModelTransferConfiguration getConfiguration() {
+ return config;
+ }
+
+ Resource getPrimaryResource() {
+ return resource;
+ }
+
+ @Override
+ public URI getPrimaryResourceURI() {
+ return resource.getURI();
+ }
+
+ @Override
+ public Collection<URI> getResourceURIs() {
+ ImmutableSet.Builder<URI> result = ImmutableSet.builder();
+
+ for (Resource next : components) {
+ result.add(next.getURI());
+ }
+
+ return result.build();
+ }
+
+ @Override
+ public Collection<IModelTransferNode> getDependencies() {
+ return Collections.unmodifiableSet(dependencies);
+ }
+
+ @Override
+ public Collection<IModelTransferNode> getDependents() {
+ return Collections.unmodifiableSet(dependents);
+ }
+
+ void addDependent(IModelTransferNode node) {
+ dependents.add(node);
+ }
+
+ @Override
+ public int hashCode() {
+ return getPrimaryResourceURI().hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return (obj instanceof IModelTransferNode) && getPrimaryResourceURI().equals(((IModelTransferNode) obj).getPrimaryResourceURI());
+ }
+
+ @Override
+ public String toString() {
+ return String.format("ModelTransferNode(%s)", getName()); //$NON-NLS-1$
+ }
+
+ void scanForComponents() {
+ Resource self = getPrimaryResource();
+ for (Resource next : DependencyAdapter.getDependencies(self)) {
+ if (DependencyAdapter.getDIResource(next) == self) {
+ components.add(next);
+ }
+ }
+ }
+
+ void scanForDependencies() {
+ // for each component resource, find the external resources that it
+ // references and, for any that seems to have a primary resource, get
+ // its node
+
+ URIConverter converter = resource.getResourceSet().getURIConverter();
+
+ for (Resource component : components) {
+ for (Resource xref : DependencyAdapter.getDependencies(component)) {
+ URI primary = findPrimaryResource(xref.getURI(), converter);
+ if ((primary != null) && converter.exists(primary, null)) {
+ IModelTransferNode node = config.getNode(primary);
+ if ((node != null) && !node.equals(this)) {
+ dependencies.add(node);
+ }
+ }
+ }
+ }
+ }
+
+ private URI findPrimaryResource(URI componentURI, URIConverter converter) {
+ URI result = null;
+
+ URI candidate = componentURI.trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION);
+ if (converter.exists(candidate, null)) {
+ result = candidate;
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isModelParentUnit(IModelTransferNode other) {
+ boolean result = false;
+
+ out: for (URI childURI : getResourceURIs()) {
+ Resource child = config.getResourceSet().getResource(childURI, false);
+ if (child != null) {
+ for (EObject root : child.getContents()) {
+ EObject container = root.eContainer();
+ if (container != null) {
+ URI uri = EcoreUtil.getURI(container).trimFragment();
+ if (other.getResourceURIs().contains(uri)) {
+ // found the parent unit
+ result = true;
+ break out;
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isModelSubUnit(IModelTransferNode other) {
+ boolean result = false;
+
+ out: for (URI uri : other.getResourceURIs()) {
+ Resource possibleChild = config.getResourceSet().getResource(uri, false);
+ if (possibleChild != null) {
+ for (EObject root : possibleChild.getContents()) {
+ EObject container = root.eContainer();
+ if (container != null) {
+ URI parentURI = EcoreUtil.getURI(container).trimFragment();
+ if (getResourceURIs().contains(parentURI)) {
+ // found a child unit
+ result = true;
+ break out;
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/OneToOneModelImportMapping.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/OneToOneModelImportMapping.java
new file mode 100755
index 00000000..2b011de8
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/OneToOneModelImportMapping.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+
+/**
+ * This is the ManyToOneModelImportMapping type. Enjoy.
+ */
+public class OneToOneModelImportMapping extends AbstractModelImportMapping {
+
+ public OneToOneModelImportMapping(IModelTransferConfiguration config) {
+ super(config);
+
+ computeDefaultMappings(config);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/OneToOneModelImportMappingFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/OneToOneModelImportMappingFactory.java
new file mode 100755
index 00000000..05565ea0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/OneToOneModelImportMappingFactory.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping.Factory;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+
+/**
+ * This is the OneToOneModelImportMappingFactory type. Enjoy.
+ */
+public class OneToOneModelImportMappingFactory
+ implements Factory {
+
+ public OneToOneModelImportMappingFactory() {
+ super();
+ }
+
+ @Override
+ public IModelImportMapping create(IModelTransferConfiguration configuration) {
+ return new OneToOneModelImportMapping(configuration);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ReentrantOperationContext.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ReentrantOperationContext.java
new file mode 100755
index 00000000..532da0ad
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/ReentrantOperationContext.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+
+/**
+ * This is the ReentrantOperationContext type. Enjoy.
+ */
+public class ReentrantOperationContext
+ implements IModelTransferOperation.Context {
+
+ private final IModelTransferOperation.Context delegate;
+
+ private AtomicInteger depth = new AtomicInteger();
+
+ public ReentrantOperationContext(IModelTransferOperation.Context delegate) {
+ super();
+
+ this.delegate = delegate;
+ }
+
+ @Override
+ public Diagnostic run(IModelTransferOperation operation) {
+ Diagnostic result;
+
+ try {
+ if (depth.getAndIncrement() == 0) {
+ // let the delegate run it
+ result = delegate.run(operation);
+ } else {
+ // run it directly, assuming we are still in the context of the
+ // delegate
+ result = operation.run(new NullProgressMonitor());
+ }
+ } finally {
+ depth.decrementAndGet();
+ }
+
+ return result;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/WorkspaceDIDependentsProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/WorkspaceDIDependentsProvider.java
new file mode 100755
index 00000000..42dfc53b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/importer/WorkspaceDIDependentsProvider.java
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer;
+
+import static com.google.common.collect.Iterables.filter;
+import static org.eclipse.papyrus.cdo.internal.core.importer.DependencyAdapter.getDIResource;
+import static org.eclipse.papyrus.cdo.internal.core.importer.DependencyAdapter.isDIResource;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.cdo.core.importer.IModelDependentsProvider;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the WorkspaceDIDependentsProvider type. Enjoy.
+ */
+public class WorkspaceDIDependentsProvider implements IModelDependentsProvider {
+
+ private boolean completedScan;
+
+ public WorkspaceDIDependentsProvider() {
+ super();
+ }
+
+ @Override
+ public Collection<URI> getDependents(Resource resource, IProgressMonitor monitor) {
+
+ if (!completedScan) {
+ scanWorkspace(resource.getResourceSet());
+ }
+
+ Set<URI> result = Sets.newHashSet();
+
+ // if it's a DI resource, get its dependencies' dependents and find
+ // their dependents that are unique DIs
+ Resource di = getDIResource(resource);
+ if (di != null) {
+ // the DI's dependencies are the model components
+ for (Resource component : DependencyAdapter.getDependencies(di)) {
+ // the components' dependents in other models are what we are
+ // interested in
+ for (Resource next : DependencyAdapter.getDependents(component)) {
+ Resource dependentDI = getDIResource(next);
+ if ((dependentDI != null) && (dependentDI != di)) {
+ result.add(dependentDI.getURI());
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Collection<URI> getComponents(Resource diResource, IProgressMonitor monitor) {
+ Collection<URI> result;
+
+ if (!diResource.getURI().isPlatformResource()) {
+ result = Collections.emptyList();
+ } else {
+ ImmutableList.Builder<URI> uris = ImmutableList.builder();
+
+ final URI baseURI = diResource.getURI().trimSegments(1);
+ final String baseName = diResource.getURI().trimFileExtension().lastSegment();
+ final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(diResource.getURI().toPlatformString(true)));
+ final IContainer container = file.getParent();
+
+ try {
+ for (IFile next : filter(Arrays.asList(container.members()), IFile.class)) {
+ if (!next.equals(file) && baseName.equals(next.getFullPath().removeFileExtension().lastSegment())) {
+ uris.add(baseURI.appendSegment(next.getName()));
+ }
+ }
+ } catch (CoreException e) {
+ Activator.log.error("Could not determine components of model " + diResource.getURI(), e); //$NON-NLS-1$
+ }
+
+ result = uris.build();
+ }
+
+ return result;
+ }
+
+ private void scanWorkspace(final ResourceSet resourceSet) {
+ completedScan = true;
+
+ IResourceProxyVisitor visitor = new IResourceProxyVisitor() {
+
+ @Override
+ public boolean visit(IResourceProxy proxy) throws CoreException {
+
+ if ((proxy.getType() == IResource.FILE) && proxy.getName().endsWith(".di")) { //$NON-NLS-1$
+
+ String path = proxy.requestFullPath().toString();
+
+ try {
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(path, true), true);
+
+ if ((resource != null) && isDIResource(resource)) {
+ // it's a Papyrus model. Initialize the
+ // dependencies
+ DependencyAdapter.getInstance(resource);
+ }
+ } catch (Exception e) {
+ // not a valid model resource. That's OK.
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(path, true), false);
+ if (resource != null) {
+ resource.unload();
+ resourceSet.getResources().remove(resource);
+ resource.eAdapters().clear();
+ }
+ }
+ }
+
+ return true;
+ }
+ };
+
+ try {
+ ResourcesPlugin.getWorkspace().getRoot().accept(visitor, 0);
+ } catch (CoreException e) {
+ // TODO: report to user?
+ Activator.log.error(e);
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/l10n/Messages.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/l10n/Messages.java
new file mode 100755
index 00000000..2227445a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/l10n/Messages.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This is the Messages type. Enjoy.
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.cdo.internal.core.l10n.messages"; //$NON-NLS-1$
+
+ public static String AbstractModelImportMapping_0;
+
+ public static String AbstractModelImportMapping_1;
+
+ public static String AbstractModelTransferMapping_0;
+
+ public static String AbstractModelTransferMapping_1;
+
+ public static String AbstractModelTransferMapping_2;
+
+ public static String CDOAwareModelSetServiceFactory_0;
+
+ public static String CDOControlModeParticipant_commandLabel;
+
+ public static String CDOUndoContext_0;
+
+ public static String CommitException_0;
+
+ public static String ModelExporter_0;
+
+ public static String ModelExporter_1;
+
+ public static String ModelExportMapping_0;
+
+ public static String ModelExportMapping_1;
+
+ public static String ModelExportMapping_2;
+
+ public static String ModelExportMapping_3;
+
+ public static String ModelImporter_10;
+
+ public static String ModelImporter_4;
+
+ public static String ModelImporter_5;
+
+ public static String ModelImporter_6;
+
+ public static String ModelImporter_9;
+
+ public static String ModelTransferConfiguration_0;
+
+ public static String ModelTransferConfiguration_1;
+
+ public static String ModelTransferConfiguration_2;
+
+ public static String ModelTransferConfiguration_3;
+
+ public static String ModelTransferConfiguration_4;
+
+ public static String ModelTransferConfiguration_6;
+
+ public static String ModelTransferConfiguration_7;
+
+ public static String ModelTransferNode_0;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/l10n/messages.properties b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/l10n/messages.properties
new file mode 100755
index 00000000..2e3a04a1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/l10n/messages.properties
@@ -0,0 +1,42 @@
+#############################################################################
+# Copyright (c) 2013, 2017 CEA LIST and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+# Eike Stepper (CEA) - bug 466520
+#############################################################################
+AbstractModelImportMapping_0=No mapping specified for {0}
+AbstractModelImportMapping_1=Resource already exists at mapping "{0}" for {1}
+AbstractModelTransferMapping_0=Multiple models map to the same path: {0}
+AbstractModelTransferMapping_1=No checkout specified.
+AbstractModelTransferMapping_2=Checkout "{0}" is not open.
+CDOAwareModelSetServiceFactory_0=Failed to unload CDO-aware ModelSet.
+CDOControlModeParticipant_commandLabel=CDO aspects
+CDOUndoContext_0=Affects objects({0})
+CommitException_0=Commit failed.
+ModelExporter_0=Exporting models
+ModelExporter_1=Failed to save exported model in the workspace.
+ModelExportMapping_0=No mapping specified for {0}
+ModelExportMapping_1=No such project for mapping "{0}" for {1}
+ModelExportMapping_2=Cannot create parent folder because a file already exists at "{0}" for {1}
+ModelExportMapping_3=A resource already exists at "{0}" for {1}
+ModelImporter_10=Failed to save workspace dependent of imported model.
+ModelImporter_4=Importing models
+ModelImporter_5=Failed to commit import transaction.
+ModelImporter_6=Failed to save affected models in the workspace.
+ModelImporter_9=Saving workspace models...
+ModelTransferConfiguration_0=Calculating model dependents ...
+ModelTransferConfiguration_1=Not all models that reference {0} are selected for {1}.
+ModelTransferConfiguration_2=Not all models that are referenced by {0} are selected for {1}.
+ModelTransferConfiguration_3=Parent unit {2} of controlled unit {0} must be selected for {1}.
+ModelTransferConfiguration_4=All controlled sub-units of {0} must be selected for {1}.
+ModelTransferConfiguration_6=import
+ModelTransferConfiguration_7=export
+ModelTransferNode_0=Calculating model dependencies ...
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/resource/CDOSashModelProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/resource/CDOSashModelProvider.java
new file mode 100755
index 00000000..0424340e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/resource/CDOSashModelProvider.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.resource;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.cdo.internal.core.Activator;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.AbstractSashModelProvider;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.SashModel;
+
+
+/**
+ * A CDO-specific sash model storage provider.
+ */
+public class CDOSashModelProvider extends AbstractSashModelProvider {
+
+ private static final IPath SASH_MODEL_STORAGE_ROOT = Activator.getDefault().getStateLocation().append("sashidx"); //$NON-NLS-1$
+
+ private IPath indexFolder;
+
+ public CDOSashModelProvider() {
+ super();
+ }
+
+ @Override
+ public void initialize(ModelSet modelSet) {
+ super.initialize(modelSet);
+
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(modelSet);
+ if (checkout != null) {
+ initialize(checkout);
+ } else {
+ // Model probably is in the workspace if null
+ indexFolder = SASH_MODEL_STORAGE_ROOT;
+ }
+ }
+
+ public CDOSashModelProvider initialize(CDOCheckout checkout) {
+ indexFolder = SASH_MODEL_STORAGE_ROOT.append(checkout.getView().getSession().getRepositoryInfo().getUUID());
+ return this;
+ }
+
+ @Override
+ public URI getSashModelURI(URI userModelURI) {
+ URI uriWithoutExtension = userModelURI.trimFileExtension();
+ IPath stateLocation = indexFolder.append(CDOURIUtil.extractResourcePath(uriWithoutExtension));
+ return URI.createFileURI(stateLocation.toString()).appendFileExtension(SashModel.SASH_MODEL_FILE_EXTENSION);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/services/localizer/CDOAwareObjectLocalizer.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/services/localizer/CDOAwareObjectLocalizer.java
new file mode 100755
index 00000000..70de7570
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/services/localizer/CDOAwareObjectLocalizer.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 488558
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.services.localizer;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.infra.core.services.SharedServiceFactory;
+import org.eclipse.papyrus.infra.services.localizer.DefaultObjectLocalizer;
+import org.eclipse.papyrus.infra.services.localizer.IObjectLocalizer;
+
+
+/**
+ * This is the CDOAwareObjectLocalizer type. Enjoy.
+ */
+public class CDOAwareObjectLocalizer extends DefaultObjectLocalizer {
+
+ public CDOAwareObjectLocalizer() {
+ super();
+ }
+
+ @Override
+ public EObject getLocalEObject(ResourceSet localSet, EObject remoteObject) {
+ EObject result = null;
+
+ if (!(remoteObject instanceof CDOResourceNode)) {
+ result = super.getLocalEObject(localSet, remoteObject);
+ } else if (remoteObject instanceof CDOResource) {
+ result = (CDOResource) getLocalResource(localSet, (CDOResource) remoteObject);
+ } else {
+ // these need special handling!
+ CDOResourceNode node = (CDOResourceNode) remoteObject;
+ String path = node.getPath();
+
+ CDOView view = CDOUtils.getView(localSet);
+ if (view != null) {
+ try {
+ result = view.getResourceNode(path);
+ } catch (Exception e) {
+ // normal consequence of the node path not being known
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Resource getLocalResource(ResourceSet localSet, Resource remoteResource) {
+ Resource result = null;
+
+ if (!(remoteResource instanceof CDOResource)) {
+ result = super.getLocalResource(localSet, remoteResource);
+ } else {
+ CDOResource cdo = (CDOResource) remoteResource;
+ String path = cdo.getPath();
+
+ CDOView view = CDOUtils.getView(localSet);
+ if (view != null) {
+ try {
+ result = view.getResource(path);
+ } catch (Exception e) {
+ // normal consequence of the resource path not being known
+ }
+ }
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ public static class Factory extends SharedServiceFactory<IObjectLocalizer> {
+
+ public Factory() {
+ super(IObjectLocalizer.class, CDOAwareObjectLocalizer::new);
+ }
+
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.project b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.project
new file mode 100755
index 00000000..b6907f51
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.ui.customization.properties</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/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.core.resources.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000..94a63768
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/messages.properties=ISO-8859-1
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..94d61f00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..8fe7b505
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.cdo.internal.ui.customization.properties;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.ui.customization.properties.messages;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.action;x-internal:=true
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.views.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.views.properties.toolsmiths;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.core;bundle-version="1.2.0",
+ org.eclipse.emf.edit.ui;bundle-version="2.8.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.cdo.internal.ui.customization.properties.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.ui.customization.properties;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/build.properties
new file mode 100755
index 00000000..22af330e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/plugin.properties
new file mode 100755
index 00000000..64d76913
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/plugin.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+pluginName = Papyrus CDO Properties View Customization (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Provides primarily Properties View Customization model storage in CDO repositories. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/plugin.xml
new file mode 100755
index 00000000..a381b474
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/plugin.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.views.properties.contextStorage">
+ <provider
+ class="org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.CDOContextStorageProvider">
+ </provider>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.views.properties.toolsmiths.contextStorage">
+ <actionProvider
+ class="org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.action.CDOContextStorageActionProvider">
+ </actionProvider>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.cdo.ui.repositoryFilters">
+ <itemProviderFilter
+ id="org.eclipse.papyrus.cdo.ui.customization.properties.CustomizationModelFilter">
+ <labelPattern
+ adapt="true"
+ objectClass="org.eclipse.emf.cdo.eresource.CDOResourceFolder"
+ pattern="^org\.eclipse\.papyrus\.cdo\.ui\.customization\.properties\.contexts">
+ </labelPattern>
+ </itemProviderFilter>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/pom.xml
new file mode 100755
index 00000000..a9557dcd
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.ui.customization.properties</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/Activator.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/Activator.java
new file mode 100755
index 00000000..46e6ac5e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/Activator.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.ui.customization.properties"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ super();
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the log helper
+ log.setPlugin(plugin);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/Messages.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/Messages.java
new file mode 100755
index 00000000..0e3b081c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/Messages.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This is the Messages type. Enjoy.
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.cdo.internal.ui.customization.properties.messages.messages"; //$NON-NLS-1$
+
+ public static String CDOContextCopyAction_0;
+
+ public static String CDOContextCopyAction_1;
+
+ public static String CDOContextCopyAction_2;
+
+ public static String CDOContextCopyAction_3;
+
+ public static String CDOContextDeleteAction_0;
+
+ public static String CDOContextDeleteAction_1;
+
+ public static String CDOContextEditAction_0;
+
+ public static String CDOContextEditAction_1;
+
+ public static String CDOContextEditAction_2;
+
+ public static String CDOContextEditAction_3;
+
+ public static String CDOContextEditAction_4;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/messages.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/messages.properties
new file mode 100755
index 00000000..f4d4d811
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/messages/messages.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+CDOContextCopyAction_0=Copy to Repository...
+CDOContextCopyAction_1=Create a new Context by copying the selected Context into a CDO checkout (shared)
+CDOContextCopyAction_2=A context with this name already exists
+CDOContextCopyAction_3=Copying "{0}" to "{1}"
+CDOContextDeleteAction_0=Delete context model from the repository
+CDOContextDeleteAction_1=Deleting the "{0}" properties view model.
+CDOContextEditAction_0=Open editor on context model in the repository
+CDOContextEditAction_1=Opening the "{0}" properties view model.
+CDOContextEditAction_2=Error committing changes to repository.
+CDOContextEditAction_3=Commit Failed
+CDOContextEditAction_4=Changes saved in the editor have to be committed to the repository. That commit operation failed.
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOContextStorageProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOContextStorageProvider.java
new file mode 100755
index 00000000..0300631d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOContextStorageProvider.java
@@ -0,0 +1,246 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 443830
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOTextResource;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckoutManager;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.view.CDOViewInvalidationEvent;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.papyrus.cdo.core.util.CDOFunctions;
+import org.eclipse.papyrus.cdo.core.util.CDOPredicates;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.Activator;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.views.properties.storage.AbstractContextStorageProvider;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicates;
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Multimap;
+
+
+/**
+ * This is the CDOContextStorageProvider type. Enjoy.
+ */
+public class CDOContextStorageProvider extends AbstractContextStorageProvider {
+
+ public static final String CONTEXTS_PATH = Activator.PLUGIN_ID + ".contexts"; //$NON-NLS-1$
+
+ public static final String CONTEXT_EXTENSION = "ctx"; //$NON-NLS-1$
+
+ private ResourceSet resourceSet;
+
+ private CDOTextURIHandler uriHandler;
+
+ private final IListener repositoryAdapter = new IListener() {
+
+ @Override
+ public void notifyEvent(IEvent event) {
+ if (event instanceof CDOCheckoutManager.CheckoutStateEvent) {
+ CDOCheckoutManager.CheckoutStateEvent e = (CDOCheckoutManager.CheckoutStateEvent) event;
+ CDOCheckout checkout = e.getCheckout();
+
+ switch (e.getNewState()) {
+ case Opening:
+ break;
+
+ case Open:
+ CDOView view = checkout.openView(true, resourceSet);
+ view.addListener(this);
+
+ Collection<? extends Context> added = ImmutableList.copyOf(getContexts(checkout));
+ if (!added.isEmpty()) {
+ fireContextsAdded(added);
+ }
+ break;
+
+ case Closing:
+ break;
+
+ case Closed:
+ Collection<? extends Context> removed = ImmutableList.copyOf(contexts.get(checkout));
+ if (!removed.isEmpty()) {
+ contexts.removeAll(checkout);
+ fireContextsRemoved(removed);
+ }
+ break;
+
+ default:
+ break;
+ }
+ } else if (event instanceof CDOViewInvalidationEvent) {
+ CDOViewInvalidationEvent e = (CDOViewInvalidationEvent) event;
+ CDOView view = e.getSource();
+
+ if (view.hasResource(CONTEXTS_PATH)) {
+ CDOResourceFolder folder = view.getResourceFolder(CONTEXTS_PATH);
+ URI prefix = folder.getURI();
+ if (!prefix.isPrefix()) {
+ prefix = prefix.appendSegment(""); // add a trailing slash
+ }
+
+ // usually, it is XWT resources that change, so we have to find the contexts that own them
+ Collection<CDOTextResource> contextResources = Lists.newArrayList();
+ Iterable<CDOTextResource> textResources = Iterables.filter(Iterables.filter(e.getDirtyObjects(), CDOTextResource.class), CDOPredicates.hasURIPrefix(prefix));
+ for (CDOTextResource next : textResources) {
+ // get the context resource
+ URI relative = next.getURI().deresolve(prefix);
+ URI contextURI = prefix.appendSegment(relative.segment(0)).appendSegment(relative.segment(0)).appendFileExtension(CONTEXT_EXTENSION);
+ String path = CDOURIUtil.extractResourcePath(contextURI);
+ if (view.hasResource(path)) {
+ try {
+ contextResources.add(view.getTextResource(path));
+ } catch (Exception ex) {
+ // it's not a text resource. OK, there's something going on that we don't understand
+ }
+ }
+ }
+
+ Collection<Context> changed = ImmutableList.copyOf(getContexts(contextResources));
+ if (!changed.isEmpty()) {
+ fireContextsChanged(changed);
+ }
+ }
+ }
+ }
+ };
+
+ private final Multimap<CDOCheckout, Context> contexts = HashMultimap.create();
+
+ public CDOContextStorageProvider() {
+ super();
+ }
+
+ @Override
+ public void initialize(ResourceSet resourceSet) throws CoreException {
+ this.resourceSet = resourceSet;
+
+ uriHandler = CDOTextURIHandler.install(resourceSet);
+
+ CDOExplorerUtil.getCheckoutManager().addListener(repositoryAdapter);
+ }
+
+ @Override
+ public void dispose() {
+ if (resourceSet != null) {
+ CDOExplorerUtil.getCheckoutManager().removeListener(repositoryAdapter);
+
+ uriHandler.uninstall();
+ uriHandler = null;
+
+ resourceSet = null;
+ super.dispose();
+ }
+ }
+
+ @Override
+ public boolean providesFor(Context context) {
+ URI uri = EcoreUtil.getURI(context);
+ return (uri != null) && (CDOUtils.isCDOURI(uri) || CDOTextURIHandler.SCHEME.equals(uri.scheme()));
+ }
+
+ @Override
+ public Collection<? extends Context> loadContexts() throws CoreException {
+ return ImmutableList.copyOf(Iterables.concat(Iterables.transform(getRepositories(), getContexts())));
+ }
+
+ Iterable<? extends CDOCheckout> getRepositories() {
+ return Arrays.asList(CDOExplorerUtil.getCheckoutManager().getCheckouts());
+ }
+
+ Function<CDOCheckout, Iterable<? extends Context>> getContexts() {
+ return new Function<CDOCheckout, Iterable<? extends Context>>() {
+
+ @Override
+ public Iterable<? extends Context> apply(CDOCheckout input) {
+ return getContexts(input);
+ }
+ };
+ }
+
+ Iterable<? extends Context> getContexts(CDOCheckout checkout) {
+ Iterable<? extends Context> result;
+
+ if (!checkout.isOpen()) {
+ result = Collections.emptyList();
+ } else {
+ CDOResourceFolder folder = null;
+
+ try {
+ folder = checkout.getView().getResourceFolder(CONTEXTS_PATH);
+ } catch (Exception e) {
+ // normal consequence when the folder doesn't exist
+ }
+
+ if (folder == null) {
+ result = Collections.emptyList();
+ } else {
+ Iterable<CDOTextResource> textNodes = Iterables.concat(Iterables.transform(folder.getNodes(), CDOFunctions.getFolderContents(CDOTextResource.class)));
+
+ result = getContexts(textNodes);
+
+ contexts.replaceValues(checkout, result);
+ }
+ }
+
+ return result;
+ }
+
+ Iterable<? extends Context> getContexts(Iterable<CDOTextResource> textResources) {
+ return Iterables.filter( // null filter
+ Iterables.transform( // root transform
+ Iterables.transform( // resource transform
+ Iterables.filter( // .ctx extension filter
+ textResources, CDOPredicates.hasExtension(CONTEXT_EXTENSION)), // filter
+ getContextResource()), // transform
+ CDOFunctions.getRoot(Context.class)), // transform
+ Predicates.notNull()); // filter
+ }
+
+ private Function<CDOTextResource, Resource> getContextResource() {
+ return new Function<CDOTextResource, Resource>() {
+
+ @Override
+ public Resource apply(CDOTextResource input) {
+ return resourceSet.getResource(CDOTextURIHandler.createURI(input.getURI()), true);
+ }
+ };
+ }
+
+ @Override
+ public void refreshContext(Context context) throws CoreException {
+ // nothing to do
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOTextDelegatingResourceFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOTextDelegatingResourceFactory.java
new file mode 100755
index 00000000..d8fd51fc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOTextDelegatingResourceFactory.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.Resource.Factory;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl;
+
+
+/**
+ * Specialized resource factory that delegates the custom Papyrus CDO Text resource
+ * URI scheme to registrations by extension.
+ */
+public class CDOTextDelegatingResourceFactory implements Factory {
+
+ private final Resource.Factory.Registry registry;
+
+ public CDOTextDelegatingResourceFactory(Resource.Factory.Registry registry) {
+ super();
+
+ this.registry = registry;
+ }
+
+ @Override
+ public Resource createResource(URI uri) {
+ Resource.Factory delegate = ResourceFactoryRegistryImpl.convert(registry.getExtensionToFactoryMap().get(uri.fileExtension()));
+ return (delegate != null) ? delegate.createResource(uri) : null;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOTextURIHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOTextURIHandler.java
new file mode 100755
index 00000000..35a0217c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/CDOTextURIHandler.java
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.emf.cdo.eresource.CDOTextResource;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.view.CDOViewSet;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIHandler;
+import org.eclipse.emf.ecore.resource.impl.URIHandlerImpl;
+
+
+/**
+ * A URI handler that loads XMI content from {@link CDOTextResource}s.
+ */
+public class CDOTextURIHandler extends URIHandlerImpl {
+
+ public static final String SCHEME = "papyrus.cdo.text"; //$NON-NLS-1$
+
+ private final ResourceSet resourceSet;
+
+ protected CDOTextURIHandler(ResourceSet resourceSet) {
+ super();
+
+ this.resourceSet = resourceSet;
+ }
+
+ public static CDOTextURIHandler install(ResourceSet resourceSet) {
+ CDOTextURIHandler result = new CDOTextURIHandler(resourceSet);
+
+ // add to the front of the list because the last currently on the list is a catch-all
+ resourceSet.getURIConverter().getURIHandlers().add(0, result);
+
+ return result;
+ }
+
+ public static void uninstall(ResourceSet resourceSet) {
+ for (Iterator<URIHandler> iter = resourceSet.getURIConverter().getURIHandlers().iterator(); iter.hasNext();) {
+ if (iter.next() instanceof CDOTextURIHandler) {
+ iter.remove();
+ }
+ }
+ }
+
+ public void uninstall() {
+ resourceSet.getURIConverter().getURIHandlers().remove(this);
+ }
+
+ public static URI createURI(URI uri) {
+ return URI.createHierarchicalURI(SCHEME, uri.authority(), uri.device(), uri.segments(), uri.query(), uri.fragment());
+ }
+
+ @Override
+ public boolean canHandle(URI uri) {
+ return SCHEME.equals(uri.scheme());
+ }
+
+ public static URI translate(URI uri) {
+ return URI.createHierarchicalURI(CDOURIUtil.PROTOCOL_NAME, uri.authority(), uri.device(), uri.segments(), uri.query(), uri.fragment());
+ }
+
+ protected URIHandler getDelegateHandler(URI translatedURI) {
+ return resourceSet.getURIConverter().getURIHandler(translatedURI);
+ }
+
+ public static CDOView getView(ResourceSet resourceSet, URI uri) {
+ if (SCHEME.equals(uri.scheme())) {
+ uri = translate(uri);
+ }
+ return CDOUtil.getView(resourceSet,uri);
+ }
+
+ protected CDOView getView(URI uri) {
+ return getView(resourceSet, uri);
+ }
+
+ @Override
+ public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException {
+ URI translated = translate(uri);
+ CDOView view = getView(translated);
+ if (view == null) {
+ // try to delegate, but it probably won't work
+ return getDelegateHandler(translated).createInputStream(translated, options);
+ } else {
+ try {
+ CDOTextResource text = view.getTextResource(URI.decode(CDOURIUtil.extractResourcePath(translated)));
+ return new ClobInputStream(text.getContents(), text.getEncoding());
+ } catch (IOException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+ }
+
+ @Override
+ public OutputStream createOutputStream(URI uri, Map<?, ?> options) throws IOException {
+ URI translated = translate(uri);
+ CDOView view = getView(translated);
+ if (view == null) {
+ // try to delegate, but it probably won't work
+ return getDelegateHandler(translated).createOutputStream(translated, options);
+ } else {
+ ClobOutputStream clobOutput = null;
+
+ try {
+ CDOTextResource text = view.getTextResource(CDOURIUtil.extractResourcePath(translated));
+ clobOutput = new ClobOutputStream(text);
+ } catch (Exception e) {
+ throw new IOException(e.getMessage());
+ }
+
+ // returning here resolves resource-leak compiler warning
+ return clobOutput;
+ }
+ }
+
+ @Override
+ public void delete(URI uri, Map<?, ?> options) throws IOException {
+ URI translated = translate(uri);
+ getDelegateHandler(translated).delete(translated, options);
+ }
+
+ @Override
+ public boolean exists(URI uri, Map<?, ?> options) {
+ URI translated = translate(uri);
+ return getDelegateHandler(translated).exists(translated, options);
+ }
+
+ @Override
+ public Map<String, ?> getAttributes(URI uri, Map<?, ?> options) {
+ URI translated = translate(uri);
+ return getDelegateHandler(translated).getAttributes(translated, options);
+ }
+
+ @Override
+ public void setAttributes(URI uri, Map<String, ?> attributes, Map<?, ?> options) throws IOException {
+ URI translated = translate(uri);
+ getDelegateHandler(translated).setAttributes(translated, attributes, options);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/ClobInputStream.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/ClobInputStream.java
new file mode 100755
index 00000000..d7017a29
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/ClobInputStream.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+
+import org.eclipse.emf.cdo.common.lob.CDOClob;
+
+
+/**
+ * An input stream for reading {@link CDOClob}s.
+ */
+public class ClobInputStream extends InputStream {
+
+ private static final int BUFFER_SIZE_IN_CHARS = 2048;
+
+ private static final int MASK = 0xFF;
+
+ private static final int EOF = -1;
+
+ private final Charset charset;
+
+ private Reader reader;
+
+ private CharBuffer chars = CharBuffer.allocate(BUFFER_SIZE_IN_CHARS);
+
+ private ByteBuffer buffer;
+
+ public ClobInputStream(CDOClob clob, String encoding) throws IOException {
+ this.reader = clob.getContents();
+ this.charset = Charset.forName((encoding == null) ? "UTF-8" : encoding); //$NON-NLS-1$
+ }
+
+ @Override
+ public void close() throws IOException {
+ if (reader != null) {
+ reader.close();
+ reader = null;
+ buffer = null;
+ chars = null;
+ }
+ }
+
+ @Override
+ public int read() throws IOException {
+ checkClosed();
+ checkBuffer();
+
+ if (buffer != null) {
+ return buffer.get() & MASK;
+ }
+
+ return EOF;
+ }
+
+ private void checkBuffer() throws IOException {
+ if ((buffer == null) || !buffer.hasRemaining()) {
+ buffer = null;
+ createBuffer();
+ }
+ }
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException {
+ checkClosed();
+
+ if (len == 0) {
+ return 0;
+ }
+
+ checkBuffer();
+
+ if (buffer == null) {
+ return EOF;
+ }
+
+ int count = 0;
+ do {
+ checkBuffer();
+
+ if (buffer == null) {
+ // no more to read
+ break;
+ }
+
+ int toRead = Math.min(buffer.remaining(), len - count);
+ buffer.get(b, off + count, toRead);
+ count = count + toRead;
+ } while (count < len);
+
+ return count;
+ }
+
+ @Override
+ public int available() throws IOException {
+ checkClosed();
+ checkBuffer();
+
+ if (buffer != null) {
+ return buffer.remaining();
+ }
+
+ return 0;
+ }
+
+ protected final void checkClosed() throws IOException {
+ if (reader == null) {
+ throw new IOException("CLOB reader is closed"); //$NON-NLS-1$
+ }
+ }
+
+ private void createBuffer() throws IOException {
+ checkClosed();
+
+ chars.rewind();
+ int count = reader.read(chars);
+ if (count > 0) {
+ chars.flip();
+ buffer = charset.encode(chars);
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/ClobOutputStream.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/ClobOutputStream.java
new file mode 100755
index 00000000..8a008f05
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/ClobOutputStream.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.StringReader;
+
+import org.eclipse.emf.cdo.common.lob.CDOClob;
+import org.eclipse.emf.cdo.eresource.CDOTextResource;
+
+
+/**
+ * An output stream for writing the contents of a {@link CDOClob}.
+ */
+public class ClobOutputStream extends ByteArrayOutputStream {
+
+ private final String encoding;
+
+ private CDOTextResource resource;
+
+ public ClobOutputStream(CDOTextResource resource) {
+ super();
+
+ this.resource = resource;
+ this.encoding = (resource.getEncoding() == null) ? "UTF-8" : resource.getEncoding(); //$NON-NLS-1$
+ }
+
+ @Override
+ public void close() throws IOException {
+ super.close();
+
+ if (resource != null) {
+ resource.setContents(createClob());
+ resource = null;
+ }
+ }
+
+ protected CDOClob createClob() throws IOException {
+ String text = new String(toByteArray(), encoding);
+ return new CDOClob(new StringReader(text));
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/AbstractCDOContextAction.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/AbstractCDOContextAction.java
new file mode 100755
index 00000000..792d0dc0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/AbstractCDOContextAction.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.action;
+
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.CDOTextURIHandler;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+
+/**
+ * This is the AbstractCDOContextAction type. Enjoy.
+ */
+public class AbstractCDOContextAction {
+
+ protected CDOTransaction createTransaction(EObject object) {
+ CDOView view = null;
+
+ Resource resource = object.eResource();
+ if (resource instanceof CDOResource) {
+ view = ((CDOResource) resource).cdoView();
+ } else {
+ view = CDOTextURIHandler.getView(resource.getResourceSet(), resource.getURI());
+ }
+
+ CDOTransaction result = null;
+
+ if (view != null) {
+ result = view.getSession().openTransaction();
+ CDOTextURIHandler.install(result.getResourceSet());
+ }
+
+ return result;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected <T extends EObject> T getDoppelganger(T original, CDOView view) {
+ Resource resource = original.eResource();
+ if (resource instanceof CDOResource) {
+ CDOID oid = CDOUtil.getCDOObject(original).cdoID();
+ return (T) CDOUtil.getEObject(view.getObject(oid));
+ } else {
+ return (T) view.getResourceSet().getEObject(EcoreUtil.getURI(original), true);
+ }
+ }
+
+ protected CDOResourceFolder getContextFolder(Context context) {
+ CDOResourceFolder result = null;
+
+ Resource resource = context.eResource();
+
+ if (resource instanceof CDOResource) {
+ result = ((CDOResource) resource).getFolder();
+ } else {
+ CDOView view = CDOTextURIHandler.getView(resource.getResourceSet(), resource.getURI());
+ if (view != null) {
+ CDOResourceNode node = view.getResourceNode(URI.decode(CDOURIUtil.extractResourcePath(CDOTextURIHandler.translate(resource.getURI()))));
+ if (node != null) {
+ result = node.getFolder();
+ }
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextCopyAction.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextCopyAction.java
new file mode 100755
index 00000000..96d7af90
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextCopyAction.java
@@ -0,0 +1,318 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.action;
+
+import static org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.CDOContextStorageProvider.CONTEXTS_PATH;
+import static org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.CDOContextStorageProvider.CONTEXT_EXTENSION;
+import static org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.ContextStorageActionUtil.isRelative;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.cdo.common.lob.CDOClob;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOTextResource;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckoutManager;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.messages.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.CDOTextURIHandler;
+import org.eclipse.papyrus.cdo.internal.ui.dialogs.CheckoutSelectionDialog;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.properties.catalog.PropertiesURIHandler;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.infra.properties.contexts.Section;
+import org.eclipse.papyrus.infra.properties.contexts.Tab;
+import org.eclipse.papyrus.infra.properties.ui.util.PropertiesUtil;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.ContextStorageActionUtil;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import com.google.common.base.Supplier;
+import com.google.common.io.Closeables;
+
+/**
+ * This is the CDOContextCopyAction type. Enjoy.
+ */
+public class CDOContextCopyAction extends AbstractCDOContextAction implements IContextCopyAction {
+
+ @Override
+ public String getLabel() {
+ return Messages.CDOContextCopyAction_0;
+ }
+
+ @Override
+ public String getToolTip() {
+ return Messages.CDOContextCopyAction_1;
+ }
+
+ @Override
+ public Context copy(Context source, String targetName, IProgressMonitor monitor) throws CoreException {
+ CDOCheckout checkout = selectCheckout(source);
+ if (checkout == null) {
+ // user cancelled
+ return null;
+ }
+
+ CDOTransaction transaction = checkout.openTransaction(new ResourceSetImpl());
+
+ SubMonitor sub = SubMonitor.convert(monitor);
+
+ Context result = null;
+
+ try {
+ CDOResourceFolder contextsFolder = transaction.getOrCreateResourceFolder(CONTEXTS_PATH);
+ String folderPath = new Path(contextsFolder.getPath()).append(targetName).toString();
+ String resourcePath = new Path(folderPath).append(targetName).addFileExtension(CONTEXT_EXTENSION).toString();
+
+ if (transaction.hasResource(folderPath)) { // actually checks for any kind of resource node at that path
+ throw new IOException(Messages.CDOContextCopyAction_2);
+ }
+
+ transaction.createResourceFolder(folderPath);
+ CDOTextResource targetResource = transaction.createTextResource(resourcePath);
+
+ // create a custom URI scheme that delegates XMI resource content to a CDOTextResource's CLOB content
+ URI targetModelURI = CDOTextURIHandler.createURI(targetResource.getURI());
+
+ ResourceSet resourceSet = transaction.getResourceSet();
+
+ // add the URI handler to load the context resource
+ CDOTextURIHandler.install(resourceSet);
+
+ // re-load the source context in the new resource set to scope the copy operation
+ Context sourceContext = (Context) EMFHelper.loadEMFModel(resourceSet, source.eResource().getURI());
+ IStatus copyResult = copyAll(sourceContext, targetResource, sub);
+
+ if (copyResult.isOK()) {
+ Context resultContext = (Context) EMFHelper.loadEMFModel(resourceSet, targetModelURI);
+ resultContext.setName(targetName);
+ resultContext.setPrototype(sourceContext);
+ resultContext.eResource().save(null);
+
+ long commitTime = System.currentTimeMillis();
+ transaction.commit();
+
+ CDOView sourceView = CDOUtil.getCDOObject(source).cdoView();
+ sourceView.waitForUpdate(commitTime, 30000L);
+
+ // load the new instance in the shared resource set
+ ResourceSet sourceResourceSet = sourceView.getResourceSet();
+ result = (Context) EMFHelper.loadEMFModel(sourceResourceSet, targetModelURI);
+ } else if (copyResult.getSeverity() != IStatus.CANCEL) {
+ throw new CoreException(copyResult);
+ }
+ } catch (Exception e) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e));
+ } finally {
+ CDOUtils.unload(transaction);
+ transaction.close();
+ EMFHelper.unload(transaction.getResourceSet());
+ sub.done();
+ }
+
+ return result;
+ }
+
+ protected CDOCheckout selectCheckout(Context context) {
+ CDOCheckout result = null;
+ CDOCheckoutManager mgr = CDOExplorerUtil.getCheckoutManager();
+ CDOCheckout[] checkouts = mgr.getCheckouts();
+
+ // default selection is the repository containing the context to be copied,
+ // if it is in a repository
+ CDOCheckout initialSelection = null;
+ URI uri = context.eResource().getURI();
+ if (CDOUtils.isCDOURI(uri)) {
+ initialSelection = CDOExplorerUtil.getCheckout(uri);
+ }
+
+ // otherwise, look for the first open repository
+ if (initialSelection == null) {
+ for (CDOCheckout next : checkouts) {
+ if (next.isOpen()) {
+ initialSelection = next;
+ break;
+ }
+ }
+ }
+
+ result = initialSelection;
+
+ if (checkouts.length > 1) {
+ final CDOCheckout[] innerResult = { initialSelection };
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ Shell active = Display.getDefault().getActiveShell();
+ CheckoutSelectionDialog dlg = new CheckoutSelectionDialog(active, innerResult[0], new Supplier<IRunnableContext>() {
+
+ @Override
+ public IRunnableContext get() {
+ return new ProgressMonitorDialog(Display.getDefault().getActiveShell());
+ }
+ });
+
+ if (dlg.open() == Window.OK) {
+ innerResult[0] = dlg.getSelectedRepository();
+ } else {
+ innerResult[0] = null;
+ }
+ }
+ });
+
+ result = innerResult[0];
+ }
+
+ return (CDOCheckout) result;
+ }
+
+ private IStatus copyAll(Context source, CDOTextResource target, IProgressMonitor monitor) {
+ SubMonitor sub = SubMonitor.convert(monitor, 100);
+
+ ContextStorageActionUtil.initializeCopy(source, sub.newChild(10));
+
+ return doCopy(source, target, sub.newChild(90));
+ }
+
+ private IStatus doCopy(Context source, CDOTextResource target, IProgressMonitor monitor) {
+ IStatus result = Status.OK_STATUS;
+
+ final CDOResourceFolder targetFolder = target.getFolder();
+ final String targetName = target.getName();
+
+ try {
+ Resource sourceResource = source.eResource();
+ int resourcesToCopy = sourceResource.getResourceSet().getResources().size();
+ List<Context> contexts = new LinkedList<Context>();
+ for (Context context : PropertiesUtil.getDependencies(source)) {
+ if (isRelative(sourceResource, context.eResource())) {
+ contexts.add(context);
+ for (Tab tab : context.getTabs()) {
+ resourcesToCopy += tab.getSections().size();
+ }
+ }
+ }
+
+ monitor.beginTask(NLS.bind(Messages.CDOContextCopyAction_3, source.getName(), target.getName()), resourcesToCopy);
+
+ // copy the primary context
+ copy(sourceResource.getResourceSet(), sourceResource.getURI(), target);
+ monitor.worked(1);
+
+ // copy the dependent resources which are located in the same folder or in subfolders
+ for (Resource resource : sourceResource.getResourceSet().getResources()) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ if ((resource != sourceResource) && isRelative(sourceResource, resource)) {
+ copy(resource, targetFolder, sourceResource, targetName);
+ }
+ monitor.worked(1);
+ }
+
+ // copy the XWT files (they haven't been loaded in the resource set)
+ for (Context context : contexts) {
+ for (Tab tab : context.getTabs()) {
+ for (Section section : tab.getSections()) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ copy(section.getSectionFile(), targetFolder, sourceResource);
+ monitor.worked(1);
+ }
+ }
+ }
+
+ monitor.done();
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ result = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An error occurred during the copy of " + source.getName(), ex); //$NON-NLS-1$
+ monitor.done();
+ }
+
+ return result;
+ }
+
+ protected void copy(String xwtFileName, CDOResourceFolder targetFolder, Resource sourceResource) throws IOException {
+ CDOTextResource target = ((CDOTransaction) targetFolder.cdoView()).createTextResource(new Path(targetFolder.getPath()).append(xwtFileName).toString());
+ URI sourceURI = URI.createURI(xwtFileName).resolve(sourceResource.getURI());
+ copy(sourceResource.getResourceSet(), sourceURI, target);
+ }
+
+ protected void copy(ResourceSet sourceResourceSet, URI sourceURI, CDOTextResource target) throws IOException {
+ PropertiesURIHandler uriHandler = new PropertiesURIHandler();
+ if (uriHandler.canHandle(sourceURI)) {
+ sourceURI = uriHandler.getConvertedURI(sourceURI);
+ }
+
+ InputStream input = null;
+
+ try {
+ input = sourceResourceSet.getURIConverter().createInputStream(sourceURI);
+ String encoding = (input instanceof URIConverter.Readable) ? ((URIConverter.Readable) input).getEncoding() : "UTF-8"; //$NON-NLS-1$
+ Reader contents = new InputStreamReader(input, encoding);
+ target.setContents(new CDOClob(contents));
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ } finally {
+ if (input != null) {
+ Closeables.closeQuietly(input);
+ }
+ }
+ }
+
+ private void copy(Resource resource, CDOResourceFolder folder, Resource base, String targetName) throws IOException {
+ URI relativeURI = resource.getURI().deresolve(base.getURI());
+ if (relativeURI.toString().equals("")) { //$NON-NLS-1$
+ relativeURI = URI.createURI(targetName + ".ctx"); //$NON-NLS-1$
+ }
+
+ // append a dummy segment to ensure correct resolution (otherwise we will
+ // miss the last segment of the folder path)
+ URI uri = relativeURI.resolve(folder.getURI().appendSegment("dummy.ctx")); //$NON-NLS-1$
+ CDOTextResource target = ((CDOTransaction) folder.cdoView()).createTextResource(CDOURIUtil.extractResourcePath(uri));
+ copy(resource.getResourceSet(), resource.getURI(), target);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextDeleteAction.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextDeleteAction.java
new file mode 100755
index 00000000..6efbf1ad
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextDeleteAction.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.action;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.messages.Messages;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction;
+
+/**
+ * This is the CDOContextDeleteAction type. Enjoy.
+ */
+public class CDOContextDeleteAction extends AbstractCDOContextAction implements IContextDeleteAction {
+
+ @Override
+ public String getToolTip() {
+ return Messages.CDOContextDeleteAction_0;
+ }
+
+ @Override
+ public void delete(Context context, IProgressMonitor monitor) throws CoreException {
+ SubMonitor sub = SubMonitor.convert(monitor, NLS.bind(Messages.CDOContextDeleteAction_1, context.getName()), IProgressMonitor.UNKNOWN);
+
+ CDOTransaction transaction = createTransaction(context);
+
+ try {
+ getContextFolder(getDoppelganger(context, transaction)).delete(null);
+ transaction.commit();
+ } catch (Exception e) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e));
+ } finally {
+ transaction.close();
+ sub.done();
+ }
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextEditAction.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextEditAction.java
new file mode 100755
index 00000000..8a0f5225
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextEditAction.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.action;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CommitException;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.messages.Messages;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.statushandlers.IStatusAdapterConstants;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * This is the CDOContextEditAction type. Enjoy.
+ */
+public class CDOContextEditAction extends AbstractCDOContextAction implements IContextEditAction {
+
+ @Override
+ public String getToolTip() {
+ return Messages.CDOContextEditAction_0;
+ }
+
+ @Override
+ public void openEditor(Context context, IProgressMonitor monitor) throws CoreException {
+ SubMonitor sub = SubMonitor.convert(monitor, NLS.bind(Messages.CDOContextEditAction_1, context.getName()), IProgressMonitor.UNKNOWN);
+
+ CDOTransaction transaction = createTransaction(context);
+ try {
+ IEditorPart editor = openEditor(getDoppelganger(context, transaction));
+ if (editor != null) { // will be null if an editor was already open
+ hookCloseListener(editor, transaction);
+ hookSaveListener(editor, transaction);
+ } else {
+ // we didn't open the editor? Then we don't need the transaction
+ transaction.close();
+ }
+ } finally {
+ sub.done();
+ }
+ }
+
+ protected IEditorPart openEditor(Context context) throws CoreException {
+ IEditorPart result = null;
+
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IEditorInput input = new CDOResourceEditorInput(context.eResource(), context.getName());
+
+ IEditorPart existing = page.findEditor(input);
+ if (existing == null) { // don't return the editor if already open
+ result = page.openEditor(input, "org.eclipse.papyrus.customization.properties.UIEditor", true); //$NON-NLS-1$ ;
+ }
+
+ return result;
+ }
+
+ private void hookCloseListener(final IEditorPart editor, final CDOView view) {
+ final IWorkbenchPage page = editor.getSite().getPage();
+
+ page.addPartListener(new IPartListener() {
+
+ @Override
+ public void partClosed(IWorkbenchPart part) {
+ if (part == editor) {
+ try {
+ view.close();
+ } finally {
+ page.removePartListener(this);
+ }
+ }
+ }
+
+ @Override
+ public void partOpened(IWorkbenchPart part) {
+ // pass
+ }
+
+ @Override
+ public void partDeactivated(IWorkbenchPart part) {
+ // pass
+ }
+
+ @Override
+ public void partBroughtToTop(IWorkbenchPart part) {
+ // pass
+ }
+
+ @Override
+ public void partActivated(IWorkbenchPart part) {
+ // pass
+ }
+ });
+ }
+
+ private void hookSaveListener(final IEditorPart editor, final CDOTransaction transaction) {
+ editor.addPropertyListener(new IPropertyListener() {
+
+ @Override
+ public void propertyChanged(Object source, int property) {
+ if (property == IEditorPart.PROP_DIRTY) {
+ if (!editor.isDirty()) {
+ // it's not enough for the editor to save, because that only updates
+ // the CLOB content of the CDOTextResources that are changed. We
+ // need to commit the changes to the repository
+ try {
+ transaction.commit();
+ } catch (CommitException e) {
+ Activator.log.error(e);
+
+ StatusAdapter adapter = new StatusAdapter(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.CDOContextEditAction_2, e));
+ adapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, Messages.CDOContextEditAction_3);
+ adapter.setProperty(IStatusAdapterConstants.EXPLANATION_PROPERTY, Messages.CDOContextEditAction_4);
+ StatusManager.getManager().handle(adapter, StatusManager.SHOW);
+ }
+ }
+ }
+ }
+ });
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextStorageActionProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextStorageActionProvider.java
new file mode 100755
index 00000000..ed90aaf0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOContextStorageActionProvider.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 443830
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.action;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.CDOTextURIHandler;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.AbstractContextStorageActionProvider;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction;
+
+
+/**
+ * This is the CDOContextStorageActionProvider type. Enjoy.
+ */
+public class CDOContextStorageActionProvider extends AbstractContextStorageActionProvider {
+
+ public CDOContextStorageActionProvider() {
+ super();
+ }
+
+ @Override
+ public boolean providesFor(Context context) {
+ URI uri = EcoreUtil.getURI(context);
+ return (uri != null) && (CDOUtils.isCDOURI(uri) || CDOTextURIHandler.SCHEME.equals(uri.scheme()));
+ }
+
+ @Override
+ protected IContextCopyAction createContextCopyAction() {
+ return new CDOContextCopyAction();
+ }
+
+ @Override
+ protected IContextEditAction createContextEditAction() {
+ return new CDOContextEditAction();
+ }
+
+ @Override
+ protected IContextDeleteAction createContextDeleteAction() {
+ return new CDOContextDeleteAction();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOResourceEditorInput.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOResourceEditorInput.java
new file mode 100755
index 00000000..9f2b2224
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.customization.properties/src/org/eclipse/papyrus/cdo/internal/ui/customization/properties/storage/action/CDOResourceEditorInput.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage.action;
+
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.ResourceEditorInput;
+
+
+/**
+ * This is the CDOResourceEditorInput type. Enjoy.
+ */
+public class CDOResourceEditorInput extends ResourceEditorInput {
+
+ public CDOResourceEditorInput(Resource resource) {
+ super(resource);
+ }
+
+ public CDOResourceEditorInput(Resource resource, String name) {
+ super(resource, name);
+ }
+
+ @Override
+ public String getToolTipText() {
+ String result;
+
+ if (getResource() instanceof CDOResourceNode) {
+ // a more user-friendly representation than the URI
+ result = ((CDOResourceNode) getResource()).getPath();
+ } else {
+ result = super.getToolTipText();
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.project b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.project
new file mode 100755
index 00000000..72103131
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.project
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.ui.doc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.core.resources.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000..99f26c02
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..f08be2b0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.m2e.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.m2e.core.prefs
new file mode 100755
index 00000000..f897a7f1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.pde.api.tools.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 00000000..23fb95e1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..ef8f3895
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.help;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.papyrus.infra.doc;bundle-version="[1.2.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.ui.doc;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/build.properties
new file mode 100755
index 00000000..a17ae1c5
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/build.properties
@@ -0,0 +1,9 @@
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml,\
+ target/generated-eclipse-help/**
+bin.excludes = **/*.markdown
+src.includes = about.html,\
+ resource/
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/plugin.properties
new file mode 100755
index 00000000..ec40507b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/plugin.properties
@@ -0,0 +1,17 @@
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+#
+
+pluginName=Papyrus CDO Model Repository Documentation
+providerName=Eclipse Modeling Project
+
+pluginDescription=End-user documentation for the CDO Integration feature. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/plugin.xml
new file mode 100755
index 00000000..29b2219b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/plugin.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+
+<!--
+ Copyright (c) 2013 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+
+-->
+
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc
+ file="target/generated-eclipse-help/cdo-main-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/generated-eclipse-help/start/cdo-start-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/generated-eclipse-help/team/cdo-team-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/generated-eclipse-help/bugs/cdo-bugs-toc.xml"
+ primary="false">
+ </toc>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/pom.xml
new file mode 100755
index 00000000..b6a0c283
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.cdo.ui.doc</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
+ <configuration>
+ <sourceFolder>resource</sourceFolder>
+ <outputFolder>${project.build.directory}/generated-eclipse-help</outputFolder>
+ <!-- copyrightNotice>${help.copyrightNotice}</copyrightNotice> <title>${help.documentTitle}</title -->
+ <multipleOutputFiles>false</multipleOutputFiles>
+ <navigationImages>true</navigationImages>
+ <formatOutput>true</formatOutput>
+ <htmlFilenameFormat>$1.html</htmlFilenameFormat>
+ <xmlFilenameFormat>$1-toc.xml</xmlFilenameFormat>
+ <helpPrefix>generated-eclipse-help</helpPrefix>
+ <!-- stylesheetUrls> <param>styles/main.css</param> </stylesheetUrls -->
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>eclipse-help</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.markdown.core</artifactId>
+ <version>${mylyn.wikitext.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ <name>Papyrus Cdo UI doc</name>
+</project>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/bugs/cdo-bugs.markdown b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/bugs/cdo-bugs.markdown
new file mode 100755
index 00000000..74fb6b93
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/bugs/cdo-bugs.markdown
@@ -0,0 +1,20 @@
+# <a id="Limitations">Limitations and Known Issues</a>
+
+The following Papyrus capabilities are supported on models in CDO repositories:
+
+* create new UML and DSML models
+ * initialize Papyrus model from existing domain model resource in the repository
+ * import models from the workspace
+ * reorganize models in folders by drag-and-drop
+* create and edit all kinds of UML and DSML diagram
+* create and edit tables
+* export models to the workspace
+* browse connected repositories for importing packages and applying profiles
+* CSS diagram styling and themes (with restrictions, see below)
+* properties view customization models can be stored in and loaded from the repository
+
+Some capabilities of Papyrus are not support on models in CDO repositories in this release:
+
+* although CSS styling of diagrams is supported, this extends only to CSS stylsheets deployed in plug-ins. Custom stylesheets stored locally in the workspace or in a repository are not supported
+* controlled resources are not supported
+* attaching documents to model elements is not supported \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/cdo-main-toc.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/cdo-main-toc.xml
new file mode 100755
index 00000000..55ae0b11
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/cdo-main-toc.xml
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="CDO Model Repository" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusTasks">
+ <topic href="target/generated-eclipse-help/start/cdo-start.html" label="Working with CDO Model Repositories">
+ <link toc="target/generated-eclipse-help/start/cdo-start-toc.xml"/>
+ <link toc="target/generated-eclipse-help/team/cdo-team-toc.xml"/>
+ <link toc="target/generated-eclipse-help/bugs/cdo-bugs-toc.xml"/>
+ <anchor id="cdo-additions"/>
+ </topic>
+
+</toc>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/addrepo.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/addrepo.png
new file mode 100755
index 00000000..86f7efec
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/addrepo.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/cdo-start.markdown b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/cdo-start.markdown
new file mode 100755
index 00000000..a838cacc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/cdo-start.markdown
@@ -0,0 +1,45 @@
+# Working with CDO Model Repositories
+This document is a brief guide to getting started with Papyrus UML models in the CDO Model Repository.
+
+For more information about CDO, see the [EMF CDO wiki](http://wiki.eclipse.org/CDO).
+
+## <a id="Installing">Installation</a>
+The CDO Model Repository integration feature is not installed by default with Papyrus; it is an optional extra component. To install this feature, open the Papyrus discovery wizard from the **Help &rarr; Install Papyrus Additional Components** menu. You should find an entry like the following in the list:
+
+![Install additional components](discovery_dialog.png)
+
+Select the CDO integration feature by checking the box on the left side and press **Finish** to perform the installation.
+
+## <a id="Connecting">Connecting to a Repository</a>
+Repository connections are managed in the **CDO Repositories** view. Use the green plus (**+**) button in the view to create a new repository connection:
+
+![Add repository](addrepo.png)
+
+The new repository is then added to the view. Select the new repository and pick **Checkout** in the context menu. Complete the wizard. A new checkout representing the contents of the repository now appears in the **Project Explorer** view. Note that this checkout looks like a workspace project but does not physically exist in your workspace. An online checkout does not store model data on your local disk at all; an offline checkout stores the checked-out baseline locally (but not in the workspace). You can create as many checkouts from a repository as you want, for example when working with different branches.
+
+Creating new or opening existing Papyrus models in a checkout works similar to local workspace projects. Note that because it is necessary to explicitly connect to model repositories, any model editors that are open when shutting down the Papyrus workbench are not re-opened on next launch.
+
+## <a id="Importing">Importing Models from the Workspace</a>
+
+You probably already have models in your workspace that you would like to import into a repository. To do this, select one or more models in the **Project Explorer** and choose the **Import into Repository...** action in the context menu. Alternatively, just drag and drop one or more model onto a repository.
+
+![Import Models](importmodels.png)
+
+By default, the wizard maps incoming models to paths in the repository according to their paths in the workspace. This mapping may be customized in the last page.
+
+As a first step, the wizard analyzes the selected models for cross-reference dependencies. It is highly recommended also to import any models that references the initially selected models. Otherwise, they will be updated to reference the models in the repository and it may be difficult to edit them when Papyrus is not connected to the repository.
+
+It is also suggested to import models referenced by the initial selection. However, references from models in a repository to models in the workspace do not present the same kind of problem of availability as the reverse case.
+
+## <a id="Validating">Validating Models</a>
+
+The **Validate** context menu actions work in repository models just as in workspace models. Annotations are presented in the diagrams and in the **Model Explorer** view. The difference is that validation issues are not shown in the **Problems** view. Instead, they are shown in a new **Model Validation** view:
+
+![Model Validation](validation.png)
+
+The **Model Validation** view supports the usual functions, including:
+
+* double-click navigation to the problem element in the editor
+* copy selected problems to CSV text on the system clipboard
+* delete problems
+
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/discovery_dialog.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/discovery_dialog.png
new file mode 100755
index 00000000..1f108070
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/discovery_dialog.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/importmodels.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/importmodels.png
new file mode 100755
index 00000000..ff58c068
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/importmodels.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/modelreposview.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/modelreposview.png
new file mode 100755
index 00000000..ab8f1166
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/modelreposview.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/validation.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/validation.png
new file mode 100755
index 00000000..dcd75855
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/start/validation.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/cdo-team.markdown b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/cdo-team.markdown
new file mode 100755
index 00000000..4a4ae0ea
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/cdo-team.markdown
@@ -0,0 +1,28 @@
+# Sharing Models with a Team
+One purpose of keeping Papyrus models in a CDO model repository is to share them with a team and enjoy the benefits of real-time collaboration that CDO offers. However, this entails certain consequences that need to be accounted for in the workflow.
+
+## <a id="Locking">Locking Objects</a>
+The context menu in both the **Model Explorer** view and the diagrams has actions for locking and unlocking objects. Locking a model element reserves it for the exclusive use of the editor that has it locked. Other users connected to the same repository cannot edit it. Locking an element in a diagram locks not only the model element, but also the view of it in the diagram.
+
+An object locked by you shows a key decoration. To lock an element, use the **Locks/Conflicts &rarr; Lock** context menu action:
+
+![A locally locked element](locked.png)
+
+To unlock an object once you have finished editing it and saved the model, use the **Locks/Conflicts &rarr; Unlock** context menu action. Locks are also automatically released when the editor that holds them is closed.
+
+When another user has locked an element, the editor shows a lock decoration:
+
+![A remotely locked element](remotely_locked.png)
+
+Note that in this case, the element cannot be edited: the **Properties** view is disabled and the diagram editor does not show the selection handles.
+
+## <a id="Conflicts">Handling Conflicts</a>
+CDO is a real-time collaborative editing platform. When other users save changes they have made in models that are open in your Papyrus workbench, the repository server pushes those changes into your editors. You see those changes in real time. There is no "synchronize" step as with Git or Subversion source control.
+
+Most changes saved by other users will be in different model elements and diagram views than those in which you have unsaved changes. These do not present a problem. However, the repository may push changes in objects that you *have* edited and have not yet saved. Many of these changes, too, are automatically merged by Papyrus: changes to features of an object that you have not modified and certain changes in multi-valued features can be merged automatically. Other changes leave the objects that you have edited in a state of conflict. This is indicated by a decoration in the diagrams and the **Model Explorer** view:
+
+![Conflicting changes](conflict.png)
+
+Papyrus cannot automatically resolve these conflicts by merging the incoming changes from the repository with the changes made in your editor. They require manual intervention to resolve.
+
+On an object that shows conflict, invoke the **Locks/Conflicts &rarr; Resolve Conflicts** context menu action. In the current release, the only strategy available is to rollback the editor's unsaved changes, leaving only the changes pushed by the server from other users. Future releases will add more options, such as an interactive graphical merge. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/conflict.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/conflict.png
new file mode 100755
index 00000000..781acd47
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/conflict.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/locked.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/locked.png
new file mode 100755
index 00000000..bf2133dd
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/locked.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/remotely_locked.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/remotely_locked.png
new file mode 100755
index 00000000..46ec3aeb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.doc/resource/team/remotely_locked.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.project b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.project
new file mode 100755
index 00000000..22e4270d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.ui.hyperlink</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/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.core.resources.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000..11831457
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//model/repositories.ecore=UTF-8
+encoding//model/repositories.ecorediag=UTF-8
+encoding//src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/messages.properties=ISO-8859-1
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..94d61f00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..e537508b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.cdo.internal.ui.hyperlink;x-internal:=true
+Require-Bundle: org.eclipse.ui;bundle-version="3.105.0",
+ org.eclipse.core.runtime;bundle-version="3.9.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.hyperlink;bundle-version="1.2.0",
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.common.core;bundle-version="[1.7.0,
+ 2.0.0)",
+ org.eclipse.gmf.runtime.notation;bundle-version="[1.7.0,
+ 2.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.7.0,
+ 2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ com.google.guava;bundle-version="11.0.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.cdo.internal.ui.hyperlink.Activator
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.ui.hyperlink;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/build.properties
new file mode 100755
index 00000000..ac5f4de5
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml,\
+ icons/
+src.includes = about.html
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/icons/full/obj16/document.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/icons/full/obj16/document.png
new file mode 100755
index 00000000..8014cafa
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/icons/full/obj16/document.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/plugin.properties
new file mode 100755
index 00000000..5900e440
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/plugin.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+pluginName = Papyrus CDO Document Hyperlink Support (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Provides primarily hyperlink creation, navigation, and drag-and-drop support for diagrams and resources in CDO repositories. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/plugin.xml
new file mode 100755
index 00000000..9cbc305f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/plugin.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.hyperlink.registration">
+ <hyperlink
+ helper="org.eclipse.papyrus.cdo.internal.ui.hyperlink.CDOResourceHyperlinkHelper"
+ position="110">
+ </hyperlink>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
+ <!-- Priority 35 is higher than the core's priority-40 label provider for the same type. -->
+ <labelProvider
+ priority="35"
+ provider="org.eclipse.papyrus.cdo.internal.ui.hyperlink.CDOResourceHyperlinkLabelProvider">
+ </labelProvider>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.dnd.dropStrategy">
+ <strategy
+ strategy="org.eclipse.papyrus.cdo.internal.ui.hyperlink.CDOResourceURIDropStrategy">
+ </strategy>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/pom.xml
new file mode 100755
index 00000000..a3b25737
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.ui.hyperlink</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/Activator.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/Activator.java
new file mode 100755
index 00000000..4dae4feb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/Activator.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.ui.hyperlink"; //$NON-NLS-1$
+
+ public static final String IMG_DOCUMENT = "$nl$/icons/full/obj16/document.png"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ super();
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the log helper
+ log.setPlugin(plugin);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ log = null;
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOHyperlinkConstants.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOHyperlinkConstants.java
new file mode 100755
index 00000000..b8ce3604
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOHyperlinkConstants.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkConstants;
+
+
+/**
+ * This is the CDOHyperlinkConstants type. Enjoy.
+ */
+public final class CDOHyperlinkConstants {
+
+ public static final String HYPERLINK_ANNOTATION_SOURCE = HyperLinkConstants.PAPYRUS_HYPERLINK_PREFIX + "CDO_resource"; //$NON-NLS-1$
+
+ public static final String HYPERLINK_DETAIL_URI = "uri"; //$NON-NLS-1$
+
+ /**
+ * Not instantiable by clients.
+ */
+ private CDOHyperlinkConstants() {
+ super();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlink.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlink.java
new file mode 100755
index 00000000..ab2e0427
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlink.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA LIST) - adapted for CDO repository resource hyperlinks
+ * Christian W. Damus (CEA) - adapt to source-incompatible API change in CDO Luna M6
+ * Eike Stepper (CEA) - bug 466520
+ * Christian W. Damus - bug 488965
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import java.util.List;
+
+import org.eclipse.emf.cdo.eresource.CDOFileResource;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.eresource.util.EresourceSwitch;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.ui.checkouts.CDOCheckoutContentProvider;
+import org.eclipse.emf.cdo.explorer.ui.checkouts.actions.OpenWithActionProvider;
+import org.eclipse.emf.cdo.ui.CDOEditorUtil;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.net4j.util.ui.UIUtil;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.ui.editors.PapyrusCDOEditorOpener;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIResourceQuery;
+import org.eclipse.papyrus.infra.hyperlink.Activator;
+import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkObject;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The hyperlink abstraction for links to documents in CDO repositories.
+ */
+public class CDOResourceHyperlink extends HyperLinkObject {
+
+ /**
+ * Gets the hyperlinked resource URI.
+ *
+ * @return the hyperlinked resource URI
+ */
+ public URI getHyperlink() {
+ return (URI) super.getObject();
+ }
+
+ /**
+ * Sets the hyperlinked resource URI.
+ *
+ * @param uri
+ * the new hyperlinked resource URI
+ */
+ public void setHyperlink(URI uri) {
+ super.setObject(uri);
+ }
+
+ @Override
+ public void openLink() {
+ try {
+ // open the appropriate editor
+ URI uri = getHyperlink();
+
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(uri);
+ if (checkout == null) {
+ MessageDialog.openError(UIUtil.getActiveWorkbenchWindow().getShell(), Messages.CDOResourceHyperlink_openError, Messages.CDOResourceHyperlink_notConnected);
+ } else if (!checkout.isOpen()) {
+ checkout.open();
+ if (!checkout.isOpen()) {
+ MessageDialog.openError(UIUtil.getActiveWorkbenchWindow().getShell(), Messages.CDOResourceHyperlink_openError, Messages.CDOResourceHyperlink_notConnected);
+ }
+ }
+
+ // we may have connected a previously disconnected repo, above
+ if ((checkout != null) && checkout.isOpen()) {
+ CDOView master = checkout.getView();
+
+ String path = CDOURIUtil.extractResourcePath(uri);
+ if (!master.hasResource(path)) {
+ MessageDialog.openError(UIUtil.getActiveWorkbenchWindow().getShell(), Messages.CDOResourceHyperlink_openError, NLS.bind(Messages.CDOResourceHyperlink_noSuchResource, path));
+ } else {
+ CDOResourceNode node = master.getResourceNode(path);
+ openResource(node);
+ }
+ }
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+ }
+
+ protected void openResource(CDOResourceNode node) {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ final IWorkbenchPage page = window.getActivePage();
+
+ new EresourceSwitch<Void>() {
+
+ @Override
+ public <IO> Void caseCDOFileResource(CDOFileResource<IO> object) {
+ CDOEditorUtil.openEditor(page, object);
+ return null;
+ }
+
+ @Override
+ public Void caseCDOResource(CDOResource object) {
+ if (object.isRoot()) {
+ // the root resource is a proxy for the repository
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(object.getURI());
+ CDOCheckoutContentProvider contentProvider = CDOCheckoutContentProvider.getInstance(CDOCheckoutContentProvider.PROJECT_EXPLORER_ID);
+ if (contentProvider != null) {
+ // TODO Open project explorer on demand.
+ contentProvider.selectObjects(checkout);
+ }
+ } else {
+ CDOResource diResource = DIResourceQuery.getAffiliateResource(object);
+
+ if (diResource == null) {
+ // open regular CDO model resource
+ OpenWithActionProvider.openEditor(page, null, object, null);
+ } else {
+ // open Papyrus model
+ OpenWithActionProvider.openEditor(page, null, diResource, PapyrusCDOEditorOpener.ID);
+ }
+ }
+
+ return null;
+ }
+ }.doSwitch(node);
+ }
+
+ @Override
+ public void executeEditMousePressed(Shell parentShell, List<HyperLinkObject> list, EObject aModel) {
+ CDOResourceHyperlinkEditorShell editor = new CDOResourceHyperlinkEditorShell(parentShell);
+ editor.setHyperlink(this);
+ if (editor.open() == Window.OK) {
+ int index = list.indexOf(this);
+ list.set(index, editor.getHyperlink());
+ }
+ }
+
+ @Override
+ public boolean needsOpenCommand() {
+ return false;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkEditorShell.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkEditorShell.java
new file mode 100755
index 00000000..4d8d7e40
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkEditorShell.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA LIST) - adapted for CDO repository resource hyperlinks
+ * Eike Stepper (CEA) - bug 466520
+ * Christian W. Damus - bug 488965
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.cdo.internal.ui.dialogs.CheckoutBrowseDialog;
+import org.eclipse.papyrus.infra.hyperlink.ui.AbstractEditHyperlinkShell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+import com.google.common.base.Objects;
+
+/**
+ * The editor shell facade for creation and editing of CDO resource hyperlinks.
+ */
+public class CDOResourceHyperlinkEditorShell extends AbstractEditHyperlinkShell {
+
+ private boolean usedefaultTooltip = true;
+
+ private CDOResourceHyperlink hyperlink;
+
+ /**
+ * Instantiates me.
+ */
+ public CDOResourceHyperlinkEditorShell(Shell parentShell) {
+ super(parentShell, true);
+ }
+
+ public CDOResourceHyperlink getHyperlink() {
+ return hyperlink;
+ }
+
+ public void setHyperlink(CDOResourceHyperlink hyperlink) {
+ this.hyperlink = hyperlink;
+ updateFields();
+ }
+
+ @Override
+ protected void contentsCreated() {
+ // intialize "use default" check box
+ getUseDefaultCheckBox().setSelection(usedefaultTooltip);
+ getObjectLabelText().setEditable(false);
+ if (usedefaultTooltip) {
+ getTooltipInputText().setEditable(false);
+ getTooltipInputText().setText(getObjectLabelText().getText());
+ }
+
+ updateFields();
+ }
+
+ private void updateFields() {
+ if (hyperlink != null) {
+ if (getObjectLabelText() != null) {
+ getObjectLabelText().setText(hyperlink.getHyperlink().toString());
+ }
+ if (getTooltipInputText() != null) {
+ getTooltipInputText().setText(hyperlink.getTooltipText());
+ }
+
+ if ((getObjectLabelText() != null) && (getTooltipInputText() != null)) {
+ usedefaultTooltip = Objects.equal(getObjectLabelText().getText(), getTooltipInputText().getText());
+ getUseDefaultCheckBox().setSelection(usedefaultTooltip);
+ getTooltipInputText().setEditable(!usedefaultTooltip);
+ }
+ }
+ }
+
+ @Override
+ protected void onSearch() {
+ CheckoutBrowseDialog browse = new CheckoutBrowseDialog(getShell(), Messages.CDOResourceHyperlinkEditorShell_title, Messages.CDOResourceHyperlinkEditorShell_message, null, SWT.OPEN);
+ browse.setBlockOnOpen(true);
+
+ String initialURIString = getObjectLabelText().getText().trim();
+ if (!initialURIString.isEmpty()) {
+ browse.setInitialURI(URI.createURI(initialURIString));
+ }
+
+ // select resource nodes of file or model kind, not folders
+ browse.setNodeTypeFilter(EresourcePackage.Literals.CDO_RESOURCE_LEAF);
+
+ if (browse.open() == Window.OK) {
+ URI selected = browse.getSelectedURI();
+ if (selected != null) {
+ getObjectLabelText().setText(selected.toString());
+ }
+
+ if (usedefaultTooltip) {
+ getTooltipInputText().setText(selected.toString());
+ }
+ }
+ }
+
+ @Override
+ protected void onUseDefaultTooltip() {
+ usedefaultTooltip = getUseDefaultCheckBox().getSelection();
+ if (usedefaultTooltip) {
+ getTooltipInputText().setEditable(false);
+ getTooltipInputText().setText(getObjectLabelText().getText());
+ } else {
+ getTooltipInputText().setEditable(true);
+ }
+ }
+
+ @Override
+ protected void cancelPressed() {
+ hyperlink = null;
+ super.cancelPressed();
+ }
+
+ @Override
+ protected void okPressed() {
+ if (hyperlink == null) {
+ hyperlink = new CDOResourceHyperlink();
+ }
+
+ hyperlink.setHyperlink(URI.createURI(getObjectLabelText().getText().trim()));
+ hyperlink.setTooltipText(getTooltipInputText().getText().trim());
+
+ super.okPressed();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkHelper.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkHelper.java
new file mode 100755
index 00000000..a732e860
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkHelper.java
@@ -0,0 +1,125 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA LIST) - adapted for CDO repository resource hyperlinks
+ * Christian W. Damus - bug 488965
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import static com.google.common.base.Predicates.instanceOf;
+import static com.google.common.collect.Iterables.filter;
+
+import java.util.List;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceLeaf;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIModel;
+import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
+import org.eclipse.papyrus.infra.hyperlink.helper.AbstractHyperLinkHelper;
+import org.eclipse.papyrus.infra.hyperlink.helper.IHyperlinkHelperExtension;
+import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkObject;
+import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkConstants;
+import org.eclipse.swt.widgets.Shell;
+
+import com.google.common.collect.ImmutableList;
+
+
+/**
+ * Helper extension for hyperlinks to resources in CDO model repositories.
+ */
+public class CDOResourceHyperlinkHelper extends AbstractHyperLinkHelper implements IHyperlinkHelperExtension {
+
+ @Override
+ public HyperLinkObject getHyperLinkObject(EAnnotation eAnnotation) {
+ CDOResourceHyperlink result = null;
+
+ if (eAnnotation.getSource().equals(CDOHyperlinkConstants.HYPERLINK_ANNOTATION_SOURCE)) {
+ result = new CDOResourceHyperlink();
+ result.setHyperlink(URI.createURI(eAnnotation.getDetails().get(CDOHyperlinkConstants.HYPERLINK_DETAIL_URI)));
+ result.setTooltipText(eAnnotation.getDetails().get(HyperLinkConstants.HYPERLINK_TOOLTYPE_TEXT));
+ if (eAnnotation.getDetails().get(HyperLinkConstants.HYPERLINK_IS_DEFAULT_NAVIGATION) != null) {
+ boolean isDefaultNaviagation = Boolean.parseBoolean(eAnnotation.getDetails().get(HyperLinkConstants.HYPERLINK_IS_DEFAULT_NAVIGATION));
+ result.setIsDefault(isDefaultNaviagation);
+ } else {
+ result.setIsDefault(false);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public RecordingCommand getAddHyperLinkCommand(TransactionalEditingDomain domain, EModelElement object, HyperLinkObject hyperlinkObject) {
+ RecordingCommand result = null;
+
+ if (hyperlinkObject instanceof CDOResourceHyperlink) {
+ CDOResourceHyperlink cdoHyperlink = (CDOResourceHyperlink) hyperlinkObject;
+ result = new CreateCDOResourceHyperlinkCommand(domain, object, cdoHyperlink.getTooltipText(), cdoHyperlink.getHyperlink(), cdoHyperlink.getIsDefault());
+ }
+
+ return result;
+ }
+
+ @Override
+ public String getNameofManagedHyperLink() {
+ return Messages.CDOResourceHyperlinkHelper_name;
+ }
+
+ @Override
+ public void executeNewMousePressed(Shell parentShell, List<HyperLinkObject> list, EObject aModel) {
+ CDOResourceHyperlinkEditorShell editor = new CDOResourceHyperlinkEditorShell(parentShell);
+ if (editor.open() == Window.OK) {
+ list.add(editor.getHyperlink());
+ }
+ }
+
+ @Override
+ public List<HyperLinkObject> getFilteredObject(List<HyperLinkObject> hyperlinkObjects) {
+ return ImmutableList.copyOf(filter(hyperlinkObjects, instanceOf(CDOResourceHyperlink.class)));
+ }
+
+ @Override
+ public Command getCreateHyperlinkCommand(TransactionalEditingDomain domain, EModelElement linkOwner, Object linkTarget) {
+ Command result = null;
+
+ CDOResourceNode node = AdapterUtils.adapt(linkTarget, CDOResourceNode.class, null);
+ if (node instanceof CDOResourceLeaf) {
+ URI uri = node.getURI();
+ String tip = uri.lastSegment();
+
+ if (node instanceof CDOResource) {
+ DIModel di = DIModel.getInstance((CDOResource) node, false);
+ if (di != null) {
+ // it's a DI model. We don't use file extensions with their names
+ tip = di.getName();
+ }
+ }
+
+ // don't navigate CDO documents by default; this is most appropriate for links to diagrams
+ result = new CreateCDOResourceHyperlinkCommand(domain, linkOwner, tip, uri, false);
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkLabelProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkLabelProvider.java
new file mode 100755
index 00000000..5950f2ee
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceHyperlinkLabelProvider.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkFilteredLabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+import com.google.common.base.Strings;
+
+
+/**
+ * This is the CDOResourceHyperlinkLabelProvider type. Enjoy.
+ */
+public class CDOResourceHyperlinkLabelProvider extends HyperLinkFilteredLabelProvider {
+
+ public CDOResourceHyperlinkLabelProvider() {
+ super();
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof CDOResourceHyperlink) {
+ return org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, Activator.IMG_DOCUMENT);
+ }
+
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof CDOResourceHyperlink) {
+ CDOResourceHyperlink hyperlink = (CDOResourceHyperlink) element;
+
+ String tip = hyperlink.getTooltipText();
+ String uri = String.valueOf(hyperlink.getHyperlink());
+
+ String pattern = (Strings.isNullOrEmpty(tip) || uri.equals(tip)) ? Messages.CDOResourceHyperlinkLabelProvider_uriOnly : Messages.CDOResourceHyperlinkLabelProvider_tipAndURI;
+ return NLS.bind(pattern, tip, uri);
+ }
+
+ return super.getText(element);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceURIDropStrategy.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceURIDropStrategy.java
new file mode 100755
index 00000000..a7900b80
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CDOResourceURIDropStrategy.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.cdo.internal.ui.dnd.CDOResourceURITransferData;
+import org.eclipse.papyrus.commands.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.SemanticElementHelper;
+import org.eclipse.papyrus.infra.gmfdiag.dnd.strategy.TransactionalDropStrategy;
+import org.eclipse.swt.graphics.Image;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+
+/**
+ * A drop strategy that extracts URIs of CDO resources from an Ecore representation of a {@link CDOResourceURITransferData} to create hyperlinks.
+ */
+public class CDOResourceURIDropStrategy extends TransactionalDropStrategy {
+
+ private static final String ID = Activator.PLUGIN_ID + ".cdoResourceURI"; //$NON-NLS-1$
+
+ public CDOResourceURIDropStrategy() {
+ super();
+ }
+
+ @Override
+ public String getLabel() {
+ return Messages.DropStrategy_label;
+ }
+
+ @Override
+ public String getDescription() {
+ return Messages.DropStrategy_desc;
+ }
+
+ @Override
+ public Image getImage() {
+ return null;
+ }
+
+ @Override
+ public String getID() {
+ return ID;
+ }
+
+ @Override
+ public int getPriority() {
+ return 0;
+ }
+
+ @Override
+ protected Command doGetCommand(Request request, EditPart targetEditPart) {
+ if (request instanceof DropObjectsRequest) {
+ View view = getTargetView(targetEditPart);
+ if (view == null) {
+ return null;
+ }
+
+ final View mainView = SemanticElementHelper.findPrimaryView(view);
+ if (mainView instanceof Diagram) {
+ // don't create hyperlinks on the diagram surface
+ return null;
+ }
+
+ final DropObjectsRequest dropRequest = (DropObjectsRequest) request;
+ List<URI> hyperlinkURIs = null;
+
+ for (EObject next : Iterables.filter(dropRequest.getObjects(), EObject.class)) {
+ if (CDOResourceURITransferData.isCDOResourceURITransferData(next)) {
+ if (hyperlinkURIs == null) {
+ hyperlinkURIs = Lists.newArrayListWithCapacity(dropRequest.getObjects().size());
+ }
+ hyperlinkURIs.addAll(CDOResourceURITransferData.fromEObject(next).getURIs());
+ }
+ }
+
+ if (hyperlinkURIs != null) {
+ final TransactionalEditingDomain domain = getTransactionalEditingDomain(targetEditPart);
+
+ final List<URI> _hyperlinkURIs = hyperlinkURIs;
+ return new Command() {
+
+ @Override
+ public void execute() {
+ for (URI next : _hyperlinkURIs) {
+ new CreateCDOResourceHyperlinkCommand(domain, mainView, next.lastSegment(), next, false).execute();
+ }
+ }
+ };
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CreateCDOResourceHyperlinkCommand.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CreateCDOResourceHyperlinkCommand.java
new file mode 100755
index 00000000..1b30c5cc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/CreateCDOResourceHyperlinkCommand.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2017 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA LIST) - adapted for CDO repository resource hyperlinks
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
+import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkConstants;
+
+
+/**
+ * A command that creates hyperlinks in the model to resources in a CDO repository.
+ */
+public class CreateCDOResourceHyperlinkCommand extends CreateEAnnotationCommand {
+
+ private final String tooltipText;
+
+ private final URI resourceURI;
+
+ private final boolean isDefault;
+
+ /**
+ * Instantiates a new creates the hyper link command.
+ *
+ * @param domain
+ * the editing domain in which to create the command
+ * @param object
+ * the object to which to attach the hyperlink
+ * @param tooltipText
+ * the hyperlink's user-friendly tooltip text
+ * @param resourceURI
+ * the URI of the resource that is the hyperlink target
+ * @param isDefault
+ * to set this hyperlink as default
+ */
+ public CreateCDOResourceHyperlinkCommand(TransactionalEditingDomain domain, EModelElement object, String tooltipText, URI resourceURI, boolean isDefault) {
+ super(domain, object, CDOHyperlinkConstants.HYPERLINK_ANNOTATION_SOURCE);
+ this.tooltipText = tooltipText;
+ this.resourceURI = resourceURI;
+ this.isDefault = isDefault;
+ }
+
+ @Override
+ protected void doExecute() {
+ EAnnotation eAnnotation = createEAnnotation();
+ eAnnotation.getDetails().put(HyperLinkConstants.HYPERLINK_TOOLTYPE_TEXT, tooltipText);
+ eAnnotation.getDetails().put(CDOHyperlinkConstants.HYPERLINK_DETAIL_URI, resourceURI.toString());
+ eAnnotation.getDetails().put(HyperLinkConstants.HYPERLINK_IS_DEFAULT_NAVIGATION, Boolean.toString(isDefault));
+ attachEannotation(eAnnotation, getObject());
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/Messages.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/Messages.java
new file mode 100755
index 00000000..a8e9cf3c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/Messages.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.hyperlink;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This is the Messages type. Enjoy.
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.cdo.internal.ui.hyperlink.messages"; //$NON-NLS-1$
+
+ public static String CDOResourceHyperlink_noSuchResource;
+
+ public static String CDOResourceHyperlink_notConnected;
+
+ public static String CDOResourceHyperlink_openError;
+
+ public static String CDOResourceHyperlinkEditorShell_message;
+
+ public static String CDOResourceHyperlinkEditorShell_title;
+
+ public static String CDOResourceHyperlinkHelper_name;
+ public static String CDOResourceHyperlinkLabelProvider_tipAndURI;
+
+ public static String CDOResourceHyperlinkLabelProvider_uriOnly;
+ public static String DropStrategy_desc;
+
+ public static String DropStrategy_label;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/messages.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/messages.properties
new file mode 100755
index 00000000..47e4a214
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui.hyperlink/src/org/eclipse/papyrus/cdo/internal/ui/hyperlink/messages.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+CDOResourceHyperlink_noSuchResource=The CDO checkout referenced by this hyperlink has no resource "{0}".
+CDOResourceHyperlink_notConnected=The CDO checkout referenced by this hyperlink is not open.
+CDOResourceHyperlink_openError=Open Hyperlink
+CDOResourceHyperlinkEditorShell_message=Select a model or document resource to link.
+CDOResourceHyperlinkEditorShell_title=Browse Model Repository
+CDOResourceHyperlinkHelper_name=Document in CDO checkout
+CDOResourceHyperlinkLabelProvider_tipAndURI={0} - {1}
+CDOResourceHyperlinkLabelProvider_uriOnly={1}
+DropStrategy_desc=Create hyperlinks in a diagram to documents in model repositories
+DropStrategy_label=Create hyperlinks
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.classpath
new file mode 100755
index 00000000..25d360ef
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/.project b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.project
new file mode 100755
index 00000000..e78851d5
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.ui</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/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.core.resources.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000..c2dc252d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//model/DND.ecore=UTF-8
+encoding//model/DND.ecorediag=UTF-8
+encoding//src/org/eclipse/papyrus/cdo/internal/ui/l10n/messages.properties=ISO-8859-1
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..94d61f00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..4df32df1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,67 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.cdo.internal.ui;x-friends:="org.eclipse.papyrus.cdo.ui.tests,
+ org.eclipse.papyrus.cdo.uml.ui",
+ org.eclipse.papyrus.cdo.internal.ui.adapters;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
+ org.eclipse.papyrus.cdo.internal.ui.decorators;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
+ org.eclipse.papyrus.cdo.internal.ui.dialogs;x-friends:="org.eclipse.papyrus.cdo.ui.tests,
+ org.eclipse.papyrus.cdo.ui.customization.properties,
+ org.eclipse.papyrus.cdo.ui.hyperlink",
+ org.eclipse.papyrus.cdo.internal.ui.dnd;x-friends:="org.eclipse.papyrus.cdo.ui.hyperlink,
+ org.eclipse.papyrus.cdo.ui.tests",
+ org.eclipse.papyrus.cdo.internal.ui.editors;x-friends:="org.eclipse.papyrus.cdo.ui.tests,
+ org.eclipse.papyrus.cdo.uml.search.ui,
+ org.eclipse.papyrus.cdo.ui.hyperlink",
+ org.eclipse.papyrus.cdo.internal.ui.expressions;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
+ org.eclipse.papyrus.cdo.internal.ui.handlers;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
+ org.eclipse.papyrus.cdo.internal.ui.l10n;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.ui.markers;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
+ org.eclipse.papyrus.cdo.internal.ui.providers;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
+ org.eclipse.papyrus.cdo.internal.ui.util;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
+ org.eclipse.papyrus.cdo.internal.ui.views; x-friends:="org.eclipse.papyrus.cdo.ui.tests,
+ org.eclipse.papyrus.cdo.uml.diagram.ui,
+ org.eclipse.papyrus.cdo.uml.ui,
+ org.eclipse.papyrus.cdo.uml.ui.tests,
+ org.eclipse.papyrus.cdo.ui.hyperlink",
+ org.eclipse.papyrus.cdo.internal.ui.widgets;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.ui.wizards;x-friends:="org.eclipse.papyrus.cdo.ui.tests,
+ org.eclipse.papyrus.cdo.uml.diagram.ui,
+ org.eclipse.papyrus.cdo.ui.customization.properties"
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.ui.ide;bundle-version="[3.8.0,4.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.ui.workbench,
+ org.eclipse.papyrus.cdo.core;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.emf.cdo.ui;bundle-version="[4.3.0,5.0.0)";visibility:=reexport,
+ org.eclipse.emf.cdo.explorer.ui;bundle-version="[4.3.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.cdo.dawn.gmf;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.emf.cdo.dawn.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.onefile;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.validation.problems;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.validation.problems.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.2.0",
+ org.eclipse.ui.navigator;bundle-version="3.5.300",
+ org.eclipse.emf.cdo.ui.admin;bundle-version="[4.1.200,5.0.0)",
+ org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.onefile.ui;bundle-version="1.2.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.cdo.internal.ui.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.ui/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui/build.properties
new file mode 100755
index 00000000..eee5432b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/build.properties
@@ -0,0 +1,27 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ icons/,\
+ about.html,\
+ model/
+bin.excludes = icons/**/*.pxm,\
+ model/*.ecorediag
+src.includes = about.html,\
+ schema/
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/add_repo.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/add_repo.gif
new file mode 100755
index 00000000..7fd983bc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/add_repo.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/add_repo.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/add_repo.pxm
new file mode 100755
index 00000000..29e89b65
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/add_repo.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/link_editor.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/link_editor.gif
new file mode 100755
index 00000000..870934b6
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ctool16/link_editor.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/connect_co.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/connect_co.gif
new file mode 100755
index 00000000..2bc98a38
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/connect_co.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/connect_co.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/connect_co.pxm
new file mode 100755
index 00000000..a785bfa3
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/connect_co.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/disconnect_co.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/disconnect_co.gif
new file mode 100755
index 00000000..587f8c98
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/dlcl16/disconnect_co.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/connect_co.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/connect_co.gif
new file mode 100755
index 00000000..a028be50
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/connect_co.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/connect_co.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/connect_co.pxm
new file mode 100755
index 00000000..4e8b0646
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/connect_co.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/disconnect_co.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/disconnect_co.gif
new file mode 100755
index 00000000..d8fdd8a0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/disconnect_co.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/newfolder_co.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/newfolder_co.gif
new file mode 100755
index 00000000..6fb9345b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/elcl16/newfolder_co.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/papyrus_model.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/papyrus_model.gif
new file mode 100755
index 00000000..55aa23df
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/papyrus_model.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_closed.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_closed.gif
new file mode 100755
index 00000000..f92c6421
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_closed.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_closed.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_closed.pxm
new file mode 100755
index 00000000..1ba54dad
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_closed.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_open.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_open.gif
new file mode 100755
index 00000000..68639529
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/obj16/repo_open.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/conflicted.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/conflicted.gif
new file mode 100755
index 00000000..874d6613
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/conflicted.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/dependent.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/dependent.gif
new file mode 100755
index 00000000..9ae7df1e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/dependent.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/dependent.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/dependent.pxm
new file mode 100755
index 00000000..53ee535d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/dependent.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/other_locked.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/other_locked.gif
new file mode 100755
index 00000000..0cc1dac5
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/other_locked.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/self_locked.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/self_locked.gif
new file mode 100755
index 00000000..3b2797b1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr16/self_locked.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/conflicted.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/conflicted.gif
new file mode 100755
index 00000000..b82a28db
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/conflicted.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/conflicted.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/conflicted.pxm
new file mode 100755
index 00000000..5e5c6062
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/conflicted.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/other_locked.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/other_locked.gif
new file mode 100755
index 00000000..91dfb987
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/other_locked.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/other_locked.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/other_locked.pxm
new file mode 100755
index 00000000..693787ea
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/other_locked.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/self_locked.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/self_locked.gif
new file mode 100755
index 00000000..b958b688
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/self_locked.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/self_locked.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/self_locked.pxm
new file mode 100755
index 00000000..998ff2cf
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/ovr24/self_locked.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/view16/model_repositories.gif b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/view16/model_repositories.gif
new file mode 100755
index 00000000..68639529
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/view16/model_repositories.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/view16/model_repositories.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/view16/model_repositories.pxm
new file mode 100755
index 00000000..8b2e5da0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/view16/model_repositories.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/wizban/Papyrus_CDO.png b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/wizban/Papyrus_CDO.png
new file mode 100755
index 00000000..a14b170e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/wizban/Papyrus_CDO.png
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/wizban/Papyrus_CDO.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/wizban/Papyrus_CDO.pxm
new file mode 100755
index 00000000..2f1dd77b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/icons/full/wizban/Papyrus_CDO.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/model/DND.ecore b/cdo/bundles/org.eclipse.papyrus.cdo.ui/model/DND.ecore
new file mode 100755
index 00000000..d099ac14
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/model/DND.ecore
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="dnd" nsURI="http://www.eclipse.org/papyrus/1.0.0/cdo/private/dnd"
+ nsPrefix="dnd">
+ <eClassifiers xsi:type="ecore:EClass" name="CDOResourceURITransferData">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="resourceURIs" upperBound="-1"
+ eType="#//URI"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="URI" instanceClassName="org.eclipse.emf.common.util.URI"/>
+</ecore:EPackage>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/model/DND.ecorediag b/cdo/bundles/org.eclipse.papyrus.cdo.ui/model/DND.ecorediag
new file mode 100755
index 00000000..a04675ec
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/model/DND.ecorediag
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_yFGb0CVbEeOe3PUVH5W0Qg" type="EcoreTools" name="DND" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_AjafgCVcEeOe3PUVH5W0Qg" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_Ajc7wCVcEeOe3PUVH5W0Qg" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_AjeJ4CVcEeOe3PUVH5W0Qg" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_Gq1wwCVcEeOe3PUVH5W0Qg" type="2001">
+ <element xmi:type="ecore:EAttribute" href="DND.ecore#//CDOResourceURITransferData/resourceURIs"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Gq1wwSVcEeOe3PUVH5W0Qg"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_AjeJ4SVcEeOe3PUVH5W0Qg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_AjeJ4iVcEeOe3PUVH5W0Qg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_AjeJ4yVcEeOe3PUVH5W0Qg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Ajew8CVcEeOe3PUVH5W0Qg" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Ajew8SVcEeOe3PUVH5W0Qg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Ajew8iVcEeOe3PUVH5W0Qg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Ajew8yVcEeOe3PUVH5W0Qg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_AjafgSVcEeOe3PUVH5W0Qg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="DND.ecore#//CDOResourceURITransferData"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AjafgiVcEeOe3PUVH5W0Qg" x="41" y="106"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N4TdACVcEeOe3PUVH5W0Qg" type="1004">
+ <children xmi:type="notation:Node" xmi:id="_N4UEECVcEeOe3PUVH5W0Qg" type="4008"/>
+ <children xmi:type="notation:Node" xmi:id="_N4UrICVcEeOe3PUVH5W0Qg" type="4009"/>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N4TdASVcEeOe3PUVH5W0Qg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EDataType" href="DND.ecore#//URI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N4TdAiVcEeOe3PUVH5W0Qg" x="360" y="108"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_yFGb0SVbEeOe3PUVH5W0Qg"/>
+ <element xmi:type="ecore:EPackage" href="DND.ecore#/"/>
+</notation:Diagram>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui/plugin.properties
new file mode 100755
index 00000000..f3ca391a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/plugin.properties
@@ -0,0 +1,38 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+pluginName = Papyrus CDO Model Repository UI (Incubation)
+providerName = Eclipse Modeling Project
+
+reposView.name = Model Repositories
+repoPropertyPage.name = CDO Repository Connection
+cdoDecorator.label = CDO State Decorations
+cdoDecorator.description = Decorates elements in Papyrus model repositories with CDO lock and conflict states.
+locksMenu.label = Locks/Conflicts
+lockCommand.label = Lock
+unlockCommand.label = Unlock
+resolveCommand.label = Resolve Conflicts
+importCommand.label = Import into Repository...
+exportCommand.label = Export to Workspace...
+lockCommand.name = Lock objects
+unlockCommand.name = Unlock objects
+resolveCommand.name = Resolve conflicts
+importCommand.name = Import Models into Repository
+exportCommand.name = Export Model to Workspace
+navigatorDropContent.name = Papyrus Model Repository Content
+repoFiltersExtPt.name = Model Repository Item Provider Filters
+openInModelRepositoriesCommand.label = Open in Model Repositories
+openInModelRepositoriesCommand.name = Open in Model Repositories View
+
+pluginDescription=The main UI components (views, editors) for CDO integration in the Papyrus modeler workbench. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui/plugin.xml
new file mode 100755
index 00000000..25f52c96
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/plugin.xml
@@ -0,0 +1,406 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+
+<!--
+ Copyright (c) 2013, 2017 CEA LIST and others.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ Christian W. Damus (CEA) - bug 386118
+
+-->
+
+<plugin>
+ <extension-point id="repositoryFilters" name="%repoFiltersExtPt.name" schema="schema/repositoryFilters.exsd"/>
+ <extension
+ point="org.eclipse.papyrus.infra.core.service">
+ <serviceFactory
+ classname="org.eclipse.papyrus.cdo.internal.ui.editors.DawnGraphicalEditorSupportServiceFactory"
+ description="The Dawn-based CDO-aware diagram editor support implementation."
+ id="org.eclipse.papyrus.infra.gmfdiag.common.IGraphicalEditorSupport"
+ priority="10"
+ startKind="lazy">
+ </serviceFactory>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.ui.IEditorPart"
+ class="org.eclipse.papyrus.cdo.internal.ui.adapters.EditorAdapterFactory">
+ <adapter
+ type="org.eclipse.emf.cdo.dawn.editors.IDawnEditor">
+ </adapter>
+ </factory>
+ </extension>
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.papyrus.infra.core.perspective">
+ <viewShortcut
+ id="org.eclipse.emf.cdo.explorer.ui.CDORepositoriesView">
+ </viewShortcut>
+ <view
+ id="org.eclipse.emf.cdo.explorer.ui.CDORepositoriesView"
+ minimized="false"
+ relationship="stack"
+ relative="org.eclipse.ui.navigator.ProjectExplorer">
+ </view>
+ </perspectiveExtension>
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.cdo.dawn.elementstylizerfactory">
+ <DawnElementStylizerFactory
+ factory="org.eclipse.papyrus.cdo.internal.ui.decorators.PapyrusElementStylizerFactory"
+ priority="2 - Low">
+ </DawnElementStylizerFactory>
+ </extension>
+
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <decoratorProvider
+ class="org.eclipse.papyrus.cdo.internal.ui.decorators.DiagramDecoratorProvider">
+ <Priority
+ name="Low">
+ </Priority>
+ </decoratorProvider>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.decorators">
+ <decorator
+ class="org.eclipse.papyrus.cdo.internal.ui.decorators.CDOStateLabelDecorator"
+ id="org.eclipse.papyrus.cdo.ui.cdoStateDecorator"
+ label="%cdoDecorator.label"
+ state="true">
+ <description>
+ %cdoDecorator.description
+ </description>
+ <enablement>
+ <or>
+ <objectClass
+ name="org.eclipse.emf.ecore.EObject">
+ </objectClass>
+ <objectClass
+ name="org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement">
+ </objectClass>
+ </or>
+ </enablement>
+ </decorator>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+ <menu
+ label="%locksMenu.label">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ <with variable="selection">
+ <iterate ifEmpty="false" operator="and">
+ <adapt type="org.eclipse.emf.cdo.CDOObject" />
+ </iterate>
+ </with>
+ </and>
+ </visibleWhen>
+ <command
+ commandId="org.eclipse.papyrus.cdo.ui.commands.lock"
+ label="%lockCommand.label">
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.cdo.ui.commands.unlock"
+ label="%unlockCommand.label">
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.cdo.ui.commands.resolveConflicts"
+ label="%resolveCommand.label">
+ </command>
+ </menu>
+ </menuContribution>
+ <menuContribution
+ locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+ <command
+ commandId="org.eclipse.papyrus.cdo.ui.commands.importModels"
+ label="%importCommand.label">
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.cdo.ui.commands.openInModelRepositories"
+ label="%openInModelRepositoriesCommand.label"
+ icon="$nl$/icons/full/view16/model_repositories.gif">
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ locationURI="popup:org.eclipse.papyrus.cdo.ui.ModelRepositoriesView?after=additions">
+ <command
+ commandId="org.eclipse.papyrus.cdo.ui.commands.exportModel"
+ label="%exportCommand.label">
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.eclipse.papyrus.cdo.ui.commands.lock"
+ name="%lockCommand.name">
+ </command>
+ <command
+ id="org.eclipse.papyrus.cdo.ui.commands.unlock"
+ name="%unlockCommand.name">
+ </command>
+ <command
+ id="org.eclipse.papyrus.cdo.ui.commands.resolveConflicts"
+ name="%resolveCommand.name">
+ </command>
+ <command
+ id="org.eclipse.papyrus.cdo.ui.commands.importModels"
+ name="%importCommand.name">
+ </command>
+ <command
+ id="org.eclipse.papyrus.cdo.ui.commands.exportModel"
+ name="%exportCommand.name">
+ </command>
+ <command
+ id="org.eclipse.papyrus.cdo.ui.commands.openInModelRepositories"
+ name="%openInModelRepositoriesCommand.name">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.cdo.internal.ui.handlers.LockObjectsHandler"
+ commandId="org.eclipse.papyrus.cdo.ui.commands.lock">
+ <enabledWhen>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.emf.cdo.CDOObject">
+ <test
+ property="org.eclipse.papyrus.cdo.ui.canLock">
+ </test>
+ </adapt>
+ </iterate>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.cdo.internal.ui.handlers.UnlockObjectsHandler"
+ commandId="org.eclipse.papyrus.cdo.ui.commands.unlock">
+ <enabledWhen>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.emf.cdo.CDOObject">
+ <test
+ property="org.eclipse.papyrus.cdo.ui.isLockedLocally" >
+ </test>
+ </adapt>
+ </iterate>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.cdo.internal.ui.handlers.ResolveConflictsHandler"
+ commandId="org.eclipse.papyrus.cdo.ui.commands.resolveConflicts">
+ <enabledWhen>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.emf.cdo.CDOObject">
+ <test
+ property="org.eclipse.papyrus.cdo.ui.isConflicted">
+ </test>
+ </adapt>
+ </iterate>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.cdo.internal.ui.handlers.ImportModelsHandler"
+ commandId="org.eclipse.papyrus.cdo.ui.commands.importModels">
+ <enabledWhen>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.papyrus.infra.onefile.model.IPapyrusFile">
+ </adapt>
+ </iterate>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.cdo.internal.ui.handlers.ExportModelHandler"
+ commandId="org.eclipse.papyrus.cdo.ui.commands.exportModel">
+ <enabledWhen>
+ <iterate operator="and" ifEmpty="false">
+ <instanceof
+ value="org.eclipse.papyrus.cdo.internal.ui.views.DIModel">
+ </instanceof>
+ </iterate>
+ </enabledWhen>
+ </handler>
+ <!--
+ <handler
+ class="org.eclipse.papyrus.cdo.internal.ui.handlers.OpenInModelRepositoriesViewHandler"
+ commandId="org.eclipse.papyrus.cdo.ui.commands.openInModelRepositories">
+ <enabledWhen>
+ <with variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate operator="and">
+ <adapt
+ type="org.eclipse.emf.cdo.admin.CDOAdminClientRepository">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ -->
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.gef.EditPart"
+ class="org.eclipse.papyrus.cdo.internal.ui.adapters.CDOAdapterFactory">
+ <adapter
+ type="org.eclipse.emf.cdo.CDOObject">
+ </adapter>
+ <adapter
+ type="org.eclipse.emf.cdo.view.CDOView">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement"
+ class="org.eclipse.papyrus.cdo.internal.ui.adapters.CDOAdapterFactory">
+ <adapter
+ type="org.eclipse.emf.cdo.CDOObject">
+ </adapter>
+ <adapter
+ type="org.eclipse.emf.cdo.view.CDOView">
+ </adapter>
+ </factory>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.cdo.internal.ui.expressions.CDOObjectPropertyTester"
+ id="org.eclipse.papyrus.cdo.ui.cdoObjectTester"
+ namespace="org.eclipse.papyrus.cdo.ui"
+ properties="canLock,isLockedLocally,isLockedRemotely,isConflicted"
+ type="org.eclipse.emf.cdo.CDOObject">
+ </propertyTester>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.services.markerlistener.markerproviders">
+ <provider
+ class="org.eclipse.papyrus.cdo.internal.ui.markers.CDOMarkerProvider">
+ <enablement>
+ <instanceof
+ value="org.eclipse.emf.cdo.eresource.CDOResource">
+ </instanceof>
+ </enablement>
+ </provider>
+ <monitor class="org.eclipse.papyrus.cdo.internal.ui.markers.CDOMarkerMonitor">
+ </monitor>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.dropActions">
+ <action
+ class="org.eclipse.papyrus.cdo.internal.ui.dnd.ResourceDropActionDelegate"
+ id="org.eclipse.papyrus.cdo.ui.modelDropAction">
+ </action>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
+ <labelProvider
+ priority="255"
+ provider="org.eclipse.papyrus.cdo.internal.ui.providers.CDOResourceLabelProvider">
+ </labelProvider>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.papyrus.cdo.core.resource.CDOAwareModelSet"
+ class="org.eclipse.papyrus.cdo.internal.ui.dialogs.CreateCDOModelFragmentDialog$AdapterFactory">
+ <adapter
+ type="org.eclipse.papyrus.infra.services.controlmode.ui.IControlModeFragmentDialogProvider">
+ </adapter>
+ </factory>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ contentProvider="org.eclipse.papyrus.cdo.internal.ui.dnd.ResourceDropAdapterAssistant$DummyContent"
+ id="org.eclipse.papyrus.cdo.ui.navigatorResourceDropAssistant"
+ name="%navigatorDropContent.name"
+ icon="$nl$/icons/full/view16/model_repositories.gif"
+ priority="high">
+ <dropAssistant
+ class="org.eclipse.papyrus.cdo.internal.ui.dnd.ResourceDropAdapterAssistant"
+ id="org.eclipse.papyrus.cdo.ui.resourceDropAssistant">
+ <possibleDropTargets>
+ <instanceof
+ value="org.eclipse.core.resources.IContainer">
+ </instanceof>
+ </possibleDropTargets>
+ </dropAssistant>
+ <possibleChildren>
+ <adapt
+ type="org.eclipse.papyrus.cdo.internal.ui.views.DIModel">
+ </adapt>
+ </possibleChildren>
+ <triggerPoints>
+ <instanceof
+ value="org.eclipse.core.resources.IContainer">
+ </instanceof>
+ </triggerPoints>
+ </navigatorContent>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <contentExtension
+ pattern="org.eclipse.papyrus.cdo.ui.navigatorResourceDropAssistant">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+ <extension
+ point="org.eclipse.emf.ecore.dynamic_package">
+ <resource
+ location="model/DND.ecore"
+ uri="http://www.eclipse.org/papyrus/1.0.0/cdo/private/dnd">
+ </resource>
+ </extension>
+ <extension
+ point="org.eclipse.emf.cdo.ui.editorOpeners">
+ <editorOpener
+ class="org.eclipse.papyrus.cdo.internal.ui.editors.PapyrusCDOEditorOpener"
+ icon="icons/full/obj16/papyrus_model.gif"
+ id="org.eclipse.papyrus.cdo.ui.editors.PapyrusCDOEditorOpener"
+ name="Papyrus Core Editor"
+ regex="cdo\.checkout://.*\.di">
+ </editorOpener>
+ </extension>
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.ui/pom.xml
new file mode 100755
index 00000000..f3fb5c87
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.ui</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/schema/repositoryFilters.exsd b/cdo/bundles/org.eclipse.papyrus.cdo.ui/schema/repositoryFilters.exsd
new file mode 100755
index 00000000..122c38c1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/schema/repositoryFilters.exsd
@@ -0,0 +1,210 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.cdo.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.cdo.ui" id="repositoryFilters" name="Model Repository Item Provider Filters"/>
+ </appinfo>
+ <documentation>
+ Filters to apply to the &lt;tt&gt;ModelRepositoryItemProvider&lt;/tt&gt; to exclude elements from all viewers that present the contents of model repositories for browsing.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="itemProviderFilter"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="itemProviderFilter">
+ <annotation>
+ <documentation>
+ Specification of a filter that excludes elements from the viewer content supplied by the &lt;tt&gt;ModelRepositoryItemProvider&lt;/tt&gt;. Note that this is not a viewer filter; the filtered content is never supplied to the viewer in the first place.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="labelPattern"/>
+ <element ref="elementFilter"/>
+ <element ref="predicate"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ An unique identifier of the filter.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="labelPattern">
+ <complexType>
+ <attribute name="pattern" type="string" use="required">
+ <annotation>
+ <documentation>
+ A regular expression pattern matching the labels of elements to filter from the viewer contents.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="objectClass" type="string">
+ <annotation>
+ <documentation>
+ The kind of object to which to apply the label filter pattern. If absent, all objects have the label pattern filter applied.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="adapt" type="boolean">
+ <annotation>
+ <documentation>
+ In the case that the &lt;tt&gt;objectClass&lt;/tt&gt; attribute is specified, determines whether objects that adapt to that type also have the pattern filter applied. Defaults to false.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="elementFilter">
+ <complexType>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+ A class implementing the Net4J &lt;tt&gt;IElementFilter&lt;/tt&gt; interface. Required if the &lt;tt&gt;supplierClass&lt;/tt&gt; is not specified. Elements matching the filter are excluded.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.net4j.util.ui.views.IElementFilter"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="supplierClass" type="string">
+ <annotation>
+ <documentation>
+ A class supplying a Net4J &lt;tt&gt;IElementFilter&lt;/tt&gt;. Required if the &lt;tt&gt;class&lt;/tt&gt; is not specified. Elements matching the supplied filter are excluded.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":com.google.common.base.Supplier"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="predicate">
+ <complexType>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+ A class implementing the Guava &lt;tt&gt;Predicate&amp;lt;Object&amp;gt;&lt;/tt&gt; interface. Required if the &lt;tt&gt;supplierClass&lt;/tt&gt; is not specified. Elements matching the predicate are excluded.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":com.google.common.base.Predicate"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="supplierClass" type="string">
+ <annotation>
+ <documentation>
+ A class supplying a Guava &lt;tt&gt;Predicate&amp;lt;Object&amp;gt;&lt;/tt&gt;. Required if the &lt;tt&gt;class&lt;/tt&gt; is not specified. Elements matching the supplied predicate are excluded.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":com.google.common.base.Supplier"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.10.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ /*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/Activator.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/Activator.java
new file mode 100755
index 00000000..13d6cd0f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/Activator.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.cdo.admin.CDOAdminClientManager;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.dawn.helper.DawnEditorHelper;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.util.UIUtil;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends AbstractUIPlugin {
+
+ public static final String ICON_ADD_REPOSITORY = "add_repository"; //$NON-NLS-1$
+
+ public static final String ICON_OPEN_REPOSITORY = "open_repository"; //$NON-NLS-1$
+
+ public static final String ICON_CLOSED_REPOSITORY = "closed_repository"; //$NON-NLS-1$
+
+ public static final String ICON_CONNECT_REPOSITORY_ENABLED = "connect_repo_ena"; //$NON-NLS-1$
+
+ public static final String ICON_CONNECT_REPOSITORY_DISABLED = "connect_repo_dis"; //$NON-NLS-1$
+
+ public static final String ICON_DISCONNECT_REPOSITORY_ENABLED = "disconnect_repo_ena"; //$NON-NLS-1$
+
+ public static final String ICON_DISCONNECT_REPOSITORY_DISABLED = "disconnect_repo_dis"; //$NON-NLS-1$
+
+ public static final String ICON_CONFLICTED_OVERLAY24 = "conflicted_ovr24"; //$NON-NLS-1$
+
+ public static final String ICON_CONFLICTED_OVERLAY16 = "conflicted_ovr16"; //$NON-NLS-1$
+
+ public static final String ICON_OTHER_LOCKED_OVERLAY24 = "other_locked_ovr24"; //$NON-NLS-1$
+
+ public static final String ICON_OTHER_LOCKED_OVERLAY16 = "other_locked_ovr16"; //$NON-NLS-1$
+
+ public static final String ICON_SELF_LOCKED_OVERLAY24 = "self_locked_ovr24"; //$NON-NLS-1$
+
+ public static final String ICON_SELF_LOCKED_OVERLAY16 = "self_locked_ovr16"; //$NON-NLS-1$
+
+ public static final String ICON_PAPYRUS_MODEL = "papyrus_model"; //$NON-NLS-1$
+
+ public static final String ICON_CREATE_FOLDER = "create_folder"; //$NON-NLS-1$
+
+ public static final String ICON_DEPENDENT_OVERLAY16 = "dependent_ovr16"; //$NON-NLS-1$
+
+ public static final String ICON_LINK_WITH_EDITOR = "link_editor"; //$NON-NLS-1$
+
+ public static final String ICON_PAPYRUS_CDO_WIZARD = "cdo_wizard"; //$NON-NLS-1$
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ super();
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the log helper
+ log.setPlugin(plugin);
+
+ CDOUtils.setBroadcastExecutor(UIUtil.uiSafeExecutor());
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ protected ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, "$nl$/icons/" + path); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ super.initializeImageRegistry(reg);
+
+ reg.put(ICON_ADD_REPOSITORY, getImageDescriptor("full/ctool16/add_repo.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_OPEN_REPOSITORY, getImageDescriptor("full/obj16/repo_open.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_CLOSED_REPOSITORY, getImageDescriptor("full/obj16/repo_closed.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_CONNECT_REPOSITORY_ENABLED, getImageDescriptor("full/elcl16/connect_co.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_CONNECT_REPOSITORY_DISABLED, getImageDescriptor("full/dlcl16/connect_co.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_DISCONNECT_REPOSITORY_ENABLED, getImageDescriptor("full/elcl16/disconnect_co.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_DISCONNECT_REPOSITORY_DISABLED, getImageDescriptor("full/dlcl16/disconnect_co.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_CONFLICTED_OVERLAY24, getImageDescriptor("full/ovr24/conflicted.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_CONFLICTED_OVERLAY16, getImageDescriptor("full/ovr16/conflicted.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_OTHER_LOCKED_OVERLAY24, getImageDescriptor("full/ovr24/other_locked.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_OTHER_LOCKED_OVERLAY16, getImageDescriptor("full/ovr16/other_locked.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_SELF_LOCKED_OVERLAY24, getImageDescriptor("full/ovr24/self_locked.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_SELF_LOCKED_OVERLAY16, getImageDescriptor("full/ovr16/self_locked.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_PAPYRUS_MODEL, getImageDescriptor("full/obj16/papyrus_model.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_CREATE_FOLDER, getImageDescriptor("full/elcl16/newfolder_co.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_DEPENDENT_OVERLAY16, getImageDescriptor("full/ovr16/dependent.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_LINK_WITH_EDITOR, getImageDescriptor("full/ctool16/link_editor.gif")); //$NON-NLS-1$
+
+ reg.put(ICON_PAPYRUS_CDO_WIZARD, getImageDescriptor("full/wizban/Papyrus_CDO.png")); //$NON-NLS-1$
+ }
+
+ public static ImageDescriptor getIcon(String key) {
+ return getDefault().getImageRegistry().getDescriptor(key);
+ }
+
+ public static IDawnEditor getActiveDawnEditor() {
+ IDawnEditor result = null;
+ IEditorPart editor = DawnEditorHelper.getActiveEditor();
+
+ if (editor instanceof IDawnEditor) {
+ result = (IDawnEditor) editor;
+ } else {
+ result = (IDawnEditor) editor.getAdapter(IDawnEditor.class);
+ }
+
+ return result;
+ }
+
+ public static IStatus error(String message) {
+ return error(message, null);
+ }
+
+ public static IStatus error(String message, Throwable exception) {
+ return new Status(IStatus.ERROR, PLUGIN_ID, message, exception);
+ }
+
+ @SuppressWarnings("restriction")
+ public static CDOAdminClientManager getCDOAdminClientManager() {
+ return org.eclipse.emf.cdo.ui.internal.admin.bundle.OM.getAdminManager();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/SharedImages.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/SharedImages.java
new file mode 100755
index 00000000..4592cf73
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/SharedImages.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * This is the SharedImages type. Enjoy.
+ */
+public class SharedImages {
+ private static final ImageRegistry REGISTRY = new ImageRegistry(Display.getDefault());
+
+ private SharedImages() {
+ super();
+ }
+
+ public static Image getImage(String key) {
+ Image result = REGISTRY.get(key);
+
+ if (result == null) {
+ ImageDescriptor desc = Activator.getIcon(key);
+ if (desc != null) {
+ REGISTRY.put(key, desc);
+ result = REGISTRY.get(key);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/adapters/CDOAdapterFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/adapters/CDOAdapterFactory.java
new file mode 100755
index 00000000..e1783126
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/adapters/CDOAdapterFactory.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 386118
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.adapters;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
+
+/**
+ * This is the CDOAdapterFactory type. Enjoy.
+ */
+public class CDOAdapterFactory implements IAdapterFactory {
+
+ private final Class<?>[] supported = { CDOObject.class, CDOView.class };
+
+ public CDOAdapterFactory() {
+ super();
+ }
+
+ @Override
+ public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
+ Object result = null;
+
+ if (adapterType == CDOObject.class) {
+ EObject eObject = null;
+ if (adaptableObject instanceof EditPart) {
+ // notation views are important as CDOObjects for locking and
+ // conflict purposes, so do not defer to the semantic element
+ eObject = (EObject) ((EditPart) adaptableObject).getModel();
+ } else if (adaptableObject instanceof EObject) {
+ eObject = (EObject) adaptableObject;
+ } else {
+ // try really hard to get an EObject
+ if (adaptableObject instanceof IAdaptable) {
+ eObject = (EObject) ((IAdaptable) adaptableObject).getAdapter(EObject.class);
+ }
+ if (eObject == null) {
+ eObject = (EObject) Platform.getAdapterManager().getAdapter(adaptableObject, EObject.class);
+ }
+ }
+
+ // get the CDOObject from the EObject (if possible)
+ result = CDOUtils.getCDOObject(eObject);
+ } else if (adapterType == CDOView.class) {
+ if (adaptableObject instanceof EditPart) {
+ Object object = ((EditPart) adaptableObject).getModel();
+ if (object instanceof EObject) {
+ CDOObject cdoObject = CDOUtils.getCDOObject((EObject) object);
+ if (cdoObject != null) {
+ result = cdoObject.cdoView();
+ }
+ }
+ } else if (adaptableObject instanceof EObjectTreeElement) {
+ EObject eObject = ((EObjectTreeElement) adaptableObject).getEObject();
+ if (eObject != null) {
+ CDOObject cdoObject = CDOUtils.getCDOObject(eObject);
+ if (cdoObject != null) {
+ result = cdoObject.cdoView();
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public Class[] getAdapterList() {
+ return supported;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/adapters/EditorAdapterFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/adapters/EditorAdapterFactory.java
new file mode 100755
index 00000000..c22cf6b0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/adapters/EditorAdapterFactory.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.adapters;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.papyrus.cdo.internal.ui.editors.DawnEditorAdapter;
+import org.eclipse.ui.IEditorPart;
+
+/**
+ * This is the EditorAdapterFactory type. Enjoy.
+ */
+@SuppressWarnings("rawtypes")
+public class EditorAdapterFactory
+ implements IAdapterFactory {
+
+ private final Class[] supported = { IDawnEditor.class };
+
+ public EditorAdapterFactory() {
+ super();
+ }
+
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ Object result = null;
+
+ if (adapterType == IDawnEditor.class) {
+ if (adaptableObject instanceof IEditorPart) {
+ IEditorPart editor = (IEditorPart) adaptableObject;
+
+ result = DawnEditorAdapter.getDawnEditor(editor);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Class[] getAdapterList() {
+ return supported;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateAdapter.java
new file mode 100755
index 00000000..4b469ace
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateAdapter.java
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import com.google.common.collect.Sets;
+
+/**
+ * An adapter that caches the current Dawn
+ */
+public class CDOStateAdapter
+ extends AdapterImpl {
+
+ private DawnState state = DawnState.CLEAN;
+
+ CDOStateAdapter() {
+ super();
+ }
+
+ public static CDOStateAdapter require(Notifier notifier) {
+ CDOStateAdapter result = get(notifier);
+
+ if (result == null) {
+ result = new CDOStateAdapter();
+ notifier.eAdapters().add(result);
+ }
+
+ return result;
+ }
+
+ public static CDOStateAdapter get(Notifier notifier) {
+ return (CDOStateAdapter) EcoreUtil.getExistingAdapter(notifier,
+ DawnState.class);
+ }
+
+ public static DawnState getState(Notifier notifier) {
+ CDOStateAdapter adapter = get(notifier);
+
+ return (adapter == null)
+ ? DawnState.CLEAN
+ : adapter.getState();
+ }
+
+ public static void setState(Notifier notifier, DawnState state) {
+ if (state == DawnState.CLEAN) {
+ CDOStateAdapter adapter = get(notifier);
+ if (adapter != null) {
+ notifier.eAdapters().remove(adapter);
+ }
+ } else {
+ require(notifier).setState(state);
+ }
+ }
+
+ public static Iterable<CDOStateAdapter> getAll(ResourceSet resourceSet) {
+ Iterable<CDOStateAdapter> result;
+
+ Tracker tracker = Tracker.get(resourceSet);
+ if (tracker == null) {
+ result = Collections.emptySet();
+ } else {
+ result = tracker.getStateAdapters();
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return type == DawnState.class;
+ }
+
+ public DawnState getState() {
+ return state;
+ }
+
+ public void setState(DawnState state) {
+ this.state = (state == null)
+ ? DawnState.CLEAN
+ : state;
+ }
+
+ @Override
+ public void setTarget(Notifier newTarget) {
+ super.setTarget(newTarget);
+
+ if (newTarget instanceof EObject) {
+ Resource res = ((EObject) newTarget).eResource();
+ if (res != null) {
+ ResourceSet rset = res.getResourceSet();
+ if (rset != null) {
+ Tracker.require(rset).add(this);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void unsetTarget(Notifier oldTarget) {
+ if (oldTarget instanceof EObject) {
+ Resource res = ((EObject) oldTarget).eResource();
+ if (res != null) {
+ ResourceSet rset = res.getResourceSet();
+ if (rset != null) {
+ Tracker tracker = Tracker.get(rset);
+ if (tracker != null) {
+ tracker.remove(this);
+ }
+ }
+ }
+ }
+
+ super.unsetTarget(oldTarget);
+ }
+
+ //
+ // Nested types
+ //
+
+ private static final class Tracker
+ extends AdapterImpl {
+
+ private final Set<CDOStateAdapter> stateAdapters = Sets.newHashSet();
+
+ static Tracker get(ResourceSet resourceSet) {
+ Tracker result = null;
+
+ for (Object next : resourceSet.eAdapters()) {
+ if (next instanceof Tracker) {
+ result = (Tracker) next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ static Tracker require(ResourceSet resourceSet) {
+ Tracker result = get(resourceSet);
+
+ if (result == null) {
+ result = new Tracker();
+ resourceSet.eAdapters().add(result);
+ }
+
+ return result;
+ }
+
+ void add(CDOStateAdapter stateAdapter) {
+ stateAdapters.add(stateAdapter);
+ }
+
+ void remove(CDOStateAdapter stateAdapter) {
+ stateAdapters.remove(stateAdapter);
+ }
+
+ Iterable<CDOStateAdapter> getStateAdapters() {
+ return stateAdapters;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateDiagramDecorator.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateDiagramDecorator.java
new file mode 100755
index 00000000..3de8eb5c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateDiagramDecorator.java
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.dawn.appearance.DawnElementStylizer;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.AbstractDecorator;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * A GMF-based label decorator for diagram views, to annotate them to indicate
+ * CDO locking and transaction conflict states.
+ */
+public class CDOStateDiagramDecorator
+ extends AbstractDecorator {
+
+ private DawnElementStylizer stylizer;
+
+ public CDOStateDiagramDecorator(IDecoratorTarget decoratorTarget,
+ DawnElementStylizer stylizer) {
+ super(decoratorTarget);
+
+ this.stylizer = stylizer;
+ }
+
+ @Override
+ public void activate() {
+ // pass
+ }
+
+ @Override
+ public void refresh() {
+ removeDecoration();
+
+ View view = (View) getDecoratorTarget().getAdapter(View.class);
+ EObject element = ((view == null) || !view.isSetElement())
+ ? null
+ : view.getElement();
+ CDOObject cdo = (element == null)
+ ? null
+ : CDOUtils.getCDOObject(element);
+ if (cdo != null) {
+ EditPart editPart = (EditPart) getDecoratorTarget().getAdapter(
+ EditPart.class);
+
+ // does the view, itself, have a conflict or lock state?
+ DawnState state = CDOStateAdapter.getState(view);
+ if (state == DawnState.CLEAN) {
+ // infer a state from the semantic element, then
+ state = CDOStateAdapter.getState(element);
+ }
+
+ Image image = stylizer.getImage(editPart, state);
+
+ if (image != null) {
+ if (editPart instanceof ShapeEditPart) {
+ int margin = MapModeUtil.getMapMode(
+ ((GraphicalEditPart) editPart).getFigure()).DPtoLP(-1);
+ setDecoration(getDecoratorTarget().addShapeDecoration(
+ image, Direction.SOUTH_EAST, margin, true));
+ } else if (view instanceof Edge) {
+ int percent = 50;
+ setDecoration(getDecoratorTarget().addConnectionDecoration(
+ image, percent, true));
+ }
+ }
+ }
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateLabelDecorator.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateLabelDecorator.java
new file mode 100755
index 00000000..bad1e366
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/CDOStateLabelDecorator.java
@@ -0,0 +1,192 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.cdo.dawn.appearance.DawnElementStylizer;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.emf.cdo.dawn.ui.stylizer.DawnElementStylizerRegistry;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jface.viewers.DecorationOverlayIcon;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * This is the CDOStateLabelDecorator type. Enjoy.
+ */
+public class CDOStateLabelDecorator
+ implements ILabelDecorator {
+
+ private static Set<CDOStateLabelDecorator> instances = new CopyOnWriteArraySet<CDOStateLabelDecorator>();
+
+ private final ResourceManager manager = new LocalResourceManager(
+ JFaceResources.getResources());
+
+ private final ListenerList listeners = new ListenerList();
+
+ private static LabelUpdateJob labelUpdateJob = new LabelUpdateJob();
+
+ public CDOStateLabelDecorator() {
+ super();
+
+ instances.add(this);
+ }
+
+ @Override
+ public void dispose() {
+ manager.dispose();
+
+ instances.remove(this);
+ }
+
+ @Override
+ public Image decorateImage(Image image, Object element) {
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if (eObject != null) {
+ DawnState state = CDOStateAdapter.getState(eObject);
+ if (state != DawnState.CLEAN) {
+ DawnElementStylizer stylizer = DawnElementStylizerRegistry.instance
+ .getStylizer(eObject);
+
+ if (stylizer != null) {
+ ImageDescriptor decoration = ImageDescriptor
+ .createFromImage(stylizer.getImage(eObject, state));
+
+ if (decoration != null) {
+ ImageDescriptor desc = new DecorationOverlayIcon(image,
+ decoration, IDecoration.BOTTOM_RIGHT);
+
+ return (Image) manager.get(desc);
+ }
+ }
+ }
+ }
+
+ return image;
+ }
+
+ @Override
+ public String decorateText(String text, Object element) {
+ return text;
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ listeners.add(listener);
+ }
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ listeners.remove(listener);
+ }
+
+ public static void fireLabelUpdates() {
+ labelUpdateJob.poke();
+ }
+
+ private void fireUpdates() {
+ Object[] listeners = this.listeners.getListeners();
+
+ if (listeners.length > 0) {
+ LabelProviderChangedEvent event = new LabelProviderChangedEvent(
+ this);
+
+ for (int i = 0; i < listeners.length; i++) {
+ try {
+ ((ILabelProviderListener) listeners[i])
+ .labelProviderChanged(event);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in label provider listener.", e); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ /**
+ * A label-updating job that aggregates multiple requests to update labels,
+ * in order to avoid redundant updates.
+ */
+ private static class LabelUpdateJob
+ extends UIJob {
+
+ private final Object lock = new Object();
+
+ private boolean pending;
+
+ LabelUpdateJob() {
+ super(Messages.CDOStateLabelDecorator_1);
+
+ setSystem(true);
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+
+ for (;;) {
+ synchronized (lock) {
+ pending = false;
+ }
+
+ for (CDOStateLabelDecorator next : instances) {
+ next.fireUpdates();
+ }
+
+ synchronized (lock) {
+ if (!pending) {
+ break;
+ }
+ }
+ }
+ ;
+
+ return Status.OK_STATUS;
+ }
+
+ void poke() {
+ synchronized (lock) {
+ if (!pending) {
+ pending = true;
+
+ if (getState() != Job.RUNNING) {
+ schedule();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/DiagramDecoratorProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/DiagramDecoratorProvider.java
new file mode 100755
index 00000000..c18f9cb1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/DiagramDecoratorProvider.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+import org.eclipse.emf.cdo.dawn.appearance.DawnElementStylizer;
+import org.eclipse.emf.cdo.dawn.ui.stylizer.DawnElementStylizerRegistry;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
+
+/**
+ * This is the DiagramDecoratorProvider type. Enjoy.
+ */
+public class DiagramDecoratorProvider
+ extends AbstractProvider
+ implements IDecoratorProvider {
+
+ public DiagramDecoratorProvider() {
+ super();
+ }
+
+ @Override
+ public boolean provides(IOperation operation) {
+ if (!(operation instanceof CreateDecoratorsOperation)) {
+ return false;
+ }
+ IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation)
+ .getDecoratorTarget();
+ EditPart editPart = (EditPart) decoratorTarget
+ .getAdapter(EditPart.class);
+ return editPart instanceof IPapyrusEditPart;
+ }
+
+ @Override
+ public void createDecorators(IDecoratorTarget decoratorTarget) {
+ EditPart editPart = (EditPart) decoratorTarget
+ .getAdapter(EditPart.class);
+
+ DawnElementStylizer stylizer = DawnElementStylizerRegistry.instance
+ .getStylizer(editPart);
+ if (stylizer != null) {
+ decoratorTarget.installDecorator("cdoState", new CDOStateDiagramDecorator( //$NON-NLS-1$
+ decoratorTarget, stylizer));
+ }
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusConnectionEditPartStylizer.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusConnectionEditPartStylizer.java
new file mode 100755
index 00000000..222f5859
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusConnectionEditPartStylizer.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+/**
+ * This is the PapyrusConnectionEditPartStylizer type. Enjoy.
+ */
+public class PapyrusConnectionEditPartStylizer
+ extends PapyrusEditPartStylizer {
+
+ public PapyrusConnectionEditPartStylizer() {
+ super();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusEditPartStylizer.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusEditPartStylizer.java
new file mode 100755
index 00000000..9b0a4a06
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusEditPartStylizer.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+import org.eclipse.emf.cdo.dawn.gmf.appearance.DawnAppearancer;
+import org.eclipse.emf.cdo.dawn.gmf.appearance.DawnEditPartStylizer;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.ui.util.DisplayUtils;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.SharedImages;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This is the PapyrusEditPartStylizer type. Enjoy.
+ */
+abstract class PapyrusEditPartStylizer
+ extends DawnEditPartStylizer {
+
+ public PapyrusEditPartStylizer() {
+ super();
+ }
+
+ @Override
+ public Image getImage(Object element, DawnState state) {
+ Image result;
+
+ switch (state) {
+ case LOCKED_LOCALLY:
+ result = SharedImages
+ .getImage(Activator.ICON_SELF_LOCKED_OVERLAY24);
+ break;
+ case LOCKED_REMOTELY:
+ result = SharedImages
+ .getImage(Activator.ICON_OTHER_LOCKED_OVERLAY24);
+ break;
+ case CONFLICT:
+ result = SharedImages
+ .getImage(Activator.ICON_CONFLICTED_OVERLAY24);
+ break;
+ default:
+ result = super.getImage(element, state);
+ break;
+ }
+
+ return result;
+ }
+
+ @Override
+ public void setDefault(EditPart editPart) {
+ setState(editPart, DawnState.CLEAN);
+ }
+
+ @Override
+ public void setLocked(EditPart editPart, int type) {
+ DawnState state;
+
+ switch (type) {
+ case DawnAppearancer.TYPE_LOCKED_GLOBALLY:
+ state = DawnState.LOCKED_REMOTELY;
+ break;
+ case DawnAppearancer.TYPE_LOCKED_LOCALLY:
+ state = DawnState.LOCKED_LOCALLY;
+ break;
+ default:
+ state = DawnState.LOCKED_REMOTELY;
+ break;
+ }
+
+ setState(editPart, state);
+ }
+
+ @Override
+ public void setConflicted(EditPart editPart, int type) {
+ setState(editPart, DawnState.CONFLICT);
+ }
+
+ protected void setState(final EditPart editPart, DawnState state) {
+ View view = (View) editPart.getModel();
+
+ CDOStateAdapter.setState(view, state);
+
+ // post refresh of the edit-part later to let the decorator catch up
+ DisplayUtils.getDisplay().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ editPart.refresh();
+ }
+ });
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusElementStylizer.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusElementStylizer.java
new file mode 100755
index 00000000..6bf11d91
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusElementStylizer.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+import org.eclipse.emf.cdo.dawn.gmf.appearance.DawnAppearancer;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.emf.cdo.dawn.ui.stylizer.DawnDefaultElementStylizer;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.SharedImages;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This is the PapyrusNodeEditPartStylizer type. Enjoy.
+ */
+public class PapyrusElementStylizer
+ extends DawnDefaultElementStylizer {
+
+ public PapyrusElementStylizer() {
+ super();
+ }
+
+ @Override
+ public Image getImage(Object element, DawnState state) {
+ Image result;
+
+ switch (state) {
+ case LOCKED_LOCALLY:
+ result = SharedImages
+ .getImage(Activator.ICON_SELF_LOCKED_OVERLAY16);
+ break;
+ case LOCKED_REMOTELY:
+ result = SharedImages
+ .getImage(Activator.ICON_OTHER_LOCKED_OVERLAY16);
+ break;
+ case CONFLICT:
+ result = SharedImages
+ .getImage(Activator.ICON_CONFLICTED_OVERLAY16);
+ break;
+ default:
+ result = super.getImage(element, state);
+ break;
+ }
+
+ return result;
+ }
+
+ @Override
+ public void setDefault(Object element) {
+ if (element instanceof EObject) {
+ EObject eObject = (EObject) element;
+ setState(eObject, DawnState.CLEAN);
+ }
+ }
+
+ @Override
+ public void setConflicted(Object element, final int type) {
+ if (element instanceof EObject) {
+ EObject eObject = (EObject) element;
+ setState(eObject, DawnState.CONFLICT);
+ }
+ }
+
+ @Override
+ public void setLocked(Object element, int type) {
+ if (element instanceof EObject) {
+ EObject eObject = (EObject) element;
+
+ DawnState state;
+ switch (type) {
+ case DawnAppearancer.TYPE_LOCKED_GLOBALLY:
+ state = DawnState.LOCKED_REMOTELY;
+ break;
+ case DawnAppearancer.TYPE_LOCKED_LOCALLY:
+ state = DawnState.LOCKED_LOCALLY;
+ break;
+ default:
+ state = DawnState.LOCKED_REMOTELY;
+ break;
+ }
+
+ setState(eObject, state);
+ }
+ }
+
+ protected void setState(EObject object, DawnState state) {
+ CDOStateAdapter.setState(object, state);
+ CDOStateLabelDecorator.fireLabelUpdates();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusElementStylizerFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusElementStylizerFactory.java
new file mode 100755
index 00000000..ff324163
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusElementStylizerFactory.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+import org.eclipse.emf.cdo.dawn.appearance.DawnElementStylizer;
+import org.eclipse.emf.cdo.dawn.appearance.IDawnElementStylizerFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
+
+/**
+ * This is the PapyrusElementStylizerFactory type. Enjoy.
+ */
+public class PapyrusElementStylizerFactory
+ implements IDawnElementStylizerFactory {
+
+ public PapyrusElementStylizerFactory() {
+ super();
+ }
+
+ @Override
+ public DawnElementStylizer getElementStylizer(Object object) {
+ DawnElementStylizer result = null;
+
+ if (isPapyrusEditPart(object)) {
+ if (object instanceof ConnectionEditPart) {
+ result = new PapyrusConnectionEditPartStylizer();
+ } else {
+ result = new PapyrusNodeEditPartStylizer();
+ }
+ } else if (object instanceof EObject) {
+ result = new PapyrusElementStylizer();
+ }
+
+ return result;
+ }
+
+ protected boolean isPapyrusEditPart(Object object) {
+ boolean result = object instanceof IPapyrusEditPart;
+
+ if (!result && (object instanceof EditPart)) {
+ EditPart editPart = ((EditPart) object).getRoot().getContents();
+ Object model = editPart.getModel();
+
+ if (model instanceof EObject) {
+ result = CDOUtils.getResourceSet((EObject) model) instanceof ModelSet;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusNodeEditPartStylizer.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusNodeEditPartStylizer.java
new file mode 100755
index 00000000..53af466b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/decorators/PapyrusNodeEditPartStylizer.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.decorators;
+
+/**
+ * This is the PapyrusNodeEditPartStylizer type. Enjoy.
+ */
+public class PapyrusNodeEditPartStylizer
+ extends PapyrusEditPartStylizer {
+
+ public PapyrusNodeEditPartStylizer() {
+ super();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CheckoutBrowseDialog.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CheckoutBrowseDialog.java
new file mode 100755
index 00000000..e0917726
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CheckoutBrowseDialog.java
@@ -0,0 +1,449 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.dialogs;
+
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.view.CDOViewInvalidationEvent;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.net4j.util.ui.views.IElementFilter;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.util.UIUtil;
+import org.eclipse.papyrus.cdo.internal.ui.views.CheckoutItemProvider;
+import org.eclipse.papyrus.cdo.internal.ui.widgets.ActionButton;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.CreateFolderAction;
+
+import com.google.common.base.Strings;
+
+
+/**
+ * This is the CheckoutBrowseDialog type. Enjoy.
+ */
+public class CheckoutBrowseDialog extends TitleAreaDialog {
+
+ private final String windowTitle;
+
+ private final String title;
+
+ private final String message;
+
+ private final int style;
+
+ private final CDOCheckout checkout;
+
+ private boolean allowOverwrite = false;
+
+ private EClass nodeTypeFilter = EresourcePackage.Literals.CDO_RESOURCE_NODE;
+
+ private TreeViewer tree;
+
+ private Text nameText;
+
+ private URI initialURI;
+
+ private CDOResourceNode selection;
+
+ private String name;
+
+ private IListener viewerRefresh;
+
+ /**
+ * @param style
+ * one of {@link SWT#OPEN} or {@link SWT#SAVE}
+ */
+ public CheckoutBrowseDialog(Shell parentShell, String title, String message, CDOView view, int style) {
+ this(parentShell, Messages.CheckoutBrowseDialog_windowTitle, title, message, view, style);
+ }
+
+ /**
+ * @param style
+ * one of {@link SWT#OPEN} or {@link SWT#SAVE}
+ */
+ public CheckoutBrowseDialog(Shell parentShell, String windowTitle, String title, String message, CDOView view, int style) {
+ super(parentShell);
+
+ this.windowTitle = windowTitle;
+ this.title = title;
+ this.message = message;
+ this.style = checkStyle(style);
+
+ this.checkout = (view == null) ? null : CDOExplorerUtil.getCheckout(view);
+
+ setHelpAvailable(false);
+ }
+
+ int checkStyle(int style) {
+ setShellStyle(getShellStyle() | (style & ~(SWT.OPEN | SWT.SAVE)));
+
+ return style & (SWT.OPEN | SWT.SAVE);
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+
+ newShell.setText(windowTitle);
+
+ newShell.addDisposeListener(new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ shellDisposed();
+ }
+ });
+ }
+
+ private void shellDisposed() {
+ if (viewerRefresh != null) {
+ for (CDOCheckout next : CDOExplorerUtil.getCheckoutManager().getCheckouts()) {
+ if (next.isOpen()) {
+ next.getView().removeListener(viewerRefresh);
+ }
+ }
+ }
+ }
+
+ public boolean isAllowOverwrite() {
+ return allowOverwrite;
+ }
+
+ public void setAllowOverwrite(boolean allowOverwrite) {
+ this.allowOverwrite = allowOverwrite;
+ }
+
+ public EClass getNodeTypeFilter() {
+ return nodeTypeFilter;
+ }
+
+ public void setNodeTypeFilter(EClass nodeTypeFilter) {
+ boolean defaulted = (nodeTypeFilter == null) || !EresourcePackage.Literals.CDO_RESOURCE_NODE.isSuperTypeOf(nodeTypeFilter);
+ this.nodeTypeFilter = defaulted ? EresourcePackage.Literals.CDO_RESOURCE_NODE : nodeTypeFilter;
+ }
+
+ public URI getInitialURI() {
+ return initialURI;
+ }
+
+ public void setInitialURI(URI initialURI) {
+ this.initialURI = initialURI;
+ }
+
+ public URI getSelectedURI() {
+ return (getReturnCode() != Window.OK) ? null : basicGetSelectedURI();
+ }
+
+ private URI basicGetSelectedURI() {
+ URI result = null;
+
+ if (selection != null) {
+ result = selection.getURI();
+ if (name != null) {
+ String resourceName = Strings.emptyToNull(name);
+ if (resourceName != null) {
+ if (!(selection instanceof CDOResourceFolder)) {
+ // append the name to the parent folder
+ result = result.trimSegments(1);
+ }
+ result = result.appendSegment(resourceName);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ boolean isOpenStyle() {
+ return (style & SWT.OPEN) != 0;
+ }
+
+ boolean isSaveStyle() {
+ return (style & SWT.SAVE) != 0;
+ }
+
+ CDOCheckout getCheckout() {
+ return checkout;
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ setTitle(title);
+ setMessage(message);
+
+ Composite main = (Composite) super.createDialogArea(parent);
+ Composite result = new Composite(main, SWT.NONE);
+ result.setLayout(new GridLayout(isSaveStyle() ? 3 : 1, false));
+ result.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ tree = new TreeViewer(result, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ tree.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, isSaveStyle() ? 2 : 1, 1));
+
+ CheckoutItemProvider itemProvider = (getCheckout() == null) ? new CheckoutItemProvider(null, showConnectedRepositories()) : new CheckoutItemProvider(null, getCheckout());
+ tree.setContentProvider(itemProvider);
+ tree.setLabelProvider(new DecoratingLabelProvider(itemProvider, PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
+ tree.setSorter(itemProvider);
+ tree.setInput(CDOExplorerUtil.getCheckoutManager());
+ for (CDOCheckout next : CDOExplorerUtil.getCheckoutManager().getCheckouts()) {
+ if (next.isOpen()) {
+ next.getView().addListener(getViewerRefresh());
+ }
+ }
+
+ if (isSaveStyle()) {
+ // don't need to create new folders when opening an existing resource
+ Composite actionButtons = new Composite(result, SWT.NONE);
+ actionButtons.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false));
+ actionButtons.setLayout(new RowLayout(SWT.VERTICAL));
+
+ ActionButton newFolderButton = new ActionButton(Messages.CheckoutBrowseDialog_newFolderAction, new CreateFolderAction(this), SWT.PUSH);
+ newFolderButton.attach(tree);
+ newFolderButton.createControl(actionButtons);
+
+ // don't need to type in names of non-existent resources when opening an existing resource
+ Label label = new Label(result, SWT.NONE);
+ label.setText(Messages.CheckoutBrowseDialog_nameLabel);
+ GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gd.verticalIndent = convertVerticalDLUsToPixels(8);
+ label.setLayoutData(gd);
+
+ nameText = new Text(result, SWT.BORDER);
+ gd = new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1);
+ gd.verticalIndent = convertVerticalDLUsToPixels(8);
+ nameText.setLayoutData(gd);
+ }
+
+ if (getInitialURI() != null) {
+ initializeSelection();
+ } else if (getCheckout() != null) {
+ selection = getCheckout().getView().getRootResource();
+ }
+
+ tree.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+ if (sel.isEmpty()) {
+ if (getCheckout() != null) {
+ selection = getCheckout().getView().getRootResource();
+ } else {
+ selection = null;
+ }
+ } else {
+ selection = CDOUtils.adapt(sel.getFirstElement(), CDOResourceNode.class);
+ }
+
+ validateSelection();
+ }
+ });
+
+ if (nameText != null) {
+ nameText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ name = Strings.emptyToNull(nameText.getText().trim());
+ validateSelection();
+ }
+ });
+ }
+
+ return result;
+ }
+
+ private IElementFilter showConnectedRepositories() {
+ return new IElementFilter() {
+
+ @Override
+ public boolean filter(Object element) {
+ boolean result = false;
+
+ if (element instanceof CDOCheckout) {
+ result = ((CDOCheckout) element).isOpen();
+ }
+
+ return result;
+ }
+ };
+ }
+
+ private void initializeSelection() {
+ URI uri = getInitialURI();
+ CDOView view = getCheckout().getView();
+
+ String path = CDOURIUtil.extractResourcePath(uri);
+ if (view.hasResource(path)) {
+ selection = view.getResourceNode(path);
+ tree.setSelection(new StructuredSelection(selection));
+ tree.expandToLevel(selection, 1);
+ if (nameText != null) {
+ name = selection.getName();
+ nameText.setText(name);
+ }
+ } else if (uri.segmentCount() > 0) {
+ // try the containing folder, then
+ URI parent = uri.trimSegments(1);
+ path = CDOURIUtil.extractResourcePath(parent);
+ if (view.hasResource(path)) {
+ // if the root resource, it is represented by the checkout
+ selection = view.getResourceNode(path);
+ Object treeSelection = selection.isRoot() ? getCheckout() : selection;
+ tree.setSelection(new StructuredSelection(treeSelection), true);
+ tree.expandToLevel(treeSelection, 1);
+ if (nameText != null) {
+ name = uri.lastSegment();
+ nameText.setText(name);
+ }
+ }
+ } else {
+ // select the checkout (representing the root resource)
+ selection = view.getRootResource();
+ Object treeSelection = getCheckout();
+ tree.setSelection(new StructuredSelection(treeSelection), true);
+ tree.expandToLevel(treeSelection, 1);
+ }
+ }
+
+ private void validateSelection() {
+ String error = null;
+ String warning = null;
+ String info = null;
+ boolean disable = false;
+
+ if (name != null) {
+ if (!URI.validSegment(name)) {
+ error = Messages.CheckoutBrowseDialog_invalidURISeg;
+ }
+ }
+
+ if (error == null) {
+ if (selection == null) {
+ disable = true;
+ } else {
+ String path = CDOURIUtil.extractResourcePath(basicGetSelectedURI());
+ CDOView view = selection.cdoView();
+
+ if (isOpenStyle() && !view.hasResource(path)) {
+ error = Messages.CheckoutBrowseDialog_noSuchResource;
+ } else if (isOpenStyle()) {
+ // then the resource exists. Is it the kind we want?
+ CDOResourceNode node = view.getResourceNode(path);
+ if (!getNodeTypeFilter().isInstance(node)) {
+ disable = true;
+ info = NLS.bind(Messages.CheckoutBrowseDialog_wrongSelection, getNodeType(getNodeTypeFilter()));
+ }
+ } else if (isSaveStyle() && view.hasResource(path)) {
+ if (isAllowOverwrite()) {
+ warning = Messages.CheckoutBrowseDialog_existsWarning;
+ } else {
+ error = Messages.CheckoutBrowseDialog_existsError;
+ }
+ }
+ }
+ }
+
+ getButton(IDialogConstants.OK_ID).setEnabled(!disable && (error == null));
+ if (error != null) {
+ setMessage(error, IMessageProvider.ERROR);
+ } else if (warning != null) {
+ setMessage(warning, IMessageProvider.WARNING);
+ } else if (info != null) {
+ setMessage(info, IMessageProvider.INFORMATION);
+ } else {
+ setMessage(message);
+ }
+ }
+
+ private String getNodeType(EClass nodeClass) {
+ String result = Messages.CheckoutBrowseDialog_anyNode;
+
+ if (nodeClass.getEPackage() == EresourcePackage.eINSTANCE) {
+ switch (nodeClass.getClassifierID()) {
+ case EresourcePackage.CDO_RESOURCE:
+ result = Messages.CheckoutBrowseDialog_modelKind;
+ break;
+ case EresourcePackage.CDO_RESOURCE_FOLDER:
+ result = Messages.CheckoutBrowseDialog_folderKind;
+ break;
+ case EresourcePackage.CDO_TEXT_RESOURCE:
+ result = Messages.CheckoutBrowseDialog_textKind;
+ break;
+ case EresourcePackage.CDO_BINARY_RESOURCE:
+ result = Messages.CheckoutBrowseDialog_binKind;
+ break;
+ case EresourcePackage.CDO_FILE_RESOURCE:
+ result = Messages.CheckoutBrowseDialog_fileKind;
+ break;
+ case EresourcePackage.CDO_RESOURCE_LEAF:
+ result = Messages.CheckoutBrowseDialog_leafKind;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ private IListener getViewerRefresh() {
+ if (viewerRefresh == null) {
+ viewerRefresh = new IListener() {
+
+ @Override
+ public void notifyEvent(IEvent event) {
+ if (event instanceof CDOViewInvalidationEvent) {
+ if ((getContents() != null) && !getContents().isDisposed()) {
+ if (UIUtil.ensureUIThread(this, event)) {
+ tree.refresh();
+ }
+ }
+ }
+ }
+ };
+ }
+
+ return viewerRefresh;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CheckoutSelectionDialog.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CheckoutSelectionDialog.java
new file mode 100755
index 00000000..562f5f54
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CheckoutSelectionDialog.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.dialogs;
+
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.wizards.CheckoutSelectionBlock;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import com.google.common.base.Supplier;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+/**
+ * This is the CheckoutSelectionDialog type. Enjoy.
+ */
+public class CheckoutSelectionDialog extends TitleAreaDialog {
+
+ private static final String TITLE = Messages.CheckoutSelectionDialog_0;
+
+ private final Supplier<? extends IRunnableContext> runnableContext;
+
+ private final EventBus bus;
+
+ private final CDOCheckout initialSelection;
+
+ private CDOCheckout selectedCheckout;
+
+ private CheckoutSelectionBlock checkoutSelectionBlock;
+
+ public CheckoutSelectionDialog(Shell parentShell, //
+ CDOCheckout initialSelection, Supplier<? extends IRunnableContext> runnableContext) {
+
+ super(parentShell);
+
+ this.runnableContext = runnableContext;
+ this.bus = new EventBus("repositorySelectionDialog"); //$NON-NLS-1$
+ this.initialSelection = initialSelection;
+
+ setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL | SWT.TITLE);
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(TITLE);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ setTitle(TITLE);
+ setMessage(Messages.CheckoutSelectionDialog_1);
+ Composite result = (Composite) super.createDialogArea(parent);
+
+ Composite main = new Composite(result, SWT.NONE);
+ main.setLayout(new GridLayout());
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(main);
+
+
+ checkoutSelectionBlock = new CheckoutSelectionBlock(bus, runnableContext);
+ checkoutSelectionBlock.createControl(main);
+
+ bus.register(this);
+ checkoutSelectionBlock.setSelectedCheckout(initialSelection);
+
+ return result;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ super.createButtonsForButtonBar(parent);
+
+ setSelectedCheckout(initialSelection);
+ }
+
+ public CDOCheckout getSelectedRepository() {
+ return selectedCheckout;
+ }
+
+ @Subscribe
+ public void setSelectedCheckout(CDOCheckout checkout) {
+ Button ok = getButton(IDialogConstants.OK_ID);
+
+ if (ok != null) {
+ ok.setEnabled(checkout != null);
+ }
+ }
+
+ @Override
+ protected void okPressed() {
+ selectedCheckout = checkoutSelectionBlock.getSelectedCheckout();
+
+ super.okPressed();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CreateCDOModelFragmentDialog.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CreateCDOModelFragmentDialog.java
new file mode 100755
index 00000000..7bd3dbe0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dialogs/CreateCDOModelFragmentDialog.java
@@ -0,0 +1,257 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.dialogs;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.edit.ui.EMFEditUIPlugin;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.core.resource.CDOAwareModelSet;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.infra.services.controlmode.ui.IControlModeFragmentDialogProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import com.google.common.base.Strings;
+
+
+/**
+ * This is the CreateCDOModelFragmentDialog type. Enjoy.
+ */
+public class CreateCDOModelFragmentDialog extends Dialog {
+
+ private final CDOView view;
+
+ private final URIConverter uriConverter;
+
+ private String selectedURI;
+
+ private Text uriText;
+
+ private Label errorLabel;
+
+ public CreateCDOModelFragmentDialog(Shell parentShell, Resource parentUnit, String defaultUnitName) {
+ super(parentShell);
+
+ this.view = ((CDOResource) parentUnit).cdoView();
+ this.uriConverter = parentUnit.getResourceSet().getURIConverter();
+
+ URI parentURI = parentUnit.getURI();
+ this.selectedURI = parentURI.trimSegments(1).appendSegment(defaultUnitName).appendFileExtension(parentURI.fileExtension()).toString();
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+
+ newShell.setText(EMFEditUIPlugin.INSTANCE.getString("_UI_ControlDialog_title")); //$NON-NLS-1$
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite result = (Composite) super.createDialogArea(parent);
+
+ result.setLayout(new GridLayout(2, false));
+
+ new Label(result, SWT.NONE).setText(Messages.CreateCDOFragDlg_uriLabel);
+
+ Composite browseComposite = new Composite(result, SWT.NONE);
+ browseComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false));
+ browseComposite.setLayout(new RowLayout(SWT.HORIZONTAL));
+ createBrowseButtons(browseComposite);
+
+ uriText = new Text(result, SWT.BORDER | SWT.SINGLE);
+ GridData ld = new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1);
+ ld.widthHint = convertWidthInCharsToPixels(50);
+ uriText.setLayoutData(ld);
+
+ if (selectedURI != null) {
+ uriText.setText(selectedURI);
+ }
+
+ uriText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validateURI(uriText.getText());
+ }
+ });
+
+ errorLabel = new Label(result, SWT.WRAP);
+ errorLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true, 2, 1));
+
+ return result;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ super.createButtonsForButtonBar(parent);
+
+ // now that the OK button exists, determine initial enablement
+ if (selectedURI == null) {
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ } else {
+ validateURI(selectedURI);
+ }
+ }
+
+ public URI getSelectedURI() {
+ return ((getReturnCode() != Window.OK) || (selectedURI == null)) ? null : URI.createURI(selectedURI, true);
+ }
+
+ private void createBrowseButtons(Composite composite) {
+ Button browseRepo = new Button(composite, SWT.PUSH);
+ browseRepo.setText(Messages.CreateCDOFragDlg_browseRepo);
+
+ browseRepo.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ browseRepository();
+ }
+ });
+ }
+
+ private void browseRepository() {
+ CheckoutBrowseDialog dlg = new CheckoutBrowseDialog(getShell(), Messages.CreateCDOFragDlg_browseTitle, Messages.CreateCDOFragDlg_browseMessage, view, SWT.SAVE);
+
+ dlg.setNodeTypeFilter(EresourcePackage.Literals.CDO_RESOURCE);
+ dlg.setAllowOverwrite(false);
+
+ String initialURI = uriText.getText().trim();
+ if (!Strings.isNullOrEmpty(initialURI)) {
+ try {
+ dlg.setInitialURI(URI.createURI(initialURI, true));
+ } catch (Exception e) {
+ // OK, it's not a valid input. That's fine. Use the last valid selection
+ if (selectedURI != null) {
+ dlg.setInitialURI(URI.createURI(selectedURI, true));
+ }
+ }
+ }
+
+ if (dlg.open() == Window.OK) {
+ uriText.setText(dlg.getSelectedURI().toString());
+ }
+ }
+
+ private void setError(String error) {
+ if (error == null) {
+ errorLabel.setText(""); //$NON-NLS-1$
+ } else {
+ errorLabel.setText(error);
+ }
+
+ errorLabel.getParent().layout();
+ }
+
+ private void validateURI(String uri) {
+ uri = uri.trim();
+ if (uri.length() == 0) {
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ } else {
+ try {
+ URI parsed = URI.createURI(uri, true);
+
+ if (parsed.hasFragment()) {
+ throw new IllegalArgumentException(Messages.CreateCDOFragDlg_hasFragmentError);
+ } else if (uriConverter.exists(parsed, null)) {
+ throw new IllegalArgumentException(Messages.CreateCDOFragDlg_existsError);
+ } else {
+ // an empty folder name indicates a resource at the root; the root always exists
+ String folder = CDOURIUtil.extractResourceFolderAndName(parsed)[0];
+ if (!Strings.isNullOrEmpty(folder)) {
+ if (!view.hasResource(folder)) {
+ throw new IllegalArgumentException(NLS.bind(Messages.CreateCDOFragDlg_noSuchFolderError, folder));
+ }
+ if (!(view.getResourceNode(folder) instanceof CDOResourceFolder)) {
+ throw new IllegalArgumentException(NLS.bind(Messages.CreateCDOFragDlg_notFolderError, folder));
+ }
+ }
+ }
+
+ getButton(IDialogConstants.OK_ID).setEnabled(true);
+ this.selectedURI = uri;
+ setError(null);
+ } catch (Exception e) {
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ setError(e.getLocalizedMessage());
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ public static class Provider implements IControlModeFragmentDialogProvider {
+
+ @Override
+ public Dialog createDialog(Shell shell, Resource parentUnit, String defaultUnitURI) {
+ return (parentUnit instanceof CDOResource) ? new CreateCDOModelFragmentDialog(shell, parentUnit, defaultUnitURI) : DEFAULT.createDialog(shell, parentUnit, defaultUnitURI);
+ }
+
+ @Override
+ public URI getSelectedURI(Dialog dialog) {
+ return (dialog instanceof CreateCDOModelFragmentDialog) ? ((CreateCDOModelFragmentDialog) dialog).getSelectedURI() : DEFAULT.getSelectedURI(dialog);
+ }
+ }
+
+ public static class AdapterFactory implements IAdapterFactory {
+
+ private static final Class<?>[] ADAPTERS = { IControlModeFragmentDialogProvider.class };
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public Class[] getAdapterList() {
+ return ADAPTERS;
+ }
+
+ @Override
+ public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
+ Object result = null;
+
+ if (adapterType == IControlModeFragmentDialogProvider.class) {
+ if (adaptableObject instanceof CDOAwareModelSet) {
+ result = new Provider();
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/CDOResourceURITransferData.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/CDOResourceURITransferData.java
new file mode 100755
index 00000000..80561787
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/CDOResourceURITransferData.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.dnd;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import com.google.common.base.Function;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.common.io.ByteArrayDataInput;
+import com.google.common.io.ByteArrayDataOutput;
+import com.google.common.io.ByteStreams;
+
+
+/**
+ * This is the CDOResourceURITransferData type. Enjoy.
+ */
+public final class CDOResourceURITransferData {
+
+ private static final String NS_URI = "http://www.eclipse.org/papyrus/1.0.0/cdo/private/dnd"; //$NON-NLS-1$
+
+ private static final EClass ECLASS = (EClass) EPackage.Registry.INSTANCE.getEPackage(NS_URI).getEClassifier(CDOResourceURITransferData.class.getSimpleName());
+
+ private static final EAttribute URIS = (EAttribute) ECLASS.getEStructuralFeature("resourceURIs"); //$NON-NLS-1$
+
+ private final List<URI> uris;
+
+ public CDOResourceURITransferData(Iterable<? extends CDOResourceNode> resourceNodes) {
+ this(ImmutableList.copyOf(Iterables.transform(resourceNodes, new Function<CDOResourceNode, URI>() {
+
+ @Override
+ public URI apply(CDOResourceNode input) {
+ return input.getURI();
+ }
+ })));
+ }
+
+ private CDOResourceURITransferData(List<URI> uris) {
+ this.uris = uris;
+ }
+
+ public List<URI> getURIs() {
+ return uris;
+ }
+
+ public byte[] serialize() {
+ ByteArrayDataOutput data = ByteStreams.newDataOutput();
+
+ data.writeInt(uris.size());
+ for (URI next : uris) {
+ data.writeUTF(next.toString());
+ }
+
+ return data.toByteArray();
+ }
+
+ public static CDOResourceURITransferData deserialize(byte[] serial) {
+ ImmutableList.Builder<URI> uris = ImmutableList.builder();
+ ByteArrayDataInput data = ByteStreams.newDataInput(serial);
+
+ final int count = data.readInt();
+ for (int i = 0; i < count; i++) {
+ uris.add(URI.createURI(data.readUTF()));
+ }
+
+ return new CDOResourceURITransferData(uris.build());
+ }
+
+ public static boolean isCDOResourceURITransferData(EObject object) {
+ return ECLASS.isInstance(object);
+ }
+
+ public static CDOResourceURITransferData fromEObject(EObject object) {
+ @SuppressWarnings("unchecked")
+ List<URI> uris = isCDOResourceURITransferData(object) ? (List<URI>) object.eGet(URIS) : Collections.<URI> emptyList();
+
+ return new CDOResourceURITransferData(uris);
+ }
+
+ public EObject asEObject() {
+ EObject result = EcoreUtil.create(ECLASS);
+ result.eSet(URIS, getURIs());
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDragAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDragAdapter.java
new file mode 100755
index 00000000..140fae94
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDragAdapter.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.dnd;
+
+import java.util.List;
+
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.papyrus.cdo.core.util.CDOFunctions;
+import org.eclipse.papyrus.cdo.core.util.CDOPredicates;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSourceAdapter;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.ui.part.PluginTransfer;
+import org.eclipse.ui.part.PluginTransferData;
+
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the ResourceDragAdapter type. Enjoy.
+ */
+public class ResourceDragAdapter extends DragSourceAdapter {
+
+ private static final Transfer[] TRANSFERS = { PluginTransfer.getInstance(), LocalSelectionTransfer.getTransfer() };
+
+ private final StructuredViewer viewer;
+
+ private long lastDragTimestamp;
+
+ protected ResourceDragAdapter(StructuredViewer viewer) {
+ this.viewer = viewer;
+ }
+
+ public static ResourceDragAdapter install(StructuredViewer viewer) {
+ ResourceDragAdapter result = new ResourceDragAdapter(viewer);
+
+ viewer.addDragSupport(DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT, TRANSFERS, result);
+
+ return result;
+ }
+
+ protected IStructuredSelection getViewerSelection() {
+ return (IStructuredSelection) viewer.getSelection();
+ }
+
+ @Override
+ public void dragStart(DragSourceEvent event) {
+ IStructuredSelection selection = getViewerSelection();
+ event.doit = acceptSelection(selection.toList());
+ if (event.doit) {
+ lastDragTimestamp = System.currentTimeMillis();
+ LocalSelectionTransfer.getTransfer().setSelection(selection);
+ LocalSelectionTransfer.getTransfer().setSelectionSetTime(lastDragTimestamp);
+ }
+ }
+
+ @Override
+ public void dragFinished(DragSourceEvent event) {
+ if (LocalSelectionTransfer.getTransfer().getSelectionSetTime() == lastDragTimestamp) {
+ // clear the selection
+ LocalSelectionTransfer.getTransfer().setSelection(null);
+ }
+ }
+
+ protected boolean acceptSelection(List<?> selection) {
+ return !selection.isEmpty() && Iterables.all(selection, CDOPredicates.adaptsTo(CDOResourceNode.class));
+ }
+
+ @Override
+ public void dragSetData(DragSourceEvent event) {
+ for (Transfer transfer : TRANSFERS) {
+ if (transfer.isSupportedType(event.dataType)) {
+ if (transfer instanceof LocalSelectionTransfer) {
+ // pass the selection along through the event
+ event.data = getViewerSelection();
+ } else if (transfer instanceof PluginTransfer) {
+ CDOResourceURITransferData data = getResourceURIs(getViewerSelection());
+ event.data = new PluginTransferData(ResourceDropActionDelegate.DROP_ACTION_ID, data.serialize());
+ }
+ }
+ }
+ }
+
+ protected CDOResourceURITransferData getResourceURIs(IStructuredSelection selection) {
+ return new CDOResourceURITransferData(Iterables.filter(Iterables.transform((List<?>) selection.toList(), CDOFunctions.adapt(CDOResourceNode.class)), Predicates.notNull()));
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropActionDelegate.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropActionDelegate.java
new file mode 100755
index 00000000..415682c4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropActionDelegate.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.dnd;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.handlers.ExportModelHandler;
+import org.eclipse.ui.part.IDropActionDelegate;
+
+
+/**
+ * This is the ResourceDropActionDelegate type. Enjoy.
+ */
+public class ResourceDropActionDelegate implements IDropActionDelegate {
+
+ public static final String DROP_ACTION_ID = "org.eclipse.papyrus.cdo.ui.modelDropAction"; //$NON-NLS-1$
+
+ public ResourceDropActionDelegate() {
+ super();
+ }
+
+ @Override
+ public boolean run(Object source, Object target) {
+ boolean result = false;
+
+ byte[] serial = null;
+ if (source instanceof byte[]) {
+ serial = (byte[]) source;
+ }
+
+ if (serial != null) {
+ IContainer container = CDOUtils.adapt(target, IContainer.class);
+ if (container != null) {
+ CDOResourceURITransferData data = CDOResourceURITransferData.deserialize(serial);
+ if (!data.getURIs().isEmpty()) {
+ result = true;
+ ExportModelHandler.exportModels(container, data.getURIs());
+ }
+ }
+ }
+
+ return result;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropAdapter.java
new file mode 100755
index 00000000..26e9d6b9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropAdapter.java
@@ -0,0 +1,394 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.dnd;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.core.util.CDOFunctions;
+import org.eclipse.papyrus.cdo.core.util.CDOPredicates;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.handlers.ImportModelsHandler;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIModel;
+import org.eclipse.papyrus.infra.onefile.model.IPapyrusFile;
+import org.eclipse.papyrus.infra.onefile.model.PapyrusModelHelper;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.PluginTransfer;
+import org.eclipse.ui.part.PluginTransferData;
+import org.eclipse.ui.part.ResourceTransfer;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * This is the ResourceDropAdapter type. Enjoy.
+ */
+public class ResourceDropAdapter extends ViewerDropAdapter {
+
+ private static final Transfer[] TRANSFERS = { ResourceTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), PluginTransfer.getInstance() };
+
+ private final Predicate<Object> validDropTarget = Predicates.or(CDOPredicates.adaptsTo(CDOResourceFolder.class), CDOPredicates.adaptsTo(CDOCheckout.class));
+
+ private final Function<Object, CDOResourceNode> asNode = CDOFunctions.adapt(CDOResourceNode.class);
+
+ protected ResourceDropAdapter(StructuredViewer viewer) {
+ super(viewer);
+ }
+
+ public static ResourceDropAdapter install(StructuredViewer viewer) {
+ ResourceDropAdapter result = new ResourceDropAdapter(viewer);
+
+ viewer.addDropSupport(DND.DROP_MOVE | /* DND.DROP_COPY | */DND.DROP_DEFAULT, TRANSFERS, result);
+
+ return result;
+ }
+
+ @Override
+ public boolean performDrop(Object data) {
+ boolean result = false;
+
+ if (data instanceof IResource[]) {
+ data = new StructuredSelection((IResource[]) data);
+ } else if ((data instanceof PluginTransferData) && "org.eclipse.ui.navigator.PluginDropAction".equals(((PluginTransferData) data).getExtensionId())) { //$NON-NLS-1$
+ String viewerID = new String(((PluginTransferData) data).getData());
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IViewPart view = page.findView(viewerID);
+ if (view != null) {
+ data = view.getSite().getSelectionProvider().getSelection();
+ }
+ }
+
+ CDOResourceNode dropTarget = adaptDropTarget(getCurrentTarget());
+ if (dropTarget != null) {
+ Iterable<?> toMove = Collections.emptyList();
+
+ // handle resources to move within the repositories view
+ if (data instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) data;
+ toMove = getResourceNodeAdaptables(selection);
+ } else if (data instanceof PluginTransferData) {
+ PluginTransferData ptData = (PluginTransferData) data;
+ if (ResourceDropActionDelegate.DROP_ACTION_ID.equals(ptData.getExtensionId())) {
+ CDOResourceURITransferData uris = CDOResourceURITransferData.deserialize(ptData.getData());
+ toMove = getResourceNodeAdaptables(uris.getURIs());
+ }
+ }
+
+ if (!Iterables.isEmpty(toMove)) {
+ result = moveResourceNodes(dropTarget, toMove);
+ } else {
+ // handle resources to import from the workspace
+ if (data instanceof IStructuredSelection) {
+ Iterable<IFile> diFiles = getDIFiles((IStructuredSelection) data);
+ if (!Iterables.isEmpty(diFiles)) {
+ result = importModels(dropTarget, diFiles);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ protected boolean moveResourceNodes(final CDOResourceNode dropTarget, final Iterable<?> resourceNodes) {
+ boolean result = false;
+
+ // validate the move before we attempt to move anything
+ Iterable<? extends CDOResourceNode> nodes = Iterables.transform(resourceNodes, CDOFunctions.adapt(CDOResourceNode.class));
+ for (CDOResourceNode next : nodes) {
+ result = true;
+
+ if (contains(dropTarget, next)) {
+ result = false;
+ break;
+ }
+ }
+
+ if (result) {
+ new Job(Messages.ResourceDropAdapter_1) {
+
+ {
+ setUser(true);
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ return doMove(dropTarget, resourceNodes);
+ }
+ }.schedule();
+ }
+
+ return result;
+ }
+
+ protected boolean importModels(CDOResourceNode dropTarget, Iterable<IFile> diFiles) {
+ boolean result = false;
+
+ IWorkbenchWindow window = null;
+ for (IWorkbenchWindow next : PlatformUI.getWorkbench().getWorkbenchWindows()) {
+ if (next.getShell() == getViewer().getControl().getShell()) {
+ window = next;
+ break;
+ }
+ }
+
+ if (window != null) {
+ URI uri = dropTarget.getURI();
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(uri);
+ if (checkout != null) {
+ List<IPapyrusFile> papyrusFiles = Lists.newArrayList();
+ for (IFile next : diFiles) {
+ IPapyrusFile papyrusFile = PapyrusModelHelper.getPapyrusModelFactory().createIPapyrusFile(next);
+ if (papyrusFile != null) {
+ papyrusFiles.add(papyrusFile);
+ }
+ }
+
+ if (!papyrusFiles.isEmpty()) {
+ result = true;
+ ImportModelsHandler.importModels(window, new StructuredSelection(papyrusFiles), checkout);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ protected IStatus doMove(CDOResourceNode destination, Iterable<?> nodeAdaptables) {
+ IStatus result = Status.OK_STATUS;
+ CDOTransaction transaction = destination.cdoView().getSession().openTransaction();
+
+ try {
+ CDOResourceNode newParent = getCorrespondent(destination, transaction);
+ for (Object next : nodeAdaptables) {
+ if (next instanceof DIModel) {
+ for (CDOResourceNode component : getResourceNodes(Arrays.asList(((DIModel) next).getChildren()))) {
+ moveTo(newParent, getCorrespondent(component, transaction));
+ }
+ } else {
+ moveTo(newParent, getCorrespondent(asNode.apply(next), transaction));
+ }
+ }
+
+ transaction.commit();
+ } catch (CoreException e) {
+ result = e.getStatus();
+ } catch (Exception e) {
+ result = error(Messages.ResourceDropAdapter_3, e);
+ } finally {
+ transaction.close();
+ }
+
+ return result;
+ }
+
+ protected CDOResourceNode getCorrespondent(CDOResourceNode node, CDOView view) throws CoreException {
+
+ CDOResourceNode result;
+
+ try {
+ if (node == null) {
+ throw new CoreException(error(Messages.ResourceDropAdapter_2));
+ } else if (node instanceof CDOResourceFolder) {
+ result = view.getResourceFolder(node.getPath());
+ } else if (node instanceof CDOResource) {
+ result = view.getResource(node.getPath());
+ } else {
+ throw new CoreException(error(NLS.bind(Messages.ResourceDropAdapter_4, node.getClass().getName())));
+ }
+ } catch (CoreException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new CoreException(error(e.getLocalizedMessage(), e));
+ }
+
+ return result;
+ }
+
+ protected static IStatus error(String message) {
+ return error(message, null);
+ }
+
+ protected static IStatus error(String message, Throwable exception) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, message, exception);
+ }
+
+ protected void moveTo(CDOResourceNode newParent, CDOResourceNode node) throws CoreException {
+ String newPath = (node == null) ? null : new Path(newParent.getPath()).append(node.getName()).toString();
+
+ if (node == null) {
+ throw new CoreException(error(Messages.ResourceDropAdapter_0));
+ } else if (newParent.cdoView().hasResource(newPath)) {
+ throw new CoreException(error(NLS.bind(Messages.ResourceDropAdapter_6, newPath)));
+ } else {
+ // just set the path. The node moves itself
+ node.setPath(newPath);
+ }
+ }
+
+ @Override
+ public boolean validateDrop(Object target, int operation, TransferData transferType) {
+ boolean result = false;
+
+ LocalSelectionTransfer local = LocalSelectionTransfer.getTransfer();
+ if (local.isSupportedType(transferType) && (local.getSelection() instanceof IStructuredSelection) && isValidResourceContainer(target)) {
+ IStructuredSelection selection = (IStructuredSelection) local.getSelection();
+ CDOResourceNode dropTarget = adaptDropTarget(target);
+
+ // handle drag of files from the Project Explorer. If there's any
+ // DI file, that's good enough, because the import wizard handles
+ // mapping to repository paths
+ if ((dropTarget != null) && !Iterables.isEmpty(getDIFiles(selection))) {
+ result = true;
+ }
+ } else if (PluginTransfer.getInstance().isSupportedType(transferType) && isValidResourceContainer(target)) {
+ // assume that intra-repository drag of resource nodes will be OK
+ result = true;
+ } else if (ResourceTransfer.getInstance().isSupportedType(transferType) && isValidResourceContainer(target)) {
+ // assume that dragging resources will be OK
+ result = true;
+ }
+
+ return result;
+ }
+
+ protected boolean isValidResourceContainer(Object dropTarget) {
+ return validDropTarget.apply(dropTarget);
+ }
+
+ protected CDOResourceNode adaptDropTarget(Object dropTarget) {
+ CDOResourceNode result = CDOFunctions.adapt(CDOResourceNode.class).apply(dropTarget);
+
+ if (result == null) {
+ // must be a checkout
+ CDOView view = ((CDOCheckout) dropTarget).getView();
+ if (view != null) {
+ result = view.getRootResource();
+ }
+ }
+
+ return result;
+ }
+
+ protected boolean contains(CDOResourceNode parent, CDOResourceNode child) {
+ boolean result = false;
+
+ if (parent instanceof CDOResourceFolder) {
+ CDOResourceFolder folder = (CDOResourceFolder) parent;
+ result = folder.getNodes().contains(child);
+ } else if (parent instanceof CDOResource) {
+ CDOResource resource = (CDOResource) parent;
+ if (resource.isRoot()) {
+ result = resource.getContents().contains(child);
+ }
+ }
+
+ return result;
+ }
+
+ protected Iterable<?> getResourceNodeAdaptables(IStructuredSelection selection) {
+ return Iterables.filter((List<?>) selection.toList(), CDOPredicates.adaptsTo(CDOResourceNode.class));
+ }
+
+ protected Iterable<?> getResourceNodeAdaptables(Iterable<URI> uris) {
+ List<Object> result = Lists.newArrayList();
+
+ for (URI next : uris) {
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(next);
+ if (checkout != null) {
+ CDOView view = checkout.getView();
+ if (view != null) { // the repository could be disconnected by now
+ String path = CDOURIUtil.extractResourcePath(next);
+ try {
+ CDOResourceNode node = view.getResourceNode(path);
+ if (node instanceof CDOResource) {
+ DIModel diModel = DIModel.getInstance((CDOResource) node, false);
+ if (diModel != null) {
+ result.add(diModel);
+ }
+ } else if (node instanceof CDOResourceNode) {
+ result.add(node);
+ }
+ } catch (Exception e) {
+ // normal in the case that the resource or folder no longer exists
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ protected Iterable<? extends CDOResourceNode> getResourceNodes(IStructuredSelection selection) {
+ return getResourceNodes(selection.toList());
+ }
+
+ protected Iterable<? extends CDOResourceNode> getResourceNodes(Iterable<?> objects) {
+ return Iterables.filter(Iterables.transform(objects, asNode), Predicates.notNull());
+ }
+
+ protected Iterable<IFile> getDIFiles(IStructuredSelection selection) {
+ Iterable<IPapyrusFile> papyrusFiles = Iterables.filter(selection.toList(), IPapyrusFile.class);
+ Iterable<IFile> files = Iterables.filter(Iterables.filter(selection.toList(), IFile.class), new Predicate<IFile>() {
+
+ @Override
+ public boolean apply(IFile input) {
+ return PapyrusModelHelper.getPapyrusModelFactory().isDi(input);
+ }
+ });
+
+ return Iterables.concat(files, Iterables.transform(papyrusFiles, new Function<IPapyrusFile, IFile>() {
+
+ @Override
+ public IFile apply(IPapyrusFile input) {
+ return input.getMainFile();
+ }
+ }));
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropAdapterAssistant.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropAdapterAssistant.java
new file mode 100755
index 00000000..224418fa
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/dnd/ResourceDropAdapterAssistant.java
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.dnd;
+
+import static com.google.common.collect.Iterables.transform;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.cdo.core.util.CDOFunctions;
+import org.eclipse.papyrus.cdo.core.util.CDOPredicates;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.handlers.ExportModelHandler;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIModel;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.navigator.CommonDropAdapter;
+import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
+import org.eclipse.ui.navigator.ICommonContentExtensionSite;
+import org.eclipse.ui.navigator.ICommonContentProvider;
+import org.eclipse.ui.navigator.ICommonLabelProvider;
+
+import com.google.common.base.Function;
+import com.google.common.base.Functions;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+
+/**
+ * Drop-adapter assistant for dropping CDO resources into the Project Explorer to export them.
+ */
+public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
+
+ private static final IStatus INVALID_DROP = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Invalid drop."); //$NON-NLS-1$
+
+ private static final IStatus VALID_DROP = Status.OK_STATUS;
+
+ public ResourceDropAdapterAssistant() {
+ super();
+ }
+
+ @Override
+ public IStatus validateDrop(Object target, int operation, TransferData transferType) {
+ IStatus result = INVALID_DROP;
+
+ // we can drop a local-selection transfer consisting of DI models onto a workspace container (project or folder)
+ if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType) && CDOPredicates.adaptsTo(IContainer.class).apply(target)) {
+ IStructuredSelection sel = CDOUtils.tryCast(LocalSelectionTransfer.getTransfer().getSelection(), IStructuredSelection.class);
+ if ((sel != null) && !sel.isEmpty() && Iterables.all((List<?>) sel.toList(), CDOPredicates.adaptsTo(DIModel.class))) {
+ result = VALID_DROP;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) {
+ IStatus result = INVALID_DROP;
+
+ IStructuredSelection sel = CDOUtils.tryCast(LocalSelectionTransfer.getTransfer().getSelection(), IStructuredSelection.class);
+ if ((sel != null) && !sel.isEmpty()) {
+ IContainer container = CDOUtils.adapt(aTarget, IContainer.class);
+ if (container != null) {
+ Function<Object, URI> uriFunction = Functions.compose(new Function<DIModel, URI>() {
+
+ @Override
+ public URI apply(DIModel input) {
+ return input.getResource().getURI();
+ }
+ }, CDOFunctions.adapt(DIModel.class));
+
+ List<URI> uris = Lists.newArrayList(transform((List<?>) sel.toList(), uriFunction));
+ ExportModelHandler.exportModels(container, uris);
+ result = VALID_DROP;
+ }
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * Navigator content extensions require a content provider even if they have no content to provide, only a drop assistant.
+ * So, this makes the <i>Common Navigator</i> happy.
+ */
+ public static final class DummyContent implements ICommonContentProvider {
+
+ private static final Object[] NOTHING = {};
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return NOTHING;
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ return NOTHING;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return false;
+ }
+
+ @Override
+ public void dispose() {
+ // pass
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // pass
+ }
+
+ @Override
+ public void restoreState(IMemento aMemento) {
+ // pass
+ }
+
+ @Override
+ public void saveState(IMemento aMemento) {
+ // pass
+ }
+
+ @Override
+ public void init(ICommonContentExtensionSite aConfig) {
+ // pass
+ }
+
+ }
+
+ /**
+ * Navigator content extensions require a label provider even if they have no content to provide, only a drop assistant.
+ * So, this makes the <i>Common Navigator</i> happy.
+ */
+ public static final class DummyLabels extends LabelProvider implements ICommonLabelProvider {
+
+ @Override
+ public void restoreState(IMemento aMemento) {
+ // pass
+ }
+
+ @Override
+ public void saveState(IMemento aMemento) {
+ // pass
+ }
+
+ @Override
+ public String getDescription(Object anElement) {
+ return null;
+ }
+
+ @Override
+ public void init(ICommonContentExtensionSite aConfig) {
+ // pass
+ }
+
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnEditorAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnEditorAdapter.java
new file mode 100755
index 00000000..a0a89f79
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnEditorAdapter.java
@@ -0,0 +1,254 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CommitException;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.PartInitException;
+
+import com.google.common.collect.Maps;
+
+/**
+ * This is the DawnEditorAdapter type. Enjoy.
+ */
+public class DawnEditorAdapter
+ implements IDawnEditor {
+
+ private static Map<IEditorPart, IDawnEditor> ADAPTERS = Maps.newHashMap();
+
+ private final DiagramDocumentEditor diagramEditor;
+
+ private IDawnEditorSupport editorSupport;
+
+ private CDOView view;
+
+ private String contributorID;
+
+ public DawnEditorAdapter(DiagramDocumentEditor diagramEditor) {
+ this.diagramEditor = diagramEditor;
+
+ ADAPTERS.put(diagramEditor, this);
+ }
+
+ DiagramDocumentEditor getDiagramEditor() {
+ return diagramEditor;
+ }
+
+ public static IDawnEditor getDawnEditor(IEditorPart editor) {
+ return ADAPTERS.get(editor);
+ }
+
+ static void removeAdapter(IEditorPart editor) {
+ ADAPTERS.remove(editor);
+ }
+
+ @Override
+ public CDOView getView() {
+ return view;
+ }
+
+ void setView(CDOView view) {
+ this.view = view;
+ }
+
+ @Override
+ public String getContributorID() {
+ if (contributorID == null) {
+ contributorID = determineEditorID(diagramEditor);
+ }
+
+ return contributorID;
+ }
+
+ @Override
+ public void setDirty() {
+ IDocumentProvider documentProvider = diagramEditor
+ .getDocumentProvider();
+ if (documentProvider != null) {
+ documentProvider.setCanSaveDocument(getEditorInput());
+ }
+ }
+
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ if ((adapter == DiagramDocumentEditor.class)
+ || (adapter == DiagramEditor.class)) {
+ return diagramEditor;
+ }
+
+ return diagramEditor.getAdapter(adapter);
+ }
+
+ private String determineEditorID(DiagramDocumentEditor editor) {
+ String result = null;
+
+ // look for the generated ID constant
+ for (Class<?> clazz = editor.getClass(); (clazz != null)
+ && (clazz != Object.class); clazz = clazz.getSuperclass()) {
+
+ try {
+ Field idField = clazz.getField("ID"); //$NON-NLS-1$
+ int modifiers = idField.getModifiers();
+ if ((idField.getType() == String.class)
+ && Modifier.isStatic(modifiers)
+ && Modifier.isFinal(modifiers)
+ && Modifier.isPublic(modifiers)) {
+
+ result = (String) idField.get(null);
+ }
+ } catch (Exception e) {
+ // it's OK. No such field, that's fine. Try the superclass
+ }
+ }
+
+ if (result == null) {
+ // this is the default ID pattern generated for Papyrus editors
+ result = editor.getClass().getName() + "ID"; //$NON-NLS-1$
+ }
+
+ return result;
+ }
+
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+ CDOView view = getView();
+
+ // the Papyrus diagram editors don't save; the multi-editor does.
+ // But, we know that save is commit, so do that
+ if (view instanceof CDOTransaction) {
+ try {
+ ((CDOTransaction) view).commit(monitor);
+ } catch (CommitException e) {
+ Activator.log.error("Failed to commit transaction to save editor.", e); //$NON-NLS-1$
+ }
+ } else {
+ diagramEditor.doSave(monitor);
+ }
+ }
+
+ //
+ // Delegation methods
+ //
+
+ @Override
+ public boolean isDirty() {
+ return diagramEditor.isDirty();
+ }
+
+ @Override
+ public IDawnEditorSupport getDawnEditorSupport() {
+ return editorSupport;
+ }
+
+ void setEditorSupport(IDawnEditorSupport editorSupport) {
+ this.editorSupport = editorSupport;
+ }
+
+ @Override
+ public IEditorInput getEditorInput() {
+ return diagramEditor.getEditorInput();
+ }
+
+ @Override
+ public IEditorSite getEditorSite() {
+ return diagramEditor.getEditorSite();
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input)
+ throws PartInitException {
+
+ diagramEditor.init(site, input);
+ }
+
+ @Override
+ public void addPropertyListener(IPropertyListener listener) {
+ diagramEditor.addPropertyListener(listener);
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ diagramEditor.createPartControl(parent);
+ }
+
+ @Override
+ public void dispose() {
+ diagramEditor.dispose();
+ }
+
+ @Override
+ public IWorkbenchPartSite getSite() {
+ return diagramEditor.getSite();
+ }
+
+ @Override
+ public String getTitle() {
+ return diagramEditor.getTitle();
+ }
+
+ @Override
+ public Image getTitleImage() {
+ return diagramEditor.getTitleImage();
+ }
+
+ @Override
+ public String getTitleToolTip() {
+ return diagramEditor.getTitleToolTip();
+ }
+
+ @Override
+ public void removePropertyListener(IPropertyListener listener) {
+ diagramEditor.removePropertyListener(listener);
+ }
+
+ @Override
+ public void setFocus() {
+ diagramEditor.setFocus();
+ }
+
+ @Override
+ public void doSaveAs() {
+ diagramEditor.doSaveAs();
+ }
+
+ @Override
+ public boolean isSaveAsAllowed() {
+ return diagramEditor.isSaveAsAllowed();
+ }
+
+ @Override
+ public boolean isSaveOnCloseNeeded() {
+ return diagramEditor.isSaveOnCloseNeeded();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnGraphicalEditorSupport.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnGraphicalEditorSupport.java
new file mode 100755
index 00000000..9c0388b8
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnGraphicalEditorSupport.java
@@ -0,0 +1,247 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.dawn.gmf.editors.impl.DawnGMFEditorSupport;
+import org.eclipse.emf.cdo.dawn.gmf.synchronize.DawnConflictHelper;
+import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.ui.parts.GraphicalEditor;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramDropTargetListener;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.util.TransferDropTargetListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.cdo.core.resource.CDOAwareModelSet;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.decorators.CDOStateAdapter;
+import org.eclipse.papyrus.cdo.internal.ui.dnd.CDOResourceURITransferData;
+import org.eclipse.papyrus.cdo.internal.ui.dnd.ResourceDropActionDelegate;
+import org.eclipse.papyrus.cdo.internal.ui.util.UIUtil;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.DefaultGraphicalEditorSupport;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IConflictingEditPartFilter;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
+import org.eclipse.ui.part.PluginTransfer;
+import org.eclipse.ui.part.PluginTransferData;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Maps;
+
+/**
+ * This is the DawnGraphicalEditorSupport type. Enjoy.
+ */
+public class DawnGraphicalEditorSupport extends DefaultGraphicalEditorSupport {
+
+ private final ServicesRegistry registry;
+
+ public DawnGraphicalEditorSupport(ServicesRegistry registry) {
+ super();
+
+ this.registry = registry;
+ }
+
+ @Override
+ public void initialize(GraphicalEditor editor) {
+ if (editor instanceof DiagramDocumentEditor) {
+ DiagramDocumentEditor diagramEditor = (DiagramDocumentEditor) editor;
+
+ CDOView view = getCDOView();
+ if (view != null) {
+ initialize(diagramEditor, view);
+ }
+
+ initializeCDOResourceDropSupport(diagramEditor);
+ }
+
+ super.initialize(editor);
+ }
+
+ protected void initialize(final DiagramDocumentEditor diagramEditor, CDOView view) {
+ DawnEditorAdapter adapter = new DawnEditorAdapter(diagramEditor);
+ final DawnGMFEditorSupport dawnSupport = new PapyrusGMFEditorSupport(adapter);
+
+ adapter.setEditorSupport(dawnSupport);
+ adapter.setView(getCDOView());
+ dawnSupport.setView(adapter.getView());
+
+ // after the root edit part has been created, inject a conflicting edit
+ // part filter
+ UIUtil.later(new Runnable() {
+
+ @Override
+ public void run() {
+ DiagramEditPart diagramEP = diagramEditor.getDiagramEditPart();
+ if (diagramEP instanceof PapyrusDiagramEditPart) {
+ ((PapyrusDiagramEditPart) diagramEP).setConflictingEditPartFilter(createConflictingEditPartFilter());
+ }
+ }
+ });
+
+ dawnSupport.registerListeners();
+
+ // find and process objects locked remotely
+ final Map<Object, DawnState> remoteLocks = getRemoteLocks(diagramEditor);
+ if (!remoteLocks.isEmpty()) {
+ // post for later because the editor isn't yet connected to its
+ // editor site in the workbench
+ UIUtil.later(new Runnable() {
+
+ @Override
+ public void run() {
+ dawnSupport.handleRemoteLockChanges(remoteLocks);
+
+ for (Object next : remoteLocks.keySet()) {
+ final EObject element = CDOUtil.getEObject((CDOObject) next);
+ View view = DawnDiagramUpdater.findViewByContainer(element);
+
+ CDOStateAdapter.setState(view, remoteLocks.get(next));
+ }
+ }
+ });
+ }
+ }
+
+ CDOView getCDOView() {
+ CDOView result = null;
+
+ try {
+ ModelSet modelSet = registry.getService(ModelSet.class);
+ if (modelSet instanceof CDOAwareModelSet) {
+ result = ((CDOAwareModelSet) modelSet).getCDOView();
+ }
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+
+ return result;
+ }
+
+ private Map<Object, DawnState> getRemoteLocks(DiagramDocumentEditor diagramEditor) {
+
+ Map<Object, DawnState> result = Maps.newHashMap();
+
+ Diagram diagram = diagramEditor.getDiagram();
+ if (diagram != null) {
+ Iterator<EObject> iter = EcoreUtil.getAllProperContents(Collections.singleton(diagram), false);
+
+ while (iter.hasNext()) {
+ CDOObject next = CDOUtils.getCDOObject(iter.next());
+ if ((next != null) && CDOUtils.isLocked(next, true)) {
+ result.put(next, DawnState.LOCKED_REMOTELY);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private IConflictingEditPartFilter createConflictingEditPartFilter() {
+ return new IConflictingEditPartFilter() {
+
+ @Override
+ public boolean isConflicting(EditPart editPart) {
+ Object model = editPart.getModel();
+ return (model instanceof EObject) && DawnConflictHelper.isConflicted((EObject) model);
+ }
+ };
+ }
+
+ protected void initializeCDOResourceDropSupport(final DiagramDocumentEditor diagramEditor) {
+ // after the root edit part has been created, inject drop-target listener for dropping hyperlinks to CDO resources by URI
+ UIUtil.later(new Runnable() {
+
+ @Override
+ public void run() {
+ EditPartViewer viewer = diagramEditor.getDiagramGraphicalViewer();
+ viewer.addDropTargetListener(createCDOResourceURIDropTargetListener(viewer));
+ }
+ });
+ }
+
+ private TransferDropTargetListener createCDOResourceURIDropTargetListener(EditPartViewer viewer) {
+ return new DiagramDropTargetListener(viewer, PluginTransfer.getInstance()) {
+
+ @Override
+ protected boolean isDataTransfered() {
+ // I only have my data when the actual transfer data carrying my URIs is available
+ return getCurrentEvent().data != null;
+ }
+
+ @Override
+ protected List<EObject> getObjectsBeingDropped() {
+ List<EObject> result = null;
+ CDOResourceURITransferData uriData = null;
+
+ if (PluginTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType) && !localTransferHasObjectFromThisRepo()) {
+ Object data = getCurrentEvent().data;
+ if (data instanceof PluginTransferData) {
+ PluginTransferData ptData = (PluginTransferData) data;
+ if (ResourceDropActionDelegate.DROP_ACTION_ID.equals(ptData.getExtensionId())) {
+ uriData = CDOResourceURITransferData.deserialize(ptData.getData());
+ }
+ }
+ }
+
+ if (uriData == null) {
+ result = Collections.emptyList();
+ } else {
+ // convert the URI transfer data to an EObject so that the drag-and-drop
+ // system doesn't bomb on ClassCastExceptions
+ result = Collections.singletonList(uriData.asEObject());
+ }
+
+ return result;
+ }
+ };
+ }
+
+ boolean localTransferHasObjectFromThisRepo() {
+ boolean result = false;
+
+ CDOView view = getCDOView();
+ if (view != null) {
+ IStructuredSelection sel = CDOUtils.tryCast(LocalSelectionTransfer.getTransfer().getSelection(), IStructuredSelection.class);
+ if ((sel != null) && !sel.isEmpty()) {
+ for (EObject next : Iterables.filter(sel.toList(), EObject.class)) {
+ CDOObject cdo = CDOUtils.getCDOObject(next);
+ if ((cdo != null) && (cdo.cdoView().getSession() == view.getSession())) {
+ result = true;
+ break;
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnGraphicalEditorSupportServiceFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnGraphicalEditorSupportServiceFactory.java
new file mode 100755
index 00000000..23116317
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/DawnGraphicalEditorSupportServiceFactory.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import org.eclipse.papyrus.infra.core.services.IServiceFactory;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+
+
+/**
+ * This is the DawnGraphicalEditorSupportServiceFactory type. Enjoy.
+ */
+public class DawnGraphicalEditorSupportServiceFactory
+ implements IServiceFactory {
+
+ private ServicesRegistry registry;
+
+ private DawnGraphicalEditorSupport service;
+
+ public DawnGraphicalEditorSupportServiceFactory() {
+ super();
+ }
+
+ @Override
+ public void init(ServicesRegistry servicesRegistry)
+ throws ServiceException {
+
+ this.registry = servicesRegistry;
+ }
+
+ @Override
+ public void startService()
+ throws ServiceException {
+
+ // pass
+ }
+
+ @Override
+ public void disposeService()
+ throws ServiceException {
+
+ if (service == null) {
+ // TODO clean up?
+ }
+ }
+
+ @Override
+ public Object createServiceInstance()
+ throws ServiceException {
+
+ service = new DawnGraphicalEditorSupport(registry);
+ return service;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorInput.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorInput.java
new file mode 100755
index 00000000..0a09c754
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorInput.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.ui.editor.IPapyrusPageInput;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ * This is the PapyrusCDOEditorInput type. Enjoy.
+ */
+public class PapyrusCDOEditorInput extends URIEditorInput {
+
+ public PapyrusCDOEditorInput(URI uri) {
+ this(uri, uri.trimFileExtension().lastSegment());
+ }
+
+ public PapyrusCDOEditorInput(URI uri, String name) {
+ super(uri, name);
+ }
+
+ /**
+ * Editors on CDO resources cannot be re-opened without re-connecting the
+ * repository, so return {@code null}.
+ */
+ @Override
+ public IPersistableElement getPersistable() {
+ return null;
+ }
+
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ Object result;
+
+ if (adapter == URI.class) {
+ result = getURI();
+ } else {
+ result = super.getAdapter(adapter);
+ }
+
+ return result;
+ }
+
+ /**
+ * A specialization of the CDO editor input that supports specifying editor pages to open in addition.
+ */
+ public static class PageInput extends PapyrusCDOEditorInput implements IPapyrusPageInput {
+
+ private static final URI[] NO_URIS = {};
+
+ private final URI[] pageURIs;
+
+ private final boolean closeOtherPages;
+
+ public PageInput(URI uri) {
+ this(uri, NO_URIS, false);
+ }
+
+ public PageInput(URI uri, URI[] pageURIs, boolean closeOtherPages) {
+ super(uri);
+
+ this.pageURIs = pageURIs;
+ this.closeOtherPages = closeOtherPages;
+ }
+
+
+ @Override
+ public URI[] getPages() {
+ return pageURIs;
+ }
+
+ @Override
+ public boolean closeOtherPages() {
+ return closeOtherPages;
+ }
+
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorManager.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorManager.java
new file mode 100755
index 00000000..0c33ae18
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorManager.java
@@ -0,0 +1,517 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Future;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.ui.checkouts.CDOModelEditorOpener;
+import org.eclipse.emf.cdo.internal.ui.InteractiveConflictHandlerSelector;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.ui.CDOInvalidRootAgent;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.internal.cdo.transaction.CDOHandlingConflictResolver;
+import org.eclipse.emf.spi.cdo.CDOMergingConflictResolver;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.ui.parts.GraphicalEditor;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.net4j.util.ReflectUtil;
+import org.eclipse.net4j.util.lifecycle.ILifecycle;
+import org.eclipse.net4j.util.lifecycle.LifecycleEventAdapter;
+import org.eclipse.papyrus.cdo.core.IResourceSetDisposalApprover;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.util.UIUtil;
+import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IComponentPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageLifeCycleEventsListener;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
+import org.eclipse.papyrus.infra.ui.editor.CoreMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.EditorUtils;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+
+import com.google.common.base.Optional;
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the PapyrusCDOEditorManager type. Enjoy.
+ */
+public class PapyrusCDOEditorManager {
+
+ public static final PapyrusCDOEditorManager INSTANCE = new PapyrusCDOEditorManager();
+
+ private static final boolean INTERACTIVE_CONFLICT_RESOLUTION = !"false"
+ .equalsIgnoreCase(System.getProperty("cdo.interactive.conflict.resolution"));
+
+ private final BiMap<IEditorPart, CDOView> editors = HashBiMap.create();
+
+ private final Map<IEditorPart, Map<IEditorPart, CDOInvalidRootAgent>> invalidRootAgents = new HashMap();
+
+ private final Cache<IWorkbenchPage, EditorListener> editorListeners = CacheBuilder.newBuilder().weakKeys().build(new CacheLoader<IWorkbenchPage, EditorListener>() {
+
+ @Override
+ public EditorListener load(IWorkbenchPage key) {
+ EditorListener result = new EditorListener();
+ key.addPartListener(result);
+ return result;
+ }
+ });
+
+ private IResourceSetDisposalApprover disposalApprover = new ResourceSetDisposalApprover();
+
+ private PapyrusCDOEditorManager() {
+ super();
+ }
+
+ public IEditorPart openEditor(IWorkbenchPage page, CDOResource diResource) throws PartInitException {
+ URI uri = diResource.getURI();
+ String lastSegment = uri.trimFileExtension().lastSegment();
+ return openEditor(page, uri, lastSegment);
+ }
+
+ public IEditorPart openEditor(IWorkbenchPage page, URI uri, String name) throws PartInitException {
+ return openEditor(page, new PapyrusCDOEditorInput(uri, name));
+ }
+
+ public IEditorPart openEditor(IWorkbenchPage page, IEditorInput input) throws PartInitException {
+ URI uri = EditorUtils.getResourceURI(input);
+
+ // FIXME(Eike) Port to an API on CDOCheckouts that allows for veto of user-initiated closing of a checkout
+ // IInternalPapyrusRepository repository = getRepository(uri);
+ // repository.addResourceSetDisposalApprover(disposalApprover);
+
+ IEditorPart result = page.openEditor(input, PapyrusMultiDiagramEditor.EDITOR_ID);
+
+ final EditingDomain domain = result.getAdapter(EditingDomain.class);
+ ResourceSet resourceSet = domain.getResourceSet();
+
+ CDOView view = CDOUtil.getView(resourceSet);
+ add(view, result);
+
+ if (view instanceof CDOTransaction) {
+ CDOTransaction transaction = (CDOTransaction) view;
+
+ if (INTERACTIVE_CONFLICT_RESOLUTION) {
+ CDOHandlingConflictResolver conflictResolver = new CDOHandlingConflictResolver() {
+ @Override
+ protected boolean handleConflict(final ConflictHandler conflictHandler, final long lastNonConflictTimeStamp) {
+ if (domain instanceof TransactionalEditingDomain) {
+ TransactionalEditingDomain transactionalDomain = (TransactionalEditingDomain) domain;
+ final boolean[] handled = { false };
+
+ CommandStack commandStack = domain.getCommandStack();
+ commandStack.execute(new RecordingCommand(transactionalDomain) {
+ @Override
+ protected void doExecute() {
+ handled[0] = superHandleConflict(conflictHandler, lastNonConflictTimeStamp);
+ }
+ });
+
+ return handled[0];
+ }
+
+ return superHandleConflict(conflictHandler, lastNonConflictTimeStamp);
+ }
+
+ private boolean superHandleConflict(final ConflictHandler conflictHandler, final long lastNonConflictTimeStamp) {
+ return super.handleConflict(conflictHandler, lastNonConflictTimeStamp);
+ }
+ };
+
+ conflictResolver.setConflictHandlerSelector(new InteractiveConflictHandlerSelector());
+ transaction.options().addConflictResolver(conflictResolver);
+ } else {
+ transaction.options().addConflictResolver(new CDOMergingConflictResolver());
+ }
+
+ ServicesRegistry services = result.getAdapter(ServicesRegistry.class);
+ view.addListener(new PapyrusTransactionListener(services, resourceSet));
+ }
+
+ return result;
+ }
+
+ void add(final CDOView view, final IEditorPart editor) {
+ editors.put(editor, view);
+
+ if (view.isReadOnly() && editor instanceof CoreMultiDiagramEditor) {
+ final CoreMultiDiagramEditor coreEditor = (CoreMultiDiagramEditor) editor;
+ ISashWindowsContainer sashWindowsContainer = coreEditor.getISashWindowsContainer();
+
+ for (IEditorPart editorPart : sashWindowsContainer.getVisibleIEditorParts()) {
+ addInvalidRootAgent(coreEditor, editorPart, view);
+ }
+
+ sashWindowsContainer.addPageLifeCycleListener(new IPageLifeCycleEventsListener() {
+ @Override
+ public void pageOpened(IPage page) {
+ if (page instanceof IEditorPage) {
+ IEditorPage editorPage = (IEditorPage) page;
+ addInvalidRootAgent(coreEditor, editorPage.getIEditorPart(), view);
+ }
+ }
+
+ @Override
+ public void pageClosed(IPage page) {
+ if (page instanceof IEditorPage) {
+ IEditorPage editorPage = (IEditorPage) page;
+ removeInvalidRootAgent(coreEditor, editorPage.getIEditorPart());
+ }
+ }
+
+ @Override
+ public void pageChanged(IPage page) {
+ // Do nothing.
+ }
+
+ @Override
+ public void pageDeactivated(IPage page) {
+ // Do nothing.
+ }
+
+ @Override
+ public void pageActivated(IPage page) {
+ // Do nothing.
+ }
+
+ @Override
+ public void pageAboutToBeOpened(IPage page) {
+ // Do nothing.
+ }
+
+ @Override
+ public void pageAboutToBeClosed(IPage page) {
+ // Do nothing.
+ }
+ });
+ }
+
+ view.addListener(new CDOViewListener(editor));
+ try {
+ editorListeners.get(editor.getSite().getPage(), new Callable<EditorListener>() {
+
+ @Override
+ public EditorListener call() throws Exception {
+ // Probably not necessary. But the previous API is deprecated. It is probably safer
+ // to return a non-null EditorListener, but we're not supposed to enter this method anyway
+ EditorListener listener = new EditorListener();
+ editor.getSite().getPage().addPartListener(listener);
+ return listener;
+ }
+ }).addEditor(editor);
+ } catch (Exception e) {
+ // this should be impossible with our cache loader
+ Activator.log.error(e);
+ }
+ }
+
+ private void addInvalidRootAgent(IEditorPart coreEditor, IEditorPart editorPart, final CDOView view) {
+ final GraphicalViewer graphicalViewer = getGraphicalViewer(editorPart);
+ if (graphicalViewer != null) {
+ CDOInvalidRootAgent invalidRootAgent = new CDOInvalidRootAgent(view) {
+ private Map<Object, Resource> temporaryResources = new HashMap<Object, Resource>();
+ private int lastID;
+
+ @Override
+ protected Object createEmptyRoot(CDOObject invalidRoot) {
+ Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
+ diagram.setName("Unavailable");
+
+ Resource resource = new ResourceImpl(URI.createURI("unavailable://" + (++lastID)));
+ resource.getContents().add(diagram);
+
+ view.getResourceSet().getResources().add(resource);
+ temporaryResources.put(diagram, resource);
+ return diagram;
+ }
+
+ @Override
+ protected void setRootToUI(Object root) {
+ EditPart oldRoot = graphicalViewer.getContents();
+ Resource resource = temporaryResources.remove(oldRoot);
+ if (resource != null) {
+ view.getResourceSet().getResources().remove(resource);
+ }
+
+ graphicalViewer.setContents(root);
+ }
+
+ @Override
+ protected Object getRootFromUI() {
+ return graphicalViewer.getContents().getModel();
+ }
+ };
+
+ Map<IEditorPart, CDOInvalidRootAgent> map = invalidRootAgents.get(coreEditor);
+ if (map == null) {
+ map = new HashMap<IEditorPart, CDOInvalidRootAgent>();
+ invalidRootAgents.put(coreEditor, map);
+ }
+
+ map.put(editorPart, invalidRootAgent);
+ }
+ }
+
+ private void removeInvalidRootAgent(IEditorPart coreEditor, IEditorPart editorPart) {
+ Map<IEditorPart, CDOInvalidRootAgent> map = invalidRootAgents.get(coreEditor);
+ if (map != null) {
+ CDOInvalidRootAgent invalidRootAgent = map.remove(editorPart);
+ if (invalidRootAgent != null) {
+ invalidRootAgent.dispose();
+ }
+ }
+ }
+
+ private GraphicalViewer getGraphicalViewer(IEditorPart editorPart) {
+ if (editorPart instanceof GraphicalEditor) {
+ GraphicalEditor graphicalEditor = (GraphicalEditor) editorPart;
+
+ Method method = ReflectUtil.getMethod(GraphicalEditor.class, "getGraphicalViewer");
+ return (GraphicalViewer) ReflectUtil.invokeMethod(method, graphicalEditor);
+ }
+
+ return null;
+ }
+
+ private void closed(IEditorPart coreEditor) {
+ CDOView view = editors.remove(coreEditor);
+ DawnEditorAdapter.removeAdapter(coreEditor);
+
+ Map<IEditorPart, CDOInvalidRootAgent> map = invalidRootAgents.remove(coreEditor);
+ if (map != null) {
+ for (CDOInvalidRootAgent invalidRootAgent : map.values()) {
+ invalidRootAgent.dispose();
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ private class CDOViewListener extends LifecycleEventAdapter {
+
+ private final IEditorPart editor;
+
+ CDOViewListener(IEditorPart editor) {
+ this.editor = editor;
+ }
+
+ @Override
+ protected void onDeactivated(ILifecycle lifecycle) {
+ UIUtil.later(new Runnable() {
+
+ @Override
+ public void run() {
+ if (editors.containsKey(editor)) {
+ editor.getSite().getPage().closeEditor(editor, false);
+ }
+ }
+ });
+
+ lifecycle.removeListener(this);
+ }
+ }
+
+ private class EditorListener implements IPartListener, IPageLifeCycleEventsListener {
+
+ private final Set<IEditorPart> editors = Sets.newHashSet();
+
+ void addEditor(IEditorPart editor) {
+ editors.add(editor);
+
+ Optional<ISashWindowsContainer> sashContainer = AdapterUtils.adapt(editor, ISashWindowsContainer.class);
+ if (sashContainer.isPresent()) {
+ sashContainer.get().addPageLifeCycleListener(this);
+ }
+ }
+
+ @Override
+ public void partClosed(IWorkbenchPart part) {
+ if (editors.remove(part)) {
+ IEditorPart editor = (IEditorPart) part;
+ closed(editor);
+ }
+
+ Optional<ISashWindowsContainer> sashContainer = AdapterUtils.adapt(part, ISashWindowsContainer.class);
+ if (sashContainer.isPresent()) {
+ sashContainer.get().removePageLifeCycleListener(this);
+ sashContainer.get().visit(new IPageVisitor() {
+
+ @Override
+ public void accept(IEditorPage page) {
+ pageClosed(page);
+ }
+
+ @Override
+ public void accept(IComponentPage page) {
+ // pass
+ }
+ });
+ }
+ }
+
+ @Override
+ public void pageClosed(IPage page) {
+ if (page instanceof IEditorPage) {
+ closed(((IEditorPage) page).getIEditorPart());
+ }
+ }
+
+ @Override
+ public void partActivated(IWorkbenchPart part) {
+ // pass
+ }
+
+ @Override
+ public void partBroughtToTop(IWorkbenchPart part) {
+ // pass
+ }
+
+ @Override
+ public void partDeactivated(IWorkbenchPart part) {
+ // pass
+ }
+
+ @Override
+ public void partOpened(IWorkbenchPart part) {
+ // pass
+ }
+
+ @Override
+ public void pageChanged(IPage newPage) {
+ // pass
+ }
+
+ @Override
+ public void pageOpened(IPage page) {
+ // pass
+ }
+
+ @Override
+ public void pageActivated(IPage page) {
+ // pass
+ }
+
+ @Override
+ public void pageDeactivated(IPage page) {
+ // pass
+ }
+
+ @Override
+ public void pageAboutToBeOpened(IPage page) {
+ // pass
+ }
+
+ @Override
+ public void pageAboutToBeClosed(IPage page) {
+ // pass
+ }
+ }
+
+ private class ResourceSetDisposalApprover implements IResourceSetDisposalApprover {
+
+ @Override
+ public DisposeAction disposalRequested(CDOCheckout checkout, Collection<ResourceSet> resourceSets) {
+
+ DisposeAction result = DisposeAction.CLOSE;
+ final List<IEditorPart> dirty = Lists.newArrayList();
+
+ for (ResourceSet next : resourceSets) {
+ CDOView view = CDOUtil.getView(next);
+ IEditorPart editor = editors.inverse().get(view);
+
+ if ((editor != null) && editor.isDirty()) {
+ dirty.add(editor);
+ }
+ }
+
+ if (!dirty.isEmpty()) {
+ Future<Integer> dlgResult = UIUtil.call(new Callable<Integer>() {
+
+ @Override
+ public Integer call() {
+ MessageDialog dlg = new MessageDialog(dirty.get(0).getSite().getShell(), Messages.PapyrusCDOEditorManager_1, null, Messages.PapyrusCDOEditorManager_2, MessageDialog.QUESTION_WITH_CANCEL, //
+ new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 2);
+
+ return dlg.open();
+ }
+ });
+
+ try {
+ switch (dlgResult.get()) {
+ case 0: // Yes
+ result = DisposeAction.SAVE;
+ break;
+ case 1: // No
+ result = DisposeAction.CLOSE;
+ break;
+ case 2: // Cancel
+ result = DisposeAction.NONE;
+ break;
+ default:
+ break;
+ }
+ } catch (Exception e) {
+ // shouldn't happen because the UIUtil doesn't support
+ // interruption as it runs stuff on the UI thread
+ Activator.log.error(e);
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorOpener.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorOpener.java
new file mode 100755
index 00000000..0b657c98
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusCDOEditorOpener.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Eike Stepper (CEA) - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import org.eclipse.emf.cdo.ui.CDOEditorOpener;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * @author Eike Stepper
+ */
+public class PapyrusCDOEditorOpener extends CDOEditorOpener.Default {
+ public static final String ID = "org.eclipse.papyrus.cdo.ui.editors.PapyrusCDOEditorOpener"; //$NON-NLS-1$
+
+ public PapyrusCDOEditorOpener() {
+ }
+
+ @Override
+ protected IEditorPart doOpenEditor(IWorkbenchPage page, URI uri) {
+ String name = uri.trimFileExtension().lastSegment();
+
+ try {
+ return PapyrusCDOEditorManager.INSTANCE.openEditor(page, uri, name);
+ } catch (PartInitException e) {
+ StatusManager.getManager().handle(e.getStatus(),
+ StatusManager.SHOW);
+ }
+
+ return null;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFEditorSupport.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFEditorSupport.java
new file mode 100755
index 00000000..3efb5a00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFEditorSupport.java
@@ -0,0 +1,287 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.dawn.appearance.DawnElementStylizer;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.dawn.gmf.appearance.DawnAppearancer;
+import org.eclipse.emf.cdo.dawn.gmf.editors.impl.DawnGMFEditorSupport;
+import org.eclipse.emf.cdo.dawn.gmf.notifications.impl.DawnGMFHandler;
+import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
+import org.eclipse.emf.cdo.dawn.notifications.BasicDawnListener;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.emf.cdo.dawn.ui.stylizer.DawnElementStylizerRegistry;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.util.UIUtil;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Maps;
+
+/**
+ * This is the PapyrusGMFEditorSupport type. Enjoy.
+ */
+public class PapyrusGMFEditorSupport
+ extends DawnGMFEditorSupport {
+
+ private static final Predicate<EStructuralFeature.Setting> IS_VIEW_REFERENCE = new Predicate<EStructuralFeature.Setting>() {
+
+ @Override
+ public boolean apply(EStructuralFeature.Setting input) {
+ return input.getEStructuralFeature() == NotationPackage.Literals.VIEW__ELEMENT;
+ }
+ };
+
+ private static final Function<EStructuralFeature.Setting, View> OWNER_VIEW = new Function<EStructuralFeature.Setting, View>() {
+
+ @Override
+ public View apply(EStructuralFeature.Setting input) {
+ return (View) input.getEObject();
+ }
+ };
+
+ /**
+ * @param editor
+ */
+ public PapyrusGMFEditorSupport(IDawnEditor editor) {
+ super(editor);
+ }
+
+ @Override
+ protected DawnGMFHandler createDawnGMFHandler(IDawnEditor editor) {
+ return new PapyrusGMFHandler(editor);
+ }
+
+ @Override
+ protected BasicDawnListener getLockingHandler() {
+ return new PapyrusGMFLockingHandler(getEditor());
+ }
+
+ @Override
+ public void lockObject(Object objectToBeLocked) {
+ if (objectToBeLocked instanceof EditPart) {
+ super.lockObject(objectToBeLocked);
+
+ // the super implementation locked the semantic element, so update
+ // its presentation
+ CDOObject cdo = CDOUtils
+ .getCDOObject(getSemanticElement((EditPart) objectToBeLocked));
+ if (cdo != null) {
+ updateAppearance(cdo);
+ }
+ } else {
+ EObject element = EMFHelper.getEObject(objectToBeLocked);
+ CDOObject cdo = (element == null)
+ ? null
+ : CDOUtils.getCDOObject(element);
+
+ if (element != null) {
+ CDOUtils.lock(cdo);
+
+ updateAppearance(cdo);
+
+ // and update any views in my diagram
+ for (View next : getViewsOfElement(element)) {
+ cdo = CDOUtils.getCDOObject(next);
+ if (cdo != null) {
+ CDOUtils.lock(cdo);
+ updateAppearance(cdo);
+ }
+ }
+
+ refresh();
+ }
+ }
+ }
+
+ private void updateAppearance(CDOObject cdoObject) {
+ EObject element = CDOUtil.getEObject(cdoObject);
+ DawnElementStylizer stylizer = DawnElementStylizerRegistry.instance
+ .getStylizer(element);
+
+ if (stylizer != null) {
+ if (cdoObject.cdoConflict()) {
+ stylizer.setConflicted(element,
+ DawnAppearancer.TYPE_CONFLICT_REMOTELY_AND_LOCALLY_CHANGED);
+ } else if (CDOUtils.isLocked(cdoObject, true)) {
+ stylizer.setLocked(element,
+ DawnAppearancer.TYPE_LOCKED_GLOBALLY);
+ } else if (CDOUtils.isLocked(cdoObject, false)) {
+ stylizer
+ .setLocked(element, DawnAppearancer.TYPE_LOCKED_LOCALLY);
+ } else {
+ stylizer.setDefault(element);
+ }
+ }
+ }
+
+ @Override
+ public void unlockObject(Object objectToBeUnlocked) {
+ if (objectToBeUnlocked instanceof EditPart) {
+ super.unlockObject(objectToBeUnlocked);
+
+ // the super implementation unlocked the semantic element, so update
+ // its presentation
+ CDOObject cdo = CDOUtils
+ .getCDOObject(getSemanticElement((EditPart) objectToBeUnlocked));
+ if (cdo != null) {
+ updateAppearance(cdo);
+ }
+ } else {
+ EObject element = EMFHelper.getEObject(objectToBeUnlocked);
+ CDOObject cdo = (element == null)
+ ? null
+ : CDOUtils.getCDOObject(element);
+
+ if (element != null) {
+ CDOUtils.unlock(cdo);
+
+ updateAppearance(cdo);
+
+ // and update any views in my diagram
+ for (View next : getViewsOfElement(element)) {
+ cdo = CDOUtils.getCDOObject(next);
+ if (cdo != null) {
+ CDOUtils.unlock(cdo);
+ updateAppearance(cdo);
+ }
+ }
+
+ refresh();
+ }
+ }
+ }
+
+ @Override
+ public void handleRemoteLockChanges(Map<Object, DawnState> changedObjects) {
+ if (UIUtil.ensureUIThread(this, changedObjects)) {
+ // filter the event to cover only the objects that are views in or
+ // have views in my diagram
+ Map<Object, DawnState> filtered = filter(changedObjects);
+ if (filtered != null) {
+ super.handleRemoteLockChanges(filtered);
+ }
+ }
+ }
+
+ protected Map<Object, DawnState> filter(
+ Map<Object, DawnState> changedObjects) {
+
+ Map<Object, DawnState> result = Maps.newHashMap(changedObjects);
+
+ if (filter(result.keySet(), getDiagramEditor(getEditor()))) {
+ if (result.isEmpty()) {
+ result = null;
+ }
+ }
+
+ return result;
+ }
+
+ public static View findView(DiagramDocumentEditor diagramEditor,
+ EObject element) {
+
+ View result = null;
+
+ Diagram diagram = diagramEditor.getDiagram();
+ View view = DawnDiagramUpdater.findViewByContainer(element);
+
+ if (view != null) {
+ if (EcoreUtil.isAncestor(diagram, view)) {
+ result = view;
+ }
+ } else {
+ // find the view of the element that is in my diagram
+ for (View next : getViewsOfElement(element)) {
+ if (EcoreUtil.isAncestor(diagram, next)) {
+ result = next;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public static Iterable<View> getViewsOfElement(EObject element) {
+ Iterable<View> result = Collections.emptyList();
+
+ ECrossReferenceAdapter xrefs = ECrossReferenceAdapter
+ .getCrossReferenceAdapter(element);
+ if (xrefs != null) {
+ Collection<EStructuralFeature.Setting> settings = xrefs
+ .getNonNavigableInverseReferences(element);
+ result = Iterables.transform(
+ Iterables.filter(settings, IS_VIEW_REFERENCE), OWNER_VIEW);
+ }
+
+ return result;
+
+ }
+
+ static boolean filter(Collection<?> objects,
+ DiagramDocumentEditor diagramEditor) {
+
+ boolean result = false;
+
+ for (Iterator<?> iter = objects.iterator(); iter.hasNext();) {
+ Object next = iter.next();
+
+ if (next instanceof CDOObject) {
+ EObject element = CDOUtil.getEObject((CDOObject) next);
+
+ // get the view of this element in the current diagram
+ View view = findView(diagramEditor, element);
+ if (view == null) {
+ iter.remove();
+ result = true;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public static EObject getSemanticElement(EditPart editPart) {
+ EObject result = null;
+
+ Object model = editPart.getModel();
+ if (model instanceof EObject) {
+ View view = DawnDiagramUpdater.findViewByContainer((EObject) model);
+ if (view != null) {
+ result = view.getElement();
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFHandler.java
new file mode 100755
index 00000000..41f5cf96
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFHandler.java
@@ -0,0 +1,242 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus - Fix memory leak (and failure of the refresh throttle) exposed by the test
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import static org.eclipse.emf.cdo.dawn.gmf.editors.impl.DawnGMFEditorSupport.getDiagramEditor;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta;
+import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.dawn.gmf.notifications.impl.DawnGMFHandler;
+import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.transaction.CDOTransactionConflictEvent;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.view.CDOViewInvalidationEvent;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.util.UIUtil;
+
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the PapyrusGMFHandler type. Enjoy.
+ */
+public class PapyrusGMFHandler extends DawnGMFHandler {
+
+ public PapyrusGMFHandler(IDawnEditor editor) {
+ super(editor);
+ }
+
+ @Override
+ public void attachingObject(CDOTransaction transaction, CDOObject object) {
+ // bug 404077: we don't need to refresh edit-parts for objects attached to the transaction
+ // because GMF will take care of refreshing edit-parts. So, suppress the super behaviour
+ }
+
+ @Override
+ public void handleViewInvalidationEvent(CDOViewInvalidationEvent event) {
+ if (UIUtil.ensureUIThread(this, event)) {
+ // filter the event to cover only the objects that are views in or
+ // have views in my diagram
+ CDOViewInvalidationEvent filtered = filter(event);
+ if (filtered != null) {
+ super.handleViewInvalidationEvent(filtered);
+ }
+ }
+ }
+
+ @Override
+ public void handleTransactionConflictEvent(CDOTransactionConflictEvent event) {
+ if (UIUtil.ensureUIThread(this, event)) {
+ // filter the event to cover only the objects that are views in or
+ // have views in my diagram
+ CDOTransactionConflictEvent filtered = filter(event);
+ if (filtered != null) {
+ super.handleTransactionConflictEvent(filtered);
+ }
+ }
+ }
+
+ protected CDOViewInvalidationEvent filter(final CDOViewInvalidationEvent event) {
+ CDOViewInvalidationEvent result = event;
+
+ boolean filtered = false;
+
+ final Set<CDOObject> dirty = Sets.newHashSet(event.getDirtyObjects());
+ final Set<CDOObject> detached = Sets.newHashSet(event.getDetachedObjects());
+ final Map<CDOObject, CDORevisionDelta> deltas = Maps.newHashMap(event.getRevisionDeltas());
+
+ filtered = filter(dirty) || filtered;
+ filtered = filter(detached) || filtered;
+ filtered = filter(deltas.keySet()) || filtered;
+
+ if (filtered) {
+ if (dirty.isEmpty() && detached.isEmpty() && deltas.isEmpty()) {
+ result = null;
+ } else {
+ result = new CDOViewInvalidationEvent() {
+
+ @Override
+ public CDOView getSource() {
+ return event.getSource();
+ }
+
+ @Override
+ public long getTimeStamp() {
+ return event.getTimeStamp();
+ }
+
+ @Override
+ public Map<CDOObject, CDORevisionDelta> getRevisionDeltas() {
+ return deltas;
+ }
+
+ @Override
+ public Set<CDOObject> getDirtyObjects() {
+ return dirty;
+ }
+
+ @Override
+ public Set<CDOObject> getDetachedObjects() {
+ return detached;
+ }
+ };
+ }
+ }
+
+ return result;
+ }
+
+ protected boolean filter(Collection<?> objects) {
+ return PapyrusGMFEditorSupport.filter(objects, getDiagramEditor(editor));
+ }
+
+ protected CDOTransactionConflictEvent filter(CDOTransactionConflictEvent event) {
+ CDOObject cdoObject = event.getConflictingObject();
+ EObject element = CDOUtil.getEObject(cdoObject);
+ DiagramDocumentEditor diagramEditor = getDiagramEditor(editor);
+
+ // get the view of this element in the current diagram
+ View view = PapyrusGMFEditorSupport.findView(diagramEditor, element);
+
+ return (view == null) ? null : event;
+ }
+
+ @Override
+ public void modifyingObject(CDOTransaction transaction, final CDOObject object, CDOFeatureDelta featureDelta) {
+ if (object instanceof Resource) {
+ // GMF doesn't need to refresh a resource
+ return;
+ }
+
+ // bug 404077: we don't need to refresh edit-parts for objects attached to the transaction
+ // because GMF will take care of refreshing edit-parts. So, suppress the super behaviour
+ // vis-a-vis refreshing the object and setting the editor dirty
+
+ RefreshAdapter.refreshLater(object, editor);
+ }
+
+ @Override
+ public void handleEvent(IEvent event) {
+ try {
+ super.handleEvent(event);
+ } finally {
+ if (CDOUtils.removeListenerFromDeactivatedLifecycle(this, event)) {
+ if (event.getSource() instanceof CDOTransaction) {
+ ((CDOTransaction) event.getSource()).removeTransactionHandler(this);
+ }
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ private static final class RefreshAdapter extends AdapterImpl implements Runnable {
+
+ private static Object TYPE = new Object();
+
+ private static final ConcurrentMap<IDawnEditor, Runnable> pending = new ConcurrentHashMap<IDawnEditor, Runnable>();
+
+ private final IDawnEditor editor;
+
+ RefreshAdapter(IDawnEditor editor) {
+ super();
+
+ this.editor = editor;
+ }
+
+ static void refreshLater(Notifier notifier, IDawnEditor editor) {
+ // don't add another one to this object
+ if (EcoreUtil.getExistingAdapter(notifier, TYPE) == null) {
+ notifier.eAdapters().add(new RefreshAdapter(editor));
+ }
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ // removal of adapters doesn't require refresh, especially if
+ // the adapter that is removed is the CDO legacy adapter! (which
+ // then results in issues)
+ if (notification.getEventType() != Notification.REMOVING_ADAPTER) {
+ post();
+ getTarget().eAdapters().remove(this);
+ }
+ }
+
+ private void post() {
+ // don't schedule redundant refreshes for this editor
+ if (pending.putIfAbsent(editor, this) == null) {
+ UIUtil.later(this);
+ }
+ }
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return type == TYPE;
+ }
+
+ @Override
+ public void run() {
+ pending.remove(editor);
+
+ DiagramDocumentEditor diagramEditor = getDiagramEditor(editor);
+ if (diagramEditor != null) {
+ DawnDiagramUpdater.refreshEditPart(diagramEditor.getDiagramEditPart(), diagramEditor);
+ }
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFLockingHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFLockingHandler.java
new file mode 100755
index 00000000..0bc38198
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusGMFLockingHandler.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.dawn.gmf.notifications.impl.DawnGMFLockingHandler;
+import org.eclipse.emf.cdo.view.CDOViewLocksChangedEvent;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.util.UIUtil;
+
+/**
+ * This is the PapyrusGMFLockingHandler type. Enjoy.
+ */
+public class PapyrusGMFLockingHandler extends DawnGMFLockingHandler {
+
+ public PapyrusGMFLockingHandler(IDawnEditor editor) {
+ super(editor);
+ }
+
+ @Override
+ public void handleLocksChangedEvent(CDOViewLocksChangedEvent event) {
+ if (UIUtil.ensureUIThread(this, event)) {
+ super.handleLocksChangedEvent(event);
+ }
+ }
+
+ @Override
+ public void handleEvent(IEvent event) {
+ try {
+ super.handleEvent(event);
+ } finally {
+ CDOUtils.removeListenerFromDeactivatedLifecycle(this, event);
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusTransactionListener.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusTransactionListener.java
new file mode 100755
index 00000000..4499d586
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/editors/PapyrusTransactionListener.java
@@ -0,0 +1,308 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.lock.CDOLockState;
+import org.eclipse.emf.cdo.common.revision.CDOIDAndBranch;
+import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.emf.cdo.transaction.CDOTransactionConflictEvent;
+import org.eclipse.emf.cdo.transaction.CDOTransactionFinishedEvent;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.view.CDOViewInvalidationEvent;
+import org.eclipse.emf.cdo.view.CDOViewLocksChangedEvent;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.change.util.ChangeRecorder;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.IWorkspaceCommandStack;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.papyrus.cdo.core.resource.CDOUndoContext;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.decorators.CDOStateAdapter;
+import org.eclipse.papyrus.cdo.internal.ui.decorators.CDOStateLabelDecorator;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.util.UIUtil;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.Type;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the PapyrusTransactionListener type. Enjoy.
+ */
+public class PapyrusTransactionListener implements IListener {
+
+ private final ServicesRegistry services;
+
+ private final Predicate<Adapter> shouldPropagate = new Predicate<Adapter>() {
+
+ @Override
+ public boolean apply(Adapter input) {
+ return (input instanceof ECrossReferenceAdapter) //
+ || (input instanceof EContentAdapter) //
+ || (input instanceof ChangeRecorder);
+ }
+ };
+
+ private final Set<Adapter> contentAdapters;
+
+ public PapyrusTransactionListener(ServicesRegistry services, ResourceSet resourceSet) {
+ super();
+
+ this.services = services;
+
+ contentAdapters = Sets.newHashSet(Iterables.filter(resourceSet.eAdapters(), shouldPropagate));
+ ((EObservableAdapterList) resourceSet.eAdapters()).addListener(new EObservableAdapterList.Listener() {
+
+ @Override
+ public void added(Notifier notifier, Adapter adapter) {
+ if (adapter instanceof EContentAdapter) {
+ contentAdapters.add(adapter);
+ }
+ }
+
+ @Override
+ public void removed(Notifier notifier, Adapter adapter) {
+ contentAdapters.remove(adapter);
+ }
+ });
+
+ }
+
+ @Override
+ public void notifyEvent(IEvent event) {
+ if (event instanceof CDOViewInvalidationEvent) {
+ handleViewInvalidationEvent((CDOViewInvalidationEvent) event);
+ } else if (event instanceof CDOTransactionConflictEvent) {
+ handleTransactionConflictEvent((CDOTransactionConflictEvent) event);
+ } else if (event instanceof CDOViewLocksChangedEvent) {
+ handleLocksChangedEvent((CDOViewLocksChangedEvent) event);
+ } else if (event instanceof CDOTransactionFinishedEvent) {
+ handleTransactionFinishedEvent((CDOTransactionFinishedEvent) event);
+ } else {
+ handleEvent(event);
+ }
+ }
+
+ protected void handleTransactionConflictEvent(CDOTransactionConflictEvent event) {
+ if (UIUtil.ensureUIThread(this, event)) {
+ CDOObject cdoObject = event.getConflictingObject();
+ EObject element = CDOUtil.getEObject(cdoObject);
+ View view = DawnDiagramUpdater.findViewByContainer(element);
+
+ if (view == null) {
+ // it's not actually a view that is conflicted, but a model
+ // element
+ if (cdoObject.cdoConflict()) {
+ CDOStateAdapter.setState(element, DawnState.CONFLICT);
+
+ CDOStateLabelDecorator.fireLabelUpdates();
+ }
+ }
+ }
+ }
+
+ protected void handleLocksChangedEvent(CDOViewLocksChangedEvent event) {
+ if (UIUtil.ensureUIThread(this, event)) {
+ Map<EObject, DawnState> changedObjects = new HashMap<EObject, DawnState>();
+ CDOView cdoView = event.getSource();
+
+ for (CDOLockState state : event.getLockStates()) {
+ Object lockedObject = state.getLockedObject();
+
+ CDOID id;
+ if (lockedObject instanceof CDOID) {
+ id = (CDOID) lockedObject;
+ } else if (lockedObject instanceof CDOIDAndBranch) {
+ id = ((CDOIDAndBranch) lockedObject).getID();
+ } else {
+ throw new RuntimeException("Unexpected object type: " //$NON-NLS-1$
+ + lockedObject);
+ }
+
+ if (id != null) {
+ CDOObject object = cdoView.getObject(id);
+ EObject element = CDOUtil.getEObject(object);
+
+ View view = DawnDiagramUpdater.findViewByContainer(element);
+
+ if (view == null) {
+ // it's not actually a view that is locked, but a model
+ // element
+ if (CDOUtils.isLocked(object, true)) {
+ changedObjects.put(element, DawnState.LOCKED_REMOTELY);
+ } else {
+ changedObjects.put(element, DawnState.CLEAN);
+ }
+ }
+ }
+ }
+
+ handleLocks(changedObjects);
+ }
+ }
+
+ /**
+ * @precondition The current thread is the UI thread
+ */
+ void handleLocks(Map<EObject, DawnState> changedObjects) {
+ if (!changedObjects.isEmpty()) {
+ for (Map.Entry<EObject, DawnState> next : changedObjects.entrySet()) {
+
+ EObject element = next.getKey();
+ DawnState state = next.getValue();
+
+ CDOStateAdapter.setState(element, state);
+ }
+
+ CDOStateLabelDecorator.fireLabelUpdates();
+ }
+ }
+
+ protected void handleViewInvalidationEvent(CDOViewInvalidationEvent event) {
+ if (UIUtil.ensureUIThread(this, event)) {
+ // process changed objects to ensure propagation of adapters to new objects.
+ // CDO doesn't tell us about new objects, but it does tell us that their
+ // containers changed, so we have to go fishing
+ for (EObject next : CDOUtils.getEObjects(event.getDirtyObjects())) {
+ for (EObject possiblyNew : next.eContents()) {
+ synchronizeAdapters(possiblyNew);
+ }
+ }
+
+ // also, purge any operations from the local history that changed the objects that
+ // were changed by the remote transaction
+ handleOperationHistory(event);
+ }
+ }
+
+ protected void synchronizeAdapters(EObject object) {
+ object.eAdapters().addAll(Sets.difference(contentAdapters, ImmutableSet.copyOf(object.eAdapters())));
+ }
+
+ protected void handleOperationHistory(CDOViewInvalidationEvent event) {
+ IOperationHistory history = getOperationHistory();
+ if (history != null) {
+ Iterable<EObject> affectedObjects = CDOUtils.getEObjects(Iterables.concat(event.getDirtyObjects(), event.getDetachedObjects()));
+ if (!Iterables.isEmpty(affectedObjects)) {
+ IUndoContext context = new CDOUndoContext(affectedObjects);
+ if (context != null) {
+ IUndoableOperation undoOperation = history.getUndoOperation(context);
+ IUndoableOperation redoOperation = history.getRedoOperation(context);
+
+ if ((undoOperation != null) || (redoOperation != null)) {
+ // notify listeners of the impending changes. We do this before flushing
+ // the undo context because we depend on the fact that the UndoActionHandler
+ // and RedoActionHandler only react when the operation is their current
+ // operation (which means it mustn't have the context removed yet) *and* the
+ // update is posted asynchronously
+ if (undoOperation != null) {
+ history.operationChanged(undoOperation);
+ }
+ if (redoOperation != null) {
+ history.operationChanged(redoOperation);
+ }
+
+ // flush the history for this editor
+ history.dispose(getEditorUndoContext(), true, true, false);
+
+ NotificationBuilder.createAsyncPopup(Messages.PapyrusTransactionListener_0).setType(Type.INFO).run();
+ }
+ }
+ }
+ }
+ }
+
+ protected IOperationHistory getOperationHistory() {
+ IOperationHistory result = null;
+
+ try {
+ EditingDomain domain = services.getService(TransactionalEditingDomain.class);
+ if (domain != null) {
+ CommandStack stack = domain.getCommandStack();
+ if (stack instanceof IWorkspaceCommandStack) {
+ result = ((IWorkspaceCommandStack) stack).getOperationHistory();
+ }
+ }
+ } catch (ServiceException e) {
+ Activator.log.error("Failed to get editor operation history from service registry.", e); //$NON-NLS-1$
+ }
+
+ return result;
+ }
+
+ protected IUndoContext getEditorUndoContext() {
+ IUndoContext result = null;
+
+ try {
+ result = services.getService(IUndoContext.class);
+ } catch (ServiceException e) {
+ Activator.log.error("Failed to get editor undo context from service registry.", e); //$NON-NLS-1$
+ }
+
+ return result;
+ }
+
+ protected void handleTransactionFinishedEvent(CDOTransactionFinishedEvent event) {
+ // review all conflicts and locks
+ Map<EObject, DawnState> stateUpdates = Maps.newHashMap();
+
+ for (CDOStateAdapter next : CDOStateAdapter.getAll(event.getSource().getResourceSet())) {
+
+ Object target = next.getTarget();
+ if (target instanceof EObject) {
+ EObject object = (EObject) target;
+ stateUpdates.put(object, CDOUtils.computeState(object));
+ }
+ }
+
+ for (Map.Entry<EObject, DawnState> next : stateUpdates.entrySet()) {
+ CDOStateAdapter.setState(next.getKey(), next.getValue());
+ }
+
+ CDOStateLabelDecorator.fireLabelUpdates();
+ }
+
+ protected void handleEvent(IEvent event) {
+ // pass
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/expressions/CDOObjectPropertyTester.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/expressions/CDOObjectPropertyTester.java
new file mode 100755
index 00000000..7eaa713e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/expressions/CDOObjectPropertyTester.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.expressions;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.dawn.spi.DawnState;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.decorators.CDOStateAdapter;
+
+/**
+ * This is the EObjectPropertyTester type. Enjoy.
+ */
+public class CDOObjectPropertyTester
+ extends PropertyTester {
+
+ public static final String CAN_LOCK = "canLock"; //$NON-NLS-1$
+
+ public static final String IS_LOCKED_LOCALLY = "isLockedLocally"; //$NON-NLS-1$
+
+ public static final String IS_LOCKED_REMOTELY = "isLockedRemotely"; //$NON-NLS-1$
+
+ public static final String IS_CONFLICTED = "isConflicted"; //$NON-NLS-1$
+
+ public CDOObjectPropertyTester() {
+ super();
+ }
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args,
+ Object expectedValue) {
+
+ boolean result = false;
+
+ CDOObject cdoObject = (CDOObject) receiver;
+ if (cdoObject != null) {
+ if (CAN_LOCK.equals(property)) {
+ result = canLock(cdoObject);
+ } else if (IS_LOCKED_LOCALLY.equals(property)) {
+ result = isLockedLocally(cdoObject);
+ } else if (IS_LOCKED_REMOTELY.equals(property)) {
+ result = isLockedRemotely(cdoObject);
+ } else if (IS_CONFLICTED.equals(property)) {
+ result = isConflicted(cdoObject);
+ }
+ }
+
+ return result;
+ }
+
+ private boolean canLock(CDOObject object) {
+ boolean result = CDOUtils.isLockable(object);
+
+ if (result) {
+ DawnState state = CDOStateAdapter.getState(object);
+ result = (state != DawnState.LOCKED_LOCALLY)
+ && (state != DawnState.LOCKED_REMOTELY);
+ }
+
+ return result;
+ }
+
+ private boolean isLockedLocally(CDOObject object) {
+ return CDOStateAdapter.getState(object) == DawnState.LOCKED_LOCALLY;
+ }
+
+ private boolean isLockedRemotely(CDOObject object) {
+ return CDOStateAdapter.getState(object) == DawnState.LOCKED_REMOTELY;
+ }
+
+ private boolean isConflicted(CDOObject object) {
+ return CDOStateAdapter.getState(object) == DawnState.CONFLICT;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ExportModelHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ExportModelHandler.java
new file mode 100755
index 00000000..f27f5ed6
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ExportModelHandler.java
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIModel;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIResourceQuery;
+import org.eclipse.papyrus.cdo.internal.ui.wizards.ModelExportWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import com.google.common.collect.Lists;
+
+/**
+ * This is the ExportModelHandler type. Enjoy.
+ */
+public class ExportModelHandler extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
+
+ if (window != null) {
+ exportModels(window, null, (IStructuredSelection) selection);
+ }
+ }
+
+ return null;
+ }
+
+ public static void exportModels(IWorkbenchWindow window, IContainer destination, IStructuredSelection selection) {
+ ModelExportWizard wizard = new ModelExportWizard();
+ wizard.init(window.getWorkbench(), selection);
+ wizard.setInitialDestination(destination);
+
+ new WizardDialog(window.getShell(), wizard).open();
+ }
+
+ public static void exportModels(IContainer destination, Iterable<URI> resourceURIs) {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ List<DIModel> models = Lists.newArrayList();
+ for (URI next : resourceURIs) {
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(next);
+ if (checkout != null) {
+ CDOView view = checkout.getView();
+ if (view != null) { // the repository could be disconnected by now
+ try {
+ CDOResourceNode resource = view.getResourceNode(CDOURIUtil.extractResourcePath(next));
+ if (resource instanceof CDOResource) {
+ // only export DI models!
+ if (DIResourceQuery.getDIResources(view).contains(resource)) {
+ models.add(DIModel.getInstance((CDOResource) resource, true));
+ }
+ }
+ } catch (Exception e) {
+ // normal consequence of the repository path not being found
+ }
+ }
+ }
+ }
+
+ if ((window != null) && !models.isEmpty()) {
+ exportModels(window, destination, new StructuredSelection(models));
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ImportModelsHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ImportModelsHandler.java
new file mode 100755
index 00000000..6b528ddb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ImportModelsHandler.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.cdo.internal.ui.wizards.ModelImportWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * This is the ImportModelsHandler type. Enjoy.
+ */
+public class ImportModelsHandler extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
+
+ if (window != null) {
+ importModels(window, (IStructuredSelection) selection, null);
+ }
+ }
+
+ return null;
+ }
+
+ public static void importModels(IWorkbenchWindow window, IStructuredSelection selection, CDOCheckout checkout) {
+ ModelImportWizard wizard = new ModelImportWizard();
+ wizard.init(window.getWorkbench(), selection);
+
+ if (checkout != null) {
+ wizard.setRepository(checkout);
+ }
+
+ new WizardDialog(window.getShell(), wizard).open();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/LockObjectsHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/LockObjectsHandler.java
new file mode 100755
index 00000000..af8db5a8
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/LockObjectsHandler.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+
+/**
+ * This is the LockObjectsHandler type. Enjoy.
+ */
+public class LockObjectsHandler
+ extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event)
+ throws ExecutionException {
+
+ List<Object> selected = UIHandlerUtil.getSelection(event);
+ Activator.getActiveDawnEditor().getDawnEditorSupport()
+ .lockObjects(selected);
+
+ return null;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ResolveConflictsHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ResolveConflictsHandler.java
new file mode 100755
index 00000000..43baaef2
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/ResolveConflictsHandler.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * This is the ResolveConflictsHandler type. Enjoy.
+ */
+public class ResolveConflictsHandler
+ extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event)
+ throws ExecutionException {
+ IDawnEditor activeEditor = Activator.getActiveDawnEditor();
+
+ if (activeEditor != null) {
+ // TODO: Implement real conflict resolution
+
+ if (MessageDialog
+ .openQuestion(HandlerUtil.getActiveShellChecked(event),
+ Messages.ResolveConflictsHandler_0,
+ Messages.ResolveConflictsHandler_1)) {
+ activeEditor.getDawnEditorSupport().rollback();
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/UIHandlerUtil.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/UIHandlerUtil.java
new file mode 100755
index 00000000..aa782a2a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/UIHandlerUtil.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.handlers;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.cdo.dawn.spi.IDawnEditingSupport;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the UIHandlerUtil type. Enjoy.
+ */
+public class UIHandlerUtil {
+
+ private UIHandlerUtil() {
+ super();
+ }
+
+ public static <T> Collection<T> getSelection(ExecutionEvent event,
+ Class<T> type)
+ throws ExecutionException {
+
+ ISelection selection = HandlerUtil.getCurrentSelectionChecked(event);
+ Collection<T> result = Collections.emptyList();
+
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> selected = ((IStructuredSelection) selection)
+ .toList();
+ result = ImmutableList.copyOf(Iterables.filter(selected, type));
+ }
+
+ return result;
+ }
+
+ /**
+ * The return type is {@code List<Object>} because that is the type required
+ * by the Dawn {@link IDawnEditingSupport#lockObjects(java.util.List)} API.
+ */
+ public static List<Object> getSelection(ExecutionEvent event)
+ throws ExecutionException {
+
+ return (List<Object>) getSelection(event, Object.class);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/UnlockObjectsHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/UnlockObjectsHandler.java
new file mode 100755
index 00000000..8964766c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/handlers/UnlockObjectsHandler.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+
+/**
+ * This is the UnlockObjectsHandler type. Enjoy.
+ */
+public class UnlockObjectsHandler
+ extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event)
+ throws ExecutionException {
+
+ List<Object> selected = UIHandlerUtil.getSelection(event);
+ Activator.getActiveDawnEditor().getDawnEditorSupport()
+ .unlockObjects(selected);
+
+ return null;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/l10n/Messages.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/l10n/Messages.java
new file mode 100755
index 00000000..9b38eaa4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/l10n/Messages.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This is the Messages type. Enjoy.
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.cdo.internal.ui.l10n.messages"; //$NON-NLS-1$
+
+ public static String CheckoutBrowseDialog_anyNode;
+
+ public static String CheckoutBrowseDialog_binKind;
+
+ public static String CheckoutBrowseDialog_existsError;
+
+ public static String CheckoutBrowseDialog_existsWarning;
+
+ public static String CheckoutBrowseDialog_fileKind;
+
+ public static String CheckoutBrowseDialog_folderKind;
+
+ public static String CheckoutBrowseDialog_invalidURISeg;
+
+ public static String CheckoutBrowseDialog_leafKind;
+
+ public static String CheckoutBrowseDialog_modelKind;
+
+ public static String CheckoutBrowseDialog_nameLabel;
+
+ public static String CheckoutBrowseDialog_newFolderAction;
+
+ public static String CheckoutBrowseDialog_noSuchResource;
+
+ public static String CheckoutBrowseDialog_textKind;
+
+ public static String CheckoutBrowseDialog_windowTitle;
+
+ public static String CheckoutBrowseDialog_wrongSelection;
+
+ public static String CDOResLabels_binKind;
+
+ public static String CDOResLabels_fileKind;
+
+ public static String CDOResLabels_folderKind;
+
+ public static String CDOResLabels_leafKind;
+
+ public static String CDOResLabels_modelKind;
+
+ public static String CDOResLabels_node;
+
+ public static String CDOResLabels_nodeKind;
+
+ public static String CDOResLabels_pattern;
+
+ public static String CDOResLabels_txtKind;
+
+ public static String CDOResLabels_unknown;
+
+ public static String CDOStateLabelDecorator_1;
+
+ public static String CreateCDOFragDlg_browseMessage;
+
+ public static String CreateCDOFragDlg_browseRepo;
+
+ public static String CreateCDOFragDlg_browseTitle;
+
+ public static String CreateCDOFragDlg_existsError;
+
+ public static String CreateCDOFragDlg_hasFragmentError;
+
+ public static String CreateCDOFragDlg_noSuchFolderError;
+
+ public static String CreateCDOFragDlg_notFolderError;
+
+ public static String CreateCDOFragDlg_uriLabel;
+
+ public static String DIResourceQuery_2;
+
+ public static String ModelExportMappingsPage_0;
+
+ public static String ModelExportMappingsPage_2;
+
+ public static String ModelExportMappingsPage_3;
+
+ public static String ModelExportMappingsPage_4;
+
+ public static String ModelExportMappingsPage_6;
+
+ public static String ModelExportMappingsPage_7;
+
+ public static String ModelExportWizard_0;
+
+ public static String ModelExportWizard_2;
+
+ public static String ModelExportWizard_3;
+
+ public static String ModelExportWizard_4;
+
+ public static String ModelImportWizard_0;
+
+ public static String ModelImportWizard_2;
+
+ public static String ModelMappingsPage_0;
+
+ public static String ModelMappingsPage_10;
+
+ public static String ModelMappingsPage_2;
+
+ public static String ModelMappingsPage_3;
+
+ public static String ModelMappingsPage_4;
+
+ public static String ModelMappingsPage_5;
+
+ public static String ModelMappingsPage_6;
+
+ public static String ModelMappingsPage_7;
+
+ public static String ModelMappingsPage_8;
+
+ public static String ModelMappingsPage_9;
+
+ public static String ModelReferencesPage_0;
+
+ public static String ModelReferencesPage_1;
+
+ public static String ModelReferencesPage_2;
+
+ public static String ModelReferencesPage_3;
+
+ public static String ModelReferencesPage_4;
+
+ public static String ModelReferencesPage_5;
+
+ public static String ModelReferencesPage_6;
+
+ public static String ModelReferencesPage_7;
+
+ public static String ModelReferencesPage_8;
+
+ public static String ModelReferencesPage_9;
+
+ public static String PapyrusCDOEditorManager_1;
+
+ public static String PapyrusCDOEditorManager_2;
+
+ public static String PapyrusTransactionListener_0;
+
+ public static String CheckoutSelectionBlock_0;
+
+ public static String CheckoutSelectionBlock_1;
+
+ public static String CheckoutSelectionDialog_0;
+
+ public static String CheckoutSelectionDialog_1;
+
+ public static String CheckoutSelectionPage_0;
+
+ public static String CheckoutSelectionPage_2;
+
+ public static String CheckoutSelectionPage_3;
+
+
+ public static String ResolveConflictsHandler_0;
+
+ public static String ResolveConflictsHandler_1;
+
+ public static String ResourceDropAdapter_0;
+
+ public static String ResourceDropAdapter_1;
+
+ public static String ResourceDropAdapter_2;
+
+ public static String ResourceDropAdapter_3;
+
+ public static String ResourceDropAdapter_4;
+
+ public static String ResourceDropAdapter_6;
+
+ public static String WizardOperationContext_0;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/l10n/messages.properties b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/l10n/messages.properties
new file mode 100755
index 00000000..b892a078
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/l10n/messages.properties
@@ -0,0 +1,102 @@
+#############################################################################
+# Copyright (c) 2013, 2017 CEA LIST and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+# Christian W. Damus (CEA) - bug 429242
+# Eike Stepper (CEA) - bug 466520
+#
+#############################################################################
+CheckoutBrowseDialog_anyNode=node of any kind
+CheckoutBrowseDialog_binKind=binary resource
+CheckoutBrowseDialog_existsError=Resource already exists.
+CheckoutBrowseDialog_existsWarning=Resource already exists and will be replaced.
+CheckoutBrowseDialog_fileKind=file (document) resource
+CheckoutBrowseDialog_folderKind=folder
+CheckoutBrowseDialog_invalidURISeg=Resource name is not a valid URI segment.
+CheckoutBrowseDialog_leafKind=model or file (document) resource
+CheckoutBrowseDialog_modelKind=model resource
+CheckoutBrowseDialog_nameLabel=Resource name:
+CheckoutBrowseDialog_newFolderAction=New Folder...
+CheckoutBrowseDialog_noSuchResource=Resource does not exist.
+CheckoutBrowseDialog_textKind=text resource
+CheckoutBrowseDialog_windowTitle=Browse Repository
+CheckoutBrowseDialog_wrongSelection=Selection must be a {0}.
+CDOResLabels_binKind=Binary file
+CDOResLabels_fileKind=File
+CDOResLabels_folderKind=Folder
+CDOResLabels_leafKind=Model or file
+CDOResLabels_modelKind=Model
+CDOResLabels_node=Node
+CDOResLabels_nodeKind=Node
+CDOResLabels_pattern={0} {1} in repository "{2}"
+CDOResLabels_txtKind=Text file
+CDOResLabels_unknown=(unknown)
+CDOStateLabelDecorator_1=Update CDO state label decorations
+CreateCDOFragDlg_browseMessage=Choose the location and name of the new model unit.
+CreateCDOFragDlg_browseRepo=Browse Repository...
+CreateCDOFragDlg_browseTitle=Create Model Unit
+CreateCDOFragDlg_existsError=Resource already exists.
+CreateCDOFragDlg_hasFragmentError=Resource URI must not have a fragment.
+CreateCDOFragDlg_noSuchFolderError=No such folder: {0}
+CreateCDOFragDlg_notFolderError=Not a folder: {0}
+CreateCDOFragDlg_uriLabel=Resource URI:
+DIResourceQuery_2=Find Papyrus models
+ModelExportMappingsPage_0=Map models to paths in the workspace.
+ModelExportMappingsPage_2=Model Mappings
+ModelExportMappingsPage_3=Model
+ModelExportMappingsPage_4=Path
+ModelExportMappingsPage_6=Select a container for the exported model.
+ModelExportMappingsPage_7=Edit Export Mapping
+ModelExportWizard_0=Export Models from Repository
+ModelExportWizard_2=Multiple Checkouts Selected
+ModelExportWizard_3=The selection includes models from more than one checkout. Only those in the "{0}" checkout will be exported.
+ModelExportWizard_4=Clean up model export configuration
+ModelImportWizard_0=Import Models into Repository
+ModelImportWizard_2=Clean up model import configuration
+ModelMappingsPage_0=Map models to paths in the repository.
+ModelMappingsPage_10=Please enter a path that is not a folder.
+ModelMappingsPage_2=Model Mappings
+ModelMappingsPage_3=A single model
+ModelMappingsPage_4=Path:
+ModelMappingsPage_5=Separate models
+ModelMappingsPage_6=Model
+ModelMappingsPage_7=Path
+ModelMappingsPage_8=Please enter a valid path.
+ModelMappingsPage_9=Please enter a path.
+ModelReferencesPage_0=Select referenced models to import into the repository.
+ModelReferencesPage_1=Select referenced models to export to the workspace.
+ModelReferencesPage_2=Strip editor pages from model (recommended)
+ModelReferencesPage_3=Model Cross-References
+ModelReferencesPage_4=Models:
+ModelReferencesPage_5=Path:
+ModelReferencesPage_6=Move information about open diagrams from the *.di resource to user-private storage
+ModelReferencesPage_7=Please select at least one model to {0}.
+ModelReferencesPage_8=import
+ModelReferencesPage_9=export
+PapyrusCDOEditorManager_1=Unsaved Model Editors
+PapyrusCDOEditorManager_2=There are unsaved model editors using this repository. Save them first?
+PapyrusTransactionListener_0=Undo/redo history cleared due to interference from remote transaction.
+CheckoutSelectionBlock_0=Opening {0} ...
+CheckoutSelectionBlock_1=Opening checkout interrupted.
+CheckoutSelectionDialog_0=Select Checkout
+CheckoutSelectionDialog_1=Select the checkout in which to create the custom Properties View configuration.
+CheckoutSelectionPage_0=Select a checkout to import the models into.
+CheckoutSelectionPage_2=Model Checkout
+CheckoutSelectionPage_3=Checkouts:
+ResolveConflictsHandler_0=Resolve Conflicts
+ResolveConflictsHandler_1=Are you sure you want to roll back all pending changes to resolve conflicts?
+ResourceDropAdapter_0=Attempt to a drop resource node that no longer exists.
+ResourceDropAdapter_1=Move repository resources
+ResourceDropAdapter_2=Resource node no longer exists.
+ResourceDropAdapter_3=Failed to drop moved resources.
+ResourceDropAdapter_4=Cannot drop resource node of type "{0}"
+ResourceDropAdapter_6=A resource already exists at path:
+WizardOperationContext_0=Model transfer operation execution failed.
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOMarkerMonitor.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOMarkerMonitor.java
new file mode 100755
index 00000000..33f1ce82
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOMarkerMonitor.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.markers;
+
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.papyrus.cdo.validation.problems.edit.ProblemEditUtil;
+import org.eclipse.papyrus.cdo.validation.problems.util.ProblemsEvent;
+import org.eclipse.papyrus.cdo.validation.problems.util.ProblemsListener;
+import org.eclipse.papyrus.cdo.validation.problems.util.ProblemsManager;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.markerlistener.providers.AbstractMarkerMonitor;
+
+/**
+ * This is the CDOMarkerMonitor type. Enjoy.
+ */
+public class CDOMarkerMonitor
+ extends AbstractMarkerMonitor {
+
+ private ProblemEditUtil util;
+
+ private ProblemsListener problemsListener;
+
+ public CDOMarkerMonitor() {
+ super();
+ }
+
+ @Override
+ public void initialize(ModelSet modelSet) {
+ super.initialize(modelSet);
+
+ this.util = new ProblemEditUtil(
+ ((AdapterFactoryEditingDomain) modelSet
+ .getTransactionalEditingDomain()).getAdapterFactory());
+ this.problemsListener = createProblemsListener();
+ ProblemsManager.getProblemsManager(modelSet).addProblemsListener(
+ problemsListener);
+ }
+
+ @Override
+ public void dispose() {
+ if (problemsListener != null) {
+ ProblemsManager.getProblemsManager(getModelSet())
+ .removeProblemsListener(problemsListener);
+ problemsListener = null;
+ }
+
+ super.dispose();
+ }
+
+ protected ProblemsListener createProblemsListener() {
+ return new ProblemsListener() {
+
+ @Override
+ public void problemAdded(ProblemsEvent event) {
+ fireMarkerAdded(new CDOPapyrusMarker(event.getProblem(), util));
+ }
+
+ @Override
+ public void problemRemoved(ProblemsEvent event) {
+ fireMarkerRemoved(new CDOPapyrusMarker(event.getProblem(), util));
+ }
+
+ };
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOMarkerProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOMarkerProvider.java
new file mode 100755
index 00000000..22937356
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOMarkerProvider.java
@@ -0,0 +1,362 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 431618
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.markers;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.edit.ProblemEditUtil;
+import org.eclipse.papyrus.cdo.validation.problems.util.ProblemsManager;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.markerlistener.IPapyrusMarker;
+import org.eclipse.papyrus.infra.services.markerlistener.providers.AbstractMarkerProvider;
+import org.eclipse.papyrus.infra.services.markerlistener.providers.IMarkerProvider2;
+import org.eclipse.papyrus.infra.services.markerlistener.util.MarkerListenerUtils;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+
+/**
+ * This is the CDOMarkerProvider type. Enjoy.
+ */
+public class CDOMarkerProvider extends AbstractMarkerProvider implements IMarkerProvider2 {
+
+ private final ProblemEditUtil defaultUtil = new ProblemEditUtil(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE));
+
+ public CDOMarkerProvider() {
+ super();
+ }
+
+ @Override
+ public boolean canProvideMarkersFor(Resource resource) {
+ return resource instanceof CDOResource;
+ }
+
+ @Override
+ public Collection<? extends IPapyrusMarker> getMarkers(final Resource resource, final String type, final boolean includeSubtypes) throws CoreException {
+ // run in a read-only transaction because the problems manager accesses
+ // a cross-reference adapter
+ return run(resource, CoreException.class, new RunnableWithResult.Impl<Collection<? extends IPapyrusMarker>>() {
+
+ @Override
+ public void run() {
+ setResult(Lists.newArrayList(Iterators.transform( //
+ getProblems(resource, type, includeSubtypes), //
+ CDOPapyrusMarker.wrap(getProblemEditUtil(resource)))));
+ }
+ });
+ }
+
+ protected Iterator<? extends EProblem> getProblems(final Resource resource, final String type, boolean includeSubtypes) {
+ final Predicate<EProblem> filter;
+
+ if (type == null) {
+ filter = Predicates.alwaysTrue();
+ } else if (includeSubtypes) {
+ filter = new Predicate<EProblem>() {
+
+ @Override
+ public boolean apply(EProblem input) {
+ return MarkerListenerUtils.isMarkerTypeSubtypeOf(input.getType(), type);
+ }
+ };
+ } else {
+ filter = new Predicate<EProblem>() {
+
+ @Override
+ public boolean apply(EProblem input) {
+ return type.equals(input.getType());
+ }
+ };
+ }
+
+ return Iterators.filter(getProblemsManager(resource).getAllProblems(resource), filter);
+ }
+
+ @Override
+ public void createMarkers(final Resource resource, final Diagnostic diagnostic, final IProgressMonitor monitor) throws CoreException {
+ // run in a read-only transaction because the problems manager accesses
+ // a cross-reference adapter. Note that a read/write transaction is not
+ // needed because we aren't modifying the contents of the resource set
+ // (the problems model is not stored in a resource)
+ run(resource, CoreException.class, new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ basicCreateMarkers(resource, diagnostic, monitor);
+ } catch (CoreException e) {
+ throw new WrappedException(e);
+ }
+ }
+ });
+ }
+
+ final void basicCreateMarkers(Resource resource, Diagnostic diagnostic, IProgressMonitor monitor) throws CoreException {
+ super.createMarkers(resource, diagnostic, monitor);
+ }
+
+ @Override
+ protected void doCreateMarker(Resource resource, Diagnostic diagnostic) throws CoreException {
+ ProblemsManager mgr = getProblemsManager(resource);
+ EProblem problem = mgr.createProblem(diagnostic);
+ if (problem != null) {
+ mgr.addProblem(problem);
+ }
+ }
+
+ @Override
+ protected void batchCreated(Resource resource) {
+ super.batchCreated(resource);
+
+ ResourceSet rset = resource.getResourceSet();
+ if (rset instanceof ModelSet) {
+ // yield the resource set to any other threads that might
+ // be waiting to read it
+ ((ModelSet) rset).getTransactionalEditingDomain().yield();
+ }
+ }
+
+ @Override
+ public void deleteMarkers(final EObject object, final IProgressMonitor monitor, final String type, final boolean includeSubtypes) throws CoreException {
+ // run in a read-only transaction because the problems manager accesses
+ // a cross-reference adapter. Note that a read/write transaction is not
+ // needed because we aren't modifying the contents of the resource set
+ // (the problems model is not stored in a resource)
+ run(object.eResource(), CoreException.class, new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ basicDeleteMarkers(object, monitor, type, includeSubtypes);
+ } catch (CoreException e) {
+ throw new WrappedException(e);
+ }
+ }
+ });
+ }
+
+ protected final void basicDeleteMarkers(EObject object, IProgressMonitor monitor, String type, boolean includeSubtypes) throws CoreException {
+ super.deleteMarkers(object, monitor, type, includeSubtypes);
+ }
+
+ @Override
+ public void deleteMarkers(final Resource resource, IProgressMonitor monitor) {
+ try {
+ this.deleteMarkers(resource, monitor, null, true);
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ @Override
+ public void deleteMarkers(final Resource resource, IProgressMonitor monitor, final String markerType, final boolean includeSubtypes) throws CoreException {
+ SubMonitor sub = SubMonitor.convert(monitor, IProgressMonitor.UNKNOWN);
+
+ // run in a read-only transaction because the problems manager accesses
+ // a cross-reference adapter. Note that a read/write transaction is not
+ // needed because we aren't modifying the contents of the resource set
+ // (the problems model is not stored in a resource)
+ run(resource, new Runnable() {
+
+ @Override
+ public void run() {
+ ProblemsManager mgr = getProblemsManager(resource);
+ if (markerType == null) {
+ // efficiently remove all markers for the resource
+ mgr.purgeProblems(resource);
+ } else {
+ // tediously remove the matching markers
+ for (EProblem next : Lists.newArrayList(getProblems(resource, markerType, includeSubtypes))) {
+ ProblemsManager.delete(next);
+ }
+ }
+ }
+ });
+
+ sub.done();
+ }
+
+ @Override
+ public boolean hasMarkers(Resource context, EObject object) {
+ ProblemsManager manager = getProblemsManager(context);
+
+ return (manager != null) && manager.getAllProblems(object).hasNext();
+ }
+
+ @Override
+ public ICommand getMarkerDeletionCommand(Resource context, EObject object) {
+ return new MarkerDeletionCommand(context, object);
+ }
+
+ private ProblemsManager getProblemsManager(Resource resource) {
+ return ProblemsManager.getProblemsManager(resource.getResourceSet());
+ }
+
+ private ProblemEditUtil getProblemEditUtil(Resource resource) {
+ ProblemEditUtil result = defaultUtil;
+
+ ResourceSet rset = resource.getResourceSet();
+ if (rset instanceof ModelSet) {
+ AdapterFactory factory = ((AdapterFactoryEditingDomain) ((ModelSet) rset).getTransactionalEditingDomain()).getAdapterFactory();
+ result = new ProblemEditUtil(factory);
+ }
+
+ return result;
+ }
+
+ static <X extends Throwable> void run(Resource context, Runnable runnable) {
+ run(context, RuntimeException.class, runnable);
+ }
+
+ static <X extends Throwable> void run(Resource context, Class<X> exceptionType, Runnable runnable) throws X {
+ ResourceSet rset = context.getResourceSet();
+ if (rset instanceof ModelSet) {
+ try {
+ ((ModelSet) rset).getTransactionalEditingDomain().runExclusive(runnable);
+ } catch (WrappedException e) {
+ throw exceptionType.cast(e.exception());
+ } catch (InterruptedException e) {
+ Activator.log.error("CDO problem markers runnable interrupted.", e); //$NON-NLS-1$
+ }
+ } else {
+ runnable.run();
+ }
+ }
+
+ static <T, X extends Throwable> T run(Resource context, Class<X> exceptionType, RunnableWithResult<T> runnable) throws X {
+ T result;
+
+ ResourceSet rset = context.getResourceSet();
+ if (rset instanceof ModelSet) {
+ try {
+ result = TransactionUtil.runExclusive(((ModelSet) rset).getTransactionalEditingDomain(), runnable);
+ } catch (WrappedException e) {
+ throw exceptionType.cast(e.exception());
+ } catch (InterruptedException e) {
+ Activator.log.error("CDO problem markers runnable interrupted.", e); //$NON-NLS-1$
+ result = null;
+ }
+ } else {
+ runnable.run();
+ result = runnable.getResult();
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ private class MarkerDeletionCommand extends AbstractCommand {
+
+ private Resource context;
+
+ private EObject object;
+
+ private Collection<? extends EProblem> problemsForUndo;
+
+ public MarkerDeletionCommand(Resource context, EObject object) {
+ super("Delete markers");
+
+ this.context = context;
+ this.object = object;
+ }
+
+ @Override
+ public void dispose() {
+ context = null;
+ object = null;
+ problemsForUndo = null;
+
+ super.dispose();
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ ProblemsManager manager = getProblemsManager(context);
+ Collection<EProblem> problems = Lists.newArrayList(manager.getAllProblems(object));
+ if (problems.isEmpty()) {
+ // Nothing to do
+ return CommandResult.newOKCommandResult();
+ }
+
+ for (EProblem problem : problems) {
+ ProblemsManager.delete(problem);
+ }
+
+ // Initialize undo information
+ problemsForUndo = problems;
+
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ if (problemsForUndo == null) {
+ // Nothing to do
+ return CommandResult.newOKCommandResult();
+ }
+
+ // Detach undo information
+ final Collection<? extends EProblem> problems = problemsForUndo;
+ problemsForUndo = null;
+
+ Resource resource = object.eResource();
+ if (resource != null) { // Should have been reattached by now
+ context = resource;
+ ProblemsManager manager = getProblemsManager(resource);
+ for (EProblem problem : problems) {
+ problem.setElement(object);
+ manager.addProblem(problem);
+ }
+ }
+
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ return doExecuteWithResult(progressMonitor, info);
+ }
+
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOPapyrusMarker.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOPapyrusMarker.java
new file mode 100755
index 00000000..0de87024
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/markers/CDOPapyrusMarker.java
@@ -0,0 +1,391 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.markers;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.edit.ProblemEditUtil;
+import org.eclipse.papyrus.cdo.validation.problems.util.ProblemsManager;
+import org.eclipse.papyrus.infra.services.markerlistener.IPapyrusMarker;
+import org.eclipse.papyrus.infra.services.markerlistener.util.MarkerListenerUtils;
+
+import com.google.common.base.Function;
+import com.google.common.base.Objects;
+import com.google.common.collect.Maps;
+
+/**
+ * This is the CDOPapyrusMarker type. Enjoy.
+ */
+public class CDOPapyrusMarker implements IPapyrusMarker {
+
+ private final ProblemEditUtil util;
+
+ private final Resource resource;
+
+ private final EProblem problem;
+
+ CDOPapyrusMarker(EProblem problem, ProblemEditUtil util) {
+ super();
+
+ this.util = util;
+ this.resource = problem.getElement().eResource();
+ this.problem = problem;
+ }
+
+ public static Function<EProblem, CDOPapyrusMarker> wrap(final ProblemEditUtil util) {
+
+ return new Function<EProblem, CDOPapyrusMarker>() {
+
+ @Override
+ public CDOPapyrusMarker apply(EProblem input) {
+ return new CDOPapyrusMarker(input, util);
+ }
+ };
+ }
+
+ @Override
+ public Resource getResource() {
+ return resource;
+ }
+
+ @Override
+ public EObject getEObject() {
+ return problem.getElement();
+ }
+
+ @Override
+ public boolean exists() {
+ EObject element = getEObject();
+ return (element != null) && (element.eResource() != null);
+ }
+
+ @Override
+ public String getType() {
+ String result = problem.getType();
+ return (result != null) ? result : EValidator.MARKER;
+ }
+
+ @Override
+ public String getTypeLabel() throws CoreException {
+ String result = MarkerListenerUtils.getMarkerTypeLabel(getType());
+ return ((result != null) && (result.length() > 0)) ? result : util.getProblemType(problem);
+ }
+
+ @Override
+ public void delete() {
+ ProblemsManager.delete(problem);
+ }
+
+ @Override
+ public Object getAttribute(String name) throws CoreException {
+ Object result = null;
+
+ if (name.equals(EValidator.URI_ATTRIBUTE)) {
+ result = EcoreUtil.getURI(getEObject()).toString();
+ } else if (name.equals(SEVERITY)) {
+ result = getMarkerSeverity();
+ } else if (name.equals(MESSAGE)) {
+ result = problem.getMessage();
+ } else if (problem.getAttributes().containsKey(name)) {
+ result = coerce(problem.getAttributes().get(name));
+ } else {
+ throw new CoreException(error("No such marker attribute: " + name)); //$NON-NLS-1$
+ }
+
+ return result;
+ }
+
+ protected Object coerce(String value) {
+ Object result;
+
+ if (value == null) {
+ result = value;
+ } else if (isBoolean(value)) {
+ result = Boolean.parseBoolean(value);
+ } else if (isInteger(value)) {
+ result = Integer.parseInt(value);
+ } else {
+ result = value;
+ }
+
+ return result;
+ }
+
+ static boolean isBoolean(String s) {
+ return (s != null) && (s.equalsIgnoreCase("true") || s.equalsIgnoreCase("false")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ static boolean isInteger(String s) {
+ boolean result = (s != null) && (s.length() > 0);
+
+ for (int i = 0; result && (i < s.length()); i++) {
+ result = Character.isDigit(s.charAt(i));
+ }
+
+ return result;
+ }
+
+ protected final IStatus error(String message) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, message);
+ }
+
+ protected int getMarkerSeverity() {
+ int result;
+
+ switch (problem.getSeverity()) {
+ case OK:
+ case INFO:
+ result = SEVERITY_INFO;
+ break;
+ case WARNING:
+ result = SEVERITY_WARNING;
+ break;
+ default:
+ result = SEVERITY_ERROR;
+ break;
+ }
+
+ return result;
+ }
+
+ @Override
+ public String getAttribute(String name, String defaultValue) {
+ String result = null;
+
+ if (name.equals(EValidator.URI_ATTRIBUTE)) {
+ result = EcoreUtil.getURI(getEObject()).toString();
+ } else if (name.equals(MESSAGE)) {
+ result = problem.getMessage();
+ } else if (problem.getAttributes().containsKey(name)) {
+ result = coerce(problem.getAttributes().get(name), defaultValue);
+ } else {
+ result = defaultValue;
+ }
+
+ return (result != null) ? result : defaultValue;
+ }
+
+ protected String coerce(String value, String defaultValue) {
+ String result;
+
+ if (value == null) {
+ result = defaultValue;
+ } else if (isBoolean(value) || isInteger(value)) {
+ throw new IllegalArgumentException("Not a string value: " + value); //$NON-NLS-1$
+ } else {
+ result = value;
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean getAttribute(String name, boolean defaultValue) {
+ boolean result;
+
+ if (problem.getAttributes().containsKey(name)) {
+ result = coerce(problem.getAttributes().get(name), defaultValue);
+ } else {
+ result = defaultValue;
+ }
+
+ return result;
+ }
+
+ protected boolean coerce(String value, boolean defaultValue) {
+ boolean result;
+
+ if (value == null) {
+ result = defaultValue;
+ } else if (!isBoolean(value)) {
+ throw new IllegalArgumentException("Not a boolean value: " + value); //$NON-NLS-1$
+ } else {
+ result = Boolean.parseBoolean(value);
+ }
+
+ return result;
+ }
+
+ @Override
+ public int getAttribute(String name, int defaultValue) {
+ int result;
+
+ if (name.equals(SEVERITY)) {
+ result = getMarkerSeverity();
+ } else if (problem.getAttributes().containsKey(name)) {
+ result = coerce(problem.getAttributes().get(name), defaultValue);
+ } else {
+ result = defaultValue;
+ }
+
+ return result;
+ }
+
+ protected int coerce(String value, int defaultValue) {
+ int result;
+
+ if (value == null) {
+ result = defaultValue;
+ } else if (!isInteger(value)) {
+ throw new IllegalArgumentException("Not an integer value: " + value); //$NON-NLS-1$
+ } else {
+ result = Integer.parseInt(value);
+ }
+
+ return result;
+ }
+
+ @Override
+ public Map<String, ?> getAttributes() throws CoreException {
+ Map<String, Object> result = coerce(problem.getAttributes());
+
+ result.put(EValidator.URI_ATTRIBUTE, EcoreUtil.getURI(getEObject()).toString());
+ result.put(SEVERITY, getMarkerSeverity());
+ result.put(MESSAGE, problem.getMessage());
+
+ return result;
+ }
+
+ protected Map<String, Object> coerce(EMap<String, String> attributes) {
+ Map<String, Object> result = Maps.newHashMap();
+
+ for (Map.Entry<String, String> next : attributes) {
+ result.put(next.getKey(), coerce(next.getValue()));
+ }
+
+ return result;
+ }
+
+ @Override
+ public void setAttribute(String name, Object value) throws CoreException {
+ if (name.equals(EValidator.URI_ATTRIBUTE)) {
+ throw new CoreException(error("Cannot set URI of a CDOPapyrusMarker.")); //$NON-NLS-1$
+ } else if (name.equals(SEVERITY)) {
+ setMarkerSeverity(((Number) value).intValue());
+ } else if (name.equals(MESSAGE)) {
+ problem.setMessage((String) value);
+ } else if (value == null) {
+ problem.getAttributes().removeKey(name);
+ } else {
+ problem.getAttributes().put(name, value.toString());
+ }
+ }
+
+ protected void setMarkerSeverity(int severity) throws CoreException {
+ switch (severity) {
+ case SEVERITY_INFO:
+ problem.setSeverity(ESeverity.INFO);
+ break;
+ case SEVERITY_WARNING:
+ problem.setSeverity(ESeverity.WARNING);
+ break;
+ case SEVERITY_ERROR:
+ problem.setSeverity(ESeverity.ERROR);
+ break;
+ default:
+ throw new CoreException(error("Invalid marker severity: " //$NON-NLS-1$
+ + severity));
+ }
+ }
+
+ @Override
+ public void setAttribute(String name, String value) throws CoreException {
+ if (name.equals(EValidator.URI_ATTRIBUTE)) {
+ throw new CoreException(error("Cannot set URI of a CDOPapyrusMarker.")); //$NON-NLS-1$
+ } else if (name.equals(MESSAGE)) {
+ problem.setMessage(value);
+ } else if (name.equals(SEVERITY)) {
+ throw new CoreException(error("Severity of a CDOPapyrusMarker is not a string.")); //$NON-NLS-1$
+ } else if (value == null) {
+ problem.getAttributes().removeKey(name);
+ } else {
+ problem.getAttributes().put(name, value);
+ }
+ }
+
+ @Override
+ public void setAttribute(String name, boolean value) throws CoreException {
+ if (name.equals(EValidator.URI_ATTRIBUTE)) {
+ throw new CoreException(error("URI of a CDOPapyrusMarker is not a boolean.")); //$NON-NLS-1$
+ } else if (name.equals(SEVERITY)) {
+ throw new CoreException(error("Severity of a CDOPapyrusMarker is not a boolean.")); //$NON-NLS-1$
+ } else if (name.equals(MESSAGE)) {
+ throw new CoreException(error("Message of a CDOPapyrusMarker is not a boolean.")); //$NON-NLS-1$
+ } else {
+ problem.getAttributes().put(name, Boolean.toString(value));
+ }
+ }
+
+ @Override
+ public void setAttribute(String name, int value) throws CoreException {
+ if (name.equals(SEVERITY)) {
+ setMarkerSeverity(value);
+ } else if (name.equals(EValidator.URI_ATTRIBUTE)) {
+ throw new CoreException(error("URI of a CDOPapyrusMarker is not an integer.")); //$NON-NLS-1$
+ } else if (name.equals(MESSAGE)) {
+ throw new CoreException(error("Message of a CDOPapyrusMarker is not an integer.")); //$NON-NLS-1$
+ } else {
+ problem.getAttributes().put(name, Integer.toString(value));
+ }
+ }
+
+ @Override
+ public void setAttributes(Map<String, ?> attributes) throws CoreException {
+ for (Map.Entry<String, ?> next : attributes.entrySet()) {
+ String name = next.getKey();
+ Object value = next.getValue();
+
+ if (name.equals(EValidator.URI_ATTRIBUTE)) {
+ throw new CoreException(error("Cannot set URI of a CDOPapyrusMarker.")); //$NON-NLS-1$
+ } else if (name.equals(SEVERITY)) {
+ setMarkerSeverity(((Number) value).intValue());
+ } else if (name.equals(MESSAGE)) {
+ problem.setMessage((String) value);
+ } else if (value != null) {
+ problem.getAttributes().put(name, value.toString());
+ }
+ }
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return (obj instanceof CDOPapyrusMarker) && Objects.equal(((CDOPapyrusMarker) obj).problem, problem);
+ }
+
+ @Override
+ public int hashCode() {
+ return (problem == null) ? 0 : problem.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return String.format("CDOPapyrusMarker:%s:%s", getResource(), hashCode()); //$NON-NLS-1$
+ }
+
+ @Override
+ public boolean isSubtypeOf(String type) throws CoreException {
+ return (type == null) || MarkerListenerUtils.isMarkerTypeSubtypeOf(getType(), type);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/CDOResourceLabelProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/CDOResourceLabelProvider.java
new file mode 100755
index 00000000..c0175b6e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/CDOResourceLabelProvider.java
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - adapt to source-incompatible API change in CDO Luna M6
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.providers;
+
+import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
+import org.eclipse.emf.cdo.eresource.CDOFileResource;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceLeaf;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.eresource.CDOTextResource;
+import org.eclipse.emf.cdo.eresource.util.EresourceSwitch;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * A provider of labels for CDO resources and URIs for CDO resources in the Papyrus label-provider service.
+ */
+public class CDOResourceLabelProvider extends LabelProvider implements IFilteredLabelProvider {
+
+ private final ResourceManager images = new LocalResourceManager(JFaceResources.getResources(Display.getDefault()));
+
+ private final EresourceSwitch<String> nodeTypeSwitch = createNodeTypeSwitch();
+
+ public CDOResourceLabelProvider() {
+ super();
+ }
+
+ @Override
+ public boolean accept(Object element) {
+ return (element instanceof CDOResourceNode) || (element instanceof URI) && CDOUtils.isCDOURI((URI) element);
+ }
+
+ @Override
+ public void dispose() {
+ images.dispose();
+
+ super.dispose();
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ return images.createImage(Activator.getIcon(Activator.ICON_OPEN_REPOSITORY));
+ }
+
+ @Override
+ public String getText(Object element) {
+ String result = null;
+
+ URI uri = (element instanceof URI) ? (URI) element : ((CDOResourceNode) element).getURI();
+
+ if (uri != null) {
+ String nodeType = element instanceof CDOResourceNode ? nodeTypeSwitch.doSwitch((CDOResource) element) : Messages.CDOResLabels_node;
+ String path = CDOURIUtil.extractResourcePath(uri);
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(uri);
+ String checkoutName = (checkout == null) ? Messages.CDOResLabels_unknown : checkout.getLabel();
+
+ result = NLS.bind(Messages.CDOResLabels_pattern, new Object[] { nodeType, path, checkoutName });
+ }
+
+ return result;
+ }
+
+ private EresourceSwitch<String> createNodeTypeSwitch() {
+ return new EresourceSwitch<String>() {
+
+ @Override
+ public String defaultCase(EObject object) {
+ return Messages.CDOResLabels_nodeKind;
+ }
+
+ @Override
+ public String caseCDOResource(CDOResource object) {
+ return Messages.CDOResLabels_modelKind;
+ }
+
+ @Override
+ public String caseCDOResourceFolder(CDOResourceFolder object) {
+ return Messages.CDOResLabels_folderKind;
+ }
+
+ @Override
+ public String caseCDOBinaryResource(CDOBinaryResource object) {
+ return Messages.CDOResLabels_binKind;
+ }
+
+ @Override
+ public String caseCDOTextResource(CDOTextResource object) {
+ return Messages.CDOResLabels_txtKind;
+ }
+
+ @Override
+ public <IO> String caseCDOFileResource(CDOFileResource<IO> object) {
+ return Messages.CDOResLabels_fileKind;
+ }
+
+ @Override
+ public String caseCDOResourceLeaf(CDOResourceLeaf object) {
+ return Messages.CDOResLabels_leafKind;
+ }
+ };
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java
new file mode 100755
index 00000000..33e2bd69
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.providers;
+
+import static org.eclipse.papyrus.infra.onefile.model.PapyrusModelHelper.getPapyrusModelFactory;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.util.CompositeLabelProvider;
+import org.eclipse.papyrus.infra.onefile.ui.providers.PapyrusLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+/**
+ * This is the ModelImportNodeLabelProvider type. Enjoy.
+ */
+public class ModelImportNodeLabelProvider implements ILabelProvider {
+
+ private final ILabelProvider delegate = new CompositeLabelProvider(new PapyrusLabelProvider(), new WorkbenchLabelProvider());
+
+ public ModelImportNodeLabelProvider() {
+ super();
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ Image result = null;
+ IModelTransferNode model = getModelImportNode(element);
+
+ if (model != null) {
+ result = delegate.getImage(getWorkbenchObject(model));
+ }
+
+ return result;
+ }
+
+ protected IModelTransferNode getModelImportNode(Object element) {
+ return (element instanceof IModelTransferNode) ? (IModelTransferNode) element : null;
+ }
+
+ @Override
+ public String getText(Object element) {
+ String result = null;
+ IModelTransferNode model = getModelImportNode(element);
+
+ if (model != null) {
+ result = delegate.getText(getWorkbenchObject(model));
+
+ if (result == null) {
+ result = model.getPrimaryResourceURI().trimFileExtension().lastSegment();
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ @Override
+ public void dispose() {
+ delegate.dispose();
+ }
+
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ delegate.addListener(listener);
+ }
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ delegate.removeListener(listener);
+ }
+
+ Object getWorkbenchObject(IModelTransferNode element) {
+ Object result = element;
+
+ URI uri = element.getPrimaryResourceURI();
+
+ if (CDOUtils.isCDOURI(uri)) {
+ // fake a platform resource URI so that we can create an IPapyrusFile
+ uri = URI.createPlatformResourceURI(uri.authority() + uri.path(), true);
+ }
+
+ if (uri.isPlatformResource()) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true)));
+
+ if ((file != null) && getPapyrusModelFactory().isDi(file)) {
+ result = getPapyrusModelFactory().createIPapyrusFile(file);
+ } else {
+ result = file;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/CompositeLabelProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/CompositeLabelProvider.java
new file mode 100755
index 00000000..fed130b5
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/CompositeLabelProvider.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.util;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * This is the CompositeLabelProvider type. Enjoy.
+ */
+public class CompositeLabelProvider
+ implements ILabelProvider {
+
+ private List<ILabelProvider> labelProviders = Lists.newArrayList();
+
+ public CompositeLabelProvider() {
+ super();
+ }
+
+ public CompositeLabelProvider(ILabelProvider provider,
+ ILabelProvider... more) {
+ this(Lists.asList(provider, more));
+ }
+
+ public CompositeLabelProvider(Iterable<? extends ILabelProvider> providers) {
+ this();
+
+ Iterables.addAll(this.labelProviders, providers);
+ }
+
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ for (ILabelProvider next : labelProviders) {
+ next.addListener(listener);
+ }
+ }
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ for (ILabelProvider next : labelProviders) {
+ next.removeListener(listener);
+ }
+ }
+
+ @Override
+ public void dispose() {
+ for (ILabelProvider next : labelProviders) {
+ next.dispose();
+ }
+
+ labelProviders.clear();
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ for (ILabelProvider next : labelProviders) {
+ if (next.isLabelProperty(element, property)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ Image result = null;
+
+ for (ILabelProvider next : labelProviders) {
+ result = next.getImage(element);
+
+ if (result != null) {
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public String getText(Object element) {
+ String result = null;
+
+ for (ILabelProvider next : labelProviders) {
+ result = next.getText(element);
+
+ if (result != null) {
+ break;
+ }
+ }
+
+ return result;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/UISafeProgressMonitor.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/UISafeProgressMonitor.java
new file mode 100755
index 00000000..2998ecc7
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/UISafeProgressMonitor.java
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.util;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * A progress monitor that synchronizes updates with the UI thread.
+ */
+public class UISafeProgressMonitor implements IProgressMonitor {
+
+ private final Display display;
+
+ private final IProgressMonitor delegate;
+
+ public UISafeProgressMonitor(IProgressMonitor delegate, Display display) {
+ this.delegate = delegate;
+ this.display = display;
+ }
+
+ private void exec(Runnable runnable) {
+ if (Display.getCurrent() == display) {
+ runnable.run();
+ } else {
+ display.syncExec(runnable);
+ }
+ }
+
+ @Override
+ public void beginTask(final String name, final int totalWork) {
+ exec(new Runnable() {
+
+ @Override
+ public void run() {
+ delegate.beginTask(name, totalWork);
+ }
+ });
+ }
+
+ @Override
+ public void internalWorked(final double work) {
+ exec(new Runnable() {
+
+ @Override
+ public void run() {
+ delegate.internalWorked(work);
+ }
+ });
+ }
+
+ @Override
+ public boolean isCanceled() {
+ final boolean[] result = { false };
+
+ exec(new Runnable() {
+
+ @Override
+ public void run() {
+ result[0] = delegate.isCanceled();
+ }
+ });
+
+ return result[0];
+ }
+
+ @Override
+ public void setCanceled(final boolean value) {
+ exec(new Runnable() {
+
+ @Override
+ public void run() {
+ delegate.setCanceled(value);
+ }
+ });
+ }
+
+ @Override
+ public void setTaskName(final String name) {
+ exec(new Runnable() {
+
+ @Override
+ public void run() {
+ delegate.setTaskName(name);
+ }
+ });
+ }
+
+ @Override
+ public void subTask(final String name) {
+ exec(new Runnable() {
+
+ @Override
+ public void run() {
+ delegate.subTask(name);
+ }
+ });
+ }
+
+ @Override
+ public void worked(final int work) {
+ exec(new Runnable() {
+
+ @Override
+ public void run() {
+ delegate.worked(work);
+ }
+ });
+ }
+
+ @Override
+ public void done() {
+ exec(new Runnable() {
+
+ @Override
+ public void run() {
+ done();
+ }
+ });
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/UIUtil.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/UIUtil.java
new file mode 100755
index 00000000..15505cd9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/util/UIUtil.java
@@ -0,0 +1,224 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.util;
+
+import java.lang.reflect.Method;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+
+import org.eclipse.gmf.runtime.common.ui.util.DisplayUtils;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This is the UIUtil type. Enjoy.
+ */
+public class UIUtil {
+
+ /**
+ * Not instantiable by clients.
+ */
+ private UIUtil() {
+ super();
+ }
+
+ public static Executor uiSafeExecutor() {
+ return UISafeExecutor.INSTANCE;
+ }
+
+ /**
+ * Posts a runnable to run later on the UI thread, whether the current
+ * thread is the UI or not. In fact, the name "later" suggests that usually
+ * this method is useful in code that is on the UI thread but needs to
+ * ensure that some block runs later, after other events have been
+ * processed.
+ *
+ * @param runnable
+ * a block of code to run later
+ */
+ public static void later(Runnable runnable) {
+ DisplayUtils.getDisplay().asyncExec(runnable);
+ }
+
+ /**
+ * Posts a callable that needs access to the UI to run asynchronously on the
+ * specified {@code display} thread.
+ *
+ * @param display
+ * the display on which to post a computation asynchronously
+ * @param callable
+ * a computation to run asynchronously on the UI thread
+ * @return the future result of the {@code callable}
+ */
+ public static <T> Future<T> asyncCall(Display display, Callable<T> callable) {
+ final FutureTask<T> result = new FutureTask<T>(callable);
+ display.asyncExec(result);
+ return result;
+ }
+
+ /**
+ * A UI-safe execution of a {@code callable} that needs access to the UI. If
+ * the current thread is the UI thread, then the result will be available
+ * immediately. Otherwise, the {@code callable} will be invoked
+ * asynchronously and the result will be available some time later.
+ *
+ * @param callable
+ * a computation to run on the UI thread
+ * @return the future result of the {@code callable}
+ */
+ public static <T> Future<T> call(Callable<T> callable) {
+ final FutureTask<T> result = new FutureTask<T>(callable);
+
+ Display display = Display.getCurrent();
+ if (display != null) {
+ result.run();
+ } else {
+ DisplayUtils.getDisplay().asyncExec(result);
+ }
+
+ return result;
+ }
+
+ /**
+ * <p>
+ * Queries whether the current thread is the UI thread and, if not, posts an runnable to re-dispatch the calling method asynchronously on the UI thread.
+ * </p>
+ * <p>
+ * The intended usage pattern is thus:
+ * </p>
+ *
+ * <pre>
+ * public void doSomethingToTheUI(Object arg1, String arg2) {
+ * if (UIUtil.ensureUIThread(this, arg1, arg2) {
+ * // do stuff here with arg1 and arg2 that requires
+ * // the UI thread
+ * }
+ * }
+ * </pre>
+ *
+ * @param receiver
+ * the receiver of the method to be (potentially) re-dispatched.
+ * This is the object calling the {@code ensureUIThread()} utility
+ * @param arguments
+ * the arguments passed in the method invocation to be
+ * re-dispatched
+ *
+ * @return {@code true} if the current thread is the UI thread and the
+ * calling method may proceed; {@code false} if the method
+ * invocation was re-dispatched asynchronously and the calling
+ * method must not proceed
+ */
+ public static boolean ensureUIThread(final Object receiver,
+ final Object... arguments) {
+
+ final Display display = DisplayUtils.getDisplay();
+ boolean result = Display.getCurrent() == display;
+
+ if (!result) {
+ // find the calling method and post its invocation asynchronously
+ String callingMethodName = null;
+ StackTraceElement[] stack = Thread.currentThread().getStackTrace();
+ for (int i = 0; i < stack.length; i++) {
+ StackTraceElement next = stack[i];
+ if (UIUtil.class.getName().equals(next.getClassName())
+ && "ensureUIThread".equals(next.getMethodName())) { //$NON-NLS-1$
+
+ callingMethodName = stack[i + 1].getMethodName();
+ break;
+ }
+ }
+
+ if (callingMethodName == null) {
+ throw new IllegalStateException("Invalid stack trace"); //$NON-NLS-1$
+ }
+
+ final Method method = findMethod(receiver.getClass(),
+ callingMethodName, arguments);
+ if (method == null) {
+ throw new IllegalStateException("Could not find calling method"); //$NON-NLS-1$
+ }
+
+ method.setAccessible(true);
+
+ display.asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ method.invoke(receiver, arguments);
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+ }
+ });
+ }
+
+ return result;
+ }
+
+ private static Method findMethod(Class<?> owner, String name,
+ Object[] arguments) {
+ Method result = null;
+
+ Class<?>[] actual = new Class<?>[arguments.length];
+ for (int i = 0; i < arguments.length; i++) {
+ actual[i] = (arguments[i] == null)
+ ? null
+ : arguments[i].getClass();
+ }
+
+ Method[] declared = owner.getDeclaredMethods();
+ out: for (int i = 0; i < declared.length; i++) {
+ Method next = declared[i];
+ if (name.equals(next.getName())) {
+ Class<?>[] parameters = next.getParameterTypes();
+
+ for (int j = 0; j < parameters.length; j++) {
+ if ((actual[j] != null)
+ && !parameters[j].isAssignableFrom(actual[j])) {
+ continue out;
+ }
+ }
+
+ result = next;
+ break out;
+ }
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ private static final class UISafeExecutor
+ implements Executor {
+
+ static final UISafeExecutor INSTANCE = new UISafeExecutor();
+
+ @Override
+ public void execute(Runnable command) {
+ Display workbenchDisplay = PlatformUI.getWorkbench().getDisplay();
+ if (Display.getCurrent() == workbenchDisplay) {
+ command.run();
+ } else {
+ workbenchDisplay.asyncExec(command);
+ }
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/CheckoutItemProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/CheckoutItemProvider.java
new file mode 100755
index 00000000..6c4179ba
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/CheckoutItemProvider.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.views;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.ui.CDOItemProvider;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.net4j.util.ui.views.IElementFilter;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.SharedImages;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IWorkbenchPage;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the ModelRepositoryItemProvider type. Enjoy.
+ */
+public class CheckoutItemProvider extends CDOItemProvider {
+
+ private final Predicate<Object> isDIResource = new Predicate<Object>() {
+
+ @Override
+ public boolean apply(Object input) {
+ return (input instanceof CDOResource) && DIResourceQuery.getDIResources(((CDOResource) input).cdoView()).contains(input);
+ }
+ };
+
+ private final Predicate<Object> isUnaffiliatedResource = new Predicate<Object>() {
+
+ @Override
+ public boolean apply(Object input) {
+ return !(input instanceof CDOResource) || DIResourceQuery.isUnaffiliatedResource((CDOResource) input);
+ }
+ };
+
+ @SuppressWarnings("unchecked")
+ private final Predicate<Object> resourceFilter = Predicates.or(Predicates.instanceOf(CDOResourceFolder.class), isDIResource, isUnaffiliatedResource);
+
+ private final Function<Object, Object> resourceNodeTransformer = new Function<Object, Object>() {
+
+ @Override
+ public Object apply(Object input) {
+ if (isDIResource.apply(input)) {
+ return DIModel.getInstance((CDOResource) input, true);
+ } else {
+ return input;
+ }
+ }
+ };
+
+ private final Predicate<Object> extensibleFilter;
+
+ public CheckoutItemProvider(IWorkbenchPage page, IElementFilter rootElementFilter) {
+
+ super(page, rootElementFilter);
+
+ extensibleFilter = ItemProviderFilterRegistry.INSTANCE.createFilter(this);
+ }
+
+ public CheckoutItemProvider(IWorkbenchPage page, Object rootElementToShow) {
+ this(page, Collections.singleton(rootElementToShow));
+ }
+
+ public CheckoutItemProvider(IWorkbenchPage page, final Collection<?> rootElementsToShow) {
+ this(page, new IElementFilter() {
+
+ @Override
+ public boolean filter(Object element) {
+ return rootElementsToShow.contains(element);
+ }
+ });
+ }
+
+ public CheckoutItemProvider(IWorkbenchPage page) {
+ this(page, (IElementFilter) null);
+ }
+
+ @Override
+ public Object[] getChildren(Object element) {
+ if (element instanceof CDOCheckout) {
+ // initialize query for DI resources
+ CDOCheckout checkout = (CDOCheckout) element;
+ if (checkout.isOpen()) {
+ DIResourceQuery.initialize(getViewer(), checkout.getView());
+ }
+ }
+
+ Iterable<?> result;
+
+ if (element instanceof DIModel) {
+ result = Arrays.asList(((DIModel) element).getChildren());
+ } else {
+ result = Arrays.asList(super.getChildren(element));
+
+ if ((element instanceof CDOResourceFolder) || (element instanceof CDOCheckout)) {
+ result = filterDIResources(result);
+ }
+ }
+
+ return Iterables.toArray(Iterables.filter(result, extensibleFilter), Object.class);
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ Object result;
+
+ if (element instanceof CDOResource) {
+ CDOResource di = DIResourceQuery.getAffiliateResource((CDOResource) element);
+
+ if (di != null) {
+ result = DIModel.getInstance(di, true);
+ } else {
+ result = super.getParent(element);
+ }
+ } else if (element instanceof DIModel) {
+ CDOResource resource = ((DIModel) element).getResource();
+ CDOView view = resource.cdoView();
+
+ // can't query the parent of an object in a closed view
+ result = ((view != null) && view.isClosed()) ? null : super.getParent(resource);
+ } else {
+ CDOView view = null;
+ if (element instanceof CDOObject) {
+ view = ((CDOObject) element).cdoView();
+ }
+
+ // can't query the parent of an object in a closed view
+ result = ((view != null) && view.isClosed()) ? null : super.getParent(element);
+
+ // we don't show the view
+ if (result instanceof CDOView) {
+ result = CDOExplorerUtil.getCheckout((CDOView) result);
+ }
+ }
+
+ return result;
+ }
+
+ protected Iterable<?> filter(Iterable<?> elements, Predicate<Object> predicate) {
+ return Iterables.transform(Iterables.filter(elements, predicate), resourceNodeTransformer);
+ }
+
+ protected Iterable<?> filterDIResources(Iterable<?> elements) {
+ return filter(elements, resourceFilter);
+ }
+
+ @Override
+ public Image getImage(Object obj) {
+ Image result;
+
+ if (obj instanceof CDOCheckout) {
+ boolean open = ((CDOCheckout) obj).isOffline();
+ result = SharedImages.getImage(open ? Activator.ICON_OPEN_REPOSITORY : Activator.ICON_CLOSED_REPOSITORY);
+ } else if (obj instanceof DIModel) {
+ result = ((DIModel) obj).getImage();
+ } else {
+ result = super.getImage(obj);
+ }
+
+ return result;
+ }
+
+ @Override
+ public String getText(Object obj) {
+ String result;
+
+ if (obj instanceof CDOCheckout) {
+ result = ((CDOCheckout) obj).getLabel();
+ } else if (obj instanceof DIModel) {
+ result = ((DIModel) obj).getName();
+ } else {
+ result = super.getText(obj);
+ }
+
+ return result;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIModel.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIModel.java
new file mode 100755
index 00000000..682622ec
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIModel.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.views;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+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.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.SharedImages;
+import org.eclipse.swt.graphics.Image;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * This is the DIModel type. Enjoy.
+ */
+public class DIModel extends PlatformObject implements Adapter {
+
+ private final CDOResource resource;
+
+ public DIModel(CDOResource resource) {
+ this.resource = resource;
+
+ // ensure that I am the only adapter
+ for (Iterator<Adapter> iter = resource.eAdapters().iterator(); iter.hasNext();) {
+
+ if (iter.next() instanceof DIModel) {
+ iter.remove();
+ }
+ }
+ resource.eAdapters().add(this);
+ }
+
+ public final CDOResource getResource() {
+ return resource;
+ }
+
+ public static DIModel getInstance(CDOResource resource, boolean create) {
+ DIModel result = (DIModel) EcoreUtil.getExistingAdapter(resource, DIModel.class);
+
+ if ((result == null) && create) {
+ result = new DIModel(resource);
+ }
+
+ return result;
+ }
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Class adapter) {
+ if ((adapter == CDOResourceNode.class) || (adapter == CDOResource.class) || (adapter == CDOObject.class) || (adapter == EObject.class)) {
+ return getResource();
+ }
+
+ return super.getAdapter(adapter);
+ }
+
+ public String getName() {
+ return resource.getURI().trimFileExtension().lastSegment();
+ }
+
+ public Image getImage() {
+ return SharedImages.getImage(Activator.ICON_PAPYRUS_MODEL);
+ }
+
+ public Object[] getChildren() {
+ List<CDOResource> result = Lists.newArrayListWithExpectedSize(3);
+
+ String name = getName();
+ if (name != null) {
+ Collection<? extends EObject> nodes;
+ CDOResourceFolder folder = getResource().getFolder();
+ if (folder != null) {
+ nodes = folder.getNodes();
+ } else {
+ CDOResource root = getResource().cdoResource();
+ if ((root != null) && root.isRoot()) {
+ nodes = root.getContents();
+ } else {
+ nodes = Collections.emptyList();
+ }
+ }
+
+ for (CDOResource next : Iterables.filter(nodes, CDOResource.class)) {
+ if (name.equals(next.getURI().trimFileExtension().lastSegment())) {
+
+ result.add(next);
+ }
+ }
+ }
+
+ return result.toArray();
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ // pass
+ }
+
+ @Override
+ public Notifier getTarget() {
+ return resource;
+ }
+
+ @Override
+ public void setTarget(Notifier newTarget) {
+ // pass
+ }
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return type == DIModel.class;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java
new file mode 100755
index 00000000..559e0577
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java
@@ -0,0 +1,341 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.views;
+
+import static org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel.DI_FILE_EXTENSION;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.cdo.view.CDOQuery;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.cdo.view.CDOViewInvalidationEvent;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.net4j.util.lifecycle.ILifecycleEvent;
+import org.eclipse.net4j.util.lifecycle.ILifecycleEvent.Kind;
+import org.eclipse.papyrus.cdo.core.util.JobWaiter;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashModel;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.Display;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
+
+/**
+ * A persistent query for DI resources in some CDO view. Server-side queries are
+ * run in the background to efficiently find all {@link CDOResource}s that
+ * contain DI {@link SashModel}s. The results of the query are asynchronously
+ * published to the UI to refresh the tree viewer.
+ */
+public class DIResourceQuery {
+
+ private static final Map<CDOView, DIResourceQuery> instances = Maps.newHashMap();
+
+ private final StructuredViewer viewer;
+
+ private final CDOQuery legacyQuery;
+
+ private final CDOQuery query;
+
+ private final Job queryJob = new QueryJob();
+
+ private final IListener cdoViewListener = createCDOViewListener();
+
+ private AtomicReference<Set<CDOResource>> diResources = new AtomicReference<Set<CDOResource>>(Collections.<CDOResource> emptySet());
+
+ private Boolean hasLegacyModels;
+
+ private DIResourceQuery(StructuredViewer viewer, CDOView view) {
+ super();
+
+ this.viewer = viewer;
+
+ // Query for all SashWindowsMngr instances (legacy DI models, definitely accurate) and
+ // all resources named *.di that are empty (new-style DI models)
+ this.legacyQuery = view.createQuery("ocl", //$NON-NLS-1$
+ "SashWindowsMngr.allInstances()->collect(oclAsType(ecore::EObject).eResource()).oclAsType(eresource::CDOResource)->union(" + //$NON-NLS-1$
+ "eresource::CDOResource.allInstances()->select(uRI.toString().endsWith('.di') and contents->isEmpty()))", //$NON-NLS-1$
+ DiPackage.Literals.SASH_MODEL);
+
+ // Query for new-style models only, used when the repository does not know the DiPackage
+ // (because it contains no legacy models)
+ this.query = view.createQuery("ocl", //$NON-NLS-1$
+ "eresource::CDOResource.allInstances()->select(uRI.toString().endsWith('.di') and contents->isEmpty())", //$NON-NLS-1$
+ EresourcePackage.Literals.CDO_RESOURCE);
+
+ view.addListener(cdoViewListener);
+
+ if (viewer != null) {
+ viewer.getControl().addDisposeListener(createViewerDisposeListener());
+ }
+
+ runQuery();
+ }
+
+ public static DIResourceQuery initialize(StructuredViewer viewer, CDOView view) {
+
+ DIResourceQuery result;
+
+ synchronized (instances) {
+ result = instances.get(view);
+ if (result == null) {
+ result = new DIResourceQuery(viewer, view);
+ instances.put(view, result);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Wait for the current in-progress query on the specified {@code view} to finish, if any.
+ *
+ * @param view
+ * a view which we are or may be querying for DI resources
+ * @param timeout
+ * a positive timeout
+ * @param unit
+ * the time unit for the {@code timeout}
+ *
+ * @return {@code true} on successful wait (if required); {@code false} on time-out
+ *
+ * @throws InterruptedException
+ * if the wait is interrupted
+ */
+ public static boolean waitFor(CDOView view, long timeout, TimeUnit unit) throws InterruptedException {
+ if (timeout <= 0) {
+ throw new IllegalArgumentException("Non-positive timeout"); //$NON-NLS-1$
+ }
+
+ boolean result;
+
+ DIResourceQuery query;
+
+ synchronized (instances) {
+ query = instances.get(view);
+ }
+
+ if (query == null) {
+ // have nothing to wait for
+ result = true;
+ } else {
+ result = JobWaiter.waitFor(query, timeout, unit);
+ }
+
+ return result;
+ }
+
+ public static Set<CDOResource> getDIResources(CDOView view) {
+ DIResourceQuery query;
+
+ synchronized (instances) {
+ query = instances.get(view);
+ }
+
+ Set<CDOResource> result;
+ if (query == null) {
+ result = Collections.emptySet();
+ } else {
+ result = query.getDIResources();
+ }
+
+ return result;
+ }
+
+ public static boolean isUnaffiliatedResource(CDOResource resource) {
+ return getAffiliateResource(resource) == null;
+ }
+
+ public static CDOResource getAffiliateResource(CDOResource resource) {
+ CDOResource result = null;
+
+ URI uri = resource.getURI();
+ if (DI_FILE_EXTENSION.equals(uri.fileExtension())) {
+ // it *is* a DI resource
+ result = resource;
+ } else {
+ uri = uri.trimFileExtension().appendFileExtension(DI_FILE_EXTENSION);
+
+ for (CDOResource next : getDIResources(resource.cdoView())) {
+ if (uri.equals(next.getURI())) {
+ result = next;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public Set<CDOResource> getDIResources() {
+ return diResources.get();
+ }
+
+ boolean hasLegacyModels() {
+ if (hasLegacyModels == null) {
+ hasLegacyModels = query.getView().getSession().getPackageRegistry().getPackageInfo(DiPackage.eINSTANCE) != null;
+ }
+
+ return hasLegacyModels;
+ }
+
+ private void runQuery() {
+ // we cannot query for EClasses that the server doesn't know about. And,
+ // if it doesn't know about an EClass, then a priori, none of its
+ // instances exist, so we don't need to run the query
+ queryJob.schedule();
+ }
+
+ void refresh() {
+ viewer.refresh();
+ }
+
+ private void dispose() {
+ synchronized (instances) {
+ CDOView view = query.getView();
+ view.removeListener(cdoViewListener);
+ instances.remove(view);
+ }
+ }
+
+ private IListener createCDOViewListener() {
+ return new IListener() {
+
+ @Override
+ public void notifyEvent(IEvent event) {
+ if (event instanceof ILifecycleEvent) {
+ ILifecycleEvent lifecycleEvent = (ILifecycleEvent) event;
+ if (lifecycleEvent.getKind() == Kind.DEACTIVATED) {
+ dispose();
+ }
+ } else if (event instanceof CDOViewInvalidationEvent) {
+ // if my view is invalidated, then some folder or resource
+ // that I am showing has changed. Run the query again and
+ // update asynchronously
+ runQuery();
+ }
+ }
+ };
+ }
+
+ private DisposeListener createViewerDisposeListener() {
+ return new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ dispose();
+ }
+ };
+ }
+
+ //
+ // Nested types
+ //
+
+ private class QueryJob extends Job {
+
+ QueryJob() {
+ super(Messages.DIResourceQuery_2);
+
+ setSystem(true);
+ }
+
+ @Override
+ public boolean belongsTo(Object family) {
+ return family == DIResourceQuery.this;
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ ImmutableSet.Builder<CDOResource> resultBuilder = ImmutableSet.builder();
+ List<CDOResource> rawResult = hasLegacyModels() ? legacyQuery.getResult(CDOResource.class) : query.getResult(CDOResource.class);
+
+ // don't use an iterator because it won't be able to advance
+ // past a resource proxy that cannot be resolved
+ for (int i = 0; i < rawResult.size(); i++) {
+ try {
+ CDOResource next = rawResult.get(i);
+ if (isContained(next)) {
+ resultBuilder.add(next);
+ }
+ } catch (Exception e) {
+ // can get "node not found" exceptions on incompletely
+ // deleted resources
+ Activator.log.error("Error retrieving resource result from CDO query.", e); //$NON-NLS-1$
+ }
+ }
+ Set<CDOResource> result = resultBuilder.build();
+
+ diResources.set(ImmutableSet.copyOf(result));
+
+ if ((viewer != null) && (viewer.getControl() != null)) {
+ Display display = viewer.getControl().getDisplay();
+ if (display != null) {
+ display.asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if ((viewer != null) && (viewer.getControl() != null) && !viewer.getControl().isDisposed()) {
+ refresh();
+ }
+ }
+ });
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private boolean isContained(CDOResource resource) {
+ // determines whether a resource is properly contained in the view's
+ // node hierarchy
+ boolean result = false;
+
+ CDOResourceFolder folder = resource.getFolder();
+ if (folder != null) {
+ // if we don't have read permission on the folder, then we shouldn't attempt to show any contents
+ if (folder.cdoPermission().isReadable()) {
+ result = folder.getNodes().contains(resource);
+ }
+ } else {
+ CDOResource root = resource.cdoResource();
+ if ((root != null) && root.isRoot()) {
+ result = root.getContents().contains(resource);
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/ItemProviderFilterRegistry.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/ItemProviderFilterRegistry.java
new file mode 100755
index 00000000..e680633d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/ItemProviderFilterRegistry.java
@@ -0,0 +1,436 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 443830
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.views;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.plugin.RegistryReader;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.net4j.util.ui.views.IElementFilter;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.osgi.framework.Bundle;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Supplier;
+import com.google.common.base.Suppliers;
+import com.google.common.collect.Maps;
+
+
+/**
+ * This is the ItemProviderFilterRegistry type. Enjoy.
+ */
+class ItemProviderFilterRegistry {
+
+ static final ItemProviderFilterRegistry INSTANCE = new ItemProviderFilterRegistry();
+
+ private final Map<String, Filter> filters = Maps.newHashMap();
+
+ private ItemProviderFilterRegistry() {
+ super();
+
+ new MyRegistryReader().readRegistry();
+ }
+
+ public Predicate<Object> createFilter(ILabelProvider labelProvider) {
+ return new CompositeFilter(labelProvider);
+ }
+
+ //
+ // Nested types
+ //
+
+ final class CompositeFilter implements Predicate<Object> {
+
+ private final ILabelProvider labelProvider;
+
+ private final LabelWrapper labelWrapper = new LabelWrapper();
+
+ CompositeFilter(ILabelProvider labelProvider) {
+ super();
+
+ this.labelProvider = labelProvider;
+ }
+
+ @Override
+ public boolean apply(Object input) {
+ boolean result = true;
+
+ if (!filters.isEmpty()) {
+ labelWrapper.object = input;
+ labelWrapper.label = labelProvider.getText(input);
+
+ for (Iterator<Filter> iter = filters.values().iterator(); result && iter.hasNext();) {
+ result = !iter.next().apply(labelWrapper);
+ }
+ }
+
+ return result;
+ }
+ }
+
+ static final class LabelWrapper {
+
+ Object object;
+
+ String label;
+
+ LabelWrapper() {
+ super();
+ }
+ }
+
+ static abstract class Filter implements Predicate<LabelWrapper> {
+
+ final String id;
+
+ Filter(String id) {
+ super();
+
+ this.id = id;
+ }
+
+ String getID() {
+ return id;
+ }
+ }
+
+ static class LabelPatternFilter extends Filter {
+
+ private final Pattern pattern;
+
+ LabelPatternFilter(String id, String pattern) {
+ super(id);
+
+ this.pattern = Pattern.compile(pattern);
+ }
+
+ @Override
+ public boolean apply(LabelWrapper input) {
+ return (input.label != null) && pattern.matcher(input.label).find();
+ }
+
+ }
+
+ static class LabelPatternFilterWithObjectClass extends LabelPatternFilter {
+
+ private final Class<?> objectClass;
+
+ private final boolean adapt;
+
+ LabelPatternFilterWithObjectClass(String id, String pattern, Class<?> objectClass, boolean adapt) {
+ super(id, pattern);
+
+ this.objectClass = objectClass;
+ this.adapt = adapt;
+ }
+
+ @Override
+ public boolean apply(LabelWrapper input) {
+ return adapts(input.object) && super.apply(input);
+ }
+
+ private boolean adapts(Object object) {
+ return adapt ? (CDOUtils.adapt(object, objectClass) != null) : objectClass.isInstance(object);
+ }
+ }
+
+ static class ElementFilterFilter extends Filter {
+
+ private final Supplier<? extends IElementFilter> filter;
+
+ private boolean enabled = true;
+
+ ElementFilterFilter(String id, Supplier<? extends IElementFilter> filter) {
+ super(id);
+
+ this.filter = filter;
+ }
+
+ @Override
+ public boolean apply(LabelWrapper input) {
+ try {
+ return enabled && filter.get().filter(input.object);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in element filter. Filter will be disabled.", e); //$NON-NLS-1$
+ enabled = false;
+ return false;
+ }
+ }
+ }
+
+ static class PredicateFilter extends Filter {
+
+ private final Supplier<? extends Predicate<Object>> predicate;
+
+ private boolean enabled = true;
+
+ PredicateFilter(String id, Supplier<? extends Predicate<Object>> predicate) {
+ super(id);
+
+ this.predicate = predicate;
+ }
+
+ @Override
+ public boolean apply(LabelWrapper input) {
+ try {
+ return enabled && predicate.get().apply(input.object);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in predicate. Filter will be disabled.", e); //$NON-NLS-1$
+ enabled = false;
+ return false;
+ }
+ }
+ }
+
+ class MyRegistryReader extends RegistryReader {
+
+ static final String EXT_PT = "repositoryFilters"; //$NON-NLS-1$
+
+ static final String E_ITEM_PROVIDER_FILTER = "itemProviderFilter"; //$NON-NLS-1$
+
+ static final String A_ID = "id"; //$NON-NLS-1$
+
+ static final String E_LABEL_PATTERN = "labelPattern"; //$NON-NLS-1$
+
+ static final String A_PATTERN = "pattern"; //$NON-NLS-1$
+
+ static final String A_OBJECT_CLASS = "objectClass"; //$NON-NLS-1$
+
+ static final String A_ADAPT = "adapt"; //$NON-NLS-1$
+
+ static final String E_ELEMENT_FILTER = "elementFilter"; //$NON-NLS-1$
+
+ static final String A_CLASS = "class"; //$NON-NLS-1$
+
+ static final String A_SUPPLIER_CLASS = "supplierClass"; //$NON-NLS-1$
+
+ static final String E_PREDICATE = "predicate"; //$NON-NLS-1$
+
+ private String currentID;
+
+ private IConfigurationElement currentConfig;
+
+ MyRegistryReader() {
+ super(Platform.getExtensionRegistry(), Activator.PLUGIN_ID, EXT_PT);
+ }
+
+ @Override
+ protected boolean readElement(IConfigurationElement config, boolean add) {
+ boolean result = true;
+
+ final String name = config.getName();
+
+ if (E_ITEM_PROVIDER_FILTER.equals(name)) {
+ String id = config.getAttribute(A_ID);
+ if (id == null) {
+ result = false;
+ logMissingAttribute(config, A_ID);
+ currentID = null;
+ currentConfig = null;
+ } else {
+ if (add) {
+ if (currentID != null) {
+ // haven't created the previous filter
+ logError(currentConfig, String.format("Missing specification of filter %s.", currentID)); //$NON-NLS-1$
+ }
+
+ currentID = id;
+ currentConfig = config;
+ } else if (id != null) {
+ removeFilter(id);
+ }
+ }
+ } else if (add) { // don't need to process deletion of filter specifications, only filters
+ if (currentID == null) {
+ result = false;
+ logError(config, String.format("Too many filter specifications.")); //$NON-NLS-1$
+ } else if (filters.containsKey(currentID)) {
+ result = false;
+ logError(config, String.format("Duplicate filter ID \"%s\". The duplicate is ignored.", currentID)); //$NON-NLS-1$
+ } else {
+ result = createFilter(config);
+ }
+ }
+
+ return result;
+ }
+
+ void removeFilter(String id) {
+ filters.remove(id);
+ }
+
+ boolean createFilter(IConfigurationElement config) {
+ boolean result = false;
+
+ final String name = config.getName();
+
+ if (E_LABEL_PATTERN.equals(name)) {
+ result = createLabelPatternFilter(config);
+ } else if (E_ELEMENT_FILTER.equals(name)) {
+ result = createElementFilterFilter(config);
+ } else if (E_PREDICATE.equals(name)) {
+ result = createPredicateFilter(config);
+ }
+
+ return result;
+ }
+
+ private void addFilter(Filter filter) {
+ filters.put(currentID, filter);
+ currentID = null;
+ currentConfig = null;
+ }
+
+ boolean createLabelPatternFilter(IConfigurationElement config) {
+ boolean result = true;
+
+ String pattern = config.getAttribute(A_PATTERN);
+ if (pattern == null) {
+ logMissingAttribute(config, A_PATTERN);
+ result = false;
+ } else {
+ Class<?> objectClass = null;
+ String className = config.getAttribute(A_OBJECT_CLASS);
+
+ if (className != null) {
+ String bundleID = config.getContributor().getName();
+
+ try {
+ Bundle bundle = Platform.getBundle(bundleID);
+ objectClass = bundle.loadClass(className);
+ } catch (Exception e) {
+ result = false;
+ logError(config, String.format("Could not find class \"%s\" in bundle \"%s\".", className, bundleID)); //$NON-NLS-1$
+ }
+ }
+
+ if (result) {
+ try {
+ if (objectClass == null) {
+ addFilter(new LabelPatternFilter(currentID, pattern));
+ } else {
+ boolean adapt = false;
+ String adaptAttr = config.getAttribute(A_ADAPT);
+ if (adaptAttr != null) {
+ adapt = Boolean.parseBoolean(adaptAttr);
+ }
+
+ addFilter(new LabelPatternFilterWithObjectClass(currentID, pattern, objectClass, adapt));
+ }
+ } catch (Exception e) {
+ result = false;
+ Activator.log.error(e);
+ logError(config, String.format("Failed to initialize filter on pattern \"%s\".", pattern)); //$NON-NLS-1$
+ }
+ }
+ }
+
+ return result;
+ }
+
+ boolean createElementFilterFilter(IConfigurationElement config) {
+ boolean result = true;
+
+ String className = config.getAttribute(A_CLASS);
+ String supplierClassName = config.getAttribute(A_SUPPLIER_CLASS);
+
+ if ((className == null) && (supplierClassName == null)) {
+ result = false;
+ logMissingAttribute(config, A_CLASS);
+ } else if (className != null) {
+ try {
+ Object extension = config.createExecutableExtension(A_CLASS);
+ if (!(extension instanceof IElementFilter)) {
+ result = false;
+ logError(config, String.format("Extension is not an IElementFilter: %s", extension.getClass().getName())); //$NON-NLS-1$
+ }
+
+ addFilter(new ElementFilterFilter(currentID, Suppliers.ofInstance((IElementFilter) extension)));
+ } catch (CoreException e) {
+ result = false;
+ Activator.log.error(e);
+ }
+ } else {
+ try {
+ Object extension = config.createExecutableExtension(A_CLASS);
+ if (!(extension instanceof Supplier<?>)) {
+ result = false;
+ logError(config, String.format("Extension is not a Supplier<? extends IElementFilter>: %s", extension.getClass().getName())); //$NON-NLS-1$
+ }
+
+ @SuppressWarnings("unchecked")
+ Supplier<? extends IElementFilter> supplier = (Supplier<? extends IElementFilter>) extension;
+ addFilter(new ElementFilterFilter(currentID, Suppliers.memoize(supplier)));
+ } catch (CoreException e) {
+ result = false;
+ Activator.log.error(e);
+ }
+ }
+
+ return result;
+ }
+
+ boolean createPredicateFilter(IConfigurationElement config) {
+ boolean result = true;
+
+ String className = config.getAttribute(A_CLASS);
+ String supplierClassName = config.getAttribute(A_SUPPLIER_CLASS);
+
+ if ((className == null) && (supplierClassName == null)) {
+ result = false;
+ logMissingAttribute(config, A_CLASS);
+ } else if (className != null) {
+ try {
+ Object extension = config.createExecutableExtension(A_CLASS);
+ if (!(extension instanceof Predicate<?>)) {
+ result = false;
+ logError(config, String.format("Extension is not a Predicate<Object>: %s", extension.getClass().getName())); //$NON-NLS-1$
+ }
+
+ @SuppressWarnings("unchecked")
+ Predicate<Object> predicate = (Predicate<Object>) extension;
+ addFilter(new PredicateFilter(currentID, Suppliers.ofInstance(predicate)));
+ } catch (CoreException e) {
+ result = false;
+ Activator.log.error(e);
+ }
+ } else {
+ try {
+ Object extension = config.createExecutableExtension(A_CLASS);
+ if (!(extension instanceof Supplier<?>)) {
+ result = false;
+ logError(config, String.format("Extension is not a Supplier<? extends Predicate<Object>>: %s", extension.getClass().getName())); //$NON-NLS-1$
+ }
+
+ @SuppressWarnings("unchecked")
+ Supplier<? extends Predicate<Object>> supplier = (Supplier<? extends Predicate<Object>>) extension;
+ addFilter(new PredicateFilter(currentID, Suppliers.memoize(supplier)));
+ } catch (CoreException e) {
+ result = false;
+ Activator.log.error(e);
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/widgets/ActionButton.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/widgets/ActionButton.java
new file mode 100755
index 00000000..2cfd9779
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/widgets/ActionButton.java
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.widgets;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.actions.BaseSelectionListenerAction;
+
+import com.google.common.collect.Lists;
+
+
+/**
+ * An encapsulation of a SWT {@code Button} that invokes an arbitrary pre-defined {@linkplain IAction UI action} when selected (pushed/checked/etc).
+ * For actions that are not {@code BaseSelectionListenerAction}s, an {@linkplain ISelectionAdapter adapter} is required to push the selection
+ * changes in {@linkplain #attach(StructuredViewer) attached viewers} to the action to determine its enablement and the object on which it operates.
+ */
+public class ActionButton {
+
+ private final SelectionWrapper selection;
+
+ private final IAction action;
+
+ private final String label;
+
+ private final int style;
+
+ private Button button;
+
+ private List<StructuredViewer> dependentViewers;
+
+ private ISelectionChangedListener selectionListener;
+
+ public ActionButton(final String label, BaseSelectionListenerAction action, int style) {
+ this(label, action, new DefaultSelectionAdapter(action), style);
+ }
+
+ public ActionButton(final String label, IAction action, ISelectionAdapter selectionAdapter, int style) {
+ this.selection = new SelectionWrapper(selectionAdapter);
+ this.action = action;
+ this.label = label;
+ this.style = style;
+ }
+
+ public Button createControl(Composite parent) {
+ button = new Button(parent, style);
+ button.setText(label);
+
+ button.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ action.run();
+ refreshViewers(selection.getSelection());
+ }
+ });
+
+ button.setEnabled(action.isEnabled());
+
+ button.addDisposeListener(new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ dispose();
+ }
+ });
+
+ return button;
+ }
+
+ public void attach(StructuredViewer viewer) {
+ if (dependentViewers == null) {
+ dependentViewers = Lists.newArrayListWithExpectedSize(1);
+ dependentViewers.add(viewer);
+ viewer.addSelectionChangedListener(getSelectionListener());
+ } else if (!dependentViewers.contains(viewer)) {
+ dependentViewers.add(viewer);
+ viewer.addSelectionChangedListener(getSelectionListener());
+ }
+ }
+
+ private void refreshViewers(IStructuredSelection objectsToUpdate) {
+ if (dependentViewers != null) {
+ for (StructuredViewer next : dependentViewers) {
+ for (Iterator<?> iter = objectsToUpdate.iterator(); iter.hasNext();) {
+ next.refresh(iter.next());
+ }
+ }
+ }
+ }
+
+ private ISelectionChangedListener getSelectionListener() {
+ if (selectionListener == null) {
+ selectionListener = new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ selection.selectionChanged((IStructuredSelection) event.getSelection());
+ if (button != null) {
+ button.setEnabled(action.isEnabled());
+ }
+ }
+ };
+ }
+
+ return selectionListener;
+ }
+
+ private void dispose() {
+ if ((dependentViewers != null) && (selectionListener != null)) {
+ for (StructuredViewer next : dependentViewers) {
+ next.removeSelectionChangedListener(selectionListener);
+ }
+ }
+
+ dependentViewers = null;
+ selectionListener = null;
+ }
+
+ //
+ // Nested types
+ //
+
+ public static interface ISelectionAdapter {
+
+ void selectionChanged(IStructuredSelection selection);
+ }
+
+ private static final class DefaultSelectionAdapter implements ISelectionAdapter {
+
+ private final BaseSelectionListenerAction action;
+
+ DefaultSelectionAdapter(BaseSelectionListenerAction action) {
+ this.action = action;
+ }
+
+ @Override
+ public void selectionChanged(IStructuredSelection selection) {
+ action.selectionChanged(selection);
+ }
+ }
+
+ private static final class SelectionWrapper implements ISelectionAdapter {
+
+ private final ISelectionAdapter adapter;
+
+ private IStructuredSelection selection;
+
+ SelectionWrapper(ISelectionAdapter adapter) {
+ this.adapter = adapter;
+ }
+
+ @Override
+ public void selectionChanged(IStructuredSelection selection) {
+ // stash the selection
+ this.selection = selection;
+
+ // delegate
+ adapter.selectionChanged(selection);
+ }
+
+ IStructuredSelection getSelection() {
+ return selection;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/CheckoutSelectionBlock.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/CheckoutSelectionBlock.java
new file mode 100755
index 00000000..13deeb1c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/CheckoutSelectionBlock.java
@@ -0,0 +1,219 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckoutManager;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.SharedImages;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+import com.google.common.base.Supplier;
+import com.google.common.eventbus.EventBus;
+
+/**
+ * This is the CheckoutSelectionBlock type. Enjoy.
+ */
+public class CheckoutSelectionBlock {
+
+ private final EventBus bus;
+
+ private final Supplier<? extends IRunnableContext> runnableContext;
+
+ private TableViewer repoList;
+
+ private CDOCheckout selectedCheckout;
+
+ public CheckoutSelectionBlock(EventBus bus, Supplier<? extends IRunnableContext> runnableContext) {
+ this.bus = bus;
+ this.runnableContext = runnableContext;
+ }
+
+ public Control createControl(Composite parent) {
+ CDOCheckoutManager mgr = CDOExplorerUtil.getCheckoutManager();
+ repoList = new TableViewer(parent);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(repoList.getControl());
+ repoList.setContentProvider(new RepositoryContentProvider());
+ repoList.setLabelProvider(new RepositoryLabelProvider());
+ repoList.setInput(mgr);
+
+ if (selectedCheckout != null) {
+ repoList.setSelection(new StructuredSelection(selectedCheckout));
+ selected(selectedCheckout);
+ }
+
+ repoList.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+
+ if (sel.isEmpty()) {
+ if (selectedCheckout != null) {
+ // veto empty selection
+ repoList.setSelection(new StructuredSelection(selectedCheckout));
+ }
+ } else {
+ selected((CDOCheckout) sel.getFirstElement());
+ }
+ }
+ });
+
+ // initially select the first connected repo
+ for (CDOCheckout next : mgr.getCheckouts()) {
+
+ if (next.isOpen()) {
+ selected(next);
+ repoList.setSelection(new StructuredSelection(next));
+ break;
+ }
+ }
+
+ return repoList.getControl();
+ }
+
+ public void dispose() {
+ // pass
+ }
+
+ public void setEnabled(boolean enabled) {
+ if (repoList != null) {
+ repoList.getControl().setEnabled(enabled);
+ }
+ }
+
+ public boolean isEnabled() {
+ return (repoList != null) && repoList.getControl().isEnabled();
+ }
+
+ void selected(final CDOCheckout checkout) {
+ selectedCheckout = checkout;
+
+ if (!checkout.isOpen()) {
+ try {
+ runnableContext.get().run(true, false, new IRunnableWithProgress() {
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+
+ SubMonitor sub = SubMonitor.convert(monitor, NLS.bind(Messages.CheckoutSelectionBlock_0, checkout.getLabel()), IProgressMonitor.UNKNOWN);
+
+ try {
+ checkout.open();
+
+ // yes, it's a busy wait, but there's not much
+ // to be done about that.
+ final long deadline = System.currentTimeMillis() + 5000L;
+ while (!checkout.isOpen()) {
+ Thread.sleep(250L);
+ if (System.currentTimeMillis() >= deadline) {
+ break;
+ }
+ }
+
+ repoList.getControl().getDisplay().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (!repoList.getControl().isDisposed()) {
+ repoList.update(checkout, null);
+ bus.post(checkout);
+ }
+ }
+ });
+ } finally {
+ sub.done();
+ }
+ }
+ });
+ } catch (Exception e) {
+ StatusManager.getManager().handle(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.CheckoutSelectionBlock_1, e), StatusManager.SHOW);
+ }
+ }
+
+ bus.post(checkout);
+ }
+
+ public void setSelectedCheckout(CDOCheckout checkout) {
+ this.selectedCheckout = checkout;
+
+ if (repoList != null) {
+ repoList.setSelection(new StructuredSelection(selectedCheckout));
+ selected(selectedCheckout);
+ }
+ }
+
+ public CDOCheckout getSelectedCheckout() {
+ return selectedCheckout;
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class RepositoryContentProvider implements IStructuredContentProvider {
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ viewer.refresh();
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return CDOExplorerUtil.getCheckoutManager().getCheckouts();
+ }
+
+ @Override
+ public void dispose() {
+ // pass
+ }
+ }
+
+ private static class RepositoryLabelProvider extends LabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ boolean open = ((CDOCheckout) element).isOpen();
+ return SharedImages.getImage(open ? Activator.ICON_OPEN_REPOSITORY : Activator.ICON_CLOSED_REPOSITORY);
+ }
+
+ @Override
+ public String getText(Object element) {
+ return ((CDOCheckout) element).getLabel();
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/CheckoutSelectionPage.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/CheckoutSelectionPage.java
new file mode 100755
index 00000000..6464f579
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/CheckoutSelectionPage.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2015, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Eike Stepper (CEA) - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+
+import com.google.common.base.Suppliers;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+/**
+ * This is the CheckoutSelectionPage type. Enjoy.
+ */
+public class CheckoutSelectionPage extends ModelImportWizardPage {
+
+ private static final String MESSAGE = Messages.CheckoutSelectionPage_0;
+
+ private CheckoutSelectionBlock checkoutSelectionBlock;
+
+
+ private CDOCheckout checkout;
+
+ public CheckoutSelectionPage(EventBus bus) {
+ super("repository", Messages.CheckoutSelectionPage_2, null, bus, MESSAGE); //$NON-NLS-1$
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+
+ Composite result = new Composite(parent, SWT.NONE);
+ result.setLayout(new GridLayout(1, false));
+
+ new Label(result, SWT.NONE).setText(Messages.CheckoutSelectionPage_3);
+
+ checkoutSelectionBlock = new CheckoutSelectionBlock(getEventBus(), Suppliers.ofInstance(getContainer()));
+ checkoutSelectionBlock.createControl(result);
+
+ if (checkout != null) {
+ checkoutSelectionBlock.setSelectedCheckout(checkout);
+ }
+
+ setControl(result);
+
+ validatePage();
+ }
+
+ @Override
+ public void dispose() {
+ checkoutSelectionBlock.dispose();
+
+ super.dispose();
+ }
+
+ @Subscribe
+ public void selected(CDOCheckout checkout) {
+ this.checkout = checkout;
+
+ if ((checkoutSelectionBlock != null) && (checkoutSelectionBlock.getSelectedCheckout() != checkout)) {
+ checkoutSelectionBlock.setSelectedCheckout(checkout);
+ }
+ }
+
+ @Override
+ protected Diagnostic doValidatePage() {
+ Diagnostic result = Diagnostic.CANCEL_INSTANCE;
+
+ if (getSelectedRepository() != null) {
+ result = Diagnostic.OK_INSTANCE;
+ }
+
+ return result;
+ }
+
+ public CDOCheckout getSelectedRepository() {
+ return checkout;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/LocalRepositoryView.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/LocalRepositoryView.java
new file mode 100755
index 00000000..68eead53
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/LocalRepositoryView.java
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.cdo.internal.core.CDOProxyResolvingResourceSet;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIModel;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+
+/**
+ * This is the LocalRepositoryView type. Enjoy.
+ */
+public class LocalRepositoryView {
+
+ private final Map<CDOCheckout, CDOView> localViews = Maps.newHashMap();
+
+ private ResourceSet rset = null;
+
+ public LocalRepositoryView() {
+ super();
+ }
+
+ /**
+ * Disposes of all of the local {@link CDOView}s that I have cached.
+ */
+ public void dispose() {
+ for (Map.Entry<CDOCheckout, CDOView> next : localViews.entrySet()) {
+ CDOView view = next.getValue();
+ try {
+ CDOUtils.unload(view);
+ } catch (Exception e) {
+ Activator.error("Exception in unloading CDO repository view.", e); //$NON-NLS-1$
+ } finally {
+ view.close();
+ }
+ }
+
+ localViews.clear();
+
+ if (rset != null) {
+ try {
+ EMFHelper.unload(rset);
+ } catch (Exception e) {
+ Activator.error("Exception in unloading CDO repository view's resource set.", e); //$NON-NLS-1$
+ } finally {
+ rset = null;
+ }
+ }
+ }
+
+ /**
+ * Obtain a view of the specified {@code selection} in the context of a local cache of distinct {@link CDOView}s.
+ *
+ * @param selection
+ * a selection of objects in a CDO view
+ *
+ * @return a new selection consisting of the same objects as presented in my local CDO views
+ */
+ public IStructuredSelection translate(IStructuredSelection selection) {
+ return new StructuredSelection(translate(selection.toList()));
+ }
+
+ /**
+ * Obtain a view of the specified {@code objects} in the context of a local cache of distinct {@link CDOView}s.
+ *
+ * @param objects
+ * a bunch of objects in a CDO view
+ *
+ * @return a new list consisting of the same objects as presented in my local CDO views
+ */
+ public List<Object> translate(Collection<?> objects) {
+ List<Object> result = Lists.newArrayListWithCapacity(objects.size());
+
+ for (Object next : objects) {
+ if (next instanceof EObject) {
+ result.add(translate((EObject) next));
+ } else if (next instanceof DIModel) {
+ DIModel di = (DIModel) next;
+
+ result.add(DIModel.getInstance(translate(di.getResource()), true));
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Obtain a view of the specified {@code object} in the context of a local cache of distinct {@link CDOView}s.
+ *
+ * @param objects
+ * a modeled object in a CDO view
+ *
+ * @return the same object as presented in my local CDO views
+ */
+ public <T extends EObject> T translate(T object) {
+ T result;
+
+ if (object instanceof CDOObject) {
+ CDOObject cdo = (CDOObject) object;
+ CDOView view = cdo.cdoView();
+ if (view == null) {
+ result = object;
+ } else {
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(view);
+ CDOView localView = localViews.get(checkout);
+ if (localView == null) {
+ localView = checkout.openView(true, getResourceSet());
+ localViews.put(checkout, localView);
+ }
+
+ result = localView.getObject(object);
+ }
+ } else {
+ result = object;
+ }
+
+ return result;
+ }
+
+ protected ResourceSet getResourceSet() {
+ if (rset == null) {
+ rset = createResourceSet();
+ }
+
+ return rset;
+ }
+
+ protected ResourceSet createResourceSet() {
+ return new CDOProxyResolvingResourceSet();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelExportMappingsPage.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelExportMappingsPage.java
new file mode 100755
index 00000000..49ee2f64
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelExportMappingsPage.java
@@ -0,0 +1,351 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.DialogCellEditor;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.cdo.core.exporter.IModelExportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferListener;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferMappingListener;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.ModelTransferListenerAdapter;
+import org.eclipse.papyrus.cdo.core.importer.ModelTransferMappingListenerAdapter;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.providers.ModelImportNodeLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.dialogs.ContainerSelectionDialog;
+
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+/**
+ * This is the ModelExportMappingsPage type. Enjoy.
+ */
+public class ModelExportMappingsPage extends ModelImportWizardPage {
+
+ private static final String MESSAGE = Messages.ModelExportMappingsPage_0;
+
+ private IModelTransferConfiguration exportConfig;
+
+ private IModelTransferListener exportConfigListener;
+
+ private CDOCheckout checkout;
+
+ private IModelExportMapping mapping;
+
+ private IModelTransferMappingListener mappingListener;
+
+ private TableViewer mappingTable;
+
+ private IContainer initialDestination;
+
+ public ModelExportMappingsPage(EventBus bus) {
+ super("mappings", Messages.ModelExportMappingsPage_2, null, bus, MESSAGE); //$NON-NLS-1$
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+
+ Composite result = new Composite(parent, SWT.NONE);
+ result.setLayout(new GridLayout());
+
+ mappingTable = new TableViewer(result);
+ mappingTable.getControl().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
+ TableViewerColumn column = new TableViewerColumn(mappingTable, SWT.NONE);
+ column.getColumn().setText(Messages.ModelExportMappingsPage_3);
+ column.getColumn().setWidth(convertWidthInCharsToPixels(30));
+ column = new TableViewerColumn(mappingTable, SWT.NONE);
+ column.getColumn().setText(Messages.ModelExportMappingsPage_4);
+ column.getColumn().setWidth(convertWidthInCharsToPixels(45));
+ column.setEditingSupport(new MappingPathEditingSupport(mappingTable, 1));
+ mappingTable.getTable().setHeaderVisible(true);
+ mappingTable.getTable().setLinesVisible(true);
+ mappingTable.setContentProvider(new MappingContentProvider());
+ mappingTable.setLabelProvider(new MappingLabelProvider());
+
+ if (exportConfig != null) {
+ mappingTable.setInput(exportConfig);
+ }
+
+ setControl(result);
+
+ validatePage();
+ }
+
+ @Override
+ public void dispose() {
+ if (exportConfig != null) {
+ exportConfig.removeModelTransferListener(getImportConfigListener());
+ }
+
+ // I didn't create it, so don't dispose it
+ exportConfig = null;
+
+ super.dispose();
+ }
+
+ @Override
+ protected Diagnostic doValidatePage() {
+ return (mapping == null) ? Diagnostic.CANCEL_INSTANCE : mapping.validate();
+ }
+
+ public void setInitialDestination(IContainer container) {
+ this.initialDestination = container;
+ }
+
+ public IModelExportMapping getMapping() {
+ return mapping;
+ }
+
+ @Subscribe
+ public void setConfiguration(IModelTransferConfiguration config) {
+ this.exportConfig = config;
+
+ if (config != null) {
+ config.addModelTransferListener(getImportConfigListener());
+ }
+
+ setMapping(IModelExportMapping.Factory.DEFAULT.create(config));
+
+ if (mappingTable != null) {
+ mappingTable.setInput(config);
+ }
+
+ validatePage();
+ }
+
+ private IModelTransferListener getImportConfigListener() {
+ if (exportConfigListener == null) {
+ exportConfigListener = new ModelTransferListenerAdapter() {
+
+ @Override
+ public void modelsToTransferChanged(IModelTransferConfiguration configuration) {
+ if ((mappingTable != null) && !mappingTable.getControl().isDisposed()) {
+ mappingTable.refresh();
+ }
+
+ initializeMappings();
+ }
+ };
+ }
+
+ return exportConfigListener;
+ }
+
+ private void setMapping(IModelExportMapping mapping) {
+ if (this.mapping != null) {
+ this.mapping.removeModelTransferMappingListener(getMappingListener());
+ }
+
+ this.mapping = mapping;
+
+ if (this.mapping != null) {
+ this.mapping.addModelTransferMappingListener(getMappingListener());
+ this.mapping.setCheckout(checkout);
+ initializeMappings();
+ }
+ }
+
+ private void initializeMappings() {
+ if ((initialDestination != null) && (mapping != null)) {
+ IPath basePath = initialDestination.getFullPath();
+ for (IModelTransferNode next : exportConfig.getModelsToTransfer()) {
+ if (mapping.getMapping(next) == null) {
+ mapping.mapTo(next, basePath.append(next.getPrimaryResourceURI().lastSegment()));
+ }
+ }
+ }
+ }
+
+ private IModelTransferMappingListener getMappingListener() {
+ if (mappingListener == null) {
+ mappingListener = new ModelTransferMappingListenerAdapter() {
+
+ @Override
+ public void modelTransferMappingChanged(IModelTransferNode node) {
+ IPath mapping = ModelExportMappingsPage.this.mapping.getMapping(node);
+ if ((mapping != null) && (mappingTable != null)) {
+ mappingTable.refresh();
+ }
+ }
+ };
+ }
+
+ return mappingListener;
+ }
+
+ @Subscribe
+ public void setRepository(CDOCheckout checkout) {
+ this.checkout = checkout;
+
+ if (mapping != null) {
+ mapping.setCheckout(checkout);
+ }
+
+ validatePage();
+ }
+
+ private boolean setMapping(IModelTransferNode node, IPath path) {
+ if ((mapping != null) && (node != null)) {
+ mapping.mapTo(node, path);
+ }
+
+ validatePage();
+
+ return true;
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class MappingContentProvider implements IStructuredContentProvider {
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return ((IModelTransferConfiguration) inputElement).getModelsToTransfer().toArray();
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // pass
+ }
+
+ @Override
+ public void dispose() {
+ // pass
+ }
+
+ }
+
+ private class MappingLabelProvider extends ModelImportNodeLabelProvider implements ITableLabelProvider {
+
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return (columnIndex == 0) ? getImage(element) : null;
+ }
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ String result = null;
+
+ switch (columnIndex) {
+ case 0: // Model
+ result = getText(element);
+ break;
+ case 1: // Path
+ if (mapping != null) {
+ IPath path = mapping.getMapping((IModelTransferNode) element);
+ if (path != null) {
+ result = path.toString();
+ }
+ }
+
+ if (result == null) {
+ result = ""; //$NON-NLS-1$
+ }
+ break;
+ }
+
+ return result;
+ }
+ }
+
+ private class MappingPathEditingSupport extends EditingSupport {
+
+ private DialogCellEditor editor;
+
+ private final int columnIndex;
+
+ MappingPathEditingSupport(ColumnViewer columnViewer, int columnIndex) {
+ super(columnViewer);
+
+ this.columnIndex = columnIndex;
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ if (editor == null) {
+ editor = new DialogCellEditor((Composite) getViewer().getControl()) {
+
+ @Override
+ protected Object openDialogBox(Control cellEditorWindow) {
+ ContainerSelectionDialog dlg = new ContainerSelectionDialog(cellEditorWindow.getShell(), null, true, Messages.ModelExportMappingsPage_6);
+ dlg.setTitle(Messages.ModelExportMappingsPage_7);
+ dlg.setHelpAvailable(false);
+
+ Object[] result = (dlg.open() == Window.OK) ? dlg.getResult() : null;
+
+ return ((result == null) || (result.length == 0)) ? null : (IPath) result[0];
+ }
+ };
+ }
+ return editor;
+ }
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+
+ @Override
+ protected Object getValue(Object element) {
+ IPath path = mapping.getMapping((IModelTransferNode) element);
+ return (path == null) ? "" : path.removeLastSegments(1).toString(); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void setValue(final Object element, Object value) {
+ // the 'value' will be a string if the user double-clicks without opening the dialog
+ IPath newPath = (value instanceof IPath) ? (IPath) value : null;
+
+ if (newPath != null) {
+ String name = ((IModelTransferNode) element).getPrimaryResourceURI().lastSegment();
+ newPath = newPath.append(name);
+
+ if (!setMapping((IModelTransferNode) element, newPath)) {
+ // continue editing
+ getViewer().getControl().getDisplay().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ getViewer().editElement(element, columnIndex);
+ }
+ });
+ }
+ }
+ }
+
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelExportWizard.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelExportWizard.java
new file mode 100755
index 00000000..ce4e4e39
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelExportWizard.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.core.exporter.IModelExporter;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIModel;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Multimap;
+import com.google.common.eventbus.EventBus;
+
+/**
+ * This is the ModelExportWizard type. Enjoy.
+ */
+public class ModelExportWizard extends Wizard implements IWorkbenchWizard {
+
+ private final LocalRepositoryView localView = new LocalRepositoryView();
+
+ private ModelReferencesPage referencesPage;
+
+ private ModelExportMappingsPage mappingsPage;
+
+ private IStructuredSelection selection;
+
+ private IModelTransferConfiguration exportConfig;
+
+ private CDOCheckout checkout;
+
+ private IContainer initialDestination;
+
+ public ModelExportWizard() {
+ super();
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = localView.translate(selection);
+
+ setWindowTitle(Messages.ModelExportWizard_0);
+ setNeedsProgressMonitor(true);
+ setHelpAvailable(false);
+ }
+
+ public void setInitialDestination(IContainer container) {
+ this.initialDestination = container;
+ }
+
+ @Override
+ public void addPages() {
+ exportConfig = IModelTransferConfiguration.Factory.EXPORT.create(new WizardOperationContext(getShell().getDisplay(), this), getResourceSet(selection));
+
+ final EventBus bus = new EventBus("exportWizard"); //$NON-NLS-1$
+
+ referencesPage = new ModelReferencesPage(bus, false);
+ addPage(referencesPage);
+
+ mappingsPage = new ModelExportMappingsPage(bus);
+ addPage(mappingsPage);
+
+ if (initialDestination != null) {
+ mappingsPage.setInitialDestination(initialDestination);
+ }
+
+ // start analyzing the selected models' dependencies after the wizard
+ // has been presented
+ Display.getCurrent().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ for (DIModel next : getSelection()) {
+ exportConfig.addModelToTransfer(next.getResource().getURI());
+ }
+
+ bus.post(exportConfig);
+ bus.post(checkout);
+ }
+ });
+ }
+
+ Iterable<DIModel> getSelection() {
+ Multimap<CDOCheckout, DIModel> result = ArrayListMultimap.create();
+
+ if (selection != null) {
+ for (Object next : selection.toList()) {
+ DIModel model = CDOUtils.adapt(next, DIModel.class);
+
+ if (model != null) {
+ URI uri = model.getResource().getURI();
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(uri);
+ if (this.checkout == null) {
+ this.checkout = checkout;
+ }
+
+ if (checkout != null) {
+ result.put(checkout, model);
+ }
+ }
+ }
+ }
+
+ if (result.keySet().size() > 1) {
+ MessageDialog.openInformation(getShell(), Messages.ModelExportWizard_2, NLS.bind(Messages.ModelExportWizard_3, checkout.getLabel()));
+ }
+
+ return result.get(checkout);
+ }
+
+ @Override
+ public boolean performFinish() {
+ boolean result = true;
+
+ IModelExporter exporter = IModelExporter.Factory.DEFAULT.create();
+ Diagnostic problems = exporter.exportModels(mappingsPage.getMapping());
+
+ if (problems.getSeverity() > Diagnostic.INFO) {
+ StatusManager.getManager().handle(BasicDiagnostic.toIStatus(problems), StatusManager.BLOCK);
+ }
+
+ return result;
+ }
+
+ @Override
+ public void dispose() {
+ if (exportConfig != null) {
+ // it actually takes a while to dispose this, unloading all of the
+ // resources potentially covering all of the Papyrus models in the
+ // workspace in order to clean up the UML CacheAdapter
+ final IModelTransferConfiguration configuration = exportConfig;
+ new Job(Messages.ModelExportWizard_4) {
+
+ {
+ setSystem(true);
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ configuration.dispose();
+ } finally {
+ localView.dispose();
+ }
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+ exportConfig = null;
+ }
+
+ super.dispose();
+ }
+
+ ResourceSet getResourceSet(IStructuredSelection selection) {
+ ResourceSet result = null;
+
+ for (Object next : selection.toList()) {
+ CDOResource resource = CDOUtils.adapt(next, CDOResource.class);
+ if (resource != null) {
+ result = resource.getResourceSet();
+ break;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelImportWizard.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelImportWizard.java
new file mode 100755
index 00000000..4d6ddb0f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelImportWizard.java
@@ -0,0 +1,176 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.cdo.core.importer.IModelImporter;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.infra.onefile.model.IPapyrusFile;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+import com.google.common.collect.Lists;
+import com.google.common.eventbus.EventBus;
+
+/**
+ * This is the ModelImportWizard type. Enjoy.
+ */
+public class ModelImportWizard extends Wizard implements IWorkbenchWizard {
+
+ private ModelReferencesPage referencesPage;
+
+ private CheckoutSelectionPage checkoutPage;
+
+ private ModelMappingsPage mappingsPage;
+
+ private IStructuredSelection selection;
+
+ private IModelTransferConfiguration importConfig;
+
+ private CDOCheckout checkout;
+
+ public ModelImportWizard() {
+ super();
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+
+ setWindowTitle(Messages.ModelImportWizard_0);
+ setNeedsProgressMonitor(true);
+ setHelpAvailable(false);
+ }
+
+ /**
+ * Set the initial selection of the repository to import into.
+ */
+ public void setRepository(CDOCheckout checkout) {
+ this.checkout = checkout;
+ }
+
+ @Override
+ public void addPages() {
+ importConfig = IModelTransferConfiguration.Factory.IMPORT.create(new WizardOperationContext(getShell().getDisplay(), this), null);
+
+ final EventBus bus = new EventBus("importWizard"); //$NON-NLS-1$
+
+ referencesPage = new ModelReferencesPage(bus, true);
+ addPage(referencesPage);
+
+ checkoutPage = new CheckoutSelectionPage(bus);
+ addPage(checkoutPage);
+
+ mappingsPage = new ModelMappingsPage(bus);
+ addPage(mappingsPage);
+
+ // start analyzing the selected models's dependencies after the wizard
+ // has been presented
+ Display.getCurrent().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ for (IPapyrusFile next : getSelection()) {
+ importConfig.addModelToTransfer(URI.createPlatformResourceURI(next.getMainFile().getFullPath().toString(), true));
+ }
+
+ bus.post(importConfig);
+
+ if (checkout != null) {
+ bus.post(checkout);
+ }
+ }
+ });
+ }
+
+ Iterable<IPapyrusFile> getSelection() {
+ List<IPapyrusFile> result = Lists.newArrayList();
+
+ if (selection != null) {
+ for (Object next : selection.toList()) {
+ IPapyrusFile file = null;
+
+ if (next instanceof IPapyrusFile) {
+ file = (IPapyrusFile) next;
+ } else if (next instanceof IAdaptable) {
+ file = (IPapyrusFile) ((IAdaptable) next).getAdapter(IPapyrusFile.class);
+ }
+
+ if (file != null) {
+ result.add(file);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean performFinish() {
+ boolean result = true;
+
+ IModelImporter importer = IModelImporter.Factory.DEFAULT.create();
+ Diagnostic problems = importer.importModels(mappingsPage.getSelectedMapping());
+
+ if (problems.getSeverity() > Diagnostic.INFO) {
+ StatusManager.getManager().handle(BasicDiagnostic.toIStatus(problems), StatusManager.BLOCK);
+ }
+
+ return result;
+ }
+
+ @Override
+ public void dispose() {
+ if (importConfig != null) {
+ // it actually takes a while to dispose this, unloading all of the
+ // resources potentially covering all of the Papyrus models in the
+ // workspace in order to clean up the UML CacheAdapter
+ final IModelTransferConfiguration configuration = importConfig;
+ new Job(Messages.ModelImportWizard_2) {
+
+ {
+ setSystem(true);
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ configuration.dispose();
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+ importConfig = null;
+ }
+
+ super.dispose();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelImportWizardPage.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelImportWizardPage.java
new file mode 100755
index 00000000..d762223a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelImportWizardPage.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+
+import com.google.common.eventbus.EventBus;
+
+/**
+ * This is the ModelImportWizardPage type. Enjoy.
+ */
+abstract class ModelImportWizardPage
+ extends WizardPage {
+
+ private final EventBus bus;
+
+ private String message;
+
+ public ModelImportWizardPage(String name, String title,
+ ImageDescriptor image, EventBus bus, String message) {
+ super(name, title, image);
+
+ this.bus = bus;
+ this.message = message;
+
+ bus.register(this);
+ setMessage(message);
+ }
+
+ void validatePage() {
+ setMessage(mostSevere(doValidatePage()));
+ }
+
+ protected Diagnostic doValidatePage() {
+ return Diagnostic.OK_INSTANCE;
+ }
+
+ protected Diagnostic report(int severity, String message) {
+ return new BasicDiagnostic(severity, Activator.PLUGIN_ID, 0, message,
+ null);
+ }
+
+ Diagnostic mostSevere(Diagnostic diagnostic) {
+ Diagnostic result = diagnostic;
+
+ for (Diagnostic next : diagnostic.getChildren()) {
+ if (next.getSeverity() == result.getSeverity()) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ void setMessage(Diagnostic diagnostic) {
+ int messageType;
+ String message;
+
+ switch (diagnostic.getSeverity()) {
+ case Diagnostic.OK:
+ messageType = IMessageProvider.NONE;
+ message = this.message;
+ break;
+ case Diagnostic.INFO:
+ messageType = IMessageProvider.INFORMATION;
+ message = diagnostic.getMessage();
+ break;
+ case Diagnostic.WARNING:
+ messageType = IMessageProvider.WARNING;
+ message = diagnostic.getMessage();
+ break;
+ case Diagnostic.CANCEL:
+ // an OK condition, but we can't finish the page even so
+ messageType = IMessageProvider.INFORMATION;
+ message = diagnostic.getMessage();
+ break;
+ default:
+ messageType = IMessageProvider.ERROR;
+ message = diagnostic.getMessage();
+ break;
+ }
+
+ // OK_INSTANCE and CANCEL_INSTANCE have useless messages
+ if ((diagnostic == Diagnostic.OK_INSTANCE)
+ || (diagnostic == Diagnostic.CANCEL_INSTANCE)) {
+
+ message = this.message;
+ }
+
+ setMessage(message, messageType);
+ setPageComplete(diagnostic.getSeverity() < Diagnostic.ERROR);
+ }
+
+ protected void post(Object event) {
+ bus.post(event);
+ }
+
+ protected EventBus getEventBus() {
+ return bus;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelMappingsPage.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelMappingsPage.java
new file mode 100755
index 00000000..7bbe006f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelMappingsPage.java
@@ -0,0 +1,477 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferListener;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferMappingListener;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.ModelTransferListenerAdapter;
+import org.eclipse.papyrus.cdo.core.importer.ModelTransferMappingListenerAdapter;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.providers.ModelImportNodeLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import com.google.common.collect.Iterables;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+/**
+ * This is the CheckoutSelectionPage type. Enjoy.
+ */
+public class ModelMappingsPage extends ModelImportWizardPage {
+
+ private static final String MESSAGE = Messages.ModelMappingsPage_0;
+
+ private IModelTransferConfiguration importConfig;
+
+ private IModelTransferListener importConfigListener;
+
+ private CDOCheckout checkout;
+
+ private IModelImportMapping manyToOne;
+
+ private IModelTransferMappingListener manyToOneListener;
+
+ private IModelImportMapping oneToOne;
+
+ private IModelTransferMappingListener oneToOneListener;
+
+ private IModelImportMapping selectedMapping;
+
+ private Button manyToOneRadio;
+
+ private Text manyToOnePathText;
+
+ private Button oneToOneRadio;
+
+ private TableViewer oneToOnePathsTable;
+
+ public ModelMappingsPage(EventBus bus) {
+ super("mappings", Messages.ModelMappingsPage_2, null, bus, MESSAGE); //$NON-NLS-1$
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+
+ Composite result = new Composite(parent, SWT.NONE);
+ result.setLayout(new GridLayout(2, false));
+
+ manyToOneRadio = new Button(result, SWT.RADIO);
+ manyToOneRadio.setText(Messages.ModelMappingsPage_3);
+ manyToOneRadio.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create());
+
+ Label label = new Label(result, SWT.NONE);
+ label.setText(Messages.ModelMappingsPage_4);
+ label.setLayoutData(GridDataFactory.swtDefaults().indent(convertWidthInCharsToPixels(5), 0).create());
+
+ manyToOnePathText = new Text(result, SWT.BORDER);
+ manyToOnePathText.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
+ manyToOnePathText.setEnabled(false);
+
+ oneToOneRadio = new Button(result, SWT.RADIO);
+ oneToOneRadio.setText(Messages.ModelMappingsPage_5);
+ oneToOneRadio.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create());
+ oneToOneRadio.setSelection(true);
+
+ oneToOnePathsTable = new TableViewer(result);
+ oneToOnePathsTable.getControl().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).span(2, 1).indent(convertWidthInCharsToPixels(5), 0).create());
+ TableViewerColumn column = new TableViewerColumn(oneToOnePathsTable, SWT.NONE);
+ column.getColumn().setText(Messages.ModelMappingsPage_6);
+ column.getColumn().setWidth(convertWidthInCharsToPixels(30));
+ column = new TableViewerColumn(oneToOnePathsTable, SWT.NONE);
+ column.getColumn().setText(Messages.ModelMappingsPage_7);
+ column.getColumn().setWidth(convertWidthInCharsToPixels(45));
+ column.setEditingSupport(new OneToOneMappingPathEditingSupport(oneToOnePathsTable, 1));
+ oneToOnePathsTable.getTable().setHeaderVisible(true);
+ oneToOnePathsTable.getTable().setLinesVisible(true);
+ oneToOnePathsTable.setContentProvider(new OneToOneMappingContentProvider());
+ oneToOnePathsTable.setLabelProvider(new OneToOneMappingLabelProvider());
+
+ if (importConfig != null) {
+ oneToOnePathsTable.setInput(importConfig);
+ }
+
+ SelectionListener radioListener = new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (((Button) e.widget).getSelection()) {
+ if (e.widget == manyToOneRadio) {
+ oneToOneRadio.setSelection(false);
+ oneToOnePathsTable.getControl().setEnabled(false);
+ manyToOnePathText.setEnabled(true);
+ } else {
+ manyToOneRadio.setSelection(false);
+ manyToOnePathText.setEnabled(false);
+ oneToOnePathsTable.getControl().setEnabled(true);
+ }
+
+ if (e.widget.getData() != null) {
+ selectedMapping((IModelImportMapping) e.widget.getData());
+ }
+
+ validatePage();
+ }
+ }
+ };
+ manyToOneRadio.addSelectionListener(radioListener);
+ oneToOneRadio.addSelectionListener(radioListener);
+
+ manyToOnePathText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ manyToOnePathChanged(((Text) e.widget).getText().trim());
+ }
+ });
+
+ setControl(result);
+
+ validatePage();
+ }
+
+ @Override
+ public void dispose() {
+ if (importConfig != null) {
+ importConfig.removeModelTransferListener(getImportConfigListener());
+ }
+
+ // I didn't create it, so don't dispose it
+ importConfig = null;
+
+ super.dispose();
+ }
+
+ void selectedMapping(IModelImportMapping mapping) {
+ selectedMapping = mapping;
+ post(mapping);
+ }
+
+ @Override
+ protected Diagnostic doValidatePage() {
+ Diagnostic result = Diagnostic.CANCEL_INSTANCE;
+
+ if (selectedMapping != null) {
+ result = selectedMapping.validate();
+ }
+
+ return result;
+ }
+
+ public IModelImportMapping getSelectedMapping() {
+ return selectedMapping;
+ }
+
+ @Subscribe
+ public void setConfiguration(IModelTransferConfiguration config) {
+ this.importConfig = config;
+
+ if (config != null) {
+ config.addModelTransferListener(getImportConfigListener());
+ }
+
+ setManyToOneMapping(IModelImportMapping.Factory.MANY_TO_ONE.create(config));
+ setOneToOneMapping(IModelImportMapping.Factory.ONE_TO_ONE.create(config));
+
+ if (oneToOnePathsTable != null) {
+ oneToOnePathsTable.setInput(config);
+ }
+
+ validatePage();
+ }
+
+ private IModelTransferListener getImportConfigListener() {
+ if (importConfigListener == null) {
+ importConfigListener = new ModelTransferListenerAdapter() {
+
+ @Override
+ public void modelsToTransferChanged(IModelTransferConfiguration configuration) {
+
+ if ((oneToOnePathsTable != null) && !oneToOnePathsTable.getControl().isDisposed()) {
+
+ oneToOnePathsTable.refresh();
+ }
+ }
+ };
+ }
+
+ return importConfigListener;
+ }
+
+ private void setManyToOneMapping(IModelImportMapping mapping) {
+ if (manyToOne != null) {
+ manyToOne.removeModelTransferMappingListener(getManyToOneListener());
+ }
+
+ manyToOne = mapping;
+
+ if (manyToOne != null) {
+ manyToOne.addModelTransferMappingListener(getManyToOneListener());
+ manyToOne.setCheckout(checkout);
+ if (manyToOneRadio != null) {
+ manyToOneRadio.setData(manyToOne);
+ if (manyToOneRadio.getSelection()) {
+ selectedMapping(manyToOne);
+ }
+
+ IModelTransferNode node = Iterables.getFirst(importConfig.getModelsToTransfer(), null);
+ if (node != null) {
+ updateManyToOneMapping(node);
+ }
+ }
+ }
+ }
+
+ private IModelTransferMappingListener getManyToOneListener() {
+ if (manyToOneListener == null) {
+ manyToOneListener = new ModelTransferMappingListenerAdapter() {
+
+ @Override
+ public void modelTransferMappingChanged(IModelTransferNode node) {
+ updateManyToOneMapping(node);
+ }
+ };
+ }
+
+ return manyToOneListener;
+ }
+
+ void updateManyToOneMapping(IModelTransferNode node) {
+ IPath mapping = manyToOne.getMapping(node);
+ if ((mapping != null) && (manyToOnePathText != null)) {
+ String path = mapping.toString();
+ if (!manyToOnePathText.getText().equals(path)) {
+ manyToOnePathText.setText(path);
+ }
+ }
+ }
+
+ private void setOneToOneMapping(IModelImportMapping mapping) {
+ if (oneToOne != null) {
+ oneToOne.removeModelTransferMappingListener(getOneToOneListener());
+ }
+
+ oneToOne = mapping;
+
+ if (oneToOne != null) {
+ oneToOne.addModelTransferMappingListener(getOneToOneListener());
+ oneToOne.setCheckout(checkout);
+ if (oneToOneRadio != null) {
+ oneToOneRadio.setData(oneToOne);
+ if (oneToOneRadio.getSelection()) {
+ selectedMapping(oneToOne);
+ }
+ }
+ }
+ }
+
+ private IModelTransferMappingListener getOneToOneListener() {
+ if (oneToOneListener == null) {
+ oneToOneListener = new ModelTransferMappingListenerAdapter() {
+
+ @Override
+ public void modelTransferMappingChanged(IModelTransferNode node) {
+ IPath mapping = oneToOne.getMapping(node);
+ if ((mapping != null) && (oneToOnePathsTable != null)) {
+ oneToOnePathsTable.refresh();
+ }
+ }
+ };
+ }
+
+ return oneToOneListener;
+ }
+
+ @Subscribe
+ public void setRepository(CDOCheckout checkout) {
+ this.checkout = checkout;
+
+ if (manyToOne != null) {
+ manyToOne.setCheckout(checkout);
+ }
+ if (oneToOne != null) {
+ oneToOne.setCheckout(checkout);
+ }
+
+ validatePage();
+ }
+
+ private void manyToOnePathChanged(String newPath) {
+ try {
+ IModelTransferNode node = Iterables.getFirst(importConfig.getModelsToTransfer(), null);
+ setMapping(node, newPath);
+ } catch (Exception e) {
+ setMessage(Messages.ModelMappingsPage_8, IMessageProvider.ERROR);
+ }
+ }
+
+ private boolean setMapping(IModelTransferNode node, String newPath) {
+ boolean result = false;
+
+ IPath path = new Path(newPath);
+ if (path.isEmpty()) {
+ setMessage(Messages.ModelMappingsPage_9, IMessageProvider.ERROR);
+ setPageComplete(false);
+ } else if (path.hasTrailingSeparator()) {
+ setMessage(Messages.ModelMappingsPage_10, IMessageProvider.ERROR);
+ setPageComplete(false);
+ } else {
+ result = true;
+
+ if ((selectedMapping != null) && (node != null)) {
+ selectedMapping.mapTo(node, path);
+ }
+
+ validatePage();
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class OneToOneMappingContentProvider implements IStructuredContentProvider {
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return ((IModelTransferConfiguration) inputElement).getModelsToTransfer().toArray();
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // pass
+ }
+
+ @Override
+ public void dispose() {
+ // pass
+ }
+
+ }
+
+ private class OneToOneMappingLabelProvider extends ModelImportNodeLabelProvider implements ITableLabelProvider {
+
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return (columnIndex == 0) ? getImage(element) : null;
+ }
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ String result = null;
+
+ switch (columnIndex) {
+ case 0: // Model
+ result = getText(element);
+ break;
+ case 1: // Path
+ if (oneToOne != null) {
+ IPath path = oneToOne.getMapping((IModelTransferNode) element);
+ if (path != null) {
+ result = path.toString();
+ }
+ }
+
+ if (result == null) {
+ result = ""; //$NON-NLS-1$
+ }
+ break;
+ }
+
+ return result;
+ }
+ }
+
+ private class OneToOneMappingPathEditingSupport extends EditingSupport {
+
+ private TextCellEditor editor;
+
+ private final int columnIndex;
+
+ OneToOneMappingPathEditingSupport(ColumnViewer columnViewer, int columnIndex) {
+
+ super(columnViewer);
+
+ this.columnIndex = columnIndex;
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ if (editor == null) {
+ editor = new TextCellEditor((Composite) getViewer().getControl());
+ }
+ return editor;
+ }
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+
+ @Override
+ protected Object getValue(Object element) {
+ IPath path = oneToOne.getMapping((IModelTransferNode) element);
+ return (path == null) ? "" : path.toString(); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void setValue(final Object element, Object value) {
+ String newPath = (value == null) ? "" : String.valueOf(value); //$NON-NLS-1$
+
+ if (!setMapping((IModelTransferNode) element, newPath)) {
+ // continue editing
+ getViewer().getControl().getDisplay().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ getViewer().editElement(element, columnIndex);
+ }
+ });
+ }
+ }
+
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelReferencesPage.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelReferencesPage.java
new file mode 100755
index 00000000..b6060ffe
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/ModelReferencesPage.java
@@ -0,0 +1,495 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Christian W. Damus (CEA) - bug 433830
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Queue;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.resource.DeviceResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.DecorationOverlayIcon;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ICheckable;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.providers.ModelImportNodeLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Sets;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+/**
+ * This is the ModelReferencesPage type. Enjoy.
+ */
+public class ModelReferencesPage extends ModelImportWizardPage {
+
+ private static final String IMPORT_MESSAGE = Messages.ModelReferencesPage_0;
+
+ private static final String EXPORT_MESSAGE = Messages.ModelReferencesPage_1;
+
+ private static final Object[] NO_OBJECTS = {};
+
+ private final boolean isImport;
+
+ private IModelTransferConfiguration importConfig;
+
+ private TreeViewer modelsTree;
+
+ private Text pathText;
+
+ private Button stripSashModelContent;
+
+ public ModelReferencesPage(EventBus bus, boolean isImport) {
+ super("references", Messages.ModelReferencesPage_3, null, bus, isImport ? IMPORT_MESSAGE : EXPORT_MESSAGE); //$NON-NLS-1$
+
+ this.isImport = isImport;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+
+ Composite result = new Composite(parent, SWT.NONE);
+ result.setLayout(new GridLayout(1, false));
+
+ new Label(result, SWT.NONE).setText(Messages.ModelReferencesPage_4);
+
+ ModelImportContentProvider contents = new ModelImportContentProvider();
+ modelsTree = new CheckboxTreeViewer(result);
+ modelsTree.getControl().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
+ modelsTree.setAutoExpandLevel(2);
+ modelsTree.setContentProvider(contents);
+ modelsTree.setLabelProvider(new TreeNodeLabelProvider());
+
+ new Label(result, SWT.NONE).setText(Messages.ModelReferencesPage_5);
+ pathText = new Text(result, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+ pathText.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).hint(SWT.DEFAULT, convertHeightInCharsToPixels(3)).create());
+
+ if (isImport) {
+ stripSashModelContent = new Button(result, SWT.CHECK);
+ stripSashModelContent.setText(Messages.ModelReferencesPage_2);
+ stripSashModelContent.setToolTipText(Messages.ModelReferencesPage_6);
+
+ stripSashModelContent.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (getConfiguration() != null) {
+ getConfiguration().setStripSashModelContent(stripSashModelContent.getSelection());
+ }
+ }
+ });
+ }
+
+ modelsTree.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+ if (!sel.isEmpty()) {
+ selected(sel.getFirstElement());
+ } else {
+ selected(null);
+ }
+ }
+ });
+
+ ((ICheckable) modelsTree).addCheckStateListener(contents);
+ ((ICheckable) modelsTree).addCheckStateListener(new ICheckStateListener() {
+
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ Display.getCurrent().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ validatePage();
+ }
+ });
+ }
+ });
+
+ setControl(result);
+
+ validatePage();
+ }
+
+ public IModelTransferConfiguration getConfiguration() {
+ return importConfig;
+ }
+
+ @Subscribe
+ public void setConfiguration(IModelTransferConfiguration configuration) {
+ if (configuration != this.importConfig) {
+ if (this.importConfig != null) {
+ this.importConfig.dispose();
+ }
+
+ this.importConfig = configuration;
+ }
+
+ modelsTree.setInput(configuration);
+
+ if (configuration != null) {
+ // initialize the checkboxes
+ initializeCheckedNodes();
+
+ // determine enablement of strip-sash-model option
+ if (stripSashModelContent != null) {
+ stripSashModelContent.setSelection(true);
+ stripSashModelContent.setEnabled(configuration.hasSashModelContent());
+
+ this.importConfig.setStripSashModelContent(true);
+ }
+ } else if (stripSashModelContent != null) {
+ stripSashModelContent.setSelection(true);
+ stripSashModelContent.setEnabled(false);
+ }
+
+ validatePage();
+ }
+
+ @Override
+ public void dispose() {
+ // I didn't create it, so don't dispose it
+ importConfig = null;
+
+ super.dispose();
+ }
+
+ private void initializeCheckedNodes() {
+ final Collection<IModelTransferNode> initialSet = importConfig.getModelsToTransfer();
+ final ITreeContentProvider contents = (ITreeContentProvider) modelsTree.getContentProvider();
+ final ICheckable checkable = (ICheckable) modelsTree;
+
+ final Set<IModelTransferNode> visited = Sets.newHashSet();
+ final Queue<Object> queue = new java.util.ArrayDeque<Object>(Arrays.asList(contents.getElements(importConfig)));
+
+ for (Object next = queue.poll(); next != null; next = queue.poll()) {
+ ITreeNode parent = (ITreeNode) next;
+
+ // we must check a parent if the user initially selected it on opening the wizard
+ // or we are importing and it is a dependent of a checked node,
+ // or we are exporting and it is a dependency of a checked node,
+ // or it is a model sub-unit (required dependency) of a checked node
+ boolean mustCheck = initialSet.contains(parent.getElement());
+ if (mustCheck) {
+ checkable.setChecked(next, true);
+ }
+
+ if (visited.add(parent.getElement())) {
+ // recurse into the children
+ for (Object child : contents.getChildren(next)) {
+ ITreeNode treeNode = (ITreeNode) child;
+ queue.add(treeNode);
+
+ // we must check a node if either the user initially selected it on opening the wizard,
+ // or we are importing and it is a dependent of a checked node,
+ // or we are exporting and it is a dependency of a checked node,
+ // or it is a model sub-unit (required dependency) of a checked node
+ mustCheck = initialSet.contains(treeNode.getElement()) //
+ || (isImport ? treeNode.isDependent() : treeNode.isDependency()) //
+ || (checkable.getChecked(parent) && parent.getElement().isModelSubUnit(treeNode.getElement()));
+
+ if (mustCheck) {
+ checkable.setChecked(child, true);
+ importConfig.addModelToTransfer(treeNode.getElement().getPrimaryResourceURI());
+ }
+ }
+ }
+ }
+
+ }
+
+ void selected(Object treeNode) {
+ if (treeNode == null) {
+ pathText.setText(""); //$NON-NLS-1$
+ } else {
+ IModelTransferNode node = ((ITreeNode) treeNode).getElement();
+
+ pathText.setText(node.getName());
+ }
+ }
+
+ @Override
+ protected Diagnostic doValidatePage() {
+ Diagnostic result = Diagnostic.CANCEL_INSTANCE;
+
+ if (importConfig != null) {
+ if (importConfig.getModelsToTransfer().isEmpty()) {
+ result = report(Diagnostic.CANCEL, NLS.bind(Messages.ModelReferencesPage_7, isImport ? Messages.ModelReferencesPage_8 : Messages.ModelReferencesPage_9));
+ } else {
+ result = importConfig.validate();
+ }
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ static interface ITreeNode {
+
+ IModelTransferNode getElement();
+
+ boolean isDependent();
+
+ boolean isDependency();
+ }
+
+ private class ModelImportContentProvider implements ITreeContentProvider, ICheckStateListener {
+
+ private final Multimap<IModelTransferNode, TreeNode> nodes = HashMultimap.create();
+
+ private IModelTransferConfiguration config;
+
+ private Object[] elements;
+
+ private Viewer viewer;
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ nodes.clear();
+ elements = null;
+
+ config = (IModelTransferConfiguration) newInput;
+
+ this.viewer = viewer;
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ Object[] result = elements;
+
+ if ((inputElement != config) || (result == null)) {
+ IModelTransferConfiguration inputConfig = (IModelTransferConfiguration) inputElement;
+ List<TreeNode> nodes = Lists.newArrayListWithCapacity(inputConfig.getModelsToTransfer().size());
+
+ for (IModelTransferNode next : inputConfig.getModelsToTransfer()) {
+ nodes.add(new TreeNode(next));
+ }
+
+ result = nodes.toArray();
+
+ if (inputConfig == config) {
+ // cache the result
+ elements = result;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ IModelTransferNode importNode = ((TreeNode) element).getElement();
+
+ return !(importNode.getDependencies().isEmpty() && importNode.getDependents().isEmpty());
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return ((TreeNode) element).getParent();
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ return ((TreeNode) parentElement).getChildren();
+ }
+
+ @Override
+ public void dispose() {
+ nodes.clear();
+ elements = null;
+ }
+
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ ITreeNode node = (ITreeNode) event.getElement();
+ IModelTransferNode model = node.getElement();
+
+ // apply the check state to the model
+ if (event.getChecked()) {
+ config.addModelToTransfer(model.getPrimaryResourceURI());
+ } else {
+ config.removeModelToTransfer(model);
+ }
+
+ // propagate the check state to other occurrences of the same model
+ for (ITreeNode next : nodes.get(model)) {
+ event.getCheckable().setChecked(next, event.getChecked());
+ }
+ }
+
+ /**
+ * Need a tree-node class because {@link IModelTransferNode}s are repeated
+ * in the tree.
+ */
+ private class TreeNode implements ITreeNode {
+
+ private final IModelTransferNode element;
+
+ private final TreeNode parent;
+
+ private List<TreeNode> children;
+
+ private final boolean dependent;
+
+ TreeNode(IModelTransferNode element) {
+ this(null, element, false);
+ }
+
+ TreeNode(TreeNode parent, IModelTransferNode element, boolean dependent) {
+ this.parent = parent;
+ this.element = element;
+ this.dependent = dependent;
+
+ nodes.put(element, this);
+ }
+
+ @Override
+ public IModelTransferNode getElement() {
+ return element;
+ }
+
+ @Override
+ public boolean isDependent() {
+ return (getParent() != null) && dependent;
+ }
+
+ @Override
+ public boolean isDependency() {
+ return (getParent() != null) && !dependent;
+ }
+
+ Object getParent() {
+ return parent;
+ }
+
+ Object[] getChildren() {
+ if (children == null) {
+ createChildren();
+ }
+
+ return (children == null) ? NO_OBJECTS : children.toArray();
+ }
+
+ void createChildren() {
+ Collection<IModelTransferNode> dependencies = element.getDependencies();
+ Collection<IModelTransferNode> dependents = element.getDependents();
+
+ if (!dependencies.isEmpty() || !dependents.isEmpty()) {
+ children = Lists.newArrayListWithCapacity(dependencies.size() + dependents.size());
+
+ // the recommendation for importing dependencies vs. dependents is
+ // reversed for export as for import. We suggest to export dependencies
+ // of an exported model (those that it references) and import dependents
+ // of an imported model (those that reference it)
+ for (IModelTransferNode next : isImport ? dependents : dependencies) {
+ children.add(new TreeNode(this, next, isImport));
+ }
+
+ for (IModelTransferNode next : isImport ? dependencies : dependents) {
+ // don't show a model as both a dependent and a
+ // dependency if it both references and is
+ // referenced by the other
+ if (isImport ? !dependents.contains(next) : !dependencies.contains(next)) {
+ children.add(new TreeNode(this, next, false));
+ }
+ }
+
+ // initialize check state of new children from configuration
+ Display.getCurrent().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (config != null) {
+ Collection<IModelTransferNode> imported = config.getModelsToTransfer();
+ ICheckable checkable = (ICheckable) viewer;
+ for (ITreeNode next : children) {
+ if (imported.contains(next.getElement())) {
+ checkable.setChecked(next, true);
+ }
+ }
+ }
+ }
+ });
+ }
+ }
+ }
+ }
+
+ private static class TreeNodeLabelProvider extends ModelImportNodeLabelProvider {
+
+ private final ResourceManager images = new DeviceResourceManager(Display.getCurrent());
+
+ @Override
+ public Image getImage(Object element) {
+ ITreeNode treeNode = (ITreeNode) element;
+ Image result = super.getImage(element);
+
+ if ((result != null) && treeNode.isDependent()) {
+ // decorate it
+ result = (Image) images.get(new DecorationOverlayIcon(result, Activator.getIcon(Activator.ICON_DEPENDENT_OVERLAY16), IDecoration.TOP_RIGHT));
+ }
+
+ return result;
+ }
+
+ @Override
+ public void dispose() {
+ images.dispose();
+ }
+
+ @Override
+ protected IModelTransferNode getModelImportNode(Object element) {
+ return ((ITreeNode) element).getElement();
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/WizardOperationContext.java b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/WizardOperationContext.java
new file mode 100755
index 00000000..c35dd271
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/wizards/WizardOperationContext.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.cdo.internal.ui.util.UISafeProgressMonitor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public class WizardOperationContext implements IModelTransferOperation.Context {
+
+ private final Display display;
+
+ private final Wizard wizard;
+
+ public WizardOperationContext(Display display, Wizard wizard) {
+ super();
+
+ this.display = display;
+ this.wizard = wizard;
+ }
+
+ @Override
+ public Diagnostic run(final IModelTransferOperation operation) {
+ final Diagnostic[] result = { Diagnostic.OK_INSTANCE };
+
+ try {
+ getContainer().run(true, false, new IRunnableWithProgress() {
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ result[0] = operation.run(new UISafeProgressMonitor(monitor, display));
+ }
+ });
+ } catch (Exception e) {
+ result[0] = new BasicDiagnostic(Diagnostic.ERROR, Activator.PLUGIN_ID, 0, Messages.WizardOperationContext_0, new Object[] { e });
+ StatusManager.getManager().handle(BasicDiagnostic.toIStatus(result[0]), StatusManager.SHOW);
+ }
+
+ return result[0];
+ }
+
+ protected IWizardContainer getContainer() {
+ return wizard.getContainer();
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.project b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.project
new file mode 100755
index 00000000..fadca311
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.uml.diagram.ui</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/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..94d61f00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..c13d3a25
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.cdo.uml.diagram.internal.ui;x-internal:=true,
+ org.eclipse.papyrus.cdo.uml.diagram.internal.ui.handlers;x-internal:=true,
+ org.eclipse.papyrus.cdo.uml.diagram.internal.ui.l10n;x-internal:=true,
+ org.eclipse.papyrus.cdo.uml.diagram.internal.ui.wizards;x-internal:=true
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.emf.cdo.explorer.ui;bundle-version="4.4.0",
+ org.eclipse.ui.navigator;bundle-version="3.5.500"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.cdo.uml.diagram.internal.ui.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.uml.diagram.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/build.properties
new file mode 100755
index 00000000..269d0c34
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/build.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml,\
+ icons/
+bin.excludes = icons/**/*.pxm
+src.includes = about.html
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/icons/full/elcl16/newmodel_co.gif b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/icons/full/elcl16/newmodel_co.gif
new file mode 100755
index 00000000..a0de3322
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/icons/full/elcl16/newmodel_co.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/icons/full/elcl16/newmodel_co.pxm b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/icons/full/elcl16/newmodel_co.pxm
new file mode 100755
index 00000000..e096c73f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/icons/full/elcl16/newmodel_co.pxm
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/plugin.properties
new file mode 100755
index 00000000..4c40aadf
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/plugin.properties
@@ -0,0 +1,22 @@
+###############################################################################
+#Copyright (c) 2013, 2015 CEA LIST and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+# Eike Stepper (CEA) - bug 466520
+###############################################################################
+
+pluginName = Papyrus CDO UML Diagrams UI (Incubation)
+providerName = Eclipse Modeling Project
+
+storageProvider.name = In a CDO checkout
+newModelCommand.label = New Papyrus Model
+newModelCommand.name = New Papyrus Model
+pluginDescription=Provides primarily the extension of the New Papyrus Model wizard for creation of models in CDO repositories.
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/plugin.xml
new file mode 100755
index 00000000..1d7aebd0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/plugin.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.uml.diagram.wizards.newModelStorageProviders">
+ <provider
+ class="org.eclipse.papyrus.cdo.uml.diagram.internal.ui.wizards.CDONewModelStorageProvider"
+ name="%storageProvider.name">
+ <enablement>
+ <iterate>
+ <or>
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <test
+ property="org.eclipse.papyrus.cdo.core.isCDOObject">
+ </test>
+ </adapt>
+ <adapt
+ type="org.eclipse.emf.cdo.eresource.CDOResourceNode">
+ </adapt>
+ <adapt
+ type="org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout">
+ </adapt>
+ </or>
+ </iterate>
+ </enablement>
+ </provider>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:org.eclipse.papyrus.cdo.ui.ModelRepositoriesView?after=createActions">
+ <command
+ commandId="org.eclipse.papyrus.cdo.uml.diagram.ui.commands.newModel"
+ icon="$nl$/icons/full/elcl16/newmodel_co.gif"
+ label="%newModelCommand.label">
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.eclipse.papyrus.cdo.uml.diagram.ui.commands.newModel"
+ name="%newModelCommand.name">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.cdo.uml.diagram.internal.ui.handlers.NewModelHandler"
+ commandId="org.eclipse.papyrus.cdo.uml.diagram.ui.commands.newModel">
+ <enabledWhen>
+ <iterate operator="and" ifEmpty="false">
+ <or>
+ <adapt
+ type="org.eclipse.emf.cdo.eresource.CDOResourceNode">
+ </adapt>
+ <adapt
+ type="org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout">
+ </adapt>
+ </or>
+ </iterate>
+ </enabledWhen>
+ </handler>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.navigatorContent">
+ <commonWizard
+ associatedExtensionId="org.eclipse.emf.cdo.explorer.ui.CDOCheckouts"
+ type="new"
+ wizardId="org.eclipse.papyrus.uml.diagram.wizards.createmodel">
+ <enablement>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout"/>
+ <test property="org.eclipse.emf.cdo.explorer.checkout.canContainResources" value="true"/>
+ </and>
+ <adapt type="org.eclipse.emf.cdo.eresource.CDOResourceFolder"/>
+ </or>
+ </enablement>
+ </commonWizard>
+ </extension>
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/pom.xml
new file mode 100755
index 00000000..13864970
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.uml.diagram.ui</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/Activator.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/Activator.java
new file mode 100755
index 00000000..a27de82b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/Activator.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.cdo.uml.diagram.internal.ui;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.uml.diagram.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ super();
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the log helper
+ log.setPlugin(plugin);
+
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ log = null;
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/handlers/NewModelHandler.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/handlers/NewModelHandler.java
new file mode 100755
index 00000000..0e78dbe1
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/handlers/NewModelHandler.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.diagram.internal.ui.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.net4j.util.ui.UIUtil;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * This is the NewModelHandler type. Enjoy.
+ */
+public class NewModelHandler extends AbstractHandler {
+
+ public NewModelHandler() {
+ super();
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ setEnabled(event.getApplicationContext());
+
+ if (isEnabled()) {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ InitModelWizard wizard = new InitModelWizard();
+
+ wizard.init(HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench(), (IStructuredSelection) selection);
+
+ WizardDialog dlg = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+ dlg.open();
+ }
+ }
+
+ return null;
+ }
+
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ Object variable = HandlerUtil.getVariable(evaluationContext, ISources.ACTIVE_CURRENT_SELECTION_NAME);
+ ISelection selection = variable instanceof ISelection ? (ISelection) variable : StructuredSelection.EMPTY;
+ CDOObject cdoObject = CDOUtils.adapt(UIUtil.getElement(selection), CDOObject.class);
+
+ setBaseEnabled((cdoObject == null) || !CDOUtils.isReadOnly(cdoObject));
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/l10n/Messages.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/l10n/Messages.java
new file mode 100755
index 00000000..226b3694
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/l10n/Messages.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.diagram.internal.ui.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This is the Messages type. Enjoy.
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.cdo.uml.diagram.internal.ui.l10n.messages"; //$NON-NLS-1$
+
+ public static String NewModelPage_0;
+
+ public static String NewModelPage_1;
+
+ public static String NewModelPage_16;
+
+ public static String NewModelPage_17;
+
+ public static String NewModelPage_18;
+
+ public static String NewModelPage_19;
+
+ public static String NewModelPage_20;
+
+ public static String NewModelPage_2;
+
+ public static String NewModelPage_3;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/l10n/messages.properties b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/l10n/messages.properties
new file mode 100755
index 00000000..2239d4fc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/l10n/messages.properties
@@ -0,0 +1,23 @@
+#############################################################################
+# Copyright (c) 2013, 2017 CEA LIST and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+# Eike Stepper (CEA) - bug 466520
+#############################################################################
+NewModelPage_0=New {0} Model
+NewModelPage_1=Create a new {0} model
+NewModelPage_16=The checkout "{0}" does not exist.
+NewModelPage_17=The new model resource name is required.
+NewModelPage_18=The resource "{0}" already exists.
+NewModelPage_19=The specified folder does not exist and will be created.
+NewModelPage_20=The specified folder cannot be created.
+NewModelPage_2=Enter or select the parent folder:
+NewModelPage_3=Resource name:
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java
new file mode 100755
index 00000000..0091dc89
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java
@@ -0,0 +1,245 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.diagram.internal.ui.wizards;
+
+import static org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper.adapt;
+import static org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper.getSelectedResourceURI;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.editors.PapyrusCDOEditorInput;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectArchitectureContextPage;
+import org.eclipse.papyrus.uml.diagram.wizards.providers.AbstractNewModelStorageProvider;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+
+import com.google.common.eventbus.EventBus;
+
+/**
+ * This is the CDONewModelStorageProvider type. Enjoy.
+ */
+public class CDONewModelStorageProvider extends AbstractNewModelStorageProvider {
+
+ private final EventBus bus = new EventBus("NewCDOModelWizard"); //$NON-NLS-1$
+
+ private CreateModelWizard wizard;
+
+ private SelectArchitectureContextPage newDiagramCategoryPage;
+
+ private NewModelPage newModelPage;
+
+ public CDONewModelStorageProvider() {
+ super();
+ }
+
+ @Override
+ public boolean canHandle(IStructuredSelection initialSelection) {
+ for (Object next : initialSelection.toList()) {
+ if (CDOUtils.isCDOObject(adapt(next, EObject.class))) {
+ return true;
+ }
+
+ if (adapt(next, CDOCheckout.class) != null) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ public void init(CreateModelWizard wizard, IStructuredSelection selection) {
+ super.init(wizard, selection);
+
+ this.wizard = wizard;
+ newModelPage = createNewModelPage(selection);
+ createSelectProviderPart();
+
+ CDOCheckout checkout = getRepository(selection);
+ if (checkout != null) {
+ bus.post(checkout);
+ }
+ newDiagramCategoryPage = createNewArchitectureContextPage(selection);
+ }
+
+ /**
+ * Gets the contextual repository, if any, from a selection.
+ *
+ * @param selection
+ * a selection
+ *
+ * @return the repository that is or contains the {@code selection}
+ */
+ static CDOCheckout getRepository(IStructuredSelection selection) {
+ CDOCheckout result = null;
+
+ if (!selection.isEmpty()) {
+ result = adapt(selection.getFirstElement(), CDOCheckout.class);
+ if (result == null) {
+ CDOResourceNode node = adapt(selection.getFirstElement(), CDOResourceNode.class);
+ if (node == null) {
+ EObject object = adapt(selection.getFirstElement(), EObject.class);
+ if (object != null) {
+ CDOObject cdo = CDOUtils.getCDOObject(object);
+ if (cdo != null) {
+ node = cdo.cdoResource();
+ }
+ }
+ }
+
+ if (node != null) {
+ result = CDOExplorerUtil.getCheckout(node.getURI());
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public List<? extends IWizardPage> createPages() {
+ if (newModelPage == null && newDiagramCategoryPage == null) {
+ return Collections.emptyList();
+ }
+
+ return Arrays.asList(newDiagramCategoryPage, newModelPage);
+ }
+
+ @Override
+ public SelectArchitectureContextPage getArchitectureContextPage() {
+ return newDiagramCategoryPage;
+ }
+
+
+ /**
+ * Creates the new model page, if required.
+ *
+ * @param selection
+ * the selection
+ *
+ * @return the new model page, or {@code null} if none
+ */
+ protected NewModelPage createNewModelPage(IStructuredSelection selection) {
+ if (wizard.isCreateProjectWizard() || wizard.isCreateMultipleModelsWizard()) {
+
+ return null;
+ }
+
+ if (isCreateFromExistingDomainModel()) {
+ URI uri = getSelectedResourceURI(selection);
+ if (uri != null) {
+ uri = uri.trimFileExtension().appendFileExtension(wizard.getDiagramFileExtension(null));
+ return new NewDiagramForExistingModelPage(selection, wizard.getModelKindName(), bus, uri.lastSegment());
+ }
+ }
+
+ return new NewModelPage(selection, bus, wizard.getModelKindName());
+ }
+
+ protected boolean isCreateFromExistingDomainModel() {
+ return wizard.isInitModelWizard() && ((InitModelWizard) wizard).isCreateFromExistingDomainModel();
+ }
+
+ @Override
+ public URI createNewModelURI(String categoryId) {
+ return newModelPage.createNewModelResourceURI();
+ }
+
+ @Override
+ public IEditorInput createEditorInput(URI uri) {
+ return new PapyrusCDOEditorInput(uri, uri.trimFileExtension().lastSegment());
+ }
+
+ private SelectArchitectureContextPage createNewArchitectureContextPage(IStructuredSelection selection) {
+ if (wizard.isCreateProjectWizard() || wizard.isCreateMultipleModelsWizard() || !wizard.isPapyrusRootWizard()) {
+ return null;
+ }
+
+ return new SelectArchitectureContextPage();
+ }
+
+
+ //
+ // Nested types
+ //
+
+ /**
+ * This is the NewDiagramForExistingModelPage type. Enjoy.
+ */
+ protected static class NewDiagramForExistingModelPage extends NewModelPage {
+
+ /** The my diagram resource name. */
+ private final String myDiagramResourceName;
+
+ /**
+ * Instantiates a new new diagram for existing model page.
+ *
+ * @param selection
+ * the selection
+ * @param modelKindName
+ * the user-presentable (translatable) name of the kind of
+ * model to create
+ * @param bus
+ * an event bus for posting events
+ * @param defaultResourceName
+ * the default resource name
+ */
+ public NewDiagramForExistingModelPage(IStructuredSelection selection, String modelKindName, EventBus bus, String defaultResourceName) {
+
+ super(selection, bus, modelKindName);
+
+ myDiagramResourceName = defaultResourceName;
+ setTitle(org.eclipse.papyrus.uml.diagram.wizards.messages.Messages.InitModelWizard_init_papyrus_model);
+ setDescription(org.eclipse.papyrus.uml.diagram.wizards.messages.Messages.InitModelWizard_init_papyrus_model_desc);
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+
+ setNewResourceName(myDiagramResourceName);
+ }
+
+ @Override
+ protected void validatePage() {
+ super.validatePage();
+
+ if (getMessageType() < ERROR) {
+ if (!myDiagramResourceName.equals(getNewResourceName())) {
+ setMessage(NLS.bind(org.eclipse.papyrus.uml.diagram.wizards.messages.Messages.InitModelWizard_diagram_name_is_different_from_domain_model, myDiagramResourceName), ERROR);
+ setPageComplete(false);
+ }
+ }
+ };
+
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/NewModelPage.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/NewModelPage.java
new file mode 100755
index 00000000..464d68bb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/NewModelPage.java
@@ -0,0 +1,480 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.diagram.internal.ui.wizards;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.cdo.CDOElement;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceLeaf;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.ui.checkouts.CDOCheckoutContentProvider;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.uml.diagram.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.Activator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import com.google.common.base.Strings;
+import com.google.common.eventbus.EventBus;
+
+/**
+ * This is the NewModelPage type. Enjoy.
+ */
+public class NewModelPage extends WizardPage {
+
+ public static final String PAGE_ID = "NewCDOModel"; //$NON-NLS-1$
+
+ private String resourceType = "model";
+
+ private Text folderText;
+
+ private TreeViewer folderViewer;
+
+ private Text nameText;
+
+ private boolean synchronizingFolderSelection;
+
+ private Object selectedElement;
+
+ private boolean selectedElementRevealed;
+
+ private URI newModelResourceURI;
+
+ public NewModelPage(IStructuredSelection selection, EventBus bus, String modelKindName) {
+ super(PAGE_ID);
+
+ setTitle(NLS.bind(Messages.NewModelPage_0, modelKindName));
+ setDescription(NLS.bind(Messages.NewModelPage_1, modelKindName));
+ setSelection(selection);
+
+ bus.register(this);
+ }
+
+ @Override
+ public void createControl(Composite parentControl) {
+ Composite container = new Composite(parentControl, SWT.NONE);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
+ container.setLayout(new GridLayout(2, false));
+
+ Label label = new Label(container, SWT.NONE);
+ label.setText(Messages.NewModelPage_2);
+ GridDataFactory.swtDefaults().span(2, 1).applyTo(label);
+
+ folderText = new Text(container, SWT.BORDER);
+ GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(folderText);
+ updateFolderText();
+
+ folderViewer = CDOCheckoutContentProvider.createTreeViewer(container);
+ folderViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+ folderViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (selectedElementRevealed) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ setSelection(selection);
+ }
+
+ validatePage();
+ }
+ });
+
+ new Label(container, SWT.NONE).setText(Messages.NewModelPage_3);
+
+ nameText = new Text(container, SWT.BORDER);
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(nameText);
+ nameText.setText(getUniqueName("di")); //$NON-NLS-1$
+
+ setControl(container);
+
+ folderText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ // TODO: set parent then revealParent()
+ validatePage();
+ }
+ });
+
+ folderViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ setSelection(selection);
+ updateFolderText();
+ validatePage();
+ }
+ });
+
+ nameText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validatePage();
+ }
+ });
+
+ parentControl.getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ revealSelectedElement();
+ validatePage();
+ }
+ });
+ }
+
+ public String getNewResourceName() {
+ return (nameText == null) ? null : nameText.getText().trim();
+ }
+
+ public URI createNewModelResourceURI() {
+ return newModelResourceURI;
+ }
+
+ public URI createSelectedElementURI() {
+ if (selectedElement instanceof CDOCheckout) {
+ CDOCheckout checkout = (CDOCheckout) selectedElement;
+ return checkout.getURI();
+ }
+
+ if (selectedElement instanceof CDOResourceNode) {
+ CDOResourceNode resourceNode = (CDOResourceNode) selectedElement;
+ return resourceNode.getURI();
+ }
+
+ return null;
+ }
+
+ /**
+ * Diagram extension changed.
+ *
+ * @param newExtension
+ * the new extension
+ * @return result of validation of the new extension
+ */
+ public IStatus diagramExtensionChanged(String newExtension) {
+ String currentExtension = getExtension();
+ if (!newExtension.equals(currentExtension)) {
+
+ String oldFileName = getNewResourceName();
+ String base = oldFileName;
+ if (currentExtension != null) {
+ // take one off for the '.'
+ base = base.substring(0, base.length() - currentExtension.length() - 1);
+ }
+ String newFileName = getUniqueName(newExtension);
+
+ setNewResourceName(newFileName);
+
+ String message1 = org.eclipse.papyrus.uml.diagram.wizards.messages.Messages.NewModelFilePage_new_diagram_category_needs_specific_extension;
+ String message2 = NLS.bind(org.eclipse.papyrus.uml.diagram.wizards.messages.Messages.NewModelFilePage_diagram_file_was_renamed, oldFileName, newFileName);
+ String message = message1 + message2;
+ Status resultStatus = new Status(IStatus.INFO, Activator.PLUGIN_ID, message);
+
+ String errorMessage = getErrorMessage();
+ if (errorMessage != null) {
+ resultStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, errorMessage);
+ }
+ return resultStatus;
+ }
+ return Status.OK_STATUS;
+ }
+
+ void setNewResourceName(String newName) {
+ nameText.setText(newName.trim());
+ }
+
+ void validatePage() {
+ newModelResourceURI = null;
+ setMessage(null, NONE);
+ setPageComplete(true);
+
+ String folder = folderText.getText().trim();
+ if (Strings.isNullOrEmpty(folder)) {
+ setPageComplete(false);
+ return;
+ }
+
+ String[] segments = getSegments(folder);
+ CDOCheckout checkout = CDOExplorerUtil.getCheckoutManager().getCheckoutByLabel(segments[0]);
+ if (checkout == null) {
+ setMessage(NLS.bind(Messages.NewModelPage_16, segments[0]), ERROR);
+ setPageComplete(false);
+ return;
+ }
+
+ CDOView view = checkout.getView();
+ String path = "";
+ SegmentType segmentType = SegmentType.FOLDER; // The checkout is treated like a folder.
+
+ for (int i = 1; i < segments.length; i++) {
+ String segment = segments[i];
+ path += "/";
+ path += segment;
+
+ segmentType = SegmentType.of(view, path);
+ if (segmentType == SegmentType.OTHER) {
+ setMessage(Messages.NewModelPage_20, ERROR);
+ setPageComplete(false);
+ return;
+ }
+ }
+
+ String name = getNewResourceName();
+ if (Strings.isNullOrEmpty(name)) {
+ setMessage(Messages.NewModelPage_17, ERROR);
+ setPageComplete(false);
+ return;
+ }
+
+ if (segmentType != SegmentType.MISSING) {
+ String fullPath = path + "/" + name;
+ if (SegmentType.of(view, fullPath) != SegmentType.MISSING) {
+ setMessage(NLS.bind(Messages.NewModelPage_18, fullPath), ERROR);
+ setPageComplete(false);
+ return;
+ }
+ }
+
+ newModelResourceURI = checkout.createResourceURI(path).appendSegment(name);
+
+ if (segmentType == SegmentType.MISSING) {
+ setMessage(Messages.NewModelPage_19, WARNING);
+ }
+ }
+
+ private String[] getSegments(String folder) {
+ while (folder.startsWith("/")) {
+ folder = folder.substring(1);
+ }
+
+ while (folder.endsWith("/")) {
+ folder = folder.substring(0, folder.length() - 1);
+ }
+
+ return folder.split("/");
+ }
+
+ private String getExtension() {
+ String result = null;
+ String name = getNewResourceName();
+
+ if (name != null) {
+ // the proper extension is whatever follows the *last* '.',
+ // but for our purposes we need e.g. "profile.uml" to be
+ // an extension
+ int dot = name.indexOf('.');
+ if (dot >= 0) {
+ result = name.substring(dot + 1);
+ }
+ }
+
+ return result;
+ }
+
+ private void setSelection(IStructuredSelection selection) {
+ selectedElement = null;
+
+ if (!selection.isEmpty()) {
+ Object element = selection.getFirstElement();
+ if (element instanceof CDOElement) {
+ element = ((CDOElement) element).getDelegate();
+ }
+
+ if (element instanceof CDOCheckout) {
+ selectedElement = element;
+ } else if (element instanceof CDOResourceLeaf) {
+ selectedElement = ((CDOResourceLeaf) element).getFolder();
+ } else if (element instanceof CDOResourceFolder) {
+ selectedElement = (CDOResourceFolder) element;
+ } else if (element instanceof EObject) {
+ Resource resource = ((EObject) element).eResource();
+ if (resource instanceof CDOResource) {
+ selectedElement = ((CDOResource) resource).getFolder();
+ }
+ }
+ }
+ }
+
+ private void updateFolderText() {
+ if (!synchronizingFolderSelection) {
+ synchronizingFolderSelection = true;
+
+ try {
+ if (selectedElement == null) {
+ folderText.setText(""); //$NON-NLS-1$
+ } else {
+ StringBuilder builder = new StringBuilder();
+ for (Object node : getSelectedSegments()) {
+ builder.append('/');
+ builder.append(CDOExplorerUtil.getName(node));
+ }
+
+ String path = builder.toString();
+ folderText.setText(path);
+ }
+ } finally {
+ synchronizingFolderSelection = false;
+ }
+ }
+ }
+
+ private void revealSelectedElement() {
+ if (selectedElement != null) {
+ List<Object> segments = getSelectedSegments();
+ for (int i = 0; i < segments.size() - 1; i++) {
+ Object segment = segments.get(i);
+ folderViewer.setExpandedState(segment, true);
+ }
+
+ selectedElementRevealed = true;
+ folderViewer.setSelection(new StructuredSelection(selectedElement), true);
+ }
+ }
+
+ private List<Object> getSelectedSegments() {
+ List<Object> segments = new ArrayList<Object>();
+ fillSegments(segments, selectedElement);
+ return segments;
+ }
+
+ private void fillSegments(List<Object> segments, Object element) {
+ if (element instanceof CDOCheckout) {
+ segments.add(element);
+ return;
+ }
+
+ if (element instanceof CDOResourceFolder) {
+ CDOResourceFolder folder = (CDOResourceFolder) element;
+
+ Adapter adapter = EcoreUtil.getAdapter(folder.eAdapters(), CDOCheckout.class);
+ if (adapter != null) {
+ fillSegments(segments, adapter);
+ } else {
+ Object parent = folder.getFolder();
+ if (parent == null) {
+ parent = EcoreUtil.getAdapter(folder.cdoView().getRootResource().eAdapters(), CDOCheckout.class);
+ }
+
+ fillSegments(segments, parent);
+ }
+ }
+
+ segments.add(element);
+ }
+
+ private EList<EObject> getChildrenOfSelectedElement() {
+ if (selectedElement instanceof CDOCheckout) {
+ CDOCheckout checkout = (CDOCheckout) selectedElement;
+ return checkout.getRootObject().eContents();
+ }
+
+ if (selectedElement instanceof CDOResourceFolder) {
+ CDOResourceFolder folder = (CDOResourceFolder) selectedElement;
+ return folder.eContents();
+ }
+
+ return ECollections.emptyEList();
+ }
+
+ private String getUniqueName(String extension) {
+ Set<String> names = new HashSet<String>();
+ for (EObject eObject : getChildrenOfSelectedElement()) {
+ if (eObject instanceof CDOResourceNode) {
+ CDOResourceNode node = (CDOResourceNode) eObject;
+ String name = node.getName();
+ if (name.startsWith(resourceType)) {
+ names.add(name);
+ }
+ }
+ }
+
+ for (int i = 1; i < Integer.MAX_VALUE; i++) {
+ String name = resourceType + (i > 1 ? i : "") + "." + extension;
+ if (!names.contains(name)) {
+ return name;
+ }
+ }
+
+ throw new IllegalStateException("Too many children");
+ }
+
+ /**
+ * @author Stepper
+ */
+ private enum SegmentType {
+ MISSING, FOLDER, OTHER;
+
+ public static SegmentType of(CDOView view, String path) {
+ CDOResourceNode resourceNode;
+ try {
+ resourceNode = view.getResourceNode(path);
+ if (resourceNode != null) {
+ if (resourceNode instanceof CDOResourceFolder) {
+ return SegmentType.FOLDER;
+ }
+
+ return SegmentType.OTHER;
+ }
+ } catch (Exception ex) {
+ //$FALL-THROUGH$
+ }
+
+ return SegmentType.MISSING;
+ }
+
+ private static SegmentType of(CDOResourceNode resourceNode) {
+ if (resourceNode == null) {
+ return SegmentType.MISSING;
+ }
+
+ if (resourceNode instanceof CDOResourceFolder) {
+ return SegmentType.FOLDER;
+ }
+
+ return SegmentType.OTHER;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.project b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.project
new file mode 100755
index 00000000..4672f475
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.uml.search.ui</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/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..94d61f00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..0386bbfb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.cdo.uml.search.internal.ui;x-internal:=true,
+ org.eclipse.papyrus.cdo.uml.search.internal.ui.open;x-friends:="org.eclipse.papyrus.cdo.uml.search.ui.tests",
+ org.eclipse.papyrus.cdo.uml.search.internal.ui.query;x-friends:="org.eclipse.papyrus.cdo.uml.search.ui.tests",
+ org.eclipse.papyrus.cdo.uml.search.internal.ui.scope;x-friends:="org.eclipse.papyrus.cdo.uml.search.ui.tests"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.core;bundle-version="1.2.0",
+ org.eclipse.emf.cdo.common;bundle-version="[4.3.0,5.0.0)",
+ org.eclipse.ui;bundle-version="3.105.0",
+ org.eclipse.uml2.uml;bundle-version="4.1.0",
+ org.eclipse.papyrus.uml.search.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.views.search;bundle-version="1.2.0",
+ org.eclipse.search;bundle-version="3.9.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.openelement;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui;bundle-version="1.2.0",
+ com.google.guava,
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.cdo.uml.search.internal.ui.Activator
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.uml.search.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/build.properties
new file mode 100755
index 00000000..f17769c6
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html
+src.includes = about.html
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/plugin.properties
new file mode 100755
index 00000000..385d8daf
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/plugin.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+pluginName = Papyrus CDO Search UI (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Provides integration of the Papyrus Model Search functionality to search in CDO repositories, with OCL and text searches. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/plugin.xml
new file mode 100755
index 00000000..2d24e98a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/plugin.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.views.search.scopeProviders">
+ <scopeProvider
+ class="org.eclipse.papyrus.cdo.uml.search.internal.ui.scope.CDOScopeProvider"
+ priority="255">
+ </scopeProvider>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.uml.search.ui.queryProviders">
+ <queryProvider
+ class="org.eclipse.papyrus.cdo.uml.search.internal.ui.query.CDOSearchQueryProvider"
+ priority="255">
+ </queryProvider>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/pom.xml
new file mode 100755
index 00000000..64139662
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.uml.search.ui</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/Activator.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/Activator.java
new file mode 100755
index 00000000..7e7395d9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/Activator.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.internal.ui;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.uml.search.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ super();
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the log helper
+ log.setPlugin(plugin);
+
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ log = null;
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/open/CDOOpenElementService.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/open/CDOOpenElementService.java
new file mode 100755
index 00000000..5a67b9cb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/open/CDOOpenElementService.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.internal.ui.open;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.cdo.internal.ui.editors.PapyrusCDOEditorInput;
+import org.eclipse.papyrus.cdo.internal.ui.editors.PapyrusCDOEditorManager;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.openelement.service.impl.OpenElementServiceImpl;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.editor.IPapyrusPageInput;
+import org.eclipse.papyrus.views.search.scope.ScopeEntry;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * A CDO-aware specialization of the <em>Open Element Service</em> attached to the {@link ModelSet} in CDO search-result {@linkplain ScopeEntry scope
+ * entries}.
+ */
+public class CDOOpenElementService extends OpenElementServiceImpl {
+
+ public CDOOpenElementService() {
+ super();
+ }
+
+ @Override
+ protected IPapyrusPageInput createPapyrusPageInput(URI diResourceURI, URI[] pageURIs) {
+ return new PapyrusCDOEditorInput.PageInput(diResourceURI, pageURIs, false);
+ }
+
+ @Override
+ protected IMultiDiagramEditor openEditor(IWorkbenchPage workbenchPage, IEditorInput input) throws PartInitException {
+ return (IMultiDiagramEditor) PapyrusCDOEditorManager.INSTANCE.openEditor(workbenchPage, input);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/AttributeMatchStrategy.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/AttributeMatchStrategy.java
new file mode 100755
index 00000000..5a44d5ea
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/AttributeMatchStrategy.java
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.internal.ui.query;
+
+import static java.util.regex.Pattern.quote;
+import static org.eclipse.papyrus.cdo.uml.search.internal.ui.query.CDOSearchQueryProvider.isString;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.search.ui.query.QueryInfo;
+import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
+import org.eclipse.papyrus.views.search.results.AttributeMatch;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Sets;
+
+
+/**
+ * This is the AttributeMatchStrategy type. Enjoy.
+ */
+public abstract class AttributeMatchStrategy {
+
+ protected final Matcher matcher;
+
+ protected AttributeMatchStrategy(QueryInfo info) {
+ super();
+
+ final String pattern = info.isRegularExpression() ? info.getQueryText() : quote(info.getQueryText());
+ int flags = info.isCaseSensitive() ? 0 : Pattern.CASE_INSENSITIVE;
+ matcher = Pattern.compile(pattern, flags).matcher(""); //$NON-NLS-1$
+ }
+
+ public static AttributeMatchStrategy create(QueryInfo info) {
+ AttributeMatchStrategy result;
+
+ if (info.isSearchAllStringAttributes()) {
+ result = new AnyStringAttribute(info);
+ } else {
+ result = new NameOnly(info);
+ }
+
+ return result;
+ }
+
+ public static AttributeMatchStrategy create(QueryInfo info, Multimap<EClass, EAttribute> attributes) {
+ return new SpecificAttributes(info, attributes);
+ }
+
+ public abstract void apply(AbstractResultEntry parentMatch, EObject element, Collection<? super AttributeMatch> results);
+
+ protected void match(String value, EAttribute attribute, AbstractResultEntry parentMatch, EObject element, Collection<? super AttributeMatch> results) {
+ matcher.reset(value);
+ while (matcher.find()) {
+ results.add(new AttributeMatch(parentMatch, matcher.start(), matcher.end() - matcher.start(), element, attribute, null));
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class NameOnly extends AttributeMatchStrategy {
+
+ NameOnly(QueryInfo info) {
+ super(info);
+ }
+
+ @Override
+ public void apply(AbstractResultEntry parentMatch, EObject element, Collection<? super AttributeMatch> results) {
+ String name = (element instanceof NamedElement) ? ((NamedElement) element).getName() : null;
+
+ if (name != null) {
+ match(name, UMLPackage.Literals.NAMED_ELEMENT__NAME, parentMatch, element, results);
+ }
+ }
+ }
+
+ private static class AnyStringAttribute extends AttributeMatchStrategy {
+
+ AnyStringAttribute(QueryInfo info) {
+ super(info);
+ }
+
+ @Override
+ public void apply(AbstractResultEntry parentMatch, EObject element, Collection<? super AttributeMatch> results) {
+ for (EAttribute next : element.eClass().getEAllAttributes()) {
+ if (isString(next)) {
+ if (!next.isMany()) {
+ String value = (String) element.eGet(next);
+ if (value != null) {
+ match(value, next, parentMatch, element, results);
+ }
+ } else {
+ // FIXME: Using list's string representation as in core Papyrus, but it doesn't make sense
+ List<?> value = (List<?>) element.eGet(next);
+ match(value.toString(), next, parentMatch, element, results);
+ }
+ }
+ }
+ }
+ }
+
+ private static class SpecificAttributes extends AttributeMatchStrategy {
+
+ private final Multimap<EClass, EAttribute> attributes;
+
+ private final Set<EAttribute> seen = Sets.newHashSet();
+
+ SpecificAttributes(QueryInfo info, Multimap<EClass, EAttribute> attributes) {
+ super(info);
+
+ this.attributes = attributes;
+ }
+
+ @Override
+ public void apply(AbstractResultEntry parentMatch, EObject element, Collection<? super AttributeMatch> results) {
+ seen.clear();
+
+ apply(element.eClass(), parentMatch, element, results);
+
+ for (EClass next : element.eClass().getEAllSuperTypes()) {
+ apply(next, parentMatch, element, results);
+ }
+ }
+
+ protected void apply(EClass eclass, AbstractResultEntry parentMatch, EObject element, Collection<? super AttributeMatch> results) {
+ if (this.attributes.containsKey(eclass)) {
+ Collection<EAttribute> attributes = this.attributes.get(eclass);
+ if (attributes.isEmpty()) {
+ attributes = eclass.getEAllAttributes();
+ }
+
+ for (EAttribute next : attributes) {
+ // don't repeat any attributes because of inheritance
+ if (seen.add(next)) {
+ if (!next.isMany()) {
+ Object value = element.eGet(next);
+ if (value != null) {
+ match(value.toString(), next, parentMatch, element, results);
+ }
+ } else {
+ // FIXME: Using list's string representation as in core Papyrus, but it doesn't make sense
+ List<?> value = (List<?>) element.eGet(next);
+ match(value.toString(), next, parentMatch, element, results);
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/CDOPapyrusQuery.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/CDOPapyrusQuery.java
new file mode 100755
index 00000000..078709bb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/CDOPapyrusQuery.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.internal.ui.query;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.cdo.view.CDOQuery;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.net4j.util.lifecycle.ILifecycle;
+import org.eclipse.net4j.util.lifecycle.LifecycleEventAdapter;
+import org.eclipse.papyrus.cdo.uml.search.internal.ui.Activator;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
+import org.eclipse.papyrus.uml.search.ui.results.PapyrusSearchResult;
+import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
+import org.eclipse.papyrus.views.search.results.ModelElementMatch;
+import org.eclipse.papyrus.views.search.scope.ScopeEntry;
+import org.eclipse.search.ui.ISearchResult;
+import org.eclipse.search.ui.text.Match;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+
+/**
+ * This is the CDOPapyrusQuery type. Enjoy.
+ */
+public class CDOPapyrusQuery extends AbstractPapyrusQuery {
+
+ private final String searchText;
+
+ private final CDOView view;
+
+ private final CDOQuery query;
+
+ private final PapyrusSearchResult searchResult = new PapyrusSearchResult(this);
+
+ private final AttributeMatchStrategy attributeMatchStrategy;
+
+ public CDOPapyrusQuery(String searchText, CDOView view, CDOQuery query, AttributeMatchStrategy attributeMatchStrategy) {
+ super();
+
+ this.searchText = searchText;
+ this.view = view;
+ this.query = query;
+ this.attributeMatchStrategy = attributeMatchStrategy;
+
+ view.addListener(createViewClosedListener());
+ }
+
+ @Override
+ public String getLabel() {
+ return "Papyrus Model Repository Search";
+ }
+
+ @Override
+ public String getSearchQueryText() {
+ return searchText;
+ }
+
+ @Override
+ public boolean canRerun() {
+ // I can be run again as long as my view is open
+ return (view != null) && !view.isClosed();
+ }
+
+ @Override
+ public boolean canRunInBackground() {
+ return true;
+ }
+
+ @Override
+ public IStatus run(IProgressMonitor monitor) throws OperationCanceledException {
+ IStatus result = Status.OK_STATUS;
+
+ searchResult.removeAll();
+
+ // we cannot query for EClasses that the server doesn't know about. And,
+ // if it doesn't know about an EClass, then a priori, none of its
+ // instances exist, so we don't need to run the query
+ if (view.getSession().getPackageRegistry().getPackageInfo(UMLPackage.eINSTANCE) != null) {
+ List<Element> queryResult = query.getResult(Element.class);
+
+ final Map<URI, ScopeEntry> scopeEntries = Maps.newHashMap();
+
+ // don't use an iterator because it won't be able to advance
+ // past a resource proxy that cannot be resolved
+ for (int i = 0; i < queryResult.size(); i++) {
+ try {
+ Element next = queryResult.get(i);
+
+ Resource resource = next.eResource();
+ ResourceSet rset = resource.getResourceSet();
+ ServicesRegistry services = ServiceUtilsForResourceSet.getInstance().getServiceRegistry(rset);
+ ScopeEntry scopeEntry = scopeEntries.get(resource.getURI());
+ if (scopeEntry == null) {
+ scopeEntry = new ScopeEntry(resource.getURI(), services);
+ scopeEntries.put(resource.getURI(), scopeEntry);
+ }
+
+ AbstractResultEntry elementMatch = new ModelElementMatch(next, scopeEntry);
+ searchResult.addMatch(elementMatch);
+
+ // post-process the query result to determine specific attribute matches
+ postProcessAttributeMatches(searchResult, elementMatch, next);
+ } catch (Exception e) {
+ // can get "node not found" exceptions on incompletely
+ // deleted resources
+ Activator.log.error("Error retrieving resource result from CDO query.", e); //$NON-NLS-1$
+ }
+ }
+
+ }
+
+ return result;
+ }
+
+ protected void postProcessAttributeMatches(PapyrusSearchResult searchResult, AbstractResultEntry elementMatch, Element element) {
+ List<Match> attributeMatches = Lists.newArrayListWithExpectedSize(1);
+ attributeMatchStrategy.apply(elementMatch, element, attributeMatches);
+
+ if (!attributeMatches.isEmpty()) {
+ searchResult.addMatches(Iterables.toArray(attributeMatches, Match.class));
+ }
+ }
+
+ @Override
+ public ISearchResult getSearchResult() {
+ return searchResult;
+ }
+
+ private IListener createViewClosedListener() {
+ return new LifecycleEventAdapter() {
+
+ @Override
+ protected void onDeactivated(ILifecycle lifecycle) {
+ // the view is closed. The user probably closed the repository session. Attempts to access the search results
+ // will fail henceforth, so clear them
+ if (searchResult != null) {
+ searchResult.removeAll();
+ }
+ }
+ };
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/CDOSearchQueryProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/CDOSearchQueryProvider.java
new file mode 100755
index 00000000..2ab8b276
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/CDOSearchQueryProvider.java
@@ -0,0 +1,393 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 431953 (pre-requisite refactoring of ModelSet service start-up)
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.internal.ui.query;
+
+import static com.google.common.base.Predicates.instanceOf;
+import static com.google.common.base.Predicates.not;
+import static com.google.common.collect.Iterables.filter;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOQuery;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.ETypedElement;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.net4j.util.collection.Pair;
+import org.eclipse.net4j.util.collection.Triplet;
+import org.eclipse.papyrus.cdo.core.resource.CDOAwareModelSet;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.uml.search.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.uml.search.internal.ui.open.CDOOpenElementService;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
+import org.eclipse.papyrus.infra.services.openelement.service.OpenElementService;
+import org.eclipse.papyrus.uml.search.ui.providers.ParticipantTypeAttribute;
+import org.eclipse.papyrus.uml.search.ui.providers.ParticipantTypeElement;
+import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
+import org.eclipse.papyrus.uml.search.ui.query.CompositePapyrusQuery;
+import org.eclipse.papyrus.uml.search.ui.query.IPapyrusQueryProvider;
+import org.eclipse.papyrus.uml.search.ui.query.QueryInfo;
+import org.eclipse.papyrus.views.search.utils.DefaultServiceRegistryTracker;
+import org.eclipse.papyrus.views.search.utils.IServiceRegistryTracker;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.base.Function;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Multimap;
+
+
+/**
+ * A search-query provider for CDO model repositories.
+ */
+public class CDOSearchQueryProvider implements IPapyrusQueryProvider {
+
+ public CDOSearchQueryProvider() {
+ super();
+ }
+
+ @Override
+ public boolean canProvideFor(URI scope) {
+ return CDOUtils.isCDOURI(scope);
+ }
+
+ @Override
+ public AbstractPapyrusQuery createSimpleSearchQuery(QueryInfo queryInfo) {
+ Pair<String, Boolean> _searchPattern = getSearchPattern(queryInfo);
+ final String searchPattern = _searchPattern.getElement1();
+ final boolean isRegexMatch = _searchPattern.getElement2();
+
+ return createOCLSearchQuery(queryInfo, AttributeMatchStrategy.create(queryInfo), new Function<Triplet<QueryInfo, CDOView, Collection<URI>>, CDOQuery>() {
+
+ @Override
+ public CDOQuery apply(Triplet<QueryInfo, CDOView, Collection<URI>> input) {
+ Map<String, Object> parameters = Maps.newHashMap();
+ String ocl = createOCLExpression(searchPattern, isRegexMatch, input.getElement1().isSearchAllStringAttributes(), input.getElement3(), parameters);
+ CDOQuery result = input.getElement2().createQuery("ocl", ocl, UMLPackage.Literals.NAMED_ELEMENT);
+
+ // variables referenced by the OCL query expression
+ for (Map.Entry<String, ?> next : parameters.entrySet()) {
+ result.setParameter(next.getKey(), next.getValue());
+ }
+
+ return result;
+ }
+ });
+ }
+
+ @Override
+ public AbstractPapyrusQuery createAdvancedSearchQuery(QueryInfo queryInfo) {
+ Pair<String, Boolean> _searchPattern = getSearchPattern(queryInfo);
+ final String searchPattern = _searchPattern.getElement1();
+ final boolean isRegexMatch = _searchPattern.getElement2();
+
+ // build a multi-map of EClasses to EAttributes. For any EClass that doesn't have
+ // attributes specifically selected, add all of its attributes
+ final Multimap<EClass, EAttribute> attributes = ArrayListMultimap.create();
+ for (ParticipantTypeAttribute next : filter(queryInfo.getParticipantTypes(), ParticipantTypeAttribute.class)) {
+ if (next.getParent().getElement() instanceof EClass) {
+ EAttribute attr = (EAttribute) next.getElement();
+ attributes.put((EClass) next.getParent().getElement(), attr);
+ }
+ }
+ for (ParticipantTypeElement next : filter(queryInfo.getParticipantTypes(), not(instanceOf(ParticipantTypeAttribute.class)))) {
+ if (next.getElement() instanceof EClass) {
+ EClass eclass = (EClass) next.getElement();
+ if (!attributes.containsKey(eclass)) {
+ // don't bother looking for instances of classes that have no attributes to search anyways
+ if (!eclass.getEAllAttributes().isEmpty()) {
+ attributes.putAll(eclass, eclass.getEAllAttributes());
+ }
+ }
+ }
+ }
+
+ return createOCLSearchQuery(queryInfo, AttributeMatchStrategy.create(queryInfo, attributes), new Function<Triplet<QueryInfo, CDOView, Collection<URI>>, CDOQuery>() {
+
+ @Override
+ public CDOQuery apply(Triplet<QueryInfo, CDOView, Collection<URI>> input) {
+ Map<String, Object> parameters = Maps.newHashMap();
+ String ocl = createOCLExpression(searchPattern, isRegexMatch, attributes, input.getElement3(), parameters);
+ CDOQuery result = input.getElement2().createQuery("ocl", ocl, UMLPackage.Literals.NAMED_ELEMENT);
+
+ // variables referenced by the OCL query expression
+ for (Map.Entry<String, ?> next : parameters.entrySet()) {
+ result.setParameter(next.getKey(), next.getValue());
+ }
+
+ return result;
+ }
+ });
+ }
+
+ protected Pair<String, Boolean> getSearchPattern(QueryInfo queryInfo) {
+ String searchPattern = PatternUtil.wrap(queryInfo.getQueryText(), queryInfo.isCaseSensitive(), queryInfo.isRegularExpression(), queryInfo.isSearchAllStringAttributes());
+ boolean isRegexMatch = searchPattern != null;
+ if (!isRegexMatch) {
+ searchPattern = queryInfo.getQueryText();
+ }
+
+ return Pair.create(searchPattern, isRegexMatch);
+ }
+
+ protected AbstractPapyrusQuery createOCLSearchQuery(QueryInfo queryInfo, AttributeMatchStrategy attributeMatcheStrategy, Function<Triplet<QueryInfo, CDOView, Collection<URI>>, CDOQuery> queryFunction) {
+ IServiceRegistryTracker tracker = new DefaultServiceRegistryTracker();
+
+ Multimap<CDOView, URI> views = getViews(queryInfo.getScope());
+ List<AbstractPapyrusQuery> result = Lists.newArrayListWithCapacity(views.keySet().size());
+ for (CDOView view : views.keySet()) {
+ CDOQuery query = queryFunction.apply(new Triplet<QueryInfo, CDOView, Collection<URI>>(queryInfo, view, views.get(view)));
+
+ // parameters for the server-side OCL query handler
+ query.setParameter("cdoImplicitRootClass", EcorePackage.Literals.EOBJECT);
+
+ AbstractPapyrusQuery searchQuery = new CDOPapyrusQuery(queryInfo.getQueryText(), view, query, attributeMatcheStrategy);
+ result.add(searchQuery);
+
+ try {
+ // automatically clean up the view and services registry when no longer needed
+ tracker.track(searchQuery, ServiceUtilsForResourceSet.getInstance().getServiceRegistry(view.getResourceSet()));
+ } catch (ServiceException e) {
+ Activator.log.error("Cannot track services registry for automatic clean-up.", e); //$NON-NLS-1$
+ }
+ }
+
+ return CompositePapyrusQuery.compose(result);
+ }
+
+ protected Multimap<CDOView, URI> getViews(Collection<URI> scope) {
+ Multimap<CDOView, URI> result = HashMultimap.create();
+ Map<CDOCheckout, CDOView> views = Maps.newHashMap();
+
+ try {
+ for (URI uri : scope) {
+ CDOCheckout checkout = CDOExplorerUtil.getCheckout(uri);
+ if ((checkout != null) && checkout.isOpen()) {
+ CDOView view = views.get(checkout);
+ if (view == null) {
+ // no view, yet, for this repo
+
+ ServicesRegistry services = new ServicesRegistry();
+ services.add(LabelProviderService.class, 10, new LabelProviderServiceImpl());
+ services.add(OpenElementService.class, 10, new CDOOpenElementService());
+ services.add(ModelSet.class, 10, new CDOAwareModelSet());
+ services.startRegistry();
+
+ // create our own transaction for the model-set
+ view = checkout.openTransaction(ServiceUtils.getInstance().getModelSet(services));
+ views.put(checkout, view);
+ }
+ result.put(view, uri);
+ }
+ }
+ } catch (ServiceException e) {
+ Activator.log.error("Failed to initialize service registry for CDO search query.", e); //$NON-NLS-1$
+ }
+
+ return result;
+ }
+
+ /**
+ * Create the OCL query expression for a "basic" (from the user's perspective) search.
+ */
+ protected String createOCLExpression(String searchPattern, boolean isRegexMatch, boolean isAllStringAttributes, Collection<URI> scope, Map<String, Object> parameters) {
+ StringBuilder result = new StringBuilder();
+
+ // parameters to pass through to OCL
+ parameters.put("searchPattern", searchPattern); //$NON-NLS-1$
+
+ // first, build the CDOResource.allInstances() select clause for the scope
+ StringBuilder scopeClause = getScopeClause(scope);
+
+ // based on the CDOResource scope clause, find the candidate NamedElements
+ if (scopeClause.length() == 0) {
+ // easy case. Do an allInstances() query
+ result.append("NamedElement.allInstances()"); //$NON-NLS-1$
+ } else {
+ // iterate the contents of resources matching the scope criteria
+ result.append("eresource::CDOResource.allInstances()->select(r | ");
+
+ result.append(scopeClause);
+
+ // close the CDOResource.allInstances()->select(...) scope clause
+ result.append(")"); //$NON-NLS-1$
+
+ // and collect all of the NamedElements within those resources
+ result.append("->collect(r | r.cdoAllProperContents(NamedElement))"); //$NON-NLS-1$
+ }
+
+ // from our candidate NamedElements, select those that match
+ if (isAllStringAttributes) {
+ result.append("->select(e | e.cdoMatches(searchPattern))"); //$NON-NLS-1$
+ } else {
+ result.append("->select(e | not e.name.oclIsUndefined() and e.name."); //$NON-NLS-1$
+ if (isRegexMatch) {
+ result.append("matches(searchPattern)"); //$NON-NLS-1$
+ } else {
+ result.append("indexOf(searchPattern) > 0"); //$NON-NLS-1$
+ }
+
+ // close the ->select(...)
+ result.append(")"); //$NON-NLS-1$
+ }
+
+ return result.toString();
+ }
+
+ protected StringBuilder getScopeClause(Iterable<URI> scope) {
+ StringBuilder result = new StringBuilder();
+
+ boolean first = true;
+ for (URI uri : scope) {
+ String path = CDOURIUtil.extractResourcePath(uri);
+ if (uri.hasTrailingPathSeparator() && !path.endsWith("/")) { //$NON-NLS-1$
+ path = path + "/"; //$NON-NLS-1$
+ }
+ if ((path.length() > 1) || (!path.startsWith("/") && (path.length() > 0))) { //$NON-NLS-1$
+ if (first) {
+ first = false;
+ } else {
+ result.append(" or "); //$NON-NLS-1$
+ }
+
+ result.append("r.path.startsWith('"); //$NON-NLS-1$
+ result.append(oclQuoteString(path));
+ result.append("')"); //$NON-NLS-1$
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Create the OCL query expression for an "advanced" (from the user's perspective) search.
+ */
+ protected String createOCLExpression(String searchPattern, boolean isRegexMatch, Multimap<EClass, EAttribute> attributes, Collection<URI> scope, Map<String, Object> parameters) {
+ StringBuilder result = new StringBuilder();
+
+ // parameters to pass through to OCL
+ parameters.put("searchPattern", searchPattern); //$NON-NLS-1$
+
+ // first, build the CDOResource.allInstances() select clause for the scope
+ StringBuilder scopeClause = getScopeClause(scope);
+
+ // based on the CDOResource scope clause, find the candidate NamedElements
+ if (scopeClause.length() == 0) {
+ // easy case. Do an allInstances() query
+ result.append("NamedElement.allInstances()"); //$NON-NLS-1$
+ } else {
+ // iterate the contents of resources matching the scope criteria
+ result.append("eresource::CDOResource.allInstances()->select(r | ");
+
+ result.append(scopeClause);
+
+ // close the CDOResource.allInstances()->select(...) scope clause
+ result.append(")"); //$NON-NLS-1$
+
+ // and collect all of the NamedElements within those resources
+ result.append("->collect(r | r.cdoAllProperContents(NamedElement))"); //$NON-NLS-1$
+ }
+
+ // from our candidate elements, select those that match the attribute criteria
+ result.append("->select(e | "); //$NON-NLS-1$
+
+ boolean firstEClass = true;
+ for (EClass next : attributes.keySet()) {
+ if (firstEClass) {
+ firstEClass = false;
+ } else {
+ result.append(" or ");
+ }
+
+ result.append("e.oclIsKindOf(").append(next.getName()).append(") and ("); //$NON-NLS-1$ //$NON-NLS-2$
+ result.append("let s : ").append(next.getName()).append(" = e.oclAsType(").append(next.getName()).append(") in "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ boolean firstAttr = true;
+ for (EAttribute attr : attributes.get(next)) {
+ if (firstAttr) {
+ firstAttr = false;
+ } else {
+ result.append(" or ");
+ }
+
+ if (isString(attr)) {
+ if (attr.isMany()) {
+ result.append("s.").append(attr.getName()).append("->excluding(null)->exists(v | v"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ result.append("(not s.").append(attr.getName()).append(".oclIsUndefined() and s.").append(attr.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (isRegexMatch) {
+ result.append(".matches(searchPattern)"); //$NON-NLS-1$
+ } else {
+ result.append(".indexOf(searchPattern) > 0"); //$NON-NLS-1$
+ }
+
+ // close the exists iterator (many case) or 'and' group (scalar case)
+ result.append(")"); //$NON-NLS-1$
+ } else {
+ // need toString() conversions. For simplicity, because we're doing extra conversions anyways, coerce scalars to sets.
+ // N.B.: toString() can produce nulls that need to be filtered out!
+ result.append("s.").append(attr.getName()).append("->excluding(null).toString()->excluding(null)->exists(v | v"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (isRegexMatch) {
+ result.append(".matches(searchPattern)"); //$NON-NLS-1$
+ } else {
+ result.append(".indexOf(searchPattern) > 0"); //$NON-NLS-1$
+ }
+
+ // close the exists iterator
+ result.append(")"); //$NON-NLS-1$
+ }
+ }
+
+ // close the let expression
+ result.append(")"); //$NON-NLS-1$
+ }
+
+ // close select clause
+ result.append(")"); //$NON-NLS-1$
+
+ return result.toString();
+ }
+
+ static String oclQuoteString(String s) {
+ return s.replace("'", "\\'") //$NON-NLS-1$ //$NON-NLS-2$
+ .replace("\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ static boolean isString(ETypedElement element) {
+ EClassifier type = element.getEType();
+ return (type != null) && (type.getInstanceClass() == String.class);
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/PatternUtil.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/PatternUtil.java
new file mode 100755
index 00000000..df1181ac
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/query/PatternUtil.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.internal.ui.query;
+
+import static java.util.regex.Pattern.quote;
+
+import java.util.regex.Matcher;
+
+
+/**
+ * Utilities for working with regex patterns in CDO OCL queries.
+ */
+public class PatternUtil {
+
+ private static final String WILDCARD = ".*"; //$NON-NLS-1$
+
+ // not instantiable by clients
+ private PatternUtil() {
+ super();
+ }
+
+ /**
+ * OCL queries always use reqular expressions to implement either regex search (obviously) or case-insensitive search because there
+ * is no better way using OCL's String operations.
+ *
+ * @param searchText
+ * the user's search text
+ * @param caseSensitive
+ * whether the search is case-sensitive
+ * @param regularExpression
+ * whether the search text is to be interpreted as a regular expression
+ * @param allStringAttributes
+ * whether the search text is sought in all string attributes of an object
+ *
+ * @return the appropriately modified string specifying the regular expression search term, or {@code null} if the search text
+ * is actually a literal exact sub-string match
+ */
+ public static String wrap(String searchText, boolean caseSensitive, boolean regularExpression, boolean allStringAttributes) {
+ String result;
+
+ if (caseSensitive) {
+ if (!regularExpression) {
+ if (allStringAttributes) {
+ // the cdoMatches() operation needs a regex
+ result = String.format("%s%s%s", WILDCARD, quote(searchText), WILDCARD);
+ } else {
+ // we use "indexOf(searchPattern) > 0" to do a simple sub-string search
+ result = null;
+ }
+ } else {
+ result = ensureRegexSubstring(searchText);
+ }
+ } else {
+ if (!regularExpression) {
+ // make a case-insensitive regex matching the literal text
+ result = String.format("(?i)%s%s%s", WILDCARD, quote(searchText), WILDCARD);
+ } else {
+ result = String.format("(?i)%s", ensureRegexSubstring(searchText));
+ }
+ }
+
+ return result;
+ }
+
+ // ensure that the regex matches any substring by starting and finishing with wildcards
+ private static String ensureRegexSubstring(String regex) {
+ String result = regex;
+ if (!result.startsWith(WILDCARD)) {
+ result = WILDCARD + result;
+ }
+ if (!result.endsWith(WILDCARD)) {
+ result = result + WILDCARD;
+ }
+ return result;
+ }
+
+ /**
+ * Local post-processing of element matches uses {@link Matcher#find()} to gather up all applicable attribute matches. This method converts
+ * the user's search criteria into an appropriate regular expression.
+ *
+ * @param searchText
+ * the user's search text
+ * @param caseSensitive
+ * whether the search is case-sensitive
+ * @param regularExpression
+ * whether the search tex is to be interpreted as a regular expression
+ *
+ * @return the appropriately modified string specifying the regular expression search term, never {@code null}
+ */
+ public static String wrapForFind(String searchText, boolean caseSensitive, boolean regularExpression) {
+ String result;
+
+ if (caseSensitive) {
+ if (!regularExpression) {
+ result = quote(searchText); // simple sub-string search
+ } else {
+ result = searchText; // already a regex
+ }
+ } else {
+ if (!regularExpression) {
+ // make a case-insensitive regex matching the literal text
+ result = String.format("(?i)%s", quote(searchText));
+ } else {
+ result = String.format("(?i)%s", searchText);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/scope/CDOScopeProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/scope/CDOScopeProvider.java
new file mode 100755
index 00000000..ea2fcb2d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.search.ui/src/org/eclipse/papyrus/cdo/uml/search/internal/ui/scope/CDOScopeProvider.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.internal.ui.scope;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.views.search.scope.IScopeProvider;
+import org.eclipse.uml2.uml.resource.UMLResource;
+
+import com.google.common.collect.Lists;
+
+
+/**
+ * A scope provider for CDO model repositories.
+ */
+public class CDOScopeProvider implements IScopeProvider {
+
+ public CDOScopeProvider() {
+ super();
+ }
+
+ /**
+ * Gets the URIs of the root resource (implying the repository in its entirety) of all repositories that are currently connected.
+ */
+ @Override
+ public Collection<URI> getScope() {
+ Collection<URI> result;
+
+ CDOCheckout[] repos = CDOExplorerUtil.getCheckoutManager().getCheckouts();
+ if (repos.length == 0) {
+ result = Collections.emptyList();
+ } else {
+ result = Lists.newArrayListWithCapacity(repos.length);
+ for (CDOCheckout next : repos) {
+ if (next.isOpen()) {
+ CDOView view = next.getView();
+ if (view != null) {
+ result.add(view.getRootResource().getURI());
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Collection<URI> getScope(Object selected) {
+ Collection<URI> result;
+
+ // try to get the contextual resource node
+ CDOResourceNode node = CDOUtils.adapt(selected, CDOResourceNode.class);
+ if (node == null) {
+ EObject obj = CDOUtils.adapt(selected, EObject.class);
+ if (obj != null) {
+ node = CDOUtils.adapt(obj.eResource(), CDOResource.class);
+ }
+ }
+
+ if (node == null) {
+ result = Collections.emptyList();
+ } else {
+ URI uri = node.getURI();
+ if (!node.isRoot() && (node instanceof CDOResource)) {
+ // ensure that we search the UML resource, not the notation or di
+ uri = uri.trimFileExtension().appendFileExtension(UMLResource.FILE_EXTENSION);
+
+ if (!uri.equals(node.getURI())) {
+ // does the UML resource exist? If not, don't try to search it
+ String path = CDOURIUtil.extractResourcePath(uri);
+ if (!node.cdoView().hasResource(path)) {
+ uri = null;
+ }
+ }
+ } else if ((node instanceof CDOResourceFolder) && !uri.hasTrailingPathSeparator()) {
+ uri = uri.appendSegment(""); //$NON-NLS-1$
+ }
+
+ result = (uri == null) ? Collections.<URI> emptyList() : Collections.singletonList(uri);
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.project b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.project
new file mode 100755
index 00000000..73c4ef9f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.uml.ui</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/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..94d61f00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..306d7ebe
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.cdo.uml.internal.ui;x-friends:="org.eclipse.papyrus.cdo.uml.ui.tests",
+ org.eclipse.papyrus.cdo.uml.internal.ui.importsources;x-friends:="org.eclipse.papyrus.cdo.uml.ui.tests",
+ org.eclipse.papyrus.cdo.uml.internal.ui.l10n;x-internal:=true
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.cdo.uml.internal.ui.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.uml.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/build.properties
new file mode 100755
index 00000000..1400d94c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/plugin.properties
new file mode 100755
index 00000000..d9d160cf
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+pluginName = Papyrus CDO UML UI (Incubation)
+providerName = Eclipse Modeling Project
+
+importSource.name = Model Repositories
+pluginDescription=Provides primarily the extension of the Import Package dialog for importing packages from models in CDO repositories. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/plugin.xml
new file mode 100755
index 00000000..cc39fe22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/plugin.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.uml.tools.importSources">
+ <importSource
+ class="org.eclipse.papyrus.cdo.uml.internal.ui.importsources.CDOPackageImportSource"
+ name="%importSource.name">
+ <enablement>
+ <iterate>
+ <or>
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <test
+ property="org.eclipse.papyrus.cdo.core.isCDOObject">
+ </test>
+ <instanceof
+ value="org.eclipse.uml2.uml.Package">
+ </instanceof>
+ </adapt>
+ </or>
+ </iterate>
+ </enablement>
+ </importSource>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/pom.xml
new file mode 100755
index 00000000..b4fe7e0f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.uml.ui</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/Activator.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/Activator.java
new file mode 100755
index 00000000..0e666390
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/Activator.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.cdo.uml.internal.ui;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.uml.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ super();
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the log helper
+ log.setPlugin(plugin);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ log = null;
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/importsources/CDOPackageImportSource.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/importsources/CDOPackageImportSource.java
new file mode 100755
index 00000000..9402a651
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/importsources/CDOPackageImportSource.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.internal.ui.importsources;
+
+import static org.eclipse.papyrus.cdo.internal.ui.Activator.ICON_PAPYRUS_MODEL;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckoutManager;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.SharedImages;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIModel;
+import org.eclipse.papyrus.cdo.internal.ui.views.CheckoutItemProvider;
+import org.eclipse.papyrus.cdo.uml.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.uml.internal.ui.l10n.Messages;
+import org.eclipse.papyrus.infra.widgets.providers.DelegatingLabelProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.StaticContentProvider;
+import org.eclipse.papyrus.uml.tools.importsources.AbstractPackageImportSource;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.collect.Ordering;
+
+/**
+ * This is the CDOPackageImportSource type. Enjoy.
+ */
+public class CDOPackageImportSource extends AbstractPackageImportSource {
+
+ private List<CDOCheckout> availableRepos;
+
+ private CheckoutItemProvider itemProvider;
+
+ public CDOPackageImportSource() {
+ super();
+ }
+
+ @Override
+ public boolean canImportInto(Collection<?> selection) {
+ boolean result = super.canImportInto(selection);
+
+ if (result) {
+ Package package_ = getPackage(selection);
+ result = CDOUtils.isCDOObject(package_);
+ }
+
+ return result;
+ }
+
+ @Override
+ public void initialize(Collection<?> selection) {
+ availableRepos = new java.util.ArrayList<CDOCheckout>();
+ for (CDOCheckout next : CDOExplorerUtil.getCheckoutManager().getCheckouts()) {
+ if (next.isOpen()) {
+ availableRepos.add(next);
+ }
+ }
+
+ itemProvider = new CheckoutItemProvider(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage());
+ }
+
+ @Override
+ public void dispose() {
+ availableRepos = null;
+ itemProvider = null;
+
+ super.dispose();
+ }
+
+ @Override
+ protected IStaticContentProvider createModelHierarchyContentProvider(Map<String, String> extensionFilters) {
+ return new CDOContent();
+ }
+
+ @Override
+ protected ILabelProvider createModelHierarchyLabelProvider() {
+ return new DelegatingLabelProvider(itemProvider) {
+
+ @Override
+ protected Image customGetImage(Object element) {
+ Image result = null;
+
+ if (element == CDOPackageImportSource.this) {
+ result = SharedImages.getImage(ICON_PAPYRUS_MODEL);
+ }
+
+ return result;
+ }
+
+ @Override
+ protected String customGetText(Object element) {
+ String result = null;
+
+ if (element == CDOPackageImportSource.this) {
+ result = Messages.CDOPackageImportSource_0;
+ }
+
+ return result;
+ }
+ };
+ }
+
+ protected CDOResource getCDOResource(Object model) {
+ CDOResource result = null;
+
+ if (model instanceof CDOResource) {
+ result = (CDOResource) model;
+ } else if (model instanceof IAdaptable) {
+ result = (CDOResource) ((IAdaptable) model).getAdapter(CDOResource.class);
+ }
+
+ return result;
+ }
+
+ @Override
+ protected void validateSelection(Object model) throws CoreException {
+
+ CDOResource cdo = getCDOResource(model);
+ if (cdo == null) {
+ throw new CoreException(new Status(IStatus.WARNING, Activator.PLUGIN_ID, NLS.bind(Messages.CDOPackageImportSource_1, getText(model))));
+ }
+
+ super.validateSelection(model);
+ }
+
+ @Override
+ public List<Package> getPackages(ResourceSet resourceSet, Object model) throws CoreException {
+
+ List<Package> result;
+
+ if (model instanceof DIModel) {
+ result = new java.util.ArrayList<Package>(3);
+
+ for (Object next : ((DIModel) model).getChildren()) {
+ if (next instanceof Resource) {
+ result.addAll(EcoreUtil.<Package> getObjectsByType(((Resource) next).getContents(), UMLPackage.Literals.PACKAGE));
+ }
+ }
+ } else {
+ result = super.getPackages(resourceSet, getCDOResource(model));
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ private class CDOContent extends StaticContentProvider implements ITreeContentProvider {
+
+ private final Ordering<Object> sorter = new Ordering<Object>() {
+
+ @Override
+ public int compare(Object left, Object right) {
+ String leftLabel = getText(left);
+ String rightLabel = getText(right);
+
+ return Ordering.natural().compare(leftLabel, rightLabel);
+ }
+ };
+
+ CDOContent() {
+ super(availableRepos.toArray());
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ CDOCheckoutManager repoMan = CDOExplorerUtil.getCheckoutManager();
+ if (newInput == null) {
+ itemProvider.inputChanged(viewer, repoMan, null);
+ super.inputChanged(viewer, repoMan, null);
+ } else {
+ // substitute the repository manager as the input element
+ itemProvider.inputChanged(viewer, null, repoMan);
+
+ // prime the internal nodes for the repositories
+ itemProvider.getElements(repoMan);
+
+ super.inputChanged(viewer, null, repoMan);
+ }
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return itemProvider.getParent(element);
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return itemProvider.hasChildren(element);
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ Object[] result = itemProvider.getChildren(parentElement);
+
+ Arrays.sort(result, sorter);
+
+ return result;
+ }
+
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/l10n/Messages.java b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/l10n/Messages.java
new file mode 100755
index 00000000..8a95df89
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/l10n/Messages.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.internal.ui.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This is the Messages type. Enjoy.
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.cdo.uml.internal.ui.l10n.messages"; //$NON-NLS-1$
+
+ public static String CDOPackageImportSource_0;
+
+ public static String CDOPackageImportSource_1;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/l10n/messages.properties b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/l10n/messages.properties
new file mode 100755
index 00000000..1da7b8ab
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.uml.ui/src/org/eclipse/papyrus/cdo/uml/internal/ui/l10n/messages.properties
@@ -0,0 +1,15 @@
+#############################################################################
+# Copyright (c) 2013, 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+#############################################################################
+CDOPackageImportSource_0=Model Repositories
+CDOPackageImportSource_1=Not a repository model resource: "{0}".
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.project b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.project
new file mode 100755
index 00000000..906f6c2e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.validation.problems.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..94d61f00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..70fb566d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.8.0,
+ 4.0.0)",
+ org.eclipse.papyrus.cdo.validation.problems;bundle-version="1.2.0",
+ org.eclipse.emf.edit;bundle-version="[2.8.0,
+ 3.0.0)";visibility:=reexport
+Export-Package: org.eclipse.papyrus.cdo.validation.problems.edit,
+ org.eclipse.papyrus.cdo.validation.problems.provider
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.cdo.validation.problems.provider.ProblemsEditPlugin$Implementation
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.validation.problems.edit;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/build.properties
new file mode 100755
index 00000000..390dcac4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/build.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Christian W. Damus (CEA) - Initial API and implementation
+###############################################################################
+
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+src.includes = about.html
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblem_attributes_Attribute.gif b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblem_attributes_Attribute.gif
new file mode 100755
index 00000000..3f235b3d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblem_attributes_Attribute.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblemsContainer_problems_EProblem.gif b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblemsContainer_problems_EProblem.gif
new file mode 100755
index 00000000..23b48484
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblemsContainer_problems_EProblem.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblemsContainer_subcontainers_EProblemsContainer.gif b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblemsContainer_subcontainers_EProblemsContainer.gif
new file mode 100755
index 00000000..c31e7a2b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/ctool16/CreateEProblemsContainer_subcontainers_EProblemsContainer.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/Attribute.gif b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/Attribute.gif
new file mode 100755
index 00000000..7b7c428c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/Attribute.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/EProblem.gif b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/EProblem.gif
new file mode 100755
index 00000000..b1f8afa4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/EProblem.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/EProblemsContainer.gif b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/EProblemsContainer.gif
new file mode 100755
index 00000000..35ef84e2
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/icons/full/obj16/EProblemsContainer.gif
Binary files differ
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/plugin.properties
new file mode 100755
index 00000000..8dfae250
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/plugin.properties
@@ -0,0 +1,60 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+pluginName = Papyrus CDO Model Repository Problems Model Edit Support (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_problem_type = Papyrus Problem
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_EProblem_type = EProblem
+_UI_EProblemsContainer_type = EProblems Container
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_EProblem_severity_feature = Severity
+_UI_EProblem_message_feature = Message
+_UI_EProblem_source_feature = Source
+_UI_EProblem_code_feature = Code
+_UI_EProblem_element_feature = Element
+_UI_EProblem_related_feature = Related
+_UI_EProblem_container_feature = Container
+_UI_EProblemsContainer_problems_feature = Problems
+_UI_EProblemsContainer_subjects_feature = Subjects
+_UI_EProblemsContainer_subcontainers_feature = Subcontainers
+_UI_EProblemsContainer_container_feature = Container
+_UI_Unknown_feature = Unspecified
+
+_UI_ESeverity_OK_literal = OK
+_UI_ESeverity_INFO_literal = INFO
+_UI_ESeverity_WARNING_literal = WARNING
+_UI_ESeverity_ERROR_literal = ERROR
+_UI_ESeverity_CANCEL_literal = CANCEL
+_UI_Attribute_type = Attribute
+_UI_EProblem_type_feature = Type
+_UI_EProblem_attributes_feature = Attributes
+_UI_Attribute_key_feature = Name
+_UI_Attribute_value_feature = Value
+
+pluginDescription=EMF.Edit providers for the CDO model validation problems model. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/plugin.xml
new file mode 100755
index 00000000..a0325b39
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/plugin.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2013, 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated Problems -->
+ <factory
+ uri="http://www.eclipse.org/papyrus/cdo/problems/1.0.0"
+ class="org.eclipse.papyrus.cdo.validation.problems.provider.ProblemsItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"/>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/pom.xml
new file mode 100755
index 00000000..80b18011
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.validation.problems.edit</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/IProblemTypeProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/IProblemTypeProvider.java
new file mode 100755
index 00000000..9cbed45f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/IProblemTypeProvider.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.edit;
+
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+
+/**
+ * Optional protocol for edit providers to provide a "problem type" for an {@link EProblem}. This is intended for models that extend the CDO Problems
+ * model to provide custom problems.
+ */
+public interface IProblemTypeProvider {
+
+ public String getProblemType(Object object);
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/ProblemEditUtil.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/ProblemEditUtil.java
new file mode 100755
index 00000000..72f073d8
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/ProblemEditUtil.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.edit;
+
+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.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+
+/**
+ * Utilities for accessing edit-provider information about {@link EProblem}s.
+ */
+public class ProblemEditUtil {
+
+ private AdapterFactory adapterFactory;
+
+ private DefaultProblemTypeProviderAdapter defaultAdapter;
+
+ public ProblemEditUtil(AdapterFactory adapterFactory) {
+ this.adapterFactory = adapterFactory;
+ }
+
+ public String getProblemType(EProblem problem) {
+ IProblemTypeProvider provider = getProblemTypeProvider(problem);
+ return provider.getProblemType(problem);
+ }
+
+ protected IProblemTypeProvider getProblemTypeProvider(EProblem problem) {
+ Adapter provider = adapterFactory.adapt(problem,
+ IProblemTypeProvider.class);
+ IProblemTypeProvider result = provider instanceof IProblemTypeProvider
+ ? (IProblemTypeProvider) provider
+ : null;
+
+ if (result == null) {
+ for (Adapter next : problem.eAdapters()) {
+ if (next instanceof IProblemTypeProvider) {
+ result = (IProblemTypeProvider) next;
+ break;
+ }
+ }
+ }
+
+ if (result == null) {
+ DefaultProblemTypeProviderAdapter adapter = getDefaultProblemTypeProvider();
+ problem.eAdapters().add(adapter);
+ result = adapter;
+ }
+
+ return result;
+ }
+
+ protected DefaultProblemTypeProviderAdapter getDefaultProblemTypeProvider() {
+ if (defaultAdapter == null) {
+ defaultAdapter = new DefaultProblemTypeProviderAdapter();
+ }
+ return defaultAdapter;
+ }
+
+ protected class DefaultProblemTypeProviderAdapter
+ implements Adapter, IProblemTypeProvider {
+
+ @Override
+ public String getProblemType(Object object) {
+ String result = null;
+
+ if (object instanceof EProblem) {
+ EProblem problem = (EProblem) object;
+ EObject element = problem.getElement();
+ if (element != null) {
+ EPackage model = element.eClass().getEPackage();
+ IItemLabelProvider labels = (IItemLabelProvider) adapterFactory
+ .adapt(model, IItemLabelProvider.class);
+ if (labels != null) {
+ result = labels.getText(model);
+ } else {
+ result = model.getName();
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return false;
+ }
+
+ @Override
+ public Notifier getTarget() {
+ // I am stateless, so I am re-used on multiple targets
+ return null;
+ }
+
+ @Override
+ public void setTarget(Notifier newTarget) {
+ // pass
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ // pass
+ }
+
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/ProblemTypeItemProviderAdapter.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/ProblemTypeItemProviderAdapter.java
new file mode 100755
index 00000000..89a3e58c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/edit/ProblemTypeItemProviderAdapter.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.edit;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * Convenient base class for generated item provider adapters to implement the {@link IProblemTypeProvider} protocol.
+ */
+public class ProblemTypeItemProviderAdapter
+ extends ItemProviderAdapter
+ implements IProblemTypeProvider {
+
+ public ProblemTypeItemProviderAdapter(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ @Override
+ public String getProblemType(Object object) {
+ return getString("_UI_problem_type", true); //$NON-NLS-1$
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/AttributeItemProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/AttributeItemProvider.java
new file mode 100755
index 00000000..29f34540
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/AttributeItemProvider.java
@@ -0,0 +1,189 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+import org.eclipse.papyrus.cdo.validation.problems.edit.ProblemTypeItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a {@link java.util.Map.Entry} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class AttributeItemProvider extends ProblemTypeItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider,
+ ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AttributeItemProvider(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);
+
+ addKeyPropertyDescriptor(object);
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Key feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addKeyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Attribute_key_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Attribute_key_feature", "_UI_Attribute_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.ATTRIBUTE__KEY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 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_Attribute_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Attribute_value_feature", "_UI_Attribute_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.ATTRIBUTE__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns Attribute.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Attribute")); //$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) {
+ Map.Entry<?, ?> attribute = (Map.Entry<?, ?>) object;
+ return "" + attribute.getKey() + " -> " + attribute.getValue(); //$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(Map.Entry.class)) {
+ case ProblemsPackage.ATTRIBUTE__KEY:
+ case ProblemsPackage.ATTRIBUTE__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);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/EProblemItemProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/EProblemItemProvider.java
new file mode 100755
index 00000000..d8ef0028
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/EProblemItemProvider.java
@@ -0,0 +1,290 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+import org.eclipse.papyrus.cdo.validation.problems.edit.ProblemTypeItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.cdo.validation.problems.EProblem} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class EProblemItemProvider extends ProblemTypeItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider,
+ ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EProblemItemProvider(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);
+
+ addSeverityPropertyDescriptor(object);
+ addMessagePropertyDescriptor(object);
+ addSourcePropertyDescriptor(object);
+ addCodePropertyDescriptor(object);
+ addElementPropertyDescriptor(object);
+ addRelatedPropertyDescriptor(object);
+ addTypePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Severity feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSeverityPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EProblem_severity_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EProblem_severity_feature", "_UI_EProblem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.EPROBLEM__SEVERITY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Message feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addMessagePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EProblem_message_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EProblem_message_feature", "_UI_EProblem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.EPROBLEM__MESSAGE, 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_EProblem_source_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EProblem_source_feature", "_UI_EProblem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.EPROBLEM__SOURCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Code feature.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addCodePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EProblem_code_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EProblem_code_feature", "_UI_EProblem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.EPROBLEM__CODE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EProblem_element_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EProblem_element_feature", "_UI_EProblem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.EPROBLEM__ELEMENT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Related feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addRelatedPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EProblem_related_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EProblem_related_feature", "_UI_EProblem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.EPROBLEM__RELATED, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTypePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EProblem_type_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EProblem_type_feature", "_UI_EProblem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.EPROBLEM__TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ProblemsPackage.Literals.EPROBLEM__ATTRIBUTES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns EProblem.gif.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/EProblem")); //$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) {
+ ESeverity labelValue = ((EProblem) object).getSeverity();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_EProblem_type") : //$NON-NLS-1$
+ getString("_UI_EProblem_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(EProblem.class)) {
+ case ProblemsPackage.EPROBLEM__SEVERITY:
+ case ProblemsPackage.EPROBLEM__MESSAGE:
+ case ProblemsPackage.EPROBLEM__SOURCE:
+ case ProblemsPackage.EPROBLEM__CODE:
+ case ProblemsPackage.EPROBLEM__TYPE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ProblemsPackage.EPROBLEM__ATTRIBUTES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(ProblemsPackage.Literals.EPROBLEM__ATTRIBUTES, ProblemsFactory.eINSTANCE.create(ProblemsPackage.Literals.ATTRIBUTE)));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/EProblemsContainerItemProvider.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/EProblemsContainerItemProvider.java
new file mode 100755
index 00000000..120b2c34
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/EProblemsContainerItemProvider.java
@@ -0,0 +1,201 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+import org.eclipse.papyrus.cdo.validation.problems.edit.ProblemTypeItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer} object.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class EProblemsContainerItemProvider extends ProblemTypeItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider,
+ ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EProblemsContainerItemProvider(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);
+
+ addSubjectsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Subjects feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSubjectsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EProblemsContainer_subjects_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EProblemsContainer_subjects_feature", "_UI_EProblemsContainer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProblemsPackage.Literals.EPROBLEMS_CONTAINER__SUBJECTS, 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(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__PROBLEMS);
+ childrenFeatures.add(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__SUBCONTAINERS);
+ }
+ 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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns EProblemsContainer.gif.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/EProblemsContainer")); //$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_EProblemsContainer_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(EProblemsContainer.class)) {
+ case ProblemsPackage.EPROBLEMS_CONTAINER__PROBLEMS:
+ case ProblemsPackage.EPROBLEMS_CONTAINER__SUBCONTAINERS:
+ 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(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__PROBLEMS, ProblemsFactory.eINSTANCE.createEProblem()));
+
+ newChildDescriptors.add(createChildParameter(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__SUBCONTAINERS, ProblemsFactory.eINSTANCE.createEProblemsContainer()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/ProblemsEditPlugin.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/ProblemsEditPlugin.java
new file mode 100755
index 00000000..87310244
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/ProblemsEditPlugin.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Problems edit plugin. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class ProblemsEditPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public static final ProblemsEditPlugin INSTANCE = new ProblemsEditPlugin();
+
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ProblemsEditPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/ProblemsItemProviderAdapterFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/ProblemsItemProviderAdapterFactory.java
new file mode 100755
index 00000000..254ccf5a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems.edit/src/org/eclipse/papyrus/cdo/validation/problems/provider/ProblemsItemProviderAdapterFactory.java
@@ -0,0 +1,332 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+import org.eclipse.papyrus.cdo.validation.problems.edit.IProblemTypeProvider;
+import org.eclipse.papyrus.cdo.validation.problems.util.ProblemsAdapterFactory;
+
+/**
+ * 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 ProblemsItemProviderAdapterFactory extends ProblemsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, IChildCreationExtender {
+
+ /**
+ * 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 helps manage the child creation extenders.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(ProblemsEditPlugin.INSTANCE, ProblemsPackage.eNS_URI);
+
+ /**
+ * 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>();
+
+ {
+ supportedTypes.add(IProblemTypeProvider.class);
+ }
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public ProblemsItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.cdo.validation.problems.EProblem} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EProblemItemProvider eProblemItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.cdo.validation.problems.EProblem}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createEProblemAdapter() {
+ if (eProblemItemProvider == null) {
+ eProblemItemProvider = new EProblemItemProvider(this);
+ }
+
+ return eProblemItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EProblemsContainerItemProvider eProblemsContainerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer}.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createEProblemsContainerAdapter() {
+ if (eProblemsContainerItemProvider == null) {
+ eProblemsContainerItemProvider = new EProblemsContainerItemProvider(this);
+ }
+
+ return eProblemsContainerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link java.util.Map.Entry} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AttributeItemProvider attributeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link java.util.Map.Entry}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createAttributeAdapter() {
+ if (attributeItemProvider == null) {
+ attributeItemProvider = new AttributeItemProvider(this);
+ }
+
+ return attributeItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ return childCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return childCreationExtenderManager;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public void dispose() {
+ if (eProblemItemProvider != null) {
+ eProblemItemProvider.dispose();
+ }
+ if (eProblemsContainerItemProvider != null) {
+ eProblemsContainerItemProvider.dispose();
+ }
+ if (attributeItemProvider != null) {
+ attributeItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.classpath b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.project b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.project
new file mode 100755
index 00000000..a398ce5f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.validation.problems</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/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..94d61f00
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/META-INF/CDO.MF b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/META-INF/CDO.MF
new file mode 100755
index 00000000..bbfa1b05
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/META-INF/CDO.MF
@@ -0,0 +1 @@
+This is a marker file for bundles with CDO native models.
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..fce0fbe6
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.8.0,
+ 4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.8.0,
+ 3.0.0)";visibility:=reexport,
+ org.eclipse.emf.cdo;bundle-version="[4.2.0,
+ 5.0.0)";visibility:=reexport
+Export-Package: org.eclipse.papyrus.cdo.validation.problems,
+ org.eclipse.papyrus.cdo.validation.problems.impl,
+ org.eclipse.papyrus.cdo.validation.problems.internal;x-internal:=true,
+ org.eclipse.papyrus.cdo.validation.problems.util
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.cdo.validation.problems.internal.ProblemsPlugin$Implementation
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.validation.problems;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/about.html b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/build.properties b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/build.properties
new file mode 100755
index 00000000..38e9b0fd
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/build.properties
@@ -0,0 +1,27 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+jre.compilation.profile = JavaSE-1.6
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+src.includes = about.html
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.ecore b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.ecore
new file mode 100755
index 00000000..4f317633
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.ecore
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="problems" nsURI="http://www.eclipse.org/papyrus/cdo/problems/1.0.0"
+ nsPrefix="problems">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="A model of problems, intended primarily as a persistence vehicle for Ecore Diagnostics in contexts where Eclipse resource problem markers (IProblemMarker) are either not available or not appropriate."/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="EProblem">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Description of a problem in some element of an EMF-based model instance."/>
+ </eAnnotations>
+ <eOperations name="toDiagnostic" lowerBound="1" eType="#//EDiagnostic"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="severity" lowerBound="1"
+ eType="#//ESeverity"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="source" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="code" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="element" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The element that manifests the problem."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="related" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Other model elements contributing to or otherwise related to the problem. May be, but not necessarily derived from, the 'data' list of an Ecore Diagnostic."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="container" eType="#//EProblemsContainer"
+ eOpposite="#//EProblemsContainer/problems"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="org.eclipse.emf.ecore.diagnostic">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Optional identifier of a problem type. This should correspond to a marker type registered on the Eclipse {@code org.eclipse.core.resources.markers} extension point."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="attributes" upperBound="-1"
+ eType="#//Attribute" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="ESeverity">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Enumeration of problem severities, corresponding to the Ecore Diagnostic severity values."/>
+ </eAnnotations>
+ <eLiterals name="OK"/>
+ <eLiterals name="INFO" value="1"/>
+ <eLiterals name="WARNING" value="2"/>
+ <eLiterals name="ERROR" value="4"/>
+ <eLiterals name="CANCEL" value="8"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EProblemsContainer">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="An optional container for problems, to provide a single node that can be conveniently contained in some larger structure such as an XML resource (which can only have one root element) or other generic container."/>
+ </eAnnotations>
+ <eOperations name="allProblems" lowerBound="1">
+ <eGenericType eClassifier="#//EIterator">
+ <eTypeArguments eClassifier="#//EProblem"/>
+ </eGenericType>
+ </eOperations>
+ <eOperations name="allProblems" lowerBound="1">
+ <eGenericType eClassifier="#//EIterator">
+ <eTypeArguments eClassifier="#//EProblem"/>
+ </eGenericType>
+ <eParameters name="element" lowerBound="1" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </eOperations>
+ <eOperations name="allDiagnostics" upperBound="-1" eType="#//EDiagnostic"/>
+ <eOperations name="allDiagnostics" upperBound="-1" eType="#//EDiagnostic">
+ <eParameters name="element" lowerBound="1" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </eOperations>
+ <eOperations name="getWorstProblem" eType="#//EProblem">
+ <eParameters name="element" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="problems" upperBound="-1"
+ eType="#//EProblem" containment="true" eOpposite="#//EProblem/container"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="subjects" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Optional reference to elements that are the subjects of some collection of problems."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="subcontainers" upperBound="-1"
+ eType="#//EProblemsContainer" containment="true" eOpposite="#//EProblemsContainer/container">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Optional nested group of containers, possibly referencing different subjects than the parent container."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="container" eType="#//EProblemsContainer"
+ eOpposite="#//EProblemsContainer/subcontainers"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="EDiagnostic" instanceClassName="org.eclipse.emf.common.util.Diagnostic"
+ serializable="false"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="EIterator" instanceClassName="java.util.Iterator"
+ serializable="false">
+ <eTypeParameters name="E"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Attribute" instanceClassName="java.util.Map$Entry">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.ecorediag b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.ecorediag
new file mode 100755
index 00000000..6a2833dc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.ecorediag
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_mf7AkFv5EeKZR5SK39Veeg" type="EcoreTools" name="Problems" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_W4FTkFv6EeKZR5SK39Veeg" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_W4GhsFv6EeKZR5SK39Veeg" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_W4GhsVv6EeKZR5SK39Veeg" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_JvtSoFv7EeKZR5SK39Veeg" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Problems.ecore#//EProblem/severity"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_JvtSoVv7EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N4gUAFv7EeKZR5SK39Veeg" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Problems.ecore#//EProblem/message"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N4gUAVv7EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_QFH8kFv7EeKZR5SK39Veeg" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Problems.ecore#//EProblem/source"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QFH8kVv7EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_UTeMUFv7EeKZR5SK39Veeg" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Problems.ecore#//EProblem/code"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_UTeMUVv7EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_19U_wJb_EeK5iqkPZ59qGQ" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Problems.ecore#//EProblem/type"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_19U_wZb_EeK5iqkPZ59qGQ"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_W4Ghslv6EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_W4Ghs1v6EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_W4GhtFv6EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_W4HIwFv6EeKZR5SK39Veeg" type="5002">
+ <children xmi:type="notation:Node" xmi:id="_UnydMFwAEeKZR5SK39Veeg" type="2002">
+ <element xmi:type="ecore:EOperation" href="Problems.ecore#//EProblem/toDiagnostic"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_UnydMVwAEeKZR5SK39Veeg"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_W4HIwVv6EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_W4HIwlv6EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_W4HIw1v6EeKZR5SK39Veeg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_W4FTkVv6EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Problems.ecore#//EProblem"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_W4FTklv6EeKZR5SK39Veeg" x="81" y="216"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_kkCGMFv6EeKZR5SK39Veeg" type="1005">
+ <children xmi:type="notation:Node" xmi:id="_kkCtQFv6EeKZR5SK39Veeg" type="4010"/>
+ <children xmi:type="notation:Node" xmi:id="_kkCtQVv6EeKZR5SK39Veeg" type="5008">
+ <children xmi:type="notation:Node" xmi:id="_nVHGsFv6EeKZR5SK39Veeg" type="2006">
+ <element xmi:type="ecore:EEnumLiteral" href="Problems.ecore#//ESeverity/OK"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_nVHGsVv6EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_oosOcFv6EeKZR5SK39Veeg" type="2006">
+ <element xmi:type="ecore:EEnumLiteral" href="Problems.ecore#//ESeverity/INFO"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oosOcVv6EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_pbb6AFv6EeKZR5SK39Veeg" type="2006">
+ <element xmi:type="ecore:EEnumLiteral" href="Problems.ecore#//ESeverity/WARNING"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_pbb6AVv6EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_q-kgsFv6EeKZR5SK39Veeg" type="2006">
+ <element xmi:type="ecore:EEnumLiteral" href="Problems.ecore#//ESeverity/ERROR"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_q-kgsVv6EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CHVzAFy_EeK238GGCf95eA" type="2006">
+ <element xmi:type="ecore:EEnumLiteral" href="Problems.ecore#//ESeverity/CANCEL"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CHVzAVy_EeK238GGCf95eA"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_kkCtQlv6EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_kkCtQ1v6EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_kkCtRFv6EeKZR5SK39Veeg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_kkCGMVv6EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EEnum" href="Problems.ecore#//ESeverity"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kkCGMlv6EeKZR5SK39Veeg" x="450" y="18"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_hql-cFv7EeKZR5SK39Veeg" type="1001">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hrKmMFv7EeKZR5SK39Veeg" source="Shortcut">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hrKmMVv7EeKZR5SK39Veeg" key="modelID" value="EcoreTools"/>
+ </eAnnotations>
+ <children xmi:type="notation:Node" xmi:id="_hqpBwFv7EeKZR5SK39Veeg" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_hqpBwVv7EeKZR5SK39Veeg" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_hqpBwlv7EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_hqpBw1v7EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_hqpBxFv7EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_hqpo0Fv7EeKZR5SK39Veeg" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_hqpo0Vv7EeKZR5SK39Veeg" collapsed="true"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_hqpo0lv7EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_hqpo01v7EeKZR5SK39Veeg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_hql-cVv7EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="12632256" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hql-clv7EeKZR5SK39Veeg" x="333" y="234"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Jug4cFv-EeKZR5SK39Veeg" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_JuhfgFv-EeKZR5SK39Veeg" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_JuhfgVv-EeKZR5SK39Veeg" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Juhfglv-EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Juhfg1v-EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JuhfhFv-EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JuhfhVv-EeKZR5SK39Veeg" type="5002">
+ <children xmi:type="notation:Node" xmi:id="_rLeiAFv_EeKZR5SK39Veeg" type="2002">
+ <element xmi:type="ecore:EOperation" href="Problems.ecore#//EProblemsContainer/allProblems"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_rLeiAVv_EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="__2agAFv_EeKZR5SK39Veeg" type="2002">
+ <element xmi:type="ecore:EOperation" href="Problems.ecore#//EProblemsContainer/allProblems.1"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="__2agAVv_EeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_puOEYFwAEeKZR5SK39Veeg" type="2002">
+ <element xmi:type="ecore:EOperation" href="Problems.ecore#//EProblemsContainer/allDiagnostics"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_puOEYVwAEeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_uec5MFwAEeKZR5SK39Veeg" type="2002">
+ <element xmi:type="ecore:EOperation" href="Problems.ecore#//EProblemsContainer/allDiagnostics.1"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uec5MVwAEeKZR5SK39Veeg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_6-QgcFwOEeKZR5SK39Veeg" type="2002">
+ <element xmi:type="ecore:EOperation" href="Problems.ecore#//EProblemsContainer/getWorstProblem"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_6-QgcVwOEeKZR5SK39Veeg"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Juhfhlv-EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Juhfh1v-EeKZR5SK39Veeg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JuhfiFv-EeKZR5SK39Veeg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Jug4cVv-EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Problems.ecore#//EProblemsContainer"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Jug4clv-EeKZR5SK39Veeg" x="36" y="18" width="219" height="120"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_fRx6sFwAEeKZR5SK39Veeg" type="1004">
+ <children xmi:type="notation:Node" xmi:id="_fRyhwFwAEeKZR5SK39Veeg" type="4008"/>
+ <children xmi:type="notation:Node" xmi:id="_fRzI0FwAEeKZR5SK39Veeg" type="4009"/>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_fRx6sVwAEeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EDataType" href="Problems.ecore#//EDiagnostic"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fRx6slwAEeKZR5SK39Veeg" x="306" y="396"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Qls5EFwGEeKZR5SK39Veeg" type="1004">
+ <children xmi:type="notation:Node" xmi:id="_QltgIFwGEeKZR5SK39Veeg" type="4008"/>
+ <children xmi:type="notation:Node" xmi:id="_QltgIVwGEeKZR5SK39Veeg" type="4009"/>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Qls5EVwGEeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EDataType" href="Problems.ecore#//EIterator"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qls5ElwGEeKZR5SK39Veeg" x="305" y="452"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lJ8lUJcDEeK5iqkPZ59qGQ" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_lJ8lU5cDEeK5iqkPZ59qGQ" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_lJ9MYJcDEeK5iqkPZ59qGQ" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_oBeMEJcDEeK5iqkPZ59qGQ" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Problems.ecore#//Attribute/key"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oBeMEZcDEeK5iqkPZ59qGQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_sn9PAJcDEeK5iqkPZ59qGQ" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Problems.ecore#//Attribute/value"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_sn9PAZcDEeK5iqkPZ59qGQ"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_lJ9MYZcDEeK5iqkPZ59qGQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_lJ9MYpcDEeK5iqkPZ59qGQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_lJ9MY5cDEeK5iqkPZ59qGQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lJ9zcJcDEeK5iqkPZ59qGQ" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_lJ9zcZcDEeK5iqkPZ59qGQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_lJ9zcpcDEeK5iqkPZ59qGQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_lJ9zc5cDEeK5iqkPZ59qGQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lJ8lUZcDEeK5iqkPZ59qGQ" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Problems.ecore#//Attribute"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lJ8lUpcDEeK5iqkPZ59qGQ" x="81" y="396"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_mf7AkVv5EeKZR5SK39Veeg"/>
+ <element xmi:type="ecore:EPackage" href="Problems.ecore#/"/>
+ <edges xmi:type="notation:Edge" xmi:id="_oGOlIFv7EeKZR5SK39Veeg" type="3002" source="_W4FTkFv6EeKZR5SK39Veeg" target="_hql-cFv7EeKZR5SK39Veeg">
+ <children xmi:type="notation:Node" xmi:id="_oGPzQFv7EeKZR5SK39Veeg" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oGPzQVv7EeKZR5SK39Veeg" x="-13" y="-12"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_oGPzQlv7EeKZR5SK39Veeg" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oGPzQ1v7EeKZR5SK39Veeg" x="5" y="15"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_oGOlIVv7EeKZR5SK39Veeg" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_oGOlIlv7EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Problems.ecore#//EProblem/element"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oGOlI1v7EeKZR5SK39Veeg" points="[75, -61, -139, -8]$[164, -61, -50, -8]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oGj8UFv7EeKZR5SK39Veeg" id="(0.5454545454545454,0.8247422680412371)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_2u5esFv7EeKZR5SK39Veeg" type="3002" source="_W4FTkFv6EeKZR5SK39Veeg" target="_hql-cFv7EeKZR5SK39Veeg">
+ <children xmi:type="notation:Node" xmi:id="_2u6FwFv7EeKZR5SK39Veeg" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2u6FwVv7EeKZR5SK39Veeg" x="19" y="-27"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_2u6Fwlv7EeKZR5SK39Veeg" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2u6Fw1v7EeKZR5SK39Veeg" x="19" y="19"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_2u5esVv7EeKZR5SK39Veeg" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_2u5eslv7EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Problems.ecore#//EProblem/related"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2u5es1v7EeKZR5SK39Veeg" points="[95, 21, -135, 87]$[95, 53, -135, 119]$[283, 53, 53, 119]$[283, -27, 53, 39]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2u768Fv7EeKZR5SK39Veeg" id="(0.14049586776859505,0.8247422680412371)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2u8iAFv7EeKZR5SK39Veeg" id="(0.00980392156862745,0.25925925925925924)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_ZDtg0Fv-EeKZR5SK39Veeg" type="3002" source="_Jug4cFv-EeKZR5SK39Veeg" target="_W4FTkFv6EeKZR5SK39Veeg">
+ <children xmi:type="notation:Node" xmi:id="_ZDuH4Fv-EeKZR5SK39Veeg" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZDuH4Vv-EeKZR5SK39Veeg" x="-3" y="-32"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ZDuH4lv-EeKZR5SK39Veeg" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZDuH41v-EeKZR5SK39Veeg" x="-3" y="18"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_ZDtg0Vv-EeKZR5SK39Veeg" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ZDtg0lv-EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Problems.ecore#//EProblemsContainer/problems"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ZDtg01v-EeKZR5SK39Veeg" points="[14, 24, -45, -119]$[14, 122, -45, -21]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ZDv9EFv-EeKZR5SK39Veeg" id="(0.226890756302521,0.7619047619047619)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ZDv9EVv-EeKZR5SK39Veeg" id="(0.3884297520661157,0.20618556701030927)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_faMhwFv-EeKZR5SK39Veeg" type="3002" source="_Jug4cFv-EeKZR5SK39Veeg" target="_hql-cFv7EeKZR5SK39Veeg">
+ <children xmi:type="notation:Node" xmi:id="_faNI0Fv-EeKZR5SK39Veeg" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_faNI0Vv-EeKZR5SK39Veeg" x="13" y="-29"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_faNI0lv-EeKZR5SK39Veeg" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_faNI01v-EeKZR5SK39Veeg" x="13" y="18"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_faMhwVv-EeKZR5SK39Veeg" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_faMhwlv-EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Problems.ecore#//EProblemsContainer/subjects"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_faMhw1v-EeKZR5SK39Veeg" points="[30, -71, -130, -224]$[170, -71, 10, -224]$[170, 127, 10, -26]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_faPlEFv-EeKZR5SK39Veeg" id="(0.865546218487395,0.7619047619047619)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_2NqSgFv-EeKZR5SK39Veeg" type="3002" source="_Jug4cFv-EeKZR5SK39Veeg" target="_Jug4cFv-EeKZR5SK39Veeg">
+ <children xmi:type="notation:Node" xmi:id="_2NqShFv-EeKZR5SK39Veeg" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2NqShVv-EeKZR5SK39Veeg" x="8" y="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_2NqShlv-EeKZR5SK39Veeg" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2NqSh1v-EeKZR5SK39Veeg" x="27" y="-15"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_2NqSgVv-EeKZR5SK39Veeg" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_2NqSglv-EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Problems.ecore#//EProblemsContainer/subcontainers"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2NqSg1v-EeKZR5SK39Veeg" points="[32, 59, 32, 59]$[32, 103, 32, 103]$[171, 103, 171, 103]$[171, 22, 171, 22]$[109, 22, 109, 22]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_FtseoFwPEeKZR5SK39Veeg" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_FtseoVwPEeKZR5SK39Veeg" id="(0.5,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_FoH1YFv_EeKZR5SK39Veeg" type="3002" source="_Jug4cFv-EeKZR5SK39Veeg" target="_Jug4cFv-EeKZR5SK39Veeg">
+ <children xmi:type="notation:Node" xmi:id="_FoH1ZFv_EeKZR5SK39Veeg" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_FoH1ZVv_EeKZR5SK39Veeg" x="-32" y="21"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_FoH1Zlv_EeKZR5SK39Veeg" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_FoH1Z1v_EeKZR5SK39Veeg" x="18" y="21"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_FoH1YVv_EeKZR5SK39Veeg" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_FoH1Ylv_EeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Problems.ecore#//EProblemsContainer/container"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_FoH1Y1v_EeKZR5SK39Veeg" points="[109, 22, 109, 22]$[171, 22, 171, 22]$[171, 103, 171, 103]$[32, 103, 32, 103]$[32, 59, 32, 59]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-RWKMFwAEeKZR5SK39Veeg" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-RWKMVwAEeKZR5SK39Veeg" id="(0.5,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_VtqqsFwBEeKZR5SK39Veeg" type="3002" source="_W4FTkFv6EeKZR5SK39Veeg" target="_Jug4cFv-EeKZR5SK39Veeg">
+ <children xmi:type="notation:Node" xmi:id="_VtqqtFwBEeKZR5SK39Veeg" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VtqqtVwBEeKZR5SK39Veeg" x="-8" y="-31"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_VtqqtlwBEeKZR5SK39Veeg" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Vtqqt1wBEeKZR5SK39Veeg" x="-8" y="18"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_VtqqsVwBEeKZR5SK39Veeg" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_VtqqslwBEeKZR5SK39Veeg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Problems.ecore#//EProblem/container"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Vtqqs1wBEeKZR5SK39Veeg" points="[-45, -21, 14, 122]$[-45, -119, 14, 24]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YF67glwBEeKZR5SK39Veeg" id="(0.3884297520661157,0.20618556701030927)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YF67g1wBEeKZR5SK39Veeg" id="(0.226890756302521,0.7619047619047619)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_vg_RoJcDEeK5iqkPZ59qGQ" type="3002" source="_W4FTkFv6EeKZR5SK39Veeg" target="_lJ8lUJcDEeK5iqkPZ59qGQ">
+ <children xmi:type="notation:Node" xmi:id="_vg_4sJcDEeK5iqkPZ59qGQ" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_vg_4sZcDEeK5iqkPZ59qGQ" x="-3" y="-36"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_vg_4spcDEeK5iqkPZ59qGQ" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_vg_4s5cDEeK5iqkPZ59qGQ" x="-3" y="14"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_vg_RoZcDEeK5iqkPZ59qGQ" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_vg_RopcDEeK5iqkPZ59qGQ" fontColor="4210752" fontName="Lucida Grande" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Problems.ecore#//EProblem/attributes"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vg_Ro5cDEeK5iqkPZ59qGQ" points="[0, 22, 17, -97]$[22, 88, 39, -31]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vhBG0JcDEeK5iqkPZ59qGQ" id="(0.3151515151515151,0.9833333333333333)"/>
+ </edges>
+</notation:Diagram>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.genmodel b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.genmodel
new file mode 100755
index 00000000..c4620af4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/model/Problems.genmodel
@@ -0,0 +1,64 @@
+<?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) 2013 CEA LIST.&#xA; &#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License 2.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-2.0/&#xA;&#xA;SPDX-License-Identifier: EPL-2.0&#xA;&#xA;Contributors:&#xA; CEA LIST - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.cdo.validation.problems/src" modelPluginID="org.eclipse.papyrus.cdo.validation.problems"
+ modelName="Problems" modelPluginClass="org.eclipse.papyrus.cdo.validation.problems.internal.ProblemsPlugin"
+ editPluginClass="org.eclipse.papyrus.cdo.validation.problems.provider.ProblemsEditPlugin"
+ editorPluginClass="org.eclipse.papyrus.cdo.validation.problems.presentation.ProblemsEditorPlugin"
+ nonNLSMarkers="true" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject" rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl"
+ reflectiveDelegation="true" codeFormatting="true" testSuiteClass="org.eclipse.papyrus.cdo.validation.problems.tests.ProblemsAllTests"
+ importerID="org.eclipse.emf.importer.cdo" featureDelegation="Reflective" complianceLevel="6.0"
+ copyrightFields="false" providerRootExtendsClass="org.eclipse.papyrus.cdo.validation.problems.edit.ProblemTypeItemProviderAdapter"
+ optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true"
+ runtimeVersion="2.8" operationReflection="true" importOrganizing="true">
+ <foreignModel>Problems.ecore</foreignModel>
+ <modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables>
+ <genPackages prefix="Problems" basePackage="org.eclipse.papyrus.cdo.validation"
+ disposableProviderFactory="true" generateExampleClass="false" extensibleProviderFactory="true"
+ childCreationExtenders="true" ecorePackage="Problems.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="Problems.ecore#//ESeverity">
+ <genEnumLiterals ecoreEnumLiteral="Problems.ecore#//ESeverity/OK"/>
+ <genEnumLiterals ecoreEnumLiteral="Problems.ecore#//ESeverity/INFO"/>
+ <genEnumLiterals ecoreEnumLiteral="Problems.ecore#//ESeverity/WARNING"/>
+ <genEnumLiterals ecoreEnumLiteral="Problems.ecore#//ESeverity/ERROR"/>
+ <genEnumLiterals ecoreEnumLiteral="Problems.ecore#//ESeverity/CANCEL"/>
+ </genEnums>
+ <genDataTypes ecoreDataType="Problems.ecore#//EDiagnostic"/>
+ <genDataTypes ecoreDataType="Problems.ecore#//EIterator">
+ <genTypeParameters ecoreTypeParameter="Problems.ecore#//EIterator/E"/>
+ </genDataTypes>
+ <genClasses ecoreClass="Problems.ecore#//EProblem">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Problems.ecore#//EProblem/severity"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Problems.ecore#//EProblem/message"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Problems.ecore#//EProblem/source"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Problems.ecore#//EProblem/code"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Problems.ecore#//EProblem/element"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Problems.ecore#//EProblem/related"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Problems.ecore#//EProblem/container"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Problems.ecore#//EProblem/type"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Problems.ecore#//EProblem/attributes"/>
+ <genOperations ecoreOperation="Problems.ecore#//EProblem/toDiagnostic"/>
+ </genClasses>
+ <genClasses ecoreClass="Problems.ecore#//EProblemsContainer">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Problems.ecore#//EProblemsContainer/problems"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Problems.ecore#//EProblemsContainer/subjects"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Problems.ecore#//EProblemsContainer/subcontainers"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Problems.ecore#//EProblemsContainer/container"/>
+ <genOperations ecoreOperation="Problems.ecore#//EProblemsContainer/allProblems"/>
+ <genOperations ecoreOperation="Problems.ecore#//EProblemsContainer/allProblems.1">
+ <genParameters ecoreParameter="Problems.ecore#//EProblemsContainer/allProblems.1/element"/>
+ </genOperations>
+ <genOperations ecoreOperation="Problems.ecore#//EProblemsContainer/allDiagnostics"/>
+ <genOperations ecoreOperation="Problems.ecore#//EProblemsContainer/allDiagnostics.1">
+ <genParameters ecoreParameter="Problems.ecore#//EProblemsContainer/allDiagnostics.1/element"/>
+ </genOperations>
+ <genOperations ecoreOperation="Problems.ecore#//EProblemsContainer/getWorstProblem">
+ <genParameters ecoreParameter="Problems.ecore#//EProblemsContainer/getWorstProblem/element"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="Problems.ecore#//Attribute">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Problems.ecore#//Attribute/key"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Problems.ecore#//Attribute/value"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/plugin.properties b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/plugin.properties
new file mode 100755
index 00000000..d8ba8588
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+pluginName = Papyrus CDO Model Repository Problems Model (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Provides a modeled implementation of problem markers for validation problems in resources in CDO repositories. \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/plugin.xml b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/plugin.xml
new file mode 100755
index 00000000..e9a8bd01
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/plugin.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2013, 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated Problems -->
+ <package
+ uri="http://www.eclipse.org/papyrus/cdo/problems/1.0.0"
+ class="org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage"
+ genModel="model/Problems.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/pom.xml b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/pom.xml
new file mode 100755
index 00000000..05ab73fd
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.validation.problems</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/EProblem.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/EProblem.java
new file mode 100755
index 00000000..d7305ecb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/EProblem.java
@@ -0,0 +1,289 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>EProblem</b></em>'. <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Description of a problem in some element of an EMF-based model instance.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getSeverity <em>Severity</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getMessage <em>Message</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getCode <em>Code</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getRelated <em>Related</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getContainer <em>Container</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getAttributes <em>Attributes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem()
+ * @model
+ * @extends CDOObject
+ * @generated
+ */
+public interface EProblem extends CDOObject {
+
+ /**
+ * Returns the value of the '<em><b>Severity</b></em>' attribute. The
+ * literals are from the enumeration {@link org.eclipse.papyrus.cdo.validation.problems.ESeverity}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Severity</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Severity</em>' attribute.
+ * @see org.eclipse.papyrus.cdo.validation.problems.ESeverity
+ * @see #setSeverity(ESeverity)
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Severity()
+ * @model required="true"
+ * @generated
+ */
+ ESeverity getSeverity();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getSeverity
+ * <em>Severity</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Severity</em>' attribute.
+ * @see org.eclipse.papyrus.cdo.validation.problems.ESeverity
+ * @see #getSeverity()
+ * @generated
+ */
+ void setSeverity(ESeverity value);
+
+ /**
+ * Returns the value of the '<em><b>Message</b></em>' attribute. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Message</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Message</em>' attribute.
+ * @see #setMessage(String)
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Message()
+ * @model required="true"
+ * @generated
+ */
+ String getMessage();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getMessage
+ * <em>Message</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Message</em>' attribute.
+ * @see #getMessage()
+ * @generated
+ */
+ void setMessage(String value);
+
+ /**
+ * Returns the value of the '<em><b>Source</b></em>' attribute. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Source</em>' attribute.
+ * @see #setSource(String)
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Source()
+ * @model required="true"
+ * @generated
+ */
+ String getSource();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getSource
+ * <em>Source</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Source</em>' attribute.
+ * @see #getSource()
+ * @generated
+ */
+ void setSource(String value);
+
+ /**
+ * Returns the value of the '<em><b>Code</b></em>' attribute. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Code</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Code</em>' attribute.
+ * @see #setCode(int)
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Code()
+ * @model
+ * @generated
+ */
+ int getCode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getCode <em>Code</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Code</em>' attribute.
+ * @see #getCode()
+ * @generated
+ */
+ void setCode(int value);
+
+ /**
+ * Returns the value of the '<em><b>Element</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> The
+ * element that manifests the problem. <!-- end-model-doc -->
+ *
+ * @return the value of the '<em>Element</em>' reference.
+ * @see #setElement(EObject)
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Element()
+ * @model required="true"
+ * @generated
+ */
+ EObject getElement();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getElement
+ * <em>Element</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Element</em>' reference.
+ * @see #getElement()
+ * @generated
+ */
+ void setElement(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Related</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.emf.ecore.EObject}. <!--
+ * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> Other
+ * model elements contributing to or otherwise related to the problem. May
+ * be, but not necessarily derived from, the 'data' list of an Ecore
+ * Diagnostic. <!-- end-model-doc -->
+ *
+ * @return the value of the '<em>Related</em>' reference list.
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Related()
+ * @model
+ * @generated
+ */
+ EList<EObject> getRelated();
+
+ /**
+ * Returns the value of the '<em><b>Container</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getProblems <em>Problems</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Container</em>' container reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Container</em>' container reference.
+ * @see #setContainer(EProblemsContainer)
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Container()
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getProblems
+ * @model opposite="problems" transient="false"
+ * @generated
+ */
+ EProblemsContainer getContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getContainer <em>Container</em>}' container reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Container</em>' container reference.
+ * @see #getContainer()
+ * @generated
+ */
+ void setContainer(EProblemsContainer value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * The default value is <code>"org.eclipse.emf.ecore.diagnostic"</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Optional identifier of a problem type. This should correspond to a marker type registered on the Eclipse {@code org.eclipse.core.resources.markers} extension point.
+ * <!-- end-model-doc -->
+ *
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Type()
+ * @model default="org.eclipse.emf.ecore.diagnostic"
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+ /**
+ * Returns the value of the '<em><b>Attributes</b></em>' map.
+ * The key is of type {@link java.lang.String},
+ * and the value is of type {@link java.lang.String},
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attributes</em>' map isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Attributes</em>' map.
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblem_Attributes()
+ * @model mapType="org.eclipse.papyrus.cdo.validation.problems.Attribute<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>"
+ * @generated
+ */
+ EMap<String, String> getAttributes();
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model dataType="org.eclipse.papyrus.cdo.validation.problems.EDiagnostic" required="true"
+ * @generated
+ */
+ Diagnostic toDiagnostic();
+
+} // EProblem
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/EProblemsContainer.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/EProblemsContainer.java
new file mode 100755
index 00000000..13cd3e8b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/EProblemsContainer.java
@@ -0,0 +1,167 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>EProblems Container</b></em>'. <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * An optional container for problems, to provide a single node that can be conveniently contained in some larger structure such as an XML resource (which can only have one root element) or other generic container.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getProblems <em>Problems</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getSubjects <em>Subjects</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getSubcontainers <em>Subcontainers</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getContainer <em>Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblemsContainer()
+ * @model
+ * @extends CDOObject
+ * @generated
+ */
+public interface EProblemsContainer extends CDOObject {
+
+ /**
+ * Returns the value of the '<em><b>Problems</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.cdo.validation.problems.EProblem}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getContainer <em>Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Problems</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>Problems</em>' containment reference list.
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblemsContainer_Problems()
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getContainer
+ * @model opposite="container" containment="true"
+ * @generated
+ */
+ EList<EProblem> getProblems();
+
+ /**
+ * Returns the value of the '<em><b>Subjects</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.emf.ecore.EObject}. <!--
+ * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * Optional reference to elements that are the subjects of some collection
+ * of problems. <!-- end-model-doc -->
+ *
+ * @return the value of the '<em>Subjects</em>' reference list.
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblemsContainer_Subjects()
+ * @model
+ * @generated
+ */
+ EList<EObject> getSubjects();
+
+ /**
+ * Returns the value of the '<em><b>Subcontainers</b></em>' containment
+ * reference list. The list contents are of type {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer}.
+ * It is bidirectional and its opposite is ' {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getContainer
+ * <em>Container</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
+ * begin-model-doc --> Optional nested group of containers, possibly
+ * referencing different subjects than the parent container. <!--
+ * end-model-doc -->
+ *
+ * @return the value of the '<em>Subcontainers</em>' containment reference
+ * list.
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblemsContainer_Subcontainers()
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getContainer
+ * @model opposite="container" containment="true"
+ * @generated
+ */
+ EList<EProblemsContainer> getSubcontainers();
+
+ /**
+ * Returns the value of the '<em><b>Container</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getSubcontainers <em>Subcontainers</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Container</em>' container reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Container</em>' container reference.
+ * @see #setContainer(EProblemsContainer)
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getEProblemsContainer_Container()
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getSubcontainers
+ * @model opposite="subcontainers" transient="false"
+ * @generated
+ */
+ EProblemsContainer getContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getContainer <em>Container</em>}' container reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Container</em>' container reference.
+ * @see #getContainer()
+ * @generated
+ */
+ void setContainer(EProblemsContainer value);
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model dataType="org.eclipse.papyrus.cdo.validation.problems.EIterator<org.eclipse.papyrus.cdo.validation.problems.EProblem>" required="true"
+ * @generated
+ */
+ Iterator<EProblem> allProblems();
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model dataType="org.eclipse.papyrus.cdo.validation.problems.EIterator<org.eclipse.papyrus.cdo.validation.problems.EProblem>" required="true" elementRequired="true"
+ * @generated
+ */
+ Iterator<EProblem> allProblems(EObject element);
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model dataType="org.eclipse.papyrus.cdo.validation.problems.EDiagnostic"
+ * @generated
+ */
+ EList<Diagnostic> allDiagnostics();
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model dataType="org.eclipse.papyrus.cdo.validation.problems.EDiagnostic" elementRequired="true"
+ * @generated
+ */
+ EList<Diagnostic> allDiagnostics(EObject element);
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model
+ * @generated
+ */
+ EProblem getWorstProblem(EObject element);
+
+} // EProblemsContainer
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ESeverity.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ESeverity.java
new file mode 100755
index 00000000..7ad420e5
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ESeverity.java
@@ -0,0 +1,307 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc --> A representation of the literals of the enumeration ' <em><b>ESeverity</b></em>', and utility methods for working with them. <!--
+ * end-user-doc --> <!-- begin-model-doc --> Enumeration of problem severities,
+ * corresponding to the Ecore Diagnostic severity values. <!-- end-model-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#getESeverity()
+ * @model
+ * @generated
+ */
+public enum ESeverity implements Enumerator {
+ /**
+ * The '<em><b>OK</b></em>' literal object.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #OK_VALUE
+ * @generated
+ * @ordered
+ */
+ OK(0, "OK", "OK"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>INFO</b></em>' literal object.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #INFO_VALUE
+ * @generated
+ * @ordered
+ */
+ INFO(1, "INFO", "INFO"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>WARNING</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #WARNING_VALUE
+ * @generated
+ * @ordered
+ */
+ WARNING(2, "WARNING", "WARNING"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>ERROR</b></em>' literal object.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #ERROR_VALUE
+ * @generated
+ * @ordered
+ */
+ ERROR(4, "ERROR", "ERROR"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>CANCEL</b></em>' literal object.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #CANCEL_VALUE
+ * @generated
+ * @ordered
+ */
+ CANCEL(8, "CANCEL", "CANCEL"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>OK</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>OK</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #OK
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int OK_VALUE = 0;
+
+ /**
+ * The '<em><b>INFO</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>INFO</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #INFO
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int INFO_VALUE = 1;
+
+ /**
+ * The '<em><b>WARNING</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>WARNING</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #WARNING
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int WARNING_VALUE = 2;
+
+ /**
+ * The '<em><b>ERROR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ERROR</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #ERROR
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int ERROR_VALUE = 4;
+
+ /**
+ * The '<em><b>CANCEL</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>CANCEL</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #CANCEL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int CANCEL_VALUE = 8;
+
+ /**
+ * An array of all the '<em><b>ESeverity</b></em>' enumerators. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final ESeverity[] VALUES_ARRAY = new ESeverity[] { OK, INFO, WARNING, ERROR, CANCEL, };
+
+ /**
+ * A public read-only list of all the '<em><b>ESeverity</b></em>' enumerators.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final List<ESeverity> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>ESeverity</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static ESeverity get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ESeverity result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>ESeverity</b></em>' literal with the specified name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static ESeverity getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ESeverity result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>ESeverity</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static ESeverity get(int value) {
+ switch (value) {
+ case OK_VALUE:
+ return OK;
+ case INFO_VALUE:
+ return INFO;
+ case WARNING_VALUE:
+ return WARNING;
+ case ERROR_VALUE:
+ return ERROR;
+ case CANCEL_VALUE:
+ return CANCEL;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ private ESeverity(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} // ESeverity
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ProblemsFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ProblemsFactory.java
new file mode 100755
index 00000000..1de71fe0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ProblemsFactory.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems;
+
+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.papyrus.cdo.validation.problems.ProblemsPackage
+ * @generated
+ */
+public interface ProblemsFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ProblemsFactory eINSTANCE = org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>EProblem</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>EProblem</em>'.
+ * @generated
+ */
+ EProblem createEProblem();
+
+ /**
+ * Returns a new object of class '<em>EProblems Container</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>EProblems Container</em>'.
+ * @generated
+ */
+ EProblemsContainer createEProblemsContainer();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ProblemsPackage getProblemsPackage();
+
+} // ProblemsFactory
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ProblemsPackage.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ProblemsPackage.java
new file mode 100755
index 00000000..0d91cdcf
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/ProblemsPackage.java
@@ -0,0 +1,955 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc --> <!-- begin-model-doc --> A model of problems, intended
+ * primarily as a persistence vehicle for Ecore Diagnostics in contexts where
+ * Eclipse resource problem markers (IProblemMarker) are either not available or
+ * not appropriate. <!-- end-model-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ProblemsPackage extends EPackage {
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "problems"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/cdo/problems/1.0.0"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "problems"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ProblemsPackage eINSTANCE = org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl <em>EProblem</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getEProblem()
+ * @generated
+ */
+ int EPROBLEM = 0;
+
+ /**
+ * The feature id for the '<em><b>Severity</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__SEVERITY = 0;
+
+ /**
+ * The feature id for the '<em><b>Message</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__MESSAGE = 1;
+
+ /**
+ * The feature id for the '<em><b>Source</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__SOURCE = 2;
+
+ /**
+ * The feature id for the '<em><b>Code</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__CODE = 3;
+
+ /**
+ * The feature id for the '<em><b>Element</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__ELEMENT = 4;
+
+ /**
+ * The feature id for the '<em><b>Related</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__RELATED = 5;
+
+ /**
+ * The feature id for the '<em><b>Container</b></em>' container reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__CONTAINER = 6;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__TYPE = 7;
+
+ /**
+ * The feature id for the '<em><b>Attributes</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM__ATTRIBUTES = 8;
+
+ /**
+ * The number of structural features of the '<em>EProblem</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM_FEATURE_COUNT = 9;
+
+ /**
+ * The operation id for the '<em>To Diagnostic</em>' operation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM___TO_DIAGNOSTIC = 0;
+
+ /**
+ * The number of operations of the '<em>EProblem</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEM_OPERATION_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemsContainerImpl <em>EProblems Container</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.EProblemsContainerImpl
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getEProblemsContainer()
+ * @generated
+ */
+ int EPROBLEMS_CONTAINER = 1;
+
+ /**
+ * The feature id for the '<em><b>Problems</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER__PROBLEMS = 0;
+
+ /**
+ * The feature id for the '<em><b>Subjects</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER__SUBJECTS = 1;
+
+ /**
+ * The feature id for the '<em><b>Subcontainers</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER__SUBCONTAINERS = 2;
+
+ /**
+ * The feature id for the '<em><b>Container</b></em>' container reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER__CONTAINER = 3;
+
+ /**
+ * The number of structural features of the '<em>EProblems Container</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER_FEATURE_COUNT = 4;
+
+ /**
+ * The operation id for the '<em>All Problems</em>' operation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER___ALL_PROBLEMS = 0;
+
+ /**
+ * The operation id for the '<em>All Problems</em>' operation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER___ALL_PROBLEMS__EOBJECT = 1;
+
+ /**
+ * The operation id for the '<em>All Diagnostics</em>' operation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER___ALL_DIAGNOSTICS = 2;
+
+ /**
+ * The operation id for the '<em>All Diagnostics</em>' operation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER___ALL_DIAGNOSTICS__EOBJECT = 3;
+
+ /**
+ * The operation id for the '<em>Get Worst Problem</em>' operation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER___GET_WORST_PROBLEM__EOBJECT = 4;
+
+ /**
+ * The number of operations of the '<em>EProblems Container</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EPROBLEMS_CONTAINER_OPERATION_COUNT = 5;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.cdo.validation.problems.impl.AttributeImpl <em>Attribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.AttributeImpl
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getAttribute()
+ * @generated
+ */
+ int ATTRIBUTE = 2;
+
+ /**
+ * The feature id for the '<em><b>Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE__KEY = 0;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE__VALUE = 1;
+
+ /**
+ * The number of structural features of the '<em>Attribute</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Attribute</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.cdo.validation.problems.ESeverity <em>ESeverity</em>}' enum.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.ESeverity
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getESeverity()
+ * @generated
+ */
+ int ESEVERITY = 3;
+
+ /**
+ * The meta object id for the '<em>EDiagnostic</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getEDiagnostic()
+ * @generated
+ */
+ int EDIAGNOSTIC = 4;
+
+ /**
+ * The meta object id for the '<em>EIterator</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.util.Iterator
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getEIterator()
+ * @generated
+ */
+ int EITERATOR = 5;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem <em>EProblem</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>EProblem</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem
+ * @generated
+ */
+ EClass getEProblem();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getSeverity <em>Severity</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Severity</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getSeverity()
+ * @see #getEProblem()
+ * @generated
+ */
+ EAttribute getEProblem_Severity();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getMessage <em>Message</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Message</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getMessage()
+ * @see #getEProblem()
+ * @generated
+ */
+ EAttribute getEProblem_Message();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getSource <em>Source</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Source</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getSource()
+ * @see #getEProblem()
+ * @generated
+ */
+ EAttribute getEProblem_Source();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getCode <em>Code</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Code</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getCode()
+ * @see #getEProblem()
+ * @generated
+ */
+ EAttribute getEProblem_Code();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getElement <em>Element</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Element</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getElement()
+ * @see #getEProblem()
+ * @generated
+ */
+ EReference getEProblem_Element();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getRelated <em>Related</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Related</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getRelated()
+ * @see #getEProblem()
+ * @generated
+ */
+ EReference getEProblem_Related();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getContainer <em>Container</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the container reference '<em>Container</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getContainer()
+ * @see #getEProblem()
+ * @generated
+ */
+ EReference getEProblem_Container();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getType()
+ * @see #getEProblem()
+ * @generated
+ */
+ EAttribute getEProblem_Type();
+
+ /**
+ * Returns the meta object for the map '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#getAttributes <em>Attributes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the map '<em>Attributes</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#getAttributes()
+ * @see #getEProblem()
+ * @generated
+ */
+ EReference getEProblem_Attributes();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#toDiagnostic() <em>To Diagnostic</em>}' operation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the '<em>To Diagnostic</em>' operation.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#toDiagnostic()
+ * @generated
+ */
+ EOperation getEProblem__ToDiagnostic();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer
+ * <em>EProblems Container</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for class '<em>EProblems Container</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer
+ * @generated
+ */
+ EClass getEProblemsContainer();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getProblems <em>Problems</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Problems</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getProblems()
+ * @see #getEProblemsContainer()
+ * @generated
+ */
+ EReference getEProblemsContainer_Problems();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getSubjects <em>Subjects</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Subjects</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getSubjects()
+ * @see #getEProblemsContainer()
+ * @generated
+ */
+ EReference getEProblemsContainer_Subjects();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getSubcontainers <em>Subcontainers</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Subcontainers</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getSubcontainers()
+ * @see #getEProblemsContainer()
+ * @generated
+ */
+ EReference getEProblemsContainer_Subcontainers();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getContainer <em>Container</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the container reference '<em>Container</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getContainer()
+ * @see #getEProblemsContainer()
+ * @generated
+ */
+ EReference getEProblemsContainer_Container();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems() <em>All Problems</em>}' operation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the '<em>All Problems</em>' operation.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems()
+ * @generated
+ */
+ EOperation getEProblemsContainer__AllProblems();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems(org.eclipse.emf.ecore.EObject) <em>All Problems</em>}' operation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the '<em>All Problems</em>' operation.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ EOperation getEProblemsContainer__AllProblems__EObject();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics() <em>All Diagnostics</em>}' operation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the '<em>All Diagnostics</em>' operation.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics()
+ * @generated
+ */
+ EOperation getEProblemsContainer__AllDiagnostics();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics(org.eclipse.emf.ecore.EObject) <em>All Diagnostics</em>}' operation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the '<em>All Diagnostics</em>' operation.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ EOperation getEProblemsContainer__AllDiagnostics__EObject();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getWorstProblem(org.eclipse.emf.ecore.EObject) <em>Get Worst Problem</em>}' operation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the '<em>Get Worst Problem</em>' operation.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getWorstProblem(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ EOperation getEProblemsContainer__GetWorstProblem__EObject();
+
+ /**
+ * Returns the meta object for class '{@link java.util.Map.Entry <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Attribute</em>'.
+ * @see java.util.Map.Entry
+ * @model keyDataType="org.eclipse.emf.ecore.EString" keyRequired="true"
+ * valueDataType="org.eclipse.emf.ecore.EString"
+ * @generated
+ */
+ EClass getAttribute();
+
+ /**
+ * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Key</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Key</em>'.
+ * @see java.util.Map.Entry
+ * @see #getAttribute()
+ * @generated
+ */
+ EAttribute getAttribute_Key();
+
+ /**
+ * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see java.util.Map.Entry
+ * @see #getAttribute()
+ * @generated
+ */
+ EAttribute getAttribute_Value();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.papyrus.cdo.validation.problems.ESeverity <em>ESeverity</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for enum '<em>ESeverity</em>'.
+ * @see org.eclipse.papyrus.cdo.validation.problems.ESeverity
+ * @generated
+ */
+ EEnum getESeverity();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.emf.common.util.Diagnostic <em>EDiagnostic</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>EDiagnostic</em>'.
+ * @see org.eclipse.emf.common.util.Diagnostic
+ * @model instanceClass="org.eclipse.emf.common.util.Diagnostic" serializeable="false"
+ * @generated
+ */
+ EDataType getEDiagnostic();
+
+ /**
+ * Returns the meta object for data type '{@link java.util.Iterator <em>EIterator</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>EIterator</em>'.
+ * @see java.util.Iterator
+ * @model instanceClass="java.util.Iterator" serializeable="false" typeParameters="E"
+ * @generated
+ */
+ EDataType getEIterator();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ ProblemsFactory getProblemsFactory();
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl
+ * <em>EProblem</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getEProblem()
+ * @generated
+ */
+ EClass EPROBLEM = eINSTANCE.getEProblem();
+
+ /**
+ * The meta object literal for the '<em><b>Severity</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute EPROBLEM__SEVERITY = eINSTANCE.getEProblem_Severity();
+
+ /**
+ * The meta object literal for the '<em><b>Message</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute EPROBLEM__MESSAGE = eINSTANCE.getEProblem_Message();
+
+ /**
+ * The meta object literal for the '<em><b>Source</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute EPROBLEM__SOURCE = eINSTANCE.getEProblem_Source();
+
+ /**
+ * The meta object literal for the '<em><b>Code</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute EPROBLEM__CODE = eINSTANCE.getEProblem_Code();
+
+ /**
+ * The meta object literal for the '<em><b>Element</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EPROBLEM__ELEMENT = eINSTANCE.getEProblem_Element();
+
+ /**
+ * The meta object literal for the '<em><b>Related</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EPROBLEM__RELATED = eINSTANCE.getEProblem_Related();
+
+ /**
+ * The meta object literal for the '<em><b>Container</b></em>' container reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EPROBLEM__CONTAINER = eINSTANCE.getEProblem_Container();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute EPROBLEM__TYPE = eINSTANCE.getEProblem_Type();
+
+ /**
+ * The meta object literal for the '<em><b>Attributes</b></em>' map feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EPROBLEM__ATTRIBUTES = eINSTANCE.getEProblem_Attributes();
+
+ /**
+ * The meta object literal for the '<em><b>To Diagnostic</b></em>' operation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation EPROBLEM___TO_DIAGNOSTIC = eINSTANCE.getEProblem__ToDiagnostic();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemsContainerImpl <em>EProblems Container</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.EProblemsContainerImpl
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getEProblemsContainer()
+ * @generated
+ */
+ EClass EPROBLEMS_CONTAINER = eINSTANCE.getEProblemsContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Problems</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EPROBLEMS_CONTAINER__PROBLEMS = eINSTANCE.getEProblemsContainer_Problems();
+
+ /**
+ * The meta object literal for the '<em><b>Subjects</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EPROBLEMS_CONTAINER__SUBJECTS = eINSTANCE.getEProblemsContainer_Subjects();
+
+ /**
+ * The meta object literal for the '<em><b>Subcontainers</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EPROBLEMS_CONTAINER__SUBCONTAINERS = eINSTANCE.getEProblemsContainer_Subcontainers();
+
+ /**
+ * The meta object literal for the '<em><b>Container</b></em>' container reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EPROBLEMS_CONTAINER__CONTAINER = eINSTANCE.getEProblemsContainer_Container();
+
+ /**
+ * The meta object literal for the '<em><b>All Problems</b></em>' operation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation EPROBLEMS_CONTAINER___ALL_PROBLEMS = eINSTANCE.getEProblemsContainer__AllProblems();
+
+ /**
+ * The meta object literal for the '<em><b>All Problems</b></em>' operation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation EPROBLEMS_CONTAINER___ALL_PROBLEMS__EOBJECT = eINSTANCE.getEProblemsContainer__AllProblems__EObject();
+
+ /**
+ * The meta object literal for the '<em><b>All Diagnostics</b></em>' operation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation EPROBLEMS_CONTAINER___ALL_DIAGNOSTICS = eINSTANCE.getEProblemsContainer__AllDiagnostics();
+
+ /**
+ * The meta object literal for the '<em><b>All Diagnostics</b></em>' operation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation EPROBLEMS_CONTAINER___ALL_DIAGNOSTICS__EOBJECT = eINSTANCE.getEProblemsContainer__AllDiagnostics__EObject();
+
+ /**
+ * The meta object literal for the '<em><b>Get Worst Problem</b></em>' operation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation EPROBLEMS_CONTAINER___GET_WORST_PROBLEM__EOBJECT = eINSTANCE.getEProblemsContainer__GetWorstProblem__EObject();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.cdo.validation.problems.impl.AttributeImpl <em>Attribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.AttributeImpl
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getAttribute()
+ * @generated
+ */
+ EClass ATTRIBUTE = eINSTANCE.getAttribute();
+
+ /**
+ * The meta object literal for the '<em><b>Key</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute ATTRIBUTE__KEY = eINSTANCE.getAttribute_Key();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute ATTRIBUTE__VALUE = eINSTANCE.getAttribute_Value();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.cdo.validation.problems.ESeverity
+ * <em>ESeverity</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.ESeverity
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getESeverity()
+ * @generated
+ */
+ EEnum ESEVERITY = eINSTANCE.getESeverity();
+
+ /**
+ * The meta object literal for the '<em>EDiagnostic</em>' data type.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getEDiagnostic()
+ * @generated
+ */
+ EDataType EDIAGNOSTIC = eINSTANCE.getEDiagnostic();
+
+ /**
+ * The meta object literal for the '<em>EIterator</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.util.Iterator
+ * @see org.eclipse.papyrus.cdo.validation.problems.impl.ProblemsPackageImpl#getEIterator()
+ * @generated
+ */
+ EDataType EITERATOR = eINSTANCE.getEIterator();
+
+ }
+
+} // ProblemsPackage
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/AttributeImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/AttributeImpl.java
new file mode 100755
index 00000000..c261eba5
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/AttributeImpl.java
@@ -0,0 +1,203 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.impl;
+
+import org.eclipse.emf.common.util.BasicEMap;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.AttributeImpl#getTypedKey <em>Key</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.AttributeImpl#getTypedValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AttributeImpl extends CDOObjectImpl implements BasicEMap.Entry<String, String> {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AttributeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ProblemsPackage.Literals.ATTRIBUTE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount() {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getTypedKey() {
+ return (String) eGet(ProblemsPackage.Literals.ATTRIBUTE__KEY, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setTypedKey(String newKey) {
+ eSet(ProblemsPackage.Literals.ATTRIBUTE__KEY, newKey);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getTypedValue() {
+ return (String) eGet(ProblemsPackage.Literals.ATTRIBUTE__VALUE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setTypedValue(String newValue) {
+ eSet(ProblemsPackage.Literals.ATTRIBUTE__VALUE, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected int hash = -1;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int getHash() {
+ if (hash == -1) {
+ Object theKey = getKey();
+ hash = (theKey == null ? 0 : theKey.hashCode());
+ }
+ return hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setHash(int hash) {
+ this.hash = hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getKey() {
+ return getTypedKey();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setKey(String key) {
+ setTypedKey(key);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getValue() {
+ return getTypedValue();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String setValue(String value) {
+ String oldValue = getValue();
+ setTypedValue(value);
+ return oldValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EMap<String, String> getEMap() {
+ EObject container = eContainer();
+ return container == null ? null : (EMap<String, String>) container.eGet(eContainmentFeature());
+ }
+
+} // AttributeImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/EProblemImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/EProblemImpl.java
new file mode 100755
index 00000000..929718d0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/EProblemImpl.java
@@ -0,0 +1,276 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>EProblem</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getSeverity <em>Severity</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getMessage <em>Message</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getCode <em>Code</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getRelated <em>Related</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getContainer <em>Container</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemImpl#getAttributes <em>Attributes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EProblemImpl extends CDOObjectImpl implements EProblem {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EProblemImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ProblemsPackage.Literals.EPROBLEM;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount() {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ESeverity getSeverity() {
+ return (ESeverity) eGet(ProblemsPackage.Literals.EPROBLEM__SEVERITY, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setSeverity(ESeverity newSeverity) {
+ eSet(ProblemsPackage.Literals.EPROBLEM__SEVERITY, newSeverity);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getMessage() {
+ return (String) eGet(ProblemsPackage.Literals.EPROBLEM__MESSAGE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setMessage(String newMessage) {
+ eSet(ProblemsPackage.Literals.EPROBLEM__MESSAGE, newMessage);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getSource() {
+ return (String) eGet(ProblemsPackage.Literals.EPROBLEM__SOURCE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setSource(String newSource) {
+ eSet(ProblemsPackage.Literals.EPROBLEM__SOURCE, newSource);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int getCode() {
+ return (Integer) eGet(ProblemsPackage.Literals.EPROBLEM__CODE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setCode(int newCode) {
+ eSet(ProblemsPackage.Literals.EPROBLEM__CODE, newCode);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject getElement() {
+ return (EObject) eGet(ProblemsPackage.Literals.EPROBLEM__ELEMENT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setElement(EObject newElement) {
+ eSet(ProblemsPackage.Literals.EPROBLEM__ELEMENT, newElement);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public EList<EObject> getRelated() {
+ return (EList<EObject>) eGet(ProblemsPackage.Literals.EPROBLEM__RELATED, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EProblemsContainer getContainer() {
+ return (EProblemsContainer) eGet(ProblemsPackage.Literals.EPROBLEM__CONTAINER, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setContainer(EProblemsContainer newContainer) {
+ eSet(ProblemsPackage.Literals.EPROBLEM__CONTAINER, newContainer);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getType() {
+ return (String) eGet(ProblemsPackage.Literals.EPROBLEM__TYPE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setType(String newType) {
+ eSet(ProblemsPackage.Literals.EPROBLEM__TYPE, newType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public EMap<String, String> getAttributes() {
+ return (EMap<String, String>) eGet(ProblemsPackage.Literals.EPROBLEM__ATTRIBUTES, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Diagnostic toDiagnostic() {
+ Collection<EObject> related = getRelated();
+ Object[] data = new Object[1 + related.size()];
+ data[0] = getElement();
+ if (!related.isEmpty()) {
+ System.arraycopy(related.toArray(), 0, data, 1, related.size());
+ }
+ return new BasicDiagnostic(getSeverity().getValue(), getSource(), getCode(), getMessage(), data);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case ProblemsPackage.EPROBLEM___TO_DIAGNOSTIC:
+ return toDiagnostic();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // EProblemImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/EProblemsContainerImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/EProblemsContainerImpl.java
new file mode 100755
index 00000000..a2068c4d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/EProblemsContainerImpl.java
@@ -0,0 +1,279 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>EProblems Container</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemsContainerImpl#getProblems <em>Problems</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemsContainerImpl#getSubjects <em>Subjects</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemsContainerImpl#getSubcontainers <em>Subcontainers</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.impl.EProblemsContainerImpl#getContainer <em>Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EProblemsContainerImpl extends CDOObjectImpl implements EProblemsContainer {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EProblemsContainerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ProblemsPackage.Literals.EPROBLEMS_CONTAINER;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount() {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public EList<EProblem> getProblems() {
+ return (EList<EProblem>) eGet(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__PROBLEMS, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public EList<EObject> getSubjects() {
+ return (EList<EObject>) eGet(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__SUBJECTS, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public EList<EProblemsContainer> getSubcontainers() {
+ return (EList<EProblemsContainer>) eGet(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__SUBCONTAINERS, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EProblemsContainer getContainer() {
+ return (EProblemsContainer) eGet(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__CONTAINER, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setContainer(EProblemsContainer newContainer) {
+ eSet(ProblemsPackage.Literals.EPROBLEMS_CONTAINER__CONTAINER, newContainer);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Iterator<EProblem> allProblems() {
+ return new EProblemsIterator(eAllContents());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Iterator<EProblem> allProblems(final EObject element) {
+ return new EProblemsIterator(eAllContents()) {
+
+ @Override
+ protected boolean accept(EProblem problem) {
+ return problem.getElement() == element;
+ }
+ };
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public EList<Diagnostic> allDiagnostics() {
+ List<Diagnostic> result = new java.util.ArrayList<Diagnostic>();
+
+ for (Iterator<EProblem> allProblems = allProblems(); allProblems.hasNext();) {
+ result.add(allProblems.next().toDiagnostic());
+ }
+
+ return new BasicEList.UnmodifiableEList<Diagnostic>(result.size(), result.toArray());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public EList<Diagnostic> allDiagnostics(EObject element) {
+ List<Diagnostic> result = new java.util.ArrayList<Diagnostic>();
+
+ for (Iterator<EProblem> allProblems = allProblems(element); allProblems.hasNext();) {
+ result.add(allProblems.next().toDiagnostic());
+ }
+
+ return new BasicEList.UnmodifiableEList<Diagnostic>(result.size(), result.toArray());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public EProblem getWorstProblem(EObject element) {
+ EProblem result = null;
+
+ for (Iterator<EProblem> problems = allProblems(element); problems.hasNext();) {
+ EProblem next = problems.next();
+ if (result == null) {
+ result = next;
+ } else if (next.getSeverity().compareTo(result.getSeverity()) > 0) {
+ result = next;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case ProblemsPackage.EPROBLEMS_CONTAINER___ALL_PROBLEMS:
+ return allProblems();
+ case ProblemsPackage.EPROBLEMS_CONTAINER___ALL_PROBLEMS__EOBJECT:
+ return allProblems((EObject) arguments.get(0));
+ case ProblemsPackage.EPROBLEMS_CONTAINER___ALL_DIAGNOSTICS:
+ return allDiagnostics();
+ case ProblemsPackage.EPROBLEMS_CONTAINER___ALL_DIAGNOSTICS__EOBJECT:
+ return allDiagnostics((EObject) arguments.get(0));
+ case ProblemsPackage.EPROBLEMS_CONTAINER___GET_WORST_PROBLEM__EOBJECT:
+ return getWorstProblem((EObject) arguments.get(0));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ private static class EProblemsIterator implements Iterator<EProblem> {
+
+ private final Iterator<?> delegate;
+
+ private EProblem preparedNext;
+
+ public EProblemsIterator(Iterator<?> delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public boolean hasNext() {
+ if (preparedNext == null) {
+ while (delegate.hasNext()) {
+ Object next = delegate.next();
+ if (next instanceof EProblem) {
+ EProblem problem = (EProblem) next;
+ if (accept(problem)) {
+ preparedNext = problem;
+ break;
+ }
+ }
+ }
+ }
+
+ return preparedNext != null;
+ }
+
+ protected boolean accept(EProblem problem) {
+ return true;
+ }
+
+ @Override
+ public EProblem next() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+
+ EProblem result = preparedNext;
+ preparedNext = null;
+ return result;
+ }
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException("remove"); //$NON-NLS-1$
+ }
+ }
+
+} // EProblemsContainerImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/ProblemsFactoryImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/ProblemsFactoryImpl.java
new file mode 100755
index 00000000..88702dd2
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/ProblemsFactoryImpl.java
@@ -0,0 +1,194 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.impl;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ProblemsFactoryImpl extends EFactoryImpl implements ProblemsFactory {
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static ProblemsFactory init() {
+ try {
+ ProblemsFactory theProblemsFactory = (ProblemsFactory) EPackage.Registry.INSTANCE.getEFactory(ProblemsPackage.eNS_URI);
+ if (theProblemsFactory != null) {
+ return theProblemsFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ProblemsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ProblemsFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ProblemsPackage.EPROBLEM:
+ return createEProblem();
+ case ProblemsPackage.EPROBLEMS_CONTAINER:
+ return createEProblemsContainer();
+ case ProblemsPackage.ATTRIBUTE:
+ return (EObject) createAttribute();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case ProblemsPackage.ESEVERITY:
+ return createESeverityFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case ProblemsPackage.ESEVERITY:
+ return convertESeverityToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EProblem createEProblem() {
+ EProblemImpl eProblem = new EProblemImpl();
+ return eProblem;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EProblemsContainer createEProblemsContainer() {
+ EProblemsContainerImpl eProblemsContainer = new EProblemsContainerImpl();
+ return eProblemsContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Map.Entry<String, String> createAttribute() {
+ AttributeImpl attribute = new AttributeImpl();
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ESeverity createESeverityFromString(EDataType eDataType, String initialValue) {
+ ESeverity result = ESeverity.get(initialValue);
+ if (result == null)
+ {
+ throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertESeverityToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ProblemsPackage getProblemsPackage() {
+ return (ProblemsPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ProblemsPackage getPackage() {
+ return ProblemsPackage.eINSTANCE;
+ }
+
+} // ProblemsFactoryImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/ProblemsPackageImpl.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/ProblemsPackageImpl.java
new file mode 100755
index 00000000..1a955261
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/impl/ProblemsPackageImpl.java
@@ -0,0 +1,585 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.impl;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ProblemsPackageImpl extends EPackageImpl implements ProblemsPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass eProblemEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass eProblemsContainerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass attributeEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EEnum eSeverityEEnum = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType eDiagnosticEDataType = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType eIteratorEDataType = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ProblemsPackageImpl() {
+ super(eNS_URI, ProblemsFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model,
+ * and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link ProblemsPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ProblemsPackage init() {
+ if (isInited) {
+ return (ProblemsPackage) EPackage.Registry.INSTANCE.getEPackage(ProblemsPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ ProblemsPackageImpl theProblemsPackage = (ProblemsPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ProblemsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ProblemsPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theProblemsPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theProblemsPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theProblemsPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ProblemsPackage.eNS_URI, theProblemsPackage);
+ return theProblemsPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getEProblem() {
+ return eProblemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getEProblem_Severity() {
+ return (EAttribute) eProblemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getEProblem_Message() {
+ return (EAttribute) eProblemEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getEProblem_Source() {
+ return (EAttribute) eProblemEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getEProblem_Code() {
+ return (EAttribute) eProblemEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getEProblem_Element() {
+ return (EReference) eProblemEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getEProblem_Related() {
+ return (EReference) eProblemEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getEProblem_Container() {
+ return (EReference) eProblemEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getEProblem_Type() {
+ return (EAttribute) eProblemEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getEProblem_Attributes() {
+ return (EReference) eProblemEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getEProblem__ToDiagnostic() {
+ return eProblemEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getEProblemsContainer() {
+ return eProblemsContainerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getEProblemsContainer_Problems() {
+ return (EReference) eProblemsContainerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getEProblemsContainer_Subjects() {
+ return (EReference) eProblemsContainerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getEProblemsContainer_Subcontainers() {
+ return (EReference) eProblemsContainerEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getEProblemsContainer_Container() {
+ return (EReference) eProblemsContainerEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getEProblemsContainer__AllProblems() {
+ return eProblemsContainerEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getEProblemsContainer__AllProblems__EObject() {
+ return eProblemsContainerEClass.getEOperations().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getEProblemsContainer__AllDiagnostics() {
+ return eProblemsContainerEClass.getEOperations().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getEProblemsContainer__AllDiagnostics__EObject() {
+ return eProblemsContainerEClass.getEOperations().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getEProblemsContainer__GetWorstProblem__EObject() {
+ return eProblemsContainerEClass.getEOperations().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getAttribute() {
+ return attributeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getAttribute_Key() {
+ return (EAttribute) attributeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getAttribute_Value() {
+ return (EAttribute) attributeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EEnum getESeverity() {
+ return eSeverityEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getEDiagnostic() {
+ return eDiagnosticEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getEIterator() {
+ return eIteratorEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ProblemsFactory getProblemsFactory() {
+ return (ProblemsFactory) getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ eProblemEClass = createEClass(EPROBLEM);
+ createEAttribute(eProblemEClass, EPROBLEM__SEVERITY);
+ createEAttribute(eProblemEClass, EPROBLEM__MESSAGE);
+ createEAttribute(eProblemEClass, EPROBLEM__SOURCE);
+ createEAttribute(eProblemEClass, EPROBLEM__CODE);
+ createEReference(eProblemEClass, EPROBLEM__ELEMENT);
+ createEReference(eProblemEClass, EPROBLEM__RELATED);
+ createEReference(eProblemEClass, EPROBLEM__CONTAINER);
+ createEAttribute(eProblemEClass, EPROBLEM__TYPE);
+ createEReference(eProblemEClass, EPROBLEM__ATTRIBUTES);
+ createEOperation(eProblemEClass, EPROBLEM___TO_DIAGNOSTIC);
+
+ eProblemsContainerEClass = createEClass(EPROBLEMS_CONTAINER);
+ createEReference(eProblemsContainerEClass, EPROBLEMS_CONTAINER__PROBLEMS);
+ createEReference(eProblemsContainerEClass, EPROBLEMS_CONTAINER__SUBJECTS);
+ createEReference(eProblemsContainerEClass, EPROBLEMS_CONTAINER__SUBCONTAINERS);
+ createEReference(eProblemsContainerEClass, EPROBLEMS_CONTAINER__CONTAINER);
+ createEOperation(eProblemsContainerEClass, EPROBLEMS_CONTAINER___ALL_PROBLEMS);
+ createEOperation(eProblemsContainerEClass, EPROBLEMS_CONTAINER___ALL_PROBLEMS__EOBJECT);
+ createEOperation(eProblemsContainerEClass, EPROBLEMS_CONTAINER___ALL_DIAGNOSTICS);
+ createEOperation(eProblemsContainerEClass, EPROBLEMS_CONTAINER___ALL_DIAGNOSTICS__EOBJECT);
+ createEOperation(eProblemsContainerEClass, EPROBLEMS_CONTAINER___GET_WORST_PROBLEM__EOBJECT);
+
+ attributeEClass = createEClass(ATTRIBUTE);
+ createEAttribute(attributeEClass, ATTRIBUTE__KEY);
+ createEAttribute(attributeEClass, ATTRIBUTE__VALUE);
+
+ // Create enums
+ eSeverityEEnum = createEEnum(ESEVERITY);
+
+ // Create data types
+ eDiagnosticEDataType = createEDataType(EDIAGNOSTIC);
+ eIteratorEDataType = createEDataType(EITERATOR);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+ addETypeParameter(eIteratorEDataType, "E"); //$NON-NLS-1$
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(eProblemEClass, EProblem.class, "EProblem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getEProblem_Severity(), this.getESeverity(), "severity", null, 1, 1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getEProblem_Message(), ecorePackage.getEString(), "message", null, 1, 1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getEProblem_Source(), ecorePackage.getEString(), "source", null, 1, 1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getEProblem_Code(), ecorePackage.getEInt(), "code", null, 0, 1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getEProblem_Element(), ecorePackage.getEObject(), null, "element", null, 1, 1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getEProblem_Related(), ecorePackage.getEObject(), null, "related", null, 0, -1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getEProblem_Container(), this.getEProblemsContainer(), this.getEProblemsContainer_Problems(),
+ "container", null, 0, 1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getEProblem_Type(), ecorePackage.getEString(), "type", "org.eclipse.emf.ecore.diagnostic", 0, 1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEReference(getEProblem_Attributes(), this.getAttribute(), null, "attributes", null, 0, -1, EProblem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEOperation(getEProblem__ToDiagnostic(), this.getEDiagnostic(), "toDiagnostic", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(eProblemsContainerEClass, EProblemsContainer.class, "EProblemsContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getEProblemsContainer_Problems(), this.getEProblem(), this.getEProblem_Container(),
+ "problems", null, 0, -1, EProblemsContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getEProblemsContainer_Subjects(), ecorePackage.getEObject(), null,
+ "subjects", null, 0, -1, EProblemsContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getEProblemsContainer_Subcontainers(), this.getEProblemsContainer(), this.getEProblemsContainer_Container(),
+ "subcontainers", null, 0, -1, EProblemsContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getEProblemsContainer_Container(), this.getEProblemsContainer(), this.getEProblemsContainer_Subcontainers(),
+ "container", null, 0, 1, EProblemsContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ EOperation op = initEOperation(getEProblemsContainer__AllProblems(), null, "allProblems", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ EGenericType g1 = createEGenericType(this.getEIterator());
+ EGenericType g2 = createEGenericType(this.getEProblem());
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ op = initEOperation(getEProblemsContainer__AllProblems__EObject(), null, "allProblems", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, ecorePackage.getEObject(), "element", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(this.getEIterator());
+ g2 = createEGenericType(this.getEProblem());
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEOperation(getEProblemsContainer__AllDiagnostics(), this.getEDiagnostic(), "allDiagnostics", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = initEOperation(getEProblemsContainer__AllDiagnostics__EObject(), this.getEDiagnostic(), "allDiagnostics", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, ecorePackage.getEObject(), "element", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = initEOperation(getEProblemsContainer__GetWorstProblem__EObject(), this.getEProblem(), "getWorstProblem", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, ecorePackage.getEObject(), "element", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(attributeEClass, Map.Entry.class, "Attribute", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getAttribute_Key(), ecorePackage.getEString(), "key", null, 1, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getAttribute_Value(), ecorePackage.getEString(), "value", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Initialize enums and add enum literals
+ initEEnum(eSeverityEEnum, ESeverity.class, "ESeverity"); //$NON-NLS-1$
+ addEEnumLiteral(eSeverityEEnum, ESeverity.OK);
+ addEEnumLiteral(eSeverityEEnum, ESeverity.INFO);
+ addEEnumLiteral(eSeverityEEnum, ESeverity.WARNING);
+ addEEnumLiteral(eSeverityEEnum, ESeverity.ERROR);
+ addEEnumLiteral(eSeverityEEnum, ESeverity.CANCEL);
+
+ // Initialize data types
+ initEDataType(eDiagnosticEDataType, Diagnostic.class, "EDiagnostic", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(eIteratorEDataType, Iterator.class, "EIterator", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // ProblemsPackageImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/internal/ProblemsPlugin.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/internal/ProblemsPlugin.java
new file mode 100755
index 00000000..fb204c38
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/internal/ProblemsPlugin.java
@@ -0,0 +1,107 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.internal;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Problems model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class ProblemsPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final ProblemsPlugin INSTANCE = new ProblemsPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ProblemsPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsAdapterFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsAdapterFactory.java
new file mode 100755
index 00000000..950e67bb
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsAdapterFactory.java
@@ -0,0 +1,178 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage
+ * @generated
+ */
+public class ProblemsAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ProblemsPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ProblemsAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ProblemsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ProblemsSwitch<Adapter> modelSwitch = new ProblemsSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseEProblem(EProblem object) {
+ return createEProblemAdapter();
+ }
+
+ @Override
+ public Adapter caseEProblemsContainer(EProblemsContainer object) {
+ return createEProblemsContainerAdapter();
+ }
+
+ @Override
+ public Adapter caseAttribute(Map.Entry<String, String> object) {
+ return createAttributeAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.cdo.validation.problems.EProblem
+ * <em>EProblem</em>}'. <!-- begin-user-doc --> This default implementation
+ * returns null so that we can easily ignore cases; it's useful to ignore a
+ * case when inheritance will catch all the cases anyway. <!-- end-user-doc
+ * -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem
+ * @generated
+ */
+ public Adapter createEProblemAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer <em>EProblems Container</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer
+ * @generated
+ */
+ public Adapter createEProblemsContainerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see java.util.Map.Entry
+ * @generated
+ */
+ public Adapter createAttributeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} // ProblemsAdapterFactory
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsEvent.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsEvent.java
new file mode 100755
index 00000000..ad8ca648
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsEvent.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.util;
+
+import java.util.EventObject;
+
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+
+/**
+ * This is the ProblemsEvent type. Enjoy.
+ */
+public class ProblemsEvent
+ extends EventObject {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final int ADDED = 0;
+
+ public static final int REMOVED = 1;
+
+ private final int eventType;
+
+ private final EProblem problem;
+
+ public ProblemsEvent(ProblemsManager source, int eventType, EProblem problem) {
+ super(source);
+
+ this.eventType = eventType;
+ this.problem = problem;
+ }
+
+ @Override
+ public ProblemsManager getSource() {
+ return (ProblemsManager) super.getSource();
+ }
+
+ public int getEventType() {
+ return eventType;
+ }
+
+ public EProblem getProblem() {
+ return problem;
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsListener.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsListener.java
new file mode 100755
index 00000000..cf7abe9b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsListener.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.util;
+
+import java.util.EventListener;
+
+/**
+ * This is the ProblemsListener type. Enjoy.
+ */
+public interface ProblemsListener
+ extends EventListener {
+
+ void problemAdded(ProblemsEvent event);
+
+ void problemRemoved(ProblemsEvent event);
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsManager.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsManager.java
new file mode 100755
index 00000000..14bee2dc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsManager.java
@@ -0,0 +1,618 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.util;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+import org.eclipse.papyrus.cdo.validation.problems.internal.ProblemsPlugin;
+
+/**
+ * A utility for managing a single {@link EProblemsContainer} containing
+ * problems for model elements in a {@link ResourceSet} scope.
+ */
+public class ProblemsManager {
+
+ private final ManagerAdapter adapter;
+
+ private EProblemsContainer problems;
+
+ private ECrossReferenceAdapter xrefs;
+
+ private ProblemsAdapter problemsAdapter;
+
+ private CopyOnWriteArrayList<ProblemsListener> listeners = new CopyOnWriteArrayList<ProblemsListener>();
+
+ ProblemsManager(Notifier notifier) {
+ adapter = new ManagerAdapter();
+ notifier.eAdapters().add(adapter);
+ ((EObservableAdapterList) notifier.eAdapters()).addListener(adapter);
+
+ xrefs = ECrossReferenceAdapter.getCrossReferenceAdapter(notifier);
+
+ problems = ProblemsFactory.eINSTANCE.createEProblemsContainer();
+ if (xrefs != null) {
+ problems.eAdapters().add(xrefs);
+ }
+
+ problemsAdapter = new ProblemsAdapter();
+ problems.eAdapters().add(problemsAdapter);
+ }
+
+ /**
+ * Gets the problems manager associated with the specified {@code resourceSet}. If none has been created yet, then it is created and
+ * associated on demand.
+ *
+ * @param resourceSet
+ * a resource set
+ *
+ * @return the {@code resourceSet}'s problems manager (never {@code null})
+ */
+ public static ProblemsManager getProblemsManager(ResourceSet resourceSet) {
+ ProblemsManager result = null;
+
+ for (Adapter next : resourceSet.eAdapters()) {
+ if (next instanceof ManagerAdapter) {
+ result = ((ManagerAdapter) next).getManager();
+ break;
+ }
+ }
+
+ if (result == null) {
+ result = new ProblemsManager(resourceSet);
+ }
+
+ return result;
+ }
+
+ /**
+ * Creates a new problems manager on a custom problem class and associates
+ * it with the specified {@code resourceSet}.
+ *
+ * @param resourceSet
+ * a resource set
+ * @param customProblemClass
+ * an {@link EClass} conforming to <tt>EProblem</tt> to create
+ * instead of the default <tt>EProblem</tt> type
+ *
+ * @return the new problems manager
+ */
+ public static ProblemsManager createProblemsManager(ResourceSet resourceSet, EClass customProblemClass) {
+ if (customProblemClass == null) {
+ throw new IllegalArgumentException("null customProblemClass"); //$NON-NLS-1$
+ }
+
+ return new ProblemsManager.Custom(resourceSet, customProblemClass);
+ }
+
+ public static IStatus toIStatus(EProblem problem) {
+ return new StatusWrapper(problem);
+ }
+
+ public EProblem createProblem(Diagnostic diagnostic) {
+ return createProblem(diagnostic, null);
+ }
+
+ public EProblem createProblem(Diagnostic diagnostic, String type) {
+ EProblem result;
+ EObject element = null;
+
+ Iterator<?> data = diagnostic.getData().iterator();
+ while (data.hasNext()) {
+ Object next = data.next();
+
+ // CDOResources are EObjects
+ if ((next instanceof EObject) && !(next instanceof Resource)) {
+ element = (EObject) next;
+ break;
+ }
+ }
+
+ if (element == null) {
+ // can't create a problem without the element to attach it to
+ result = null;
+ } else {
+ result = createProblem();
+
+ result.setSeverity(ESeverity.get(diagnostic.getSeverity()));
+ result.setSource(diagnostic.getSource());
+ result.setCode(diagnostic.getCode());
+ result.setMessage(diagnostic.getMessage());
+
+ if (type != null) {
+ result.setType(type);
+ }
+
+ result.setElement(element);
+ while (data.hasNext()) {
+ Object next = data.next();
+
+ // CDOResources are EObjects
+ if ((next instanceof EObject) && !(next instanceof Resource)) {
+ result.getRelated().add((EObject) next);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Obtains all of the problems tracked by this problems manager.
+ */
+ public Iterator<EProblem> getAllProblems() {
+ return problems.allProblems();
+ }
+
+ /**
+ * Obtains all of the problems tracked by this problems manager for the
+ * specified {@code eObject}.
+ *
+ * @param eObject
+ * an object in the resource set scope for which I track problems
+ */
+ public Iterator<EProblem> getAllProblems(EObject eObject) {
+ Iterator<EProblem> result;
+
+ if (xrefs == null) {
+ result = problems.allProblems(eObject);
+ } else {
+ result = new EProblemsIterator<EStructuralFeature.Setting>(xrefs.getNonNavigableInverseReferences(eObject).iterator()) {
+
+ @Override
+ protected EProblem convert(EStructuralFeature.Setting object) {
+ return object.getEStructuralFeature() == ProblemsPackage.Literals.EPROBLEM__ELEMENT ? (EProblem) object.getEObject() : null;
+ }
+ };
+ }
+
+ return result;
+ }
+
+ /**
+ * Obtains all of the problems tracked by this problems manager for the
+ * objects in the specified {@code resource}.
+ *
+ * @param resource
+ * an resource in the resource set scope for which I track
+ * problems
+ */
+ public Iterator<EProblem> getAllProblems(final Resource resource) {
+ Iterator<EProblem> result;
+
+ if (xrefs == null) {
+ // more efficient to iterate all problems and filter for those whose
+ // element is in the resource than to repeat iteration over the
+ // problems for each object in the resource
+ result = new Iterator<EProblem>() {
+
+ private final Iterator<EProblem> all = getAllProblems();
+
+ private EProblem next;
+
+ @Override
+ public boolean hasNext() {
+ if (next == null) {
+ while (all.hasNext()) {
+ EProblem couldBe = all.next();
+ if (couldBe.getElement().eResource() == resource) {
+ next = couldBe;
+ break;
+ }
+ }
+ }
+
+ return next != null;
+ }
+
+ @Override
+ public EProblem next() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+
+ EProblem result = next;
+ next = null;
+ return result;
+ }
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException("remove"); //$NON-NLS-1$
+ }
+ };
+ } else {
+ // concatenate iterators for all of the proper contents of the
+ // resource
+ result = new Iterator<EProblem>() {
+
+ private final Iterator<EObject> objects = EcoreUtil.getAllProperContents(resource, false);
+
+ private Iterator<EProblem> iterator = Collections.<EProblem> emptyList().iterator();
+
+ @Override
+ public boolean hasNext() {
+ while (!iterator.hasNext() && objects.hasNext()) {
+ iterator = getAllProblems(objects.next());
+ }
+
+ return iterator.hasNext();
+ }
+
+ @Override
+ public EProblem next() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+
+ return iterator.next();
+ }
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException("remove"); //$NON-NLS-1$
+ }
+ };
+ }
+
+ return result;
+ }
+
+ public boolean addProblem(EProblem problem) {
+ return problems.getProblems().add(problem);
+ }
+
+ public boolean addDiagnostic(Diagnostic diagnostic) {
+ return addDiagnostic(diagnostic, null);
+ }
+
+ public boolean addDiagnostic(Diagnostic diagnostic, String type) {
+ boolean result;
+
+ if (!diagnostic.getChildren().isEmpty()) {
+ // add the children
+ result = false;
+ for (Diagnostic next : diagnostic.getChildren()) {
+ result = addDiagnostic(next, type) || result;
+ }
+ } else {
+ EProblem problem = createProblem(diagnostic, type);
+ result = problem != null && addProblem(problem);
+ }
+
+ return result;
+ }
+
+ public void purgeProblems(EObject object) {
+ purgeProblems(Collections.singleton(object));
+ }
+
+ @SuppressWarnings("unchecked")
+ public void purgeProblems(Collection<? extends EObject> objects) {
+ purgeProblems((Iterator<? extends EObject>) EcoreUtil.getAllContents(objects));
+ }
+
+ public void purgeProblems(Resource resource) {
+ purgeProblems(EcoreUtil.<EObject> getAllProperContents(resource, false));
+ }
+
+ public void purgeAllProblems() {
+ for (EProblem next : problems.getProblems()) {
+ next.eAdapters().clear();
+ }
+ problems.getProblems().clear();
+ }
+
+ /**
+ * Disposes me. I remove any adapters I may have attached to any notifiers
+ * and purge my problems model. After invocation of this method, I can no
+ * longer be used.
+ */
+ public void dispose() {
+ if (problems != null) {
+ problems.eAdapters().clear();
+ for (Iterator<EObject> iter = problems.eAllContents(); iter.hasNext();) {
+ iter.next().eAdapters().clear();
+ }
+
+ problems = null;
+ }
+
+ Notifier target = adapter.getTarget();
+ if (target != null) {
+ target.eAdapters().remove(adapter);
+ }
+
+ listeners.clear();
+ }
+
+ protected EProblem createProblem() {
+ return ProblemsFactory.eINSTANCE.createEProblem();
+ }
+
+ void setCrossReferenceAdapter(ECrossReferenceAdapter adapter) {
+ if (adapter != xrefs) {
+ if (xrefs != null && problems != null) {
+ problems.eAdapters().remove(xrefs);
+ }
+
+ xrefs = adapter;
+
+ if (adapter != null && problems != null) {
+ problems.eAdapters().add(adapter);
+ }
+ }
+ }
+
+ private void purgeProblems(Iterator<? extends EObject> contents) {
+ List<EProblem> toRemove = new java.util.ArrayList<EProblem>();
+
+ while (contents.hasNext()) {
+ Iterator<EProblem> problems = getAllProblems(contents.next());
+ while (problems.hasNext()) {
+ toRemove.add(problems.next());
+ }
+ }
+
+ for (EProblem next : toRemove) {
+ next.eAdapters().clear();
+ }
+ problems.getProblems().removeAll(toRemove);
+ }
+
+ public static void delete(EProblem problem) {
+ EcoreUtil.remove(problem);
+ problem.setElement(null);
+ problem.eAdapters().clear();
+ }
+
+ public void addProblemsListener(ProblemsListener listener) {
+ listeners.addIfAbsent(listener);
+ }
+
+ public void removeProblemsListener(ProblemsListener listener) {
+ listeners.remove(listener);
+ }
+
+ protected void fireAdded(EProblem problem) {
+ if (!listeners.isEmpty()) {
+ ProblemsEvent event = new ProblemsEvent(this, ProblemsEvent.ADDED, problem);
+ for (ProblemsListener next : listeners) {
+ try {
+ next.problemAdded(event);
+ } catch (Exception e) {
+ ProblemsPlugin.INSTANCE.log(e);
+ }
+ }
+ }
+ }
+
+ protected void fireRemoved(EProblem problem) {
+ if (!listeners.isEmpty()) {
+ ProblemsEvent event = new ProblemsEvent(this, ProblemsEvent.REMOVED, problem);
+ for (ProblemsListener next : listeners) {
+ try {
+ next.problemRemoved(event);
+ } catch (Exception e) {
+ ProblemsPlugin.INSTANCE.log(e);
+ }
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ static class Custom extends ProblemsManager {
+
+ private final EClass customProblemClass;
+
+ public Custom(Notifier notifier, EClass customProblemClass) {
+ super(notifier);
+
+ if (!ProblemsPackage.Literals.EPROBLEM.isSuperTypeOf(customProblemClass)) {
+ throw new IllegalArgumentException("customProblemClass does not conform to EProblem"); //$NON-NLS-1$
+ }
+
+ this.customProblemClass = customProblemClass;
+ }
+
+ @Override
+ protected EProblem createProblem() {
+ return (EProblem) EcoreUtil.create(customProblemClass);
+ }
+ }
+
+ private class ManagerAdapter extends AdapterImpl implements EObservableAdapterList.Listener {
+
+ ProblemsManager getManager() {
+ return ProblemsManager.this;
+ }
+
+ @Override
+ public void setTarget(Notifier newTarget) {
+ super.setTarget(newTarget);
+
+ if (newTarget == null) {
+ // we've been unloaded. Unload the problems model
+ dispose();
+ }
+ }
+
+ @Override
+ public void added(Notifier notifier, Adapter adapter) {
+ if (adapter instanceof ECrossReferenceAdapter) {
+ setCrossReferenceAdapter((ECrossReferenceAdapter) adapter);
+ }
+ }
+
+ @Override
+ public void removed(Notifier notifier, Adapter adapter) {
+ if (adapter instanceof ECrossReferenceAdapter) {
+ setCrossReferenceAdapter(null);
+ }
+ }
+ }
+
+ private class ProblemsAdapter extends AdapterImpl {
+
+ @Override
+ public void notifyChanged(Notification msg) {
+ if (msg.getFeature() == ProblemsPackage.Literals.EPROBLEMS_CONTAINER__PROBLEMS) {
+ switch (msg.getEventType()) {
+ case Notification.ADD:
+ fireAdded((EProblem) msg.getNewValue());
+ break;
+ case Notification.ADD_MANY:
+ for (Object next : (Collection<?>) msg.getNewValue()) {
+ fireAdded((EProblem) next);
+ }
+ break;
+ case Notification.REMOVE:
+ fireRemoved((EProblem) msg.getOldValue());
+ break;
+ case Notification.REMOVE_MANY:
+ for (Object next : (Collection<?>) msg.getOldValue()) {
+ fireRemoved((EProblem) next);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ private static abstract class EProblemsIterator<E> implements Iterator<EProblem> {
+
+ private final Iterator<? extends E> delegate;
+
+ private EProblem preparedNext;
+
+ public EProblemsIterator(Iterator<? extends E> delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public boolean hasNext() {
+ if (preparedNext == null) {
+ while (delegate.hasNext()) {
+ EProblem problem = convert(delegate.next());
+ if (problem != null) {
+ preparedNext = problem;
+ break;
+ }
+ }
+ }
+
+ return preparedNext != null;
+ }
+
+ protected abstract EProblem convert(E object);
+
+ @Override
+ public EProblem next() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+
+ EProblem result = preparedNext;
+ preparedNext = null;
+ return result;
+ }
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException("remove"); //$NON-NLS-1$
+ }
+ }
+
+ private static class StatusWrapper implements IStatus {
+
+ static final IStatus[] NO_STATUSES = new IStatus[0];
+
+ private final EProblem problem;
+
+ StatusWrapper(EProblem problem) {
+ this.problem = problem;
+ }
+
+ @Override
+ public IStatus[] getChildren() {
+ return NO_STATUSES;
+ }
+
+ @Override
+ public int getCode() {
+ return problem.getCode();
+ }
+
+ @Override
+ public Throwable getException() {
+ return null;
+ }
+
+ @Override
+ public String getMessage() {
+ return problem.getMessage();
+ }
+
+ @Override
+ public String getPlugin() {
+ return problem.getSource();
+ }
+
+ @Override
+ public int getSeverity() {
+ return problem.getSeverity().getValue();
+ }
+
+ @Override
+ public boolean isMultiStatus() {
+ return false;
+ }
+
+ @Override
+ public boolean isOK() {
+ return getSeverity() == IStatus.OK;
+ }
+
+ @Override
+ public boolean matches(int severityMask) {
+ return (getSeverity() & severityMask) != 0;
+ }
+ }
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsSwitch.java b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsSwitch.java
new file mode 100755
index 00000000..0b955032
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.cdo.validation.problems/src/org/eclipse/papyrus/cdo/validation/problems/util/ProblemsSwitch.java
@@ -0,0 +1,178 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage
+ * @generated
+ */
+public class ProblemsSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ProblemsPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ProblemsSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ProblemsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ProblemsPackage.EPROBLEM: {
+ EProblem eProblem = (EProblem) theEObject;
+ T result = caseEProblem(eProblem);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ProblemsPackage.EPROBLEMS_CONTAINER: {
+ EProblemsContainer eProblemsContainer = (EProblemsContainer) theEObject;
+ T result = caseEProblemsContainer(eProblemsContainer);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ProblemsPackage.ATTRIBUTE: {
+ @SuppressWarnings("unchecked")
+ Map.Entry<String, String> attribute = (Map.Entry<String, String>) theEObject;
+ T result = caseAttribute(attribute);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EProblem</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EProblem</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEProblem(EProblem object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EProblems Container</em>'.
+ * <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate
+ * the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EProblems Container</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEProblemsContainer(EProblemsContainer object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Attribute</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Attribute</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAttribute(Map.Entry<String, String> object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // ProblemsSwitch
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.classpath b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.classpath
new file mode 100644
index 00000000..eca7bdba
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.project b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.project
new file mode 100644
index 00000000..0b30027f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.project
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.css.cdo</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.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.core.resources.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000..896a9a53
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8 \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.core.runtime.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 00000000..5a0ad22d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..1255b323
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,390 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=ignore
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.pde.api.tools.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 00000000..b2260f87
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..8dc66b77
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.2.1.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.cdo;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.e4.ui.css.core;bundle-version="[0.11.0,1.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="2.2.1",
+ org.eclipse.emf.cdo;bundle-version="4.6.0",
+ org.eclipse.emf.cdo.ecore;bundle-version="1.0.0",
+ org.eclipse.emf.cdo.gmf.notation;bundle-version="1.0.0"
+Import-Package: com.google.common.collect;version="21.0.0"
+Automatic-Module-Name: org.eclipse.papyrus.infra.gmfdiag.css.cdo
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.cdo;version="2.2.1",
+ org.eclipse.papyrus.infra.gmfdiag.css.cdo.factory;version="2.2.1",
+ org.eclipse.papyrus.infra.gmfdiag.css.cdo.notation;version="2.2.1"
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/Migrate gmfdiag.css to CDO.launch b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/Migrate gmfdiag.css to CDO.launch
new file mode 100644
index 00000000..8b191fbc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/Migrate gmfdiag.css to CDO.launch
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.papyrus.infra.gmfdiag.css.cdo&quot; type=&quot;4&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.infra.gmfdiag.css.cdo/migrate.ant"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.infra.gmfdiag.css.cdo"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.papyrus.infra.gmfdiag.css.cdo/migrate.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dgit.clone.papyrus=${git.clone.papyrus}"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/about.html b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/about.html
new file mode 100644
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/build.properties b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/build.properties
new file mode 100644
index 00000000..26318c40
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html,\
+ pom.xml
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/migrate.ant b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/migrate.ant
new file mode 100644
index 00000000..5c658402
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/migrate.ant
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+ Copyright (c) 2018 CEA LIST and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Eike Stepper - initial API and implementation
+-->
+<project name="migrate" default="migrate">
+
+ <fail unless="git.clone.papyrus" message="Property 'git.clone.papyrus' is undefined! Go to Preferences -> Run/Debug -> String Substitution..." />
+ <property name="source-package" value="org/eclipse/papyrus/infra/gmfdiag/css" />
+ <property name="source-project" location="${git.clone.papyrus}/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css" />
+ <property name="source" location="${source-project}/src/${source-package}" />
+ <echo message="Source: ${source}" />
+
+ <fail message="The 'basedir' property must point to the directory that contains this script!">
+ <condition>
+ <not>
+ <available file="${basedir}/migrate.ant" type="file" />
+ </not>
+ </condition>
+ </fail>
+ <property name="target" location="${basedir}/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo" />
+ <echo message="Target: ${target}" />
+
+ <target name="migrate">
+ <delete includeemptydirs="true">
+ <fileset dir="${target}">
+ <include name="**/*.java" />
+ </fileset>
+ </delete>
+ <copy todir="${target}">
+ <fileset dir="${source}">
+ <include name="*Impl.java" />
+ <include name="factory/*.java" />
+ <include name="notation/CSSDiagramImpl.java" />
+ </fileset>
+ <filterchain>
+ <replacestring from="package org.eclipse.papyrus.infra.gmfdiag.css" to="package org.eclipse.papyrus.infra.gmfdiag.css.cdo" />
+ <replacestring from="import org.eclipse.gmf.runtime.notation.impl." to="import org.eclipse.emf.cdo.gmf.notation.impl." />
+ </filterchain>
+ </copy>
+
+ <replace file="${target}/factory/CSSNotationFactory.java" token="import org.eclipse.papyrus.infra.gmfdiag.css." value="import org.eclipse.papyrus.infra.gmfdiag.css.cdo." />
+
+ <replace file="${target}/notation/CSSDiagramImpl.java" token="implements CSSDiagram," value="implements org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram," />
+ <replace file="${target}/notation/CSSDiagramImpl.java" token="CSSStyles" value="org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles" />
+ <replace file="${target}/notation/CSSDiagramImpl.java" token="ForceValueHelper" value="org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper" />
+ </target>
+
+</project>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/plugin.properties b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/plugin.properties
new file mode 100644
index 00000000..fe3b7d40
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/plugin.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.infra.gmfdiag.css
+pluginName = CSS Support for GMF (CDO Version)
+providerName = Eclipse Modeling Project
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/plugin.xml b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/plugin.xml
new file mode 100644
index 00000000..9f7232e9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/plugin.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension point="org.eclipse.emf.ecore.factory_override">
+ <factory
+ uri="http://www.eclipse.org/gmf/runtime/1.0.2/notation"
+ class="org.eclipse.papyrus.infra.gmfdiag.css.cdo.factory.CSSNotationFactory"
+ predecessor="org.eclipse.papyrus.infra.gmfdiag.css.factory.CSSNotationFactory" />
+ </extension>
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/pom.xml b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/pom.xml
new file mode 100644
index 00000000..0f671cb7
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.infra.gmfdiag.css.cdo</artifactId>
+ <version>2.2.1-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSArrowStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSArrowStyleImpl.java
new file mode 100644
index 00000000..c784a84c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSArrowStyleImpl.java
@@ -0,0 +1,151 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.gmf.runtime.notation.ArrowType;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.ArrowStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSArrowStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSArrowStyleDelegate;
+
+public class CSSArrowStyleImpl extends ArrowStyleImpl implements CSSArrowStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSArrowStyle arrowStyle;
+
+ protected CSSArrowStyle getArrowStyle() {
+ if (arrowStyle == null) {
+ arrowStyle = new CSSArrowStyleDelegate(this, getEngine());
+ }
+ return arrowStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public ArrowType getCSSArrowSource() {
+ ArrowType value = super.getArrowSource();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getArrowStyle_ArrowSource(), value)) {
+ return value;
+ } else {
+ return getArrowStyle().getCSSArrowSource();
+ }
+ }
+
+ @Override
+ public ArrowType getCSSArrowTarget() {
+ ArrowType value = super.getArrowTarget();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getArrowStyle_ArrowTarget(), value)) {
+ return value;
+ } else {
+ return getArrowStyle().getCSSArrowTarget();
+ }
+ }
+
+
+ @Override
+ public ArrowType getArrowSource() {
+ return getCSSArrowSource();
+ }
+
+ @Override
+ public ArrowType getArrowTarget() {
+ return getCSSArrowTarget();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setArrowSource(ArrowType value) {
+ ArrowType oldArrowSource = getArrowSource();
+
+ boolean deliver = eDeliver();
+ try {
+ // Do not rely on super implementation for sending the event. Just change the value.
+ eSetDeliver(false);
+ super.setArrowSource(value);
+ } finally {
+ eSetDeliver(deliver);
+ }
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getArrowStyle_ArrowSource();
+ ForceValueHelper.setValue(findView(), feature, value);
+
+ // Bug YYY YYY: Super implementation doesn't rely on "getArrowSource" and doesn't properly compute oldArrowSource
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, NotationPackage.ARROW_STYLE__ARROW_SOURCE, oldArrowSource, value));
+ }
+ }
+
+ @Override
+ public void setArrowTarget(ArrowType value) {
+ super.setArrowTarget(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getArrowStyle_ArrowTarget();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSBasicCompartmentImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSBasicCompartmentImpl.java
new file mode 100644
index 00000000..5f37cc9a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSBasicCompartmentImpl.java
@@ -0,0 +1,194 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.emf.cdo.gmf.notation.impl.BasicCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDrawerStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDrawerStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSBasicCompartmentImpl extends BasicCompartmentImpl implements CSSDrawerStyle, CSSView.Internal {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDrawerStyle drawerStyle;
+
+ private CSSView cssView;
+
+ protected CSSDrawerStyle getDrawerStyle() {
+ if (drawerStyle == null) {
+ drawerStyle = new CSSDrawerStyleDelegate(this, getEngine());
+ }
+ return drawerStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public boolean isCSSCollapsed() {
+ boolean value = super.isCollapsed();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getDrawerStyle_Collapsed(), value)) {
+ return value;
+ } else {
+ return getDrawerStyle().isCSSCollapsed();
+ }
+ }
+
+
+ @Override
+ public boolean isCollapsed() {
+ return isCSSCollapsed();
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setCollapsed(boolean value) {
+ super.setCollapsed(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDrawerStyle_Collapsed();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSBasicSemanticCompartmentImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSBasicSemanticCompartmentImpl.java
new file mode 100644
index 00000000..58164061
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSBasicSemanticCompartmentImpl.java
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.emf.cdo.gmf.notation.impl.BasicSemanticCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDrawerStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDrawerStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSBasicSemanticCompartmentImpl extends BasicSemanticCompartmentImpl implements CSSDrawerStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDrawerStyle drawerStyle;
+
+ private CSSView cssView;
+
+ protected CSSDrawerStyle getDrawerStyle() {
+ if (drawerStyle == null) {
+ drawerStyle = new CSSDrawerStyleDelegate(this, getEngine());
+ }
+ return drawerStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public boolean isCSSCollapsed() {
+ boolean value = super.isCollapsed();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getDrawerStyle_Collapsed(), value)) {
+ return value;
+ } else {
+ return getDrawerStyle().isCSSCollapsed();
+ }
+ }
+
+
+ @Override
+ public boolean isCollapsed() {
+ return isCSSCollapsed();
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setCollapsed(boolean value) {
+ super.setCollapsed(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDrawerStyle_Collapsed();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSCanonicalStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSCanonicalStyleImpl.java
new file mode 100644
index 00000000..2a390484
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSCanonicalStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.CanonicalStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSCanonicalStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSCanonicalStyleDelegate;
+
+public class CSSCanonicalStyleImpl extends CanonicalStyleImpl implements CSSCanonicalStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSCanonicalStyle canonicalStyle;
+
+ protected CSSCanonicalStyle getCanonicalStyle() {
+ if (canonicalStyle == null) {
+ canonicalStyle = new CSSCanonicalStyleDelegate(this, getEngine());
+ }
+ return canonicalStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public boolean isCSSCanonical() {
+ boolean value = super.isCanonical();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getCanonicalStyle_Canonical(), value)) {
+ return value;
+ } else {
+ return getCanonicalStyle().isCSSCanonical();
+ }
+ }
+
+
+ @Override
+ public boolean isCanonical() {
+ return isCSSCanonical();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setCanonical(boolean value) {
+ super.setCanonical(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getCanonicalStyle_Canonical();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSCompartmentImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSCompartmentImpl.java
new file mode 100644
index 00000000..a14e8a4f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSCompartmentImpl.java
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.emf.cdo.gmf.notation.impl.CompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDrawerStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDrawerStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSCompartmentImpl extends CompartmentImpl implements CSSDrawerStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDrawerStyle drawerStyle;
+
+ private CSSView cssView;
+
+ protected CSSDrawerStyle getDrawerStyle() {
+ if (drawerStyle == null) {
+ drawerStyle = new CSSDrawerStyleDelegate(this, getEngine());
+ }
+ return drawerStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public boolean isCSSCollapsed() {
+ boolean value = super.isCollapsed();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getDrawerStyle_Collapsed(), value)) {
+ return value;
+ } else {
+ return getDrawerStyle().isCSSCollapsed();
+ }
+ }
+
+
+ @Override
+ public boolean isCollapsed() {
+ return isCSSCollapsed();
+ }
+
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setCollapsed(boolean value) {
+ super.setCollapsed(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDrawerStyle_Collapsed();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setCanonical(boolean value) {
+ super.setCanonical(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getCanonicalStyle_Canonical();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setShowTitle(boolean value) {
+ super.setShowTitle(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getTitleStyle_ShowTitle();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSConnectorImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSConnectorImpl.java
new file mode 100644
index 00000000..34ce0024
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSConnectorImpl.java
@@ -0,0 +1,414 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.JumpLinkStatus;
+import org.eclipse.gmf.runtime.notation.JumpLinkType;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Routing;
+import org.eclipse.gmf.runtime.notation.Smoothness;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.emf.cdo.gmf.notation.impl.ConnectorImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSConnectorStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSConnectorStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSConnectorImpl extends ConnectorImpl implements CSSConnectorStyle, CSSView.Internal {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSConnectorStyle connectorStyle;
+
+ private CSSView cssView;
+
+ protected CSSConnectorStyle getConnectorStyle() {
+ if (connectorStyle == null) {
+ connectorStyle = new CSSConnectorStyleDelegate(this, getEngine());
+ }
+ return connectorStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSRoundedBendpointsRadius() {
+ int value = super.getRoundedBendpointsRadius();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSRoundedBendpointsRadius();
+ }
+ }
+
+ @Override
+ public Routing getCSSRouting() {
+ Routing value = super.getRouting();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSRouting();
+ }
+ }
+
+ @Override
+ public Smoothness getCSSSmoothness() {
+ Smoothness value = super.getSmoothness();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoutingStyle_Smoothness(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSSmoothness();
+ }
+ }
+
+ @Override
+ public boolean isCSSAvoidObstructions() {
+ boolean value = super.isAvoidObstructions();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoutingStyle_AvoidObstructions(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().isCSSAvoidObstructions();
+ }
+ }
+
+ @Override
+ public boolean isCSSClosestDistance() {
+ boolean value = super.isClosestDistance();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoutingStyle_ClosestDistance(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().isCSSClosestDistance();
+ }
+ }
+
+ @Override
+ public JumpLinkStatus getCSSJumpLinkStatus() {
+ JumpLinkStatus value = super.getJumpLinkStatus();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkStatus(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSJumpLinkStatus();
+ }
+ }
+
+ @Override
+ public JumpLinkType getCSSJumpLinkType() {
+ JumpLinkType value = super.getJumpLinkType();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkType(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSJumpLinkType();
+ }
+ }
+
+ @Override
+ public boolean isCSSJumpLinksReverse() {
+ boolean value = super.isJumpLinksReverse();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinksReverse(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().isCSSJumpLinksReverse();
+ }
+ }
+
+ @Override
+ public int getCSSLineColor() {
+ int value = super.getLineColor();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getLineStyle_LineColor(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSLineColor();
+ }
+ }
+
+ @Override
+ public int getCSSLineWidth() {
+ int value = super.getLineWidth();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getLineStyle_LineWidth(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSLineWidth();
+ }
+ }
+
+
+ @Override
+ public int getRoundedBendpointsRadius() {
+ return getCSSRoundedBendpointsRadius();
+ }
+
+ @Override
+ public Routing getRouting() {
+ return getCSSRouting();
+ }
+
+ @Override
+ public Smoothness getSmoothness() {
+ return getCSSSmoothness();
+ }
+
+ @Override
+ public boolean isAvoidObstructions() {
+ return isCSSAvoidObstructions();
+ }
+
+ @Override
+ public boolean isClosestDistance() {
+ return isCSSClosestDistance();
+ }
+
+ @Override
+ public JumpLinkStatus getJumpLinkStatus() {
+ return getCSSJumpLinkStatus();
+ }
+
+ @Override
+ public JumpLinkType getJumpLinkType() {
+ return getCSSJumpLinkType();
+ }
+
+ @Override
+ public boolean isJumpLinksReverse() {
+ return isCSSJumpLinksReverse();
+ }
+
+ @Override
+ public int getLineColor() {
+ return getCSSLineColor();
+ }
+
+ @Override
+ public int getLineWidth() {
+ return getCSSLineWidth();
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setRoundedBendpointsRadius(int value) {
+ super.setRoundedBendpointsRadius(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setRouting(Routing value) {
+ super.setRouting(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_Routing();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setSmoothness(Smoothness value) {
+ super.setSmoothness(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_Smoothness();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setAvoidObstructions(boolean value) {
+ super.setAvoidObstructions(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_AvoidObstructions();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setClosestDistance(boolean value) {
+ super.setClosestDistance(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_ClosestDistance();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setJumpLinkStatus(JumpLinkStatus value) {
+ super.setJumpLinkStatus(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkStatus();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setJumpLinkType(JumpLinkType value) {
+ super.setJumpLinkType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkType();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setJumpLinksReverse(boolean value) {
+ super.setJumpLinksReverse(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinksReverse();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setLineColor(int value) {
+ super.setLineColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineColor();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setLineWidth(int value) {
+ super.setLineWidth(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineWidth();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSConnectorStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSConnectorStyleImpl.java
new file mode 100644
index 00000000..e6b5aab4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSConnectorStyleImpl.java
@@ -0,0 +1,330 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.JumpLinkStatus;
+import org.eclipse.gmf.runtime.notation.JumpLinkType;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Routing;
+import org.eclipse.gmf.runtime.notation.Smoothness;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.ConnectorStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSConnectorStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSConnectorStyleDelegate;
+
+public class CSSConnectorStyleImpl extends ConnectorStyleImpl implements CSSConnectorStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSConnectorStyle connectorStyle;
+
+ protected CSSConnectorStyle getConnectorStyle() {
+ if (connectorStyle == null) {
+ connectorStyle = new CSSConnectorStyleDelegate(this, getEngine());
+ }
+ return connectorStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSRoundedBendpointsRadius() {
+ int value = super.getRoundedBendpointsRadius();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSRoundedBendpointsRadius();
+ }
+ }
+
+ @Override
+ public Routing getCSSRouting() {
+ Routing value = super.getRouting();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSRouting();
+ }
+ }
+
+ @Override
+ public Smoothness getCSSSmoothness() {
+ Smoothness value = super.getSmoothness();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_Smoothness(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSSmoothness();
+ }
+ }
+
+ @Override
+ public boolean isCSSAvoidObstructions() {
+ boolean value = super.isAvoidObstructions();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_AvoidObstructions(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().isCSSAvoidObstructions();
+ }
+ }
+
+ @Override
+ public boolean isCSSClosestDistance() {
+ boolean value = super.isClosestDistance();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_ClosestDistance(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().isCSSClosestDistance();
+ }
+ }
+
+ @Override
+ public JumpLinkStatus getCSSJumpLinkStatus() {
+ JumpLinkStatus value = super.getJumpLinkStatus();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkStatus(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSJumpLinkStatus();
+ }
+ }
+
+ @Override
+ public JumpLinkType getCSSJumpLinkType() {
+ JumpLinkType value = super.getJumpLinkType();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkType(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSJumpLinkType();
+ }
+ }
+
+ @Override
+ public boolean isCSSJumpLinksReverse() {
+ boolean value = super.isJumpLinksReverse();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinksReverse(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().isCSSJumpLinksReverse();
+ }
+ }
+
+ @Override
+ public int getCSSLineColor() {
+ int value = super.getLineColor();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getLineStyle_LineColor(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSLineColor();
+ }
+ }
+
+ @Override
+ public int getCSSLineWidth() {
+ int value = super.getLineWidth();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getLineStyle_LineWidth(), value)) {
+ return value;
+ } else {
+ return getConnectorStyle().getCSSLineWidth();
+ }
+ }
+
+
+ @Override
+ public int getRoundedBendpointsRadius() {
+ return getCSSRoundedBendpointsRadius();
+ }
+
+ @Override
+ public Routing getRouting() {
+ return getCSSRouting();
+ }
+
+ @Override
+ public Smoothness getSmoothness() {
+ return getCSSSmoothness();
+ }
+
+ @Override
+ public boolean isAvoidObstructions() {
+ return isCSSAvoidObstructions();
+ }
+
+ @Override
+ public boolean isClosestDistance() {
+ return isCSSClosestDistance();
+ }
+
+ @Override
+ public JumpLinkStatus getJumpLinkStatus() {
+ return getCSSJumpLinkStatus();
+ }
+
+ @Override
+ public JumpLinkType getJumpLinkType() {
+ return getCSSJumpLinkType();
+ }
+
+ @Override
+ public boolean isJumpLinksReverse() {
+ return isCSSJumpLinksReverse();
+ }
+
+ @Override
+ public int getLineColor() {
+ return getCSSLineColor();
+ }
+
+ @Override
+ public int getLineWidth() {
+ return getCSSLineWidth();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setRoundedBendpointsRadius(int value) {
+ super.setRoundedBendpointsRadius(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setRouting(Routing value) {
+ super.setRouting(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_Routing();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setSmoothness(Smoothness value) {
+ super.setSmoothness(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_Smoothness();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setAvoidObstructions(boolean value) {
+ super.setAvoidObstructions(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_AvoidObstructions();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setClosestDistance(boolean value) {
+ super.setClosestDistance(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_ClosestDistance();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setJumpLinkStatus(JumpLinkStatus value) {
+ super.setJumpLinkStatus(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkStatus();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setJumpLinkType(JumpLinkType value) {
+ super.setJumpLinkType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkType();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setJumpLinksReverse(boolean value) {
+ super.setJumpLinksReverse(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinksReverse();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setLineColor(int value) {
+ super.setLineColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineColor();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setLineWidth(int value) {
+ super.setLineWidth(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineWidth();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDataTypeStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDataTypeStyleImpl.java
new file mode 100644
index 00000000..9d2c8783
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDataTypeStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.DataTypeStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDataTypeStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDataTypeStyleDelegate;
+
+public class CSSDataTypeStyleImpl extends DataTypeStyleImpl implements CSSDataTypeStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDataTypeStyle dataTypeStyle;
+
+ protected CSSDataTypeStyle getDataTypeStyle() {
+ if (dataTypeStyle == null) {
+ dataTypeStyle = new CSSDataTypeStyleDelegate(this, getEngine());
+ }
+ return dataTypeStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public java.lang.String getCSSName() {
+ java.lang.String value = super.getName();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getNamedStyle_Name(), value)) {
+ return value;
+ } else {
+ return getDataTypeStyle().getCSSName();
+ }
+ }
+
+
+ @Override
+ public java.lang.String getName() {
+ return getCSSName();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setName(java.lang.String value) {
+ super.setName(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getNamedStyle_Name();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDecorationNodeImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDecorationNodeImpl.java
new file mode 100644
index 00000000..b78519a3
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDecorationNodeImpl.java
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.emf.cdo.gmf.notation.impl.DecorationNodeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+
+public class CSSDecorationNodeImpl extends DecorationNodeImpl implements CustomStyle, CSSView.Internal {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSView cssView;
+
+ private CustomStyle customStyle;
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CustomStyle getCustomStyle() {
+ if (customStyle == null) {
+ customStyle = new CSSCustomStyleDelegate(this, getEngine());
+ }
+ return customStyle;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+ // /////////////////////////////////
+ // Implements the custom styles //
+ // /////////////////////////////////
+
+ @Override
+ public boolean showElementIcon() {
+ return getCustomStyle().showElementIcon();
+ }
+
+ @Override
+ public int getQualifiedNameDepth() {
+ return getCustomStyle().getQualifiedNameDepth();
+ }
+
+ @Override
+ public boolean showShadow() {
+ return getCustomStyle().showShadow();
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDescriptionStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDescriptionStyleImpl.java
new file mode 100644
index 00000000..5439adbc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDescriptionStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.DescriptionStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDescriptionStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDescriptionStyleDelegate;
+
+public class CSSDescriptionStyleImpl extends DescriptionStyleImpl implements CSSDescriptionStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDescriptionStyle descriptionStyle;
+
+ protected CSSDescriptionStyle getDescriptionStyle() {
+ if (descriptionStyle == null) {
+ descriptionStyle = new CSSDescriptionStyleDelegate(this, getEngine());
+ }
+ return descriptionStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public java.lang.String getCSSDescription() {
+ java.lang.String value = super.getDescription();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getDescriptionStyle_Description(), value)) {
+ return value;
+ } else {
+ return getDescriptionStyle().getCSSDescription();
+ }
+ }
+
+
+ @Override
+ public java.lang.String getDescription() {
+ return getCSSDescription();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setDescription(java.lang.String value) {
+ super.setDescription(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDescriptionStyle_Description();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDiagramLinkStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDiagramLinkStyleImpl.java
new file mode 100644
index 00000000..adf09669
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDiagramLinkStyleImpl.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.DiagramLinkStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDiagramLinkStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDiagramLinkStyleDelegate;
+
+public class CSSDiagramLinkStyleImpl extends DiagramLinkStyleImpl implements CSSDiagramLinkStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDiagramLinkStyle diagramLinkStyle;
+
+ protected CSSDiagramLinkStyle getDiagramLinkStyle() {
+ if (diagramLinkStyle == null) {
+ diagramLinkStyle = new CSSDiagramLinkStyleDelegate(this, getEngine());
+ }
+ return diagramLinkStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDiagramStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDiagramStyleImpl.java
new file mode 100644
index 00000000..3dc575b4
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDiagramStyleImpl.java
@@ -0,0 +1,206 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.DiagramStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDiagramStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDiagramStyleDelegate;
+
+public class CSSDiagramStyleImpl extends DiagramStyleImpl implements CSSDiagramStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDiagramStyle diagramStyle;
+
+ protected CSSDiagramStyle getDiagramStyle() {
+ if (diagramStyle == null) {
+ diagramStyle = new CSSDiagramStyleDelegate(this, getEngine());
+ }
+ return diagramStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSPageX() {
+ int value = super.getPageX();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getPageStyle_PageX(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSPageX();
+ }
+ }
+
+ @Override
+ public int getCSSPageY() {
+ int value = super.getPageY();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getPageStyle_PageY(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSPageY();
+ }
+ }
+
+ @Override
+ public int getCSSPageWidth() {
+ int value = super.getPageWidth();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getPageStyle_PageWidth(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSPageWidth();
+ }
+ }
+
+ @Override
+ public int getCSSPageHeight() {
+ int value = super.getPageHeight();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getPageStyle_PageHeight(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSPageHeight();
+ }
+ }
+
+ @Override
+ public java.lang.String getCSSDescription() {
+ java.lang.String value = super.getDescription();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getDescriptionStyle_Description(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSDescription();
+ }
+ }
+
+
+ @Override
+ public int getPageX() {
+ return getCSSPageX();
+ }
+
+ @Override
+ public int getPageY() {
+ return getCSSPageY();
+ }
+
+ @Override
+ public int getPageWidth() {
+ return getCSSPageWidth();
+ }
+
+ @Override
+ public int getPageHeight() {
+ return getCSSPageHeight();
+ }
+
+ @Override
+ public java.lang.String getDescription() {
+ return getCSSDescription();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setPageX(int value) {
+ super.setPageX(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageX();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setPageY(int value) {
+ super.setPageY(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageY();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setPageWidth(int value) {
+ super.setPageWidth(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageWidth();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setPageHeight(int value) {
+ super.setPageHeight(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageHeight();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setDescription(java.lang.String value) {
+ super.setDescription(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDescriptionStyle_Description();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDrawerStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDrawerStyleImpl.java
new file mode 100644
index 00000000..2e97d4a9
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSDrawerStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.DrawerStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDrawerStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDrawerStyleDelegate;
+
+public class CSSDrawerStyleImpl extends DrawerStyleImpl implements CSSDrawerStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDrawerStyle drawerStyle;
+
+ protected CSSDrawerStyle getDrawerStyle() {
+ if (drawerStyle == null) {
+ drawerStyle = new CSSDrawerStyleDelegate(this, getEngine());
+ }
+ return drawerStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public boolean isCSSCollapsed() {
+ boolean value = super.isCollapsed();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getDrawerStyle_Collapsed(), value)) {
+ return value;
+ } else {
+ return getDrawerStyle().isCSSCollapsed();
+ }
+ }
+
+
+ @Override
+ public boolean isCollapsed() {
+ return isCSSCollapsed();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setCollapsed(boolean value) {
+ super.setCollapsed(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDrawerStyle_Collapsed();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSEdgeImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSEdgeImpl.java
new file mode 100644
index 00000000..45ecacfc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSEdgeImpl.java
@@ -0,0 +1,179 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.emf.cdo.gmf.notation.impl.EdgeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSEdgeImpl extends EdgeImpl implements CSSView.Internal, CustomStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSView cssView;
+
+ private CustomStyle customStyle;
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+ protected CustomStyle getCustomStyle() {
+ if (customStyle == null) {
+ customStyle = new CSSCustomStyleDelegate(this, getEngine());
+ }
+ return customStyle;
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the custom styles //
+ // /////////////////////////////////
+
+ @Override
+ public boolean showElementIcon() {
+ return getCustomStyle().showElementIcon();
+ }
+
+ @Override
+ public int getQualifiedNameDepth() {
+ return getCustomStyle().getQualifiedNameDepth();
+ }
+
+ @Override
+ public boolean showShadow() {
+ return getCustomStyle().showShadow();
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFillStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFillStyleImpl.java
new file mode 100644
index 00000000..46690f6f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFillStyleImpl.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.FillStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSFillStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSFillStyleDelegate;
+
+public class CSSFillStyleImpl extends FillStyleImpl implements CSSFillStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSFillStyle fillStyle;
+
+ protected CSSFillStyle getFillStyle() {
+ if (fillStyle == null) {
+ fillStyle = new CSSFillStyleDelegate(this, getEngine());
+ }
+ return fillStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSFillColor() {
+ int value = super.getFillColor();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFillStyle_FillColor(), value)) {
+ return value;
+ } else {
+ return getFillStyle().getCSSFillColor();
+ }
+ }
+
+ @Override
+ public int getCSSTransparency() {
+ int value = super.getTransparency();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFillStyle_Transparency(), value)) {
+ return value;
+ } else {
+ return getFillStyle().getCSSTransparency();
+ }
+ }
+
+ @Override
+ public org.eclipse.gmf.runtime.notation.datatype.GradientData getCSSGradient() {
+ org.eclipse.gmf.runtime.notation.datatype.GradientData value = super.getGradient();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFillStyle_Gradient(), value)) {
+ return value;
+ } else {
+ return getFillStyle().getCSSGradient();
+ }
+ }
+
+
+ @Override
+ public int getFillColor() {
+ return getCSSFillColor();
+ }
+
+ @Override
+ public int getTransparency() {
+ return getCSSTransparency();
+ }
+
+ @Override
+ public org.eclipse.gmf.runtime.notation.datatype.GradientData getGradient() {
+ return getCSSGradient();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setFillColor(int value) {
+ super.setFillColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_FillColor();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setTransparency(int value) {
+ super.setTransparency(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_Transparency();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setGradient(org.eclipse.gmf.runtime.notation.datatype.GradientData value) {
+ super.setGradient(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_Gradient();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFilteringStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFilteringStyleImpl.java
new file mode 100644
index 00000000..17e2c93a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFilteringStyleImpl.java
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.Filtering;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.FilteringStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSFilteringStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSFilteringStyleDelegate;
+
+public class CSSFilteringStyleImpl extends FilteringStyleImpl implements CSSFilteringStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSFilteringStyle filteringStyle;
+
+ protected CSSFilteringStyle getFilteringStyle() {
+ if (filteringStyle == null) {
+ filteringStyle = new CSSFilteringStyleDelegate(this, getEngine());
+ }
+ return filteringStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public Filtering getCSSFiltering() {
+ Filtering value = super.getFiltering();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFilteringStyle_Filtering(), value)) {
+ return value;
+ } else {
+ return getFilteringStyle().getCSSFiltering();
+ }
+ }
+
+ @Override
+ public java.util.List getCSSFilteringKeys() {
+ java.util.List value = super.getFilteringKeys();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFilteringStyle_FilteringKeys(), value)) {
+ return value;
+ } else {
+ return getFilteringStyle().getCSSFilteringKeys();
+ }
+ }
+
+
+ @Override
+ public Filtering getFiltering() {
+ return getCSSFiltering();
+ }
+
+ @Override
+ public java.util.List getFilteringKeys() {
+ return getCSSFilteringKeys();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setFiltering(Filtering value) {
+ super.setFiltering(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFilteringStyle_Filtering();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setFilteringKeys(java.util.List value) {
+ super.setFilteringKeys(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFilteringStyle_FilteringKeys();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFontStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFontStyleImpl.java
new file mode 100644
index 00000000..afd8a97f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSFontStyleImpl.java
@@ -0,0 +1,255 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.FontStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSFontStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSFontStyleDelegate;
+
+public class CSSFontStyleImpl extends FontStyleImpl implements CSSFontStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSFontStyle fontStyle;
+
+ protected CSSFontStyle getFontStyle() {
+ if (fontStyle == null) {
+ fontStyle = new CSSFontStyleDelegate(this, getEngine());
+ }
+ return fontStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSFontColor() {
+ int value = super.getFontColor();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_FontColor(), value)) {
+ return value;
+ } else {
+ return getFontStyle().getCSSFontColor();
+ }
+ }
+
+ @Override
+ public java.lang.String getCSSFontName() {
+ java.lang.String value = super.getFontName();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_FontName(), value)) {
+ return value;
+ } else {
+ return getFontStyle().getCSSFontName();
+ }
+ }
+
+ @Override
+ public int getCSSFontHeight() {
+ int value = super.getFontHeight();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_FontHeight(), value)) {
+ return value;
+ } else {
+ return getFontStyle().getCSSFontHeight();
+ }
+ }
+
+ @Override
+ public boolean isCSSBold() {
+ boolean value = super.isBold();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_Bold(), value)) {
+ return value;
+ } else {
+ return getFontStyle().isCSSBold();
+ }
+ }
+
+ @Override
+ public boolean isCSSItalic() {
+ boolean value = super.isItalic();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_Italic(), value)) {
+ return value;
+ } else {
+ return getFontStyle().isCSSItalic();
+ }
+ }
+
+ @Override
+ public boolean isCSSUnderline() {
+ boolean value = super.isUnderline();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_Underline(), value)) {
+ return value;
+ } else {
+ return getFontStyle().isCSSUnderline();
+ }
+ }
+
+ @Override
+ public boolean isCSSStrikeThrough() {
+ boolean value = super.isStrikeThrough();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_StrikeThrough(), value)) {
+ return value;
+ } else {
+ return getFontStyle().isCSSStrikeThrough();
+ }
+ }
+
+
+ @Override
+ public int getFontColor() {
+ // return super.getFontColor();
+ return getCSSFontColor();
+ }
+
+ @Override
+ public java.lang.String getFontName() {
+ return getCSSFontName();
+ }
+
+ @Override
+ public int getFontHeight() {
+ return getCSSFontHeight();
+ }
+
+ @Override
+ public boolean isBold() {
+ return isCSSBold();
+ }
+
+ @Override
+ public boolean isItalic() {
+ return isCSSItalic();
+ }
+
+ @Override
+ public boolean isUnderline() {
+ return isCSSUnderline();
+ }
+
+ @Override
+ public boolean isStrikeThrough() {
+ return isCSSStrikeThrough();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setFontColor(int value) {
+ super.setFontColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontColor();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setFontName(java.lang.String value) {
+ super.setFontName(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontName();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setFontHeight(int value) {
+ super.setFontHeight(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontHeight();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setBold(boolean value) {
+ super.setBold(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Bold();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setItalic(boolean value) {
+ super.setItalic(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Italic();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setUnderline(boolean value) {
+ super.setUnderline(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Underline();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setStrikeThrough(boolean value) {
+ super.setStrikeThrough(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_StrikeThrough();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSGuideStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSGuideStyleImpl.java
new file mode 100644
index 00000000..c6ecc85a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSGuideStyleImpl.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.GuideStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSGuideStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSGuideStyleDelegate;
+
+public class CSSGuideStyleImpl extends GuideStyleImpl implements CSSGuideStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSGuideStyle guideStyle;
+
+ protected CSSGuideStyle getGuideStyle() {
+ if (guideStyle == null) {
+ guideStyle = new CSSGuideStyleDelegate(this, getEngine());
+ }
+ return guideStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSHintedDiagramLinkStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSHintedDiagramLinkStyleImpl.java
new file mode 100644
index 00000000..c22a4d59
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSHintedDiagramLinkStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.HintedDiagramLinkStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSHintedDiagramLinkStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSHintedDiagramLinkStyleDelegate;
+
+public class CSSHintedDiagramLinkStyleImpl extends HintedDiagramLinkStyleImpl implements CSSHintedDiagramLinkStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSHintedDiagramLinkStyle hintedDiagramLinkStyle;
+
+ protected CSSHintedDiagramLinkStyle getHintedDiagramLinkStyle() {
+ if (hintedDiagramLinkStyle == null) {
+ hintedDiagramLinkStyle = new CSSHintedDiagramLinkStyleDelegate(this, getEngine());
+ }
+ return hintedDiagramLinkStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public java.lang.String getCSSHint() {
+ java.lang.String value = super.getHint();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getHintedDiagramLinkStyle_Hint(), value)) {
+ return value;
+ } else {
+ return getHintedDiagramLinkStyle().getCSSHint();
+ }
+ }
+
+
+ @Override
+ public java.lang.String getHint() {
+ return getCSSHint();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setHint(java.lang.String value) {
+ super.setHint(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getHintedDiagramLinkStyle_Hint();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSImageBufferStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSImageBufferStyleImpl.java
new file mode 100644
index 00000000..811b14dd
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSImageBufferStyleImpl.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.ImageBufferStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSImageBufferStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSImageBufferStyleDelegate;
+
+public class CSSImageBufferStyleImpl extends ImageBufferStyleImpl implements CSSImageBufferStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSImageBufferStyle imageBufferStyle;
+
+ protected CSSImageBufferStyle getImageBufferStyle() {
+ if (imageBufferStyle == null) {
+ imageBufferStyle = new CSSImageBufferStyleDelegate(this, getEngine());
+ }
+ return imageBufferStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public java.lang.Boolean getCSSAntiAlias() {
+ java.lang.Boolean value = super.getAntiAlias();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getImageStyle_AntiAlias(), value)) {
+ return value;
+ } else {
+ return getImageBufferStyle().getCSSAntiAlias();
+ }
+ }
+
+ @Override
+ public java.lang.Boolean getCSSMaintainAspectRatio() {
+ java.lang.Boolean value = super.getMaintainAspectRatio();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getImageStyle_MaintainAspectRatio(), value)) {
+ return value;
+ } else {
+ return getImageBufferStyle().getCSSMaintainAspectRatio();
+ }
+ }
+
+
+ @Override
+ public java.lang.Boolean getAntiAlias() {
+ return getCSSAntiAlias();
+ }
+
+ @Override
+ public java.lang.Boolean getMaintainAspectRatio() {
+ return getCSSMaintainAspectRatio();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setAntiAlias(java.lang.Boolean value) {
+ super.setAntiAlias(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getImageStyle_AntiAlias();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setMaintainAspectRatio(java.lang.Boolean value) {
+ super.setMaintainAspectRatio(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getImageStyle_MaintainAspectRatio();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSImageStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSImageStyleImpl.java
new file mode 100644
index 00000000..c05c515d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSImageStyleImpl.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.ImageStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSImageStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSImageStyleDelegate;
+
+public class CSSImageStyleImpl extends ImageStyleImpl implements CSSImageStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSImageStyle imageStyle;
+
+ protected CSSImageStyle getImageStyle() {
+ if (imageStyle == null) {
+ imageStyle = new CSSImageStyleDelegate(this, getEngine());
+ }
+ return imageStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public java.lang.Boolean getCSSAntiAlias() {
+ java.lang.Boolean value = super.getAntiAlias();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getImageStyle_AntiAlias(), value)) {
+ return value;
+ } else {
+ return getImageStyle().getCSSAntiAlias();
+ }
+ }
+
+ @Override
+ public java.lang.Boolean getCSSMaintainAspectRatio() {
+ java.lang.Boolean value = super.getMaintainAspectRatio();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getImageStyle_MaintainAspectRatio(), value)) {
+ return value;
+ } else {
+ return getImageStyle().getCSSMaintainAspectRatio();
+ }
+ }
+
+
+ @Override
+ public java.lang.Boolean getAntiAlias() {
+ return getCSSAntiAlias();
+ }
+
+ @Override
+ public java.lang.Boolean getMaintainAspectRatio() {
+ return getCSSMaintainAspectRatio();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setAntiAlias(java.lang.Boolean value) {
+ super.setAntiAlias(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getImageStyle_AntiAlias();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setMaintainAspectRatio(java.lang.Boolean value) {
+ super.setMaintainAspectRatio(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getImageStyle_MaintainAspectRatio();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSLineStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSLineStyleImpl.java
new file mode 100644
index 00000000..95dc1d55
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSLineStyleImpl.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.LineStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSLineStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSLineStyleDelegate;
+
+public class CSSLineStyleImpl extends LineStyleImpl implements CSSLineStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSLineStyle lineStyle;
+
+ protected CSSLineStyle getLineStyle() {
+ if (lineStyle == null) {
+ lineStyle = new CSSLineStyleDelegate(this, getEngine());
+ }
+ return lineStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSLineColor() {
+ int value = super.getLineColor();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getLineStyle_LineColor(), value)) {
+ return value;
+ } else {
+ return getLineStyle().getCSSLineColor();
+ }
+ }
+
+ @Override
+ public int getCSSLineWidth() {
+ int value = super.getLineWidth();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getLineStyle_LineWidth(), value)) {
+ return value;
+ } else {
+ return getLineStyle().getCSSLineWidth();
+ }
+ }
+
+
+ @Override
+ public int getLineColor() {
+ return getCSSLineColor();
+ }
+
+ @Override
+ public int getLineWidth() {
+ return getCSSLineWidth();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setLineColor(int value) {
+ super.setLineColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineColor();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setLineWidth(int value) {
+ super.setLineWidth(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineWidth();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSLineTypeStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSLineTypeStyleImpl.java
new file mode 100644
index 00000000..b961f816
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSLineTypeStyleImpl.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.LineType;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.LineTypeStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSLineTypeStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSLineTypeStyleDelegate;
+
+public class CSSLineTypeStyleImpl extends LineTypeStyleImpl implements CSSLineTypeStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSLineTypeStyle lineTypeStyle;
+
+ protected CSSLineTypeStyle getLineTypeStyle() {
+ if (lineTypeStyle == null) {
+ lineTypeStyle = new CSSLineTypeStyleDelegate(this, getEngine());
+ }
+ return lineTypeStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public LineType getCSSLineType() {
+ LineType value = super.getLineType();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getLineTypeStyle_LineType(), value)) {
+ return value;
+ } else {
+ return getLineTypeStyle().getCSSLineType();
+ }
+ }
+
+
+ @Override
+ public LineType getLineType() {
+ return getCSSLineType();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setLineType(LineType value) {
+ super.setLineType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineTypeStyle_LineType();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSListCompartmentImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSListCompartmentImpl.java
new file mode 100644
index 00000000..25c7bed7
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSListCompartmentImpl.java
@@ -0,0 +1,214 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.Filtering;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Sorting;
+import org.eclipse.emf.cdo.gmf.notation.impl.ListCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDrawerStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSTitleStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDrawerStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSTitleStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSListCompartmentImpl extends ListCompartmentImpl implements CSSDrawerStyle, CSSTitleStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDrawerStyle drawerStyle;
+
+ private CSSTitleStyle titleStyle;
+
+ private CSSView cssView;
+
+ protected CSSDrawerStyle getDrawerStyle() {
+ if (drawerStyle == null) {
+ drawerStyle = new CSSDrawerStyleDelegate(this, getEngine());
+ }
+ return drawerStyle;
+ }
+
+ protected CSSTitleStyle getTitleStyle() {
+ if (titleStyle == null) {
+ titleStyle = new CSSTitleStyleDelegate(this, getEngine());
+ }
+ return titleStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public boolean isCSSCollapsed() {
+ boolean value = super.isCollapsed();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getDrawerStyle_Collapsed(), value)) {
+ return value;
+ } else {
+ return getDrawerStyle().isCSSCollapsed();
+ }
+ }
+
+
+ @Override
+ public boolean isCollapsed() {
+ return isCSSCollapsed();
+ }
+
+ @Override
+ public boolean isCSSShowTitle() {
+ boolean value = super.isShowTitle();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getTitleStyle_ShowTitle(), value)) {
+ return value;
+ } else {
+ return getTitleStyle().isCSSShowTitle();
+ }
+ }
+
+ @Override
+ public boolean isShowTitle() {
+ return isCSSShowTitle();
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setCollapsed(boolean value) {
+ super.setCollapsed(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDrawerStyle_Collapsed();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setSorting(Sorting value) {
+ super.setSorting(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getSortingStyle_Sorting();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setSortingKeys(java.util.Map value) {
+ super.setSortingKeys(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getSortingStyle_SortingKeys();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setFiltering(Filtering value) {
+ super.setFiltering(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFilteringStyle_Filtering();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setFilteringKeys(java.util.List value) {
+ super.setFilteringKeys(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFilteringStyle_FilteringKeys();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setShowTitle(boolean value) {
+ super.setShowTitle(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getTitleStyle_ShowTitle();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSMultiDiagramLinkStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSMultiDiagramLinkStyleImpl.java
new file mode 100644
index 00000000..7bfc1108
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSMultiDiagramLinkStyleImpl.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.MultiDiagramLinkStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSMultiDiagramLinkStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSMultiDiagramLinkStyleDelegate;
+
+public class CSSMultiDiagramLinkStyleImpl extends MultiDiagramLinkStyleImpl implements CSSMultiDiagramLinkStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSMultiDiagramLinkStyle multiDiagramLinkStyle;
+
+ protected CSSMultiDiagramLinkStyle getMultiDiagramLinkStyle() {
+ if (multiDiagramLinkStyle == null) {
+ multiDiagramLinkStyle = new CSSMultiDiagramLinkStyleDelegate(this, getEngine());
+ }
+ return multiDiagramLinkStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSNamedStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSNamedStyleImpl.java
new file mode 100644
index 00000000..81c7d316
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSNamedStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.NamedStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSNamedStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSNamedStyleDelegate;
+
+public class CSSNamedStyleImpl extends NamedStyleImpl implements CSSNamedStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSNamedStyle namedStyle;
+
+ protected CSSNamedStyle getNamedStyle() {
+ if (namedStyle == null) {
+ namedStyle = new CSSNamedStyleDelegate(this, getEngine());
+ }
+ return namedStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public java.lang.String getCSSName() {
+ java.lang.String value = super.getName();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getNamedStyle_Name(), value)) {
+ return value;
+ } else {
+ return getNamedStyle().getCSSName();
+ }
+ }
+
+
+ @Override
+ public java.lang.String getName() {
+ return getCSSName();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setName(java.lang.String value) {
+ super.setName(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getNamedStyle_Name();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSNodeImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSNodeImpl.java
new file mode 100644
index 00000000..36059ba7
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSNodeImpl.java
@@ -0,0 +1,179 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.emf.cdo.gmf.notation.impl.NodeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSNodeImpl extends NodeImpl implements CSSView.Internal, CustomStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSView cssView;
+
+ private CustomStyle customStyle;
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+ protected CustomStyle getCustomStyle() {
+ if (customStyle == null) {
+ customStyle = new CSSCustomStyleDelegate(this, getEngine());
+ }
+ return customStyle;
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the custom styles //
+ // /////////////////////////////////
+
+ @Override
+ public boolean showElementIcon() {
+ return getCustomStyle().showElementIcon();
+ }
+
+ @Override
+ public int getQualifiedNameDepth() {
+ return getCustomStyle().getQualifiedNameDepth();
+ }
+
+ @Override
+ public boolean showShadow() {
+ return getCustomStyle().showShadow();
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSPageStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSPageStyleImpl.java
new file mode 100644
index 00000000..a589339e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSPageStyleImpl.java
@@ -0,0 +1,184 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.PageStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSPageStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSPageStyleDelegate;
+
+public class CSSPageStyleImpl extends PageStyleImpl implements CSSPageStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSPageStyle pageStyle;
+
+ protected CSSPageStyle getPageStyle() {
+ if (pageStyle == null) {
+ pageStyle = new CSSPageStyleDelegate(this, getEngine());
+ }
+ return pageStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSPageX() {
+ int value = super.getPageX();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getPageStyle_PageX(), value)) {
+ return value;
+ } else {
+ return getPageStyle().getCSSPageX();
+ }
+ }
+
+ @Override
+ public int getCSSPageY() {
+ int value = super.getPageY();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getPageStyle_PageY(), value)) {
+ return value;
+ } else {
+ return getPageStyle().getCSSPageY();
+ }
+ }
+
+ @Override
+ public int getCSSPageWidth() {
+ int value = super.getPageWidth();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getPageStyle_PageWidth(), value)) {
+ return value;
+ } else {
+ return getPageStyle().getCSSPageWidth();
+ }
+ }
+
+ @Override
+ public int getCSSPageHeight() {
+ int value = super.getPageHeight();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getPageStyle_PageHeight(), value)) {
+ return value;
+ } else {
+ return getPageStyle().getCSSPageHeight();
+ }
+ }
+
+
+ @Override
+ public int getPageX() {
+ // return super.getPageX();
+ return getCSSPageX();
+ }
+
+ @Override
+ public int getPageY() {
+ // return super.getPageY();
+ return getCSSPageY();
+ }
+
+ @Override
+ public int getPageWidth() {
+ return getCSSPageWidth();
+ }
+
+ @Override
+ public int getPageHeight() {
+ return getCSSPageHeight();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setPageX(int value) {
+ super.setPageX(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageX();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setPageY(int value) {
+ super.setPageY(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageY();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setPageWidth(int value) {
+ super.setPageWidth(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageWidth();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setPageHeight(int value) {
+ super.setPageHeight(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageHeight();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSPropertiesSetStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSPropertiesSetStyleImpl.java
new file mode 100644
index 00000000..98a679ea
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSPropertiesSetStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.PropertiesSetStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSPropertiesSetStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSPropertiesSetStyleDelegate;
+
+public class CSSPropertiesSetStyleImpl extends PropertiesSetStyleImpl implements CSSPropertiesSetStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSPropertiesSetStyle propertiesSetStyle;
+
+ protected CSSPropertiesSetStyle getPropertiesSetStyle() {
+ if (propertiesSetStyle == null) {
+ propertiesSetStyle = new CSSPropertiesSetStyleDelegate(this, getEngine());
+ }
+ return propertiesSetStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public java.lang.String getCSSName() {
+ java.lang.String value = super.getName();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getNamedStyle_Name(), value)) {
+ return value;
+ } else {
+ return getPropertiesSetStyle().getCSSName();
+ }
+ }
+
+
+ @Override
+ public java.lang.String getName() {
+ return getCSSName();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setName(java.lang.String value) {
+ super.setName(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getNamedStyle_Name();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSRoundedCornersStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSRoundedCornersStyleImpl.java
new file mode 100644
index 00000000..f99471dc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSRoundedCornersStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.RoundedCornersStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSRoundedCornersStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSRoundedCornersStyleDelegate;
+
+public class CSSRoundedCornersStyleImpl extends RoundedCornersStyleImpl implements CSSRoundedCornersStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSRoundedCornersStyle roundedCornersStyle;
+
+ protected CSSRoundedCornersStyle getRoundedCornersStyle() {
+ if (roundedCornersStyle == null) {
+ roundedCornersStyle = new CSSRoundedCornersStyleDelegate(this, getEngine());
+ }
+ return roundedCornersStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSRoundedBendpointsRadius() {
+ int value = super.getRoundedBendpointsRadius();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius(), value)) {
+ return value;
+ } else {
+ return getRoundedCornersStyle().getCSSRoundedBendpointsRadius();
+ }
+ }
+
+
+ @Override
+ public int getRoundedBendpointsRadius() {
+ return getCSSRoundedBendpointsRadius();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setRoundedBendpointsRadius(int value) {
+ super.setRoundedBendpointsRadius(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSRoutingStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSRoutingStyleImpl.java
new file mode 100644
index 00000000..fedc3c7c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSRoutingStyleImpl.java
@@ -0,0 +1,282 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.JumpLinkStatus;
+import org.eclipse.gmf.runtime.notation.JumpLinkType;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Routing;
+import org.eclipse.gmf.runtime.notation.Smoothness;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.RoutingStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSRoutingStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSRoutingStyleDelegate;
+
+public class CSSRoutingStyleImpl extends RoutingStyleImpl implements CSSRoutingStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSRoutingStyle routingStyle;
+
+ protected CSSRoutingStyle getRoutingStyle() {
+ if (routingStyle == null) {
+ routingStyle = new CSSRoutingStyleDelegate(this, getEngine());
+ }
+ return routingStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSRoundedBendpointsRadius() {
+ int value = super.getRoundedBendpointsRadius();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius(), value)) {
+ return value;
+ } else {
+ return getRoutingStyle().getCSSRoundedBendpointsRadius();
+ }
+ }
+
+ @Override
+ public Routing getCSSRouting() {
+ Routing value = super.getRouting();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), value)) {
+ return value;
+ } else {
+ return getRoutingStyle().getCSSRouting();
+ }
+ }
+
+ @Override
+ public Smoothness getCSSSmoothness() {
+ Smoothness value = super.getSmoothness();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_Smoothness(), value)) {
+ return value;
+ } else {
+ return getRoutingStyle().getCSSSmoothness();
+ }
+ }
+
+ @Override
+ public boolean isCSSAvoidObstructions() {
+ boolean value = super.isAvoidObstructions();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_AvoidObstructions(), value)) {
+ return value;
+ } else {
+ return getRoutingStyle().isCSSAvoidObstructions();
+ }
+ }
+
+ @Override
+ public boolean isCSSClosestDistance() {
+ boolean value = super.isClosestDistance();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_ClosestDistance(), value)) {
+ return value;
+ } else {
+ return getRoutingStyle().isCSSClosestDistance();
+ }
+ }
+
+ @Override
+ public JumpLinkStatus getCSSJumpLinkStatus() {
+ JumpLinkStatus value = super.getJumpLinkStatus();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkStatus(), value)) {
+ return value;
+ } else {
+ return getRoutingStyle().getCSSJumpLinkStatus();
+ }
+ }
+
+ @Override
+ public JumpLinkType getCSSJumpLinkType() {
+ JumpLinkType value = super.getJumpLinkType();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkType(), value)) {
+ return value;
+ } else {
+ return getRoutingStyle().getCSSJumpLinkType();
+ }
+ }
+
+ @Override
+ public boolean isCSSJumpLinksReverse() {
+ boolean value = super.isJumpLinksReverse();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoutingStyle_JumpLinksReverse(), value)) {
+ return value;
+ } else {
+ return getRoutingStyle().isCSSJumpLinksReverse();
+ }
+ }
+
+
+ @Override
+ public int getRoundedBendpointsRadius() {
+ return getCSSRoundedBendpointsRadius();
+ }
+
+ @Override
+ public Routing getRouting() {
+ return getCSSRouting();
+ }
+
+ @Override
+ public Smoothness getSmoothness() {
+ return getCSSSmoothness();
+ }
+
+ @Override
+ public boolean isAvoidObstructions() {
+ return isCSSAvoidObstructions();
+ }
+
+ @Override
+ public boolean isClosestDistance() {
+ return isCSSClosestDistance();
+ }
+
+ @Override
+ public JumpLinkStatus getJumpLinkStatus() {
+ return getCSSJumpLinkStatus();
+ }
+
+ @Override
+ public JumpLinkType getJumpLinkType() {
+ return getCSSJumpLinkType();
+ }
+
+ @Override
+ public boolean isJumpLinksReverse() {
+ return isCSSJumpLinksReverse();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setRoundedBendpointsRadius(int value) {
+ super.setRoundedBendpointsRadius(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setRouting(Routing value) {
+ super.setRouting(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_Routing();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setSmoothness(Smoothness value) {
+ super.setSmoothness(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_Smoothness();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setAvoidObstructions(boolean value) {
+ super.setAvoidObstructions(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_AvoidObstructions();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setClosestDistance(boolean value) {
+ super.setClosestDistance(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_ClosestDistance();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setJumpLinkStatus(JumpLinkStatus value) {
+ super.setJumpLinkStatus(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkStatus();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setJumpLinkType(JumpLinkType value) {
+ super.setJumpLinkType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinkType();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setJumpLinksReverse(boolean value) {
+ super.setJumpLinksReverse(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoutingStyle_JumpLinksReverse();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSSemanticListCompartmentImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSSemanticListCompartmentImpl.java
new file mode 100644
index 00000000..f2518a63
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSSemanticListCompartmentImpl.java
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.Filtering;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Sorting;
+import org.eclipse.emf.cdo.gmf.notation.impl.SemanticListCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDrawerStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDrawerStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSSemanticListCompartmentImpl extends SemanticListCompartmentImpl implements CSSDrawerStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDrawerStyle drawerStyle;
+
+ private CSSView cssView;
+
+ protected CSSDrawerStyle getDrawerStyle() {
+ if (drawerStyle == null) {
+ drawerStyle = new CSSDrawerStyleDelegate(this, getEngine());
+ }
+ return drawerStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public boolean isCSSCollapsed() {
+ boolean value = super.isCollapsed();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getDrawerStyle_Collapsed(), value)) {
+ return value;
+ } else {
+ return getDrawerStyle().isCSSCollapsed();
+ }
+ }
+
+
+ @Override
+ public boolean isCollapsed() {
+ return isCSSCollapsed();
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setCollapsed(boolean value) {
+ super.setCollapsed(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDrawerStyle_Collapsed();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setSorting(Sorting value) {
+ super.setSorting(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getSortingStyle_Sorting();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setSortingKeys(java.util.Map value) {
+ super.setSortingKeys(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getSortingStyle_SortingKeys();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setFiltering(Filtering value) {
+ super.setFiltering(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFilteringStyle_Filtering();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setFilteringKeys(java.util.List value) {
+ super.setFilteringKeys(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFilteringStyle_FilteringKeys();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setShowTitle(boolean value) {
+ super.setShowTitle(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getTitleStyle_ShowTitle();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSShapeImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSShapeImpl.java
new file mode 100644
index 00000000..6f1a7dfa
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSShapeImpl.java
@@ -0,0 +1,534 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 436665
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.emf.cdo.gmf.notation.impl.ShapeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSCustomStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSShapeStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSShapeStyleDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+
+public class CSSShapeImpl extends ShapeImpl implements CSSShapeStyle, CustomStyle, CSSView.Internal {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSShapeStyle shapeStyle;
+
+ private CSSView cssView;
+
+ private CustomStyle customStyle;
+
+ protected CSSShapeStyle getShapeStyle() {
+ if (shapeStyle == null) {
+ shapeStyle = new CSSShapeStyleDelegate(this, getEngine());
+ }
+ return shapeStyle;
+ }
+
+ protected CustomStyle getCustomStyle() {
+ if (customStyle == null) {
+ customStyle = new CSSCustomStyleDelegate(this, getEngine());
+ }
+ return customStyle;
+ }
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ @Override
+ public void resetCSS() {
+ cssView = null;
+ engine = null;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSFontColor() {
+ int value = super.getFontColor();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFontStyle_FontColor(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSFontColor();
+ }
+ }
+
+ @Override
+ public java.lang.String getCSSFontName() {
+ java.lang.String value = super.getFontName();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFontStyle_FontName(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSFontName();
+ }
+ }
+
+ @Override
+ public int getCSSFontHeight() {
+ int value = super.getFontHeight();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFontStyle_FontHeight(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSFontHeight();
+ }
+ }
+
+ @Override
+ public boolean isCSSBold() {
+ boolean value = super.isBold();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFontStyle_Bold(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().isCSSBold();
+ }
+ }
+
+ @Override
+ public boolean isCSSItalic() {
+ boolean value = super.isItalic();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFontStyle_Italic(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().isCSSItalic();
+ }
+ }
+
+ @Override
+ public boolean isCSSUnderline() {
+ boolean value = super.isUnderline();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFontStyle_Underline(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().isCSSUnderline();
+ }
+ }
+
+ @Override
+ public boolean isCSSStrikeThrough() {
+ boolean value = super.isStrikeThrough();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFontStyle_StrikeThrough(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().isCSSStrikeThrough();
+ }
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+ @Override
+ public java.lang.String getCSSDescription() {
+ java.lang.String value = super.getDescription();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getDescriptionStyle_Description(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSDescription();
+ }
+ }
+
+ @Override
+ public int getCSSFillColor() {
+ int value = super.getFillColor();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFillStyle_FillColor(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSFillColor();
+ }
+ }
+
+ @Override
+ public int getCSSTransparency() {
+ int value = super.getTransparency();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFillStyle_Transparency(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSTransparency();
+ }
+ }
+
+ @Override
+ public org.eclipse.gmf.runtime.notation.datatype.GradientData getCSSGradient() {
+ org.eclipse.gmf.runtime.notation.datatype.GradientData value = super.getGradient();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getFillStyle_Gradient(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSGradient();
+ }
+ }
+
+ @Override
+ public int getCSSLineColor() {
+ int value = super.getLineColor();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getLineStyle_LineColor(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSLineColor();
+ }
+ }
+
+ @Override
+ public int getCSSLineWidth() {
+ int value = super.getLineWidth();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getLineStyle_LineWidth(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSLineWidth();
+ }
+ }
+
+ @Override
+ public int getCSSRoundedBendpointsRadius() {
+ int value = super.getRoundedBendpointsRadius();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSRoundedBendpointsRadius();
+ }
+ }
+
+
+ @Override
+ public int getFontColor() {
+ return getCSSFontColor();
+ }
+
+ @Override
+ public java.lang.String getFontName() {
+ return getCSSFontName();
+ }
+
+ @Override
+ public int getFontHeight() {
+ return getCSSFontHeight();
+ }
+
+ @Override
+ public boolean isBold() {
+ return isCSSBold();
+ }
+
+ @Override
+ public boolean isItalic() {
+ return isCSSItalic();
+ }
+
+ @Override
+ public boolean isUnderline() {
+ return isCSSUnderline();
+ }
+
+ @Override
+ public boolean isStrikeThrough() {
+ return isCSSStrikeThrough();
+ }
+
+ @Override
+ public java.lang.String getDescription() {
+ return getCSSDescription();
+ }
+
+ @Override
+ public int getFillColor() {
+ return getCSSFillColor();
+ }
+
+ @Override
+ public int getTransparency() {
+ return getCSSTransparency();
+ }
+
+ @Override
+ public org.eclipse.gmf.runtime.notation.datatype.GradientData getGradient() {
+ return getCSSGradient();
+ }
+
+ @Override
+ public int getLineColor() {
+ return getCSSLineColor();
+ }
+
+ @Override
+ public int getLineWidth() {
+ return getCSSLineWidth();
+ }
+
+ @Override
+ public int getRoundedBendpointsRadius() {
+ return getCSSRoundedBendpointsRadius();
+ }
+
+ @Override
+ public boolean isVisible() {
+ return isCSSVisible();
+ }
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setFontColor(int value) {
+ super.setFontColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontColor();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setFontName(java.lang.String value) {
+ super.setFontName(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontName();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setFontHeight(int value) {
+ super.setFontHeight(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontHeight();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setBold(boolean value) {
+ super.setBold(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Bold();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setItalic(boolean value) {
+ super.setItalic(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Italic();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setUnderline(boolean value) {
+ super.setUnderline(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Underline();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setStrikeThrough(boolean value) {
+ super.setStrikeThrough(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_StrikeThrough();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setDescription(java.lang.String value) {
+ super.setDescription(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDescriptionStyle_Description();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setFillColor(int value) {
+ super.setFillColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_FillColor();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setTransparency(int value) {
+ super.setTransparency(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_Transparency();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setGradient(org.eclipse.gmf.runtime.notation.datatype.GradientData value) {
+ super.setGradient(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_Gradient();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setLineColor(int value) {
+ super.setLineColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineColor();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setLineWidth(int value) {
+ super.setLineWidth(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineWidth();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setRoundedBendpointsRadius(int value) {
+ super.setRoundedBendpointsRadius(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ if (feature != null) {
+ ForceValueHelper.unsetValue(this, feature);
+ }
+ }
+
+ // /////////////////////////////////
+ // Implements the custom styles //
+ // /////////////////////////////////
+
+ @Override
+ public boolean showElementIcon() {
+ return getCustomStyle().showElementIcon();
+ }
+
+ @Override
+ public int getQualifiedNameDepth() {
+ return getCustomStyle().getQualifiedNameDepth();
+ }
+
+ @Override
+ public boolean showShadow() {
+ return getCustomStyle().showShadow();
+ }
+
+ // ////////////////////////////////
+ // Implements the getNamedStyle //
+ // ////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSShapeStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSShapeStyleImpl.java
new file mode 100644
index 00000000..8c62995b
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSShapeStyleImpl.java
@@ -0,0 +1,424 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.ShapeStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSShapeStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSShapeStyleDelegate;
+
+public class CSSShapeStyleImpl extends ShapeStyleImpl implements CSSShapeStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSShapeStyle shapeStyle;
+
+ protected CSSShapeStyle getShapeStyle() {
+ if (shapeStyle == null) {
+ shapeStyle = new CSSShapeStyleDelegate(this, getEngine());
+ }
+ return shapeStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSFontColor() {
+ int value = super.getFontColor();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_FontColor(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSFontColor();
+ }
+ }
+
+ @Override
+ public java.lang.String getCSSFontName() {
+ java.lang.String value = super.getFontName();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_FontName(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSFontName();
+ }
+ }
+
+ @Override
+ public int getCSSFontHeight() {
+ int value = super.getFontHeight();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_FontHeight(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSFontHeight();
+ }
+ }
+
+ @Override
+ public boolean isCSSBold() {
+ boolean value = super.isBold();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_Bold(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().isCSSBold();
+ }
+ }
+
+ @Override
+ public boolean isCSSItalic() {
+ boolean value = super.isItalic();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_Italic(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().isCSSItalic();
+ }
+ }
+
+ @Override
+ public boolean isCSSUnderline() {
+ boolean value = super.isUnderline();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_Underline(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().isCSSUnderline();
+ }
+ }
+
+ @Override
+ public boolean isCSSStrikeThrough() {
+ boolean value = super.isStrikeThrough();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFontStyle_StrikeThrough(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().isCSSStrikeThrough();
+ }
+ }
+
+ @Override
+ public java.lang.String getCSSDescription() {
+ java.lang.String value = super.getDescription();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getDescriptionStyle_Description(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSDescription();
+ }
+ }
+
+ @Override
+ public int getCSSFillColor() {
+ int value = super.getFillColor();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFillStyle_FillColor(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSFillColor();
+ }
+ }
+
+ @Override
+ public int getCSSTransparency() {
+ int value = super.getTransparency();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFillStyle_Transparency(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSTransparency();
+ }
+ }
+
+ @Override
+ public org.eclipse.gmf.runtime.notation.datatype.GradientData getCSSGradient() {
+ org.eclipse.gmf.runtime.notation.datatype.GradientData value = super.getGradient();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getFillStyle_Gradient(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSGradient();
+ }
+ }
+
+ @Override
+ public int getCSSLineColor() {
+ int value = super.getLineColor();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getLineStyle_LineColor(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSLineColor();
+ }
+ }
+
+ @Override
+ public int getCSSLineWidth() {
+ int value = super.getLineWidth();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getLineStyle_LineWidth(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSLineWidth();
+ }
+ }
+
+ @Override
+ public int getCSSRoundedBendpointsRadius() {
+ int value = super.getRoundedBendpointsRadius();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius(), value)) {
+ return value;
+ } else {
+ return getShapeStyle().getCSSRoundedBendpointsRadius();
+ }
+ }
+
+
+ @Override
+ public int getFontColor() {
+ return getCSSFontColor();
+ }
+
+ @Override
+ public java.lang.String getFontName() {
+ return getCSSFontName();
+ }
+
+ @Override
+ public int getFontHeight() {
+ return getCSSFontHeight();
+ }
+
+ @Override
+ public boolean isBold() {
+ return isCSSBold();
+ }
+
+ @Override
+ public boolean isItalic() {
+ return isCSSItalic();
+ }
+
+ @Override
+ public boolean isUnderline() {
+ return isCSSUnderline();
+ }
+
+ @Override
+ public boolean isStrikeThrough() {
+ // return super.isStrikeThrough();
+ return isCSSStrikeThrough();
+ }
+
+ @Override
+ public java.lang.String getDescription() {
+ // return super.getDescription();
+ return getCSSDescription();
+ }
+
+ @Override
+ public int getFillColor() {
+ return getCSSFillColor();
+ }
+
+ @Override
+ public int getTransparency() {
+ return getCSSTransparency();
+ }
+
+ @Override
+ public org.eclipse.gmf.runtime.notation.datatype.GradientData getGradient() {
+ return getCSSGradient();
+ }
+
+ @Override
+ public int getLineColor() {
+ return getCSSLineColor();
+ }
+
+ @Override
+ public int getLineWidth() {
+ return getCSSLineWidth();
+ }
+
+ @Override
+ public int getRoundedBendpointsRadius() {
+ return getCSSRoundedBendpointsRadius();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setFontColor(int value) {
+ super.setFontColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontColor();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setFontName(java.lang.String value) {
+ super.setFontName(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontName();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setFontHeight(int value) {
+ super.setFontHeight(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_FontHeight();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setBold(boolean value) {
+ super.setBold(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Bold();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setItalic(boolean value) {
+ super.setItalic(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Italic();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setUnderline(boolean value) {
+ super.setUnderline(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_Underline();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setStrikeThrough(boolean value) {
+ super.setStrikeThrough(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFontStyle_StrikeThrough();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setDescription(java.lang.String value) {
+ super.setDescription(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDescriptionStyle_Description();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setFillColor(int value) {
+ super.setFillColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_FillColor();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setTransparency(int value) {
+ super.setTransparency(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_Transparency();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setGradient(org.eclipse.gmf.runtime.notation.datatype.GradientData value) {
+ super.setGradient(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getFillStyle_Gradient();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setLineColor(int value) {
+ super.setLineColor(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineColor();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setLineWidth(int value) {
+ super.setLineWidth(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getLineStyle_LineWidth();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setRoundedBendpointsRadius(int value) {
+ super.setRoundedBendpointsRadius(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSSortingStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSSortingStyleImpl.java
new file mode 100644
index 00000000..3c32b690
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSSortingStyleImpl.java
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Sorting;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.SortingStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSSortingStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSSortingStyleDelegate;
+
+public class CSSSortingStyleImpl extends SortingStyleImpl implements CSSSortingStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSSortingStyle sortingStyle;
+
+ protected CSSSortingStyle getSortingStyle() {
+ if (sortingStyle == null) {
+ sortingStyle = new CSSSortingStyleDelegate(this, getEngine());
+ }
+ return sortingStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public Sorting getCSSSorting() {
+ Sorting value = super.getSorting();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getSortingStyle_Sorting(), value)) {
+ return value;
+ } else {
+ return getSortingStyle().getCSSSorting();
+ }
+ }
+
+ @Override
+ public java.util.Map getCSSSortingKeys() {
+ java.util.Map value = super.getSortingKeys();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getSortingStyle_SortingKeys(), value)) {
+ return value;
+ } else {
+ return getSortingStyle().getCSSSortingKeys();
+ }
+ }
+
+
+ @Override
+ public Sorting getSorting() {
+ return getCSSSorting();
+ }
+
+ @Override
+ public java.util.Map getSortingKeys() {
+ return getCSSSortingKeys();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setSorting(Sorting value) {
+ super.setSorting(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getSortingStyle_Sorting();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ @Override
+ public void setSortingKeys(java.util.Map value) {
+ super.setSortingKeys(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getSortingStyle_SortingKeys();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSStandardDiagramImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSStandardDiagramImpl.java
new file mode 100644
index 00000000..2571846c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSStandardDiagramImpl.java
@@ -0,0 +1,232 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.emf.cdo.gmf.notation.impl.StandardDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSDiagramStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSDiagramStyleDelegate;
+
+public class CSSStandardDiagramImpl extends StandardDiagramImpl implements CSSDiagramStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSDiagramStyle diagramStyle;
+
+ protected CSSDiagramStyle getDiagramStyle() {
+ if (diagramStyle == null) {
+ diagramStyle = new CSSDiagramStyleDelegate(this, getEngine());
+ }
+ return diagramStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagramImpl) getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public int getCSSPageX() {
+ int value = super.getPageX();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getPageStyle_PageX(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSPageX();
+ }
+ }
+
+ @Override
+ public int getCSSPageY() {
+ int value = super.getPageY();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getPageStyle_PageY(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSPageY();
+ }
+ }
+
+ @Override
+ public int getCSSPageWidth() {
+ int value = super.getPageWidth();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getPageStyle_PageWidth(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSPageWidth();
+ }
+ }
+
+ @Override
+ public int getCSSPageHeight() {
+ int value = super.getPageHeight();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getPageStyle_PageHeight(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSPageHeight();
+ }
+ }
+
+ @Override
+ public java.lang.String getCSSDescription() {
+ java.lang.String value = super.getDescription();
+
+ if (ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getDescriptionStyle_Description(), value)) {
+ return value;
+ } else {
+ return getDiagramStyle().getCSSDescription();
+ }
+ }
+
+
+ @Override
+ public int getPageX() {
+ return getCSSPageX();
+ }
+
+ @Override
+ public int getPageY() {
+ return getCSSPageY();
+ }
+
+ @Override
+ public int getPageWidth() {
+ return getCSSPageWidth();
+ }
+
+ @Override
+ public int getPageHeight() {
+ return getCSSPageHeight();
+ }
+
+ @Override
+ public java.lang.String getDescription() {
+ return getCSSDescription();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setVisible(boolean value) {
+ super.setVisible(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Visible();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setType(java.lang.String value) {
+ super.setType(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Type();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMutable(boolean value) {
+ super.setMutable(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getView_Mutable();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setName(java.lang.String value) {
+ super.setName(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDiagram_Name();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setMeasurementUnit(MeasurementUnit value) {
+ super.setMeasurementUnit(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDiagram_MeasurementUnit();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setPageX(int value) {
+ super.setPageX(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageX();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setPageY(int value) {
+ super.setPageY(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageY();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setPageWidth(int value) {
+ super.setPageWidth(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageWidth();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setPageHeight(int value) {
+ super.setPageHeight(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getPageStyle_PageHeight();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ @Override
+ public void setDescription(java.lang.String value) {
+ super.setDescription(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getDescriptionStyle_Description();
+ ForceValueHelper.setValue(this, feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(this, feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSTextStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSTextStyleImpl.java
new file mode 100644
index 00000000..99d77615
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSTextStyleImpl.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.TextAlignment;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.TextStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSTextStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSTextStyleDelegate;
+
+public class CSSTextStyleImpl extends TextStyleImpl implements CSSTextStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSTextStyle textStyle;
+
+ protected CSSTextStyle getTextStyle() {
+ if (textStyle == null) {
+ textStyle = new CSSTextStyleDelegate(this, getEngine());
+ }
+ return textStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public TextAlignment getCSSTextAlignment() {
+ TextAlignment value = super.getTextAlignment();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getTextStyle_TextAlignment(), value)) {
+ return value;
+ } else {
+ return getTextStyle().getCSSTextAlignment();
+ }
+ }
+
+
+ @Override
+ public TextAlignment getTextAlignment() {
+ return getCSSTextAlignment();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setTextAlignment(TextAlignment value) {
+ super.setTextAlignment(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getTextStyle_TextAlignment();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSTitleStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSTitleStyleImpl.java
new file mode 100644
index 00000000..c241fec0
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/CSSTitleStyleImpl.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.emf.cdo.gmf.notation.impl.TitleStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSTitleStyle;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSTitleStyleDelegate;
+
+public class CSSTitleStyleImpl extends TitleStyleImpl implements CSSTitleStyle {
+
+ protected ExtendedCSSEngine engine;
+
+ private CSSTitleStyle titleStyle;
+
+ protected CSSTitleStyle getTitleStyle() {
+ if (titleStyle == null) {
+ titleStyle = new CSSTitleStyleDelegate(this, getEngine());
+ }
+ return titleStyle;
+ }
+
+ protected ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ engine = ((CSSDiagram) findView().getDiagram()).getEngine();
+ }
+ return engine;
+ }
+
+ protected View findView() {
+ EObject parent = eContainer();
+ while (!(parent instanceof View) && parent != null) {
+ parent = parent.eContainer();
+ }
+
+ if (parent != null) {
+ return (View) parent;
+ }
+
+ return null;
+ }
+
+
+ // ////////////////////////////////////////
+ // Forwards accesses to CSS properties //
+ // ////////////////////////////////////////
+
+
+ @Override
+ public boolean isCSSShowTitle() {
+ boolean value = super.isShowTitle();
+
+ if (ForceValueHelper.isSet(findView(), this, NotationPackage.eINSTANCE.getTitleStyle_ShowTitle(), value)) {
+ return value;
+ } else {
+ return getTitleStyle().isCSSShowTitle();
+ }
+ }
+
+
+ @Override
+ public boolean isShowTitle() {
+ return isCSSShowTitle();
+ }
+
+
+
+ // //////////////////////////////////////////////
+ // Implements a setter for each CSS property //
+ // //////////////////////////////////////////////
+
+ @Override
+ public void setShowTitle(boolean value) {
+ super.setShowTitle(value);
+
+ EStructuralFeature feature = NotationPackage.eINSTANCE.getTitleStyle_ShowTitle();
+ ForceValueHelper.setValue(findView(), feature, value);
+ }
+
+ // ////////////////////////////////
+ // Implements the unset method //
+ // ////////////////////////////////
+
+ @Override
+ public void eUnset(int featureId) {
+ super.eUnset(featureId);
+
+ EStructuralFeature feature = eClass().getEStructuralFeature(featureId);
+ ForceValueHelper.unsetValue(findView(), feature);
+ }
+
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/factory/CSSNotationFactory.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/factory/CSSNotationFactory.java
new file mode 100644
index 00000000..91ba311e
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/factory/CSSNotationFactory.java
@@ -0,0 +1,312 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo.factory;
+
+import org.eclipse.gmf.runtime.notation.ArrowStyle;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.BasicSemanticCompartment;
+import org.eclipse.gmf.runtime.notation.CanonicalStyle;
+import org.eclipse.gmf.runtime.notation.Compartment;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.ConnectorStyle;
+import org.eclipse.gmf.runtime.notation.DataTypeStyle;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.DescriptionStyle;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.DiagramLinkStyle;
+import org.eclipse.gmf.runtime.notation.DiagramStyle;
+import org.eclipse.gmf.runtime.notation.DrawerStyle;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.FillStyle;
+import org.eclipse.gmf.runtime.notation.FilteringStyle;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.GuideStyle;
+import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle;
+import org.eclipse.gmf.runtime.notation.ImageBufferStyle;
+import org.eclipse.gmf.runtime.notation.ImageStyle;
+import org.eclipse.gmf.runtime.notation.LineStyle;
+import org.eclipse.gmf.runtime.notation.LineTypeStyle;
+import org.eclipse.gmf.runtime.notation.ListCompartment;
+import org.eclipse.gmf.runtime.notation.MultiDiagramLinkStyle;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.PageStyle;
+import org.eclipse.gmf.runtime.notation.PropertiesSetStyle;
+import org.eclipse.gmf.runtime.notation.RoundedCornersStyle;
+import org.eclipse.gmf.runtime.notation.RoutingStyle;
+import org.eclipse.gmf.runtime.notation.SemanticListCompartment;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.ShapeStyle;
+import org.eclipse.gmf.runtime.notation.SortingStyle;
+import org.eclipse.gmf.runtime.notation.StandardDiagram;
+import org.eclipse.gmf.runtime.notation.TextStyle;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.emf.cdo.gmf.notation.impl.NotationFactoryImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSArrowStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSBasicCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSBasicSemanticCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSCanonicalStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSConnectorImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSConnectorStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSDataTypeStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSDecorationNodeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSDescriptionStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSDiagramLinkStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSDiagramStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSDrawerStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSEdgeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSFillStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSFilteringStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSFontStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSGuideStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSHintedDiagramLinkStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSImageBufferStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSImageStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSLineStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSLineTypeStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSListCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSMultiDiagramLinkStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSNamedStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSNodeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSPageStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSPropertiesSetStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSRoundedCornersStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSRoutingStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSSemanticListCompartmentImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSShapeImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSShapeStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSSortingStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSStandardDiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSTextStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.CSSTitleStyleImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.cdo.notation.CSSDiagramImpl;
+
+/**
+ * This factory overrides the GMF NotationFactory for implementing the Notation model
+ *
+ * It provides a CSS-Aware implementation of the Notation model.
+ *
+ * As the only way to use a custom Metamodel Factory is to replace the singleton instance, this factory may introduce
+ * noise for all GMF-based components. However, the CSS implementation of the Notation Metamodel is built in such a way
+ * that it doesn't introduce any behavioral change for non-CSS diagrams.
+ *
+ * The CSS Support must be explicitly installed on the ResourceSet in order to activate the CSS-Aware capabilities of
+ * this implementation.
+ *
+ * @see {@link org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper#installCSSSupport(org.eclipse.emf.ecore.resource.ResourceSet)}
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class CSSNotationFactory extends NotationFactoryImpl {
+
+ public static CSSNotationFactory eINSTANCE = new CSSNotationFactory();
+
+ @Override
+ public Diagram createDiagram() {
+ return new CSSDiagramImpl();
+ }
+
+ @Override
+ public FillStyle createFillStyle() {
+ return new CSSFillStyleImpl();
+ }
+
+ @Override
+ public LineStyle createLineStyle() {
+ return new CSSLineStyleImpl();
+ }
+
+ @Override
+ public FontStyle createFontStyle() {
+ return new CSSFontStyleImpl();
+ }
+
+ @Override
+ public TitleStyle createTitleStyle() {
+ return new CSSTitleStyleImpl();
+ }
+
+ @Override
+ public SortingStyle createSortingStyle() {
+ return new CSSSortingStyleImpl();
+ }
+
+ @Override
+ public DescriptionStyle createDescriptionStyle() {
+ return new CSSDescriptionStyleImpl();
+ }
+
+ @Override
+ public RoutingStyle createRoutingStyle() {
+ return new CSSRoutingStyleImpl();
+ }
+
+ @Override
+ public CanonicalStyle createCanonicalStyle() {
+ return new CSSCanonicalStyleImpl();
+ }
+
+ @Override
+ public ShapeStyle createShapeStyle() {
+ return new CSSShapeStyleImpl();
+ }
+
+ @Override
+ public ConnectorStyle createConnectorStyle() {
+ return new CSSConnectorStyleImpl();
+ }
+
+ @Override
+ public PageStyle createPageStyle() {
+ return new CSSPageStyleImpl();
+ }
+
+ @Override
+ public DrawerStyle createDrawerStyle() {
+ return new CSSDrawerStyleImpl();
+ }
+
+ @Override
+ public GuideStyle createGuideStyle() {
+ return new CSSGuideStyleImpl();
+ }
+
+ @Override
+ public FilteringStyle createFilteringStyle() {
+ return new CSSFilteringStyleImpl();
+ }
+
+ @Override
+ public DiagramStyle createDiagramStyle() {
+ return new CSSDiagramStyleImpl();
+ }
+
+ @Override
+ public ImageStyle createImageStyle() {
+ return new CSSImageStyleImpl();
+ }
+
+ @Override
+ public ImageBufferStyle createImageBufferStyle() {
+ return new CSSImageBufferStyleImpl();
+ }
+
+ @Override
+ public PropertiesSetStyle createPropertiesSetStyle() {
+ return new CSSPropertiesSetStyleImpl();
+ }
+
+ @Override
+ public NamedStyle createNamedStyle() {
+ return new CSSNamedStyleImpl();
+ }
+
+ @Override
+ public DataTypeStyle createDataTypeStyle() {
+ return new CSSDataTypeStyleImpl();
+ }
+
+ @Override
+ public HintedDiagramLinkStyle createHintedDiagramLinkStyle() {
+ return new CSSHintedDiagramLinkStyleImpl();
+ }
+
+ @Override
+ public DiagramLinkStyle createDiagramLinkStyle() {
+ return new CSSDiagramLinkStyleImpl();
+ }
+
+ @Override
+ public MultiDiagramLinkStyle createMultiDiagramLinkStyle() {
+ return new CSSMultiDiagramLinkStyleImpl();
+ }
+
+ @Override
+ public TextStyle createTextStyle() {
+ return new CSSTextStyleImpl();
+ }
+
+ @Override
+ public LineTypeStyle createLineTypeStyle() {
+ return new CSSLineTypeStyleImpl();
+ }
+
+ @Override
+ public ArrowStyle createArrowStyle() {
+ return new CSSArrowStyleImpl();
+ }
+
+ @Override
+ public Shape createShape() {
+ return new CSSShapeImpl();
+ }
+
+ @Override
+ public Compartment createCompartment() {
+ return new CSSCompartmentImpl();
+ }
+
+ @Override
+ public ListCompartment createListCompartment() {
+ return new CSSListCompartmentImpl();
+ }
+
+ @Override
+ public Connector createConnector() {
+ return new CSSConnectorImpl();
+ }
+
+ @Override
+ public StandardDiagram createStandardDiagram() {
+ return new CSSStandardDiagramImpl();
+ }
+
+ @Override
+ public BasicCompartment createBasicCompartment() {
+ return new CSSBasicCompartmentImpl();
+ }
+
+ @Override
+ public BasicSemanticCompartment createBasicSemanticCompartment() {
+ return new CSSBasicSemanticCompartmentImpl();
+ }
+
+ @Override
+ public SemanticListCompartment createSemanticListCompartment() {
+ return new CSSSemanticListCompartmentImpl();
+ }
+
+ @Override
+ public RoundedCornersStyle createRoundedCornersStyle() {
+ return new CSSRoundedCornersStyleImpl();
+ }
+
+ @Override
+ public DecorationNode createDecorationNode() {
+ return new CSSDecorationNodeImpl();
+ }
+
+ @Override
+ public Edge createEdge() {
+ return new CSSEdgeImpl();
+ }
+
+ @Override
+ public Node createNode() {
+ return new CSSNodeImpl();
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/notation/CSSDiagramImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/notation/CSSDiagramImpl.java
new file mode 100644
index 00000000..1c15e22a
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.css.cdo/src/org/eclipse/papyrus/infra/gmfdiag/css/cdo/notation/CSSDiagramImpl.java
@@ -0,0 +1,193 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - support adapter instead of custom resource impl for CSS (CDO)
+ * Christian W. Damus - bugs 433206, 464443, 436665
+ * Camille Letavernier (EclipseSource) - Bug 519412
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.cdo.notation;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.notation.EObjectListValueStyle;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.emf.cdo.gmf.notation.impl.DiagramImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.DiagramCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ViewpointCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.CSSView;
+import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
+
+/**
+ * Default implementation for CSSDiagram
+ *
+ * @author Camille letavernier
+ */
+@SuppressWarnings("restriction")
+public class CSSDiagramImpl extends DiagramImpl implements org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram, CSSView.Internal {
+
+ protected ExtendedCSSEngine engine;
+ private ExtendedCSSEngine viewpointEngine;
+
+ private CSSView cssView;
+
+ @Override
+ public ExtendedCSSEngine getEngine() {
+ if (engine == null) {
+ ExtendedCSSEngine modelEngine = getModelEngine();
+ viewpointEngine = new ViewpointCSSEngine(modelEngine, this);
+ engine = new DiagramCSSEngine(viewpointEngine, this);
+ }
+ return engine;
+ }
+
+ @Override
+ public void resetCSS() {
+ if (engine != null) {
+ cssView = null;
+
+ engine.dispose();
+ engine = null;
+ viewpointEngine.dispose();
+ viewpointEngine = null;
+
+ // And walk our contents to make all views forget their engine
+ eAllContents().forEachRemaining(o -> {
+ if (o instanceof CSSView.Internal) {
+ ((CSSView.Internal) o).resetCSS();
+ }
+ });
+ }
+ }
+
+ @Override
+ protected void eSetDirectResource(Resource.Internal resource) {
+ Resource.Internal oldResource = eInternalResource();
+
+ super.eSetDirectResource(resource);
+
+ if (oldResource != resource) {
+ // My engine is now invalid because my resource is different than before,
+ // which makes its parent engine is obsolete
+ resetCSS();
+ }
+ }
+
+ protected ExtendedCSSEngine getModelEngine() {
+ Resource resource = eResource();
+ return (resource == null) ? null : CSSNotationResource.getEngine(resource);
+ }
+
+ @Override
+ public List<StyleSheet> getStyleSheets() {
+ List<StyleSheet> result = new LinkedList<StyleSheet>();
+
+ for (Object styleObject : getStyles()) {
+ if (styleObject instanceof NamedStyle) {
+
+ NamedStyle style = (NamedStyle) styleObject;
+
+ if (org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(style.getName())) {
+ if (style instanceof EObjectListValueStyle) {
+
+ EObjectListValueStyle stylesheetsStyle = (EObjectListValueStyle) style;
+
+ for (Object eObjectValue : stylesheetsStyle.getEObjectListValue()) {
+ if (eObjectValue instanceof StyleSheet) {
+ result.add((StyleSheet) eObjectValue);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+
+
+ protected CSSView getCSSView() {
+ if (cssView == null) {
+ cssView = new CSSViewDelegate(this, getEngine());
+ }
+ return cssView;
+ }
+
+ // //////////////////////////////////
+ // Implements the isVisible method //
+ // //////////////////////////////////
+
+ @Override
+ public boolean isVisible() {
+ // return super.isVisible();
+ return isCSSVisible();
+ }
+
+ @Override
+ public boolean isCSSVisible() {
+ boolean value = super.isVisible();
+
+ if (org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper.isSet(this, NotationPackage.eINSTANCE.getView_Visible(), value)) {
+ return value;
+ } else {
+ return getCSSView().isCSSVisible();
+ }
+ }
+
+ // //////////////////////////////////////
+ // Implements the getNamedStyle method //
+ // //////////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ @Override
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
+ // /////////////////////////////////
+ // Implements the getStyle method //
+ // /////////////////////////////////
+
+ @Override
+ public Style getStyle(EClass eClass) {
+ return getCSSStyle(eClass);
+ }
+
+ @Override
+ public Style getCSSStyle(EClass eClass) {
+ Style userStyle = super.getStyle(eClass);
+ if (userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSStyle(eClass);
+ }
+
+}
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.classpath b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.classpath
new file mode 100644
index 00000000..26e67d64
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.project b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.project
new file mode 100644
index 00000000..7b6f238c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.project
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.style.cdo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <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.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+ <filteredResources>
+ <filter>
+ <id>1396938000000</id>
+ <name></name>
+ <type>10</type>
+ <matcher>
+ <id>org.eclipse.ui.ide.multiFilter</id>
+ <arguments>1.0-projectRelativePath-matches-true-false-target</arguments>
+ </matcher>
+ </filter>
+ </filteredResources>
+</projectDescription>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.core.resources.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000..896a9a53
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8 \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.core.runtime.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 00000000..5a0ad22d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.jdt.core.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..8ddd9a88
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,296 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.jdt.ui.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.pde.api.tools.prefs b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 00000000..b2260f87
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/META-INF/MANIFEST.MF b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..691dfc3d
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.style.cdo;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl;version="1.0.0"
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.cdo;bundle-version="[4.6.0,5.0.0)"
+Bundle-ActivationPolicy: lazy
+Automatic-Module-Name: org.eclipse.papyrus.infra.gmfdiag.style.cdo
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/Migrate gmfdiag.style to CDO.launch b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/Migrate gmfdiag.style to CDO.launch
new file mode 100644
index 00000000..2654f4cc
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/Migrate gmfdiag.style to CDO.launch
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.papyrus.infra.gmfdiag.style&quot; type=&quot;4&quot;/&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.papyrus.infra.gmfdiag.style.cdo&quot; type=&quot;4&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.infra.gmfdiag.style.cdo/migrate.ant"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.infra.gmfdiag.style.cdo"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.papyrus.infra.gmfdiag.style.cdo/migrate.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dgit.clone.papyrus=${git.clone.papyrus}"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/about.html b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/about.html
new file mode 100644
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/build.properties b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/build.properties
new file mode 100644
index 00000000..32c48dd6
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/build.properties
@@ -0,0 +1,25 @@
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+#
+#
+
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
+src.includes = Migrate gmfdiag.style to CDO.launch,\
+ migrate.ant,\
+ pom.xml
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/migrate.ant b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/migrate.ant
new file mode 100644
index 00000000..4ff28572
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/migrate.ant
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<!--
+ Copyright (c) 2018 CEA LIST and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Eike Stepper - initial API and implementation
+-->
+<project name="migrate" default="migrate">
+
+ <!--
+ The migration of the Style model to CDO is completely automated.
+ The 'org.eclipse.emf.cdo.migrator' plugin must be installed into the Eclipse IDE!!!
+
+ Then execute the following tasks:
+ -->
+ <fail unless="git.clone.papyrus" message="Property 'git.clone.papyrus' is undefined! Go to Preferences -> Run/Debug -> String Substitution..." />
+ <property name="project.name" value="org.eclipse.papyrus.infra.gmfdiag.style" />
+ <property name="style" location="${git.clone.papyrus}/plugins/infra/gmfdiag/${project.name}" />
+ <fail message="The directory '${style}' does not exist!">
+ <condition>
+ <not>
+ <available file="${style}" type="dir" />
+ </not>
+ </condition>
+ </fail>
+
+ <property name="style.tmp" location="${basedir}/target/${project.name}" />
+ <echo message="Source: ${style}" />
+ <echo message="Temp: ${style.tmp}" />
+ <echo message="Target: ${basedir}" />
+
+ <target name="migrate">
+ <!--
+ Copy the entire 'org.eclipse.papyrus.infra.gmfdiag.style' project
+ into the 'target' folder of the 'org.eclipse.papyrus.infra.gmfdiag.style.cdo' plugin to
+ be able to revert the changes that are applied below.
+ -->
+ <echo message="Backing up project ${project.name} to ${style.tmp}" />
+ <delete failonerror="false" includeemptydirs="true">
+ <fileset dir="${style.tmp}">
+ <include name="**" />
+ </fileset>
+ </delete>
+ <copy todir="${style.tmp}" verbose="false" failonerror="true" overwrite="true" includeemptydirs="true" preservelastmodified="true">
+ <fileset dir="${style}" defaultexcludes="true">
+ <include name="**/*" />
+ </fileset>
+ </copy>
+
+ <!--
+ Migrate the 'style.genmodel' to CDO and regenerate the model in-place.
+ -->
+ <property name="model.path" value="/${project.name}/model/style.genmodel" />
+ <echo message="Migrating ${model.path} in ${style} ..." />
+ <cdo.migrateModel modelpath="${model.path}" dynamicfeaturedelegation="true" />
+ <cdo.generateModel modelpath="${model.path}" />
+
+ <!--
+ Copy all Java files from the generated 'impl' folder to the 'impl' folder of the
+ 'org.eclipse.papyrus.infra.gmfdiag.style.cdo' project. Apply the following refactorings:
+
+ 1. Rename the Java package to 'org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl'.
+ 2. Replace the eAnnotations field accesses that the generator has left in some
+ eIsSet() methods with calls to the getEAnnotations() method.
+ -->
+ <property name="impl" location="${basedir}/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl" />
+ <delete>
+ <fileset dir="${impl}">
+ <include name="*.java" />
+ </fileset>
+ </delete>
+ <copy todir="${impl}" verbose="true">
+ <fileset dir="${style}/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl">
+ <include name="*.java" />
+ <exclude name="StylePackageImpl.java" />
+ </fileset>
+ <filterchain>
+ <replacestring from="${project.name}.impl" to="${project.name}.cdo.impl" />
+ <replacestring from="eAnnotations != null &amp;&amp; !eAnnotations.isEmpty()" to="!getEAnnotations().isEmpty()" />
+ </filterchain>
+ </copy>
+
+ <!--
+ Apply source cleanup to the 'org.eclipse.papyrus.infra.gmfdiag.style.cdo' project.
+ This ensures that only relevant changes appear in the Git history.
+ -->
+ <cdo.cleanupProject projectname="${project.name}.cdo" />
+
+ <!--
+ Copy the entire 'org.eclipse.papyrus.infra.gmfdiag.style' project back
+ from the 'target' folder of the 'org.eclipse.papyrus.infra.gmfdiag.style.cdo' plugin.
+ -->
+ <echo message="Restoring project ${project.name} from ${style.tmp}" />
+ <delete failonerror="true" includeemptydirs="true">
+ <fileset dir="${style}">
+ <include name="**" />
+ </fileset>
+ </delete>
+ <copy todir="${style}" verbose="false" failonerror="true" overwrite="true" includeemptydirs="true" preservelastmodified="true">
+ <fileset dir="${style.tmp}" defaultexcludes="true">
+ <include name="**/*" />
+ </fileset>
+ </copy>
+ </target>
+
+</project>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/plugin.properties b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/plugin.properties
new file mode 100644
index 00000000..55c0124c
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/plugin.properties
@@ -0,0 +1,16 @@
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+#
+#
+
+pluginName = GMF Style Model (CDO Version)
+providerName = Eclipse Modeling Project
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/plugin.xml b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/plugin.xml
new file mode 100644
index 00000000..7dcb7664
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2018 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Eike Stepper - Initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.factory_override">
+ <factory
+ class="org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl.StyleFactoryImpl"
+ uri="http://www.eclipse.org/papyrus/infra/gmfdiag/style">
+ </factory>
+ </extension>
+
+</plugin>
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/pom.xml b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/pom.xml
new file mode 100644
index 00000000..7d1d6c0f
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/pom.xml
@@ -0,0 +1,13 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.infra.gmfdiag.style.cdo</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl/PapyrusDiagramStyleImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl/PapyrusDiagramStyleImpl.java
new file mode 100644
index 00000000..01e29698
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl/PapyrusDiagramStyleImpl.java
@@ -0,0 +1,198 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle;
+import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Diagram Style</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl.PapyrusDiagramStyleImpl#getOwner <em>Owner</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl.PapyrusDiagramStyleImpl#getDiagramKindId <em>Diagram Kind Id</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class PapyrusDiagramStyleImpl extends CDOObjectImpl implements PapyrusDiagramStyle {
+ /**
+ * The default value of the '{@link #getDiagramKindId() <em>Diagram Kind Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDiagramKindId()
+ * @generated
+ * @ordered
+ */
+ protected static final String DIAGRAM_KIND_ID_EDEFAULT = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusDiagramStyleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount() {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject getOwner() {
+ return (EObject)eDynamicGet(StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER, true, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetOwner() {
+ return (EObject)eDynamicGet(StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER, false, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setOwner(EObject newOwner) {
+ eDynamicSet(StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER, newOwner);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getDiagramKindId() {
+ return (String)eDynamicGet(StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID, true, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setDiagramKindId(String newDiagramKindId) {
+ eDynamicSet(StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID, newDiagramKindId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER:
+ if (resolve) {
+ return getOwner();
+ }
+ return basicGetOwner();
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID:
+ return getDiagramKindId();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER:
+ setOwner((EObject)newValue);
+ return;
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID:
+ setDiagramKindId((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER:
+ setOwner((EObject)null);
+ return;
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID:
+ setDiagramKindId(DIAGRAM_KIND_ID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER:
+ return basicGetOwner() != null;
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID:
+ return DIAGRAM_KIND_ID_EDEFAULT == null ? getDiagramKindId() != null : !DIAGRAM_KIND_ID_EDEFAULT.equals(getDiagramKindId());
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PapyrusDiagramStyleImpl
diff --git a/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl/StyleFactoryImpl.java b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl/StyleFactoryImpl.java
new file mode 100644
index 00000000..26a6c395
--- /dev/null
+++ b/cdo/bundles/org.eclipse.papyrus.infra.gmfdiag.style.cdo/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/cdo/impl/StyleFactoryImpl.java
@@ -0,0 +1,109 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.infra.gmfdiag.style.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StyleFactoryImpl extends EFactoryImpl implements StyleFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static StyleFactory init() {
+ try {
+ StyleFactory theStyleFactory = (StyleFactory)EPackage.Registry.INSTANCE.getEFactory(StylePackage.eNS_URI);
+ if (theStyleFactory != null) {
+ return theStyleFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new StyleFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE: return createPapyrusDiagramStyle();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public PapyrusDiagramStyle createPapyrusDiagramStyle() {
+ PapyrusDiagramStyleImpl papyrusDiagramStyle = new PapyrusDiagramStyleImpl();
+ return papyrusDiagramStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public StylePackage getStylePackage() {
+ return (StylePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static StylePackage getPackage() {
+ return StylePackage.eINSTANCE;
+ }
+
+} //StyleFactoryImpl
diff --git a/cdo/bundles/pom.xml b/cdo/bundles/pom.xml
new file mode 100755
index 00000000..3326adb8
--- /dev/null
+++ b/cdo/bundles/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo.root</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM (aggregator) -->
+ <artifactId>org.eclipse.papyrus.cdo-bundles</artifactId>
+ <packaging>pom</packaging>
+
+ <!-- Children modules to build -->
+ <modules>
+ <module>org.eclipse.papyrus.cdo.core</module>
+ <module>org.eclipse.papyrus.cdo.ui</module>
+ <module>org.eclipse.papyrus.cdo.ui.customization.properties</module>
+ <module>org.eclipse.papyrus.cdo.ui.hyperlink</module>
+ <module>org.eclipse.papyrus.cdo.uml.diagram.ui</module>
+ <module>org.eclipse.papyrus.cdo.uml.search.ui</module>
+ <module>org.eclipse.papyrus.cdo.uml.ui</module>
+ <module>org.eclipse.papyrus.cdo.validation.problems</module>
+ <module>org.eclipse.papyrus.cdo.validation.problems.edit</module>
+
+
+ <module>org.eclipse.papyrus.infra.gmfdiag.css.cdo</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.style.cdo</module>
+
+ </modules>
+
+</project> \ No newline at end of file
diff --git a/cdo/features/org.eclipse.papyrus.cdo.feature/.project b/cdo/features/org.eclipse.papyrus.cdo.feature/.project
new file mode 100755
index 00000000..03a41107
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/cdo/features/org.eclipse.papyrus.cdo.feature/build.properties b/cdo/features/org.eclipse.papyrus.cdo.feature/build.properties
new file mode 100755
index 00000000..a5de5d6b
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.feature/build.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+bin.includes = feature.xml,\
+ feature.properties \ No newline at end of file
diff --git a/cdo/features/org.eclipse.papyrus.cdo.feature/feature.properties b/cdo/features/org.eclipse.papyrus.cdo.feature/feature.properties
new file mode 100755
index 00000000..41e45c23
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.feature/feature.properties
@@ -0,0 +1,35 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus CDO Integration (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# description property - text of the "Feature Description"
+description=Feature regrouping Papyrus' CDO integration for model edition.
+################ end of description property ##################################
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2018 CEA LIST.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License 2.0\n\
+which accompanies this distribution, and is available at\n\
+https://www.eclipse.org/legal/epl-2.0/\n\
+\n\
+SPDX-License-Identifier: EPL-2.0\n
+################ end of copyright property ####################################
diff --git a/cdo/features/org.eclipse.papyrus.cdo.feature/feature.xml b/cdo/features/org.eclipse.papyrus.cdo.feature/feature.xml
new file mode 100755
index 00000000..61bd61d8
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.feature/feature.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ -->
+<feature
+ id="org.eclipse.papyrus.cdo.feature"
+ label="%featureName"
+ version="1.2.0.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="2.0.0">
+
+ <description url="https://eclipse.org/papyrus/">
+ %decription
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import feature="org.eclipse.papyrus.sdk.feature" version="4.0.0" match="greaterOrEqual"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.uml.diagram.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.ui.customization.properties"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.validation.problems"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.validation.problems.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.uml.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.uml.search.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.cdo.ui.hyperlink"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/cdo/features/org.eclipse.papyrus.cdo.feature/pom.xml b/cdo/features/org.eclipse.papyrus.cdo.feature/pom.xml
new file mode 100755
index 00000000..d8fd770f
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.feature/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.feature</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/features/org.eclipse.papyrus.cdo.models.feature/.project b/cdo/features/org.eclipse.papyrus.cdo.models.feature/.project
new file mode 100755
index 00000000..d0518d83
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.models.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.models.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/cdo/features/org.eclipse.papyrus.cdo.models.feature/build.properties b/cdo/features/org.eclipse.papyrus.cdo.models.feature/build.properties
new file mode 100755
index 00000000..b692f5f8
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.models.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ feature.properties \ No newline at end of file
diff --git a/cdo/features/org.eclipse.papyrus.cdo.models.feature/feature.properties b/cdo/features/org.eclipse.papyrus.cdo.models.feature/feature.properties
new file mode 100755
index 00000000..a8bc8041
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.models.feature/feature.properties
@@ -0,0 +1,35 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus CDO Models (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# description property - text of the "Feature Description"
+description=Feature regrouping Papyrus' CDO integration for model edition.
+################ end of description property ##################################
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2018 CEA LIST.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License 2.0\n\
+which accompanies this distribution, and is available at\n\
+https://www.eclipse.org/legal/epl-2.0/\n\
+\n\
+SPDX-License-Identifier: EPL-2.0\n
+################ end of copyright property ####################################
diff --git a/cdo/features/org.eclipse.papyrus.cdo.models.feature/feature.xml b/cdo/features/org.eclipse.papyrus.cdo.models.feature/feature.xml
new file mode 100755
index 00000000..c4f5ceae
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.models.feature/feature.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2018 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ -->
+<feature
+ id="org.eclipse.papyrus.cdo.models.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="2.0.0">
+
+ <description url="https://eclipse.org/papyrus/">
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import feature="org.eclipse.papyrus.cdo.feature"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.gmfdiag.css.cdo"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.gmfdiag.style.cdo"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/cdo/features/org.eclipse.papyrus.cdo.models.feature/pom.xml b/cdo/features/org.eclipse.papyrus.cdo.models.feature/pom.xml
new file mode 100755
index 00000000..bc33e461
--- /dev/null
+++ b/cdo/features/org.eclipse.papyrus.cdo.models.feature/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.models.feature</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project> \ No newline at end of file
diff --git a/cdo/features/pom.xml b/cdo/features/pom.xml
new file mode 100755
index 00000000..f87a4a68
--- /dev/null
+++ b/cdo/features/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo.root</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project root POM (aggregator) -->
+ <artifactId>org.eclipse.papyrus.cdo-features</artifactId>
+ <packaging>pom</packaging>
+
+ <!-- Children modules to build -->
+ <modules>
+ <module>org.eclipse.papyrus.cdo.feature</module>
+ <module>org.eclipse.papyrus.cdo.models.feature</module>
+ </modules>
+
+</project> \ No newline at end of file
diff --git a/cdo/pom.xml b/cdo/pom.xml
new file mode 100755
index 00000000..5dd36345
--- /dev/null
+++ b/cdo/pom.xml
@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Project POM (aggregator) -->
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo.root</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Collaborative Modeling - CDO</name>
+
+ <properties>
+ <tycho-version>1.0.0</tycho-version>
+ <tychoExtrasVersion>1.0.0</tychoExtrasVersion>
+ <jarSignerVersion>1.1.2</jarSignerVersion>
+ <findbugs.version>3.0.1</findbugs.version>
+ <xtext.version>2.11.0</xtext.version>
+ <jboss.version>0.26.0</jboss.version>
+ <jacoco.version>0.7.9</jacoco.version>
+ <testConfig>CI_TESTS_CONFIG</testConfig>
+ <test.argLine>-Xms512m -Xmx2048m -XX:SoftRefLRUPolicyMSPerMB=100</test.argLine>
+ <java.source>1.8</java.source>
+ <java.target>1.8</java.target>
+ <mylyn.wikitext.version>2.4.0-SNAPSHOT</mylyn.wikitext.version>
+
+ <targetPlatform.groupID>org.eclipse.papyrus.cdo</targetPlatform.groupID>
+ <targetPlatform.artifactID>org.eclipse.papyrus.cdo.targetplatform</targetPlatform.artifactID>
+ <targetPlatform.version>1.2.0-SNAPSHOT</targetPlatform.version>
+ </properties>
+
+
+ <!-- Children modules to build -->
+ <modules>
+ <module>benchmarks</module>
+ <module>bundles</module>
+ <module>features</module>
+ <module>releng</module>
+ <module>tests</module>
+ </modules>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>org.eclipse.cbi.maven.plugins</id>
+ <name>Eclipse CBI</name>
+ <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>eclipse.org-mylyn</id>
+ <!-- url>https://repo.eclipse.org/content/repositories/mylyn-releases/</url -->
+ <url>https://repo.eclipse.org/content/repositories/mylyn/</url>
+ </pluginRepository>
+ <pluginRepository>
+ <id>org.jboss.tools.tycho-plugins</id>
+ <url>https://repository.jboss.org/</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <repositories>
+ <repository>
+ <id>license-feature</id>
+ <url>http://download.eclipse.org/cbi/updates/license/</url>
+ <layout>p2</layout>
+ </repository>
+ </repositories>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <!-- enable tycho build extension -->
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin><!-- enable source bundle generation -->
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-director-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200a-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.cbi.maven.plugins</groupId>
+ <artifactId>eclipse-jarsigner-plugin</artifactId>
+ <version>${jarSignerVersion}</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <configuration>
+ <source>${java.source}</source>
+ <target>${java.target}</target>
+ <optimize>true</optimize>
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+ <!-- enable tycho build extension -->
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ </plugin>
+ <plugin><!-- enable source bundle generation -->
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>plugin-source</id>
+ <goals>
+ <goal>plugin-source</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <configuration>
+ <includePackedArtifacts>true</includePackedArtifacts>
+ <targetDefinitionIncludeSource>honor</targetDefinitionIncludeSource>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ <target>
+ <artifact>
+ <groupId>${targetPlatform.groupID}</groupId>
+ <artifactId>${targetPlatform.artifactID}</artifactId>
+ <version>${targetPlatform.version}</version>
+ </artifact>
+ </target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ <configuration>
+ <excludes>
+ <exclude>org.eclipse.uml2</exclude>
+ </excludes>
+ <includes>
+ <include>org.eclipse.papyrus.*</include>
+ </includes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>default-prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <failIfNoTests>false</failIfNoTests>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <testFailureIgnore>true</testFailureIgnore>
+ <!-- ${tycho.testArgLine} is populated by JaCoCo and is required to enable code coverage -->
+ <argLine>${tycho.testArgLine} ${test.argLine}</argLine>
+ <appArgLine>-testConfig=${testConfig}</appArgLine>
+ <product>org.eclipse.sdk.ide</product>
+ <skipTests>${skipInnerTests}</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>eclipsehippIntegration</id>
+ <activation>
+ <property>
+ <name>HUDSON_URL</name>
+ </property>
+ </activation>
+ <properties>
+ <target.suffix>eclipse</target.suffix> <!-- set to 'eclipse' when building on HIPP, to improve performances -->
+ </properties>
+ </profile>
+ <profile>
+ <id>localIntegration</id>
+ <activation>
+ <property>
+ <name>!HUDSON_URL</name>
+ </property>
+ </activation>
+ <properties>
+ <target.suffix>portable</target.suffix>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>packAndSign</id> <!-- Stable release profile. Takes +30min. Eclipse servers only -->
+ <!-- Pack200 -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200a-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-normalize</id>
+ <goals>
+ <goal>normalize</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.cbi.maven.plugins</groupId>
+ <artifactId>eclipse-jarsigner-plugin</artifactId>
+ <version>${jarSignerVersion}</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <property>
+ <name>SIGN</name>
+ <value>true</value>
+ </property>
+ </activation>
+ </profile>
+
+
+ <profile>
+ <id>pack</id> <!-- Nightly profile. Artifacts can be consumed, but are not signed -->
+ <build>
+ <plugins>
+ <!-- Pack200 -->
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <property>
+ <name>SIGN</name>
+ <value>false</value>
+ </property>
+ </activation>
+ </profile>
+
+ </profiles>
+</project>
diff --git a/cdo/releng/org.eclipse.papyrus.cdo.p2/.project b/cdo/releng/org.eclipse.papyrus.cdo.p2/.project
new file mode 100755
index 00000000..a1875db3
--- /dev/null
+++ b/cdo/releng/org.eclipse.papyrus.cdo.p2/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.p2</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/cdo/releng/org.eclipse.papyrus.cdo.p2/category.xml b/cdo/releng/org.eclipse.papyrus.cdo.p2/category.xml
new file mode 100755
index 00000000..9ef1f8ed
--- /dev/null
+++ b/cdo/releng/org.eclipse.papyrus.cdo.p2/category.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<site>
+ <feature url="features/org.eclipse.papyrus.cdo.feature_1.2.0.qualifier.jar" id="org.eclipse.papyrus.cdo.feature" version="1.2.0.qualifier">
+ <category name="org.eclipse.papyrus.collaborativemodeling"/>
+ </feature>
+ <feature url="features/org.eclipse.papyrus.cdo.feature.source_1.2.0.qualifier.jar" id="org.eclipse.papyrus.cdo.feature.source" version="1.2.0.qualifier">
+ <category name="org.eclipse.papyrus.collaborativemodeling"/>
+ </feature>
+ <feature url="features/org.eclipse.papyrus.cdo.models.feature_1.0.0.qualifier.jar" id="org.eclipse.papyrus.cdo.models.feature" version="1.0.0.qualifier">
+ <category name="org.eclipse.papyrus.collaborativemodeling.models"/>
+ </feature>
+ <feature url="features/org.eclipse.papyrus.cdo.models.feature_1.0.0.qualifier.jar" id="org.eclipse.papyrus.cdo.models.feature.source" version="1.0.0.qualifier">
+ <category name="org.eclipse.papyrus.collaborativemodeling.models"/>
+ </feature>
+ <category-def name="org.eclipse.papyrus.collaborativemodeling" label="Collaborative Modeling">
+ <description>
+ Papyrus Tools for Collaborative Modeling
+ </description>
+ </category-def>
+ <category-def name="org.eclipse.papyrus.collaborativemodeling.models" label="CDO native version of metamodels">
+ <description>
+ This category provides the CDO&apos;ified version of metamodels (UML, CSS, style, ...), in order to get the best perfomance with CDO.
+ </description>
+ </category-def>
+</site>
diff --git a/cdo/releng/org.eclipse.papyrus.cdo.p2/pom.xml b/cdo/releng/org.eclipse.papyrus.cdo.p2/pom.xml
new file mode 100755
index 00000000..326219ad
--- /dev/null
+++ b/cdo/releng/org.eclipse.papyrus.cdo.p2/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-releng</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.cdo.p2</artifactId>
+ <packaging>eclipse-repository</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8.2</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project> \ No newline at end of file
diff --git a/cdo/releng/pom.xml b/cdo/releng/pom.xml
new file mode 100755
index 00000000..4fd2539f
--- /dev/null
+++ b/cdo/releng/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM is the Collaborative Modeling project root POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo.root</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- POM description -->
+ <artifactId>org.eclipse.papyrus.cdo-releng</artifactId>
+ <packaging>pom</packaging>
+
+ <!-- Modules to build -->
+ <modules>
+ <module>org.eclipse.papyrus.cdo.p2</module>
+ <module>targetplatforms</module>
+ </modules>
+
+</project> \ No newline at end of file
diff --git a/cdo/releng/targetplatforms/eclipse/org.eclipse.papyrus.cdo.targetplatform.target b/cdo/releng/targetplatforms/eclipse/org.eclipse.papyrus.cdo.targetplatform.target
new file mode 100755
index 00000000..e79fd4c2
--- /dev/null
+++ b/cdo/releng/targetplatforms/eclipse/org.eclipse.papyrus.cdo.targetplatform.target
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
+<target name="CollaborativeModeling CDO - 2018-09" sequenceNumber="1537962638">
+ <locations>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.0.0"/>
+ <repository id="papyrusMasterN" location="https://hudson.eclipse.org/papyrus/job/Papyrus-Master/lastSuccessfulBuild/artifact/repository/"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.papyrus.junit.utils" version="0.0.0"/>
+ <unit id="org.eclipse.papyrus.junit.framework" version="0.0.0"/>
+ <unit id="org.eclipse.papyrus.toolsmiths.feature.feature.group" version="0.0.0"/>
+ <repository id="papyrusMasterToolsmithsN" location="https://hudson.eclipse.org/papyrus/job/Papyrus-Master-Toolsmiths/lastSuccessfulBuild/artifact/repository/"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.sdk.feature.group" version="4.9.0.v20180906-1121"/>
+ <repository id="eclipse-2018-09" location="file:/home/data/httpd/download.eclipse.org/releases/2018-09"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.emf.cdo.explorer" version="4.5.200.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.dawn" version="2.0.600.v20180530-1201"/>
+ <unit id="org.eclipse.emf.cdo.dawn.gmf" version="2.1.500.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.admin" version="4.1.600.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.explorer.ui" version="4.4.300.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.ui.admin" version="4.1.500.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.server.ocl" version="4.2.300.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.ecore" version="0.0.0"/>
+ <unit id="org.eclipse.emf.cdo.gmf.notation" version="0.0.0"/>
+ <repository id="cdo" location="file:/home/data/httpd/download.eclipse.org/modeling/emf/cdo/drops/R20180613-0111"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.papyrus.sysml14.feature.feature.group" version="0.0.0"/>
+ <repository id="SysML 1.4" location="https://hudson.eclipse.org/papyrus/view/Sysml/job/papyrus-sysml-photon/4/artifact/releng/org.eclipse.papyrus.sysml14.p2/target/repository/"/>
+ </location>
+ </locations>
+</target>
diff --git a/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/org.eclipse.papyrus.cdo.targetplatform.target b/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/org.eclipse.papyrus.cdo.targetplatform.target
new file mode 100755
index 00000000..7825b46a
--- /dev/null
+++ b/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/org.eclipse.papyrus.cdo.targetplatform.target
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
+<target name="CollaborativeModeling CDO - 2018-09" sequenceNumber="1537962638">
+ <locations>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.0.0"/>
+ <repository id="papyrusMasterN" location="https://hudson.eclipse.org/papyrus/job/Papyrus-Master/lastSuccessfulBuild/artifact/repository/"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.papyrus.junit.utils" version="0.0.0"/>
+ <unit id="org.eclipse.papyrus.junit.framework" version="0.0.0"/>
+ <unit id="org.eclipse.papyrus.toolsmiths.feature.feature.group" version="0.0.0"/>
+ <repository id="papyrusMasterToolsmithsN" location="https://hudson.eclipse.org/papyrus/job/Papyrus-Master-Toolsmiths/lastSuccessfulBuild/artifact/repository/"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.sdk.feature.group" version="4.9.0.v20180906-1121"/>
+ <repository id="eclipse-2018-09" location="http://download.eclipse.org/releases/2018-09"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.emf.cdo.explorer" version="4.5.200.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.dawn" version="2.0.600.v20180530-1201"/>
+ <unit id="org.eclipse.emf.cdo.dawn.gmf" version="2.1.500.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.admin" version="4.1.600.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.explorer.ui" version="4.4.300.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.ui.admin" version="4.1.500.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.server.ocl" version="4.2.300.v20180529-1130"/>
+ <unit id="org.eclipse.emf.cdo.ecore" version="0.0.0"/>
+ <unit id="org.eclipse.emf.cdo.gmf.notation" version="0.0.0"/>
+ <repository id="cdo" location="http://download.eclipse.org/modeling/emf/cdo/drops/R20180613-0111"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.papyrus.sysml14.feature.feature.group" version="0.0.0"/>
+ <repository id="SysML 1.4" location="https://hudson.eclipse.org/papyrus/view/Sysml/job/papyrus-sysml-photon/4/artifact/releng/org.eclipse.papyrus.sysml14.p2/target/repository/"/>
+ </location>
+ </locations>
+</target>
diff --git a/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/org.eclipse.papyrus.cdo.targetplatform.tpd b/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/org.eclipse.papyrus.cdo.targetplatform.tpd
new file mode 100755
index 00000000..44d910d9
--- /dev/null
+++ b/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/org.eclipse.papyrus.cdo.targetplatform.tpd
@@ -0,0 +1,42 @@
+target "CollaborativeModeling CDO - 2018-09" with source requirements
+
+
+
+/** Manual dependencies */
+
+//manualUpdate
+location papyrusMasterN "https://hudson.eclipse.org/papyrus/job/Papyrus-Master/lastSuccessfulBuild/artifact/repository/" {
+ org.eclipse.papyrus.sdk.feature.feature.group lazy
+}
+
+//manualUpdate
+location papyrusMasterToolsmithsN "https://hudson.eclipse.org/papyrus/job/Papyrus-Master-Toolsmiths/lastSuccessfulBuild/artifact/repository/" {
+ org.eclipse.papyrus.junit.utils lazy
+ org.eclipse.papyrus.junit.framework lazy
+ org.eclipse.papyrus.toolsmiths.feature.feature.group lazy
+}
+
+location "http://download.eclipse.org/releases/2018-09" eclipse-2018-09 {
+ org.eclipse.sdk.feature.group
+}
+
+
+/** Automatic dependencies */
+
+//updateFrom("EMF CDO",0)
+location cdo "http://download.eclipse.org/modeling/emf/cdo/drops/R20180613-0111" {
+ org.eclipse.emf.cdo.explorer
+ org.eclipse.emf.cdo.dawn
+ org.eclipse.emf.cdo.dawn.gmf
+ org.eclipse.emf.cdo.admin
+ org.eclipse.emf.cdo.explorer.ui
+ org.eclipse.emf.cdo.ui.admin
+ org.eclipse.emf.cdo.server.ocl
+ org.eclipse.emf.cdo.ecore lazy
+ org.eclipse.emf.cdo.gmf.notation lazy
+
+
+ location Sysml https://hudson.eclipse.org/papyrus/view/Sysml/job/papyrus-sysml-photon/4/artifact/releng/org.eclipse.papyrus.sysml14.p2/target/repository/{
+ org.eclipse.papyrus.sysml14.feature.feature.group
+ }
+} \ No newline at end of file
diff --git a/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/pom.xml b/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/pom.xml
new file mode 100755
index 00000000..ce9725a4
--- /dev/null
+++ b/cdo/releng/targetplatforms/org.eclipse.papyrus.cdo.targetplatform/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-targetplatforms</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.cdo.targetplatform</artifactId>
+ <packaging>eclipse-target-definition</packaging>
+
+</project> \ No newline at end of file
diff --git a/cdo/releng/targetplatforms/pom.xml b/cdo/releng/targetplatforms/pom.xml
new file mode 100755
index 00000000..763fde5d
--- /dev/null
+++ b/cdo/releng/targetplatforms/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-releng</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.cdo-targetplatforms</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>org.eclipse.papyrus.cdo.targetplatform</module>
+ </modules>
+
+</project> \ No newline at end of file
diff --git a/cdo/releng/toolkit/server/build-after.sh b/cdo/releng/toolkit/server/build-after.sh
new file mode 100755
index 00000000..ee5a761a
--- /dev/null
+++ b/cdo/releng/toolkit/server/build-after.sh
@@ -0,0 +1,59 @@
+#--------------------------------------------------------------------------------
+# Copyright (c) 2012-2014, 2018 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-2.0/
+#
+# Contributors:
+# Nicolas Bros (Mia-Software)
+# Camille Letavernier (CEA LIST)
+# Vincent LORENZO (CEA LIST) - Adapted for Papyrus CDO
+#--------------------------------------------------------------------------------
+
+########## publishing ##########
+
+##
+## Known variables:
+## BUILD_ID=2014-10-01_05-16-17
+##
+## For stable builds:
+## BUILD_ALIAS=M4
+##
+
+p2UpdateSiteDir=${WORKSPACE}/source/plugins/cdo/releng/org.eclipse.papyrus.cdo.p2/target/repository/
+updateSite=${WORKSPACE}/repository
+
+if [ -n "$BUILD_ALIAS" ]; then
+ buildType=S
+else
+ buildType=N
+fi
+
+#COMPACT_BUILD_ID="${BUILD_ID//[-_]}"
+#COMPACT_BUILD_ID="${COMPACT_BUILD_ID:0:12}"
+#COMPACT_BUILD_ID="$(date +%Y%m%d%H%M)"
+COMPACT_BUILD_ID="$BUILD_TIMESTAMP"
+FULL_BUILD_ID=${buildType}${COMPACT_BUILD_ID}
+
+if [ -n "$BUILD_ALIAS" ]; then
+ updateZipName=Papyrus-CDO-${BUILD_ALIAS}.zip
+else
+ updateZipName=Papyrus-CDO-${FULL_BUILD_ID}.zip
+fi
+zipName="Papyrus-CDO.zip"
+
+rm -rf tmp
+mkdir -p "tmp/$FULL_BUILD_ID"
+
+rm -rf $updateSite
+mv $p2UpdateSiteDir $updateSite
+
+# create the update site zip
+(cd $updateSite && zip -r $updateZipName *)
+mv $updateSite/$updateZipName "tmp/$FULL_BUILD_ID"
+
+(cd tmp && zip -r $zipName *)
+mv tmp/$zipName .
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.classpath b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.project b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.project
new file mode 100755
index 00000000..b8f6f8a4
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.core.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/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.settings/org.eclipse.jdt.core.prefs b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..e82ec2bb
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,294 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.settings/org.eclipse.jdt.ui.prefs b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..7360fbbe
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.cdo.core;bundle-version="1.2.0";visibility:=reexport,
+ org.junit;bundle-version="4.11.0";visibility:=reexport,
+ org.eclipse.uml2.uml;bundle-version="4.0.0";visibility:=reexport,
+ org.eclipse.emf.cdo.server.net4j;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.emf.cdo.net4j;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.net4j.jvm;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="3.4.0",
+ org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.2.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.papyrus.junit.framework;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.cdo.core.resource.tests,
+ org.eclipse.papyrus.cdo.core.tests,
+ org.eclipse.papyrus.cdo.core.util.tests,
+ org.eclipse.papyrus.cdo.internal.core.controlmode.tests;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.core.exporter.tests;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.core.expressions.tests;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.core.importer.tests;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.core.tests;x-internal:=true
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.core.tests
+Import-Package: com.google.common.base;version="10.0.1",
+ com.google.common.collect;version="10.0.1",
+ com.google.common.io;version="10.0.1"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/Papyrus CDO Core Tests.launch b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/Papyrus CDO Core Tests.launch
new file mode 100755
index 00000000..b095114c
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/Papyrus CDO Core Tests.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.cdo.core.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.cdo.core.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms120m -Xmx512m -XX:PermSize=256M -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/about.html b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/build.properties b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/build.properties
new file mode 100755
index 00000000..b46ca587
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ resources/
+src.includes = about.html
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/plugin.properties b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/plugin.properties
new file mode 100755
index 00000000..7097aefb
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+pluginName = Papyrus CDO Model Repository Core Tests (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Automated tests for the CDO Integration core APIs and implementation. \ No newline at end of file
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/pom.xml b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/pom.xml
new file mode 100755
index 00000000..2cc45c36
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.core.tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.di b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.di
new file mode 100755
index 00000000..1e92730a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_4OB64IgIEeKgsNTItrb1JA"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="model.notation#_4OB64IgIEeKgsNTItrb1JA"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.notation b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.notation
new file mode 100755
index 00000000..f032e67e
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.notation
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_4OB64IgIEeKgsNTItrb1JA" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_4OB64YgIEeKgsNTItrb1JA"/>
+ <element xmi:type="uml:Model" href="model.uml#_4NgWcIgIEeKgsNTItrb1JA"/>
+</notation:Diagram>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.uml b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.uml
new file mode 100755
index 00000000..f0388b55
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/empty/model.uml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_4NgWcIgIEeKgsNTItrb1JA" name="model"/>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/has_dependencies.zip b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/has_dependencies.zip
new file mode 100755
index 00000000..fab7fb40
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/has_dependencies.zip
Binary files differ
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/has_dependents.zip b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/has_dependents.zip
new file mode 100755
index 00000000..38a31400
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/has_dependents.zip
Binary files differ
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/isolated.zip b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/isolated.zip
new file mode 100755
index 00000000..d7988d39
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/projects/isolated.zip
Binary files differ
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/xmi/A.ecore b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/xmi/A.ecore
new file mode 100755
index 00000000..b5ef8ae8
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/xmi/A.ecore
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="a" nsURI="http://www.eclipse.org/papyrus/test/2013/a" nsPrefix="a">
+ <eClassifiers xsi:type="ecore:EClass" name="A1" eSuperTypes="B.ecore#//B1 B.ecore#//B2"/>
+ <eClassifiers xsi:type="ecore:EClass" name="A2">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="a1" upperBound="-1" eType="#//A1"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/xmi/B.ecore b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/xmi/B.ecore
new file mode 100755
index 00000000..0cf9cc7e
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/resources/xmi/B.ecore
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="b" nsURI="http://www.eclipse.org/papyrus/test/2013/b" nsPrefix="b">
+ <eClassifiers xsi:type="ecore:EClass" name="B1"/>
+ <eClassifiers xsi:type="ecore:EClass" name="B2"/>
+</ecore:EPackage>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/resource/tests/CDOAwareModelSetTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/resource/tests/CDOAwareModelSetTest.java
new file mode 100755
index 00000000..a3990189
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/resource/tests/CDOAwareModelSetTest.java
@@ -0,0 +1,357 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Christian W. Damus (CEA) - bug 429826
+ * Christian W. Damus (CEA) - bug 431953 (pre-requisite refactoring of ModelSet service start-up)
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.resource.tests;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
+
+import java.util.Collections;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+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.EcorePackage;
+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.edit.command.SetCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.net4j.util.lifecycle.LifecycleException;
+import org.eclipse.papyrus.cdo.core.resource.CDOAwareModelSet;
+import org.eclipse.papyrus.cdo.core.resource.CDOAwareTransactionalEditingDomain;
+import org.eclipse.papyrus.cdo.core.resource.PapyrusCDOResourceFactory;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceMultiException;
+import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.TransactionHelper;
+import org.eclipse.papyrus.junit.utils.ModelUtils;
+import org.eclipse.papyrus.junit.utils.resources.EcoreModel;
+import org.eclipse.papyrus.junit.utils.resources.WorkspaceModificationAssertion;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.hamcrest.CoreMatchers;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the CDOAwareModelSetTest type. Enjoy.
+ */
+public class CDOAwareModelSetTest extends AbstractPapyrusCDOTest {
+
+ private static final String MODEL_FILENAME = "model.uml";
+
+ private ServicesRegistry services;
+
+ private ModelSet fixture;
+
+ public CDOAwareModelSetTest() {
+ super();
+ }
+
+ @Test
+ public void modelSetCreated() {
+ Resource resource = fixture.getResource(getTestResourceURI(MODEL_FILENAME), false);
+ assertThat(resource, notNullValue());
+
+ CDOTransaction transaction = getTransaction(fixture);
+
+ assertThat(transaction.isClosed(), is(false));
+ assertThat(transaction.isDirty(), is(false));
+ }
+
+ @Test
+ public void unloadModelSet() throws Exception {
+ fixture.unload();
+
+ assertThat(fixture.getResources(), equalTo(Collections.EMPTY_LIST));
+ }
+
+ @Test
+ public void cdoResourceFactory() {
+ CDOTransaction transaction = getTransaction(fixture);
+
+ Resource resource = transaction.getOrCreateResource(getResourcePath(MODEL_FILENAME));
+ assertThat(fixture.getResourceFactoryRegistry().getFactory(resource.getURI()), instanceOf(PapyrusCDOResourceFactory.class));
+ }
+
+ @Test
+ public void editingDomain() {
+ assertThat(fixture.getTransactionalEditingDomain(), instanceOf(CDOAwareTransactionalEditingDomain.class));
+ }
+
+ @Test
+ public void cdoResourceNotReadOnly() {
+ CDOTransaction transaction = getTransaction(fixture);
+
+ Resource resource = transaction.getOrCreateResource(getResourcePath(MODEL_FILENAME));
+ assertThat(fixture.getReadOnlyHandler().anyReadOnly(ReadOnlyAxis.anyAxis(), new URI[] { resource.getURI() }), is(Optional.of(false)));
+ }
+
+ @Test
+ public void getEObject() throws Exception {
+ ResourceSet other = createTransaction(houseKeeper.createResourceSet());
+
+ Resource resource = getTransaction(other).getOrCreateResource(getResourcePath("other.uml"));
+
+ Model model = UMLFactory.eINSTANCE.createModel();
+ model.setName("test");
+ resource.getContents().add(model);
+
+ commit(other);
+
+ // must get the URI *after* commit, because the fragment of a
+ // persisted object is different than that of a transient object
+ URI uri = EcoreUtil.getURI(model);
+
+ close(other);
+
+ EObject retrieved = fixture.getEObject(uri, true);
+ model = cast(retrieved, Model.class);
+ assertThat(model.getName(), equalTo("test"));
+ }
+
+ @Test
+ public void resolveProxy() throws Exception {
+ ResourceSet other = createTransaction(houseKeeper.createResourceSet());
+
+ Resource resource1 = getTransaction(other).getOrCreateResource(getResourcePath(MODEL_FILENAME));
+ Model model1 = UMLFactory.eINSTANCE.createModel();
+ model1.setName("model1");
+ resource1.getContents().add(model1);
+
+ Resource resource2 = getTransaction(other).getOrCreateResource(getResourcePath("other.uml"));
+ Model model2 = UMLFactory.eINSTANCE.createModel();
+ model2.setName("model2");
+ resource2.getContents().add(model2);
+ model2.createPackageImport(model1);
+
+ URI uri = resource2.getURI();
+
+ commit(other);
+ close(other);
+
+ Resource resource = fixture.getResource(uri, true);
+ Model referencer = (Model) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.MODEL);
+ assertThat(referencer.getImportedPackages(), CoreMatchers.<Package> hasItem(CoreMatchers.anything()));
+ Package imported = referencer.getImportedPackages().get(0);
+ assertThat(imported.eIsProxy(), is(false));
+ assertThat(imported.getName(), equalTo("model1"));
+ }
+
+ /**
+ * Tests that only modified workspace resources are saved, where we have only one model (no referenced libraries).
+ */
+ @Test
+ public void testSave_onlyModifiedWorkspaceResources1() throws Exception {
+ final TransactionalEditingDomain domain = fixture.getTransactionalEditingDomain();
+
+ EcoreModel model = new EcoreModel();
+
+ fixture.registerModel(model);
+
+ IProject p = houseKeeper.createProject(houseKeeper.getTestName());
+
+ final IFile modelFile = p.getFile("ecore1." + model.getModelFileExtension());
+ final URI modelURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ final WorkspaceModificationAssertion mods = new WorkspaceModificationAssertion(houseKeeper);
+
+ fixture.createModels(modelURI);
+ mods.save(fixture);
+
+ assertThat("workspace resource not created", modelFile.exists(), is(true));
+
+ assertThat("EMF resource is null", model.getResource(), notNullValue());
+ assertThat("EMF resource not created", model.getResource().getContents().isEmpty(), is(false));
+
+ EPackage ePackage = model.getRoot();
+ domain.getCommandStack().execute(SetCommand.create(domain, ePackage, EcorePackage.Literals.ENAMED_ELEMENT__NAME, "newname"));
+
+ mods.requireChange(modelURI);
+ mods.save(fixture);
+
+ // Saving again should have no effect on the workspace
+ mods.requireNoChange(modelURI);
+ mods.save(fixture);
+ }
+
+ /**
+ * Tests that only modified workspace resources are saved, where we have multiple models (referenced libraries).
+ */
+ @Test
+ public void testSave_onlyModifiedWorkspaceResources2() throws Exception {
+ final TransactionalEditingDomain domain = fixture.getTransactionalEditingDomain();
+
+ final EcoreModel model = new EcoreModel();
+
+ fixture.registerModel(model);
+
+ IProject p = houseKeeper.createProject(houseKeeper.getTestName());
+
+ final IFile modelFile1 = p.getFile("ecore1." + model.getModelFileExtension());
+ final URI modelURI1 = URI.createPlatformResourceURI(modelFile1.getFullPath().toString(), true);
+
+ final IFile modelFile2 = p.getFile("ecore2." + model.getModelFileExtension());
+ final URI modelURI2 = URI.createPlatformResourceURI(modelFile2.getFullPath().toString(), true);
+
+ final WorkspaceModificationAssertion mods = new WorkspaceModificationAssertion(houseKeeper);
+
+ fixture.createModels(modelURI1);
+
+ // Set up a second model and a dependency from the first
+ final Resource res2 = fixture.createResource(modelURI2, EcorePackage.eCONTENT_TYPE);
+ TransactionHelper.run(domain, new Runnable() {
+
+ @Override
+ public void run() {
+ EPackage ePackage = EcoreFactory.eINSTANCE.createEPackage();
+ ePackage.setName("library");
+ ePackage.setNsPrefix("lib");
+ ePackage.setNsURI("http://www.eclipse.org/papyrus/test/fakemodel/ecore/library");
+ res2.getContents().add(ePackage);
+
+ // A class in the library model
+ EClass foo = EcoreFactory.eINSTANCE.createEClass();
+ foo.setName("Foo");
+ ePackage.getEClassifiers().add(foo);
+
+ // A class in the main model
+ EClass thing = EcoreFactory.eINSTANCE.createEClass();
+ thing.setName("Thing");
+ model.getRoot().getEClassifiers().add(thing);
+
+ EReference reference = EcoreFactory.eINSTANCE.createEReference();
+ reference.setName("foo");
+ reference.setEType(foo);
+ thing.getEStructuralFeatures().add(reference);
+ }
+ });
+
+ // We need this referenced model to be writable in order to save it
+ ModelUtils.makeReferencedModelsWritable(fixture, modelURI2);
+ mods.save(fixture);
+
+ assertThat("workspace resource not created", modelFile1.exists(), is(true));
+ assertThat("workspace resource not created", modelFile2.exists(), is(true));
+
+ assertThat("EMF resource is null", model.getResource(), notNullValue());
+ assertThat("EMF resource not created", model.getResource().getContents().isEmpty(), is(false));
+ assertThat("EMF resource not created", res2.getContents().isEmpty(), is(false));
+
+ // Change the referenced resource's URI. This should make the resource and its dependents dirty
+ final URI modelURI2New = modelURI2.trimSegments(1).appendSegment("library1").appendFileExtension(model.getModelFileExtension());
+ res2.setURI(modelURI2New);
+
+ ModelUtils.makeReferencedModelsWritable(fixture, modelURI2New);
+ mods.requireChange(modelURI1); // Thanks to the ProxyModificationTrackingAdapter
+ mods.requireChange(modelURI2New);
+ mods.requireNoChange(modelURI2); // No longer an interesting URI
+ mods.save(fixture);
+
+ EPackage ePackage = model.getRoot();
+ domain.getCommandStack().execute(SetCommand.create(domain, ePackage, EcorePackage.Literals.ENAMED_ELEMENT__NAME, "newname"));
+
+ // Saving this should have no effect on the second resource
+ mods.requireChange(modelURI1);
+ mods.requireNoChange(modelURI2New);
+ mods.requireNoChange(modelURI2);
+ mods.save(fixture);
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createModelSet() throws Exception {
+ services = new ExtensionServicesRegistry(Activator.PLUGIN_ID);
+
+ try {
+ // Ensure that the CDOAwareModelSet is the ModelSet service implementation
+ services.add(ModelSet.class, Integer.MAX_VALUE, new CDOAwareModelSet());
+
+ // start the ModelSet and its dependencies
+ services.startServicesByClassKeys(ModelSet.class, TransactionalEditingDomain.class);
+ } catch (ServiceMultiException e) {
+ for (ServiceNotFoundException next : Iterables.filter(e.getExceptions(), ServiceNotFoundException.class)) {
+ assertThat(next.getLocalizedMessage(), not(containsString("ModelSet")));
+ }
+ }
+
+ fixture = services.getService(ModelSet.class);
+ assertThat(fixture, instanceOf(CDOAwareModelSet.class));
+
+ // pre-emptively get the editing domain to avoid lock contention later
+ services.getService(TransactionalEditingDomain.class);
+
+ assumeThat(fixture, instanceOf(CDOAwareModelSet.class));
+
+ URI testResourceURI = getTestResourceURI(MODEL_FILENAME);
+ fixture.createModels(testResourceURI);
+ commit(fixture);
+ }
+
+ @After
+ public void disposeModelSet() throws Exception {
+ try {
+ services.disposeRegistry();
+ } catch (ServiceMultiException e) {
+ if (Iterables.any(Iterables.transform(e.getExceptions(), new Function<Throwable, Throwable>() {
+
+ @Override
+ public Throwable apply(Throwable input) {
+ return input.getCause();
+ }
+ }), Predicates.instanceOf(LifecycleException.class))) {
+
+ // known exception due to minimal CDOObject implementation
+ } else {
+ throw e;
+ }
+ } finally {
+ services = null;
+ }
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java
new file mode 100755
index 00000000..5bac221e
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java
@@ -0,0 +1,461 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ * Christian W. Damus (CEA) - bug 430023
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.tests;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Map;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.cdo.common.CDOCommonRepository;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout;
+import org.eclipse.emf.cdo.explorer.repositories.CDORepository;
+import org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutImpl;
+import org.eclipse.emf.cdo.internal.explorer.checkouts.OnlineCDOCheckout;
+import org.eclipse.emf.cdo.internal.explorer.repositories.RemoteCDORepository;
+import org.eclipse.emf.cdo.net4j.CDONet4jUtil;
+import org.eclipse.emf.cdo.server.CDOServerUtil;
+import org.eclipse.emf.cdo.server.IRepository.Props;
+import org.eclipse.emf.cdo.server.mem.MEMStoreUtil;
+import org.eclipse.emf.cdo.server.net4j.CDONet4jServerUtil;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.util.CommitException;
+import org.eclipse.emf.cdo.util.ConcurrentAccessException;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.net4j.Net4jUtil;
+import org.eclipse.net4j.jvm.JVMUtil;
+import org.eclipse.net4j.util.container.ContainerUtil;
+import org.eclipse.net4j.util.container.IManagedContainer;
+import org.eclipse.net4j.util.io.IOUtil;
+import org.eclipse.net4j.util.io.TMPUtil;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.transaction.TransactionException;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.junit.Before;
+import org.junit.Rule;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Maps;
+
+/**
+ * This is the AbstractPapyrusCDOTest type. Enjoy.
+ */
+public abstract class AbstractPapyrusCDOTest extends AbstractPapyrusTest {
+
+ private static final Pattern LEADING_SLASHES = Pattern.compile("^/+");
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ private IManagedContainer container;
+
+ private CDORepository repository;
+
+ private CDOCheckout checkout;
+
+ public AbstractPapyrusCDOTest() {
+ super();
+ }
+
+ @Before
+ public void init() throws Exception {
+ // Net4jUtil.prepareContainer(PluginContainer.INSTANCE);
+ // JVMUtil.prepareContainer(PluginContainer.INSTANCE);
+
+ File testFolder = TMPUtil.createTempFolder("cdotest-", "");
+ org.eclipse.emf.cdo.internal.explorer.bundle.OM.initializeManagers(testFolder);
+ houseKeeper.cleanUpLater(testFolder, new HouseKeeper.Disposer<File>() {
+ @Override
+ public void dispose(File testFolder) throws Exception {
+ IOUtil.delete(testFolder);
+ }
+ });
+
+ container = createServerContainer();
+ InternalRepository remoteRepository = createRemoteRepository(container);
+ String repositoryName = remoteRepository.getName();
+
+ repository = createRepository(repositoryName);
+
+ if (needCheckout()) {
+ checkout = createCheckout(houseKeeper.getTestName());
+
+ // ensure the test resource path
+ CDOTransaction transaction = checkout.openTransaction();
+ transaction.getOrCreateResourceFolder(getResourceFolder());
+ transaction.commit();
+ transaction.close();
+ }
+ }
+
+ private CDORepository createRepository(String repositoryName) {
+ Properties properties = new Properties();
+ properties.setProperty(RemoteCDORepository.PROP_TYPE, CDORepository.TYPE_REMOTE);
+ properties.setProperty(RemoteCDORepository.PROP_LABEL, repositoryName);
+ properties.setProperty(RemoteCDORepository.PROP_NAME, repositoryName);
+ properties.setProperty(RemoteCDORepository.PROP_CONNECTOR_TYPE, "jvm");
+ properties.setProperty(RemoteCDORepository.PROP_CONNECTOR_DESCRIPTION, "default");
+
+ CDORepository repository = CDOExplorerUtil.getRepositoryManager().addRepository(properties);
+ repository.connect();
+ return repository;
+ }
+
+ private CDOCheckout createCheckout(String checkoutName) {
+ Properties properties = new Properties();
+ properties.setProperty(OnlineCDOCheckout.PROP_TYPE, CDOCheckout.TYPE_ONLINE_HISTORICAL);
+ properties.setProperty(OnlineCDOCheckout.PROP_LABEL, checkoutName);
+ properties.setProperty(OnlineCDOCheckout.PROP_REPOSITORY, repository.getID());
+ properties.setProperty(OnlineCDOCheckout.PROP_BRANCH_ID, Integer.toString(CDOBranch.MAIN_BRANCH_ID));
+ properties.setProperty(OnlineCDOCheckout.PROP_TIME_STAMP, Long.toString(CDOBranchPoint.UNSPECIFIED_DATE));
+ properties.setProperty(OnlineCDOCheckout.PROP_READ_ONLY, Boolean.toString(false));
+
+ CDOCheckout checkout = CDOExplorerUtil.getCheckoutManager().addCheckout(properties);
+ checkout.open();
+ return checkout;
+ }
+
+ protected HouseKeeper.Disposer<IManagedContainer> containerDisposer() {
+ return new HouseKeeper.Disposer<IManagedContainer>() {
+
+ @Override
+ public void dispose(IManagedContainer object) {
+ LifecycleUtil.deactivate(object);
+ }
+ };
+ }
+
+ protected HouseKeeper.Disposer<CDOCheckout> checkoutDisposer() {
+ return new HouseKeeper.Disposer<CDOCheckout>() {
+
+ @Override
+ public void dispose(CDOCheckout checkout) throws Exception {
+ Exception exception = null;
+ try {
+ checkout.close();
+ } catch (Exception e) {
+ exception = e;
+ }
+
+ if (exception != null) {
+ throw exception;
+ }
+ }
+ };
+ }
+
+ protected Map<String, String> getRepositoryProperties() {
+ Map<String, String> result = Maps.newHashMap();
+
+ addRepositoryProperties(result);
+
+ return result;
+ }
+
+ protected void addRepositoryProperties(Map<String, String> props) {
+ props.put(Props.OVERRIDE_UUID, ""); // use the name as the UUID
+ props.put(Props.SUPPORTING_AUDITS, "false");
+ props.put(Props.SUPPORTING_BRANCHES, "false");
+ props.put(Props.ID_GENERATION_LOCATION, CDOCommonRepository.IDGenerationLocation.STORE.toString());
+ }
+
+ protected IManagedContainer createServerContainer() {
+ IManagedContainer result = houseKeeper.cleanUpLater(ContainerUtil.createContainer(), containerDisposer());
+
+ prepareContainer(result);
+
+ LifecycleUtil.activate(result);
+
+ return result;
+ }
+
+ protected void prepareContainer(IManagedContainer container) {
+ Net4jUtil.prepareContainer(container);
+ CDONet4jUtil.prepareContainer(container);
+ CDONet4jServerUtil.prepareContainer(container);
+ JVMUtil.prepareContainer(container);
+ }
+
+ protected InternalRepository createRemoteRepository(IManagedContainer container) {
+ InternalRepository result = (InternalRepository) CDOServerUtil.createRepository("MEM", MEMStoreUtil.createMEMStore(), getRepositoryProperties());
+
+ CDOServerUtil.addRepository(container, result);
+ LifecycleUtil.activate(JVMUtil.getAcceptor(container, "default"));
+ return result;
+ }
+
+ protected CDOCheckout getCheckout() {
+ return checkout;
+ }
+
+ protected CDOCheckoutImpl getInternalCheckout() {
+ return (CDOCheckoutImpl) getCheckout();
+ }
+
+ protected CDOTransaction createTransaction() {
+ CDOCheckout repo = getInternalCheckout();
+ CDOTransaction result = repo.openTransaction(createResourceSet());
+ return houseKeeper.cleanUpLater(result, viewDisposer(repo));
+ }
+
+ protected ResourceSet createTransaction(ResourceSet resourceSet) {
+ CDOCheckout checkout = getCheckout();
+ checkout.openTransaction(resourceSet);
+ return resourceSet;
+ }
+
+ protected CDOView createView() {
+ CDOCheckout repo = getInternalCheckout();
+ CDOView result = repo.openView(true, createResourceSet());
+ return houseKeeper.cleanUpLater(result, viewDisposer(repo));
+ }
+
+ protected void commit(ResourceSet resourceSet) {
+ CDOTransaction transaction = (CDOTransaction) CDOUtil.getView(resourceSet);
+
+ try {
+ transaction.commit();
+ } catch (ConcurrentAccessException e) {
+ throw new TransactionException(e);
+ } catch (CommitException e) {
+ throw new TransactionException(e);
+ }
+ }
+
+ protected void close(ResourceSet resourceSet) {
+ CDOView view = CDOUtil.getView(resourceSet);
+ LifecycleUtil.deactivate(view);
+ }
+
+ protected void close(CDOCheckout checkout, CDOView view) {
+ ResourceSet rset = view.getResourceSet();
+
+ // CDOResources don't implement unload(), but we can remove adapters from
+ // all of the objects that we have loaded in this view
+ CDOUtils.unload(view);
+
+ for (Resource next : ImmutableList.copyOf(rset.getResources())) {
+ next.unload();
+ }
+
+ if (checkout.isOpen()) {
+ view.close();
+ }
+
+ rset.getResources().clear();
+ rset.eAdapters().clear();
+
+ // Clear the package registry (it may contain dynamic profile EPackages that we don't
+ // want to leak in BasicExtendedMetaData instances attached to static EPackages)
+ // Works around EMF bug 433108
+ EPackage.Registry packageRegistry = rset.getPackageRegistry();
+ if (packageRegistry != null) {
+ packageRegistry.clear();
+ }
+ }
+
+ protected HouseKeeper.Disposer<CDOView> viewDisposer(final CDOCheckout repository) {
+ return new HouseKeeper.Disposer<CDOView>() {
+
+ @Override
+ public void dispose(CDOView object) {
+ if (!object.isClosed()) {
+ close(repository, object);
+ }
+ }
+ };
+ }
+
+ private ResourceSet createResourceSet() {
+ ResourceSet result = null;
+
+ Method factory = getAnnotatedMethod(ResourceSetFactory.class);
+ if (factory != null) {
+ try {
+ result = (ResourceSet) factory.invoke(this);
+ } catch (InvocationTargetException e) {
+ e.getTargetException().printStackTrace();
+ fail("Failed to create resource set for test case: " + e.getTargetException().getLocalizedMessage());
+ } catch (IllegalAccessException e) {
+ fail("Resource-set factory method not accessible: " + factory.getName());
+ }
+ }
+
+ if (result == null) {
+ // default
+ result = new ResourceSetImpl();
+ }
+
+ return result;
+ }
+
+ protected CDOTransaction getTransaction(ResourceSet resourceSet) {
+ return cast(CDOUtil.getView(resourceSet), CDOTransaction.class);
+ }
+
+ protected final Method getAnnotatedMethod(Class<? extends Annotation> annotationType) {
+ Method result = null;
+
+ for (Method next : getClass().getMethods()) {
+ if (next.isAnnotationPresent(annotationType)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+
+ protected boolean needCheckout() {
+ return true;
+ }
+
+ protected String getResourceFolder() {
+ return String.format("/%s/%s", getClass().getSimpleName(), houseKeeper.getTestName());
+ }
+
+ protected String getResourcePath(String path) {
+ java.util.regex.Matcher m = LEADING_SLASHES.matcher(path);
+ if (m.find()) {
+ path = path.substring(m.end());
+ }
+ return String.format("%s/%s", getResourceFolder(), path);
+ }
+
+ protected URI getTestResourceURI(String path) {
+ return checkout.createResourceURI(getResourcePath(path));
+ // return URI.createURI("cdo://" + repoUUID + getResourcePath(path), false);
+ }
+
+ protected URI getRepositoryURI() {
+ return getInternalCheckout().getView().getRootResource().getURI();
+ }
+
+ protected URI getTestFolderURI() {
+ // last segment adds the trailing separator
+ return getRepositoryURI().appendSegment(getClass().getSimpleName()).appendSegment(houseKeeper.getTestName()).appendSegment("");
+ }
+
+ protected static <T> T cast(Object object, Class<T> type) {
+ assertThat(object, instanceOf(type));
+ return type.cast(object);
+ }
+
+ protected URI getTemplateResourceURI(String templateName, String resourceName, String extension) {
+ return URI.createPlatformPluginURI(String.format("/org.eclipse.papyrus.cdo.core.tests/resources/%s/%s.%s", templateName, resourceName, extension), true);
+ }
+
+ protected void loadTemplate(String templateName, String resourceName, Resource... resource) {
+ ResourceSet rset = houseKeeper.createResourceSet();
+
+ // load all the templates
+ Resource[] templates = new Resource[resource.length];
+ for (int i = 0; i < templates.length; i++) {
+ templates[i] = rset.getResource(getTemplateResourceURI(templateName, resourceName, resource[i].getURI().fileExtension()), true);
+ }
+
+ // resolve their cross-references
+ for (int i = 0; i < templates.length; i++) {
+ EcoreUtil.resolveAll(templates[i]);
+ }
+
+ // move them into the destination resources
+ for (int i = 0; i < resource.length; i++) {
+ resource[i].getContents().addAll(templates[i].getContents());
+ }
+ }
+
+ protected <T extends EObject> T getMasterViewObject(T object) {
+ CDOView view = getInternalCheckout().getView();
+ return view.getObject(object);
+ }
+
+ public static <T extends Number & Comparable<T>> Matcher<T> lessThan(final T max) {
+ return new BaseMatcher<T>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("< ").appendValue(max);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public boolean matches(Object item) {
+ return ((T) item).compareTo(max) < 0;
+ }
+ };
+ }
+
+ public static <T extends Number & Comparable<T>> Matcher<T> lessThanOrEqualTo(final T max) {
+ return new BaseMatcher<T>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("<= ").appendValue(max);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public boolean matches(Object item) {
+ return ((T) item).compareTo(max) <= 0;
+ }
+ };
+ }
+
+ public static <T> Matcher<Iterable<T>> hasSize(final int size) {
+ return new BaseMatcher<Iterable<T>>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("has size ").appendValue(size);
+ }
+
+ @Override
+ public boolean matches(Object item) {
+ return Iterables.size((Iterable<?>) item) == size;
+ }
+ };
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AllTests.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AllTests.java
new file mode 100755
index 00000000..92026343
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AllTests.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 443828
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.tests;
+
+import org.eclipse.papyrus.cdo.core.resource.tests.CDOAwareModelSetTest;
+import org.eclipse.papyrus.cdo.core.util.tests.AllUtilTests;
+import org.eclipse.papyrus.cdo.internal.core.controlmode.tests.CDOControlModeTest;
+import org.eclipse.papyrus.cdo.internal.core.exporter.tests.AllModelExportTests;
+import org.eclipse.papyrus.cdo.internal.core.expressions.tests.AllExpressionsTests;
+import org.eclipse.papyrus.cdo.internal.core.importer.tests.AllModelImportTests;
+import org.eclipse.papyrus.cdo.internal.core.tests.AllInternalCoreTests;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * This is the AllTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ AllUtilTests.class, AllExpressionsTests.class, //
+ AllInternalCoreTests.class, CDOAwareModelSetTest.class, //
+ AllModelImportTests.class, AllModelExportTests.class, //
+ CDOControlModeTest.class })
+public class AllTests {
+
+ public AllTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/ResourceSetFactory.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/ResourceSetFactory.java
new file mode 100755
index 00000000..10000416
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/ResourceSetFactory.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.tests;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * This is the ResourceSetFactory type. Enjoy.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface ResourceSetFactory {
+ // empty
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/TestProject.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/TestProject.java
new file mode 100755
index 00000000..bec8b5f7
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/TestProject.java
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 443828
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.junit.rules.TestWatcher;
+import org.junit.runner.Description;
+
+/**
+ * This is the TestProject type. Enjoy.
+ */
+public class TestProject
+ extends TestWatcher {
+
+ private IProject project;
+
+ public TestProject(String name) {
+ super();
+
+ this.project = ResourcesPlugin.getWorkspace().getRoot()
+ .getProject(name);
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public IFile getFile(String path) {
+ IFile result = getProject().getFile(new Path(path));
+
+ assertThat(result, notNullValue());
+ assertThat(result.exists(), is(true));
+
+ return result;
+ }
+
+ public URI getResourceURI(String path) {
+ return URI.createPlatformResourceURI(getFile(path).getFullPath()
+ .toString(), true);
+ }
+
+ @Override
+ protected void starting(Description description) {
+ try {
+ // ensure that the project doesn't exist
+ if (project.exists()) {
+ project.delete(true, null);
+ }
+
+ // create the project
+ project.create(null);
+ project.open(null);
+
+ // fill it
+ unzip();
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to create test project: " + e.getLocalizedMessage());
+ }
+ }
+
+ @Override
+ protected void finished(Description description) {
+ try {
+ project.delete(true, null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void unzip()
+ throws Exception {
+
+ URL zipResource = Platform.getBundle(
+ "org.eclipse.papyrus.cdo.core.tests").getEntry(
+ String.format("resources/projects/%s.zip", project.getName()));
+
+ if (zipResource == null) {
+ fail("No such test project archive: " + project.getName());
+ } else {
+ ZipInputStream zip = new ZipInputStream(zipResource.openStream());
+
+ for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip
+ .getNextEntry()) {
+ if (entry.isDirectory()) {
+ createDirectory(project, entry.getName());
+ } else {
+ createFile(project, entry.getName(),
+ new ZipEntryInputStreamWrapper(zip));
+ }
+ }
+
+ zip.close();
+ }
+ }
+
+ private void createDirectory(IProject project, String name)
+ throws Exception {
+
+ createDirectory(project, new Path(name));
+ }
+
+ private IFolder createDirectory(IProject project, IPath path)
+ throws Exception {
+ IContainer container = project;
+
+ for (String next : path.segments()) {
+ IFolder folder = container.getFolder(new Path(next));
+ if (!folder.exists()) {
+ folder.create(true, true, null);
+ }
+ container = folder;
+ }
+
+ return (IFolder) container;
+ }
+
+ private void createFile(IProject project, String name, InputStream contents)
+ throws Exception {
+
+ IPath path = new Path(name);
+
+ IContainer container = project;
+ if (path.segmentCount() > 1) {
+ container = createDirectory(project, path.removeLastSegments(1));
+ }
+
+ IFile file = container.getFile(new Path(path.lastSegment()));
+ if (!file.exists()) {
+ file.create(contents, true, null);
+ } else {
+ file.setContents(contents, true, false, null);
+ }
+ }
+
+ private static class ZipEntryInputStreamWrapper
+ extends FilterInputStream {
+
+ private ZipInputStream zip;
+
+ public ZipEntryInputStreamWrapper(ZipInputStream input) {
+ super(input);
+
+ this.zip = input;
+ }
+
+ @Override
+ public void close()
+ throws IOException {
+
+ zip.closeEntry();
+ }
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/AllUtilTests.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/AllUtilTests.java
new file mode 100755
index 00000000..13ab70c1
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/AllUtilTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.util.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * This is the AllUtilTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ CDOPredicatesTest.class, CDOFunctionsTest.class, JobWaiterTest.class })
+public class AllUtilTests {
+
+ public AllUtilTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/CDOFunctionsTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/CDOFunctionsTest.java
new file mode 100755
index 00000000..4a3702c4
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/CDOFunctionsTest.java
@@ -0,0 +1,217 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.util.tests;
+
+import static org.hamcrest.CoreMatchers.both;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.hasItems;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.eresource.CDOTextResource;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.core.util.CDOFunctions;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.junit.Test;
+
+import com.google.common.base.Function;
+
+
+/**
+ * This is the CDOFunctionsTest type. Enjoy.
+ */
+public class CDOFunctionsTest extends AbstractPapyrusCDOTest {
+
+ @Test
+ public void testAdapt_instanceOf() {
+ Function<Object, CDOResourceNode> func = CDOFunctions.adapt(CDOResourceNode.class);
+ CDOTransaction transaction = createTransaction();
+
+ CDOResourceNode res = transaction.createResource(getResourcePath("/folder1/foo.uml"));
+ assertThat(func.apply(res), sameInstance(res));
+
+ CDOResourceNode folder = res.getFolder();
+ assertThat(func.apply(folder), sameInstance(folder));
+
+ assertThat(func.apply(transaction), nullValue());
+ }
+
+ @Test
+ public void testAdapt_adapter() {
+ Function<Object, String> func = CDOFunctions.adapt(String.class);
+ CDOTransaction transaction = createTransaction();
+
+ CDOResourceNode res = transaction.createResource(getResourcePath("/folder1/foo.uml"));
+ assertThat(func.apply(res), nullValue());
+
+ StringAdapter adapter = new StringAdapter(res);
+ assertThat(func.apply(adapter), is(res.getPath()));
+ }
+
+ @Test
+ public void testAdaptFunction_equals() {
+ Function<Object, String> func1 = CDOFunctions.adapt(String.class);
+ Function<Object, CDOResourceNode> func2 = CDOFunctions.adapt(CDOResourceNode.class);
+ Function<Object, CDOResourceNode> func3 = CDOFunctions.adapt(CDOResourceNode.class);
+
+ assertThat(func1.equals(func2), is(false));
+ assertThat(func2 == func3, is(false));
+ assertThat(func2, equalTo(func3));
+ assertThat(func3, equalTo(func2));
+ }
+
+ @Test
+ public void testAdaptFunction_hashCode() {
+ Function<Object, String> func1 = CDOFunctions.adapt(String.class);
+ Function<Object, CDOResourceNode> func2 = CDOFunctions.adapt(CDOResourceNode.class);
+ Function<Object, CDOResourceNode> func3 = CDOFunctions.adapt(CDOResourceNode.class);
+
+ assertThat(func1.hashCode() == func2.hashCode(), is(String.class.hashCode() == CDOResourceNode.class.hashCode()));
+ assertThat(func2.hashCode(), is(func3.hashCode()));
+ }
+
+ @Test
+ public void testAdaptFunction_toString() {
+ Function<Object, String> func = CDOFunctions.adapt(String.class);
+
+ assertThat(func.toString(), containsString("adapt("));
+ }
+
+ @Test
+ public void testRootFunction() {
+ CDOTransaction transaction = createTransaction();
+
+ Resource res = transaction.createResource(getResourcePath("/folder1/foo.uml"));
+ Package package1 = UMLFactory.eINSTANCE.createPackage();
+ res.getContents().add(package1);
+ Model model1 = UMLFactory.eINSTANCE.createModel();
+ res.getContents().add(model1);
+
+ assertThat(CDOFunctions.getRoot(Model.class).apply(res), sameInstance(model1));
+ assertThat(CDOFunctions.getRoot(Interface.class).apply(res), nullValue());
+ }
+
+ @Test
+ public void testRootFunction_equals() {
+ Function<Resource, Model> func1 = CDOFunctions.getRoot(Model.class);
+ Function<Resource, Package> func2 = CDOFunctions.getRoot(Package.class);
+ Function<Resource, Package> func3 = CDOFunctions.getRoot(Package.class);
+
+ assertThat((Object)func1, not(equalTo((Object)func2)));
+ assertThat((Object)func2, not(equalTo((Object)func1)));
+ assertThat(func2 == func3, is(false));
+ assertThat(func2, equalTo(func3));
+ assertThat(func3, equalTo(func2));
+ }
+
+ @Test
+ public void testRootFunction_hashCode() {
+ Function<Resource, Model> func1 = CDOFunctions.getRoot(Model.class);
+ Function<Resource, Package> func2 = CDOFunctions.getRoot(Package.class);
+ Function<Resource, Package> func3 = CDOFunctions.getRoot(Package.class);
+
+ assertThat(func1.hashCode() == func2.hashCode(), is(Model.class.hashCode() == Package.class.hashCode()));
+ assertThat(func2.hashCode(), is(func3.hashCode()));
+ }
+
+ @Test
+ public void testRootFunction_toString() {
+ Function<Resource, Model> func = CDOFunctions.getRoot(Model.class);
+
+ assertThat(func.toString(), containsString("getRoot("));
+ }
+
+ @Test
+ public void testFolderContentsFunction_folder() {
+ CDOTransaction transaction = createTransaction();
+
+ CDOResourceFolder folder = transaction.createResourceFolder(getResourcePath("/folder1"));
+ CDOResourceNode text = transaction.createTextResource(getResourcePath("/folder1/foo.properties"));
+ CDOResource res = transaction.createResource(getResourcePath("/folder1/foo.uml"));
+
+ assertThat(CDOFunctions.getFolderContents().apply(folder), both(AbstractPapyrusCDOTest.<CDOResourceNode> hasSize(2)).and(hasItems(text, res)));
+ assertThat(CDOFunctions.getFolderContents(CDOResource.class).apply(folder), both(AbstractPapyrusCDOTest.<CDOResource> hasSize(1)).and(hasItem(res)));
+ }
+
+ @Test
+ public void testFolderContentsFunction_rootResource() {
+ CDOTransaction transaction = createTransaction();
+
+ CDOResourceFolder folder = transaction.createResourceFolder(getResourcePath("/folder1"));
+ CDOResourceNode root = transaction.getRootResource();
+
+ assertThat(CDOFunctions.getFolderContents(CDOResourceFolder.class).apply(root), both(AbstractPapyrusCDOTest.<CDOResourceFolder> hasSize(1)).and(hasItem(folder.getFolder().getFolder())));
+ }
+
+ @Test
+ public void testFolderContentsFunction_equals() {
+ Function<CDOResourceNode, Iterable<CDOResourceNode>> func1 = CDOFunctions.getFolderContents();
+ Function<CDOResourceNode, Iterable<CDOTextResource>> func2 = CDOFunctions.getFolderContents(CDOTextResource.class);
+ Function<CDOResourceNode, Iterable<CDOTextResource>> func3 = CDOFunctions.getFolderContents(CDOTextResource.class);
+
+ assertThat((Object)func1, not(equalTo((Object)func2)));
+ assertThat((Object)func2, not(equalTo((Object)func1)));
+ assertThat(func2 == func3, is(false));
+ assertThat(func2, equalTo(func3));
+ assertThat(func3, equalTo(func2));
+ }
+
+ @Test
+ public void testFolderContentsFunction_hashCode() {
+ Function<CDOResourceNode, Iterable<CDOResourceNode>> func1 = CDOFunctions.getFolderContents();
+ Function<CDOResourceNode, Iterable<CDOTextResource>> func2 = CDOFunctions.getFolderContents(CDOTextResource.class);
+ Function<CDOResourceNode, Iterable<CDOTextResource>> func3 = CDOFunctions.getFolderContents(CDOTextResource.class);
+
+ assertThat(func1.hashCode() == func2.hashCode(), is(CDOResourceNode.class.hashCode() == CDOTextResource.class.hashCode()));
+ assertThat(func2.hashCode(), is(func3.hashCode()));
+ }
+
+ @Test
+ public void testFolderContentsFunction_toString() {
+ Function<CDOResourceNode, Iterable<CDOResource>> func = CDOFunctions.getFolderContents(CDOResource.class);
+
+ assertThat(func.toString(), containsString("getFolderContents("));
+ }
+
+ //
+ // Test framework
+ //
+
+ static class StringAdapter implements IAdaptable {
+
+ private final CDOResourceNode node;
+
+ StringAdapter(CDOResourceNode node) {
+ this.node = node;
+ }
+
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ return (adapter == String.class) ? node.getPath() : null;
+ }
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/CDOPredicatesTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/CDOPredicatesTest.java
new file mode 100755
index 00000000..2fd3a926
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/CDOPredicatesTest.java
@@ -0,0 +1,222 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.util.tests;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.eresource.CDOTextResource;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.core.util.CDOPredicates;
+import org.junit.Test;
+
+import com.google.common.base.Objects;
+import com.google.common.base.Predicate;
+import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+
+
+/**
+ * This is the CDOPredicatesTest type. Enjoy.
+ */
+public class CDOPredicatesTest extends AbstractPapyrusCDOTest {
+
+ @Test
+ public void testAdaptsTo_instanceOf() {
+ Predicate<Object> pred = CDOPredicates.adaptsTo(CDOResourceNode.class);
+ CDOTransaction transaction = createTransaction();
+
+ CDOResource res = transaction.createResource(getResourcePath("/folder1/foo.uml"));
+ assertThat(pred.apply(res), is(true));
+
+ CDOResourceFolder folder = res.getFolder();
+ assertThat(pred.apply(folder), is(true));
+
+ assertThat(pred.apply(transaction.getRootResource()), is(true));
+
+ assertThat(pred.apply(transaction), is(false));
+ }
+
+ @Test
+ public void testAdaptsTo_adapter() {
+ Predicate<Object> pred = CDOPredicates.adaptsTo(String.class);
+ CDOTransaction transaction = createTransaction();
+
+ CDOResource res = transaction.createResource(getResourcePath("/folder1/foo.uml"));
+ assertThat(pred.apply(res), is(false));
+
+ StringAdapter adapter = new StringAdapter(res);
+ assertThat(pred.apply(adapter), is(true));
+ }
+
+ @Test
+ public void testHasExtension() {
+ Predicate<CDOResourceNode> hasUML = CDOPredicates.hasExtension("uml");
+ Predicate<CDOResourceNode> hasNone = CDOPredicates.hasExtension(null);
+ CDOTransaction transaction = createTransaction();
+
+ CDOResource res1 = transaction.createResource(getResourcePath("/folder1/foo.uml"));
+ CDOResource res2 = transaction.createResource(getResourcePath("/folder1/foo.notation"));
+ assertThat(hasUML.apply(res1), is(true));
+ assertThat(hasNone.apply(res1), is(false));
+ assertThat(hasUML.apply(res2), is(false));
+ assertThat(hasNone.apply(res2), is(false));
+
+ CDOResourceFolder folder = res1.getFolder();
+ assertThat(hasUML.apply(folder), is(false));
+ assertThat(hasNone.apply(folder), is(true));
+ assertThat(hasUML.apply(transaction.getRootResource()), is(false));
+ assertThat(hasNone.apply(transaction.getRootResource()), is(true));
+ }
+
+ @Test
+ public void testHasExtension_equals() {
+ Set<Predicate<CDOResourceNode>> set1 = ImmutableSet.of( //
+ CDOPredicates.hasExtension("uml"), //
+ CDOPredicates.hasExtension("notation"), //
+ CDOPredicates.hasExtension(null));
+ Set<Predicate<CDOResourceNode>> set2 = ImmutableSet.of( //
+ CDOPredicates.hasExtension("uml"), //
+ CDOPredicates.hasExtension("notation"), //
+ CDOPredicates.hasExtension(null));
+
+ @SuppressWarnings("unchecked")
+ Set<List<Predicate<CDOResourceNode>>> product = Sets.cartesianProduct(set1, set2);
+
+ int equalPairs = 0;
+ for(List<Predicate<CDOResourceNode>> next : product) {
+ if(next.get(0).equals(next.get(1))) {
+ equalPairs++;
+ }
+ }
+
+ assertThat(equalPairs, is(3));
+ }
+
+ @Test
+ public void testHasExtension_hashCode() {
+ Set<String> set1 = ImmutableSet.of("uml", "notation", "");
+ Set<String> set2 = ImmutableSet.of("uml", "notation", "");
+
+ @SuppressWarnings("unchecked")
+ Set<List<String>> product = Sets.cartesianProduct(set1, set2);
+
+ for(List<String> next : product) {
+ String ext1 = Strings.emptyToNull(next.get(0));
+ String ext2 = Strings.emptyToNull(next.get(1));
+
+ assertThat(CDOPredicates.hasExtension(ext1).hashCode() == CDOPredicates.hasExtension(ext2).hashCode(), //
+ is(Objects.hashCode(ext1) == Objects.hashCode(ext2)));
+ }
+ }
+
+ @Test
+ public void testHasExtension_toString() {
+ assertThat(CDOPredicates.hasExtension("uml").toString(), containsString("hasExtension("));
+ assertThat(CDOPredicates.hasExtension(null).toString(), containsString("hasNoExtension("));
+ }
+
+ @Test
+ public void testHasURIPrefix() {
+ CDOTransaction transaction = createTransaction();
+ CDOResourceFolder folder = transaction.createResourceFolder(getResourcePath("/folder1"));
+ CDOResource res1 = transaction.createResource(getResourcePath("/folder1/foo.uml"));
+ CDOTextResource res2 = transaction.createTextResource(getResourcePath("/folder2/foo.properties"));
+
+ URI prefix = folder.getURI();
+ if(!prefix.hasTrailingPathSeparator()) {
+ prefix = prefix.appendSegment("");
+ }
+
+ Predicate<CDOResourceNode> pred = CDOPredicates.hasURIPrefix(prefix);
+
+ assertThat(pred.apply(folder), is(false));
+ assertThat(pred.apply(res1), is(true));
+ assertThat(pred.apply(res2), is(false));
+ }
+
+ @Test
+ public void testHasURIPrefix_equals() {
+ Set<Predicate<CDOResourceNode>> set1 = ImmutableSet.of( //
+ CDOPredicates.hasURIPrefix(URI.createURI("cdo://repo1/folder1/")), //
+ CDOPredicates.hasURIPrefix(URI.createURI("cdo://repo1/folder2/")), //
+ CDOPredicates.hasURIPrefix(URI.createURI("cdo://repo1/")));
+ Set<Predicate<CDOResourceNode>> set2 = ImmutableSet.of( //
+ CDOPredicates.hasURIPrefix(URI.createURI("cdo://repo1/folder1/")), //
+ CDOPredicates.hasURIPrefix(URI.createURI("cdo://repo1/folder2/")), //
+ CDOPredicates.hasURIPrefix(URI.createURI("cdo://repo1/")));
+
+ @SuppressWarnings("unchecked")
+ Set<List<Predicate<CDOResourceNode>>> product = Sets.cartesianProduct(set1, set2);
+
+ int equalPairs = 0;
+ for(List<Predicate<CDOResourceNode>> next : product) {
+ if(next.get(0).equals(next.get(1))) {
+ equalPairs++;
+ }
+ }
+
+ assertThat(equalPairs, is(3));
+ }
+
+ @Test
+ public void testHasURIPrefix_hashCode() {
+ Set<String> set1 = ImmutableSet.of("cdo://repo1/folder1/", "cdo://repo1/folder2/", "cdo://repo1/");
+ Set<String> set2 = ImmutableSet.of("cdo://repo1/folder1/", "cdo://repo1/folder2/", "cdo://repo1/");
+
+ @SuppressWarnings("unchecked")
+ Set<List<String>> product = Sets.cartesianProduct(set1, set2);
+
+ for(List<String> next : product) {
+ URI uri1 = URI.createURI(next.get(0));
+ URI uri2 = URI.createURI(next.get(1));
+
+ assertThat(CDOPredicates.hasURIPrefix(uri1).hashCode() == CDOPredicates.hasURIPrefix(uri2).hashCode(), //
+ is(Objects.hashCode(uri1) == Objects.hashCode(uri2)));
+ }
+ }
+
+ @Test
+ public void testHasURIPrefix_toString() {
+ assertThat(CDOPredicates.hasURIPrefix(URI.createURI("cdo://repo1/folder1/")).toString(), containsString("hasURIPrefix("));
+ }
+
+ //
+ // Test framework
+ //
+
+ static class StringAdapter implements IAdaptable {
+
+ private final CDOResourceNode node;
+
+ StringAdapter(CDOResourceNode node) {
+ this.node = node;
+ }
+
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ return (adapter == String.class) ? node.getPath() : null;
+ }
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/JobWaiterTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/JobWaiterTest.java
new file mode 100755
index 00000000..181d7081
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/util/tests/JobWaiterTest.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.core.util.tests;
+
+import static org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest.lessThan;
+import static org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest.lessThanOrEqualTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.papyrus.cdo.core.util.JobWaiter;
+import org.junit.After;
+import org.junit.Test;
+
+import com.google.common.base.Stopwatch;
+import com.google.common.collect.Lists;
+
+
+/**
+ * This is the JobWaiterTest type. Enjoy.
+ */
+public class JobWaiterTest {
+
+ private Stopwatch watch = Stopwatch.createUnstarted();
+ private List<TestJob> jobsToClean = Lists.newArrayListWithExpectedSize(1);
+
+ @Test
+ public void testWaitForJob() throws InterruptedException {
+ Job job = new TestJob(3).start();
+
+ watch.start();
+ boolean done = JobWaiter.waitFor(job, 10, TimeUnit.SECONDS);
+ watch.stop();
+
+ assertThat(done, is(true));
+ assertThat(watch.elapsed(TimeUnit.SECONDS), lessThanOrEqualTo(3L));
+ }
+
+ @Test
+ public void testWaitForFamily() throws InterruptedException {
+ for(int i = 0; i < 3; i++) {
+ new TestJob(3).start();
+ }
+
+ watch.start();
+ boolean done = JobWaiter.waitFor(this, 10, TimeUnit.SECONDS);
+ watch.stop();
+
+ assertThat(done, is(true));
+ assertThat(watch.elapsed(TimeUnit.SECONDS), lessThanOrEqualTo(3L));
+ }
+
+ @Test
+ public void testWaitForJob_timeout() throws InterruptedException {
+ Job job = new TestJob(10).start();
+
+ watch.start();
+ boolean done = JobWaiter.waitFor(job, 3, TimeUnit.SECONDS);
+ watch.stop();
+
+ assertThat(done, is(false));
+ assertThat(watch.elapsed(TimeUnit.SECONDS), lessThan(5L));
+ }
+
+ @Test
+ public void testWaitForFamily_timeout() throws InterruptedException {
+ for(int i = 0; i < 3; i++) {
+ new TestJob(10).start();
+ }
+
+ watch.start();
+ boolean done = JobWaiter.waitFor(this, 3, TimeUnit.SECONDS);
+ watch.stop();
+
+ assertThat(done, is(false));
+ assertThat(watch.elapsed(TimeUnit.SECONDS), lessThan(5L));
+ }
+
+ //
+ // Test framework
+ //
+
+ @After
+ public void cleanUpJob() throws InterruptedException {
+ for(Job next : jobsToClean) {
+ next.cancel();
+ }
+
+ Job.getJobManager().join(this, null);
+ }
+
+ private class TestJob extends Job {
+
+ private final int iterations;
+
+ private final AtomicBoolean cancelled = new AtomicBoolean();
+
+ private Semaphore startSema = new Semaphore(0);
+
+ TestJob(int iterations) {
+ super("Test Job");
+
+ this.iterations = iterations;
+
+ jobsToClean.add(this);
+ }
+
+ @Override
+ public boolean belongsTo(Object family) {
+ return family == JobWaiterTest.this;
+ }
+
+ @Override
+ protected void canceling() {
+ cancelled.set(true);
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ startSema.release();
+
+ for(int i = iterations; (i > 0) && !cancelled.get(); i--) {
+ try {
+ Thread.sleep(1000L);
+ } catch (Exception e) {
+ // fine. Keep going
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ TestJob start() throws InterruptedException {
+ schedule();
+ startSema.acquire();
+ return this;
+ }
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/controlmode/tests/CDOControlModeTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/controlmode/tests/CDOControlModeTest.java
new file mode 100755
index 00000000..97b97e47
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/controlmode/tests/CDOControlModeTest.java
@@ -0,0 +1,357 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 431953 (fix start-up of selective services to require only their dependencies)
+ * Christian W. Damus - bugs 436998, 485220
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.controlmode.tests;
+
+import static com.google.common.base.Predicates.instanceOf;
+import static com.google.common.collect.Iterables.find;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeThat;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.cdo.core.resource.CDOAwareModelSet;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.core.tests.ResourceSetFactory;
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeManager;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.infra.services.resourceloading.IStrategyChooser;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Basic tests for controlled-resource support in CDO model repositories.
+ */
+public class CDOControlModeTest extends AbstractPapyrusCDOTest {
+
+ private final List<Runnable> cleanupActions = Lists.newArrayListWithExpectedSize(2);
+
+ private ServicesRegistry strategyRegistry;
+ private int oldControlModeStrategy;
+
+ public CDOControlModeTest() {
+ super();
+ }
+
+ @Test
+ public void testControlOneResource() {
+ CDOResource res = createUMLModel();
+ ResourceSet resourceSet = res.getResourceSet();
+
+ Package root = getPackage(res);
+ Package sub1 = root.getNestedPackages().get(0);
+
+ save(res); // save now so that all model elements are already persistent
+
+ control(sub1, "sub1.uml");
+ save(res);
+
+ // create a new view in which to re-load the model
+
+ CDOView view = createView();
+ CDOResource res2 = view.getResource(res.getPath());
+ Package root2 = getPackage(res2);
+
+ InternalEList<Package> subs = (InternalEList<Package>) root2.getNestedPackages();
+ assertProxy(subs.basicGet(0), "sub1.uml");
+ }
+
+ @Test
+ public void testControlOneResource_newlyAddedObjects() {
+ CDOResource res = createUMLModel();
+ Package root = getPackage(res);
+
+ Package sub1 = root.getNestedPackages().get(0);
+
+ control(sub1, "sub1.uml");
+
+ save(res);
+
+ // create a new view in which to re-load the model
+
+ CDOView view = createView();
+ CDOResource res2 = view.getResource(res.getPath());
+ Package root2 = getPackage(res2);
+
+ InternalEList<Package> subs = (InternalEList<Package>) root2.getNestedPackages();
+ assertProxy(subs.basicGet(0), "sub1.uml");
+ }
+
+ @Test
+ public void testUncontrolOneResource() {
+ CDOResource res = createUMLModel();
+ Package root = getPackage(res);
+
+ Package sub1 = root.getNestedPackages().get(0);
+
+ control(sub1, "sub1.uml");
+
+ save(res);
+
+ // create a new view in which to re-load the model
+
+ CDOView view = createView();
+ CDOResource res2 = view.getResource(res.getPath());
+ Package root2 = getPackage(res2);
+
+ InternalEList<Package> subs = (InternalEList<Package>) root2.getNestedPackages();
+ assumeProxy(subs.basicGet(0), "sub1.uml");
+
+ uncontrol(sub1);
+
+ save(res);
+
+ view = createView();
+ res2 = view.getResource(res.getPath());
+ root2 = getPackage(res2);
+
+ subs = (InternalEList<Package>) root2.getNestedPackages();
+ assertNotProxy(subs.basicGet(0));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void setControlModeStrategy() throws Exception {
+ final int MAGIC_NUMBER_OF_DONT_LOAD_ANYTHING_STRATEGY = 2;
+
+ strategyRegistry = new ExtensionServicesRegistry(Activator.PLUGIN_ID);
+
+ // We know that it has no dependencies
+ strategyRegistry.startServicesByClassKeys(IStrategyChooser.class);
+ IStrategyChooser chooser = strategyRegistry.getService(IStrategyChooser.class);
+
+ oldControlModeStrategy = chooser.getCurrentStrategy();
+ chooser.setStrategy(MAGIC_NUMBER_OF_DONT_LOAD_ANYTHING_STRATEGY);
+ }
+
+ @After
+ public void restoreControlModeStrategy() throws Exception {
+ if (strategyRegistry != null) {
+ try {
+ strategyRegistry.getService(IStrategyChooser.class).setStrategy(oldControlModeStrategy);
+ } finally {
+ try {
+ strategyRegistry.disposeRegistry();
+ } finally {
+ strategyRegistry = null;
+ }
+ }
+ }
+ }
+
+ @After
+ public void cleanup() {
+ for (Runnable next : cleanupActions) {
+ next.run();
+ }
+
+ cleanupActions.clear();
+ }
+
+ void cleanupLater(Runnable runnable) {
+ cleanupActions.add(runnable);
+ }
+
+ @ResourceSetFactory
+ public ModelSet createModelSet() throws ServiceException {
+ ModelSet result = null;
+
+ // Since Mars, an IUncontrolledObjectsProvider service is required by the control-mode framework
+ final ServicesRegistry services = new ExtensionServicesRegistry(Activator.PLUGIN_ID);
+
+ try {
+ cleanupLater(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ services.disposeRegistry();
+ } catch (ServiceException e) {
+ // ignore (best-effort clean-up)
+ }
+ }
+ });
+
+ services.add(ModelSet.class, Integer.MAX_VALUE, new CDOAwareModelSet());
+ services.startRegistry();
+
+ result = services.getService(ModelSet.class);
+ } catch (ServiceException e) {
+ Bundle me = FrameworkUtil.getBundle(getClass());
+ Platform.getLog(me).log(new Status(IStatus.ERROR, me.getSymbolicName(), "Exception in creating service registry for ModelSet", e));
+ result = services.getService(ModelSet.class);
+ }
+
+ return result;
+ }
+
+ CDOResource createUMLModel() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource result = transaction.createResource(getResourcePath("test.uml"));
+
+ try {
+ ModelSet model = ServiceUtilsForResourceSet.getInstance().getModelSet(transaction.getResourceSet());
+ model.createModels(result.getURI());
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Failed to initialize Papyrus model: " + e.getLocalizedMessage());
+ }
+
+ result.getContents().add(createTestPackageTree());
+ return result;
+ }
+
+ Package createTestPackageTree() {
+ Package result = createPackage("test");
+
+ Package sub1 = createPackage("sub1");
+ result.getNestedPackages().add(sub1);
+ sub1.getNestedPackages().add(createPackage("sub1sub1"));
+ sub1.getNestedPackages().add(createPackage("sub1sub2"));
+ result.getNestedPackages().add(createPackage("sub2"));
+
+ return result;
+ }
+
+ Package createPackage(String name) {
+ Package result = UMLFactory.eINSTANCE.createPackage();
+ result.setName(name);
+ result.setURI(String.format("http://www.eclipse.org/papyrus/test/%s/2013", name));
+ return result;
+ }
+
+ Package getPackage(Resource resource) {
+ return (Package) find(resource.getContents(), instanceOf(Package.class), null);
+ }
+
+ void save(Resource context) {
+ try {
+ ServiceUtilsForResource.getInstance().getModelSet(context).save(new NullProgressMonitor());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to save model: " + e.getLocalizedMessage());
+ }
+ }
+
+ private ControlModeRequest request(EObject objectToControl, String fragmentName) {
+ ControlModeRequest result = null;
+
+ try {
+ ModelSet modelSet = ServiceUtilsForEObject.getInstance().getModelSet(objectToControl);
+ URI fragmentURI = objectToControl.eResource().getURI().trimSegments(1).appendSegment(fragmentName);
+ result = new ControlModeRequest(modelSet.getTransactionalEditingDomain(), objectToControl, fragmentURI);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to create ControlModeRequest: " + e.getLocalizedMessage());
+ }
+
+ return result;
+ }
+
+ URI control(EObject objectToControl, String fragmentName) {
+ ControlModeRequest request = request(objectToControl, fragmentName);
+ ICommand control = ControlModeManager.getInstance().getControlCommand(request);
+
+ try {
+ control.execute(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ fail("Failed to execute control-mode command: " + e.getLocalizedMessage());
+ }
+
+ return request.getNewURI();
+ }
+
+ private ControlModeRequest request(EObject objectToControl) {
+ ControlModeRequest result = null;
+
+ try {
+ ModelSet modelSet = ServiceUtilsForEObject.getInstance().getModelSet(objectToControl);
+ result = new ControlModeRequest(modelSet.getTransactionalEditingDomain(), objectToControl);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to create ControlModeRequest: " + e.getLocalizedMessage());
+ }
+
+ return result;
+ }
+
+ void uncontrol(EObject objectToControl) {
+ ICommand uncontrol = ControlModeManager.getInstance().getUncontrolCommand(request(objectToControl));
+
+ try {
+ uncontrol.execute(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ fail("Failed to execute control-mode command: " + e.getLocalizedMessage());
+ }
+ }
+
+ void assertProxy(EObject object, String uriSubString) {
+ assertThat("Not a proxy", object.eIsProxy(), is(true));
+ assertThat(EcoreUtil.getURI(object).toString(), containsString(uriSubString));
+ }
+
+ void assumeProxy(EObject object, String uriSubString) {
+ assumeThat("Not a proxy", object.eIsProxy(), is(true));
+ assumeThat(EcoreUtil.getURI(object).toString(), containsString(uriSubString));
+ }
+
+ void assertNotProxy(EObject object) {
+ assertThat("Object is a proxy", object.eIsProxy(), is(false));
+ }
+
+ void waitForUpdate(CDOView view, long updateTime) {
+ assertThat("Timed out waiting for read-only view to update.", view.waitForUpdate(updateTime, 5000L), is(true));
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/AbstractModelExportTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/AbstractModelExportTest.java
new file mode 100755
index 00000000..5eb2c209
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/AbstractModelExportTest.java
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429242
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter.tests;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.resource.CDOAwareModelSet;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceMultiException;
+import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.uml2.common.util.UML2Util;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.collect.Iterables;
+
+
+/**
+ * This is the AbstractModelExportTest type. Enjoy.
+ */
+public abstract class AbstractModelExportTest extends AbstractPapyrusCDOTest {
+
+ protected static final String DEPENDENT_MODEL_NAME = "dependent.uml";
+
+ protected static final String DEPENDENCY_MODEL_NAME = "dependency.uml";
+
+ protected static final String DEPENDENT_MODEL_DI = "dependent.di";
+
+ protected static final String DEPENDENCY_MODEL_DI = "dependency.di";
+
+ protected void createModels() throws Exception {
+ // create the model that the other model depends on
+ ServicesRegistry[] services1 = { null };
+ final ModelSet modelSet1 = createModelSet(DEPENDENCY_MODEL_NAME, services1);
+
+ UmlModel uml1 = (UmlModel) modelSet1.getModel(UmlModel.MODEL_ID);
+ final Model model1 = (Model) uml1.lookupRoot();
+ TransactionalEditingDomain ted1 = modelSet1.getTransactionalEditingDomain();
+ RecordingCommand recording1 = new RecordingCommand(ted1) {
+
+ @Override
+ protected void doExecute() {
+ model1.createOwnedClass("Superclass", false);
+
+ try {
+ modelSet1.save(new NullProgressMonitor());
+ } catch (IOException e) {
+ Activator.log.error("The modelSet of the fixture failed on save", e); // $NON-NLS-1$
+ }
+ }
+ };
+ ted1.getCommandStack().execute(recording1);
+
+ // create the model that depends on the first one
+ ServicesRegistry[] services2 = { null };
+ final ModelSet modelSet2 = createModelSet(DEPENDENT_MODEL_NAME, services2);
+
+ UmlModel uml2 = (UmlModel) modelSet2.getModel(UmlModel.MODEL_ID);
+ final Model model2 = (Model) uml2.lookupRoot();
+ TransactionalEditingDomain ted2 = modelSet2.getTransactionalEditingDomain();
+ RecordingCommand recording2 = new RecordingCommand(ted2) {
+
+ @Override
+ protected void doExecute() {
+ Class subclass = model2.createOwnedClass("Subclass", false);
+
+ // add the dependency
+ Model dependency = UML2Util.load(modelSet2, getTestResourceURI(DEPENDENCY_MODEL_NAME), UMLPackage.Literals.MODEL);
+ model2.createPackageImport(dependency);
+ subclass.createGeneralization((Class) dependency.getOwnedType("Superclass"));
+ try {
+ modelSet2.save(new NullProgressMonitor());
+ } catch (IOException e) {
+ Activator.log.error("The modelSet of the fixture failed on save", e); // $NON-NLS-1$
+ }
+ }
+ };
+ ted2.getCommandStack().execute(recording2);
+
+ // dispose
+ services1[0].disposeRegistry();
+ services2[0].disposeRegistry();
+ }
+
+ protected ModelSet createModelSet(String name, ServicesRegistry[] outServices) throws Exception {
+
+ outServices[0] = new ExtensionServicesRegistry(Activator.PLUGIN_ID);
+
+ try {
+ // start the ModelSet and its dependencies
+ outServices[0].startServicesByClassKeys(ModelSet.class);
+ } catch (ServiceMultiException e) {
+ for (ServiceNotFoundException next : Iterables.filter(e.getExceptions(), ServiceNotFoundException.class)) {
+ assertThat(next.getLocalizedMessage(), not(containsString("ModelSet")));
+ }
+ }
+
+ ModelSet result = outServices[0].getService(ModelSet.class);
+
+ assumeThat(result, instanceOf(CDOAwareModelSet.class));
+
+ result.createModels(getTestResourceURI(name));
+
+ // load blank model
+ Resource uml = ((AbstractBaseModel) result.getModel(UmlModel.MODEL_ID)).getResource();
+ Resource notation = ((AbstractBaseModel) result.getModel(NotationModel.MODEL_ID)).getResource();
+ Resource di = ((AbstractBaseModel) result.getModel(DiModel.DI_MODEL_ID)).getResource();
+ loadTemplate("empty", "model", uml, notation, di);
+
+ return result;
+ }
+
+ protected IModelTransferNode getNode(IModelTransferConfiguration config, URI uri) {
+ IModelTransferNode result = null;
+
+ for (IModelTransferNode next : config.getModelsToTransfer()) {
+ if (next.getPrimaryResourceURI().equals(uri)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/AllModelExportTests.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/AllModelExportTests.java
new file mode 100755
index 00000000..4abf4cd3
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/AllModelExportTests.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * This is the AllModelExportTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ ModelExportMappingTest.class, ModelExporterTest.class })
+public class AllModelExportTests {
+
+ public AllModelExportTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/ModelExportMappingTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/ModelExportMappingTest.java
new file mode 100755
index 00000000..f96f8aea
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/ModelExportMappingTest.java
@@ -0,0 +1,172 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter.tests;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.either;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.cdo.core.exporter.IModelExportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.core.tests.TestProject;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * This is the ModelExportMappingTest type. Enjoy.
+ */
+public class ModelExportMappingTest extends AbstractModelExportTest {
+
+ private IModelTransferConfiguration config;
+
+ private IModelExportMapping fixture;
+
+ @Rule
+ public TestProject hasDependencies = new TestProject("has_dependencies");
+
+ @Rule
+ public TestProject hasDependents = new TestProject("has_dependents");
+
+ public ModelExportMappingTest() {
+ super();
+ }
+
+ @Test
+ public void testValidation_ok() throws Exception {
+ URI uri1 = getTestResourceURI(DEPENDENT_MODEL_DI);
+ URI uri2 = getTestResourceURI(DEPENDENCY_MODEL_DI);
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ fixture.mapTo(getNode(uri1), new Path("/has_dependencies/exported.di"));
+ fixture.mapTo(getNode(uri2), new Path("/has_dependents/exported.di"));
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getSeverity(), is(Diagnostic.OK));
+ assertThat(problems.getChildren().size(), is(0));
+ }
+
+ @Test
+ public void testValidation_resourceExists() throws Exception {
+ URI uri1 = getTestResourceURI(DEPENDENT_MODEL_DI);
+ URI uri2 = getTestResourceURI(DEPENDENCY_MODEL_DI);
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ fixture.mapTo(getNode(uri1), new Path("/has_dependencies/model.di"));
+ fixture.mapTo(getNode(uri2), new Path("/has_dependents/exported.di"));
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ Diagnostic child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.ERROR));
+ assertThat(child.getMessage(), containsString("esource already exists"));
+ assertThat(child.getData().get(0), sameInstance((Object) getNode(uri1)));
+ }
+
+ @Test
+ public void testValidation_nonUniqueMappings() throws Exception {
+ URI uri1 = getTestResourceURI(DEPENDENT_MODEL_DI);
+ URI uri2 = getTestResourceURI(DEPENDENCY_MODEL_DI);
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ fixture.mapTo(getNode(uri1), new Path("/has_dependencies/exported.di"));
+ fixture.mapTo(getNode(uri2), new Path("/has_dependencies/exported.di"));
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ Diagnostic child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.ERROR));
+ assertThat(child.getMessage(), containsString("Multiple models map"));
+ assertThat(child.getData().get(0), either(sameInstance((Object) getNode(uri1))).or(sameInstance((Object) getNode(uri2))));
+ }
+
+ @Test
+ public void testValidation_mappingAbsent() {
+ URI uri1 = getTestResourceURI(DEPENDENT_MODEL_DI);
+ URI uri2 = getTestResourceURI(DEPENDENCY_MODEL_DI);
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ fixture.mapTo(getNode(uri1), new Path("/has_dependencies/exported.di"));
+ // don't map uri2
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ Diagnostic child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.ERROR));
+ assertThat(child.getMessage(), containsString("No mapping"));
+
+ Object actual = child.getData().get(0);
+ Object expected = getNode(uri2);
+ assertThat(actual, sameInstance(expected));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createTestFixture() throws Exception {
+ ResourceSet rset = getInternalCheckout().getView().getResourceSet();
+ createModels();
+
+ config = IModelTransferConfiguration.Factory.EXPORT.create(new IModelTransferOperation.Context() {
+
+ @Override
+ public Diagnostic run(IModelTransferOperation operation) {
+ operation.run(new NullProgressMonitor());
+ return Diagnostic.OK_INSTANCE;
+ }
+ }, rset);
+
+ fixture = IModelExportMapping.Factory.DEFAULT.create(config);
+ fixture.setCheckout(getCheckout());
+ }
+
+ @After
+ public void disposeTestFixture() {
+ fixture = null;
+
+ if (null != config) {
+ config.dispose();
+ config = null;
+ }
+ }
+
+ IModelTransferNode getNode(URI uri) {
+ return getNode(config, uri);
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/ModelExporterTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/ModelExporterTest.java
new file mode 100755
index 00000000..e0c0a136
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/exporter/tests/ModelExporterTest.java
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.exporter.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.papyrus.cdo.core.exporter.IModelExportMapping;
+import org.eclipse.papyrus.cdo.core.exporter.IModelExporter;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.core.tests.TestProject;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the ModelImporterTest type. Enjoy.
+ */
+public class ModelExporterTest extends AbstractModelExportTest {
+
+ private IModelTransferConfiguration config;
+
+ private IModelExporter fixture;
+
+ @Rule
+ public TestProject hasDependencies = new TestProject("has_dependencies");
+
+ @Rule
+ public TestProject hasDependents = new TestProject("has_dependents");
+
+ public ModelExporterTest() {
+ super();
+ }
+
+ @Test
+ public void testExportWithDependencies() {
+ URI uri1 = getTestResourceURI(DEPENDENT_MODEL_DI);
+ URI uri2 = getTestResourceURI(DEPENDENCY_MODEL_DI);
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ IModelExportMapping mapping = IModelExportMapping.Factory.DEFAULT.create(config);
+ mapping.setCheckout(getCheckout());
+ mapping.mapTo(getNode(uri1), new Path("/has_dependencies/exported.di"));
+ mapping.mapTo(getNode(uri2), new Path("/has_dependents/exported.di"));
+
+ Diagnostic problems = fixture.exportModels(mapping);
+ assertThat(problems.getSeverity(), is(Diagnostic.OK));
+ assertThat(problems.getChildren().size(), is(0));
+
+ assertResource(new Path("/has_dependencies/exported.di"), "di");
+ assertResource(new Path("/has_dependencies/exported.uml"), "uml");
+ assertResource(new Path("/has_dependencies/exported.notation"), "notation");
+
+ assertResource(new Path("/has_dependents/exported.di"), "di");
+ assertResource(new Path("/has_dependents/exported.uml"), "uml");
+ assertResource(new Path("/has_dependents/exported.notation"), "notation");
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createTestFixture() throws Exception {
+ ResourceSet rset = getInternalCheckout().getView().getResourceSet();
+ createModels();
+
+ config = IModelTransferConfiguration.Factory.EXPORT.create(new IModelTransferOperation.Context() {
+
+ @Override
+ public Diagnostic run(IModelTransferOperation operation) {
+ operation.run(new NullProgressMonitor());
+ return Diagnostic.OK_INSTANCE;
+ }
+ }, rset);
+
+ fixture = IModelExporter.Factory.DEFAULT.create();
+ }
+
+ @After
+ public void disposeTestFixture() {
+ fixture = null;
+
+ if (null != config) {
+ config.dispose();
+ config = null;
+ }
+ }
+
+ void assertResource(IPath path, final String metamodel) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ assertThat("Does not exist: " + file.getLocation(), file.exists(), is(true));
+
+ File osFile = new File(file.getLocationURI());
+ assertThat(osFile.length() > 0L, is(true));
+
+ ResourceSet rset = new ResourceSetImpl();
+ try {
+ Resource resource = rset.getResource(URI.createPlatformResourceURI(path.toString(), true), true);
+
+ assertThat(Iterables.size(Iterables.filter(resource.getContents(), new Predicate<EObject>() {
+
+ @Override
+ public boolean apply(EObject input) {
+ boolean result = false;
+
+ if (input != null) {
+ EPackage epackage = input.eClass().getEPackage();
+ result = epackage.getName().equalsIgnoreCase(metamodel);
+ }
+
+ return result;
+ }
+ })), is(1));
+
+ } finally {
+ cleanUp(rset);
+ }
+ }
+
+ protected void cleanUp(ResourceSet rset) {
+ EMFHelper.unload(rset);
+ }
+
+ IModelTransferNode getNode(URI uri) {
+ return getNode(config, uri);
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/expressions/tests/AllExpressionsTests.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/expressions/tests/AllExpressionsTests.java
new file mode 100755
index 00000000..fb91d3e9
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/expressions/tests/AllExpressionsTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.expressions.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * This is the AllExpressionsTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ EObjectPropertyTesterTest.class })
+public class AllExpressionsTests {
+
+ public AllExpressionsTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/expressions/tests/EObjectPropertyTesterTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/expressions/tests/EObjectPropertyTesterTest.java
new file mode 100755
index 00000000..2b4c0dc8
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/expressions/tests/EObjectPropertyTesterTest.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.expressions.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.internal.core.expressions.EObjectPropertyTester;
+import org.junit.Test;
+
+
+/**
+ * This is the EObjectPropertyTesterTest type. Enjoy.
+ */
+public class EObjectPropertyTesterTest extends AbstractPapyrusCDOTest {
+
+ private final EObjectPropertyTester fixture = new EObjectPropertyTester();
+
+ @Test
+ public void testTest_isCDOObject() {
+ CDOResource res = createTransaction().createResource(getResourcePath("foo.uml"));
+
+ assertThat(fixture.test(res, "isCDOObject", null, true), is(true));
+
+ assertThat(fixture.test(EcorePackage.Literals.ECLASS, "isCDOObject", null, true), is(false));
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/AllModelImportTests.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/AllModelImportTests.java
new file mode 100755
index 00000000..4e2961a3
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/AllModelImportTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * This is the AllModelImportTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ModelImportConfigurationTest.class,
+ OneToOneModelImportMappingTest.class,
+ ManyToOneModelImportMappingTest.class, ModelImporterTest.class})
+public class AllModelImportTests {
+
+ public AllModelImportTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ManyToOneModelImportMappingTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ManyToOneModelImportMappingTest.java
new file mode 100755
index 00000000..c7d13525
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ManyToOneModelImportMappingTest.java
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.Set;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.core.importer.ModelTransferMappingListenerAdapter;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.core.tests.TestProject;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+
+/**
+ * This is the ManyToOneModelImportMappingTest type. Enjoy.
+ */
+public class ManyToOneModelImportMappingTest extends AbstractPapyrusCDOTest {
+
+ private IModelTransferConfiguration config;
+
+ private IModelImportMapping fixture;
+
+ @Rule
+ public TestProject hasDependencies = new TestProject("has_dependencies");
+
+ @Rule
+ public TestProject hasDependents = new TestProject("has_dependents");
+
+ public ManyToOneModelImportMappingTest() {
+ super();
+ }
+
+ @Test
+ public void testDefaultMappings() {
+ URI uri1 = hasDependencies.getResourceURI("model.di");
+ URI uri2 = hasDependents.getResourceURI("Datatypes.di");
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ assertThat(fixture.getMapping(getNode(uri1)), is((IPath) new Path("/has_dependencies/model.di")));
+ assertThat(fixture.getMapping(getNode(uri2)), is((IPath) new Path("/has_dependencies/model.di")));
+ }
+
+ @Test
+ public void testMappings() {
+ URI uri1 = hasDependencies.getResourceURI("model.di");
+ URI uri2 = hasDependents.getResourceURI("Datatypes.di");
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ class Test extends ModelTransferMappingListenerAdapter {
+
+ Set<IModelTransferNode> notified = Sets.newHashSet();
+
+ @Override
+ public void modelTransferMappingChanged(IModelTransferNode node) {
+ notified.add(node);
+ }
+ }
+ Test test = new Test();
+ fixture.addModelTransferMappingListener(test);
+
+ IPath path = new Path("/myfolder/MyModel.di");
+ fixture.mapTo(getNode(uri1), path);
+
+ assertThat(test.notified, is((Set<IModelTransferNode>) ImmutableSet.of(getNode(uri1), getNode(uri2))));
+
+ assertThat(fixture.getMapping(getNode(uri1)), is(path));
+ assertThat(fixture.getMapping(getNode(uri2)), is(path));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createTestFixture() {
+ config = IModelTransferConfiguration.Factory.IMPORT.create(new IModelTransferOperation.Context() {
+
+ public Diagnostic run(IModelTransferOperation operation) {
+ operation.run(new NullProgressMonitor());
+ return Diagnostic.OK_INSTANCE;
+ }
+ }, null);
+
+ fixture = IModelImportMapping.Factory.MANY_TO_ONE.create(config);
+ fixture.setCheckout(getCheckout());
+ }
+
+ @After
+ public void disposeTestFixture() {
+ fixture = null;
+
+ config.dispose();
+ config = null;
+ }
+
+ IModelTransferNode getNode(URI uri) {
+ IModelTransferNode result = null;
+
+ for (IModelTransferNode next : config.getModelsToTransfer()) {
+ if (next.getPrimaryResourceURI().equals(uri)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ModelImportConfigurationTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ModelImportConfigurationTest.java
new file mode 100755
index 00000000..074f746d
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ModelImportConfigurationTest.java
@@ -0,0 +1,198 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer.tests;
+
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.core.tests.TestProject;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the ModelImportConfigurationTest type. Enjoy.
+ */
+public class ModelImportConfigurationTest {
+
+ private IModelTransferConfiguration fixture;
+
+ @Rule
+ public TestProject isolated = new TestProject("isolated");
+
+ @Rule
+ public TestProject hasDependencies = new TestProject("has_dependencies");
+
+ @Rule
+ public TestProject hasDependents = new TestProject("has_dependents");
+
+ public ModelImportConfigurationTest() {
+ super();
+ }
+
+ @Test
+ public void testIsolatedModel() {
+ URI uri = isolated.getResourceURI("model.di");
+
+ fixture.addModelToTransfer(uri);
+
+ assertThat(fixture.getModelsToTransfer().size(), is(1));
+ IModelTransferNode node = Iterables.getOnlyElement(fixture.getModelsToTransfer());
+
+ assertThat(node.getPrimaryResourceURI(), is(uri));
+ assertThat(node.getDependencies().size(), is(0));
+ assertThat(node.getDependents().size(), is(0));
+
+ assertThat(node.getResourceURIs().size(), is(3));
+ assertThat(node.getResourceURIs(), hasItem(uri));
+ assertThat(node.getResourceURIs(), hasItem(uml(uri)));
+ assertThat(node.getResourceURIs(), hasItem(notation(uri)));
+ }
+
+ @Test
+ public void testModelHavingDependencies() {
+ URI uri = hasDependencies.getResourceURI("model.di");
+
+ fixture.addModelToTransfer(uri);
+
+ assertThat(fixture.getModelsToTransfer().size(), is(1));
+ IModelTransferNode node = Iterables.getOnlyElement(fixture.getModelsToTransfer());
+
+ assertThat(node.getPrimaryResourceURI(), is(uri));
+
+ assertThat(node.getDependencies().size(), is(1));
+ IModelTransferNode dep = Iterables.getOnlyElement(node.getDependencies());
+ assertThat(dep.getPrimaryResourceURI(), is(hasDependents.getResourceURI("Datatypes.di")));
+
+ assertThat(node.getDependents().size(), is(0));
+
+ assertThat(node.getResourceURIs().size(), is(3));
+ assertThat(node.getResourceURIs(), hasItem(uri));
+ assertThat(node.getResourceURIs(), hasItem(uml(uri)));
+ assertThat(node.getResourceURIs(), hasItem(notation(uri)));
+ }
+
+ @Test
+ public void testModelHavingDependents() {
+ URI uri = hasDependents.getResourceURI("Datatypes.di");
+
+ fixture.addModelToTransfer(uri);
+
+ assertThat(fixture.getModelsToTransfer().size(), is(1));
+ IModelTransferNode node = Iterables.getOnlyElement(fixture.getModelsToTransfer());
+
+ assertThat(node.getPrimaryResourceURI(), is(uri));
+
+ assertThat(node.getDependencies().size(), is(0));
+
+ assertThat(node.getDependents().size(), is(1));
+ IModelTransferNode dep = Iterables.getOnlyElement(node.getDependents());
+ assertThat(dep.getPrimaryResourceURI(), is(hasDependencies.getResourceURI("model.di")));
+
+ assertThat(node.getResourceURIs().size(), is(3));
+ assertThat(node.getResourceURIs(), hasItem(uri));
+ assertThat(node.getResourceURIs(), hasItem(uml(uri)));
+ assertThat(node.getResourceURIs(), hasItem(notation(uri)));
+ }
+
+ @Test
+ public void testValidationOfDependents() {
+ URI uri = hasDependents.getResourceURI("Datatypes.di");
+
+ fixture.addModelToTransfer(uri);
+
+ assertThat(fixture.getModelsToTransfer().size(), is(1));
+ IModelTransferNode node = Iterables.getOnlyElement(fixture.getModelsToTransfer());
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ Diagnostic child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.WARNING));
+ assertThat(child.getData().get(0), sameInstance((Object)node));
+ assertThat(child.getData().get(1), is((Object)node.getDependents()));
+
+ fixture.addModelToTransfer(hasDependencies.getResourceURI("model.di"));
+
+ problems = fixture.validate();
+
+ assertThat(problems.getSeverity(), is(Diagnostic.OK));
+ assertThat(problems.getChildren().size(), is(0));
+ }
+
+ @Test
+ public void testValidationOfDependencies() {
+ URI uri = hasDependencies.getResourceURI("model.di");
+
+ fixture.addModelToTransfer(uri);
+
+ assertThat(fixture.getModelsToTransfer().size(), is(1));
+ IModelTransferNode node = Iterables.getOnlyElement(fixture.getModelsToTransfer());
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ Diagnostic child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.INFO));
+ assertThat(child.getData().get(0), sameInstance((Object)node));
+ assertThat(child.getData().get(1), is((Object)node.getDependencies()));
+
+ fixture.addModelToTransfer(hasDependents.getResourceURI("Datatypes.di"));
+
+ problems = fixture.validate();
+
+ assertThat(problems.getSeverity(), is(Diagnostic.OK));
+ assertThat(problems.getChildren().size(), is(0));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createTestFixture() {
+ fixture = IModelTransferConfiguration.Factory.IMPORT.create(new IModelTransferOperation.Context() {
+
+ public Diagnostic run(IModelTransferOperation operation) {
+ operation.run(new NullProgressMonitor());
+ return Diagnostic.OK_INSTANCE;
+ }
+ }, null);
+ }
+
+ @After
+ public void disposeTestFixture() {
+ fixture.dispose();
+ fixture = null;
+ }
+
+ URI uml(URI uri) {
+ return uri.trimFileExtension().appendFileExtension("uml");
+ }
+
+ URI notation(URI uri) {
+ return uri.trimFileExtension().appendFileExtension("notation");
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ModelImporterTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ModelImporterTest.java
new file mode 100755
index 00000000..e2db3b1a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/ModelImporterTest.java
@@ -0,0 +1,202 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer.tests;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelImporter;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.core.tests.TestProject;
+import org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.io.CharStreams;
+
+/**
+ * This is the ModelImporterTest type. Enjoy.
+ */
+public class ModelImporterTest extends AbstractPapyrusCDOTest {
+
+ private IModelTransferConfiguration config;
+
+ private IModelImporter fixture;
+
+ @Rule
+ public TestProject hasDependencies = new TestProject("has_dependencies");
+
+ @Rule
+ public TestProject hasDependents = new TestProject("has_dependents");
+
+ public ModelImporterTest() {
+ super();
+ }
+
+ @Test
+ public void testOneToOneImport() {
+ URI uri1 = hasDependencies.getResourceURI("model.di");
+ URI uri2 = hasDependents.getResourceURI("Datatypes.di");
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ IModelImportMapping mapping = IModelImportMapping.Factory.ONE_TO_ONE.create(config);
+ mapping.setCheckout(getCheckout());
+
+ long commitTime = System.currentTimeMillis();
+
+ Diagnostic problems = fixture.importModels(mapping);
+ assertThat(problems.getSeverity(), is(Diagnostic.OK));
+ assertThat(problems.getChildren().size(), is(0));
+
+ CDOView view = getInternalCheckout().getView();
+ view.waitForUpdate(commitTime, 10000L);
+
+ assertResource(view.getResource("has_dependencies/model.di"));
+ assertResource(view.getResource("has_dependencies/model.uml"));
+ assertResource(view.getResource("has_dependencies/model.notation"));
+
+ assertResource(view.getResource("has_dependents/Datatypes.di"));
+ assertResource(view.getResource("has_dependents/Datatypes.uml"));
+ assertResource(view.getResource("has_dependents/Datatypes.notation"));
+ }
+
+ @Test
+ public void testManyToOneImport() {
+ URI uri1 = hasDependencies.getResourceURI("model.di");
+ URI uri2 = hasDependents.getResourceURI("Datatypes.di");
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ IModelImportMapping mapping = IModelImportMapping.Factory.MANY_TO_ONE.create(config);
+ mapping.setCheckout(getCheckout());
+ mapping.mapTo(Iterables.get(config.getModelsToTransfer(), 0), new Path("my_import/combined.di"));
+
+ long commitTime = System.currentTimeMillis();
+
+ Diagnostic problems = fixture.importModels(mapping);
+ assertThat(problems.getSeverity(), is(Diagnostic.OK));
+ assertThat(problems.getChildren().size(), is(0));
+
+ CDOView view = getInternalCheckout().getView();
+ view.waitForUpdate(commitTime, 10000L);
+
+ assertResource(view.getResource("my_import/combined.di"), "di", 1);
+ assertResource(view.getResource("my_import/combined.uml"), "uml", 2);
+ assertResource(view.getResource("my_import/combined.notation"), "notation", 2);
+
+ SashWindowsMngr mngr = (SashWindowsMngr) EcoreUtil.getObjectByType(view.getResource("my_import/combined.di").getContents(), DiPackage.Literals.SASH_WINDOWS_MNGR);
+ assertThat(mngr.getSashModel().getWindows().size(), is(2));
+ assertThat(mngr.getPageList().getAvailablePage().size(), is(3));
+ }
+
+ /**
+ * Tests that, following an import, any workspace resources that reference
+ * resources that have now been imported but that were not, themselves,
+ * imported, now reference the imported resources.
+ */
+ @Test
+ public void testWorkspaceResourcesURIsUpdated() throws Exception {
+
+ config.addModelToTransfer(hasDependents.getResourceURI("Datatypes.di"));
+
+ IModelImportMapping mapping = IModelImportMapping.Factory.ONE_TO_ONE.create(config);
+ mapping.setCheckout(getCheckout());
+
+ fixture.importModels(mapping);
+
+ IFile notImported = hasDependencies.getFile("model.uml");
+ Reader reader = new InputStreamReader(notImported.getContents(), notImported.getCharset());
+ String text = CharStreams.toString(reader);
+ reader.close();
+
+ assertThat(text, not(containsString("href=\"../has_dependents/Datatypes.uml")));
+ assertThat(text, containsString("href=\"cdo.checkout://1/has_dependents/Datatypes.uml"));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createTestFixture() {
+ config = IModelTransferConfiguration.Factory.IMPORT.create(new IModelTransferOperation.Context() {
+
+ public Diagnostic run(IModelTransferOperation operation) {
+ operation.run(new NullProgressMonitor());
+ return Diagnostic.OK_INSTANCE;
+ }
+ }, null);
+
+ fixture = IModelImporter.Factory.DEFAULT.create();
+ }
+
+ @After
+ public void disposeTestFixture() {
+ fixture = null;
+
+ config.dispose();
+ config = null;
+ }
+
+ void assertResource(Resource resource) {
+ assertThat(resource, notNullValue());
+ assertThat(resource.getContents().size(), not(0));
+ }
+
+ void assertResource(Resource resource, final String metamodel, int count) {
+ assertResource(resource);
+
+ assertThat(Iterables.size(Iterables.filter(resource.getContents(), new Predicate<EObject>() {
+
+ public boolean apply(EObject input) {
+ boolean result = false;
+
+ if (input != null) {
+ EPackage epackage = input.eClass().getEPackage();
+ result = epackage.getName().equalsIgnoreCase(metamodel);
+ }
+
+ return result;
+ }
+ })), is(count));
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/OneToOneModelImportMappingTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/OneToOneModelImportMappingTest.java
new file mode 100755
index 00000000..a66d054e
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/importer/tests/OneToOneModelImportMappingTest.java
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.importer.tests;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.cdo.core.importer.IModelImportMapping;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferConfiguration;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
+import org.eclipse.papyrus.cdo.core.importer.IModelTransferOperation;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.core.tests.TestProject;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * This is the OneToOneModelImportMappingTest type. Enjoy.
+ */
+public class OneToOneModelImportMappingTest extends AbstractPapyrusCDOTest {
+
+ private IModelTransferConfiguration config;
+
+ private IModelImportMapping fixture;
+
+ @Rule
+ public TestProject hasDependencies = new TestProject("has_dependencies");
+
+ @Rule
+ public TestProject hasDependents = new TestProject("has_dependents");
+
+ public OneToOneModelImportMappingTest() {
+ super();
+ }
+
+ @Test
+ public void testDefaultMappings() {
+ URI uri1 = hasDependencies.getResourceURI("model.di");
+ URI uri2 = hasDependents.getResourceURI("Datatypes.di");
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ assertThat(fixture.getMapping(getNode(uri1)), is((IPath) new Path("/has_dependencies/model.di")));
+ assertThat(fixture.getMapping(getNode(uri2)), is((IPath) new Path("/has_dependents/Datatypes.di")));
+ }
+
+ @Test
+ public void testValidation_ok() throws Exception {
+
+ URI uri1 = hasDependencies.getResourceURI("model.di");
+ URI uri2 = hasDependents.getResourceURI("Datatypes.di");
+
+ config.addModelToTransfer(uri1);
+ config.addModelToTransfer(uri2);
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getSeverity(), is(Diagnostic.OK));
+ assertThat(problems.getChildren().size(), is(0));
+ }
+
+ @Test
+ public void testValidation_resourceExists() throws Exception {
+
+ CDOTransaction transaction = createTransaction();
+ transaction.getOrCreateResource("has_dependencies/model.di");
+ transaction.commit();
+ transaction.close();
+
+ URI uri = hasDependencies.getResourceURI("model.di");
+ config.addModelToTransfer(uri);
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ Diagnostic child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.ERROR));
+ assertThat(child.getMessage(), containsString("Resource already exists"));
+ assertThat(child.getData().get(0), sameInstance((Object) getNode(uri)));
+ }
+
+ @Test
+ public void testValidation_mappingAbsent() {
+ URI uri = hasDependencies.getResourceURI("model.di");
+ config.addModelToTransfer(uri);
+
+ fixture.mapTo(getNode(uri), null);
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ Diagnostic child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.ERROR));
+ assertThat(child.getMessage(), containsString("No mapping"));
+ assertThat(child.getData().get(0), sameInstance((Object) getNode(uri)));
+ }
+
+ @Test
+ public void testValidation_repository() throws Exception {
+
+ getCheckout().close();
+
+ Diagnostic problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ Diagnostic child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.ERROR));
+ assertThat(child.getMessage(), containsString("is not open"));
+ assertThat(child.getData().get(0), sameInstance((Object) getCheckout()));
+
+ fixture.setCheckout(null);
+
+ problems = fixture.validate();
+
+ assertThat(problems.getChildren().size(), is(1));
+ child = problems.getChildren().get(0);
+ assertThat(child.getSeverity(), is(Diagnostic.ERROR));
+ assertThat(child.getMessage(), containsString("No checkout"));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createTestFixture() {
+ config = IModelTransferConfiguration.Factory.IMPORT.create(new IModelTransferOperation.Context() {
+
+ public Diagnostic run(IModelTransferOperation operation) {
+ operation.run(new NullProgressMonitor());
+ return Diagnostic.OK_INSTANCE;
+ }
+ }, null);
+
+ fixture = IModelImportMapping.Factory.ONE_TO_ONE.create(config);
+ fixture.setCheckout(getCheckout());
+ }
+
+ @After
+ public void disposeTestFixture() {
+ fixture = null;
+
+ config.dispose();
+ config = null;
+ }
+
+ IModelTransferNode getNode(URI uri) {
+ IModelTransferNode result = null;
+
+ for (IModelTransferNode next : config.getModelsToTransfer()) {
+ if (next.getPrimaryResourceURI().equals(uri)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/tests/AllInternalCoreTests.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/tests/AllInternalCoreTests.java
new file mode 100755
index 00000000..1010516e
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/tests/AllInternalCoreTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * This is the AllInternalCoreTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ CDOUtilsTest.class })
+public class AllInternalCoreTests {
+
+ public AllInternalCoreTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/tests/CDOUtilsTest.java b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/tests/CDOUtilsTest.java
new file mode 100755
index 00000000..b6636cdb
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/internal/core/tests/CDOUtilsTest.java
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.core.tests;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.net.URL;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentsEList.FeatureListIterator;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.junit.Rule;
+import org.junit.Test;
+
+
+/**
+ * Selected unit tests for the {@link CDOUtils} class.
+ */
+public class CDOUtilsTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ public CDOUtilsTest() {
+ super();
+ }
+
+ @Test
+ public void testIteratorScalarAttribute() throws Exception {
+ FeatureListIterator<String> sIter = CDOUtils.iterator(EcorePackage.Literals.ECLASS, EcorePackage.Literals.ENAMED_ELEMENT__NAME, false);
+
+ assertThat(sIter.hasNext(), is(true));
+ assertThat(sIter.nextIndex(), is(-1));
+ assertThat(sIter.next(), is(EcorePackage.Literals.ECLASS.getName()));
+
+ assertThat(sIter.hasPrevious(), is(true));
+ assertThat(sIter.previousIndex(), is(-1));
+ assertThat(sIter.previous(), is(EcorePackage.Literals.ECLASS.getName()));
+ }
+
+ @Test
+ public void testIteratorEmptyReference() throws Exception {
+ FeatureListIterator<String> sIter = CDOUtils.iterator(EcorePackage.eINSTANCE, EcorePackage.Literals.EPACKAGE__ESUPER_PACKAGE, false);
+
+ assertThat(sIter.hasNext(), is(false));
+ assertThat(sIter.nextIndex(), is(-1));
+ assertThat(sIter.hasPrevious(), is(false));
+ }
+
+ @Test
+ public void testIteratorReferenceResolving() throws Exception {
+ ResourceSet rset = houseKeeper.createResourceSet();
+ Resource a = rset.getResource(getTestResourceURI("A.ecore"), true);
+
+ EClass a1 = (EClass)((EPackage)a.getContents().get(0)).getEClassifier("A1");
+ FeatureListIterator<EClass> sIter = CDOUtils.iterator(a1, EcorePackage.Literals.ECLASS__ESUPER_TYPES, true);
+
+ assertThat(sIter.hasNext(), is(true));
+ assertThat(sIter.nextIndex(), is(0));
+ assertThat(sIter.next().getName(), is("B1"));
+
+ assertThat(sIter.hasNext(), is(true));
+ assertThat(sIter.nextIndex(), is(1));
+ assertThat(sIter.next().getName(), is("B2"));
+
+ assertThat(sIter.hasNext(), is(false));
+ assertThat(sIter.nextIndex(), is(2));
+
+ assertThat(sIter.hasPrevious(), is(true));
+ assertThat(sIter.previousIndex(), is(1));
+ assertThat(sIter.previous().getName(), is("B2"));
+
+ assertThat(sIter.hasPrevious(), is(true));
+ assertThat(sIter.previousIndex(), is(0));
+ assertThat(sIter.previous().getName(), is("B1"));
+
+ assertThat(sIter.hasPrevious(), is(false));
+ }
+
+ @Test
+ public void testIteratorReferenceNonResolving() throws Exception {
+ ResourceSet rset = houseKeeper.createResourceSet();
+
+ Resource a = rset.getResource(getTestResourceURI("A.ecore"), true);
+
+ EClass a1 = (EClass)((EPackage)a.getContents().get(0)).getEClassifier("A1");
+ FeatureListIterator<EClass> sIter = CDOUtils.iterator(a1, EcorePackage.Literals.ECLASS__ESUPER_TYPES, false);
+
+ assertThat(sIter.hasNext(), is(true));
+ assertThat(sIter.nextIndex(), is(0));
+ EClass next = sIter.next();
+ assertThat(next.eIsProxy(), is(true));
+ assertThat(EcoreUtil.getURI(next).fragment(), containsString("B1"));
+
+ assertThat(sIter.hasNext(), is(true));
+ next = sIter.next();
+ assertThat(next.eIsProxy(), is(true));
+ assertThat(EcoreUtil.getURI(next).fragment(), containsString("B2"));
+
+ assertThat(sIter.hasNext(), is(false));
+ assertThat(sIter.nextIndex(), is(2));
+
+ assertThat(sIter.hasPrevious(), is(true));
+ assertThat(sIter.previousIndex(), is(1));
+ EClass previous = sIter.previous();
+ assertThat(previous.eIsProxy(), is(true));
+ assertThat(EcoreUtil.getURI(previous).fragment(), containsString("B2"));
+
+ assertThat(sIter.hasPrevious(), is(true));
+ assertThat(sIter.previousIndex(), is(0));
+ previous = sIter.previous();
+ assertThat(previous.eIsProxy(), is(true));
+ assertThat(EcoreUtil.getURI(previous).fragment(), containsString("B1"));
+
+ assertThat(sIter.hasPrevious(), is(false));
+ }
+
+ //
+ // Test framework
+ //
+
+ URI getTestResourceURI(String name) {
+ URL result = getClass().getClassLoader().getResource("resources/xmi/" + name);
+ return URI.createURI(result.toExternalForm(), true);
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/.classpath b/cdo/tests/org.eclipse.papyrus.cdo.tests/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/.project b/cdo/tests/org.eclipse.papyrus.cdo.tests/.project
new file mode 100755
index 00000000..8d4949ec
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.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/cdo/tests/org.eclipse.papyrus.cdo.tests/.settings/org.eclipse.jdt.core.prefs b/cdo/tests/org.eclipse.papyrus.cdo.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..e82ec2bb
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,294 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/.settings/org.eclipse.jdt.ui.prefs b/cdo/tests/org.eclipse.papyrus.cdo.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/META-INF/MANIFEST.MF b/cdo/tests/org.eclipse.papyrus.cdo.tests/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..3c6ff0bc
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.cdo.core.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.validation.problems.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.uml.ui.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.uml.search.ui.tests;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.cdo.tests
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.tests
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch b/cdo/tests/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch
new file mode 100755
index 00000000..d112125f
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bad_container_name" value="/org.eclipse.papyrus.cdo.tests/Papyrus A"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<listAttribute key="com.mountainminds.eclemma.core.SCOPE_IDS">
+<listEntry value="=org.eclipse.papyrus.cdo.uml.ui/src"/>
+<listEntry value="=org.eclipse.papyrus.cdo.validation.problems/src"/>
+<listEntry value="=org.eclipse.papyrus.cdo.core/src"/>
+<listEntry value="=org.eclipse.papyrus.cdo.validation.problems.edit/src"/>
+<listEntry value="=org.eclipse.papyrus.cdo.core/src-gen"/>
+<listEntry value="=org.eclipse.papyrus.cdo.uml.diagram.ui/src"/>
+<listEntry value="=org.eclipse.papyrus.cdo.ui/src"/>
+</listAttribute>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<stringAttribute key="deselected_workspace_plugins" value="com.example.cdo.stuff,com.example.cdo.ui,org.eclipse.emf.ant,org.eclipse.emf.cdo.admin,org.eclipse.emf.cdo.common.db,org.eclipse.emf.cdo.compare,org.eclipse.emf.cdo.dawn.codegen,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.edit,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.editor,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.edit,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.ui,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.edit,org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.ui,org.eclipse.emf.cdo.dawn.ecore.editor.dawn,org.eclipse.emf.cdo.dawn.ecoretools.diagram.dawn,org.eclipse.emf.cdo.dawn.emf,org.eclipse.emf.cdo.dawn.examples,org.eclipse.emf.cdo.dawn.examples.acore,org.eclipse.emf.cdo.dawn.examples.acore.diagram,org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn,org.eclipse.emf.cdo.dawn.examples.acore.edit,org.eclipse.emf.cdo.dawn.examples.acore.editor,org.eclipse.emf.cdo.dawn.examples.acore.editor.dawn,org.eclipse.emf.cdo.dawn.examples.acore.graphiti,org.eclipse.emf.cdo.dawn.examples.acore.graphiti.dawn,org.eclipse.emf.cdo.dawn.graphiti,org.eclipse.emf.cdo.dawn.sdk,org.eclipse.emf.cdo.dawn.tests,org.eclipse.emf.cdo.defs,org.eclipse.emf.cdo.doc,org.eclipse.emf.cdo.efs,org.eclipse.emf.cdo.explorer,org.eclipse.emf.cdo.location,org.eclipse.emf.cdo.migrator,org.eclipse.emf.cdo.releng,org.eclipse.emf.cdo.releng.release,org.eclipse.emf.cdo.sdk,org.eclipse.emf.cdo.security,org.eclipse.emf.cdo.security.edit,org.eclipse.emf.cdo.security.editor,org.eclipse.emf.cdo.server.admin,org.eclipse.emf.cdo.server.db,org.eclipse.emf.cdo.server.lissome,org.eclipse.emf.cdo.server.mongodb,org.eclipse.emf.cdo.server.objectivity,org.eclipse.emf.cdo.server.objectivity.stub,org.eclipse.emf.cdo.server.ocl,org.eclipse.emf.cdo.server.product,org.eclipse.emf.cdo.server.security,org.eclipse.emf.cdo.team,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.mango,org.eclipse.emf.cdo.tests.model1,org.eclipse.emf.cdo.tests.model2,org.eclipse.emf.cdo.tests.model3,org.eclipse.emf.cdo.tests.model4,org.eclipse.emf.cdo.tests.model4interfaces,org.eclipse.emf.cdo.tests.model5,org.eclipse.emf.cdo.tests.model6,org.eclipse.emf.cdo.tests.ui,org.eclipse.emf.cdo.tests.uml,org.eclipse.emf.cdo.transfer.workspace.ui,org.eclipse.emf.cdo.ui.admin,org.eclipse.emf.cdo.ui.defs,org.eclipse.emf.cdo.ui.efs,org.eclipse.emf.cdo.ui.ide,org.eclipse.emf.cdo.ui.location,org.eclipse.emf.cdo.ui.workspace,org.eclipse.emf.cdo.workspace,org.eclipse.emf.cdo.workspace.efs,org.eclipse.emf.codegen,org.eclipse.emf.codegen.ecore,org.eclipse.emf.codegen.ecore.ui,org.eclipse.emf.codegen.ui,org.eclipse.emf.converter,org.eclipse.emf.databinding.edit,org.eclipse.emf.ecore.change.edit,org.eclipse.emf.ecore.editor,org.eclipse.emf.exporter,org.eclipse.emf.importer,org.eclipse.emf.importer.ecore,org.eclipse.emf.mapping,org.eclipse.emf.mapping.ecore,org.eclipse.emf.mapping.ecore.editor,org.eclipse.emf.mapping.ecore2ecore,org.eclipse.emf.mapping.ecore2ecore.editor,org.eclipse.emf.mapping.ecore2xml.ui,org.eclipse.emf.mapping.ui,org.eclipse.epf.common,org.eclipse.epf.common.html,org.eclipse.epf.common.ui,org.eclipse.epf.common.win32.win32.x86,org.eclipse.epf.common.win32.win32.x86_64,org.eclipse.epf.richtext,org.eclipse.net4j.buddies,org.eclipse.net4j.buddies.chat,org.eclipse.net4j.buddies.chat.ui,org.eclipse.net4j.buddies.common,org.eclipse.net4j.buddies.server,org.eclipse.net4j.buddies.ui,org.eclipse.net4j.db.derby,org.eclipse.net4j.db.doc,org.eclipse.net4j.debug,org.eclipse.net4j.defs,org.eclipse.net4j.doc,org.eclipse.net4j.http,org.eclipse.net4j.http.common,org.eclipse.net4j.http.server,org.eclipse.net4j.http.tests,org.eclipse.net4j.jms,org.eclipse.net4j.jms.admin,org.eclipse.net4j.jms.api,org.eclipse.net4j.jms.server,org.eclipse.net4j.jms.server.jdbc,org.eclipse.net4j.sdk,org.eclipse.net4j.tests,org.eclipse.net4j.ui,org.eclipse.net4j.ui.defs,org.eclipse.net4j.util.defs,org.eclipse.net4j.util.doc,org.eclipse.papyrus.bundles.tests,org.eclipse.papyrus.cdo.uml.diagram.ui,org.eclipse.papyrus.cdo.uml.ui,org.eclipse.papyrus.codegen,org.eclipse.papyrus.core.queries.configuration.tests,org.eclipse.papyrus.core.queries.test,org.eclipse.papyrus.def,org.eclipse.papyrus.design.profile.architecture,org.eclipse.papyrus.design.profile.architecture.edit,org.eclipse.papyrus.design.profile.architecture.editor,org.eclipse.papyrus.diagram.clazz.tests,org.eclipse.papyrus.diagram.common.tests,org.eclipse.papyrus.diagram.stereotypeproperty.tests,org.eclipse.papyrus.diagram.tests,org.eclipse.papyrus.diagramtemplate,org.eclipse.papyrus.diagramtemplate.doc,org.eclipse.papyrus.diagramtemplate.edit,org.eclipse.papyrus.diagramtemplate.editor,org.eclipse.papyrus.doc,org.eclipse.papyrus.dsml.validation,org.eclipse.papyrus.dsml.validation.generation.commands.ui,org.eclipse.papyrus.dsml.validation.generator,org.eclipse.papyrus.dsml.validation.model,org.eclipse.papyrus.dsml.validation.properties,org.eclipse.papyrus.dsml.validation.wizard,org.eclipse.papyrus.eclipse.project.editors,org.eclipse.papyrus.editor,org.eclipse.papyrus.editor.perspectiveconfiguration,org.eclipse.papyrus.extendedtypes.emf.edit,org.eclipse.papyrus.extendedtypes.emf.editor,org.eclipse.papyrus.extendedtypes.tests,org.eclipse.papyrus.extendedtypes.uml.edit,org.eclipse.papyrus.extendedtypes.uml.editor,org.eclipse.papyrus.extensionpoints.editors,org.eclipse.papyrus.gmfgenextension,org.eclipse.papyrus.infra.constraints,org.eclipse.papyrus.infra.constraints.edit,org.eclipse.papyrus.infra.constraints.editor,org.eclipse.papyrus.infra.discovery,org.eclipse.papyrus.infra.discovery.ui,org.eclipse.papyrus.infra.discovery.ui.menu,org.eclipse.papyrus.infra.emf.diagram.common,org.eclipse.papyrus.infra.emf.editor,org.eclipse.papyrus.infra.emf.embeddededitor,org.eclipse.papyrus.infra.emf.facet.queries,org.eclipse.papyrus.infra.emf.newchild,org.eclipse.papyrus.infra.export,org.eclipse.papyrus.infra.extendedtypes,org.eclipse.papyrus.infra.extendedtypes.edit,org.eclipse.papyrus.infra.extendedtypes.editor,org.eclipse.papyrus.infra.extendedtypes.emf,org.eclipse.papyrus.infra.gmfdiag.css,org.eclipse.papyrus.infra.gmfdiag.css.configuration,org.eclipse.papyrus.infra.gmfdiag.css.model,org.eclipse.papyrus.infra.gmfdiag.css.properties,org.eclipse.papyrus.infra.gmfdiag.css.tests,org.eclipse.papyrus.infra.gmfdiag.css.theme,org.eclipse.papyrus.infra.gmfdiag.css.xtext,org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui,org.eclipse.papyrus.infra.gmfdiag.dnd,org.eclipse.papyrus.infra.gmfdiag.hyperlink,org.eclipse.papyrus.infra.gmfdiag.modelexplorer,org.eclipse.papyrus.infra.gmfdiag.navigation,org.eclipse.papyrus.infra.gmfdiag.outline,org.eclipse.papyrus.infra.gmfdiag.properties,org.eclipse.papyrus.infra.gmfdiag.widgets,org.eclipse.papyrus.infra.hyperlink,org.eclipse.papyrus.infra.queries.core,org.eclipse.papyrus.infra.queries.core.configuration,org.eclipse.papyrus.infra.queries.core.configuration.edit,org.eclipse.papyrus.infra.services.labelprovider.tests,org.eclipse.papyrus.infra.services.semantic,org.eclipse.papyrus.infra.table.common,org.eclipse.papyrus.infra.table.controlmode,org.eclipse.papyrus.infra.table.instance,org.eclipse.papyrus.infra.table.menu,org.eclipse.papyrus.infra.table.modelexplorer,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel.edit,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel.editor,org.eclipse.papyrus.infra.table.properties,org.eclipse.papyrus.junit.utils,org.eclipse.papyrus.layout,org.eclipse.papyrus.layout.algorithms.gridAlgorithm,org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm,org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm,org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm,org.eclipse.papyrus.layout.algorithms.radialAlgorithm,org.eclipse.papyrus.layout.algorithms.springAlgorithm,org.eclipse.papyrus.layout.algorithms.treeAlgorithm,org.eclipse.papyrus.layout.algorithms.verticalAlgorithm,org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm,org.eclipse.papyrus.layout.subeditor.gmf,org.eclipse.papyrus.marte.properties,org.eclipse.papyrus.marte.static.profile,org.eclipse.papyrus.migration.properties.model,org.eclipse.papyrus.paletteconfiguration.editor,org.eclipse.papyrus.paletteconfiguration.tests,org.eclipse.papyrus.parsers,org.eclipse.papyrus.sysml,org.eclipse.papyrus.sysml.diagram.blockdefinition,org.eclipse.papyrus.sysml.diagram.common,org.eclipse.papyrus.sysml.diagram.internalblock,org.eclipse.papyrus.sysml.diagram.requirement,org.eclipse.papyrus.sysml.diagram.ui,org.eclipse.papyrus.sysml.edit,org.eclipse.papyrus.sysml.facets,org.eclipse.papyrus.sysml.modelexplorer,org.eclipse.papyrus.sysml.modelexplorer.tests,org.eclipse.papyrus.sysml.properties,org.eclipse.papyrus.sysml.service.types,org.eclipse.papyrus.sysml.service.types.tests,org.eclipse.papyrus.sysml.sysmloveruml.codegen,org.eclipse.papyrus.sysml.table.allocation,org.eclipse.papyrus.sysml.table.requirement,org.eclipse.papyrus.sysml.tests,org.eclipse.papyrus.team.svn,org.eclipse.papyrus.tests,org.eclipse.papyrus.tests.extra,org.eclipse.papyrus.uml.alf,org.eclipse.papyrus.uml.alf.ui,org.eclipse.papyrus.uml.appearance,org.eclipse.papyrus.uml.commands,org.eclipse.papyrus.uml.controlmode.profile,org.eclipse.papyrus.uml.diagram.activity,org.eclipse.papyrus.uml.diagram.activity.tests,org.eclipse.papyrus.uml.diagram.clazz,org.eclipse.papyrus.uml.diagram.common,org.eclipse.papyrus.uml.diagram.common.groups,org.eclipse.papyrus.uml.diagram.common.palette.customaction,org.eclipse.papyrus.uml.diagram.communication,org.eclipse.papyrus.uml.diagram.component,org.eclipse.papyrus.uml.diagram.composite,org.eclipse.papyrus.uml.diagram.deployment,org.eclipse.papyrus.uml.diagram.dnd,org.eclipse.papyrus.uml.diagram.dnd.tests,org.eclipse.papyrus.uml.diagram.emftree,org.eclipse.papyrus.uml.diagram.icons,org.eclipse.papyrus.uml.diagram.menu,org.eclipse.papyrus.uml.diagram.modelexplorer,org.eclipse.papyrus.uml.diagram.navigation,org.eclipse.papyrus.uml.diagram.package,org.eclipse.papyrus.uml.diagram.paletteconfiguration,org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit,org.eclipse.papyrus.uml.diagram.profile,org.eclipse.papyrus.uml.diagram.sequence,org.eclipse.papyrus.uml.diagram.sequence.tests,org.eclipse.papyrus.uml.diagram.statemachine,org.eclipse.papyrus.uml.diagram.stereotype.edition,org.eclipse.papyrus.uml.diagram.usecase,org.eclipse.papyrus.uml.diagram.usecase.tests,org.eclipse.papyrus.uml.diagram.wizards,org.eclipse.papyrus.uml.documentation,org.eclipse.papyrus.uml.documentation.profile,org.eclipse.papyrus.uml.export,org.eclipse.papyrus.uml.extensionpoints,org.eclipse.papyrus.uml.icons,org.eclipse.papyrus.uml.import,org.eclipse.papyrus.uml.modelexplorer,org.eclipse.papyrus.uml.modelexplorer.recipetest,org.eclipse.papyrus.uml.modelexplorer.tests,org.eclipse.papyrus.uml.modelexplorer.widgets,org.eclipse.papyrus.uml.oclconstraintevaluation,org.eclipse.papyrus.uml.pastemanager,org.eclipse.papyrus.uml.perspective,org.eclipse.papyrus.uml.profile,org.eclipse.papyrus.uml.profilefacet,org.eclipse.papyrus.uml.profilefacet.generation,org.eclipse.papyrus.uml.profilefacet.metamodel,org.eclipse.papyrus.uml.properties,org.eclipse.papyrus.uml.properties.tabbedproperties.comments,org.eclipse.papyrus.uml.service.types,org.eclipse.papyrus.uml.service.types.tests,org.eclipse.papyrus.uml.standard,org.eclipse.papyrus.uml.standard.edit,org.eclipse.papyrus.uml.table.common,org.eclipse.papyrus.uml.table.default,org.eclipse.papyrus.uml.table.widgets.celleditors,org.eclipse.papyrus.uml.templaterepository,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui,org.eclipse.papyrus.uml.textedit.common.xtext,org.eclipse.papyrus.uml.textedit.common.xtext.ui,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui,org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext,org.eclipse.papyrus.uml.textedit.javaconstraint,org.eclipse.papyrus.uml.textedit.message.xtext,org.eclipse.papyrus.uml.textedit.message.xtext.ui,org.eclipse.papyrus.uml.textedit.parameter.xtext,org.eclipse.papyrus.uml.textedit.parameter.xtext.ui,org.eclipse.papyrus.uml.textedit.property.xtext,org.eclipse.papyrus.uml.textedit.property.xtext.ui,org.eclipse.papyrus.uml.textedit.state.xtext,org.eclipse.papyrus.uml.textedit.state.xtext.ui,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui,org.eclipse.papyrus.uml.textedit.transition.xtext,org.eclipse.papyrus.uml.textedit.transition.xtext.ui,org.eclipse.papyrus.uml.tools.extendedtypes,org.eclipse.papyrus.uml.tools.tests,org.eclipse.papyrus.uml.ui.perspectiveconfiguration,org.eclipse.papyrus.views.documentation,org.eclipse.papyrus.views.documentation.view,org.eclipse.papyrus.views.documentation.view.papyrus,org.eclipse.papyrus.views.modelexplorer,org.eclipse.papyrus.views.modelexplorer.resourceloading,org.eclipse.papyrus.views.modelexplorer.tests,org.eclipse.papyrus.views.modelexplorer.widgets,org.eclipse.papyrus.views.properties,org.eclipse.papyrus.infra.properties,org.eclipse.papyrus.infra.properties.edit,org.eclipse.papyrus.infra.properties.editor,org.eclipse.papyrus.views.validation,org.eclipse.papyrus.xwt,org.eclipse.uml2,org.eclipse.uml2.capabilities,org.eclipse.uml2.codegen.ecore,org.eclipse.uml2.codegen.ecore.ui,org.eclipse.uml2.examples,org.eclipse.uml2.examples.uml.ui,org.eclipse.uml2.tests,org.eclipse.uml2.uml.ecore.exporter,org.eclipse.uml2.uml.ecore.importer,org.eclipse.uml2.uml.editor,org.eclipse.uml2.uml.profile.l2,org.eclipse.uml2.uml.profile.l3,org.eclipse.uml2.uml.resources,org.eclipse.uml2.uml.tests,org.eclipse.xtext.gmf.glue"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.cdo.tests/src/org/eclipse/papyrus/cdo/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.cdo.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.cdo.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms80m -Xmx2048m &#13;&#10;-Dorg.eclipse.swt.internal.carbon.smallFonts"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,lpg.runtime.java@default:default,org.apache.batik.css@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.commons.lang@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.debug.core@default:default,org.eclipse.draw2d@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt.cocoa@default:false,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.facet.common.core@default:default,org.eclipse.emf.facet.common.ui@default:default,org.eclipse.emf.facet.custom.core@default:default,org.eclipse.emf.facet.custom.metamodel@default:default,org.eclipse.emf.facet.custom.ui@default:default,org.eclipse.emf.facet.efacet.catalog@default:default,org.eclipse.emf.facet.efacet.core@default:default,org.eclipse.emf.facet.efacet.metamodel@default:default,org.eclipse.emf.facet.efacet@default:default,org.eclipse.emf.facet.infra.browser.custom.core@default:default,org.eclipse.emf.facet.infra.browser.custom@default:default,org.eclipse.emf.facet.infra.browser.uicore@default:default,org.eclipse.emf.facet.infra.common.core@default:default,org.eclipse.emf.facet.infra.facet.core@default:default,org.eclipse.emf.facet.infra.facet@default:default,org.eclipse.emf.facet.infra.query.core@default:default,org.eclipse.emf.facet.infra.query@default:default,org.eclipse.emf.facet.query.java.core@default:default,org.eclipse.emf.facet.query.java.metamodel@default:default,org.eclipse.emf.facet.query.java@default:default,org.eclipse.emf.facet.util.core@default:default,org.eclipse.emf.facet.util.emf.catalog@default:default,org.eclipse.emf.facet.util.emf.core@default:default,org.eclipse.emf.facet.util.emf.ui@default:default,org.eclipse.emf.facet.util.ui@default:default,org.eclipse.emf.transaction.ui@default:default,org.eclipse.emf.transaction@default:default,org.eclipse.emf.validation.ocl@default:default,org.eclipse.emf.validation@default:default,org.eclipse.emf.workspace@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.gef@default:default,org.eclipse.gmf.runtime.common.core@default:default,org.eclipse.gmf.runtime.common.ui.action@default:default,org.eclipse.gmf.runtime.common.ui.services.action@default:default,org.eclipse.gmf.runtime.common.ui.services.properties@default:default,org.eclipse.gmf.runtime.common.ui.services@default:default,org.eclipse.gmf.runtime.common.ui@default:default,org.eclipse.gmf.runtime.diagram.core@default:default,org.eclipse.gmf.runtime.diagram.ui.actions@default:default,org.eclipse.gmf.runtime.diagram.ui.properties@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor@default:default,org.eclipse.gmf.runtime.diagram.ui@default:default,org.eclipse.gmf.runtime.draw2d.ui.render@default:default,org.eclipse.gmf.runtime.draw2d.ui@default:default,org.eclipse.gmf.runtime.emf.clipboard.core@default:default,org.eclipse.gmf.runtime.emf.commands.core@default:default,org.eclipse.gmf.runtime.emf.core@default:default,org.eclipse.gmf.runtime.emf.type.core@default:default,org.eclipse.gmf.runtime.emf.ui.properties@default:default,org.eclipse.gmf.runtime.emf.ui@default:default,org.eclipse.gmf.runtime.gef.ui@default:default,org.eclipse.gmf.runtime.notation.edit@default:default,org.eclipse.gmf.runtime.notation.providers@default:default,org.eclipse.gmf.runtime.notation@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.ocl.common@default:default,org.eclipse.ocl.ecore@default:default,org.eclipse.ocl@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.sdk@default:default,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.h2@default:default,org.hamcrest.core@default:default,org.junit*4.10.0.v4_10_0_v20120426-0900@default:default,org.junit4@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.slf4j.api@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil*1.0.1.v200903091627@default:default,org.w3c.dom.svg@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.dawn.gmf@default:default,org.eclipse.emf.cdo.dawn.ui@default:default,org.eclipse.emf.cdo.dawn.util@default:default,org.eclipse.emf.cdo.dawn@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.server.net4j@default:default,org.eclipse.emf.cdo.server@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.emf@default:default,org.eclipse.net4j.db.h2@default:default,org.eclipse.net4j.db@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default,org.eclipse.papyrus.cdo.core.tests@default:default,org.eclipse.papyrus.cdo.core@default:default,org.eclipse.papyrus.cdo.tests@default:default,org.eclipse.papyrus.cdo.ui.tests@default:default,org.eclipse.papyrus.cdo.ui@default:default,org.eclipse.papyrus.cdo.validation.problems.edit@default:default,org.eclipse.papyrus.cdo.validation.problems.tests@default:default,org.eclipse.papyrus.cdo.validation.problems@default:default,org.eclipse.papyrus.core.resourceloading.tests@default:false,org.eclipse.papyrus.core.tests@default:false,org.eclipse.papyrus.infra.core.log@default:default,org.eclipse.papyrus.infra.core.sasheditor.di.tests@default:false,org.eclipse.papyrus.infra.core.sasheditor.di@default:default,org.eclipse.papyrus.infra.core.sasheditor.tests@default:false,org.eclipse.papyrus.infra.core.sasheditor@default:default,org.eclipse.papyrus.infra.core@default:default,org.eclipse.papyrus.infra.emf.appearance@default:default,org.eclipse.papyrus.infra.emf.readonly@default:default,org.eclipse.papyrus.infra.emf@default:default,org.eclipse.papyrus.infra.gmfdiag.commands@default:default,org.eclipse.papyrus.infra.gmfdiag.common@default:default,org.eclipse.papyrus.infra.gmfdiag.preferences@default:default,org.eclipse.papyrus.infra.onefile@default:default,org.eclipse.papyrus.infra.services.controlmode.history@default:default,org.eclipse.papyrus.infra.services.controlmode@default:default,org.eclipse.papyrus.infra.services.decoration@default:default,org.eclipse.papyrus.infra.services.edit@default:default,org.eclipse.papyrus.infra.services.labelprovider@default:default,org.eclipse.papyrus.infra.services.markerlistener@default:default,org.eclipse.papyrus.infra.services.resourceloading.preferences@default:default,org.eclipse.papyrus.infra.services.resourceloading@default:default,org.eclipse.papyrus.infra.services.validation@default:default,org.eclipse.papyrus.infra.tools@default:default,org.eclipse.papyrus.infra.ui.resources@default:default,org.eclipse.papyrus.infra.widgets.toolbox@default:default,org.eclipse.papyrus.infra.widgets@default:default,org.eclipse.papyrus.uml.resourceloading.profile@default:default,org.eclipse.papyrus.uml.tools.utils@default:default,org.eclipse.papyrus.uml.tools@default:default,org.eclipse.uml2.common.edit@default:default,org.eclipse.uml2.common@default:default,org.eclipse.uml2.types@default:default,org.eclipse.uml2.uml.edit@default:default,org.eclipse.uml2.uml@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/about.html b/cdo/tests/org.eclipse.papyrus.cdo.tests/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/build.properties b/cdo/tests/org.eclipse.papyrus.cdo.tests/build.properties
new file mode 100755
index 00000000..19577a08
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/plugin.properties b/cdo/tests/org.eclipse.papyrus.cdo.tests/plugin.properties
new file mode 100755
index 00000000..8b857ed8
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+pluginName = Papyrus CDO Model Repository All Tests (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Master automated test suite for the CDO Integration feature. \ No newline at end of file
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/pom.xml b/cdo/tests/org.eclipse.papyrus.cdo.tests/pom.xml
new file mode 100755
index 00000000..419e4c20
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.tests/src/org/eclipse/papyrus/cdo/tests/AllTests.java b/cdo/tests/org.eclipse.papyrus.cdo.tests/src/org/eclipse/papyrus/cdo/tests/AllTests.java
new file mode 100755
index 00000000..94168371
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.tests/src/org/eclipse/papyrus/cdo/tests/AllTests.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * This is the AllTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ org.eclipse.papyrus.cdo.core.tests.AllTests.class, //
+org.eclipse.papyrus.cdo.ui.tests.AllTests.class, //
+org.eclipse.papyrus.cdo.uml.ui.tests.AllTests.class, //
+org.eclipse.papyrus.cdo.validation.problems.tests.ProblemsAllTests.class, //
+org.eclipse.papyrus.cdo.uml.search.ui.tests.AllTests.class })
+public class AllTests {
+
+ public AllTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.classpath b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.project b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.project
new file mode 100755
index 00000000..e45a0e19
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.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/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.settings/org.eclipse.jdt.core.prefs b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..e82ec2bb
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,294 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.settings/org.eclipse.jdt.ui.prefs b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..aa54f651
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,39 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.ui.ide;bundle-version="[3.8.0,4.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.ui.workbench,
+ org.eclipse.papyrus.cdo.core;bundle-version="1.2.0",
+ org.eclipse.emf.cdo.ui;bundle-version="[4.2.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.cdo.dawn;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.cdo.dawn.gmf;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.emf.cdo.dawn.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.core.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.validation;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.validation.problems;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.validation.problems.edit;bundle-version="1.2.0",
+ org.eclipse.emf.cdo.server.ocl;bundle-version="4.2.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.2.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.cdo.internal.ui.editors.tests;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.ui.markers.tests;x-internal:=true,
+ org.eclipse.papyrus.cdo.internal.ui.views.tests;x-internal:=true,
+ org.eclipse.papyrus.cdo.ui.tests
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.ui.tests;singleton:=true
+Import-Package: com.google.common.base;version="10.0.1",
+ com.google.common.cache;version="10.0.1",
+ com.google.common.collect;version="10.0.1"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/Papyrus CDO UI Tests.launch b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/Papyrus CDO UI Tests.launch
new file mode 100755
index 00000000..c58be3f7
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/Papyrus CDO UI Tests.launch
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.cdo.ui.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.cdo.ui.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts&#10;-XX:MaxPermSize=256m -Xms80m -Xmx2048m&#10;-Xdock:icon=../Resources/Eclipse.icns -Dorg.eclipse.swt.internal.carbon.smallFonts"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/about.html b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/build.properties b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/build.properties
new file mode 100755
index 00000000..8919c34c
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ resources/,\
+ plugin.xml
+src.includes = about.html
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/plugin.properties b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/plugin.properties
new file mode 100755
index 00000000..c0a76041
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/plugin.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+pluginName = Papyrus CDO Model Repository UI Tests (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Automated tests for the CDO Integration user interface core. \ No newline at end of file
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/plugin.xml b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/plugin.xml
new file mode 100755
index 00000000..cb2e1588
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ CEA LIST - Initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.cdo.ui.repositoryFilters">
+ <itemProviderFilter
+ id="org.eclipse.papyrus.cdo.ui.tests.itemProviderFilter1">
+ <predicate
+ class="org.eclipse.papyrus.cdo.internal.ui.views.tests.ItemProviderFilterRegistryTest$TestFilter"/>
+ </itemProviderFilter>
+ </extension>
+
+</plugin>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/pom.xml b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/pom.xml
new file mode 100755
index 00000000..093f394e
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.ui.tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.di b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.di
new file mode 100755
index 00000000..e7104a76
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.di
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_PIsWgHFlEeK8x7zQKtpUFg"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_PIuywHFlEeK8x7zQKtpUFg"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_PIxPAHFlEeK8x7zQKtpUFg"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_PIzrQHFlEeK8x7zQKtpUFg"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_0TYNgJoYEeOBraiw2Bz-fA"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="/0/@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="model.notation#_PIsWgHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="model.notation#_PIuywHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="model.notation#_PIxPAHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="model.notation#_PIzrQHFlEeK8x7zQKtpUFg"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+</xmi:XMI>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.notation b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.notation
new file mode 100755
index 00000000..03fbe3ce
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.notation
@@ -0,0 +1,865 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration">
+ <notation:Diagram xmi:id="_PIsWgHFlEeK8x7zQKtpUFg" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_PIsWgXFlEeK8x7zQKtpUFg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIsWgnFlEeK8x7zQKtpUFg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PIsWg3FlEeK8x7zQKtpUFg" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIsWhHFlEeK8x7zQKtpUFg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIsWhXFlEeK8x7zQKtpUFg" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PIsWhnFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIsWh3FlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIsWiHFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIsWiXFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PIsWinFlEeK8x7zQKtpUFg" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIsWi3FlEeK8x7zQKtpUFg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIsWjHFlEeK8x7zQKtpUFg" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PIsWjXFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIsWjnFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIsWj3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIsWkHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PIsWkXFlEeK8x7zQKtpUFg" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIsWknFlEeK8x7zQKtpUFg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIsWk3FlEeK8x7zQKtpUFg" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PIsWlHFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIsWlXFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIsWlnFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIsWl3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_PI4jwnFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIsWmHFlEeK8x7zQKtpUFg" x="63" y="18"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIsWmXFlEeK8x7zQKtpUFg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIsWmnFlEeK8x7zQKtpUFg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PIsWm3FlEeK8x7zQKtpUFg" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIsWnHFlEeK8x7zQKtpUFg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIsWnXFlEeK8x7zQKtpUFg" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_PIsWnnFlEeK8x7zQKtpUFg" type="3012">
+ <element xmi:type="uml:Property" href="model.uml#_PI4kH3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIsWn3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PIsWoHFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIsWoXFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIsWonFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIsWo3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PIsWpHFlEeK8x7zQKtpUFg" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIsWpXFlEeK8x7zQKtpUFg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIsWpnFlEeK8x7zQKtpUFg" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PIsWp3FlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIsWqHFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIsWqXFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIsWqnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PIsWq3FlEeK8x7zQKtpUFg" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIsWrHFlEeK8x7zQKtpUFg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIsWrXFlEeK8x7zQKtpUFg" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PIsWrnFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIsWr3FlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIsWsHFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIsWsXFlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_PI4kHnFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIsWsnFlEeK8x7zQKtpUFg" x="270" y="18"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_SFbYAIQqEeKq_f8GS5X7FQ" type="2009">
+ <children xmi:type="notation:DecorationNode" xmi:id="_SFcmIIQqEeKq_f8GS5X7FQ" type="5032"/>
+ <element xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SFbYAYQqEeKq_f8GS5X7FQ" x="171" y="198"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_PIsWs3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Model" href="model.uml#_PI4jwHFlEeK8x7zQKtpUFg"/>
+ <edges xmi:type="notation:Connector" xmi:id="_PIsWtHFlEeK8x7zQKtpUFg" type="4001" source="_PIsWgXFlEeK8x7zQKtpUFg" target="_PIsWmXFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIsWtXFlEeK8x7zQKtpUFg" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIsWtnFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIsWt3FlEeK8x7zQKtpUFg" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIsWuHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIsWuXFlEeK8x7zQKtpUFg" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIsWunFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIsWu3FlEeK8x7zQKtpUFg" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIsWvHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIsWvXFlEeK8x7zQKtpUFg" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIsWvnFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIsWv3FlEeK8x7zQKtpUFg" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIsWwHFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIsWwXFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Association" href="model.uml#_PI4kIHFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIsWwnFlEeK8x7zQKtpUFg" points="[21, -6, -217, -15]$[204, -41, -34, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIsWw3FlEeK8x7zQKtpUFg" id="(0.79,0.39)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_VftGgIQqEeKq_f8GS5X7FQ" type="4002" source="_PIsWmXFlEeK8x7zQKtpUFg" target="_SFbYAIQqEeKq_f8GS5X7FQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_VftGg4QqEeKq_f8GS5X7FQ" type="6007">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VftGhIQqEeKq_f8GS5X7FQ" y="40"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_VftGgYQqEeKq_f8GS5X7FQ"/>
+ <element xmi:type="uml:Generalization" href="model.uml#_VZyEsIQqEeKq_f8GS5X7FQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_VftGgoQqEeKq_f8GS5X7FQ" points="[-16, 22, 60, -89]$[-70, 102, 6, -9]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_VgM1wIQqEeKq_f8GS5X7FQ" id="(0.3482142857142857,0.78)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_VgM1wYQqEeKq_f8GS5X7FQ" id="(0.62,0.18)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_PIuywHFlEeK8x7zQKtpUFg" type="PapyrusUMLActivityDiagram" name="lifecycle" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_PIuywXFlEeK8x7zQKtpUFg" type="2001" fontName="Lucida Grande" fontHeight="11" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIuywnFlEeK8x7zQKtpUFg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIuyw3FlEeK8x7zQKtpUFg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIuyxHFlEeK8x7zQKtpUFg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIuyxXFlEeK8x7zQKtpUFg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIuyxnFlEeK8x7zQKtpUFg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIuyx3FlEeK8x7zQKtpUFg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuyyHFlEeK8x7zQKtpUFg" type="5001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuyyXFlEeK8x7zQKtpUFg" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIuyynFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIuyy3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuyzHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuyzXFlEeK8x7zQKtpUFg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIuyznFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIuyz3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy0HFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy0XFlEeK8x7zQKtpUFg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIuy0nFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIuy03FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy1HFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy1XFlEeK8x7zQKtpUFg" type="7004">
+ <children xmi:type="notation:Shape" xmi:id="_PIuy1nFlEeK8x7zQKtpUFg" type="3004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy13FlEeK8x7zQKtpUFg" type="5080">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuy2HFlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuy2XFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:InitialNode" href="model.uml#_PI4j5HFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy2nFlEeK8x7zQKtpUFg" x="89" y="122"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIuy23FlEeK8x7zQKtpUFg" type="3005">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy3HFlEeK8x7zQKtpUFg" type="5081">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuy3XFlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuy3nFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ActivityFinalNode" href="model.uml#_PI4j5XFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy33FlEeK8x7zQKtpUFg" x="787" y="186"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIuy4HFlEeK8x7zQKtpUFg" type="3065">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy4XFlEeK8x7zQKtpUFg" type="5117"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy4nFlEeK8x7zQKtpUFg" type="7005">
+ <children xmi:type="notation:Shape" xmi:id="_PIuy43FlEeK8x7zQKtpUFg" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy5HFlEeK8x7zQKtpUFg" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuy5XFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_PI4jyHFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy5nFlEeK8x7zQKtpUFg" x="30" y="66"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIuy53FlEeK8x7zQKtpUFg" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy6HFlEeK8x7zQKtpUFg" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuy6XFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_PI4jyXFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy6nFlEeK8x7zQKtpUFg" x="138" y="66"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIuy63FlEeK8x7zQKtpUFg" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy7HFlEeK8x7zQKtpUFg" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuy7XFlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy7nFlEeK8x7zQKtpUFg" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuy73FlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuy8HFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:DecisionNode" href="model.uml#_PI4jynFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy8XFlEeK8x7zQKtpUFg" x="246" y="66"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy8nFlEeK8x7zQKtpUFg"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuy83FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:StructuredActivityNode" href="model.uml#_PI4jx3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy9HFlEeK8x7zQKtpUFg" x="76" y="192" width="280" height="154"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIuy9XFlEeK8x7zQKtpUFg" type="3067">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy9nFlEeK8x7zQKtpUFg" type="5118"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy93FlEeK8x7zQKtpUFg" type="7006">
+ <children xmi:type="notation:Shape" xmi:id="_PIuy-HFlEeK8x7zQKtpUFg" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuy-XFlEeK8x7zQKtpUFg" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuy-nFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_PI4j5nFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy-3FlEeK8x7zQKtpUFg" x="85" y="52"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy_HFlEeK8x7zQKtpUFg"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuy_XFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ActivityPartition" href="model.uml#_PI4jy3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuy_nFlEeK8x7zQKtpUFg" x="391" y="30" width="239" height="148"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIuy_3FlEeK8x7zQKtpUFg" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzAHFlEeK8x7zQKtpUFg" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuzAXFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_PI4j53FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuzAnFlEeK8x7zQKtpUFg" x="497" y="288"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIuzA3FlEeK8x7zQKtpUFg" type="3039">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzBHFlEeK8x7zQKtpUFg" type="5099">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzBXFlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIuzBnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:MergeNode" href="model.uml#_PI4j6HFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuzB3FlEeK8x7zQKtpUFg" x="715" y="183"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuzCHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:Activity" href="model.uml#_PI4jxnFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIuzCXFlEeK8x7zQKtpUFg"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_PIuzCnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Activity" href="model.uml#_PI4jxnFlEeK8x7zQKtpUFg"/>
+ <edges xmi:type="notation:Connector" xmi:id="_PIuzC3FlEeK8x7zQKtpUFg" type="4004" source="_PIuy1nFlEeK8x7zQKtpUFg" target="_PIuy43FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzDHFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzDXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzDnFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzD3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzEHFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzEXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzEnFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzE3FlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIuzFHFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4jzHFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIuzFXFlEeK8x7zQKtpUFg" points="[1, 3, -39, -143]$[39, 126, -1, -20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIuzFnFlEeK8x7zQKtpUFg" id="(0.45,0.8)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIuzF3FlEeK8x7zQKtpUFg" type="4004" source="_PIuy43FlEeK8x7zQKtpUFg" target="_PIuy53FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzGHFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzGXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzGnFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzG3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzHHFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzHXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzHnFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzH3FlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIuzIHFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4jz3FlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIuzIXFlEeK8x7zQKtpUFg" points="[11, 2, -73, -1]$[88, -17, 4, -20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIuzInFlEeK8x7zQKtpUFg" id="(0.8428571428571429,0.425)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIuzI3FlEeK8x7zQKtpUFg" type="4004" source="_PIuy53FlEeK8x7zQKtpUFg" target="_PIuy63FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzJHFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzJXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzJnFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzJ3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzKHFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzKXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzKnFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzK3FlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIuzLHFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4j0nFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIuzLXFlEeK8x7zQKtpUFg" points="[35, -4, -48, 1]$[82, 8, -1, 13]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIuzLnFlEeK8x7zQKtpUFg" type="4004" source="_PIuy63FlEeK8x7zQKtpUFg" target="_PIuy-HFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzL3FlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzMHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzMXFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzMnFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzM3FlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzNHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzNXFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzNnFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIuzN3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4j1XFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIuzOHFlEeK8x7zQKtpUFg" points="[6, -6, -181, 151]$[189, -137, 2, 20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIuzOXFlEeK8x7zQKtpUFg" type="4004" source="_PIuy63FlEeK8x7zQKtpUFg" target="_PIuy_3FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzOnFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzO3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzPHFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzPXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzPnFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzP3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzQHFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzQXFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIuzQnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4j2HFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIuzQ3FlEeK8x7zQKtpUFg" points="[13, 2, -195, -27]$[243, 37, 35, 8]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIuzRHFlEeK8x7zQKtpUFg" id="(0.25,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIuzRXFlEeK8x7zQKtpUFg" type="4004" source="_PIuy_3FlEeK8x7zQKtpUFg" target="_PIuzA3FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzRnFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzR3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzSHFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzSXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzSnFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzS3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzTHFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzTXFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIuzTnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4j23FlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIuzT3FlEeK8x7zQKtpUFg" points="[16, -11, -158, 103]$[174, -114, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIuzUHFlEeK8x7zQKtpUFg" id="(0.7714285714285715,0.6)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIuzUXFlEeK8x7zQKtpUFg" type="4004" source="_PIuy-HFlEeK8x7zQKtpUFg" target="_PIuzA3FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzUnFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzU3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzVHFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzVXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzVnFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzV3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIuzWHFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIuzWXFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIuzWnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4j3nFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIuzW3FlEeK8x7zQKtpUFg" points="[35, 12, -174, -64]$[208, 62, -1, -14]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIvZ0HFlEeK8x7zQKtpUFg" type="4004" source="_PIuzA3FlEeK8x7zQKtpUFg" target="_PIuy23FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIvZ0XFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIvZ0nFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIvZ03FlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIvZ1HFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIvZ1XFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIvZ1nFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIvZ13FlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIvZ2HFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIvZ2XFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4j4XFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIvZ2nFlEeK8x7zQKtpUFg" points="[7, -4, -65, -2]$[71, -12, -1, -10]"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_PIxPAHFlEeK8x7zQKtpUFg" type="PapyrusUMLStateMachineDiagram" name="fsm" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_PIxPAXFlEeK8x7zQKtpUFg" type="2000" fontName="Lucida Grande" fontHeight="11" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIxPAnFlEeK8x7zQKtpUFg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIxPA3FlEeK8x7zQKtpUFg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIxPBHFlEeK8x7zQKtpUFg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIxPBXFlEeK8x7zQKtpUFg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIxPBnFlEeK8x7zQKtpUFg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIxPB3FlEeK8x7zQKtpUFg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPCHFlEeK8x7zQKtpUFg" type="2001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPCXFlEeK8x7zQKtpUFg" width="700" height="13"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPCnFlEeK8x7zQKtpUFg" type="2002">
+ <children xmi:type="notation:Shape" xmi:id="_PIxPC3FlEeK8x7zQKtpUFg" type="3000" fontName="Lucida Grande" fontHeight="11" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIxPDHFlEeK8x7zQKtpUFg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIxPDXFlEeK8x7zQKtpUFg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIxPDnFlEeK8x7zQKtpUFg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIxPD3FlEeK8x7zQKtpUFg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIxPEHFlEeK8x7zQKtpUFg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIxPEXFlEeK8x7zQKtpUFg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIxPEnFlEeK8x7zQKtpUFg" source="RegionAnnotationKey">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIxPE3FlEeK8x7zQKtpUFg" key="RegionZoneKey" value="L"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPFHFlEeK8x7zQKtpUFg" type="3002">
+ <children xmi:type="notation:Shape" xmi:id="_PIxPFXFlEeK8x7zQKtpUFg" type="8000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPFnFlEeK8x7zQKtpUFg" type="8001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPF3FlEeK8x7zQKtpUFg" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPGHFlEeK8x7zQKtpUFg" type="8002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPGXFlEeK8x7zQKtpUFg" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Pseudostate" href="model.uml#_PI4j7nFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPGnFlEeK8x7zQKtpUFg" x="51" y="53"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIxPG3FlEeK8x7zQKtpUFg" type="6000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPHHFlEeK8x7zQKtpUFg" type="6001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPHXFlEeK8x7zQKtpUFg" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPHnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:State" href="model.uml#_PI4j73FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPH3FlEeK8x7zQKtpUFg" x="96" y="164"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIxPIHFlEeK8x7zQKtpUFg" type="6000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPIXFlEeK8x7zQKtpUFg" type="6001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPInFlEeK8x7zQKtpUFg" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPI3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:State" href="model.uml#_PI4j8HFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPJHFlEeK8x7zQKtpUFg" x="240" y="164"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIxPJXFlEeK8x7zQKtpUFg" type="5000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPJnFlEeK8x7zQKtpUFg" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPJ3FlEeK8x7zQKtpUFg" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPKHFlEeK8x7zQKtpUFg" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPKXFlEeK8x7zQKtpUFg" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:FinalState" href="model.uml#_PI4j8XFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPKnFlEeK8x7zQKtpUFg" x="195" y="30"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPK3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:Region" href="model.uml#_PI4j6nFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPLHFlEeK8x7zQKtpUFg" width="350" height="287"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIxPLXFlEeK8x7zQKtpUFg" type="3000">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIxPLnFlEeK8x7zQKtpUFg" source="RegionAnnotationKey">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIxPL3FlEeK8x7zQKtpUFg" key="RegionZoneKey" value="R"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPMHFlEeK8x7zQKtpUFg" type="3002">
+ <children xmi:type="notation:Shape" xmi:id="_PIxPMXFlEeK8x7zQKtpUFg" type="6000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPMnFlEeK8x7zQKtpUFg" type="6001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPM3FlEeK8x7zQKtpUFg" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPNHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:State" href="model.uml#_PI4j-HFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPNXFlEeK8x7zQKtpUFg" x="79" y="110"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIxPNnFlEeK8x7zQKtpUFg" type="6000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPN3FlEeK8x7zQKtpUFg" type="6001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPOHFlEeK8x7zQKtpUFg" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPOXFlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:State" href="model.uml#_PI4j-XFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPOnFlEeK8x7zQKtpUFg" x="205" y="119"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIxPO3FlEeK8x7zQKtpUFg" type="9000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPPHFlEeK8x7zQKtpUFg" type="9001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPPXFlEeK8x7zQKtpUFg" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPPnFlEeK8x7zQKtpUFg" type="9002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPP3FlEeK8x7zQKtpUFg" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Pseudostate" href="model.uml#_PI4j-nFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPQHFlEeK8x7zQKtpUFg" x="168" y="49"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIxPQXFlEeK8x7zQKtpUFg" type="10000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPQnFlEeK8x7zQKtpUFg" type="10001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPQ3FlEeK8x7zQKtpUFg" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPRHFlEeK8x7zQKtpUFg" type="10002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPRXFlEeK8x7zQKtpUFg" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Pseudostate" href="model.uml#_PI4j-3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPRnFlEeK8x7zQKtpUFg" x="173" y="202"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPR3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:Region" href="model.uml#_PI4j8nFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPSHFlEeK8x7zQKtpUFg" x="350" width="350" height="287"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPSXFlEeK8x7zQKtpUFg" y="13" width="700" height="287"/>
+ </children>
+ <element xmi:type="uml:StateMachine" href="model.uml#_PI4j6XFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIxPSnFlEeK8x7zQKtpUFg" x="30" y="30" width="700" height="300"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_PIxPS3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:StateMachine" href="model.uml#_PI4j6XFlEeK8x7zQKtpUFg"/>
+ <edges xmi:type="notation:Connector" xmi:id="_PIxPTHFlEeK8x7zQKtpUFg" type="7000" source="_PIxPFXFlEeK8x7zQKtpUFg" target="_PIxPG3FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPTXFlEeK8x7zQKtpUFg" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPTnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPT3FlEeK8x7zQKtpUFg" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPUHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPUXFlEeK8x7zQKtpUFg" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPUnFlEeK8x7zQKtpUFg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIxPU3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Transition" href="model.uml#_PI4j63FlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIxPVHFlEeK8x7zQKtpUFg" points="[4, 10, -51, -111]$[52, 101, -3, -20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIxPVXFlEeK8x7zQKtpUFg" type="7000" source="_PIxPG3FlEeK8x7zQKtpUFg" target="_PIxPIHFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPVnFlEeK8x7zQKtpUFg" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPV3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPWHFlEeK8x7zQKtpUFg" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIxPWXFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIxPWnFlEeK8x7zQKtpUFg" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2EHFlEeK8x7zQKtpUFg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIx2EXFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Transition" href="model.uml#_PI4j7HFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIx2EnFlEeK8x7zQKtpUFg" points="[20, 7, -105, 6]$[128, 21, 3, 20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIx2E3FlEeK8x7zQKtpUFg" type="7000" source="_PIxPIHFlEeK8x7zQKtpUFg" target="_PIxPQXFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2FHFlEeK8x7zQKtpUFg" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2FXFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2FnFlEeK8x7zQKtpUFg" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2F3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2GHFlEeK8x7zQKtpUFg" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2GXFlEeK8x7zQKtpUFg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIx2GnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Transition" href="model.uml#_PI4j7XFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIx2G3FlEeK8x7zQKtpUFg" points="[20, 1, -267, -21]$[287, 17, 0, -5]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIx2HHFlEeK8x7zQKtpUFg" type="7000" source="_PIxPQXFlEeK8x7zQKtpUFg" target="_PIxPMXFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2HXFlEeK8x7zQKtpUFg" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2HnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2H3FlEeK8x7zQKtpUFg" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2IHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2IXFlEeK8x7zQKtpUFg" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2InFlEeK8x7zQKtpUFg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIx2I3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Transition" href="model.uml#_PI4j83FlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIx2JHFlEeK8x7zQKtpUFg" points="[-2, -2, 77, 72]$[-74, -94, 5, -20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIx2JXFlEeK8x7zQKtpUFg" id="(0.5,0.2)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIx2JnFlEeK8x7zQKtpUFg" type="7000" source="_PIxPQXFlEeK8x7zQKtpUFg" target="_PIxPNnFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2J3FlEeK8x7zQKtpUFg" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2KHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2KXFlEeK8x7zQKtpUFg" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2KnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2K3FlEeK8x7zQKtpUFg" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2LHFlEeK8x7zQKtpUFg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIx2LXFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Transition" href="model.uml#_PI4j9HFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIx2LnFlEeK8x7zQKtpUFg" points="[5, -6, -49, 50]$[58, -48, 4, 8]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIx2L3FlEeK8x7zQKtpUFg" id="(0.675,0.8)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIx2MHFlEeK8x7zQKtpUFg" type="7000" source="_PIxPMXFlEeK8x7zQKtpUFg" target="_PIxPO3FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2MXFlEeK8x7zQKtpUFg" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2MnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2M3FlEeK8x7zQKtpUFg" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2NHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2NXFlEeK8x7zQKtpUFg" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2NnFlEeK8x7zQKtpUFg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIx2N3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Transition" href="model.uml#_PI4j9XFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIx2OHFlEeK8x7zQKtpUFg" points="[6, -5, -72, 54]$[76, -58, -2, 1]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIx2OXFlEeK8x7zQKtpUFg" id="(0.325,0.125)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIx2OnFlEeK8x7zQKtpUFg" id="(0.2,0.7)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIx2O3FlEeK8x7zQKtpUFg" type="7000" source="_PIxPNnFlEeK8x7zQKtpUFg" target="_PIxPO3FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2PHFlEeK8x7zQKtpUFg" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2PXFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2PnFlEeK8x7zQKtpUFg" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2P3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2QHFlEeK8x7zQKtpUFg" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2QXFlEeK8x7zQKtpUFg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIx2QnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Transition" href="model.uml#_PI4j9nFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIx2Q3FlEeK8x7zQKtpUFg" points="[-13, -20, 39, 65]$[-52, -80, 0, 5]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIx2RHFlEeK8x7zQKtpUFg" type="7000" source="_PIxPO3FlEeK8x7zQKtpUFg" target="_PIxPJXFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2RXFlEeK8x7zQKtpUFg" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2RnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2R3FlEeK8x7zQKtpUFg" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2SHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIx2SXFlEeK8x7zQKtpUFg" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIx2SnFlEeK8x7zQKtpUFg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIx2S3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Transition" href="model.uml#_PI4j93FlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIx2THFlEeK8x7zQKtpUFg" points="[-5, -1, 313, 13]$[-315, -4, 3, 10]"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_PIzrQHFlEeK8x7zQKtpUFg" type="PapyrusUMLActivityDiagram" name="activity2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_PIzrQXFlEeK8x7zQKtpUFg" type="2001" fontName="Lucida Grande" fontHeight="11" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIzrQnFlEeK8x7zQKtpUFg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIzrQ3FlEeK8x7zQKtpUFg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIzrRHFlEeK8x7zQKtpUFg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIzrRXFlEeK8x7zQKtpUFg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PIzrRnFlEeK8x7zQKtpUFg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PIzrR3FlEeK8x7zQKtpUFg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrSHFlEeK8x7zQKtpUFg" type="5001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrSXFlEeK8x7zQKtpUFg" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIzrSnFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIzrS3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrTHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrTXFlEeK8x7zQKtpUFg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIzrTnFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIzrT3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrUHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrUXFlEeK8x7zQKtpUFg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PIzrUnFlEeK8x7zQKtpUFg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PIzrU3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrVHFlEeK8x7zQKtpUFg"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrVXFlEeK8x7zQKtpUFg" type="7004">
+ <children xmi:type="notation:Shape" xmi:id="_PIzrVnFlEeK8x7zQKtpUFg" type="3004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrV3FlEeK8x7zQKtpUFg" type="5080">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrWHFlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzrWXFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:InitialNode" href="model.uml#_PI4kFnFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrWnFlEeK8x7zQKtpUFg" x="45" y="84"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIzrW3FlEeK8x7zQKtpUFg" type="3067">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrXHFlEeK8x7zQKtpUFg" type="5118"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrXXFlEeK8x7zQKtpUFg" type="7006">
+ <children xmi:type="notation:Shape" xmi:id="_PIzrXnFlEeK8x7zQKtpUFg" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrX3FlEeK8x7zQKtpUFg" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzrYHFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_PI4kGHFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrYXFlEeK8x7zQKtpUFg" x="85" y="100"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIzrYnFlEeK8x7zQKtpUFg" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrY3FlEeK8x7zQKtpUFg" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzrZHFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_PI4kGXFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrZXFlEeK8x7zQKtpUFg" x="85" y="268"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrZnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzrZ3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ActivityPartition" href="model.uml#_PI4j_XFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzraHFlEeK8x7zQKtpUFg" x="283" y="-6" width="244" height="397"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIzraXFlEeK8x7zQKtpUFg" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzranFlEeK8x7zQKtpUFg" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzra3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_PI4kF3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrbHFlEeK8x7zQKtpUFg" x="106" y="210"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIzrbXFlEeK8x7zQKtpUFg" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrbnFlEeK8x7zQKtpUFg" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzrb3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_PI4kGnFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrcHFlEeK8x7zQKtpUFg" x="670" y="210"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIzrcXFlEeK8x7zQKtpUFg" type="3005">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrcnFlEeK8x7zQKtpUFg" type="5081">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrc3FlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzrdHFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ActivityFinalNode" href="model.uml#_PI4kG3FlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrdXFlEeK8x7zQKtpUFg" x="742" y="84"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIzrdnFlEeK8x7zQKtpUFg" type="3040">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrd3FlEeK8x7zQKtpUFg" type="5100">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzreHFlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzreXFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ForkNode" href="model.uml#_PI4kHHFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrenFlEeK8x7zQKtpUFg" x="229" y="210"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_PIzre3FlEeK8x7zQKtpUFg" type="3041">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrfHFlEeK8x7zQKtpUFg" type="5042">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrfXFlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrfnFlEeK8x7zQKtpUFg" type="5101">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrf3FlEeK8x7zQKtpUFg" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_PIzrgHFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:JoinNode" href="model.uml#_PI4kHXFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrgXFlEeK8x7zQKtpUFg" x="598" y="210"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrgnFlEeK8x7zQKtpUFg"/>
+ </children>
+ <element xmi:type="uml:Activity" href="model.uml#_PI4j_HFlEeK8x7zQKtpUFg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PIzrg3FlEeK8x7zQKtpUFg"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_PIzrhHFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:Activity" href="model.uml#_PI4j_HFlEeK8x7zQKtpUFg"/>
+ <edges xmi:type="notation:Connector" xmi:id="_PIzrhXFlEeK8x7zQKtpUFg" type="4004" source="_PIzrVnFlEeK8x7zQKtpUFg" target="_PIzraXFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrhnFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrh3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzriHFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzriXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrinFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzri3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrjHFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrjXFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIzrjnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4j_nFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIzrj3FlEeK8x7zQKtpUFg" points="[4, 8, -63, -118]$[51, 117, -16, -9]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIzrkHFlEeK8x7zQKtpUFg" id="(0.22857142857142856,0.25)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIzrkXFlEeK8x7zQKtpUFg" type="4004" source="_PIzraXFlEeK8x7zQKtpUFg" target="_PIzrdnFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrknFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrk3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrlHFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrlXFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrlnFlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrl3FlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrmHFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PIzrmXFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PIzrmnFlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4kAXFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PIzrm3FlEeK8x7zQKtpUFg" points="[35, 0, -58, 0]$[88, 0, -5, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PIzrnHFlEeK8x7zQKtpUFg" type="4004" source="_PIzrdnFlEeK8x7zQKtpUFg" target="_PIzrXnFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PIzrnXFlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SUHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SUXFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SUnFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SU3FlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SVHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SVXFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SVnFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PI0SV3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4kBHFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PI0SWHFlEeK8x7zQKtpUFg" points="[4, -2, -169, 83]$[138, -80, -35, 5]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PI0SWXFlEeK8x7zQKtpUFg" id="(0.6,0.15)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PI0SWnFlEeK8x7zQKtpUFg" type="4004" source="_PIzrdnFlEeK8x7zQKtpUFg" target="_PIzrYnFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SW3FlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SXHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SXXFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SXnFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SX3FlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SYHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SYXFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SYnFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PI0SY3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4kB3FlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PI0SZHFlEeK8x7zQKtpUFg" points="[5, 2, -150, -71]$[139, 73, -16, 0]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PI0SZXFlEeK8x7zQKtpUFg" id="(0.22857142857142856,0.525)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PI0SZnFlEeK8x7zQKtpUFg" type="4004" source="_PIzrXnFlEeK8x7zQKtpUFg" target="_PIzre3FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SZ3FlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SaHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SaXFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SanFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0Sa3FlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SbHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SbXFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SbnFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PI0Sb3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4kCnFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PI0ScHFlEeK8x7zQKtpUFg" points="[16, 8, -160, -85]$[176, 73, 0, -20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PI0ScXFlEeK8x7zQKtpUFg" id="(0.7714285714285715,0.65)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PI0ScnFlEeK8x7zQKtpUFg" type="4004" source="_PIzrYnFlEeK8x7zQKtpUFg" target="_PIzre3FlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0Sc3FlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SdHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SdXFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SdnFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0Sd3FlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SeHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SeXFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SenFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PI0Se3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4kDXFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PI0SfHFlEeK8x7zQKtpUFg" points="[17, -7, -160, 65]$[175, -52, -2, 20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PI0SfXFlEeK8x7zQKtpUFg" id="(0.7571428571428571,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PI0SfnFlEeK8x7zQKtpUFg" type="4004" source="_PIzre3FlEeK8x7zQKtpUFg" target="_PIzrbXFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0Sf3FlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SgHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SgXFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SgnFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0Sg3FlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0ShHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0ShXFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0ShnFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PI0Sh3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4kEHFlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PI0SiHFlEeK8x7zQKtpUFg" points="[5, -1, -97, 0]$[85, -3, -17, -2]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PI0SiXFlEeK8x7zQKtpUFg" id="(0.24285714285714285,0.45)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_PI0SinFlEeK8x7zQKtpUFg" type="4004" source="_PIzrbXFlEeK8x7zQKtpUFg" target="_PIzrcXFlEeK8x7zQKtpUFg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0Si3FlEeK8x7zQKtpUFg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SjHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SjXFlEeK8x7zQKtpUFg" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SjnFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0Sj3FlEeK8x7zQKtpUFg" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SkHFlEeK8x7zQKtpUFg" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PI0SkXFlEeK8x7zQKtpUFg" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PI0SknFlEeK8x7zQKtpUFg" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_PI0Sk3FlEeK8x7zQKtpUFg"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_PI4kE3FlEeK8x7zQKtpUFg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PI0SlHFlEeK8x7zQKtpUFg" points="[-2, -9, 12, 115]$[-14, -114, 0, 10]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PI0SlXFlEeK8x7zQKtpUFg" id="(0.4,0.225)"/>
+ </edges>
+ </notation:Diagram>
+ <nattable:Table xmi:id="_0TYNgJoYEeOBraiw2Bz-fA" description="Table Description" name="DefaultTable(Converted)" currentRowAxisProvider="_0TYNgpoYEeOBraiw2Bz-fA" currentColumnAxisProvider="_0TYNgZoYEeOBraiw2Bz-fA">
+ <context xmi:type="uml:Model" href="model.uml#_PI4jwHFlEeK8x7zQKtpUFg"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_0TYNgZoYEeOBraiw2Bz-fA" description="This axis provider provides available columns according to the rows of the table (features of the object displayed on the other axis)" name="UML Feature axis provider"/>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_0TYNgpoYEeOBraiw2Bz-fA" description="This axis provider contains the object dropped by the user into the table" name="DroppedElementAxisProvider">
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_0TYNg5oYEeOBraiw2Bz-fA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="model.uml#_PI4jwnFlEeK8x7zQKtpUFg"/>
+ </axis>
+ </rowAxisProvidersHistory>
+ </nattable:Table>
+</xmi:XMI>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.uml b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.uml
new file mode 100755
index 00000000..c601b47a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/resources/model.uml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_PI4jwHFlEeK8x7zQKtpUFg" name="model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_PI4jwXFlEeK8x7zQKtpUFg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PI4jwnFlEeK8x7zQKtpUFg" name="Foo" classifierBehavior="_PI4j_HFlEeK8x7zQKtpUFg">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_PI4jw3FlEeK8x7zQKtpUFg" name="bar" type="_PI4kHnFlEeK8x7zQKtpUFg" association="_PI4kIHFlEeK8x7zQKtpUFg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_PI4jxHFlEeK8x7zQKtpUFg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_PI4jxXFlEeK8x7zQKtpUFg" value="1"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:Activity" xmi:id="_PI4jxnFlEeK8x7zQKtpUFg" name="Activity1" group="_PI4jx3FlEeK8x7zQKtpUFg _PI4jy3FlEeK8x7zQKtpUFg" node="_PI4j5HFlEeK8x7zQKtpUFg _PI4j5XFlEeK8x7zQKtpUFg _PI4j5nFlEeK8x7zQKtpUFg _PI4j53FlEeK8x7zQKtpUFg _PI4j6HFlEeK8x7zQKtpUFg">
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4jzHFlEeK8x7zQKtpUFg" name="ControlFlow1" source="_PI4j5HFlEeK8x7zQKtpUFg" target="_PI4jyHFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4jzXFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4jznFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4jz3FlEeK8x7zQKtpUFg" name="ControlFlow2" source="_PI4jyHFlEeK8x7zQKtpUFg" target="_PI4jyXFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4j0HFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4j0XFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4j0nFlEeK8x7zQKtpUFg" name="ControlFlow3" source="_PI4jyXFlEeK8x7zQKtpUFg" target="_PI4jynFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4j03FlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4j1HFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4j1XFlEeK8x7zQKtpUFg" name="ControlFlow4" source="_PI4jynFlEeK8x7zQKtpUFg" target="_PI4j5nFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4j1nFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4j13FlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4j2HFlEeK8x7zQKtpUFg" name="ControlFlow5" source="_PI4jynFlEeK8x7zQKtpUFg" target="_PI4j53FlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4j2XFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4j2nFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4j23FlEeK8x7zQKtpUFg" name="ControlFlow6" source="_PI4j53FlEeK8x7zQKtpUFg" target="_PI4j6HFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4j3HFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4j3XFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4j3nFlEeK8x7zQKtpUFg" name="ControlFlow7" source="_PI4j5nFlEeK8x7zQKtpUFg" target="_PI4j6HFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4j33FlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4j4HFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4j4XFlEeK8x7zQKtpUFg" name="ControlFlow8" source="_PI4j6HFlEeK8x7zQKtpUFg" target="_PI4j5XFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4j4nFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4j43FlEeK8x7zQKtpUFg"/>
+ </edge>
+ <group xmi:type="uml:StructuredActivityNode" xmi:id="_PI4jx3FlEeK8x7zQKtpUFg" name="StructuredActivityNode1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_PI4jyHFlEeK8x7zQKtpUFg" name="OpaqueAction1" outgoing="_PI4jz3FlEeK8x7zQKtpUFg" incoming="_PI4jzHFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_PI4jyXFlEeK8x7zQKtpUFg" name="OpaqueAction2" outgoing="_PI4j0nFlEeK8x7zQKtpUFg" incoming="_PI4jz3FlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_PI4jynFlEeK8x7zQKtpUFg" name="DecisionNode1" outgoing="_PI4j1XFlEeK8x7zQKtpUFg _PI4j2HFlEeK8x7zQKtpUFg" incoming="_PI4j0nFlEeK8x7zQKtpUFg"/>
+ </group>
+ <group xmi:type="uml:ActivityPartition" xmi:id="_PI4jy3FlEeK8x7zQKtpUFg" name="ActivityPartition1" node="_PI4j5nFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:InitialNode" xmi:id="_PI4j5HFlEeK8x7zQKtpUFg" name="InitialNode1" outgoing="_PI4jzHFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:ActivityFinalNode" xmi:id="_PI4j5XFlEeK8x7zQKtpUFg" name="ActivityFinalNode1" incoming="_PI4j4XFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_PI4j5nFlEeK8x7zQKtpUFg" name="OpaqueAction1" inPartition="_PI4jy3FlEeK8x7zQKtpUFg" outgoing="_PI4j3nFlEeK8x7zQKtpUFg" incoming="_PI4j1XFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_PI4j53FlEeK8x7zQKtpUFg" name="OpaqueAction2" outgoing="_PI4j23FlEeK8x7zQKtpUFg" incoming="_PI4j2HFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:MergeNode" xmi:id="_PI4j6HFlEeK8x7zQKtpUFg" name="MergeNode1" outgoing="_PI4j4XFlEeK8x7zQKtpUFg" incoming="_PI4j23FlEeK8x7zQKtpUFg _PI4j3nFlEeK8x7zQKtpUFg"/>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_PI4j6XFlEeK8x7zQKtpUFg" name="StateMachine1">
+ <region xmi:type="uml:Region" xmi:id="_PI4j6nFlEeK8x7zQKtpUFg" name="Region1">
+ <transition xmi:type="uml:Transition" xmi:id="_PI4j63FlEeK8x7zQKtpUFg" name="Transition0" source="_PI4j7nFlEeK8x7zQKtpUFg" target="_PI4j73FlEeK8x7zQKtpUFg"/>
+ <transition xmi:type="uml:Transition" xmi:id="_PI4j7HFlEeK8x7zQKtpUFg" name="Transition1" source="_PI4j73FlEeK8x7zQKtpUFg" target="_PI4j8HFlEeK8x7zQKtpUFg"/>
+ <transition xmi:type="uml:Transition" xmi:id="_PI4j7XFlEeK8x7zQKtpUFg" name="Transition2" source="_PI4j8HFlEeK8x7zQKtpUFg" target="_PI4j-3FlEeK8x7zQKtpUFg"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_PI4j7nFlEeK8x7zQKtpUFg" name="Initial0"/>
+ <subvertex xmi:type="uml:State" xmi:id="_PI4j73FlEeK8x7zQKtpUFg" name="State0"/>
+ <subvertex xmi:type="uml:State" xmi:id="_PI4j8HFlEeK8x7zQKtpUFg" name="State1"/>
+ <subvertex xmi:type="uml:FinalState" xmi:id="_PI4j8XFlEeK8x7zQKtpUFg" name="FinalState0"/>
+ </region>
+ <region xmi:type="uml:Region" xmi:id="_PI4j8nFlEeK8x7zQKtpUFg" name="Region0">
+ <transition xmi:type="uml:Transition" xmi:id="_PI4j83FlEeK8x7zQKtpUFg" name="Transition0" source="_PI4j-3FlEeK8x7zQKtpUFg" target="_PI4j-HFlEeK8x7zQKtpUFg"/>
+ <transition xmi:type="uml:Transition" xmi:id="_PI4j9HFlEeK8x7zQKtpUFg" name="Transition1" source="_PI4j-3FlEeK8x7zQKtpUFg" target="_PI4j-XFlEeK8x7zQKtpUFg"/>
+ <transition xmi:type="uml:Transition" xmi:id="_PI4j9XFlEeK8x7zQKtpUFg" name="Transition2" source="_PI4j-HFlEeK8x7zQKtpUFg" target="_PI4j-nFlEeK8x7zQKtpUFg"/>
+ <transition xmi:type="uml:Transition" xmi:id="_PI4j9nFlEeK8x7zQKtpUFg" name="Transition3" source="_PI4j-XFlEeK8x7zQKtpUFg" target="_PI4j-nFlEeK8x7zQKtpUFg"/>
+ <transition xmi:type="uml:Transition" xmi:id="_PI4j93FlEeK8x7zQKtpUFg" name="Transition4" source="_PI4j-nFlEeK8x7zQKtpUFg" target="_PI4j8XFlEeK8x7zQKtpUFg"/>
+ <subvertex xmi:type="uml:State" xmi:id="_PI4j-HFlEeK8x7zQKtpUFg" name="State0"/>
+ <subvertex xmi:type="uml:State" xmi:id="_PI4j-XFlEeK8x7zQKtpUFg" name="State1"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_PI4j-nFlEeK8x7zQKtpUFg" name="Join0" kind="join"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_PI4j-3FlEeK8x7zQKtpUFg" name="Fork0" kind="fork"/>
+ </region>
+ </ownedBehavior>
+ <ownedBehavior xmi:type="uml:Activity" xmi:id="_PI4j_HFlEeK8x7zQKtpUFg" name="Activity2" group="_PI4j_XFlEeK8x7zQKtpUFg" node="_PI4kFnFlEeK8x7zQKtpUFg _PI4kF3FlEeK8x7zQKtpUFg _PI4kGHFlEeK8x7zQKtpUFg _PI4kGXFlEeK8x7zQKtpUFg _PI4kGnFlEeK8x7zQKtpUFg _PI4kG3FlEeK8x7zQKtpUFg _PI4kHHFlEeK8x7zQKtpUFg _PI4kHXFlEeK8x7zQKtpUFg">
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4j_nFlEeK8x7zQKtpUFg" name="ControlFlow1" source="_PI4kFnFlEeK8x7zQKtpUFg" target="_PI4kF3FlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4j_3FlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4kAHFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4kAXFlEeK8x7zQKtpUFg" name="ControlFlow2" source="_PI4kF3FlEeK8x7zQKtpUFg" target="_PI4kHHFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4kAnFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4kA3FlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4kBHFlEeK8x7zQKtpUFg" name="ControlFlow3" source="_PI4kHHFlEeK8x7zQKtpUFg" target="_PI4kGHFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4kBXFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4kBnFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4kB3FlEeK8x7zQKtpUFg" name="ControlFlow4" source="_PI4kHHFlEeK8x7zQKtpUFg" target="_PI4kGXFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4kCHFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4kCXFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4kCnFlEeK8x7zQKtpUFg" name="ControlFlow5" source="_PI4kGHFlEeK8x7zQKtpUFg" target="_PI4kHXFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4kC3FlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4kDHFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4kDXFlEeK8x7zQKtpUFg" name="ControlFlow6" source="_PI4kGXFlEeK8x7zQKtpUFg" target="_PI4kHXFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4kDnFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4kD3FlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4kEHFlEeK8x7zQKtpUFg" name="ControlFlow7" source="_PI4kHXFlEeK8x7zQKtpUFg" target="_PI4kGnFlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4kEXFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4kEnFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_PI4kE3FlEeK8x7zQKtpUFg" name="ControlFlow8" source="_PI4kGnFlEeK8x7zQKtpUFg" target="_PI4kG3FlEeK8x7zQKtpUFg">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_PI4kFHFlEeK8x7zQKtpUFg" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_PI4kFXFlEeK8x7zQKtpUFg"/>
+ </edge>
+ <group xmi:type="uml:ActivityPartition" xmi:id="_PI4j_XFlEeK8x7zQKtpUFg" name="ActivityPartition1" node="_PI4kGHFlEeK8x7zQKtpUFg _PI4kGXFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:InitialNode" xmi:id="_PI4kFnFlEeK8x7zQKtpUFg" name="InitialNode1" outgoing="_PI4j_nFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_PI4kF3FlEeK8x7zQKtpUFg" name="OpaqueAction1" outgoing="_PI4kAXFlEeK8x7zQKtpUFg" incoming="_PI4j_nFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_PI4kGHFlEeK8x7zQKtpUFg" name="OpaqueAction2" inPartition="_PI4j_XFlEeK8x7zQKtpUFg" outgoing="_PI4kCnFlEeK8x7zQKtpUFg" incoming="_PI4kBHFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_PI4kGXFlEeK8x7zQKtpUFg" name="OpaqueAction3" inPartition="_PI4j_XFlEeK8x7zQKtpUFg" outgoing="_PI4kDXFlEeK8x7zQKtpUFg" incoming="_PI4kB3FlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_PI4kGnFlEeK8x7zQKtpUFg" name="OpaqueAction4" outgoing="_PI4kE3FlEeK8x7zQKtpUFg" incoming="_PI4kEHFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:ActivityFinalNode" xmi:id="_PI4kG3FlEeK8x7zQKtpUFg" name="ActivityFinalNode1" incoming="_PI4kE3FlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:ForkNode" xmi:id="_PI4kHHFlEeK8x7zQKtpUFg" name="ForkNode1" outgoing="_PI4kBHFlEeK8x7zQKtpUFg _PI4kB3FlEeK8x7zQKtpUFg" incoming="_PI4kAXFlEeK8x7zQKtpUFg"/>
+ <node xmi:type="uml:JoinNode" xmi:id="_PI4kHXFlEeK8x7zQKtpUFg" name="JoinNode1" outgoing="_PI4kEHFlEeK8x7zQKtpUFg" incoming="_PI4kCnFlEeK8x7zQKtpUFg _PI4kDXFlEeK8x7zQKtpUFg"/>
+ </ownedBehavior>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PI4kHnFlEeK8x7zQKtpUFg" name="Bar">
+ <generalization xmi:type="uml:Generalization" xmi:id="_VZyEsIQqEeKq_f8GS5X7FQ">
+ <general xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </generalization>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_PI4kH3FlEeK8x7zQKtpUFg" name="name">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_PI4kIHFlEeK8x7zQKtpUFg" name="foo_bar" memberEnd="_PI4kIXFlEeK8x7zQKtpUFg _PI4jw3FlEeK8x7zQKtpUFg">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_PI4kIXFlEeK8x7zQKtpUFg" name="foo" type="_PI4jwnFlEeK8x7zQKtpUFg" association="_PI4kIHFlEeK8x7zQKtpUFg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_PI4kInFlEeK8x7zQKtpUFg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_PI4kI3FlEeK8x7zQKtpUFg" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+</uml:Model>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java
new file mode 100755
index 00000000..6ae5f230
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java
@@ -0,0 +1,227 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.util.CommitException;
+import org.eclipse.emf.cdo.util.ConcurrentAccessException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gef.EditPart;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
+import org.eclipse.papyrus.cdo.internal.ui.expressions.CDOObjectPropertyTester;
+import org.eclipse.papyrus.cdo.ui.tests.AbstractPapyrusCDOUITest;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IComponentPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
+import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.Class;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.base.Optional;
+
+/**
+ * This is the BasicEditorTest type. Enjoy.
+ */
+public class BasicEditorTest extends AbstractPapyrusCDOUITest {
+
+ private static final Object[] NO_OBJECTS = {};
+
+ @Rule
+ public final MemoryLeakRule memory = new MemoryLeakRule();
+
+
+ @BeforeClass
+ public static void beforeClass() {
+ System.setProperty("cdo.interactive.conflict.resolution", "false");
+ }
+
+ @AfterClass
+ public static void afterClass() {
+ System.clearProperty("cdo.interactive.conflict.resolution");
+ }
+
+ public BasicEditorTest() {
+ super();
+ }
+
+ @Test
+ public void editorOpens() {
+ openEditor();
+
+ Class foo = expectElement("Foo", Class.class);
+ EditPart editPart = expectEditPart(foo);
+
+ assertThat(editPart.isActive(), is(true));
+ }
+
+ @Test
+ public void canLock() {
+ openEditor();
+
+ Class foo = expectElement("Foo", Class.class);
+ EditPart editPart = expectEditPart(foo);
+
+ CDOObject cdoObject = (CDOObject) editPart.getAdapter(CDOObject.class);
+ boolean canLock = new CDOObjectPropertyTester().test(cdoObject, CDOObjectPropertyTester.CAN_LOCK, NO_OBJECTS, true);
+ assertThat(canLock, is(true));
+ }
+
+ @Test
+ public void isLockedLocally() {
+ openEditor();
+
+ Class foo = expectElement("Foo", Class.class);
+ EditPart editPart = expectEditPart(foo);
+
+ getDawnEditorSupport().lockObject(editPart);
+
+ CDOObject cdoObject = (CDOObject) editPart.getAdapter(CDOObject.class);
+ boolean isLocked = new CDOObjectPropertyTester().test(cdoObject, CDOObjectPropertyTester.IS_LOCKED_LOCALLY, NO_OBJECTS, true);
+ assertThat(isLocked, is(true));
+ }
+
+ @Test
+ public void isLockedRemotely() {
+ openEditor();
+
+ Class foo = expectElement("Foo", Class.class);
+ EditPart editPart = expectEditPart(foo);
+
+ URI uri = EcoreUtil.getURI(foo);
+
+ // open another transaction in which to lock the element
+ CDOTransaction transaction = createTransaction();
+ EObject remote = transaction.getResourceSet().getEObject(uri, true);
+ assertThat(remote, notNullValue());
+ CDOUtils.lock(CDOUtil.getCDOObject(remote));
+
+ // give the lock a chance to propagate
+ sleep(3);
+
+ CDOObject cdoObject = (CDOObject) editPart.getAdapter(CDOObject.class);
+ boolean isLocked = new CDOObjectPropertyTester().test(cdoObject, CDOObjectPropertyTester.IS_LOCKED_REMOTELY, NO_OBJECTS, true);
+ assertThat(isLocked, is(true));
+ }
+
+ @Test
+ public void isConflicting() throws Exception {
+ openEditor();
+
+ final Class foo = expectElement("Foo", Class.class);
+ EditPart editPart = expectEditPart(foo);
+ executeEdit(new Runnable() {
+
+ @Override
+ public void run() {
+ foo.setName("Foo1");
+ }
+ });
+
+ URI uri = EcoreUtil.getURI(foo);
+
+ // open another transaction in which to modify the element
+ CDOTransaction transaction = createTransaction();
+ Class remote = (Class) transaction.getResourceSet().getEObject(uri, true);
+ assertThat(remote, notNullValue());
+ remote.setName("Foo2");
+ transaction.commit();
+
+ // give the lock a chance to propagate
+ sleep(3);
+
+ CDOObject cdoObject = (CDOObject) editPart.getAdapter(CDOObject.class);
+ boolean isConflicting = new CDOObjectPropertyTester().test(cdoObject, CDOObjectPropertyTester.IS_CONFLICTED, NO_OBJECTS, true);
+ assertThat(isConflicting, is(true));
+ }
+
+ // TODO Re-enable when interactive conflict resolution is in place and modal dialog can be tested.
+ // @Test
+ public void handlesConflict() throws Exception {
+ IEditorPart editor = openEditor();
+ CDOTransaction transaction = null;
+
+ try {
+ final Class foo = expectElement("Foo", Class.class);
+ EditPart editPart = expectEditPart(foo);
+ executeEdit(new Runnable() {
+
+ @Override
+ public void run() {
+ foo.setName("Foo1");
+ }
+ });
+
+ URI uri = EcoreUtil.getURI(foo);
+
+ // open another transaction in which to modify the element
+ transaction = createTransaction();
+ Class remote = (Class) transaction.getResourceSet().getEObject(uri, true);
+ assertThat(remote, notNullValue());
+ remote.setName("Foo2");
+ transaction.commit();
+ transaction.close();
+
+ // give the lock a chance to propagate
+ sleep(3);
+
+ CDOObject cdoObject = (CDOObject) editPart.getAdapter(CDOObject.class);
+ boolean isConflicting = new CDOObjectPropertyTester().test(cdoObject, CDOObjectPropertyTester.IS_CONFLICTED, NO_OBJECTS, true);
+ assertThat(isConflicting, is(true));
+
+ editor.doSave(null);
+ } finally {
+ LifecycleUtil.deactivate(transaction);
+ closeEditor();
+ }
+ }
+
+ @Test
+ public void editorDoesNotLeakWhenClosed() throws Exception {
+ Optional<ISashWindowsContainer> sashContainer = AdapterUtils.adapt(openEditor(), ISashWindowsContainer.class);
+ sashContainer.get().visit(new IPageVisitor() {
+
+ @Override
+ public void accept(IEditorPage page) {
+ memory.add(page.getIEditorPart());
+ }
+
+ @Override
+ public void accept(IComponentPage page) {
+ // Pass
+ }
+ });
+
+ // Close the editor and open a new one so that the Outline View page
+ // may be replaced and reclaimed by GC
+ closeEditor();
+ openEditor();
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java
new file mode 100755
index 00000000..7c1648ee
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java
@@ -0,0 +1,271 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 430023
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.editors.tests;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.transaction.CDOTransactionFinishedEvent;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.net4j.util.event.IListener;
+import org.eclipse.papyrus.cdo.internal.ui.editors.DawnEditorAdapter;
+import org.eclipse.papyrus.cdo.internal.ui.editors.PapyrusGMFEditorSupport;
+import org.eclipse.papyrus.cdo.ui.tests.AbstractPapyrusCDOUITest;
+import org.eclipse.papyrus.junit.framework.classification.rules.Condition;
+import org.eclipse.papyrus.junit.framework.classification.rules.Conditional;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Class;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This is the DawnEditorAdapterTest type. Enjoy.
+ */
+public class DawnEditorAdapterTest extends AbstractPapyrusCDOUITest {
+
+ private IDawnEditor fixture;
+
+ @Test
+ public void testGetDawnEditor() {
+ assertThat(fixture, notNullValue());
+ }
+
+ @Test
+ public void testGetView() {
+ CDOTransaction transaction = getTransaction(getModelSet());
+ assertThat(fixture.getView(), sameInstance((CDOView)transaction));
+ }
+
+ @Test
+ public void testGetContributorID() {
+ assertThat(fixture.getContributorID(), is("org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorID"));
+ }
+
+ @Test
+ public void testSetDirty() {
+ getEditor().doSave(new NullProgressMonitor());
+ assertThat(getEditor().isDirty(), is(false));
+
+ TestPropertyListener test = new TestPropertyListener();
+ getDiagramEditor().addPropertyListener(test);
+
+ fixture.setDirty();
+
+ assertThat(test.getAndClearPropertyID(), is(IEditorPart.PROP_DIRTY));
+ }
+
+ @Test
+ public void testGetAdapter() {
+ Object expected = getDiagramEditor().getAdapter(IDiagramEditDomain.class);
+ assertThat(expected, notNullValue());
+
+ Object adapter = fixture.getAdapter(IDiagramEditDomain.class);
+ assertThat(adapter, is(expected));
+ }
+
+ @Test
+ public void testIsDirty() {
+ final Class foo = expectElement("Foo", Class.class);
+ executeEdit(new Runnable() {
+
+ @Override
+ public void run() {
+ foo.setName("Foo1");
+ }
+ });
+
+ assertThat(fixture.isDirty(), is(true));
+
+ getEditor().doSave(new NullProgressMonitor());
+
+ assertThat(fixture.isDirty(), is(false));
+ }
+
+ @Test
+ public void testGetDawnEditorSupport() {
+ assertThat(fixture.getDawnEditorSupport(), instanceOf(PapyrusGMFEditorSupport.class));
+ }
+
+ @Test
+ public void testGetEditorInput() {
+ IEditorInput input = fixture.getEditorInput();
+ assertThat(input, notNullValue());
+ assertThat(input, is(getDiagramEditor().getEditorInput()));
+ }
+
+ @Test
+ public void testGetEditorSite() {
+ IEditorSite site = fixture.getEditorSite();
+ assertThat(site, notNullValue());
+ assertThat(site, is(getDiagramEditor().getEditorSite()));
+ }
+
+ @Test
+ public void testAddRemovePropertyListener() {
+ TestPropertyListener test = new TestPropertyListener();
+ fixture.addPropertyListener(test);
+
+ getEditor().doSave(new NullProgressMonitor());
+ fixture.setDirty();
+
+ fixture.removePropertyListener(test);
+
+ assertThat(test.getAndClearPropertyID(), is(IEditorPart.PROP_DIRTY));
+
+ getEditor().doSave(new NullProgressMonitor());
+ fixture.setDirty();
+
+ assertThat(test.getAndClearPropertyID(), is(-1));
+ }
+
+ @Test
+ public void testGetSite() {
+ IWorkbenchPartSite site = fixture.getSite();
+ assertThat(site, notNullValue());
+ assertThat(site, is(getDiagramEditor().getSite()));
+ }
+
+ @Test
+ public void testGetTitle() {
+ String title = fixture.getTitle();
+ assertThat(title, notNullValue());
+ assertThat(title, is(getDiagramEditor().getTitle()));
+ }
+
+ @Test
+ public void testGetTitleImage() {
+ Image image = fixture.getTitleImage();
+ assertThat(image, notNullValue());
+ assertThat(image, is(getDiagramEditor().getTitleImage()));
+ }
+
+ @Test
+ public void testGetTitleToolTip() {
+ String title = fixture.getTitleToolTip();
+ assertThat(title, notNullValue());
+ assertThat(title, is(getDiagramEditor().getTitleToolTip()));
+ }
+
+ @Test
+ @Conditional(key = "workbenchIsActive")
+ public void testSetFocus() {
+ getRepositoryExplorer().setFocus();
+ flushDisplayEvents();
+
+ assertThat(getWorkbenchPage().getActivePart(), not((IWorkbenchPart)getEditor()));
+
+ fixture.setFocus();
+ flushDisplayEvents();
+
+ assertThat(getWorkbenchPage().getActivePart(), is((IWorkbenchPart)getEditor()));
+ }
+
+ @Test
+ public void testDoSave() {
+ final Class foo = expectElement("Foo", Class.class);
+ executeEdit(new Runnable() {
+
+ @Override
+ public void run() {
+ foo.setName("Foo1");
+ }
+ });
+
+ class Test implements IListener {
+
+ private volatile boolean committed;
+
+ @Override
+ public void notifyEvent(IEvent event) {
+ if(event instanceof CDOTransactionFinishedEvent) {
+ committed = true;
+ }
+ }
+
+ boolean getAndClearCommitted() {
+ boolean result = committed;
+ committed = false;
+ return result;
+ }
+ }
+
+ Test test = new Test();
+ getTransaction(getModelSet()).addListener(test);
+
+ fixture.doSave(new NullProgressMonitor());
+ sleep(3); // give the transaction some time to notify
+
+ assertThat(test.getAndClearCommitted(), is(true));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void prepareEditor() {
+ openEditor();
+
+ fixture = DawnEditorAdapter.getDawnEditor(getDiagramEditor());
+ }
+
+ /**
+ * when running the tests while using some other application, the workbench
+ * window doesn't have focus, so other focus changes don't work and we
+ * get spurious test failures.
+ */
+ @Condition
+ public boolean workbenchIsActive() {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if(window == null) {
+ window = PlatformUI.getWorkbench().getWorkbenchWindows()[0];
+ }
+ return window.getShell().getDisplay().getActiveShell() == window.getShell();
+ }
+
+ private static class TestPropertyListener implements IPropertyListener {
+
+ private int propertyID = -1;
+
+ @Override
+ public void propertyChanged(Object source, int propId) {
+ propertyID = propId;
+ }
+
+ int getAndClearPropertyID() {
+ int result = propertyID;
+ propertyID = -1;
+ return result;
+ }
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/CDOPapyrusMarkerTest.java b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/CDOPapyrusMarkerTest.java
new file mode 100755
index 00000000..cc7316b9
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/CDOPapyrusMarkerTest.java
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.markers.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.Map;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.internal.ui.Activator;
+import org.eclipse.papyrus.cdo.internal.ui.markers.CDOPapyrusMarker;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.edit.ProblemEditUtil;
+import org.eclipse.papyrus.infra.services.markerlistener.IPapyrusMarker;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This is the CDOPapyrusMarkerTest type. Enjoy.
+ */
+public class CDOPapyrusMarkerTest extends AbstractPapyrusCDOTest {
+
+ private static final String URI = EcoreUtil.getURI(EcorePackage.Literals.ECLASS).toString();
+
+ private static final String MESSAGE = "Hello, world";
+
+ private static final int SEVERITY = IMarker.SEVERITY_WARNING;
+
+ private static final String ATTR_BOOLEAN = "aBoolean";
+
+ private static final boolean ATTR_BOOLEAN_VALUE = true;
+
+ private static final String ATTR_INTEGER = "anInteger";
+
+ private static final int ATTR_INTEGER_VALUE = 42;
+
+ private static final String ATTR_STRING = "aString";
+
+ private static final String ATTR_STRING_VALUE = "this is a string";
+
+ private CDOPapyrusMarker fixture;
+
+ public CDOPapyrusMarkerTest() {
+ super();
+ }
+
+ @Test
+ public void testGetURI() throws CoreException {
+ assertThat(fixture.getAttribute(EValidator.URI_ATTRIBUTE), is((Object)URI));
+ assertThat(fixture.getAttribute(EValidator.URI_ATTRIBUTE, ""), is(URI));
+ }
+
+ @Test
+ public void testGetMessage() throws CoreException {
+ assertThat(fixture.getAttribute(IPapyrusMarker.MESSAGE), is((Object)MESSAGE));
+ assertThat(fixture.getAttribute(IPapyrusMarker.MESSAGE, ""), is(MESSAGE));
+ }
+
+ @Test
+ public void testGetSeverity() throws CoreException {
+ assertThat(fixture.getAttribute(IPapyrusMarker.SEVERITY), is((Object)SEVERITY));
+ assertThat(fixture.getAttribute(IPapyrusMarker.SEVERITY, -1), is(SEVERITY));
+ }
+
+ @Test
+ public void testGetBoolean() throws CoreException {
+ assertThat(fixture.getAttribute(ATTR_BOOLEAN), is((Object)ATTR_BOOLEAN_VALUE));
+ assertThat(fixture.getAttribute(ATTR_BOOLEAN, false), is(ATTR_BOOLEAN_VALUE));
+ }
+
+ @Test
+ public void testGetInteger() throws CoreException {
+ assertThat(fixture.getAttribute(ATTR_INTEGER), is((Object)ATTR_INTEGER_VALUE));
+ assertThat(fixture.getAttribute(ATTR_INTEGER, 0), is(ATTR_INTEGER_VALUE));
+ }
+
+ @Test
+ public void testGetString() throws CoreException {
+ assertThat(fixture.getAttribute(ATTR_STRING), is((Object)ATTR_STRING_VALUE));
+ assertThat(fixture.getAttribute(ATTR_STRING, ""), is(ATTR_STRING_VALUE));
+ }
+
+ @Test
+ public void testGetAttributes() throws CoreException {
+ Map<String, ?> attributes = fixture.getAttributes();
+
+ assertThat(attributes.get(EValidator.URI_ATTRIBUTE), is((Object)URI));
+ assertThat(attributes.get(IPapyrusMarker.MESSAGE), is((Object)MESSAGE));
+ assertThat(attributes.get(IPapyrusMarker.SEVERITY), is((Object)SEVERITY));
+
+ assertThat(attributes.get(ATTR_BOOLEAN), is((Object)ATTR_BOOLEAN_VALUE));
+ assertThat(attributes.get(ATTR_INTEGER), is((Object)ATTR_INTEGER_VALUE));
+ assertThat(attributes.get(ATTR_STRING), is((Object)ATTR_STRING_VALUE));
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testGetBooleanWrong() throws CoreException {
+ fixture.getAttribute(ATTR_INTEGER, false);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testGetIntegerWrong() throws CoreException {
+ fixture.getAttribute(ATTR_STRING, 0);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testGetStringWrong() throws CoreException {
+ fixture.getAttribute(ATTR_BOOLEAN, "");
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createFixture() throws CoreException {
+ EProblem problem = ProblemsFactory.eINSTANCE.createEProblem();
+ problem.setElement(EcorePackage.Literals.ECLASS);
+ problem.setMessage(MESSAGE);
+ problem.setSeverity(ESeverity.WARNING);
+ problem.setSource(Activator.PLUGIN_ID);
+
+ fixture = CDOPapyrusMarker.wrap(new ProblemEditUtil(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE))).apply(problem);
+
+ fixture.setAttribute(ATTR_BOOLEAN, ATTR_BOOLEAN_VALUE);
+ fixture.setAttribute(ATTR_INTEGER, ATTR_INTEGER_VALUE);
+ fixture.setAttribute(ATTR_STRING, ATTR_STRING_VALUE);
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java
new file mode 100755
index 00000000..2eb7dd03
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java
@@ -0,0 +1,185 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.internal.ui.markers.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.lang.reflect.Field;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.papyrus.cdo.ui.tests.AbstractPapyrusCDOUITest;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.services.markerlistener.IPapyrusMarker;
+import org.eclipse.papyrus.infra.services.markerlistener.MarkersMonitorService;
+import org.eclipse.papyrus.infra.services.validation.commands.ValidateDelMarkersFromModelCommand;
+import org.eclipse.papyrus.infra.services.validation.commands.ValidateModelCommand;
+import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule;
+import org.eclipse.ui.PartInitException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * This is the ModelValidationMarkersTest type. Enjoy.
+ */
+public class ModelValidationMarkersTest extends AbstractPapyrusCDOUITest {
+
+ @Rule
+ public final MemoryLeakRule memory = new MemoryLeakRule();
+
+ public ModelValidationMarkersTest() {
+ super();
+ }
+
+ @Test
+ public void testCreateMarkers() {
+ validateModel();
+
+ // get some marker
+ IPapyrusMarker marker = null;
+ try {
+ marker = Iterables.getFirst(getMarkersMonitorService().getMarkers(getUMLModel().eResource(), null, true), null);
+ assertThat("Did not find a marker.", marker, notNullValue());
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Could not get problem markers.");
+ }
+ }
+
+ @Test
+ public void testDeleteMarkers() {
+ validateModel();
+
+ // get the markers
+ List<IPapyrusMarker> markers = null;
+ try {
+ markers = Lists.newArrayList(getMarkersMonitorService().getMarkers(getUMLModel().eResource(), null, true));
+ assertThat("Did not find any markers.", markers.isEmpty(), is(false));
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Could not get problem markers.");
+ }
+
+ for(IPapyrusMarker next : markers) {
+ try {
+ next.delete();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Could not delete problem marker.");
+ }
+ }
+
+ try {
+ assertThat("Found markers.", getMarkersMonitorService().getMarkers(getUMLModel().eResource(), null, true).isEmpty(), is(true));
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Could not get problem markers.");
+ }
+ }
+
+ @Test
+ public void testMemoryLeaksInValidation() throws InterruptedException {
+ validateModel();
+
+ // get some marker
+ IPapyrusMarker marker = null;
+ try {
+ marker = Iterables.getFirst(getMarkersMonitorService().getMarkers(getUMLModel().eResource(), null, true), null);
+ assertThat("Did not find a marker.", marker, notNullValue());
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Could not get problem markers.");
+ }
+
+ memory.add(marker);
+ memory.add(getEProblem(marker));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void ensureValidationView() throws PartInitException {
+ getWorkbenchPage().showView("org.eclipse.papyrus.views.validation.ModelValidationView");
+ openEditor();
+ }
+
+ @Override
+ @After
+ public void closeEditor() {
+ super.closeEditor();
+ }
+
+ void execute(IUndoableOperation operation) {
+ try {
+ getWorkbenchPage().getWorkbenchWindow().getWorkbench().getOperationSupport().getOperationHistory().execute(operation, new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ fail("Failed to execute operation: " + operation);
+ }
+ }
+
+ void validateModel() {
+ execute(new ValidateModelCommand(getUMLModel()));
+ flushDisplayEvents();
+ }
+
+ void deleteMarkers() {
+ execute(new ValidateDelMarkersFromModelCommand(getUMLModel()));
+ }
+
+ MarkersMonitorService getMarkersMonitorService() {
+ MarkersMonitorService result = null;
+
+ try {
+ result = ServiceUtils.getInstance().getService(MarkersMonitorService.class, getEditor().getServicesRegistry());
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Failed to get MarkersMonitorService.");
+ }
+
+ return result;
+ }
+
+ EProblem getEProblem(IPapyrusMarker marker) {
+ EProblem result = null;
+
+ try {
+ Field eProblemField = marker.getClass().getDeclaredField("problem");
+ eProblemField.setAccessible(true);
+ result = (EProblem)eProblemField.get(marker);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to get EProblem wrapped by IPapyrusMarker.");
+ }
+
+ return result;
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/views/tests/ItemProviderFilterRegistryTest.java b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/views/tests/ItemProviderFilterRegistryTest.java
new file mode 100755
index 00000000..3c4a1f74
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/views/tests/ItemProviderFilterRegistryTest.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.cdo.internal.ui.views.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.internal.ui.views.CheckoutItemProvider;
+import org.junit.After;
+import org.junit.Test;
+
+import com.google.common.base.Predicate;
+
+/**
+ * Tests the {@code ItemProviderFilterRegistry} class.
+ */
+public class ItemProviderFilterRegistryTest extends AbstractPapyrusCDOTest {
+
+ public ItemProviderFilterRegistryTest() {
+ super();
+ }
+
+ @Test
+ public void testPredicateFilter() {
+ TestFilter.banned = getCheckout();
+ CheckoutItemProvider itemProvider = new CheckoutItemProvider(null);
+ itemProvider.inputChanged(null, null, CDOExplorerUtil.getCheckoutManager());
+
+ assertThat(Arrays.asList(itemProvider.getChildren(CDOExplorerUtil.getCheckoutManager())), is(Collections.EMPTY_LIST));
+ }
+
+ //
+ // Test framework
+ //
+
+ @After
+ public void tearDown() {
+ TestFilter.banned = null;
+ }
+
+ public static final class TestFilter implements Predicate<Object> {
+ static Object banned;
+
+ @Override
+ public boolean apply(Object input) {
+ return (banned != null) && (input == banned);
+ }
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java
new file mode 100755
index 00000000..61fa2de2
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java
@@ -0,0 +1,365 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus (CEA) - bug 432813
+ * Eike Stepper (CEA) - bug 466520
+ * Christian W. Damus - bug 434983
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.ui.tests;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditor;
+import org.eclipse.emf.cdo.dawn.editors.IDawnEditorSupport;
+import org.eclipse.emf.cdo.dawn.gmf.util.DawnDiagramUpdater;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.internal.ui.editors.PapyrusCDOEditorManager;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+/**
+ * This is the AbstractPapyrusCDOUITest type. Enjoy.
+ */
+public abstract class AbstractPapyrusCDOUITest extends AbstractPapyrusCDOTest {
+
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.ui.tests";
+
+ protected static final String TEST_MODEL_NAME = "model.di";
+
+ protected static final String TEST_UML_NAME = "model.uml";
+
+ protected static final String TEST_NOTATION_NAME = "model.notation";
+
+ private IWorkbenchPage page;
+
+ private List<IEditorPart> openedEditors = Lists.newArrayList();
+
+ private IMultiDiagramEditor lastEditor;
+
+ private DiagramDocumentEditor lastDiagramEditor;
+
+ @SuppressWarnings("restriction")
+ private org.eclipse.papyrus.infra.ui.internal.preferences.YesNo initialSashStoragePreference;
+
+ public AbstractPapyrusCDOUITest() {
+ super();
+ }
+
+ @Before
+ public void initWorkbench() throws Exception {
+
+ page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+
+ // ensure the Papyrus perspective
+ IPerspectiveDescriptor perspective = page.getWorkbenchWindow().getWorkbench().getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.papyrus.infra.core.perspective");
+ if (!perspective.getId().equals(page.getPerspective().getId())) {
+ page.setPerspective(perspective);
+ }
+
+ // minimize the Welcome view
+ for (IViewReference next : page.getViewReferences()) {
+ if ("org.eclipse.ui.internal.introview".equals(next.getId())) {
+ page.setPartState(next, IWorkbenchPage.STATE_MINIMIZED);
+ break;
+ }
+ }
+
+ // bring the Repository Explorer forward
+ IViewPart reposView = page.showView("org.eclipse.emf.cdo.explorer.ui.CDORepositoriesView");
+ page.activate(reposView);
+
+ page.setEditorAreaVisible(true);
+
+ flushDisplayEvents();
+ }
+
+ @Before
+ public void importTestModel() throws Exception {
+
+ CDOTransaction transaction = createTransaction();
+ Map<Resource, Resource> importMap = Maps.newHashMap();
+
+ importResource(transaction, TEST_MODEL_NAME, TEST_MODEL_NAME, importMap);
+ importResource(transaction, TEST_UML_NAME, TEST_UML_NAME, importMap);
+ importResource(transaction, TEST_NOTATION_NAME, TEST_NOTATION_NAME, importMap);
+
+ for (Map.Entry<Resource, Resource> next : importMap.entrySet()) {
+ Resource xml = next.getKey();
+ Resource cdo = next.getValue();
+ ECollections.setEList(cdo.getContents(), ImmutableList.copyOf(xml.getContents()));
+ xml.unload();
+ xml.eAdapters().clear();
+ xml.getResourceSet().getResources().remove(xml);
+ }
+
+ commit(transaction.getResourceSet());
+ close(getCheckout(), transaction);
+ }
+
+ @SuppressWarnings("restriction")
+ @Before
+ public void suppressSashLayoutMigrationDialog() {
+ initialSashStoragePreference = org.eclipse.papyrus.infra.ui.internal.preferences.EditorPreferences.getInstance().getConvertSharedPageLayoutToPrivate();
+ org.eclipse.papyrus.infra.ui.internal.preferences.EditorPreferences.getInstance().setConvertSharedPageLayoutToPrivate(org.eclipse.papyrus.infra.ui.internal.preferences.YesNo.NO);
+ }
+
+ @After
+ public void closeEditors() {
+ flushDisplayEvents();
+
+ for (IEditorPart next : openedEditors) {
+ try {
+ page.closeEditor(next, false);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ flushDisplayEvents();
+ }
+
+ openedEditors.clear();
+
+ lastEditor = null;
+ lastDiagramEditor = null;
+
+ flushDisplayEvents();
+ }
+
+ @SuppressWarnings("restriction")
+ @After
+ public void restoreSashLayoutMigrationDialog() {
+ org.eclipse.papyrus.infra.ui.internal.preferences.EditorPreferences.getInstance().setConvertSharedPageLayoutToPrivate(initialSashStoragePreference);
+ }
+
+ private void importResource(CDOTransaction transaction, String srcPath, String dstPath, Map<? super Resource, ? super Resource> importMap) {
+ ResourceSet rset = transaction.getResourceSet();
+
+ Resource xml = rset.getResource(URI.createPlatformPluginURI(PLUGIN_ID + "/resources/" + srcPath, true), true);
+
+ EcoreUtil.resolveAll(xml);
+
+ Resource cdo = transaction.getOrCreateResource(getResourcePath(dstPath));
+
+ importMap.put(xml, cdo);
+ }
+
+ protected IWorkbenchPage getWorkbenchPage() {
+ return page;
+ }
+
+ protected IViewPart getRepositoryExplorer() {
+ return page.findView("org.eclipse.emf.cdo.explorer.ui.CDORepositoriesView");
+ }
+
+ protected IEditorPart openEditor() {
+ URI uri = getTestResourceURI(TEST_MODEL_NAME);
+
+ try {
+ IEditorPart result = PapyrusCDOEditorManager.INSTANCE.openEditor(getWorkbenchPage(), uri, TEST_MODEL_NAME);
+
+ openedEditors.add(result);
+
+ assertThat(result, instanceOf(IMultiDiagramEditor.class));
+
+ lastEditor = (IMultiDiagramEditor) result;
+ if (lastEditor.getActiveEditor() instanceof DiagramDocumentEditor) {
+ lastDiagramEditor = (DiagramDocumentEditor) lastEditor.getActiveEditor();
+ }
+
+ flushDisplayEvents();
+
+ return result;
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to open editor on test model.");
+ return null; // make the compiler happy
+ }
+ }
+
+ protected void closeEditor() {
+ closeEditor(lastEditor);
+
+ lastDiagramEditor = null;
+ lastEditor = null;
+ }
+
+ protected void closeEditor(IEditorPart editor) {
+ page.closeEditor(editor, false);
+ openedEditors.remove(editor);
+
+ flushDisplayEvents();
+ }
+
+ protected void flushDisplayEvents() {
+ while (Display.getCurrent().readAndDispatch()) {
+ // pass
+ }
+ }
+
+ protected void sleep(int seconds) {
+ for (int i = 0; i < seconds; i++) {
+ try {
+ Thread.sleep(1000);
+ } catch (Exception e) {
+ // fine. So, we don't sleep so long
+ }
+
+ flushDisplayEvents();
+ }
+ }
+
+ protected IDawnEditor getDawnEditor() {
+ return lastEditor.getAdapter(IDawnEditor.class);
+ }
+
+ protected IDawnEditorSupport getDawnEditorSupport() {
+ return getDawnEditor().getDawnEditorSupport();
+ }
+
+ protected void executeEdit(final Runnable edit) {
+ TransactionalEditingDomain domain = getModelSet().getTransactionalEditingDomain();
+
+ domain.getCommandStack().execute(new RecordingCommand(domain, "Edit") {
+
+ @Override
+ protected void doExecute() {
+ edit.run();
+ }
+ });
+ }
+
+ protected ModelSet getModelSet() {
+ ModelSet result = null;
+
+ try {
+ result = lastEditor.getServicesRegistry().getService(ModelSet.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to get ModelSet from current editor.");
+ }
+
+ return result;
+ }
+
+ protected Package getUMLModel() {
+ Resource resource = getModelSet().getResource(getTestResourceURI(TEST_UML_NAME), true);
+ assertThat("UML model not found.", resource, notNullValue());
+ return (Package) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.PACKAGE);
+ }
+
+ protected <N extends NamedElement> N findElement(String relativeName, Class<N> type) {
+
+ N result = null;
+ Namespace namespace = getUMLModel();
+
+ for (Iterator<String> iter = Splitter.on(NamedElement.SEPARATOR).split(relativeName).iterator(); iter.hasNext();) {
+
+ NamedElement next = namespace.getMember(iter.next());
+ if (next instanceof Namespace) {
+ namespace = (Namespace) next;
+ }
+
+ if (!iter.hasNext()) {
+ if (type.isInstance(next)) {
+ result = type.cast(next);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ protected <N extends NamedElement> N expectElement(String relativeName, Class<N> type) {
+
+ N result = findElement(relativeName, type);
+ assertThat("UML element not found.", result, notNullValue());
+ return result;
+ }
+
+ protected IMultiDiagramEditor getEditor() {
+ return lastEditor;
+ }
+
+ protected DiagramDocumentEditor getDiagramEditor() {
+ return lastDiagramEditor;
+ }
+
+ protected DiagramEditPart getDiagramEditPart() {
+ return getDiagramEditor().getDiagramEditPart();
+ }
+
+ protected Diagram getDiagram() {
+ return getDiagramEditPart().getDiagramView();
+ }
+
+ protected View findView(EObject element) {
+ return DawnDiagramUpdater.findViewForModel(element, getDiagramEditor());
+ }
+
+ protected View expectView(EObject element) {
+ View result = findView(element);
+ assertThat("Required view not found.", result, notNullValue());
+ return result;
+ }
+
+ protected EditPart findEditPart(EObject element) {
+ View view = findView(element);
+ return (view == null) ? null : DawnDiagramUpdater.findEditPart(view, getDiagramEditor());
+ }
+
+ protected EditPart expectEditPart(EObject element) {
+ EditPart result = findEditPart(element);
+ assertThat("Required edit-part not found.", result, notNullValue());
+ return result;
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AllTests.java b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AllTests.java
new file mode 100755
index 00000000..7405f09b
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AllTests.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 443830
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.ui.tests;
+
+import org.eclipse.papyrus.cdo.internal.ui.editors.tests.BasicEditorTest;
+import org.eclipse.papyrus.cdo.internal.ui.editors.tests.DawnEditorAdapterTest;
+import org.eclipse.papyrus.cdo.internal.ui.markers.tests.CDOPapyrusMarkerTest;
+import org.eclipse.papyrus.cdo.internal.ui.markers.tests.ModelValidationMarkersTest;
+import org.eclipse.papyrus.cdo.internal.ui.views.tests.ItemProviderFilterRegistryTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * This is the AllTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ BasicEditorTest.class, DawnEditorAdapterTest.class, //
+ ModelValidationMarkersTest.class, CDOPapyrusMarkerTest.class, //
+ ItemProviderFilterRegistryTest.class })
+public class AllTests {
+
+ public AllTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.classpath b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.project b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.project
new file mode 100755
index 00000000..e788df37
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.uml.search.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/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..e82ec2bb
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,294 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.settings/org.eclipse.jdt.ui.prefs b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..6d0eaeca
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.cdo.core.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.uml.search.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.search.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.views.search;bundle-version="1.2.0",
+ org.eclipse.ui;bundle-version="3.105.0",
+ org.eclipse.papyrus.cdo.ui;bundle-version="1.2.0",
+ org.eclipse.search;bundle-version="3.9.0",
+ org.eclipse.emf.cdo.server.ocl;bundle-version="4.2.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.cdo.uml.search.ui.tests
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.uml.search.ui.tests
+Import-Package: com.google.common.base;version="10.0.1",
+ com.google.common.collect;version="10.0.1"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/Papyrus CDO Search UI Tests.launch b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/Papyrus CDO Search UI Tests.launch
new file mode 100755
index 00000000..6873d8e4
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/Papyrus CDO Search UI Tests.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.cdo.uml.search.ui.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.cdo.uml.search.ui.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=256m -Xms80m -Xmx2048m&#10;-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts&#10;-Dorg.eclipse.ocl.debug=true"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/about.html b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/build.properties b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/build.properties
new file mode 100755
index 00000000..b47b3248
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ resources/
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/plugin.properties b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/plugin.properties
new file mode 100755
index 00000000..1d0800a6
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+pluginName = Papyrus CDO UML Search UI Tests (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Automated tests for the CDO Integration search implementation. \ No newline at end of file
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/pom.xml b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/pom.xml
new file mode 100755
index 00000000..89c66dc4
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.uml.search.ui.tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.di b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.di
new file mode 100755
index 00000000..e094f1ea
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="admin.notation#_a6YuMBexEeOaDesjAlqXXw"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="admin.notation#_a6YuMBexEeOaDesjAlqXXw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.notation b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.notation
new file mode 100755
index 00000000..d0101d06
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.notation
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_a6YuMBexEeOaDesjAlqXXw" type="PapyrusUMLClassDiagram" name="Classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_a6YuMRexEeOaDesjAlqXXw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a6YuMhexEeOaDesjAlqXXw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a6YuMxexEeOaDesjAlqXXw" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a6YuNBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a6YuNRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a6YuNhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a6YuNxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a6YuOBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a6YuORexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a6YuOhexEeOaDesjAlqXXw" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a6YuOxexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a6YuPBexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a6YuPRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a6YuPhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a6YuPxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a6YuQBexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a6YuQRexEeOaDesjAlqXXw" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a6YuQhexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a6YuQxexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a6YuRBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a6YuRRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a6YuRhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a6YuRxexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Class" href="admin.uml#_a62oQxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a6YuSBexEeOaDesjAlqXXw" x="80" y="89"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_a6YuSRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Model" href="admin.uml#_a62oQBexEeOaDesjAlqXXw"/>
+</notation:Diagram>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.uml b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.uml
new file mode 100755
index 00000000..0ca12fe3
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/admin.uml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_a62oQBexEeOaDesjAlqXXw" name="AdminConsole">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_a62oQRexEeOaDesjAlqXXw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_a62oQhexEeOaDesjAlqXXw">
+ <importedPackage xmi:type="uml:Model" href="tracker.uml#_a28_sBexEeOaDesjAlqXXw"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_a62oQxexEeOaDesjAlqXXw" name="AdminConsole"/>
+</uml:Model>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.di b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.di
new file mode 100755
index 00000000..dba6a6b6
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.di
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="garage.notation#_a4w9kBexEeOaDesjAlqXXw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="garage.notation#_a45gcBexEeOaDesjAlqXXw"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="garage.notation#_a4w9kBexEeOaDesjAlqXXw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="garage.notation#_a45gcBexEeOaDesjAlqXXw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.notation b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.notation
new file mode 100755
index 00000000..f4382bd9
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.notation
@@ -0,0 +1,479 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_a4w9kBexEeOaDesjAlqXXw" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_a4w9kRexEeOaDesjAlqXXw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w9khexEeOaDesjAlqXXw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9kxexEeOaDesjAlqXXw" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9lBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9lRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9lhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w9lxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w9mBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9mRexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9mhexEeOaDesjAlqXXw" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9mxexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9nBexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9nRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w9nhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w9nxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9oBexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9oRexEeOaDesjAlqXXw" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9ohexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9oxexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9pBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w9pRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w9phexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9pxexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9qBexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9qRexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9qhexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9qxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9rBexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Class" href="garage.uml#_a5Qs0RexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9rRexEeOaDesjAlqXXw" x="63" y="50"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a4w9rhexEeOaDesjAlqXXw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w9rxexEeOaDesjAlqXXw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9sBexEeOaDesjAlqXXw" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9sRexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9shexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9sxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w9tBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w9tRexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9thexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9txexEeOaDesjAlqXXw" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9uBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9uRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9uhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w9uxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w9vBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9vRexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9vhexEeOaDesjAlqXXw" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9vxexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9wBexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9wRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w9whexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w9wxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9xBexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9xRexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9xhexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9xxexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9yBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9yRexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Class" href="garage.uml#_a5Qs6RexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9yhexEeOaDesjAlqXXw" x="451" y="103"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a4w9yxexEeOaDesjAlqXXw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w9zBexEeOaDesjAlqXXw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9zRexEeOaDesjAlqXXw" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9zhexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9zxexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w90BexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w90RexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w90hexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w90xexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w91BexEeOaDesjAlqXXw" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w91RexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w91hexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w91xexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w92BexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w92RexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w92hexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w92xexEeOaDesjAlqXXw" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w93BexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w93RexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w93hexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w93xexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w94BexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w94RexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w94hexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w94xexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w95BexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w95RexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w95hexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Class" href="garage.uml#_a5Qs6hexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w95xexEeOaDesjAlqXXw" x="36" y="252"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a4w96BexEeOaDesjAlqXXw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w96RexEeOaDesjAlqXXw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w96hexEeOaDesjAlqXXw" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w96xexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w97BexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w97RexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w97hexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w97xexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w98BexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w98RexEeOaDesjAlqXXw" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w98hexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w98xexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w99BexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w99RexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w99hexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w99xexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9-BexEeOaDesjAlqXXw" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w9-RexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w9-hexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w9-xexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a4w9_BexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a4w9_RexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w9_hexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a4w9_xexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a4w-ABexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a4w-ARexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a4w-AhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w-AxexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Class" href="garage.uml#_a5Qs8xexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a4w-BBexEeOaDesjAlqXXw" x="279" y="252"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_a4w-BRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Model" href="garage.uml#_a5Qs0BexEeOaDesjAlqXXw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_a4w-BhexEeOaDesjAlqXXw" type="4001" source="_a4w9kRexEeOaDesjAlqXXw" target="_a4w9yxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-BxexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-CBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-CRexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-ChexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-CxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-DBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-DRexEeOaDesjAlqXXw" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-DhexEeOaDesjAlqXXw" x="-12" y="42"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-DxexEeOaDesjAlqXXw" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-EBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-ERexEeOaDesjAlqXXw" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-EhexEeOaDesjAlqXXw" x="-4" y="-37"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a4w-ExexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Association" href="garage.uml#_a5Qs6xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a4w-FBexEeOaDesjAlqXXw" points="[29, 50, -71, -119]$[110, 157, 10, -12]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a4w-FRexEeOaDesjAlqXXw" id="(0.53,0.07)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a4w-FhexEeOaDesjAlqXXw" type="4001" source="_a4w9kRexEeOaDesjAlqXXw" target="_a4w9rhexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-FxexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-GBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-GRexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-GhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-GxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-HBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-HRexEeOaDesjAlqXXw" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-HhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-HxexEeOaDesjAlqXXw" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-IBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-IRexEeOaDesjAlqXXw" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-IhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a4w-IxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Association" href="garage.uml#_a5Qs7xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a4w-JBexEeOaDesjAlqXXw" points="[11, 2, -248, -45]$[209, 56, -50, 9]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a4w-JRexEeOaDesjAlqXXw" id="(0.89,0.43)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a4w-JhexEeOaDesjAlqXXw" type="4001" source="_a4w96BexEeOaDesjAlqXXw" target="_a4w9rhexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-JxexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-KBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-KRexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-KhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-KxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-LBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-LRexEeOaDesjAlqXXw" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-LhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-LxexEeOaDesjAlqXXw" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-MBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-MRexEeOaDesjAlqXXw" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-MhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a4w-MxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Association" href="garage.uml#_a5Qs9xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a4w-NBexEeOaDesjAlqXXw" points="[6, -18, -54, 150]$[51, -118, -9, 50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a4w-NRexEeOaDesjAlqXXw" id="(0.74,0.18)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a4w-NhexEeOaDesjAlqXXw" type="4001" source="_a4w9kRexEeOaDesjAlqXXw" target="_a4w96BexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-NxexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-OBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-ORexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-OhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4w-OxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4w-PBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4xkoBexEeOaDesjAlqXXw" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4xkoRexEeOaDesjAlqXXw" x="-16" y="24"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4xkohexEeOaDesjAlqXXw" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4xkoxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a4xkpBexEeOaDesjAlqXXw" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a4xkpRexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a4xkphexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Association" href="garage.uml#_a5Qs-xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a4xkpxexEeOaDesjAlqXXw" points="[13, 25, -112, -202]$[91, 177, -34, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a4xkqBexEeOaDesjAlqXXw" id="(0.78,0.75)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_a45gcBexEeOaDesjAlqXXw" type="PapyrusUMLStateMachineDiagram" name="operation_cycle" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_a45gcRexEeOaDesjAlqXXw" type="2000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gchexEeOaDesjAlqXXw" type="2001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gcxexEeOaDesjAlqXXw" width="700" height="16"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gdBexEeOaDesjAlqXXw" type="2002">
+ <children xmi:type="notation:Shape" xmi:id="_a45gdRexEeOaDesjAlqXXw" type="3000">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a45gdhexEeOaDesjAlqXXw" source="RegionAnnotationKey">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a45gdxexEeOaDesjAlqXXw" key="RegionZoneKey" value=""/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45geBexEeOaDesjAlqXXw" type="3002">
+ <children xmi:type="notation:Shape" xmi:id="_a45geRexEeOaDesjAlqXXw" type="8000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gehexEeOaDesjAlqXXw" visible="false" type="8001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45gexexEeOaDesjAlqXXw" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gfBexEeOaDesjAlqXXw" type="8002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45gfRexEeOaDesjAlqXXw" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Pseudostate" href="garage.uml#_a5Qs5BexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gfhexEeOaDesjAlqXXw" x="42" y="89"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a45gfxexEeOaDesjAlqXXw" type="6000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45ggBexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45ggRexEeOaDesjAlqXXw" width="68"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gghexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45ggxexEeOaDesjAlqXXw" y="-1" width="68"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a45ghBexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a45ghRexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a45ghhexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a45ghxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45giBexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:State" href="garage.uml#_a5Qs5RexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45giRexEeOaDesjAlqXXw" x="519" y="116" width="68"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a45gihexEeOaDesjAlqXXw" type="6000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gixexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gjBexEeOaDesjAlqXXw" width="69"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gjRexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gjhexEeOaDesjAlqXXw" y="-1" width="69"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a45gjxexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a45gkBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a45gkRexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a45gkhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gkxexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:State" href="garage.uml#_a5Qs5hexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45glBexEeOaDesjAlqXXw" x="312" y="188" width="69"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a45glRexEeOaDesjAlqXXw" type="6000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45glhexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45glxexEeOaDesjAlqXXw" width="84"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gmBexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gmRexEeOaDesjAlqXXw" y="-1" width="84"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a45gmhexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a45gmxexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a45gnBexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a45gnRexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gnhexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:State" href="garage.uml#_a5Qs5xexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gnxexEeOaDesjAlqXXw" x="303" y="35" width="84"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a45goBexEeOaDesjAlqXXw" type="6000">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45goRexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gohexEeOaDesjAlqXXw" width="76"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45goxexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gpBexEeOaDesjAlqXXw" y="-1" width="76"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a45gpRexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a45gphexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a45gpxexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a45gqBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gqRexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:State" href="garage.uml#_a5Qs6BexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gqhexEeOaDesjAlqXXw" x="123" y="107" width="76"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gqxexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a45grBexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a45grRexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a45grhexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a45grxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gsBexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Region" href="garage.uml#_a5Qs3BexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gsRexEeOaDesjAlqXXw" width="700" height="287"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gshexEeOaDesjAlqXXw" y="16" width="700" height="287"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a45gsxexEeOaDesjAlqXXw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a45gtBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a45gtRexEeOaDesjAlqXXw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a45gthexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45gtxexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:StateMachine" href="garage.uml#_a5Qs2xexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a45guBexEeOaDesjAlqXXw" x="30" y="30" width="700" height="303"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_a45guRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:StateMachine" href="garage.uml#_a5Qs2xexEeOaDesjAlqXXw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_a45guhexEeOaDesjAlqXXw" type="7000" source="_a45geRexEeOaDesjAlqXXw" target="_a45goBexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45guxexEeOaDesjAlqXXw" visible="false" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45gvBexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gvRexEeOaDesjAlqXXw" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45gvhexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gvxexEeOaDesjAlqXXw" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45gwBexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a45gwRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Transition" href="garage.uml#_a5Qs3RexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a45gwhexEeOaDesjAlqXXw" points="[10, 2, -99, -26]$[106, 8, -3, -20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a45gwxexEeOaDesjAlqXXw" type="7000" source="_a45goBexEeOaDesjAlqXXw" target="_a45glRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gxBexEeOaDesjAlqXXw" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45gxRexEeOaDesjAlqXXw" x="-12" y="-22"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gxhexEeOaDesjAlqXXw" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45gxxexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gyBexEeOaDesjAlqXXw" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45gyRexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a45gyhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Transition" href="garage.uml#_a5Qs3hexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a45gyxexEeOaDesjAlqXXw" points="[15, -9, -117, 66]$[119, -80, -13, -5]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a45gzBexEeOaDesjAlqXXw" id="(0.8026315789473685,0.325)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a45gzRexEeOaDesjAlqXXw" id="(0.15476190476190477,0.25)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a45gzhexEeOaDesjAlqXXw" type="7000" source="_a45glRexEeOaDesjAlqXXw" target="_a45gihexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45gzxexEeOaDesjAlqXXw" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g0BexEeOaDesjAlqXXw" x="2" y="39"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g0RexEeOaDesjAlqXXw" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g0hexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g0xexEeOaDesjAlqXXw" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g1BexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a45g1RexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Transition" href="garage.uml#_a5Qs3xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a45g1hexEeOaDesjAlqXXw" points="[-9, 20, -10, -133]$[-42, 97, -43, -56]$[-15, 133, -16, -20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a45g1xexEeOaDesjAlqXXw" type="7000" source="_a45gihexEeOaDesjAlqXXw" target="_a45glRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g2BexEeOaDesjAlqXXw" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g2RexEeOaDesjAlqXXw" x="5" y="39"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g2hexEeOaDesjAlqXXw" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g2xexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g3BexEeOaDesjAlqXXw" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g3RexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a45g3hexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Transition" href="garage.uml#_a5Qs4BexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a45g3xexEeOaDesjAlqXXw" points="[8, -20, 9, 133]$[38, -92, 39, 61]$[11, -133, 12, 20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a45g4BexEeOaDesjAlqXXw" type="7000" source="_a45gfxexEeOaDesjAlqXXw" target="_a45gihexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g4RexEeOaDesjAlqXXw" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g4hexEeOaDesjAlqXXw" x="-5" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g4xexEeOaDesjAlqXXw" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g5BexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g5RexEeOaDesjAlqXXw" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g5hexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a45g5xexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Transition" href="garage.uml#_a5Qs4RexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a45g6BexEeOaDesjAlqXXw" points="[-14, 5, 173, -68]$[-179, 93, 8, 20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a45g6RexEeOaDesjAlqXXw" id="(0.20588235294117646,0.475)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a45g6hexEeOaDesjAlqXXw" type="7000" source="_a45glRexEeOaDesjAlqXXw" target="_a45gfxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g6xexEeOaDesjAlqXXw" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g7BexEeOaDesjAlqXXw" x="24" y="-17"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g7RexEeOaDesjAlqXXw" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g7hexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a45g7xexEeOaDesjAlqXXw" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a45g8BexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a45g8RexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Transition" href="garage.uml#_a5Qs4hexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a45g8hexEeOaDesjAlqXXw" points="[18, 8, -145, -70]$[150, 74, -13, -4]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a45g8xexEeOaDesjAlqXXw" id="(0.7857142857142857,0.425)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a46HgBexEeOaDesjAlqXXw" id="(0.19117647058823528,0.35)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a46HgRexEeOaDesjAlqXXw" type="7000" source="_a45gihexEeOaDesjAlqXXw" target="_a45goBexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a46HghexEeOaDesjAlqXXw" type="7001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a46HgxexEeOaDesjAlqXXw" x="17" y="-23"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a46HhBexEeOaDesjAlqXXw" type="7002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a46HhRexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a46HhhexEeOaDesjAlqXXw" type="7003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a46HhxexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a46HiBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Transition" href="garage.uml#_a5Qs4xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a46HiRexEeOaDesjAlqXXw" points="[-11, -6, 151, 69]$[-124, -75, 38, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a46HihexEeOaDesjAlqXXw" id="(0.15942028985507245,0.35)"/>
+ </edges>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.uml b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.uml
new file mode 100755
index 00000000..64b21b1a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/garage.uml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_a5Qs0BexEeOaDesjAlqXXw" name="model">
+ <packagedElement xmi:type="uml:Class" xmi:id="_a5Qs0RexEeOaDesjAlqXXw" name="Garage" classifierBehavior="_a5Qs2xexEeOaDesjAlqXXw">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a5Qs0hexEeOaDesjAlqXXw" name="personalDoor" type="_a5Qs6hexEeOaDesjAlqXXw" aggregation="composite" association="_a5Qs6xexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a5Qs0xexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a5Qs1BexEeOaDesjAlqXXw" value="2"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a5Qs1RexEeOaDesjAlqXXw" name="garageDoor" type="_a5Qs6RexEeOaDesjAlqXXw" aggregation="composite" association="_a5Qs7xexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a5Qs1hexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a5Qs1xexEeOaDesjAlqXXw" value="3"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a5Qs2BexEeOaDesjAlqXXw" name="opener" type="_a5Qs8xexEeOaDesjAlqXXw" aggregation="composite" association="_a5Qs-xexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a5Qs2RexEeOaDesjAlqXXw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a5Qs2hexEeOaDesjAlqXXw" value="*"/>
+ </ownedAttribute>
+ <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_a5Qs2xexEeOaDesjAlqXXw" name="OperationCycle">
+ <region xmi:type="uml:Region" xmi:id="_a5Qs3BexEeOaDesjAlqXXw" name="Region1">
+ <transition xmi:type="uml:Transition" xmi:id="_a5Qs3RexEeOaDesjAlqXXw" name="Transition0" source="_a5Qs5BexEeOaDesjAlqXXw" target="_a5Qs6BexEeOaDesjAlqXXw"/>
+ <transition xmi:type="uml:Transition" xmi:id="_a5Qs3hexEeOaDesjAlqXXw" name="opener_clicked" source="_a5Qs6BexEeOaDesjAlqXXw" target="_a5Qs5xexEeOaDesjAlqXXw"/>
+ <transition xmi:type="uml:Transition" xmi:id="_a5Qs3xexEeOaDesjAlqXXw" name="opener_clicked" source="_a5Qs5xexEeOaDesjAlqXXw" target="_a5Qs5hexEeOaDesjAlqXXw"/>
+ <transition xmi:type="uml:Transition" xmi:id="_a5Qs4BexEeOaDesjAlqXXw" name="opener_clicked" source="_a5Qs5hexEeOaDesjAlqXXw" target="_a5Qs5xexEeOaDesjAlqXXw"/>
+ <transition xmi:type="uml:Transition" xmi:id="_a5Qs4RexEeOaDesjAlqXXw" name="opener_clicked" source="_a5Qs5RexEeOaDesjAlqXXw" target="_a5Qs5hexEeOaDesjAlqXXw"/>
+ <transition xmi:type="uml:Transition" xmi:id="_a5Qs4hexEeOaDesjAlqXXw" name="top_reached" source="_a5Qs5xexEeOaDesjAlqXXw" target="_a5Qs5RexEeOaDesjAlqXXw"/>
+ <transition xmi:type="uml:Transition" xmi:id="_a5Qs4xexEeOaDesjAlqXXw" name="bottom_reached" source="_a5Qs5hexEeOaDesjAlqXXw" target="_a5Qs6BexEeOaDesjAlqXXw"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_a5Qs5BexEeOaDesjAlqXXw" name="Initial0"/>
+ <subvertex xmi:type="uml:State" xmi:id="_a5Qs5RexEeOaDesjAlqXXw" name="Door Open"/>
+ <subvertex xmi:type="uml:State" xmi:id="_a5Qs5hexEeOaDesjAlqXXw" name="Door Closing"/>
+ <subvertex xmi:type="uml:State" xmi:id="_a5Qs5xexEeOaDesjAlqXXw" name="Door Opening"/>
+ <subvertex xmi:type="uml:State" xmi:id="_a5Qs6BexEeOaDesjAlqXXw" name="Door Closed"/>
+ </region>
+ </ownedBehavior>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_a5Qs6RexEeOaDesjAlqXXw" name="GarageDoor"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_a5Qs6hexEeOaDesjAlqXXw" name="PersonalDoor"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_a5Qs6xexEeOaDesjAlqXXw" name="garage_personalDoor_1" memberEnd="_a5Qs7BexEeOaDesjAlqXXw _a5Qs0hexEeOaDesjAlqXXw">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_a5Qs7BexEeOaDesjAlqXXw" name="garage" type="_a5Qs0RexEeOaDesjAlqXXw" association="_a5Qs6xexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a5Qs7RexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a5Qs7hexEeOaDesjAlqXXw" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_a5Qs7xexEeOaDesjAlqXXw" name="garage_garageDoor_1" memberEnd="_a5Qs8BexEeOaDesjAlqXXw _a5Qs1RexEeOaDesjAlqXXw">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_a5Qs8BexEeOaDesjAlqXXw" name="garage" type="_a5Qs0RexEeOaDesjAlqXXw" association="_a5Qs7xexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a5Qs8RexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a5Qs8hexEeOaDesjAlqXXw" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_a5Qs8xexEeOaDesjAlqXXw" name="Opener">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a5Qs9BexEeOaDesjAlqXXw" name="opens" type="_a5Qs6RexEeOaDesjAlqXXw" association="_a5Qs9xexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a5Qs9RexEeOaDesjAlqXXw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a5Qs9hexEeOaDesjAlqXXw" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_a5Qs9xexEeOaDesjAlqXXw" name="opener_garageDoor_1" memberEnd="_a5Qs-BexEeOaDesjAlqXXw _a5Qs9BexEeOaDesjAlqXXw">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_a5Qs-BexEeOaDesjAlqXXw" name="opener" type="_a5Qs8xexEeOaDesjAlqXXw" association="_a5Qs9xexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a5Qs-RexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a5Qs-hexEeOaDesjAlqXXw" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_a5Qs-xexEeOaDesjAlqXXw" name="garage_opener_1" memberEnd="_a5Qs_BexEeOaDesjAlqXXw _a5Qs2BexEeOaDesjAlqXXw">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_a5Qs_BexEeOaDesjAlqXXw" name="garage" type="_a5Qs0RexEeOaDesjAlqXXw" association="_a5Qs-xexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a5Qs_RexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a5Qs_hexEeOaDesjAlqXXw" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+</uml:Model>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.di b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.di
new file mode 100755
index 00000000..ad757ed3
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ASCII"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="j2ee.profile.notation#_a8MFABexEeOaDesjAlqXXw"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="j2ee.profile.notation#_a8MFABexEeOaDesjAlqXXw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.notation b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.notation
new file mode 100755
index 00000000..345c59f7
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.notation
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_a8MFABexEeOaDesjAlqXXw" type="PapyrusUMLProfileDiagram" name="profile" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_a8MFARexEeOaDesjAlqXXw" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MFAhexEeOaDesjAlqXXw" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a8MFAxexEeOaDesjAlqXXw" type="1071">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a8MFBBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a8MFBRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_a8MFBhexEeOaDesjAlqXXw" type="3002">
+ <element xmi:type="uml:Property" href="j2ee.profile.uml#_a8wFzhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MFBxexEeOaDesjAlqXXw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a8MFCBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a8MFCRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a8MFChexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a8MFCxexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a8MFDBexEeOaDesjAlqXXw" visible="false" type="1019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a8MFDRexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a8MFDhexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a8MFDxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a8MFEBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a8MFERexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a8MFEhexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="j2ee.profile.uml#_a8wFzBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a8MFExexEeOaDesjAlqXXw" x="54" y="135"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a8MFHRexEeOaDesjAlqXXw" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MFHhexEeOaDesjAlqXXw" type="5023"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a8MFHxexEeOaDesjAlqXXw" type="1063">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a8MFIBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a8MFIRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_a8MFIhexEeOaDesjAlqXXw" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="j2ee.profile.uml#_a8wF1RexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MFIxexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a8MFJBexEeOaDesjAlqXXw" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="j2ee.profile.uml#_a8wF1hexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MFJRexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a8MFJhexEeOaDesjAlqXXw" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="j2ee.profile.uml#_a8wF1xexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MFJxexEeOaDesjAlqXXw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a8MFKBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a8MFKRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a8MFKhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a8MFKxexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="j2ee.profile.uml#_a8wF1BexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a8MFLBexEeOaDesjAlqXXw" x="63" y="261"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a8MFLRexEeOaDesjAlqXXw" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MFLhexEeOaDesjAlqXXw" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a8MFLxexEeOaDesjAlqXXw" type="1071">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a8MFMBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a8MFMRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a8MFMhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a8MsEBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a8MsERexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a8MsEhexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a8MsExexEeOaDesjAlqXXw" visible="false" type="1019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a8MsFBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a8MsFRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a8MsFhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a8MsFxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a8MsGBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a8MsGRexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="j2ee.profile.uml#_a8wF2BexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a8MsGhexEeOaDesjAlqXXw" x="360" y="126"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_7OlfYKY9EeOyAOqIySP6zQ" type="1031">
+ <children xmi:type="notation:DecorationNode" xmi:id="_7OlfYqY9EeOyAOqIySP6zQ" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7OlfYaY9EeOyAOqIySP6zQ" x="70" y="34"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_8bglgKY9EeOyAOqIySP6zQ" type="1031">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8bhMkKY9EeOyAOqIySP6zQ" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8bglgaY9EeOyAOqIySP6zQ" x="364" y="32"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_a8MsJBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Profile" href="j2ee.profile.uml#_a8wFsBexEeOaDesjAlqXXw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_a8MsLhexEeOaDesjAlqXXw" type="4001" source="_a8MFARexEeOaDesjAlqXXw" target="_a8MFLRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MsLxexEeOaDesjAlqXXw" visible="false" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MsMBexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MsMRexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MsMhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MsMxexEeOaDesjAlqXXw" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MsNBexEeOaDesjAlqXXw" x="-45" y="17"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MsNRexEeOaDesjAlqXXw" visible="false" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MsNhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MsNxexEeOaDesjAlqXXw" visible="false" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MsOBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a8MsORexEeOaDesjAlqXXw" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a8MsOhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a8MsOxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Association" href="j2ee.profile.uml#_a8wF3BexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a8MsPBexEeOaDesjAlqXXw" points="[23, -7, -370, 0]$[369, 10, -24, 17]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a8MsPRexEeOaDesjAlqXXw" id="(0.8114754098360656,0.67)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a8MsPhexEeOaDesjAlqXXw" id="(0.24,0.69)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_7OupUKY9EeOyAOqIySP6zQ" type="1013" source="_a8MFARexEeOaDesjAlqXXw" target="_7OlfYKY9EeOyAOqIySP6zQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_7OupUaY9EeOyAOqIySP6zQ"/>
+ <element xmi:type="uml:Extension" href="j2ee.profile.uml#_a8wF0hexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_7OupUqY9EeOyAOqIySP6zQ" points="[-32, -50, 83, 135]$[-115, -185, 0, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_8bohUKY9EeOyAOqIySP6zQ" type="1013" source="_a8MFLRexEeOaDesjAlqXXw" target="_8bglgKY9EeOyAOqIySP6zQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_8bohUaY9EeOyAOqIySP6zQ"/>
+ <element xmi:type="uml:Extension" href="j2ee.profile.uml#_a8wF2hexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8bohUqY9EeOyAOqIySP6zQ" points="[-50, -22, 360, 154]$[-410, -176, 0, 0]"/>
+ </edges>
+</notation:Diagram>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.uml b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.uml
new file mode 100755
index 00000000..d74a8372
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/j2ee.profile.uml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_a8wFsBexEeOaDesjAlqXXw" name="j2ee" metaclassReference="_a8wFyhexEeOaDesjAlqXXw _a8wFyxexEeOaDesjAlqXXw">
+ <eAnnotations xmi:id="_a8wFsRexEeOaDesjAlqXXw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_a8wFshexEeOaDesjAlqXXw" name="j2ee" nsURI="http:///schemas/j2ee/_6PHYYFkiEeK52Llgof0Xvg/0" nsPrefix="j2ee">
+ <eAnnotations xmi:id="_a8wFsxexEeOaDesjAlqXXw" source="PapyrusVersion">
+ <details xmi:id="_a8wFtBexEeOaDesjAlqXXw" key="Version" value="0.0.1"/>
+ <details xmi:id="_a8wFtRexEeOaDesjAlqXXw" key="Comment" value=""/>
+ <details xmi:id="_a8wFthexEeOaDesjAlqXXw" key="Copyright" value=""/>
+ <details xmi:id="_a8wFtxexEeOaDesjAlqXXw" key="Date" value="2013-01-07"/>
+ <details xmi:id="_a8wFuBexEeOaDesjAlqXXw" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_a8wFuRexEeOaDesjAlqXXw" name="Bean">
+ <eAnnotations xmi:id="_a8wFuhexEeOaDesjAlqXXw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_a8wFzBexEeOaDesjAlqXXw"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_a8wFuxexEeOaDesjAlqXXw" name="base_Classifier" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_a8wFvRexEeOaDesjAlqXXw" name="kind" ordered="false" lowerBound="1" eType="_a8wFwRexEeOaDesjAlqXXw"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_a8wFvxexEeOaDesjAlqXXw" name="primaryFinder" ordered="false" eType="_a8wFxhexEeOaDesjAlqXXw"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_a8wFwRexEeOaDesjAlqXXw" name="BeanKind">
+ <eAnnotations xmi:id="_a8wFwhexEeOaDesjAlqXXw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_a8wF1BexEeOaDesjAlqXXw"/>
+ <eLiterals xmi:id="_a8wFwxexEeOaDesjAlqXXw" name="entity"/>
+ <eLiterals xmi:id="_a8wFxBexEeOaDesjAlqXXw" name="session" value="1"/>
+ <eLiterals xmi:id="_a8wFxRexEeOaDesjAlqXXw" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_a8wFxhexEeOaDesjAlqXXw" name="Finder">
+ <eAnnotations xmi:id="_a8wFxxexEeOaDesjAlqXXw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_a8wF2BexEeOaDesjAlqXXw"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_a8wFyBexEeOaDesjAlqXXw" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:id="_a8wFyhexEeOaDesjAlqXXw" alias="Classifier">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/>
+ </elementImport>
+ <elementImport xmi:id="_a8wFyxexEeOaDesjAlqXXw" alias="Operation">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </elementImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_a8wFzBexEeOaDesjAlqXXw" name="Bean">
+ <ownedAttribute xmi:id="_a8wFzRexEeOaDesjAlqXXw" name="base_Classifier" association="_a8wF0hexEeOaDesjAlqXXw">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_a8wFzhexEeOaDesjAlqXXw" name="kind" type="_a8wF1BexEeOaDesjAlqXXw"/>
+ <ownedAttribute xmi:id="_a8wFzxexEeOaDesjAlqXXw" name="primaryFinder" type="_a8wF2BexEeOaDesjAlqXXw" association="_a8wF3BexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a8wF0BexEeOaDesjAlqXXw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a8wF0RexEeOaDesjAlqXXw" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_a8wF0hexEeOaDesjAlqXXw" name="E_Bean_Classifier1" memberEnd="_a8wF0xexEeOaDesjAlqXXw _a8wFzRexEeOaDesjAlqXXw">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_a8wF0xexEeOaDesjAlqXXw" name="extension_Bean" type="_a8wFzBexEeOaDesjAlqXXw" aggregation="composite" association="_a8wF0hexEeOaDesjAlqXXw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_a8wF1BexEeOaDesjAlqXXw" name="BeanKind">
+ <ownedLiteral xmi:id="_a8wF1RexEeOaDesjAlqXXw" name="entity"/>
+ <ownedLiteral xmi:id="_a8wF1hexEeOaDesjAlqXXw" name="session"/>
+ <ownedLiteral xmi:id="_a8wF1xexEeOaDesjAlqXXw" name="messagedriven"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_a8wF2BexEeOaDesjAlqXXw" name="Finder">
+ <ownedAttribute xmi:id="_a8wF2RexEeOaDesjAlqXXw" name="base_Operation" association="_a8wF2hexEeOaDesjAlqXXw">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_a8wF2hexEeOaDesjAlqXXw" name="E_Finder_Operation1" memberEnd="_a8wF2xexEeOaDesjAlqXXw _a8wF2RexEeOaDesjAlqXXw">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_a8wF2xexEeOaDesjAlqXXw" name="extension_Finder" type="_a8wF2BexEeOaDesjAlqXXw" aggregation="composite" association="_a8wF2hexEeOaDesjAlqXXw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_a8wF3BexEeOaDesjAlqXXw" name="bean_finder_1" memberEnd="_a8wF3RexEeOaDesjAlqXXw _a8wFzxexEeOaDesjAlqXXw">
+ <ownedEnd xmi:id="_a8wF3RexEeOaDesjAlqXXw" name="bean" type="_a8wFzBexEeOaDesjAlqXXw" association="_a8wF3BexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a8wF3hexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a8wF3xexEeOaDesjAlqXXw" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+</uml:Profile>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.di b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.di
new file mode 100755
index 00000000..517cfbb8
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.di
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="tracker.notation#_a2RqQBexEeOaDesjAlqXXw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="tracker.notation#_a2jXEBexEeOaDesjAlqXXw"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="tracker.notation#_a2RqQBexEeOaDesjAlqXXw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="tracker.notation#_a2jXEBexEeOaDesjAlqXXw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.notation b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.notation
new file mode 100755
index 00000000..f88243fc
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.notation
@@ -0,0 +1,765 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_a2RqQBexEeOaDesjAlqXXw" type="PapyrusUMLClassDiagram" name="Classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_a2RqQRexEeOaDesjAlqXXw" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2RqQhexEeOaDesjAlqXXw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSSFgKY9EeOyAOqIySP6zQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSSFgaY9EeOyAOqIySP6zQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSSFgqY9EeOyAOqIySP6zQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSSFg6Y9EeOyAOqIySP6zQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSSskKY9EeOyAOqIySP6zQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2RqSBexEeOaDesjAlqXXw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2RqSRexEeOaDesjAlqXXw" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2RqShexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2RqSxexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_a2RqTBexEeOaDesjAlqXXw" type="3012">
+ <element xmi:type="uml:Property" href="tracker.uml#_a28_sxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2RqTRexEeOaDesjAlqXXw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2RqThexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2RqTxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2RqUBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2RqURexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2RqUhexEeOaDesjAlqXXw" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2RqUxexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2RqVBexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_a2RqVRexEeOaDesjAlqXXw" type="3013">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2RqVhexEeOaDesjAlqXXw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSWW8KY9EeOyAOqIySP6zQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSW-AKY9EeOyAOqIySP6zQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSW-AaY9EeOyAOqIySP6zQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSW-AqY9EeOyAOqIySP6zQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSW-A6Y9EeOyAOqIySP6zQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <element xmi:type="uml:Operation" href="tracker.uml#_a29ACRexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2RqXBexEeOaDesjAlqXXw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2RqXRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2RqXhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2RqXxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2RqYBexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2RqYRexEeOaDesjAlqXXw" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2RqYhexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2RqYxexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2RqZBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2RqZRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2RqZhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2RqZxexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Class" href="tracker.uml#_a28_shexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2RqaBexEeOaDesjAlqXXw" x="99" y="173"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2RqaRexEeOaDesjAlqXXw" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2RqahexEeOaDesjAlqXXw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSruIKY9EeOyAOqIySP6zQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSruIaY9EeOyAOqIySP6zQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSsVMKY9EeOyAOqIySP6zQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSsVMaY9EeOyAOqIySP6zQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DSsVMqY9EeOyAOqIySP6zQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2RqcBexEeOaDesjAlqXXw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2RqcRexEeOaDesjAlqXXw" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2RqchexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2RqcxexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_a2SRUBexEeOaDesjAlqXXw" type="3012">
+ <element xmi:type="uml:Property" href="tracker.uml#_a29ACxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRURexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2SRUhexEeOaDesjAlqXXw" type="3012">
+ <element xmi:type="uml:Property" href="tracker.uml#_a29ADBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRUxexEeOaDesjAlqXXw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRVBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRVRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRVhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRVxexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2SRWBexEeOaDesjAlqXXw" type="7018">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2SRWRexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2SRWhexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRWxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRXBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRXRexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRXhexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2SRXxexEeOaDesjAlqXXw" type="7019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2SRYBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2SRYRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRYhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRYxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRZBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRZRexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Class" href="tracker.uml#_a29AChexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRZhexEeOaDesjAlqXXw" x="333" y="162"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2SRZxexEeOaDesjAlqXXw" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRaBexEeOaDesjAlqXXw" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2SRaRexEeOaDesjAlqXXw" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2SRahexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2SRaxexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRbBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRbRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRbhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRbxexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2SRcBexEeOaDesjAlqXXw" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2SRcRexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2SRchexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRcxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRdBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRdRexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRdhexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2SRdxexEeOaDesjAlqXXw" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2SReBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2SReRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRehexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRexexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRfBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRfRexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Interface" href="tracker.uml#_a29AFhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRfhexEeOaDesjAlqXXw" x="342" width="109"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2SRfxexEeOaDesjAlqXXw" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRgBexEeOaDesjAlqXXw" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2SRgRexEeOaDesjAlqXXw" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2SRghexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2SRgxexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRhBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRhRexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRhhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRhxexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2SRiBexEeOaDesjAlqXXw" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2SRiRexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2SRihexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRixexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRjBexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRjRexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRjhexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_a2SRjxexEeOaDesjAlqXXw" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2SRkBexEeOaDesjAlqXXw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2SRkRexEeOaDesjAlqXXw" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_a2SRkhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2SRkxexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2SRlBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRlRexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Interface" href="tracker.uml#_a29AFxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2SRlhexEeOaDesjAlqXXw" x="108" y="5" width="128"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_a2SRlxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Model" href="tracker.uml#_a28_sBexEeOaDesjAlqXXw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_a2SRmBexEeOaDesjAlqXXw" type="4001" source="_a2RqQRexEeOaDesjAlqXXw" target="_a2RqaRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRmRexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRmhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRmxexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRnBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRnRexEeOaDesjAlqXXw" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRnhexEeOaDesjAlqXXw" x="16" y="-14"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRnxexEeOaDesjAlqXXw" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRoBexEeOaDesjAlqXXw" x="-11" y="17"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRoRexEeOaDesjAlqXXw" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRohexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRoxexEeOaDesjAlqXXw" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRpBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2SRpRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Association" href="tracker.uml#_a29ADhexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2SRphexEeOaDesjAlqXXw" points="[14, 1, -142, -11]$[132, -3, -24, -15]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2SRpxexEeOaDesjAlqXXw" id="(0.8793103448275862,0.21929824561403508)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2SRqBexEeOaDesjAlqXXw" id="(0.18604651162790697,0.3008130081300813)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2SRqRexEeOaDesjAlqXXw" type="4001" source="_a2RqQRexEeOaDesjAlqXXw" target="_a2RqaRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRqhexEeOaDesjAlqXXw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRqxexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRrBexEeOaDesjAlqXXw" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRrRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRrhexEeOaDesjAlqXXw" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRrxexEeOaDesjAlqXXw" x="17" y="-12"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRsBexEeOaDesjAlqXXw" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRsRexEeOaDesjAlqXXw" x="-19" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRshexEeOaDesjAlqXXw" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRsxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRtBexEeOaDesjAlqXXw" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRtRexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2SRthexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Association" href="tracker.uml#_a29AEhexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2SRtxexEeOaDesjAlqXXw" points="[19, 1, -158, -13]$[162, 37, -15, 23]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2SRuBexEeOaDesjAlqXXw" id="(0.8362068965517241,0.7543859649122807)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2SRuRexEeOaDesjAlqXXw" id="(0.31007751937984496,0.8130081300813008)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2SRuhexEeOaDesjAlqXXw" type="4003" source="_a2RqaRexEeOaDesjAlqXXw" target="_a2SRZxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRuxexEeOaDesjAlqXXw" visible="false" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRvBexEeOaDesjAlqXXw" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRvRexEeOaDesjAlqXXw" visible="false" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRvhexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2SRvxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:InterfaceRealization" href="tracker.uml#_a29ADRexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2SRwBexEeOaDesjAlqXXw" points="[-2, -7, 12, 112]$[-22, -69, -8, 50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2SRwRexEeOaDesjAlqXXw" id="(0.5116279069767442,0.016260162601626018)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2SRwhexEeOaDesjAlqXXw" type="4003" source="_a2RqQRexEeOaDesjAlqXXw" target="_a2SRfxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRwxexEeOaDesjAlqXXw" visible="false" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRxBexEeOaDesjAlqXXw" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2SRxRexEeOaDesjAlqXXw" visible="false" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2SRxhexEeOaDesjAlqXXw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2SRxxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:InterfaceRealization" href="tracker.uml#_a28_uhexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2SRyBexEeOaDesjAlqXXw" points="[-2, -18, 5, 107]$[-10, -175, -3, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2SRyRexEeOaDesjAlqXXw" id="(0.6896551724137931,0.15789473684210525)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_a2jXEBexEeOaDesjAlqXXw" type="PapyrusUMLActivityDiagram" name="Bug Lifecycle" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_a2jXERexEeOaDesjAlqXXw" type="2001" fontName="Lucida Grande" fontHeight="11" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2jXEhexEeOaDesjAlqXXw" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2jXExexEeOaDesjAlqXXw" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2jXFBexEeOaDesjAlqXXw" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2jXFRexEeOaDesjAlqXXw" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a2jXFhexEeOaDesjAlqXXw" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a2jXFxexEeOaDesjAlqXXw" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2jXGBexEeOaDesjAlqXXw" type="5001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2jXGRexEeOaDesjAlqXXw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2jXGhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2jXGxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2jXHBexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2jXHRexEeOaDesjAlqXXw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2jXHhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2jXHxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2jXIBexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2jXIRexEeOaDesjAlqXXw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_a2jXIhexEeOaDesjAlqXXw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_a2jXIxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2jXJBexEeOaDesjAlqXXw"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2jXJRexEeOaDesjAlqXXw" type="7004">
+ <children xmi:type="notation:Shape" xmi:id="_a2jXJhexEeOaDesjAlqXXw" type="3004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2jXJxexEeOaDesjAlqXXw" type="5080">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2jXKBexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2jXKRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:InitialNode" href="tracker.uml#_a28__BexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2jXKhexEeOaDesjAlqXXw" x="31" y="39"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-IBexEeOaDesjAlqXXw" type="3005">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-IRexEeOaDesjAlqXXw" type="5081">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-IhexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-IxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ActivityFinalNode" href="tracker.uml#_a28__RexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-JBexEeOaDesjAlqXXw" x="598" y="282"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-JRexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-JhexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-JxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a28__hexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-KBexEeOaDesjAlqXXw" x="22" y="102"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-KRexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-KhexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-KxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a28__xexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-LBexEeOaDesjAlqXXw" x="22" y="192"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-LRexEeOaDesjAlqXXw" type="3065">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-LhexEeOaDesjAlqXXw" type="5117"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-LxexEeOaDesjAlqXXw" type="7005">
+ <children xmi:type="notation:Shape" xmi:id="_a2j-MBexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-MRexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-MhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a28_vRexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-MxexEeOaDesjAlqXXw" x="57" y="21"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-NBexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-NRexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-NhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a28_vhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-NxexEeOaDesjAlqXXw" x="21" y="93"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-OBexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-ORexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-OhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a28_vxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-OxexEeOaDesjAlqXXw" x="57" y="156"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-PBexEeOaDesjAlqXXw"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-PRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:StructuredActivityNode" href="tracker.uml#_a28_vBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-PhexEeOaDesjAlqXXw" x="157" y="57" width="162" height="222"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-PxexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-QBexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-QRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a29AABexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-QhexEeOaDesjAlqXXw" x="427" y="129"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-QxexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-RBexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-RRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a29AARexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-RhexEeOaDesjAlqXXw" x="508" y="120"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-RxexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-SBexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-SRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a29AAhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-ShexEeOaDesjAlqXXw" x="373" y="192"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-SxexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-TBexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-TRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a29AAxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-ThexEeOaDesjAlqXXw" x="589" y="192"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-TxexEeOaDesjAlqXXw" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-UBexEeOaDesjAlqXXw" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-URexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-UhexEeOaDesjAlqXXw" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-UxexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-VBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:DecisionNode" href="tracker.uml#_a29ABBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-VRexEeOaDesjAlqXXw" x="103" y="192"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-VhexEeOaDesjAlqXXw" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-VxexEeOaDesjAlqXXw" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-WBexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-WRexEeOaDesjAlqXXw" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-WhexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-WxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:DecisionNode" href="tracker.uml#_a29ABRexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-XBexEeOaDesjAlqXXw" x="436" y="75"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-XRexEeOaDesjAlqXXw" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-XhexEeOaDesjAlqXXw" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-XxexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-YBexEeOaDesjAlqXXw" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-YRexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-YhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:DecisionNode" href="tracker.uml#_a29ABhexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-YxexEeOaDesjAlqXXw" x="607" y="111"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-ZBexEeOaDesjAlqXXw" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-ZRexEeOaDesjAlqXXw" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-ZhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:OpaqueAction" href="tracker.uml#_a29ABxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-ZxexEeOaDesjAlqXXw" x="355" y="75"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_a2j-aBexEeOaDesjAlqXXw" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-aRexEeOaDesjAlqXXw" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-ahexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-axexEeOaDesjAlqXXw" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-bBexEeOaDesjAlqXXw" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_a2j-bRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:DecisionNode" href="tracker.uml#_a29ACBexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-bhexEeOaDesjAlqXXw" x="454" y="201"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-bxexEeOaDesjAlqXXw"/>
+ </children>
+ <element xmi:type="uml:Activity" href="tracker.uml#_a28_uxexEeOaDesjAlqXXw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a2j-cBexEeOaDesjAlqXXw"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_a2j-cRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:Activity" href="tracker.uml#_a28_uxexEeOaDesjAlqXXw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_a2j-chexEeOaDesjAlqXXw" type="4004" source="_a2jXJhexEeOaDesjAlqXXw" target="_a2j-JRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-cxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-dBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-dRexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-dhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-dxexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-eBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-eRexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-ehexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2j-exexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_wBexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2j-fBexEeOaDesjAlqXXw" points="[-1, 9, -2, -64]$[-1, 53, -2, -20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2j-fRexEeOaDesjAlqXXw" type="4004" source="_a2j-JRexEeOaDesjAlqXXw" target="_a2j-KRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-fhexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-fxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-gBexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-gRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-ghexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-gxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-hBexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-hRexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2j-hhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_wxexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2j-hxexEeOaDesjAlqXXw" points="[-2, 20, 0, -55]$[-3, 70, -1, -5]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2j-iBexEeOaDesjAlqXXw" id="(0.45,0.125)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2j-iRexEeOaDesjAlqXXw" type="4004" source="_a2j-KRexEeOaDesjAlqXXw" target="_a2j-TxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-ihexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-ixexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-jBexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-jRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-jhexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-jxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-kBexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-kRexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2j-khexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_xhexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2j-kxexEeOaDesjAlqXXw" points="[8, -5, -47, 0]$[50, -7, -5, -2]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2j-lBexEeOaDesjAlqXXw" id="(0.8,0.475)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2j-lRexEeOaDesjAlqXXw" id="(0.3,0.4666666666666667)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2j-lhexEeOaDesjAlqXXw" type="4004" source="_a2j-TxexEeOaDesjAlqXXw" target="_a2j-MBexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-lxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-mBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-mRexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-mhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-mxexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-nBexEeOaDesjAlqXXw" x="-4" y="-18"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-nRexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-nhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2j-nxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_yRexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2j-oBexEeOaDesjAlqXXw" points="[6, -6, -121, 106]$[121, -132, -6, -20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2j-oRexEeOaDesjAlqXXw" id="(0.6,0.2)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2j-ohexEeOaDesjAlqXXw" type="4004" source="_a2j-TxexEeOaDesjAlqXXw" target="_a2j-NBexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-oxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-pBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-pRexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-phexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-pxexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-qBexEeOaDesjAlqXXw" x="9" y="7"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-qRexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-qhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2j-qxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_zBexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2j-rBexEeOaDesjAlqXXw" points="[8, -3, -84, 24]$[70, -21, -22, 6]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2j-rRexEeOaDesjAlqXXw" id="(0.21568627450980393,0.7)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2j-rhexEeOaDesjAlqXXw" type="4004" source="_a2j-TxexEeOaDesjAlqXXw" target="_a2j-OBexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-rxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-sBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-sRexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-shexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-sxexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-tBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-tRexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-thexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2j-txexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_zxexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2j-uBexEeOaDesjAlqXXw" points="[5, 1, -121, -38]$[106, 39, -20, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2j-uRexEeOaDesjAlqXXw" id="(0.5,0.7)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2j-uhexEeOaDesjAlqXXw" type="4004" source="_a2j-NBexEeOaDesjAlqXXw" target="_a2j-RxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-uxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-vBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-vRexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-vhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-vxexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-wBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-wRexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-whexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2j-wxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_0hexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2j-xBexEeOaDesjAlqXXw" points="[12, 4, -108, -34]$[121, 58, 1, 20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2j-xRexEeOaDesjAlqXXw" id="(0.8823529411764706,0.55)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2j-xhexEeOaDesjAlqXXw" type="4004" source="_a2j-OBexEeOaDesjAlqXXw" target="_a2j-RxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-xxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-yBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-yRexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-yhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-yxexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-zBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2j-zRexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2j-zhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klMBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_1RexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klMRexEeOaDesjAlqXXw" points="[20, -3, -133, 24]$[150, -7, -3, 20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klMhexEeOaDesjAlqXXw" type="4004" source="_a2j-MBexEeOaDesjAlqXXw" target="_a2j-ZBexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klMxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klNBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klNRexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klNhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klNxexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klOBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klORexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klOhexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klOxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_2BexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klPBexEeOaDesjAlqXXw" points="[20, 2, -115, 2]$[136, 20, 1, 20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klPRexEeOaDesjAlqXXw" type="4004" source="_a2j-ZBexEeOaDesjAlqXXw" target="_a2j-VhexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klPhexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klPxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klQBexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klQRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klQhexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klQxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klRBexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klRRexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klRhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_2xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klRxexEeOaDesjAlqXXw" points="[20, -7, -51, -2]$[68, -16, -3, -11]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klSBexEeOaDesjAlqXXw" type="4004" source="_a2j-VhexEeOaDesjAlqXXw" target="_a2j-PxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klSRexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klShexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klSxexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klTBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klTRexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klThexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klTxexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klUBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klURexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_3hexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klUhexEeOaDesjAlqXXw" points="[7, 4, -57, -1]$[59, -15, -5, -20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klUxexEeOaDesjAlqXXw" type="4004" source="_a2j-PxexEeOaDesjAlqXXw" target="_a2j-QxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klVBexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klVRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klVhexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klVxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klWBexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klWRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klWhexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klWxexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klXBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_4RexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klXRexEeOaDesjAlqXXw" points="[20, -2, -79, -2]$[103, -20, 4, -20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2klXhexEeOaDesjAlqXXw" id="(0.925,0.6)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klXxexEeOaDesjAlqXXw" type="4004" source="_a2j-QxexEeOaDesjAlqXXw" target="_a2j-XRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klYBexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klYRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klYhexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klYxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klZBexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klZRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klZhexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klZxexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klaBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_5BexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klaRexEeOaDesjAlqXXw" points="[1, 20, -15, -162]$[15, 176, -1, -6]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2klahexEeOaDesjAlqXXw" id="(0.45,0.3)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klaxexEeOaDesjAlqXXw" type="4004" source="_a2j-XRexEeOaDesjAlqXXw" target="_a2j-SxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klbBexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klbRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klbhexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klbxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klcBexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klcRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klchexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klcxexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2kldBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_5xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2kldRexEeOaDesjAlqXXw" points="[5, -1, 3, -107]$[5, 86, 3, -20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2kldhexEeOaDesjAlqXXw" id="(0.6,0.6666666666666666)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2kldxexEeOaDesjAlqXXw" type="4004" source="_a2j-XRexEeOaDesjAlqXXw" target="_a2j-KRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2kleBexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kleRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klehexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klexexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klfBexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klfRexEeOaDesjAlqXXw" x="3" y="-21"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klfhexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klfxexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klgBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_6hexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klgRexEeOaDesjAlqXXw" points="[0, -7, 561, -81]$[0, -110, 561, -184]$[-522, -110, 39, -184]$[-560, 68, 1, -6]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2klghexEeOaDesjAlqXXw" id="(0.3,0.43333333333333335)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2klgxexEeOaDesjAlqXXw" id="(0.75,0.15)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klhBexEeOaDesjAlqXXw" type="4004" source="_a2j-SxexEeOaDesjAlqXXw" target="_a2j-IBexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klhRexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klhhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klhxexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kliBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2kliRexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klihexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klixexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kljBexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2kljRexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_7RexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2kljhexEeOaDesjAlqXXw" points="[20, 1, -39, 0]$[49, 1, -10, 0]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2kljxexEeOaDesjAlqXXw" type="4004" source="_a2j-RxexEeOaDesjAlqXXw" target="_a2j-aBexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klkBexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klkRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klkhexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klkxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2kllBexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kllRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2kllhexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kllxexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klmBexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_8BexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klmRexEeOaDesjAlqXXw" points="[20, -1, -104, -1]$[121, -11, -3, -11]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klmhexEeOaDesjAlqXXw" type="4004" source="_a2j-aBexEeOaDesjAlqXXw" target="_a2j-SxexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klmxexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klnBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klnRexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klnhexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klnxexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kloBexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2kloRexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klohexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2kloxexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_8xexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klpBexEeOaDesjAlqXXw" points="[7, 4, -187, 6]$[193, 18, -1, 20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klpRexEeOaDesjAlqXXw" type="4004" source="_a2j-aBexEeOaDesjAlqXXw" target="_a2j-KRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klphexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klpxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klqBexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klqRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klqhexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klqxexEeOaDesjAlqXXw" x="10" y="32"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klrBexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klrRexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2klrhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_9hexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2klrxexEeOaDesjAlqXXw" points="[0, 9, 418, 13]$[0, 85, 418, 89]$[-418, 85, 0, 89]$[-418, 16, 0, 20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2klsBexEeOaDesjAlqXXw" id="(0.3,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_a2klsRexEeOaDesjAlqXXw" type="4004" source="_a2j-VhexEeOaDesjAlqXXw" target="_a2j-KRexEeOaDesjAlqXXw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klshexEeOaDesjAlqXXw" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2klsxexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2kltBexEeOaDesjAlqXXw" visible="false" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kltRexEeOaDesjAlqXXw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2klthexEeOaDesjAlqXXw" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kltxexEeOaDesjAlqXXw" x="-9" y="-14"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_a2kluBexEeOaDesjAlqXXw" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_a2kluRexEeOaDesjAlqXXw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_a2kluhexEeOaDesjAlqXXw"/>
+ <element xmi:type="uml:ControlFlow" href="tracker.uml#_a28_-RexEeOaDesjAlqXXw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a2kluxexEeOaDesjAlqXXw" points="[0, -2, 400, -131]$[0, -53, 400, -182]$[-303, -53, 97, -182]$[-390, 109, 10, -20]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2klvBexEeOaDesjAlqXXw" id="(0.3,0.26666666666666666)"/>
+ </edges>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.uml b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.uml
new file mode 100755
index 00000000..9d0ebe60
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/resources/tracker.uml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:j2ee="http:///schemas/j2ee/_6PHYYFkiEeK52Llgof0Xvg/0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <uml:Model xmi:id="_a28_sBexEeOaDesjAlqXXw" name="BugTracker">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_a28_sRexEeOaDesjAlqXXw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_a28_shexEeOaDesjAlqXXw" name="Bug" classifierBehavior="_a28_uxexEeOaDesjAlqXXw">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a28_sxexEeOaDesjAlqXXw" name="id">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a28_tBexEeOaDesjAlqXXw" name="reporter" type="_a29AChexEeOaDesjAlqXXw" association="_a29ADhexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a28_tRexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a28_thexEeOaDesjAlqXXw" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a28_txexEeOaDesjAlqXXw" name="assignee" type="_a29AChexEeOaDesjAlqXXw" association="_a29AEhexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a28_uBexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a28_uRexEeOaDesjAlqXXw" value="1"/>
+ </ownedAttribute>
+ <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_a28_uhexEeOaDesjAlqXXw" name="InterfaceRealization1" client="_a28_shexEeOaDesjAlqXXw" supplier="_a29AFxexEeOaDesjAlqXXw" contract="_a29AFxexEeOaDesjAlqXXw"/>
+ <ownedBehavior xmi:type="uml:Activity" xmi:id="_a28_uxexEeOaDesjAlqXXw" name="Lifecycle" node="_a28__BexEeOaDesjAlqXXw _a28__RexEeOaDesjAlqXXw _a28__hexEeOaDesjAlqXXw _a28__xexEeOaDesjAlqXXw _a29AABexEeOaDesjAlqXXw _a29AARexEeOaDesjAlqXXw _a29AAhexEeOaDesjAlqXXw _a29AAxexEeOaDesjAlqXXw _a29ABBexEeOaDesjAlqXXw _a29ABRexEeOaDesjAlqXXw _a29ABhexEeOaDesjAlqXXw _a29ABxexEeOaDesjAlqXXw _a29ACBexEeOaDesjAlqXXw" group="_a28_vBexEeOaDesjAlqXXw">
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_wBexEeOaDesjAlqXXw" name="ControlFlow1" target="_a28__hexEeOaDesjAlqXXw" source="_a28__BexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_wRexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_whexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_wxexEeOaDesjAlqXXw" name="ControlFlow2" target="_a28__xexEeOaDesjAlqXXw" source="_a28__hexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_xBexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_xRexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_xhexEeOaDesjAlqXXw" name="ControlFlow3" target="_a29ABBexEeOaDesjAlqXXw" source="_a28__xexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_xxexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_yBexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_yRexEeOaDesjAlqXXw" name="ControlFlow4" target="_a28_vRexEeOaDesjAlqXXw" source="_a29ABBexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_yhexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_yxexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_zBexEeOaDesjAlqXXw" name="ControlFlow5" target="_a28_vhexEeOaDesjAlqXXw" source="_a29ABBexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_zRexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_zhexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_zxexEeOaDesjAlqXXw" name="ControlFlow6" target="_a28_vxexEeOaDesjAlqXXw" source="_a29ABBexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_0BexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_0RexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_0hexEeOaDesjAlqXXw" name="ControlFlow7" target="_a29AAhexEeOaDesjAlqXXw" source="_a28_vhexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_0xexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_1BexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_1RexEeOaDesjAlqXXw" name="ControlFlow8" target="_a29AAhexEeOaDesjAlqXXw" source="_a28_vxexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_1hexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_1xexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_2BexEeOaDesjAlqXXw" name="ControlFlow9" target="_a29ABxexEeOaDesjAlqXXw" source="_a28_vRexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_2RexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_2hexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_2xexEeOaDesjAlqXXw" name="ControlFlow10" target="_a29ABRexEeOaDesjAlqXXw" source="_a29ABxexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_3BexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_3RexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_3hexEeOaDesjAlqXXw" name="ControlFlow11" target="_a29AABexEeOaDesjAlqXXw" source="_a29ABRexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_3xexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_4BexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_4RexEeOaDesjAlqXXw" name="ControlFlow12" target="_a29AARexEeOaDesjAlqXXw" source="_a29AABexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_4hexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_4xexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_5BexEeOaDesjAlqXXw" name="ControlFlow13" target="_a29ABhexEeOaDesjAlqXXw" source="_a29AARexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_5RexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_5hexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_5xexEeOaDesjAlqXXw" name="ControlFlow14" target="_a29AAxexEeOaDesjAlqXXw" source="_a29ABhexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_6BexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_6RexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_6hexEeOaDesjAlqXXw" name="ControlFlow15" target="_a28__xexEeOaDesjAlqXXw" source="_a29ABhexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_6xexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_7BexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_7RexEeOaDesjAlqXXw" name="ControlFlow16" target="_a28__RexEeOaDesjAlqXXw" source="_a29AAxexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_7hexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_7xexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_8BexEeOaDesjAlqXXw" name="ControlFlow17" target="_a29ACBexEeOaDesjAlqXXw" source="_a29AAhexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_8RexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_8hexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_8xexEeOaDesjAlqXXw" name="ControlFlow18" target="_a29AAxexEeOaDesjAlqXXw" source="_a29ACBexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_9BexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_9RexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_9hexEeOaDesjAlqXXw" name="ControlFlow19" target="_a28__xexEeOaDesjAlqXXw" source="_a29ACBexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_9xexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_-BexEeOaDesjAlqXXw"/>
+ </edge>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_a28_-RexEeOaDesjAlqXXw" name="ControlFlow20" target="_a28__xexEeOaDesjAlqXXw" source="_a29ABRexEeOaDesjAlqXXw">
+ <guard xmi:type="uml:LiteralBoolean" xmi:id="_a28_-hexEeOaDesjAlqXXw" value="true"/>
+ <weight xmi:type="uml:LiteralInteger" xmi:id="_a28_-xexEeOaDesjAlqXXw"/>
+ </edge>
+ <group xmi:type="uml:StructuredActivityNode" xmi:id="_a28_vBexEeOaDesjAlqXXw" name="Route">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a28_vRexEeOaDesjAlqXXw" name="Assign" incoming="_a28_yRexEeOaDesjAlqXXw" outgoing="_a28_2BexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a28_vhexEeOaDesjAlqXXw" name="Return for Clarification" incoming="_a28_zBexEeOaDesjAlqXXw" outgoing="_a28_0hexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a28_vxexEeOaDesjAlqXXw" name="Reject" incoming="_a28_zxexEeOaDesjAlqXXw" outgoing="_a28_1RexEeOaDesjAlqXXw"/>
+ </group>
+ <node xmi:type="uml:InitialNode" xmi:id="_a28__BexEeOaDesjAlqXXw" name="InitialNode1" outgoing="_a28_wBexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:ActivityFinalNode" xmi:id="_a28__RexEeOaDesjAlqXXw" name="ActivityFinalNode1" incoming="_a28_7RexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a28__hexEeOaDesjAlqXXw" name="Raise" incoming="_a28_wBexEeOaDesjAlqXXw" outgoing="_a28_wxexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a28__xexEeOaDesjAlqXXw" name="Triage" incoming="_a28_wxexEeOaDesjAlqXXw _a28_6hexEeOaDesjAlqXXw _a28_9hexEeOaDesjAlqXXw _a28_-RexEeOaDesjAlqXXw" outgoing="_a28_xhexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a29AABexEeOaDesjAlqXXw" name="Resolve" incoming="_a28_3hexEeOaDesjAlqXXw" outgoing="_a28_4RexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a29AARexEeOaDesjAlqXXw" name="Verify" incoming="_a28_4RexEeOaDesjAlqXXw" outgoing="_a28_5BexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a29AAhexEeOaDesjAlqXXw" name="Review" incoming="_a28_0hexEeOaDesjAlqXXw _a28_1RexEeOaDesjAlqXXw" outgoing="_a28_8BexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a29AAxexEeOaDesjAlqXXw" name="Close" incoming="_a28_5xexEeOaDesjAlqXXw _a28_8xexEeOaDesjAlqXXw" outgoing="_a28_7RexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_a29ABBexEeOaDesjAlqXXw" name="DecisionNode1" incoming="_a28_xhexEeOaDesjAlqXXw" outgoing="_a28_yRexEeOaDesjAlqXXw _a28_zBexEeOaDesjAlqXXw _a28_zxexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_a29ABRexEeOaDesjAlqXXw" name="DecisionNode2" incoming="_a28_2xexEeOaDesjAlqXXw" outgoing="_a28_3hexEeOaDesjAlqXXw _a28_-RexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_a29ABhexEeOaDesjAlqXXw" name="DecisionNode3" incoming="_a28_5BexEeOaDesjAlqXXw" outgoing="_a28_5xexEeOaDesjAlqXXw _a28_6hexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_a29ABxexEeOaDesjAlqXXw" name="Work On" incoming="_a28_2BexEeOaDesjAlqXXw" outgoing="_a28_2xexEeOaDesjAlqXXw"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_a29ACBexEeOaDesjAlqXXw" name="DecisionNode4" incoming="_a28_8BexEeOaDesjAlqXXw" outgoing="_a28_8xexEeOaDesjAlqXXw _a28_9hexEeOaDesjAlqXXw"/>
+ </ownedBehavior>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_a29ACRexEeOaDesjAlqXXw" name="lookup"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_a29AChexEeOaDesjAlqXXw" name="User">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a29ACxexEeOaDesjAlqXXw" name="realName">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_a29ADBexEeOaDesjAlqXXw" name="email">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedAttribute>
+ <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_a29ADRexEeOaDesjAlqXXw" name="InterfaceRealization1" client="_a29AChexEeOaDesjAlqXXw" supplier="_a29AFhexEeOaDesjAlqXXw" contract="_a29AFhexEeOaDesjAlqXXw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_a29ADhexEeOaDesjAlqXXw" name="bug_reporter" memberEnd="_a29ADxexEeOaDesjAlqXXw _a28_tBexEeOaDesjAlqXXw">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_a29ADxexEeOaDesjAlqXXw" name="reported" type="_a28_shexEeOaDesjAlqXXw" association="_a29ADhexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a29AEBexEeOaDesjAlqXXw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a29AERexEeOaDesjAlqXXw" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_a29AEhexEeOaDesjAlqXXw" name="bug_assignee" memberEnd="_a29AExexEeOaDesjAlqXXw _a28_txexEeOaDesjAlqXXw">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_a29AExexEeOaDesjAlqXXw" name="assigned" type="_a28_shexEeOaDesjAlqXXw" association="_a29AEhexEeOaDesjAlqXXw">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_a29AFBexEeOaDesjAlqXXw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_a29AFRexEeOaDesjAlqXXw" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_a29AFhexEeOaDesjAlqXXw" name="IPermissionOwner"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_a29AFxexEeOaDesjAlqXXw" name="IPermissionControlled"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_a29AGBexEeOaDesjAlqXXw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a29AGRexEeOaDesjAlqXXw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="j2ee.profile.uml#_a8wFshexEeOaDesjAlqXXw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="j2ee.profile.uml#_a8wFsBexEeOaDesjAlqXXw"/>
+ </profileApplication>
+ </uml:Model>
+ <j2ee:Bean xmi:id="_a29AGhexEeOaDesjAlqXXw" base_Classifier="_a28_shexEeOaDesjAlqXXw" kind="session" primaryFinder="_a29AGxexEeOaDesjAlqXXw"/>
+ <j2ee:Finder xmi:id="_a29AGxexEeOaDesjAlqXXw" base_Operation="_a29ACRexEeOaDesjAlqXXw"/>
+ <j2ee:Bean xmi:id="_a29mwBexEeOaDesjAlqXXw" base_Classifier="_a29AChexEeOaDesjAlqXXw"/>
+</xmi:XMI>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AbstractPapyrusCDOSearchTest.java b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AbstractPapyrusCDOSearchTest.java
new file mode 100755
index 00000000..1ee381d2
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AbstractPapyrusCDOSearchTest.java
@@ -0,0 +1,263 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.ui.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Arrays;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
+import org.eclipse.papyrus.views.search.results.AttributeMatch;
+import org.eclipse.papyrus.views.search.results.ModelElementMatch;
+import org.eclipse.search.ui.ISearchResult;
+import org.eclipse.search.ui.text.AbstractTextSearchResult;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Before;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+
+/**
+ * This is the AbstractPapyrusCDOSearchTest type. Enjoy.
+ */
+public abstract class AbstractPapyrusCDOSearchTest extends AbstractPapyrusCDOTest {
+
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.cdo.uml.search.ui.tests";
+
+ private IWorkbenchPage page;
+
+ public AbstractPapyrusCDOSearchTest() {
+ super();
+ }
+
+ @Before
+ public void initWorkbench() throws Exception {
+ page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+
+ // ensure the Papyrus perspective
+ IPerspectiveDescriptor perspective = page.getWorkbenchWindow().getWorkbench().getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.papyrus.infra.core.perspective");
+ if (!perspective.getId().equals(page.getPerspective().getId())) {
+ page.setPerspective(perspective);
+ }
+
+ // minimize the Welcome view
+ for (IViewReference next : page.getViewReferences()) {
+ if ("org.eclipse.ui.internal.introview".equals(next.getId())) {
+ page.setPartState(next, IWorkbenchPage.STATE_MINIMIZED);
+ break;
+ }
+ }
+
+ // bring the Repository Explorer forward
+ @SuppressWarnings("restriction")
+ IViewPart reposView = page.showView("org.eclipse.emf.cdo.explorer.ui.CDORepositoriesView");
+ page.activate(reposView);
+
+ page.setEditorAreaVisible(true);
+
+ flushDisplayEvents();
+ }
+
+ @Before
+ public void importTestModel() throws Exception {
+
+ CDOTransaction transaction = createTransaction();
+ ResourceSet rset = transaction.getResourceSet();
+
+ importModel(transaction, "garage", "GarageModel/garage");
+ importModel(transaction, "j2ee.profile", "BugTracker/j2ee.profile");
+ importModel(transaction, "tracker", "BugTracker/tracker");
+ importModel(transaction, "admin", "AdminConsole/admin");
+
+ commit(rset);
+ close(rset);
+ }
+
+ private void importModel(CDOTransaction transaction, String name, String dstPath) {
+ importResource(transaction, name + ".uml", dstPath + ".uml");
+ importResource(transaction, name + ".notation", dstPath + ".notation");
+ importResource(transaction, name + ".di", dstPath + ".di");
+ }
+
+ private Resource importResource(CDOTransaction transaction, String srcPath, String dstPath) {
+ ResourceSet rset = transaction.getResourceSet();
+
+ Resource xml = rset.getResource(URI.createPlatformPluginURI(PLUGIN_ID + "/resources/" + srcPath, true), true);
+
+ EcoreUtil.resolveAll(xml);
+
+ Resource result = transaction.getOrCreateResource(getResourcePath(dstPath));
+ result.getContents().clear();
+ result.getContents().addAll(xml.getContents());
+
+ xml.unload();
+ rset.getResources().remove(xml);
+
+ return result;
+ }
+
+ protected IWorkbenchPage getWorkbenchPage() {
+ return page;
+ }
+
+ protected void flushDisplayEvents() {
+ while (Display.getCurrent().readAndDispatch()) {
+ // pass
+ }
+ }
+
+ protected void sleep(int seconds) {
+ for (int i = 0; i < seconds; i++) {
+ try {
+ Thread.sleep(1000);
+ } catch (Exception e) {
+ // fine. So, we don't sleep so long
+ }
+
+ flushDisplayEvents();
+ }
+ }
+
+ protected void assertMatched(ISearchResult searchResult, Predicate<? super EObject> predicate) {
+ boolean found = false;
+
+ AbstractTextSearchResult textResult = (AbstractTextSearchResult) searchResult;
+ for (Object element : textResult.getElements()) {
+ for (AbstractResultEntry next : Iterables.filter(Arrays.asList(textResult.getMatches(element)), AbstractResultEntry.class)) {
+ if ((next instanceof ModelElementMatch) || (next instanceof AttributeMatch)) {
+ assertThat("Search result match incorrect.", predicate.apply((EObject) next.getSource()), is(true));
+ found = true;
+ }
+ }
+ }
+
+ assertThat("No elements in search result matched.", found, is(true));
+ }
+
+ protected void assertMatchedAny(ISearchResult searchResult, Predicate<? super EObject> predicate) {
+ boolean found = false;
+
+ AbstractTextSearchResult textResult = (AbstractTextSearchResult) searchResult;
+ for (Object element : textResult.getElements()) {
+ for (AbstractResultEntry next : Iterables.filter(Arrays.asList(textResult.getMatches(element)), AbstractResultEntry.class)) {
+ if ((next instanceof ModelElementMatch) || (next instanceof AttributeMatch)) {
+ if (predicate.apply((EObject) next.getSource())) {
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+
+ assertThat("No elements in search result matched.", found, is(true));
+ }
+
+ protected void assertNotMatched(ISearchResult searchResult, Predicate<? super EObject> predicate) {
+ AbstractTextSearchResult textResult = (AbstractTextSearchResult) searchResult;
+ for (Object element : textResult.getElements()) {
+ for (AbstractResultEntry next : Iterables.filter(Arrays.asList(textResult.getMatches(element)), AbstractResultEntry.class)) {
+ if ((next instanceof ModelElementMatch) || (next instanceof AttributeMatch)) {
+ assertThat("Search result match incorrect.", predicate.apply((EObject) next.getSource()), is(false));
+ }
+ }
+ }
+ }
+
+ protected void assertNotMatchedAny(ISearchResult searchResult, Predicate<? super EObject> predicate) {
+ boolean found = false;
+
+ AbstractTextSearchResult textResult = (AbstractTextSearchResult) searchResult;
+ for (Object element : textResult.getElements()) {
+ for (AbstractResultEntry next : Iterables.filter(Arrays.asList(textResult.getMatches(element)), AbstractResultEntry.class)) {
+ if ((next instanceof ModelElementMatch) || (next instanceof AttributeMatch)) {
+ if (!predicate.apply((EObject) next.getSource())) {
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+
+ assertThat("All elements in search result matched.", found, is(true));
+ }
+
+ protected Predicate<Object> type(final EClassifier type) {
+ return new Predicate<Object>() {
+
+ @Override
+ public boolean apply(Object input) {
+ return type.isInstance(input);
+ }
+ };
+ }
+
+ protected Predicate<EObject> name(final Pattern regex) {
+ return new Predicate<EObject>() {
+
+ @Override
+ public boolean apply(EObject input) {
+ boolean result = input instanceof NamedElement;
+
+ if (result) {
+ NamedElement element = (NamedElement) input;
+ result = element.getName() != null && regex.matcher(element.getName()).matches();
+ }
+
+ return result;
+ }
+ };
+ }
+
+ protected Predicate<EObject> anyString(final Pattern regex) {
+ return new Predicate<EObject>() {
+
+ @Override
+ public boolean apply(EObject input) {
+ boolean result = false;
+
+ for (EAttribute next : input.eClass().getEAllAttributes()) {
+ if (next.getEType().getInstanceClass() == String.class) {
+ Object value = input.eGet(next);
+ String string = next.isMany() ? String.valueOf(value) : (String) value;
+
+ if ((string != null) && regex.matcher(string).matches()) {
+ result = true;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+ };
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AdvancedTextSearchTest.java b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AdvancedTextSearchTest.java
new file mode 100755
index 00000000..831f0da5
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AdvancedTextSearchTest.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.ui.tests;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.cdo.uml.search.internal.ui.query.CDOSearchQueryProvider;
+import org.eclipse.papyrus.uml.search.ui.providers.ParticipantTypeAttribute;
+import org.eclipse.papyrus.uml.search.ui.providers.ParticipantTypeElement;
+import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
+import org.eclipse.papyrus.uml.search.ui.query.QueryInfo;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.VisibilityKind;
+import org.junit.Test;
+
+import com.google.common.base.Predicate;
+
+
+/**
+ * This is the AdvancedTextSearchTest type. Enjoy.
+ */
+public class AdvancedTextSearchTest extends AbstractPapyrusCDOSearchTest {
+
+ public AdvancedTextSearchTest() {
+ super();
+ }
+
+ @Test
+ public void testSearchByOneAttributeOfOneMetaclass() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+
+ ParticipantTypeElement e = new ParticipantTypeElement(UMLPackage.Literals.STATE);
+ ParticipantTypeAttribute a = new ParticipantTypeAttribute(UMLPackage.Literals.NAMED_ELEMENT__NAME, e);
+
+ QueryInfo info = new QueryInfo("close", false, false, Arrays.asList(e, a), Collections.singleton(getTestFolderURI()), false, false);
+
+ AbstractPapyrusQuery query = provider.createAdvancedSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatched(query.getSearchResult(), name(Pattern.compile(".*close.*", Pattern.CASE_INSENSITIVE)));
+ assertMatched(query.getSearchResult(), type(UMLPackage.Literals.STATE));
+ }
+
+ @Test
+ public void testSearchByOneAttributesOfTwoMetaclasses() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+
+ ParticipantTypeElement e1 = new ParticipantTypeElement(UMLPackage.Literals.STATE);
+ ParticipantTypeAttribute a1 = new ParticipantTypeAttribute(UMLPackage.Literals.NAMED_ELEMENT__NAME, e1);
+
+ ParticipantTypeElement e2 = new ParticipantTypeElement(UMLPackage.Literals.ACTION);
+ ParticipantTypeAttribute a2 = new ParticipantTypeAttribute(UMLPackage.Literals.NAMED_ELEMENT__NAME, e2);
+
+ QueryInfo info = new QueryInfo("close", false, false, Arrays.asList(e1, e2, a1, a2), Collections.singleton(getTestFolderURI()), false, false);
+
+ AbstractPapyrusQuery query = provider.createAdvancedSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatched(query.getSearchResult(), name(Pattern.compile(".*close.*", Pattern.CASE_INSENSITIVE)));
+ assertMatchedAny(query.getSearchResult(), type(UMLPackage.Literals.STATE));
+ assertMatchedAny(query.getSearchResult(), type(UMLPackage.Literals.ACTION));
+ }
+
+ @Test
+ public void testSearchByNonStringAttribute() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+
+ ParticipantTypeElement e = new ParticipantTypeElement(UMLPackage.Literals.PROPERTY);
+ ParticipantTypeAttribute a = new ParticipantTypeAttribute(UMLPackage.Literals.NAMED_ELEMENT__VISIBILITY, e);
+
+ QueryInfo info = new QueryInfo("public", true, false, Arrays.asList(e, a), Collections.singleton(getTestFolderURI()), false, false);
+
+ AbstractPapyrusQuery query = provider.createAdvancedSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatched(query.getSearchResult(), type(UMLPackage.Literals.PROPERTY));
+ assertMatched(query.getSearchResult(), visibility(VisibilityKind.PUBLIC_LITERAL));
+ }
+
+ @Test
+ public void testSearchByAllAttributesOfAMetaclass() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+
+ ParticipantTypeElement e = new ParticipantTypeElement(UMLPackage.Literals.NAMED_ELEMENT);
+
+ QueryInfo info = new QueryInfo("bug", false, false, Collections.singleton(e), Collections.singleton(getTestFolderURI()), false, false);
+
+ AbstractPapyrusQuery query = provider.createAdvancedSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatched(query.getSearchResult(), anyString(Pattern.compile(".*bug.*", Pattern.CASE_INSENSITIVE)));
+ assertMatchedAny(query.getSearchResult(), type(UMLPackage.Literals.MODEL));
+ assertMatchedAny(query.getSearchResult(), type(UMLPackage.Literals.CLASS));
+ assertMatchedAny(query.getSearchResult(), type(UMLPackage.Literals.ASSOCIATION));
+ assertMatchedAny(query.getSearchResult(), type(UMLPackage.Literals.PROPERTY));
+ }
+
+ //
+ // Test framework
+ //
+
+ protected Predicate<EObject> visibility(final VisibilityKind visibility) {
+ return new Predicate<EObject>() {
+
+ @Override
+ public boolean apply(EObject input) {
+ boolean result = input instanceof NamedElement;
+
+ if(result) {
+ NamedElement element = (NamedElement)input;
+ result = element.getVisibility() == visibility;
+ }
+
+ return result;
+ }
+ };
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AllTests.java b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AllTests.java
new file mode 100755
index 00000000..e88d5b54
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/AllTests.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.ui.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * This is the AllTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ BasicTextSearchTest.class, AdvancedTextSearchTest.class, SearchScopingTest.class })
+public class AllTests {
+
+ public AllTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/BasicTextSearchTest.java b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/BasicTextSearchTest.java
new file mode 100755
index 00000000..220867bc
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/BasicTextSearchTest.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.ui.tests;
+
+import java.util.Collections;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.papyrus.cdo.uml.search.internal.ui.query.CDOSearchQueryProvider;
+import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
+import org.eclipse.papyrus.uml.search.ui.query.QueryInfo;
+import org.junit.Test;
+
+
+/**
+ * This is the BasicTextSearchTest type. Enjoy.
+ */
+public class BasicTextSearchTest extends AbstractPapyrusCDOSearchTest {
+
+ public BasicTextSearchTest() {
+ super();
+ }
+
+ @Test
+ public void testSearchByName() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+ QueryInfo info = new QueryInfo("close", false, false, false, Collections.singleton(getTestFolderURI()));
+
+ AbstractPapyrusQuery query = provider.createSimpleSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatched(query.getSearchResult(), name(Pattern.compile(".*close.*", Pattern.CASE_INSENSITIVE)));
+ }
+
+ @Test
+ public void testSearchByNameCaseSensitive() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+ QueryInfo info = new QueryInfo("Bug", true, false, false, Collections.singleton(getTestFolderURI()));
+
+ AbstractPapyrusQuery query = provider.createSimpleSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatched(query.getSearchResult(), name(Pattern.compile(".*Bug.*")));
+ assertNotMatched(query.getSearchResult(), name(Pattern.compile(".*bug.*")));
+ }
+
+ @Test
+ public void testSearchByNameRegex() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+ QueryInfo info = new QueryInfo("^[Bb]ug.*", false, true, false, Collections.singleton(getTestFolderURI()));
+
+ AbstractPapyrusQuery query = provider.createSimpleSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatchedAny(query.getSearchResult(), name(Pattern.compile("Bug.*")));
+ assertMatchedAny(query.getSearchResult(), name(Pattern.compile("bug.*")));
+ assertNotMatched(query.getSearchResult(), name(Pattern.compile(".+[Bb]ug.*")));
+ }
+
+
+ @Test
+ public void testSearchByAnyString() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+ QueryInfo info = new QueryInfo("Bug", true, false, true, Collections.singleton(getTestFolderURI()));
+
+ AbstractPapyrusQuery query = provider.createSimpleSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatched(query.getSearchResult(), anyString(Pattern.compile(".*Bug.*")));
+ assertNotMatchedAny(query.getSearchResult(), name(Pattern.compile(".*Bug.*")));
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/SearchScopingTest.java b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/SearchScopingTest.java
new file mode 100755
index 00000000..2ac2005e
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.search.ui.tests/src/org/eclipse/papyrus/cdo/uml/search/ui/tests/SearchScopingTest.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.search.ui.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Collections;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.cdo.uml.search.internal.ui.query.CDOSearchQueryProvider;
+import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
+import org.eclipse.papyrus.uml.search.ui.query.QueryInfo;
+import org.junit.Test;
+
+import com.google.common.base.Objects;
+import com.google.common.base.Predicate;
+
+
+/**
+ * This is the BasicTextSearchTest.java type. Enjoy.
+ */
+public class SearchScopingTest extends AbstractPapyrusCDOSearchTest {
+
+ public SearchScopingTest() {
+ super();
+ }
+
+ @Test
+ public void testCanProvideFor() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+ assertThat(provider.canProvideFor(getRepositoryURI()), is(true));
+ assertThat(provider.canProvideFor(getTestFolderURI()), is(true));
+ assertThat(provider.canProvideFor(URI.createPlatformResourceURI("/GarageModel/garage.uml", true)), is(false));
+ }
+
+ @Test
+ public void testSearchWholeFolder() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+ QueryInfo info = new QueryInfo("close", false, false, false, Collections.singleton(getTestFolderURI()));
+
+ AbstractPapyrusQuery query = provider.createSimpleSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatchedAny(query.getSearchResult(), resourceName("garage"));
+ assertMatchedAny(query.getSearchResult(), resourceName("tracker"));
+ }
+
+ @Test
+ public void testSearchModel() {
+ CDOSearchQueryProvider provider = new CDOSearchQueryProvider();
+
+ QueryInfo info = new QueryInfo("close", false, false, false, //
+ // trim the trailing empty segment of the folder URI to avoid getting a double separator ("//")
+ Collections.singleton(getTestFolderURI().trimSegments(1).appendSegment("GarageModel").appendSegment("garage.uml")));
+
+ AbstractPapyrusQuery query = provider.createSimpleSearchQuery(info);
+ query.run(new NullProgressMonitor());
+
+ assertMatched(query.getSearchResult(), resourceName("garage"));
+ assertNotMatched(query.getSearchResult(), resourceName("tracker"));
+ }
+
+ //
+ // Test framework
+ //
+
+ protected Predicate<EObject> resourceName(final String name) {
+ return new Predicate<EObject>() {
+
+ @Override
+ public boolean apply(EObject input) {
+ Resource resource = input.eResource();
+ return Objects.equal(resource.getURI().trimFileExtension().lastSegment(), name);
+ }
+ };
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.classpath b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.project b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.project
new file mode 100755
index 00000000..8b3ee709
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.uml.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/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.settings/org.eclipse.jdt.core.prefs b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..e82ec2bb
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,294 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.settings/org.eclipse.jdt.ui.prefs b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..e852f75f
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Require-Bundle: org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.cdo.core.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.uml.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
+ org.eclipse.ui;bundle-version="3.100.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.cdo.ui;bundle-version="1.2.0",
+ org.eclipse.emf.cdo.server.ocl;bundle-version="4.2.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.cdo.uml.internal.ui.importsources.tests;x-internal:=true,
+ org.eclipse.papyrus.cdo.uml.ui.tests
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.uml.ui.tests
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/Papyrus CDO UML UI Tests.launch b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/Papyrus CDO UML UI Tests.launch
new file mode 100755
index 00000000..83405b77
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/Papyrus CDO UML UI Tests.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/ui/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.cdo.uml.ui.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.cdo.uml.ui.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts&#10;-XX:MaxPermSize=256m -Xms80m -Xmx2048m&#10;-Xdock:icon=../Resources/Eclipse.icns -Dorg.eclipse.swt.internal.carbon.smallFonts"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/about.html b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/build.properties b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/build.properties
new file mode 100755
index 00000000..19577a08
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2017 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/plugin.properties b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/plugin.properties
new file mode 100755
index 00000000..af321a96
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+pluginName = Papyrus CDO UML UI Tests (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Automated tests for the CDO Integration UML-specific user interface extensions. \ No newline at end of file
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/pom.xml b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/pom.xml
new file mode 100755
index 00000000..e240d172
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.uml.ui.tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/internal/ui/importsources/tests/CDOPackageImportSourceTest.java b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/internal/ui/importsources/tests/CDOPackageImportSourceTest.java
new file mode 100755
index 00000000..77465543
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/internal/ui/importsources/tests/CDOPackageImportSourceTest.java
@@ -0,0 +1,185 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Eike Stepper (CEA) - bug 466520
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.internal.ui.importsources.tests;
+
+import static java.util.Collections.singleton;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIModel;
+import org.eclipse.papyrus.cdo.internal.ui.views.DIResourceQuery;
+import org.eclipse.papyrus.cdo.ui.tests.AbstractPapyrusCDOUITest;
+import org.eclipse.papyrus.cdo.uml.internal.ui.importsources.CDOPackageImportSource;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.SashModel;
+import org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * This is the CDOPackageImportSourceTest type. Enjoy.
+ */
+public class CDOPackageImportSourceTest extends AbstractPapyrusCDOUITest {
+
+ private TestFixture fixture;
+
+ private Model model;
+
+ private SashWindowsMngr diModel;
+
+ @Test
+ public void testCanImportInto() {
+ assertThat(fixture.canImportInto(singleton(model)), is(true));
+ assertThat(fixture.canImportInto(singleton(model.getOwnedTypes().get(0))), is(false));
+ }
+
+ @Test
+ public void testCreateModelHierarchyLabelProvider() {
+ ILabelProvider provider = fixture.getModelHierarchyLabelProvider();
+
+ assertThat(provider, notNullValue());
+
+ DIModel model = getDIModel();
+
+ assertThat(provider.getText(model), containsString("model"));
+ assertThat(provider.getImage(model), notNullValue());
+ }
+
+ @Test
+ public void testCreateModelHierarchyContentProvider() throws InterruptedException {
+ IStaticContentProvider provider = fixture.getModelHierarchyContentProvider(null);
+
+ assertThat(provider, instanceOf(ITreeContentProvider.class));
+
+ DIModel model = getDIModel();
+ CDOResourceFolder folder = model.getResource().getFolder();
+
+ ITreeContentProvider treeContent = (ITreeContentProvider) provider;
+
+ // trigger the asynchronous DIResourceQuery and wait for it to finish
+ treeContent.getChildren(getInternalCheckout());
+ DIResourceQuery.waitFor(getInternalCheckout().getView(), 10, TimeUnit.SECONDS);
+
+ Object[] children = treeContent.getChildren(folder);
+ assertThat(Arrays.asList(children), hasItem((Object) model));
+ assertThat(treeContent.getParent(model), sameInstance((Object) model.getResource().getFolder()));
+ assertThat(treeContent.hasChildren(model.getResource().getFolder()), is(true));
+ }
+
+ @Test
+ public void testGetPackages() throws Exception {
+ DIModel diModel = getDIModel();
+
+ List<Package> packages = fixture.getPackages(diModel.getResource().getResourceSet(), diModel);
+
+ // get the copy of our model in the master view
+ Package modelInMasterView = getMasterViewObject(model);
+ assertThat(packages, hasItem(modelInMasterView));
+ }
+
+ @Test
+ public void testValidateSelection() {
+ DIModel diModel = getDIModel();
+
+ try {
+ fixture.validateSelection(diModel);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Should not have thrown validation exception: " + e.getLocalizedMessage());
+ }
+
+ try {
+ fixture.validateSelection(diModel.getResource().getFolder());
+ fail("Should have thrown validation exception.");
+ } catch (CoreException e) {
+ // test passes
+ }
+ }
+
+ @Test
+ public void testGetCDOResource() {
+ DIModel diModel = getDIModel();
+
+ assertThat(fixture.getCDOResource(diModel), sameInstance(diModel.getResource()));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createTestFixture() throws Exception {
+ openEditor();
+ model = (Model) getUMLModel();
+
+ fixture = new TestFixture();
+ fixture.initialize(singleton(model));
+
+ ModelSet modelSet = (ModelSet) model.eResource().getResourceSet();
+ diModel = (SashWindowsMngr) EcoreUtil.getObjectByType(((AbstractBaseModel) modelSet.getModel(SashModel.MODEL_ID)).getResource().getContents(), DiPackage.Literals.SASH_WINDOWS_MNGR);
+ }
+
+ @After
+ public void disposeTestFixture() {
+ fixture.dispose();
+ }
+
+ protected DIModel getDIModel() {
+ // get the resource in the read-only view that corresponds to our DI model
+ CDOResource resource = getMasterViewObject((CDOResource) diModel.eResource());
+
+ return DIModel.getInstance(resource, true);
+ }
+
+ static class TestFixture extends CDOPackageImportSource {
+
+ TestFixture() {
+ super();
+ }
+
+ @Override
+ protected CDOResource getCDOResource(Object model) {
+ return super.getCDOResource(model);
+ }
+
+ @Override
+ protected void validateSelection(Object model) throws CoreException {
+ super.validateSelection(model);
+ }
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/ui/tests/AllTests.java b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/ui/tests/AllTests.java
new file mode 100755
index 00000000..b705de31
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.uml.ui.tests/src/org/eclipse/papyrus/cdo/uml/ui/tests/AllTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.uml.ui.tests;
+
+import org.eclipse.papyrus.cdo.uml.internal.ui.importsources.tests.CDOPackageImportSourceTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * This is the AllTests type. Enjoy.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ CDOPackageImportSourceTest.class })
+public class AllTests {
+
+ public AllTests() {
+ super();
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.classpath b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.classpath
new file mode 100755
index 00000000..ad32c83a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.project b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.project
new file mode 100755
index 00000000..838ed026
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.cdo.validation.problems.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.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.settings/org.eclipse.jdt.core.prefs b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..e82ec2bb
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,294 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.settings/org.eclipse.jdt.ui.prefs b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 00000000..3f09e0ff
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..31ae0c03
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.cdo.validation.problems.edit.tests,
+ org.eclipse.papyrus.cdo.validation.problems.tests,
+ org.eclipse.papyrus.cdo.validation.problems.util.tests
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.8.0,
+ 4.0.0)",
+ org.eclipse.papyrus.cdo.validation.problems;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.papyrus.cdo.validation.problems.edit;bundle-version="1.2.0",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.8.0,
+ 3.0.0)";visibility:=reexport,
+ org.junit;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;bundle-version="[2.8.0,
+ 3.0.0)",
+ org.eclipse.papyrus.cdo.core.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.validation.problems.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/about.html b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/about.html
new file mode 100755
index 00000000..997c5a22
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/build.properties b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/build.properties
new file mode 100755
index 00000000..b672bb2f
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/build.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+
+bin.includes = .,\
+ META-INF/,\
+ plugin.properties,\
+ about.html
+src.includes = about.html
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/plugin.properties b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/plugin.properties
new file mode 100755
index 00000000..96872810
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+###############################################################################
+
+
+pluginName = Papyrus CDO Model Repository Problems Model Tests (Incubation)
+providerName = Eclipse Modeling Project
+
+pluginDescription=Automated tests for the CDO model validation problems model. \ No newline at end of file
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/pom.xml b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/pom.xml
new file mode 100755
index 00000000..4fd80642
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo-tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo.validation.problems.tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/edit/tests/AllProblemsEditTests.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/edit/tests/AllProblemsEditTests.java
new file mode 100755
index 00000000..f6b101a1
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/edit/tests/AllProblemsEditTests.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.edit.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.cdo.validation.problems.tests.ProblemsAllTests;
+
+/**
+ * Test suite for the Problems Edit API.
+ */
+public class AllProblemsEditTests
+ extends TestSuite {
+
+ public AllProblemsEditTests(String name) {
+ super(name);
+ }
+
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite() {
+ TestSuite suite = new ProblemsAllTests("Problems Edit Tests"); //$NON-NLS-1$
+ suite.addTest(ProblemEditUtilTest.suite());
+ return suite;
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/edit/tests/ProblemEditUtilTest.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/edit/tests/ProblemEditUtilTest.java
new file mode 100755
index 00000000..45fb21f0
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/edit/tests/ProblemEditUtilTest.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.edit.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+import org.eclipse.papyrus.cdo.validation.problems.edit.ProblemEditUtil;
+import org.eclipse.papyrus.cdo.validation.problems.provider.ProblemsItemProviderAdapterFactory;
+
+/**
+ * Test suite for the {@link ProblemEditUtil} class.
+ */
+public class ProblemEditUtilTest
+ extends TestCase {
+
+ public ProblemEditUtilTest(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ return new TestSuite(ProblemEditUtilTest.class, "ProblemEditUtil tests");
+ }
+
+ public void testDefaultProblemType() {
+ ProblemEditUtil util = new ProblemEditUtil(
+ new EcoreItemProviderAdapterFactory());
+
+ EProblem problem = ProblemsFactory.eINSTANCE.createEProblem();
+ problem.setElement(problem); // Oo! a meta-problem
+
+ assertEquals(ProblemsPackage.eNAME, util.getProblemType(problem));
+ }
+
+ public void testDefaultProblemType_nullElement() {
+ ProblemEditUtil util = new ProblemEditUtil(
+ new EcoreItemProviderAdapterFactory());
+
+ EProblem problem = ProblemsFactory.eINSTANCE.createEProblem();
+ // no element
+
+ assertNull(util.getProblemType(problem));
+ }
+
+ public void testProblemTypeProvider() {
+ ProblemEditUtil util = new ProblemEditUtil(new ComposedAdapterFactory(
+ new AdapterFactory[]{new ProblemsItemProviderAdapterFactory(), //
+ new EcoreItemProviderAdapterFactory() //
+ }));
+
+ EProblem problem = ProblemsFactory.eINSTANCE.createEProblem();
+ problem.setElement(problem); // Oo! a meta-problem
+
+ assertEquals("Papyrus Problem", util.getProblemType(problem));
+ }
+
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java
new file mode 100755
index 00000000..ea79dcd6
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java
@@ -0,0 +1,102 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.tests;
+
+import java.util.Map;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test case for the model object '<em><b>Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AttributeTest extends TestCase {
+
+ /**
+ * The fixture for this Attribute test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map.Entry<String, String> fixture = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(AttributeTest.class);
+ }
+
+ /**
+ * Constructs a new Attribute test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AttributeTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Sets the fixture for this Attribute test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void setFixture(Map.Entry<String, String> fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * Returns the fixture for this Attribute test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map.Entry<String, String> getFixture() {
+ return fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void setUp() throws Exception {
+ setFixture((Map.Entry<String, String>)ProblemsFactory.eINSTANCE.create(ProblemsPackage.Literals.ATTRIBUTE));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} //AttributeTest
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/EProblemTest.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/EProblemTest.java
new file mode 100755
index 00000000..95c6d0cf
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/EProblemTest.java
@@ -0,0 +1,156 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.tests;
+
+import static org.junit.Assert.assertArrayEquals;
+
+import java.util.Arrays;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '
+ * <em><b>EProblem</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following operations are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblem#toDiagnostic() <em>To Diagnostic</em>}</li>
+ * </ul>
+ * </p>
+ * @generated
+ */
+public class EProblemTest extends TestCase {
+
+ protected static ESeverity SEVERITY = ESeverity.ERROR;
+
+ protected static String SOURCE = "org.eclipse.papyrus.cdo.validation.problems.tests";
+
+ protected static String MESSAGE = "This is a test.";
+
+ protected static int CODE = 42;
+
+ protected static EObject ELEMENT = ProblemsPackage.eINSTANCE;
+
+ protected static EObject RELATED1 = ProblemsPackage.Literals.EPROBLEM;
+
+ protected static EObject RELATED2 = ProblemsPackage.Literals.EDIAGNOSTIC;
+
+ /**
+ * The fixture for this EProblem test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ */
+ protected EProblem fixture = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(EProblemTest.class);
+ }
+
+ /**
+ * Constructs a new EProblem test case with the given name. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EProblemTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Sets the fixture for this EProblem test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void setFixture(EProblem fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * Returns the fixture for this EProblem test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EProblem getFixture() {
+ return fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ProblemsFactory.eINSTANCE.createEProblem());
+
+ getFixture().setSeverity(SEVERITY);
+ getFixture().setSource(SOURCE);
+ getFixture().setCode(CODE);
+ getFixture().setMessage(MESSAGE);
+ getFixture().setElement(ELEMENT);
+ getFixture().getRelated().addAll(Arrays.asList(RELATED1, RELATED2));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '
+ * {@link org.eclipse.papyrus.cdo.validation.problems.EProblem#toDiagnostic()
+ * <em>To Diagnostic</em>}' operation. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblem#toDiagnostic()
+ * @generated NOT
+ */
+ public void testToDiagnostic() {
+ Diagnostic diag = getFixture().toDiagnostic();
+
+ assertDiagnostic(diag, MESSAGE, new Object[]{ ELEMENT, RELATED1, RELATED2 });
+ }
+
+ static void assertDiagnostic(Diagnostic diag, String message, Object... data) {
+ assertEquals(Diagnostic.ERROR, diag.getSeverity());
+ assertEquals(SOURCE, diag.getSource());
+ assertEquals(CODE, diag.getCode());
+ assertEquals(message, diag.getMessage());
+ assertNotNull(diag.getData());
+ assertArrayEquals(data, diag.getData().toArray());
+ assertNull(diag.getException());
+ assertTrue(diag.getChildren().isEmpty());
+ }
+} // EProblemTest
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/EProblemsContainerTest.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/EProblemsContainerTest.java
new file mode 100755
index 00000000..ce60a1b4
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/EProblemsContainerTest.java
@@ -0,0 +1,242 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.tests;
+
+import static org.junit.Assert.assertArrayEquals;
+
+import java.util.Arrays;
+import java.util.Iterator;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '
+ * <em><b>EProblems Container</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following operations are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems() <em>All Problems</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems(org.eclipse.emf.ecore.EObject) <em>All Problems</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics() <em>All Diagnostics</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics(org.eclipse.emf.ecore.EObject) <em>All Diagnostics</em>}</li>
+ * <li>{@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getWorstProblem(org.eclipse.emf.ecore.EObject) <em>Get Worst Problem</em>}</li>
+ * </ul>
+ * </p>
+ * @generated
+ */
+public class EProblemsContainerTest extends TestCase {
+
+ /**
+ * The fixture for this EProblems Container test case.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected EProblemsContainer fixture = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(EProblemsContainerTest.class);
+ }
+
+ /**
+ * Constructs a new EProblems Container test case with the given name. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EProblemsContainerTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Sets the fixture for this EProblems Container test case. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(EProblemsContainer fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * Returns the fixture for this EProblems Container test case. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EProblemsContainer getFixture() {
+ return fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Override
+ protected void setUp() throws Exception {
+ EProblemsContainer root = ProblemsFactory.eINSTANCE.createEProblemsContainer();
+ root.getProblems().add(createProblem(EProblemTest.ELEMENT, "root"));
+
+ EProblemsContainer level1 = ProblemsFactory.eINSTANCE.createEProblemsContainer();
+ root.getSubcontainers().add(level1);
+ level1.getProblems().add(createProblem(EProblemTest.RELATED1, "a"));
+ level1.getProblems().add(createProblem(EProblemTest.RELATED2, "b"));
+
+ EProblemsContainer level2 = ProblemsFactory.eINSTANCE.createEProblemsContainer();
+ level1.getSubcontainers().add(level2);
+ level1.getProblems().add(createProblem(EProblemTest.RELATED2, "c"));
+ level1.getProblems().add(createProblem(EProblemTest.RELATED1, "d"));
+
+ setFixture(root);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '
+ * {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems()
+ * <em>All Problems</em>}' operation. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems()
+ * @generated NOT
+ */
+ public void testAllProblems() {
+ final Iterator<String> messages = Arrays.asList("root", "a", "b", "c", "d").iterator();
+ final Iterator<EObject> elements = Arrays.asList(EProblemTest.ELEMENT, EProblemTest.RELATED1, EProblemTest.RELATED2, EProblemTest.RELATED2, EProblemTest.RELATED1).iterator();
+
+ for(Iterator<EProblem> allProblems = getFixture().allProblems(); allProblems.hasNext();) {
+ assertProblem(allProblems.next(), messages.next(), elements.next());
+ }
+ }
+
+ /**
+ * Tests the '
+ * {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems(org.eclipse.emf.ecore.EObject)
+ * <em>All Problems</em>}' operation. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allProblems(org.eclipse.emf.ecore.EObject)
+ * @generated NOT
+ */
+ public void testAllProblems__EObject() {
+ final Iterator<String> messages = Arrays.asList("b", "c").iterator();
+ final Iterator<EObject> elements = Arrays.asList(EProblemTest.RELATED2, EProblemTest.RELATED2).iterator();
+
+ for(Iterator<EProblem> allProblems = getFixture().allProblems(EProblemTest.RELATED2); allProblems.hasNext();) {
+ assertProblem(allProblems.next(), messages.next(), elements.next());
+ }
+ }
+
+ /**
+ * Tests the '
+ * {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics()
+ * <em>All Diagnostics</em>}' operation. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics()
+ * @generated NOT
+ */
+ public void testAllDiagnostics() {
+ final Iterator<String> messages = Arrays.asList("root", "a", "b", "c", "d").iterator();
+ final Iterator<EObject> elements = Arrays.asList(EProblemTest.ELEMENT, EProblemTest.RELATED1, EProblemTest.RELATED2, EProblemTest.RELATED2, EProblemTest.RELATED1).iterator();
+
+ for(Diagnostic diag : getFixture().allDiagnostics()) {
+ EProblemTest.assertDiagnostic(diag, messages.next(), elements.next());
+ }
+ }
+
+ /**
+ * Tests the '
+ * {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics(org.eclipse.emf.ecore.EObject)
+ * <em>All Diagnostics</em>}' operation. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#allDiagnostics(org.eclipse.emf.ecore.EObject)
+ * @generated NOT
+ */
+ public void testAllDiagnostics__EObject() {
+ final Iterator<String> messages = Arrays.asList("a", "d").iterator();
+ final Iterator<EObject> elements = Arrays.asList(EProblemTest.RELATED1, EProblemTest.RELATED1).iterator();
+
+ for(Diagnostic diag : getFixture().allDiagnostics(EProblemTest.RELATED1)) {
+ EProblemTest.assertDiagnostic(diag, messages.next(), elements.next());
+ }
+ }
+
+ /**
+ * Tests the '
+ * {@link org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getWorstProblem(org.eclipse.emf.ecore.EObject)
+ * <em>Get Worst Problem</em>}' operation. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.cdo.validation.problems.EProblemsContainer#getWorstProblem(org.eclipse.emf.ecore.EObject)
+ * @generated NOT
+ */
+ public void testGetWorstProblem__EObject() {
+ // change severities in the fixture
+ Iterator<ESeverity> severities = Arrays.asList(ESeverity.INFO, ESeverity.WARNING).iterator();
+ for(Iterator<EProblem> problems = getFixture().allProblems(EProblemTest.RELATED1); problems.hasNext();) {
+ problems.next().setSeverity(severities.next());
+ }
+
+ assertSame(ESeverity.WARNING, getFixture().getWorstProblem(EProblemTest.RELATED1).getSeverity());
+ assertSame(ESeverity.ERROR, getFixture().getWorstProblem(EProblemTest.ELEMENT).getSeverity());
+ assertNull(getFixture().getWorstProblem(EcorePackage.eINSTANCE));
+ }
+
+ protected EProblem createProblem(EObject element, String message) {
+ EProblem result = ProblemsFactory.eINSTANCE.createEProblem();
+
+ result.setSeverity(EProblemTest.SEVERITY);
+ result.setSource(EProblemTest.SOURCE);
+ result.setCode(EProblemTest.CODE);
+ result.setMessage(message);
+ result.setElement(element);
+
+ return result;
+ }
+
+ static void assertProblem(EProblem problem, String message, EObject element, EObject... related) {
+ assertSame(ESeverity.ERROR, problem.getSeverity());
+ assertEquals(EProblemTest.SOURCE, problem.getSource());
+ assertEquals(EProblemTest.CODE, problem.getCode());
+ assertEquals(message, problem.getMessage());
+ assertSame(element, problem.getElement());
+ assertArrayEquals(related, problem.getRelated().toArray());
+ }
+} // EProblemsContainerTest
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/ProblemsAllTests.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/ProblemsAllTests.java
new file mode 100755
index 00000000..9517850c
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/ProblemsAllTests.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.tests;
+
+import junit.framework.JUnit4TestAdapter;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.papyrus.cdo.validation.problems.edit.tests.AllProblemsEditTests;
+import org.eclipse.papyrus.cdo.validation.problems.util.tests.AllUtilTests;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>Problems</b></em>'
+ * model. <!-- end-user-doc -->
+ * @generated
+ */
+public class ProblemsAllTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public static Test suite() {
+ TestSuite suite = new ProblemsAllTests("Problems Tests"); //$NON-NLS-1$
+ suite.addTest(ProblemsTests.suite());
+
+ if(EMFPlugin.IS_ECLIPSE_RUNNING) {
+ suite.addTest(new JUnit4TestAdapter(AllUtilTests.class));
+ }
+
+ suite.addTest(AllProblemsEditTests.suite());
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ProblemsAllTests(String name) {
+ super(name);
+ }
+
+} // ProblemsAllTests
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/ProblemsTests.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/ProblemsTests.java
new file mode 100755
index 00000000..f0ba9099
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/ProblemsTests.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.cdo.validation.problems.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>problems</b></em>'
+ * package. <!-- end-user-doc -->
+ * @generated
+ */
+public class ProblemsTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public static Test suite() {
+ TestSuite suite = new ProblemsTests("problems Tests"); //$NON-NLS-1$
+ suite.addTestSuite(EProblemTest.class);
+ suite.addTestSuite(EProblemsContainerTest.class);
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ProblemsTests(String name) {
+ super(name);
+ }
+
+} // ProblemsTests
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/util/tests/AllUtilTests.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/util/tests/AllUtilTests.java
new file mode 100755
index 00000000..0cf768cf
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/util/tests/AllUtilTests.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.util.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * Test suite for the Problems Model utilities.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ProblemsManagerTest.class})
+public class AllUtilTests {
+
+ public AllUtilTests() {
+ super();
+ }
+}
diff --git a/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/util/tests/ProblemsManagerTest.java b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/util/tests/ProblemsManagerTest.java
new file mode 100755
index 00000000..9e41594a
--- /dev/null
+++ b/cdo/tests/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/util/tests/ProblemsManagerTest.java
@@ -0,0 +1,553 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2017 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 460716
+ *****************************************************************************/
+package org.eclipse.papyrus.cdo.validation.problems.util.tests;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.impl.EValidatorRegistryImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.cdo.core.tests.AbstractPapyrusCDOTest;
+import org.eclipse.papyrus.cdo.validation.problems.EProblem;
+import org.eclipse.papyrus.cdo.validation.problems.ESeverity;
+import org.eclipse.papyrus.cdo.validation.problems.ProblemsPackage;
+import org.eclipse.papyrus.cdo.validation.problems.util.ProblemsManager;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.resource.UMLResource;
+import org.eclipse.uml2.uml.util.UMLValidator;
+import org.junit.After;
+import org.junit.Test;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+
+/**
+ * Tests suite for the {@link ProblemsManager} API.
+ */
+public class ProblemsManagerTest
+ extends AbstractPapyrusCDOTest {
+
+ private Set<ProblemsManager> managers = new java.util.HashSet<ProblemsManager>();
+
+ @Test
+ public void getProblemsAdapter() {
+ CDOTransaction transaction = createTransaction();
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+
+ // doesn't create a new instance
+ assertThat(mgr,
+ sameInstance(ProblemsManager.getProblemsManager(transaction
+ .getResourceSet())));
+ }
+
+ @Test
+ public void allProblems() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ createTestModel(resource);
+ final int expectedProblems = computeExpectedProblemsCount();
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ Collection<EProblem> allProblems = collect(mgr.getAllProblems());
+ assertThat(allProblems.size(), equalTo(expectedProblems));
+ assertIndistinguishableMembersProblem(resource, allProblems);
+ assertGeneralCompatibilityProblem(resource, allProblems);
+ assertUnownedElementProblem(resource, allProblems);
+ }
+
+ @Test
+ public void allProblems_EObject_noCrossReferencer() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ createTestModel(resource);
+ final int expectedProblems = computeExpectedProblemsCount(getClass2());
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ Collection<EProblem> problems = collect(mgr
+ .getAllProblems(getClass2(resource)));
+ assertThat(problems.size(), equalTo(expectedProblems));
+ assertIndistinguishableMembersProblem(resource, problems);
+ assertGeneralCompatibilityProblem(resource, problems);
+ }
+
+ @Test
+ public void allProblems_EObject_crossReferencer() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ // attach a cross-reference adapter
+ transaction.getResourceSet().eAdapters()
+ .add(new ECrossReferenceAdapter());
+
+ createTestModel(resource);
+ final int expectedProblems = computeExpectedProblemsCount(getClass2());
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ Collection<EProblem> problems = collect(mgr
+ .getAllProblems(getClass2(resource)));
+ assertThat(problems.size(), equalTo(expectedProblems));
+ assertIndistinguishableMembersProblem(resource, problems);
+ assertGeneralCompatibilityProblem(resource, problems);
+ }
+
+ @Test
+ public void purgeAll_noCrossReferencer() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ createTestModel(resource);
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ mgr.purgeAllProblems();
+
+ assertThat(mgr.getAllProblems().hasNext(), is(false));
+ }
+
+ @Test
+ public void purgeAll_crossReferencer() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ // attach a cross-reference adapter
+ transaction.getResourceSet().eAdapters()
+ .add(new ECrossReferenceAdapter());
+
+ createTestModel(resource);
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ mgr.purgeAllProblems();
+
+ assertThat(mgr.getAllProblems().hasNext(), is(false));
+ }
+
+ @Test
+ public void purge_noCrossReferencer() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ createTestModel(resource);
+ final int expectedTotalProblems = computeExpectedProblemsCount();
+ final int expectedClass3Problems = computeExpectedProblemsCount(getClass3());
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ mgr.purgeProblems(getClass3(resource));
+
+ Collection<EProblem> problems = collect(mgr.getAllProblems());
+ assertThat(problems.size(), equalTo(expectedTotalProblems - expectedClass3Problems));
+ assertIndistinguishableMembersProblem(resource, problems);
+ assertGeneralCompatibilityProblem(resource, problems);
+ }
+
+ @Test
+ public void purge_crossReferencer() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ // attach a cross-reference adapter
+ transaction.getResourceSet().eAdapters()
+ .add(new ECrossReferenceAdapter());
+
+ createTestModel(resource);
+ final int expectedTotalProblems = computeExpectedProblemsCount();
+ final int expectedClass3Problems = computeExpectedProblemsCount(getClass3());
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ mgr.purgeProblems(getClass3(resource));
+
+ Collection<EProblem> problems = collect(mgr.getAllProblems());
+ assertThat(problems.size(), equalTo(expectedTotalProblems - expectedClass3Problems));
+ assertIndistinguishableMembersProblem(resource, problems);
+ assertGeneralCompatibilityProblem(resource, problems);
+ }
+
+ @Test
+ public void disposeProblemsManager()
+ throws Exception {
+
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ // attach a cross-reference adapter
+ ECrossReferenceAdapter xrefs = new ECrossReferenceAdapter();
+ transaction.getResourceSet().eAdapters().add(xrefs);
+
+ createTestModel(resource);
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ // gather weak references to the problems
+ ReferenceQueue<EProblem> queue = new ReferenceQueue<EProblem>();
+ List<Reference<EProblem>> references = new java.util.ArrayList<Reference<EProblem>>(
+ 3);
+ for (Iterator<EProblem> iter = mgr.getAllProblems(); iter.hasNext();) {
+ references.add(new WeakReference<EProblem>(iter.next(), queue));
+ }
+
+ mgr.dispose();
+
+ // try to force GC
+ for (int i = 0; i < 10; i++) {
+ System.gc();
+ }
+
+ // assert that the problems are unreachable
+ for (int i = 0; i < 3; i++) {
+ Reference<? extends EProblem> ref = queue.remove(1000);
+ assertThat(ref, notNullValue());
+ }
+ }
+
+ @Test
+ public void dispose_crossReferencerAddedAfter()
+ throws Exception {
+
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ createTestModel(resource);
+
+ ProblemsManager mgr = getProblemsManager(transaction);
+ mgr.addDiagnostic(validate(resource));
+
+ // attach a cross-reference adapter *after* adding problems
+ ECrossReferenceAdapter xrefs = new ECrossReferenceAdapter();
+ transaction.getResourceSet().eAdapters().add(xrefs);
+
+ // gather weak references to the problems
+ ReferenceQueue<EProblem> queue = new ReferenceQueue<EProblem>();
+ List<Reference<EProblem>> references = new java.util.ArrayList<Reference<EProblem>>(
+ 3);
+ for (Iterator<EProblem> iter = mgr.getAllProblems(); iter.hasNext();) {
+ references.add(new WeakReference<EProblem>(iter.next(), queue));
+ }
+
+ mgr.dispose();
+
+ // try to force GC
+ for (int i = 0; i < 10; i++) {
+ System.gc();
+ }
+
+ // assert that the problems are unreachable
+ for (int i = 0; i < 3; i++) {
+ Reference<? extends EProblem> ref = queue.remove(1000);
+ assertThat(ref, notNullValue());
+ }
+ }
+
+ @Test
+ public void customProblemClass() {
+ CDOTransaction transaction = createTransaction();
+ CDOResource resource = transaction
+ .createResource(getResourcePath("/resource1"));
+
+ createTestModel(resource);
+ final int expectedProblems = computeExpectedProblemsCount();
+
+ // not actually a different class, but a different way of creating it
+ ProblemsManager mgr = ProblemsManager.createProblemsManager(
+ transaction.getResourceSet(), ProblemsPackage.Literals.EPROBLEM);
+ managers.add(mgr);
+ mgr.addDiagnostic(validate(resource));
+
+ Collection<EProblem> allProblems = collect(mgr.getAllProblems());
+ assertThat(allProblems.size(), equalTo(expectedProblems));
+ assertIndistinguishableMembersProblem(resource, allProblems);
+ assertGeneralCompatibilityProblem(resource, allProblems);
+ assertUnownedElementProblem(resource, allProblems);
+ }
+
+ //
+ // Test framework
+ //
+
+ @After
+ public void disposeProblemManagers()
+ throws Exception {
+
+ for (ProblemsManager next : managers) {
+ next.dispose();
+ }
+ }
+
+ void createTestModel(Resource res) {
+ Model model = UMLFactory.eINSTANCE.createModel();
+ model.setName("testmodel");
+ res.getContents().add(model);
+
+ Class class1 = model.createOwnedClass("Class1", false);
+
+ Interface interface1 = model.createOwnedInterface("Interface1");
+
+ Class class2 = model.createOwnedClass("Class2", false);
+ class2.createGeneralization(interface1); // invalid generalization
+ class2.createOwnedAttribute("attr1", class1);
+ class2.createOwnedAttribute("attr1", class1); // indistinguishable
+
+ Class class3 = UMLFactory.eINSTANCE.createClass();
+ class3.setName("Class3");
+ res.getContents().add(class3); // not owned
+ }
+
+ int computeExpectedProblemsCount() {
+ int result;
+
+ Resource resource = createScratchResource();
+
+ try {
+ Diagnostic diagnostic = validate(resource);
+ result = diagnostic.getChildren().size();
+ } finally {
+ unload(resource);
+ }
+
+ return result;
+ }
+
+ int computeExpectedProblemsCount(Function<Resource, ? extends EObject> pertainingTo) {
+ int result;
+
+ Resource resource = createScratchResource();
+ final EObject target = pertainingTo.apply(resource);
+
+ try {
+ Diagnostic diagnostic = validate(resource);
+ result = Iterables.size(Iterables.filter(diagnostic.getChildren(), new Predicate<Diagnostic>() {
+ @Override
+ public boolean apply(Diagnostic input) {
+ List<?> data = input.getData();
+ return (data != null) && !data.isEmpty() && (data.get(0) == target);
+ }
+ }));
+ } finally {
+ unload(resource);
+ }
+
+ return result;
+ }
+
+ Resource createScratchResource() {
+ Resource result = UMLResource.Factory.INSTANCE.createResource(URI.createURI("bogus://scratch.uml"));
+ createTestModel(result);
+ return result;
+ }
+
+ void unload(Resource resource) {
+ resource.unload();
+ if (resource.getResourceSet() != null) {
+ resource.getResourceSet().getResources().remove(resource);
+ }
+ resource.eAdapters().clear();
+ }
+
+ Model getModel(Resource resource) {
+ return (Model) EcoreUtil.getObjectByType(resource.getContents(),
+ UMLPackage.Literals.MODEL);
+ }
+
+ Class getClass1(Resource resource) {
+ return getClass1().apply(resource);
+ }
+
+ Function<Resource, Class> getClass1() {
+ return getNamedClass("Class1");
+ }
+
+ Function<Resource, Class> getNamedClass(final String name) {
+ return new Function<Resource, Class>() {
+ @Override
+ public Class apply(Resource input) {
+ return (Class) getModel(input).getOwnedType(name);
+ }
+ };
+ }
+
+ Class getClass2(Resource resource) {
+ return getClass2().apply(resource);
+ }
+
+ Function<Resource, Class> getClass2() {
+ return getNamedClass("Class2");
+ }
+
+ Class getClass3(Resource resource) {
+ return getClass3().apply(resource);
+ }
+
+ Function<Resource, Class> getClass3() {
+ return getRoot(Class.class);
+ }
+
+ <T extends EObject> Function<Resource, T> getRoot(final java.lang.Class<T> metaclass) {
+ return new Function<Resource, T>() {
+ @Override
+ public T apply(Resource input) {
+ return Iterables.getFirst(Iterables.filter(input.getContents(), metaclass), null);
+ }
+ };
+ }
+
+ Interface getInterface1(Resource resource) {
+ return (Interface) getModel(resource).getOwnedType("Interface1");
+ }
+
+ ProblemsManager getProblemsManager(CDOView view) {
+ return getProblemsManager(view.getResourceSet());
+ }
+
+ ProblemsManager getProblemsManager(ResourceSet resourceSet) {
+ ProblemsManager result = ProblemsManager
+ .getProblemsManager(resourceSet);
+ managers.add(result);
+ return result;
+ }
+
+ Diagnostic validate(Resource resource) {
+ EValidator.Registry registry = new EValidatorRegistryImpl(
+ EValidator.Registry.INSTANCE);
+ registry.put(UMLPackage.eINSTANCE, new UMLValidator());
+
+ BasicDiagnostic result = new BasicDiagnostic();
+ Diagnostician diagnostician = new Diagnostician(registry);
+
+ for (EObject next : resource.getContents()) {
+ diagnostician.validate(next, result);
+ }
+
+ return result;
+ }
+
+ Collection<EProblem> collect(Iterator<? extends EProblem> problems) {
+ Collection<EProblem> result = new java.util.ArrayList<EProblem>();
+
+ while (problems.hasNext()) {
+ result.add(problems.next());
+ }
+
+ return result;
+ }
+
+ void assertProblem(Collection<EProblem> problems, ESeverity severity,
+ String source, int code, String messagePattern, EObject element,
+ EObject... related) {
+
+ final List<EObject> relatedList = Arrays.asList(related);
+ final Pattern pattern = Pattern.compile(messagePattern);
+
+ EProblem found = null;
+ for (EProblem problem : problems) {
+ if (problem.getElement() == element //
+ && problem.getRelated().equals(relatedList) //
+ && problem.getSeverity() == severity //
+ && pattern.matcher(problem.getMessage()).find() //
+ && source.equals(problem.getSource()) //
+ && problem.getCode() == code) {
+ found = problem;
+ break;
+ }
+ }
+
+ assertThat(found, notNullValue());
+ }
+
+ void assertIndistinguishableMembersProblem(Resource resource,
+ Collection<EProblem> problems) {
+
+ Class class2 = getClass2(resource);
+
+ assertProblem(problems, ESeverity.WARNING,
+ UMLValidator.DIAGNOSTIC_SOURCE,
+ UMLValidator.NAMESPACE__MEMBERS_DISTINGUISHABLE, "disting", class2);
+ }
+
+ void assertGeneralCompatibilityProblem(Resource resource,
+ Collection<EProblem> problems) {
+
+ Class class2 = getClass2(resource);
+ Interface interface1 = getInterface1(resource);
+
+ assertProblem(problems, ESeverity.WARNING,
+ UMLValidator.DIAGNOSTIC_SOURCE,
+ UMLValidator.CLASSIFIER__SPECIALIZE_TYPE, "special", class2,
+ interface1);
+ }
+
+ void assertUnownedElementProblem(Resource resource,
+ Collection<EProblem> problems) {
+
+ Class class3 = getClass3(resource);
+
+ assertProblem(problems, ESeverity.WARNING,
+ UMLValidator.DIAGNOSTIC_SOURCE, UMLValidator.ELEMENT__HAS_OWNER,
+ "owned", class3);
+ }
+}
diff --git a/cdo/tests/pom.xml b/cdo/tests/pom.xml
new file mode 100755
index 00000000..22848016
--- /dev/null
+++ b/cdo/tests/pom.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Parent of this POM -->
+ <parent>
+ <groupId>org.eclipse.papyrus.cdo</groupId>
+ <artifactId>org.eclipse.papyrus.cdo.root</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Project POM -->
+ <artifactId>org.eclipse.papyrus.cdo-tests</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>org.eclipse.papyrus.cdo.core.tests</module>
+ <module>org.eclipse.papyrus.cdo.tests</module>
+ <module>org.eclipse.papyrus.cdo.ui.tests</module>
+ <module>org.eclipse.papyrus.cdo.uml.search.ui.tests</module>
+ <module>org.eclipse.papyrus.cdo.uml.ui.tests</module>
+ <module>org.eclipse.papyrus.cdo.validation.problems.tests</module>
+ </modules>
+
+</project> \ No newline at end of file

Back to the top