Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2015-03-06 14:32:28 +0000
committerBenoit Maggi2015-03-06 14:32:28 +0000
commit926f98e686079a91f8dffeb9bbbc6d4b4f39fe75 (patch)
tree26714ff178e4707b62cb7d2d0022b5e280b181ca
parent7e625965910374da4360f696be484e8242fe48cd (diff)
downloadorg.eclipse.papyrus-926f98e686079a91f8dffeb9bbbc6d4b4f39fe75.tar.gz
org.eclipse.papyrus-926f98e686079a91f8dffeb9bbbc6d4b4f39fe75.tar.xz
org.eclipse.papyrus-926f98e686079a91f8dffeb9bbbc6d4b4f39fe75.zip
Bug 461592 - [Team Collaborative] Archive the unmaintained projectsarchive/domainmodel
- remove : extraplugins\team.collaborative\org.eclipse.papyrus.team.collaborative.controlmode extraplugins\team.collaborative\org.eclipse.papyrus.team.collaborative.core extraplugins\team.collaborative\org.eclipse.papyrus.team.collaborative.strategy extraplugins\team.collaborative\org.eclipse.papyrus.team.collaborative.svn Change-Id: I1fa93f09722cc3b150f40418bb85cff9989961c1 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.classpath7
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.gitignore4
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.project28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/META-INF/MANIFEST.MF34
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/about.html28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/build.properties9
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/CreateCollabPartition_16x16.pngbin468 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/CreateCollabPartition_64x64.pngbin1055 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/PartialLock_16x16.pngbin332 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/ShowPartition_16x16.pngbin299 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/ShowPartition_64x64.pngbin737 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/plugin.properties12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/plugin.xml63
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/pom.xml12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabCustomization.uiCustom11
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabFacet.facetSet14
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabQueries.querySet12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/Activator.java83
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/commands/AddFileToCollabSVN.java147
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/commands/SaveCommand.java62
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/control/SVNControlModeParticipant.java133
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/handler/SVNCollabControlCommandHandler.java95
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/handler/ShowModelPartitionHandler.java49
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/queries/IsCollabQuery.java70
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/queries/IsPartialyLocked.java70
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/ui/CreateCollabModelFragmentDialog.java373
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/ui/IconsPath.java22
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.classpath7
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.gitignore3
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.project28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/META-INF/MANIFEST.MF28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/about.html28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/build.properties8
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/plugin.properties12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/plugin.xml6
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/pom.xml12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/schema/contribution.exsd151
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/Activator.java66
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ExtendedURI.java190
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ICollabFactory.java43
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ICollaborativeManager.java120
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/IExtendedURI.java53
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/impl/CollaborativeManager.java290
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/AbstractExtendedURIBuilder.java164
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/ICollabParticipant.java20
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/IExtendedURISuperSet.java46
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/locker/ILocker.java42
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/locker/IUnlocker.java42
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/ICommitter.java40
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IReverter.java33
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IUpdater.java99
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IWorkOnModifiedElementParticipant.java38
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/reports/CollabStatus.java94
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/reports/LogHelper.java162
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/strategy/AbstractLockingStrategy.java34
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/strategy/ILockingStrategy.java96
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/AbstractRunnableWithProgressWithResult.java33
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/CollabFunctionsFactory.java112
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/CollabUtils.java46
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ExtendedURIUtil.java72
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/IRunnableWithProgressWithResult.java32
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ModelsUtil.java363
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ResourceUtils.java83
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/URIUtils.java246
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/EObjectToExtendedURI.java63
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToEObjects.java66
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToIResource.java70
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToURI.java35
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java41
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IResourceToExtendedURI.java61
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ResourceToIFile.java62
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ResourceToURI.java61
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/URIToExtendedURI.java58
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/URIToExtendedURIWithContainment.java62
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.classpath7
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.gitignore3
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.project28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/META-INF/MANIFEST.MF38
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/about.html28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/build.properties8
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/TeamIcon.pngbin726 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/commit.gifbin222 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/lock.gifbin334 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/revert.gifbin150 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/unlock.gifbin323 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/update.gifbin230 -> 0 bytes
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/plugin.properties12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/plugin.xml125
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/pom.xml12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/Activator.java66
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/IsCollabPropertyTest.java61
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/MatchingURIObject.java79
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/RefreshHelper.java182
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/security/CollabReadOnlyHandler.java97
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/security/PreCommitReadOnlyHandler.java151
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/AbstractResourceBaseStrategy.java43
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/PapyrusCurrentResource.java61
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/PapyrusSelectionAllContent.java83
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/ICollabColors.java30
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/AbstractCollabHandler.java55
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/CommitHandler.java155
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/LockAction.java164
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/RevertHandler.java141
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/UnlockAction.java181
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/UpdateHandler.java123
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/dialogs/CommitDialog.java135
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/dialogs/PreviewDialog.java281
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/items/LockStrategyItemProvider.java75
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/items/UnlockStrategyItemProvider.java74
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/providers/ExtensivePartitionNameLabelProvider.java221
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/utils/PapyrusResourceUtils.java40
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/utils/UIUtils.java292
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.classpath7
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.gitignore3
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.options2
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.project28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/META-INF/MANIFEST.MF26
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/about.html28
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/build.properties7
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/plugin.properties12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/plugin.xml14
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/pom.xml12
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/AbstractExtendedURIBuilderForFile.java76
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/Activator.java64
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/CollabResourceSelector.java92
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/SVNCollabFactory.java149
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/AbstractSVNCollab.java65
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/SVNLocker.java99
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/SVNUnlocker.java102
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/tracing/ITracingConstant.java39
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/tracing/Tracer.java108
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/CommitActionUtilityWithProperties.java60
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/SVNUtils.java100
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/SetPropertyActionNow.java181
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/AbstractSVNVersionController.java85
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNCommitter.java116
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNReverter.java70
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNUpdater.java175
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNWorkOnModifiedFile.java84
-rw-r--r--releng/top-pom-extras.xml4
143 files changed, 0 insertions, 9730 deletions
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.classpath b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.classpath
deleted file mode 100644
index ad32c83a788..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/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/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.gitignore b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.gitignore
deleted file mode 100644
index 58393d49a7e..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/bin
-/target
-*.class
-*.jar \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.project b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.project
deleted file mode 100644
index bf35fc8c879..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.team.collaborative.controlmode</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/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/META-INF/MANIFEST.MF b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/META-INF/MANIFEST.MF
deleted file mode 100644
index 4b13d93e03b..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,34 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.common.core,
- org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.4.0",
- org.eclipse.papyrus.editor;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
- org.eclipse.papyrus.team.collaborative.core;bundle-version="1.1.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.gmfdiag.modelexplorer;bundle-version="1.1.0",
- org.eclipse.ui.navigator;bundle-version="3.5.101",
- org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.1.2",
- org.eclipse.papyrus.team.collaborative.strategy;bundle-version="1.1.0",
- org.eclipse.papyrus.team.collaborative.svn;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.modelexplorer;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.team.svn.core;bundle-version="1.1.0",
- org.eclipse.emf.facet.infra.query.core,
- org.eclipse.emf.facet.infra.browser.custom,
- org.eclipse.emf.common.ui,
- org.eclipse.papyrus.views.modelexplorer;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Name: %pluginName
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.team.collaborative.core.integrat
- ion.papyrus.svn.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.team.collaborative.controlmod
- e;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/about.html b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/build.properties b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/build.properties
deleted file mode 100644
index 2ff844272c9..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- resources/,\
- plugin.properties
-src.includes = about.html
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/CreateCollabPartition_16x16.png b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/CreateCollabPartition_16x16.png
deleted file mode 100644
index 76686bdb88c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/CreateCollabPartition_16x16.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/CreateCollabPartition_64x64.png b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/CreateCollabPartition_64x64.png
deleted file mode 100644
index b48f3598ab9..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/CreateCollabPartition_64x64.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/PartialLock_16x16.png b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/PartialLock_16x16.png
deleted file mode 100644
index ad73fdf489d..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/PartialLock_16x16.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/ShowPartition_16x16.png b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/ShowPartition_16x16.png
deleted file mode 100644
index ac5f5b90e10..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/ShowPartition_16x16.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/ShowPartition_64x64.png b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/ShowPartition_64x64.png
deleted file mode 100644
index fc2d7869260..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/icons/ShowPartition_64x64.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/plugin.properties b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/plugin.properties
deleted file mode 100644
index 5661533277c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#/*****************************************************************************
-# * Copyright (c) 2014 Atos Origin.
-# *
-# *
-# * All rights reserved. This program and the accompanying materials
-# * are made available under the terms of the Eclipse Public License v1.0
-# * which accompanies this distribution, and is available at
-# * http://www.eclipse.org/legal/epl-v10.html
-# *
-# *****************************************************************************/
-pluginName = Collaborative Control Mode Integration
-providerName = Eclipse Modeling Project
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/plugin.xml b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/plugin.xml
deleted file mode 100644
index 71413675741..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/plugin.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.infra.services.controlmode.participant">
- <participant
- class="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.control.SVNControlModeParticipant">
- </participant>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.handler.SVNCollabControlCommandHandler"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.createcollaborative fragment"
- name="Create collaborative fragment">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.handler.ShowModelPartitionHandler"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.showModelPartition"
- name="Show model partition">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.team.collaborative.core.ui.collab.menu">
- <command
- commandId="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.createcollaborative fragment"
- icon="icons/CreateCollabPartition_16x16.png"
- label="Create partition"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="selection">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.infra.services.controlmode.isFragmentModel"
- value="false">
- </test>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.showModelPartition"
- icon="icons/ShowPartition_16x16.png"
- label="Show partition"
- style="push">
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization file="resources/CollabCustomization.uiCustom" loadByDefault="true"/>
- </extension>
- <extension point="org.eclipse.emf.facet.infra.query.registration">
- <modelqueryset file="resources/CollabQueries.querySet"/>
- </extension>
- <extension point="org.eclipse.emf.facet.infra.facet.registration">
- <facetset file="resources/CollabFacet.facetSet">
- </facetset>
- </extension>
-</plugin>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/pom.xml b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/pom.xml
deleted file mode 100644
index db990e3d7a4..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/pom.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.1.0-SNAPSHOT</version>
- <relativePath>../../../releng/top-pom-extras.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.papyrus.team.collaborative.controlmode</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabCustomization.uiCustom b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabCustomization.uiCustom
deleted file mode 100644
index ce9138838d6..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabCustomization.uiCustom
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://www.eclipse.org/collab">
- <types metaclassName="CollabFacet.CollabElement">
- <customizedFeatures customizedFeature="facetOverlayIcon">
- <valueCases>
- <value xsi:type="uicustom:StaticFeatureValue" value="/org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn/icons/PartialLock_16x16.png:TopRight"/>
- <condition xsi:type="query:JavaModelQuery" href="CollabQueries.querySet#IsPartialyLocked"/>
- </valueCases>
- </customizedFeatures>
- </types>
-</uicustom:MetamodelView>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabFacet.facetSet b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabFacet.facetSet
deleted file mode 100644
index b4ec037ab00..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabFacet.facetSet
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<facet:FacetSet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:facet="http://www.eclipse.org/EmfFacet/infra/facet/0.8.incubation"
- xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation"
- name="CollabFacet"
- nsURI="http://www.eclipse.org/collab"
- nsPrefix="collab">
- <eClassifiers xsi:type="facet:Facet" name="CollabElement" abstract="true">
- <eSuperTypes href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <conditionQuery xsi:type="query:JavaModelQuery" href="CollabQueries.querySet#IsCollabQuery"/>
- </eClassifiers>
- <extendedPackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
-</facet:FacetSet>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabQueries.querySet b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabQueries.querySet
deleted file mode 100644
index b6719c62b44..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/resources/CollabQueries.querySet
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<query:ModelQuerySet 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:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="CollabQueries">
- <associatedMetamodels href="http://www.eclipse.org/emf/2002/Ecore#/"/>
- <queries xsi:type="query:JavaModelQuery" name="IsCollabQuery" description="If the elemnt is a collab element" implementationClassName="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.queries.IsCollabQuery">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="IsPartialyLocked" description="Return true is at least one of the Nuplet of linked resource is locked" implementationClassName="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn.queries.IsPartialyLocked">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </queries>
-</query:ModelQuerySet>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/Activator.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/Activator.java
deleted file mode 100644
index 507eaf2fb16..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/Activator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-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.team.collaborative.core.integration.papyrus.svn"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- *
- * This method returns an <code>org.eclipse.swt.graphics.Image</code> identified by its pluginId and iconPath.<BR>
- */
- public static Image getPluginIconImage(String pluginId, String iconPath) {
- String key = pluginId + iconPath;
- ImageRegistry registry = getDefault().getImageRegistry();
- Image image = registry.get(key);
- if (image == null) {
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, iconPath);
- registry.put(key, desc);
- image = registry.get(key);
- }
- return image;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/commands/AddFileToCollabSVN.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/commands/AddFileToCollabSVN.java
deleted file mode 100644
index 676a03cefb2..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/commands/AddFileToCollabSVN.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.commands;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.actions.CommitHandler;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.actions.LockAction;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.papyrus.team.collaborative.svn.utils.SVNUtils;
-
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Sets;
-
-
-/**
- * The Class AddFileToCollabSVN.
- * This command is used to add file to a SVN repository using a {@link ControlModeRequest}.
- * The files shall be already serialized.
- */
-public class AddFileToCollabSVN extends AbstractTransactionalCommand {
-
- // private Collection<URI> uris;
- /** The request. */
- private ControlModeRequest request;
-
- /**
- * Instantiates a new adds the file to collab svn.
- *
- * @param domain
- * the domain
- * @param request
- * the request
- */
- public AddFileToCollabSVN(TransactionalEditingDomain domain, ControlModeRequest request) {
- super(domain, "Add fiel to collacb", null);
- this.request = request;
- }
-
- /**
- * Adds the source resource.
- *
- * @param extension
- * the extension
- * @param resources
- * the resources
- */
- protected void addSourceResource(String extension, Collection<Resource> resources) {
- Resource resource = request.getSourceResource(extension);
- if (resource != null) {
- resources.add(resource);
- }
- }
-
- /**
- * Adds the target resource.
- *
- * @param extension
- * the extension
- * @param resources
- * the resources
- */
- protected void addTargetResource(String extension, Collection<Resource> resources) {
- Resource resource = request.getTargetResource(extension);
- if (resource != null) {
- resources.add(resource);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
- * org.eclipse.core.runtime.IAdaptable)
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- /*
- * This part should be more generic
- */
- Set<Resource> targetResource = new HashSet<Resource>();
- addTargetResource("uml", targetResource);
- addTargetResource("di", targetResource);
- addTargetResource("notation", targetResource);
- Set<Resource> sourceResource = new HashSet<Resource>();
- addSourceResource("uml", sourceResource);
- addSourceResource("di", sourceResource);
- addSourceResource("notation", sourceResource);
-
- // Add target resource to repository
- Collection<IFile> targetExtendedFiles = Collections2.transform(targetResource, CollabFunctionsFactory.getResourceToIFile());
- IStatus status = SVNUtils.addToRepository(UIUtils.getLabel(request.getTargetObject()), targetExtendedFiles);
- if (!status.isOK()) {
- throw new ExecutionException(status.getMessage(), status.getException());
- }
- // Commit source resources
- HashSet<IExtendedURI> sourceExtendedURIs = Sets.newHashSet(Collections2.transform(sourceResource, CollabFunctionsFactory.getResourceToExtendedURIWithContainment()));
- ResourceSet resourceSet = request.getEditingDomain().getResourceSet();
- StringBuilder commitMessage = new StringBuilder("Creation of new partition ");
- commitMessage.append(getPartitionName());
- status = CommitHandler.doCommit(sourceExtendedURIs, resourceSet, false, commitMessage.toString());
- if (!status.isOK()) {
- throw new ExecutionException(status.getMessage(), status.getException());
- }
- // Take lock in new resources
- Set<IExtendedURI> targetExtendedURIs = Sets.newHashSet(Collections2.transform(targetResource, CollabFunctionsFactory.getResourceToExtendedURIWithContainment()));
- status = LockAction.doSafeLock(resourceSet, targetExtendedURIs, false);
- if (!status.isOK()) {
- throw new ExecutionException(status.getMessage(), status.getException());
- }
- return CommandResult.newOKCommandResult();
- }
-
- /**
- * Gets the partition name.
- *
- * @return the partition name
- */
- protected String getPartitionName() {
- return request.getTargetResource("uml").getURI().trimFileExtension().segment(1);
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/commands/SaveCommand.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/commands/SaveCommand.java
deleted file mode 100644
index 213a9ac90c5..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/commands/SaveCommand.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.ui.ISaveablePart;
-
-
-/**
- * The Class SaveCommand.
- * Command to save an editor
- */
-public class SaveCommand extends AbstractTransactionalCommand {
-
- /** The editor. */
- private ISaveablePart editor;
-
- /**
- * Instantiates a new save command.
- *
- * @param domain
- * the domain
- * @param editor
- * the editor
- */
- public SaveCommand(TransactionalEditingDomain domain, ISaveablePart editor) {
- // Set list command to null the save command is secure with read only
- super(domain, "Save command", null);
- this.editor = editor;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
- * org.eclipse.core.runtime.IAdaptable)
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- try {
- editor.doSave(monitor);
- } catch (Exception e) {
- return CommandResult.newErrorCommandResult(e);
- }
- return CommandResult.newOKCommandResult();
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/control/SVNControlModeParticipant.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/control/SVNControlModeParticipant.java
deleted file mode 100644
index 046ebb85a22..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/control/SVNControlModeParticipant.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.control;
-
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
-import org.eclipse.papyrus.infra.services.controlmode.participants.IControlCommandParticipant;
-import org.eclipse.papyrus.infra.services.controlmode.participants.IUncontrolCommandParticipant;
-import org.eclipse.papyrus.team.collaborative.controlmode.commands.AddFileToCollabSVN;
-import org.eclipse.papyrus.team.collaborative.controlmode.commands.SaveCommand;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabUtils;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISaveablePart;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * The Class SVNControlModeParticipant.
- * This {@link IControlCommandParticipant} provide mean to automatically integrate file generated after a control into a SVN repository
- * WARNING: The {@link IUncontrolCommandParticipant} is not implemented yet
- */
-public class SVNControlModeParticipant implements IControlCommandParticipant, IUncontrolCommandParticipant {
-
- /**
- * Instantiates a new sVN control mode participant.
- */
- public SVNControlModeParticipant() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.controlmode.interfaces.IControlModeParticipant#getID()
- */
- @Override
- public String getID() {
- return "org.eclipse.papyrus.team.collaborative.core.integration.papyrus.control.SVNControlModeParticipant";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.controlmode.interfaces.IControlModeParticipant#getPriority()
- */
- @Override
- public int getPriority() {
- return 10000;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.controlmode.interfaces.IUncontrolCommandParticipant#provideUnControlCommand(org.eclipse.papyrus.controlmode.request.
- * ControlModeRequest)
- */
- @Override
- public boolean provideUnControlCommand(ControlModeRequest request) {
- return CollabUtils.isCollab(request.getTargetObject());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.controlmode.interfaces.IUncontrolCommandParticipant#getPreUncontrolCommand(org.eclipse.papyrus.controlmode.request.
- * ControlModeRequest)
- */
- @Override
- public ICommand getPreUncontrolCommand(ControlModeRequest request) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.controlmode.interfaces.IUncontrolCommandParticipant#getPostUncontrolCommand(org.eclipse.papyrus.controlmode.request.
- * ControlModeRequest)
- */
- @Override
- public ICommand getPostUncontrolCommand(ControlModeRequest request) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.controlmode.interfaces.IControlCommandParticipant#provideControlCommand(org.eclipse.papyrus.controlmode.request.
- * ControlModeRequest)
- */
- @Override
- public boolean provideControlCommand(ControlModeRequest request) {
- return CollabUtils.isCollab(request.getTargetObject());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.controlmode.interfaces.IControlCommandParticipant#getPreControlCommand(org.eclipse.papyrus.controlmode.request.
- * ControlModeRequest)
- */
- @Override
- public ICommand getPreControlCommand(ControlModeRequest request) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.controlmode.interfaces.IControlCommandParticipant#getPostControlCommand(org.eclipse.papyrus.controlmode.request.
- * ControlModeRequest)
- */
- @Override
- public ICommand getPostControlCommand(ControlModeRequest request) {
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(request.getEditingDomain(), "Share file to SVN with need lock");
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if (editor instanceof ISaveablePart) {
- cc.compose(new SaveCommand(request.getEditingDomain(), editor));
- cc.compose(new AddFileToCollabSVN(request.getEditingDomain(), request));
- }
- return cc;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/handler/SVNCollabControlCommandHandler.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/handler/SVNCollabControlCommandHandler.java
deleted file mode 100644
index d2d1fab81df..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/handler/SVNCollabControlCommandHandler.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- * Philippe Roland (Atos) philippe.roland@atos.net - minor change to the
- * default naming algorithm to ensure it suggests a valid name
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.handler;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.facet.infra.browser.uicore.internal.model.ModelElementItem;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.services.controlmode.ControlModeManager;
-import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
-import org.eclipse.papyrus.infra.services.controlmode.IControlModeManager;
-import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
-import org.eclipse.papyrus.team.collaborative.controlmode.ui.CreateCollabModelFragmentDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs.PreviewDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.providers.ExtensivePartitionNameLabelProvider;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.papyrus.views.modelexplorer.handler.AbstractModelExplorerHandler;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * The Class SVNCollabControlCommandHandler.
- * Specific handler for fragment creation.
- * This handler retrict the {@link URI} of the new target {@link Resource}
- */
-public class SVNCollabControlCommandHandler extends AbstractModelExplorerHandler {
-
- private static final String PARTITION_PREFIX = "__Partition";
-
- private static final String ILLEGAL_CHARACTERS = "[^a-zA-Z0-9_]";
-
- private static final String EMPTY_STRING = "";
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- List<EObject> selection = getCurrentSelectionAdaptedToType(event, EObject.class);
- if (selection == null || selection.isEmpty() || selection.size() > 1) {
- NotificationBuilder.createInfoPopup("Nothing to control").run();
- return null;
- }
- EObject eObjectToControl = selection.get(0);
- Resource eResource = eObjectToControl.eResource();
- CreateCollabModelFragmentDialog dialog = new CreateCollabModelFragmentDialog(Display.getDefault().getActiveShell(), eResource, getDefaultName(event));
- if (dialog.open() == Window.OK) {
- ControlModeRequest controlRequest = ControlModeRequest.createUIControlModelRequest(getEditingDomain(), eObjectToControl, dialog.getURI());
- IControlModeManager controlMng = ControlModeManager.getInstance();
- ICommand controlCommand = controlMng.getControlCommand(controlRequest);
- getEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(controlCommand));
- PreviewDialog partitionDialog = new PreviewDialog(Display.getDefault().getActiveShell(), new ExtensivePartitionNameLabelProvider(UIUtils.getModelExplorerLavelProvider()), "Model Partition", EMPTY_STRING);
- if (selection != null && !selection.isEmpty()) {
- partitionDialog.setObjectsToReveal(Collections.singleton(eObjectToControl));
- }
- partitionDialog.open();
- }
- return null;
- }
-
- /**
- * Create the default resource name from the selected element
- *
- * @param event
- * @return
- * @throws ExecutionException
- */
- protected String getDefaultName(ExecutionEvent event) throws ExecutionException {
- List<ModelElementItem> selection = getCurrentSelectionAdaptedToType(event, ModelElementItem.class);
- if (selection != null && !selection.isEmpty()) {
- String label = selection.get(0).getText().trim() + PARTITION_PREFIX;
- label = label.replaceAll(ILLEGAL_CHARACTERS, "");
- return label;
- }
- return EMPTY_STRING;
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/handler/ShowModelPartitionHandler.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/handler/ShowModelPartitionHandler.java
deleted file mode 100644
index b3e7845619d..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/handler/ShowModelPartitionHandler.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.handler;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs.PreviewDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.providers.ExtensivePartitionNameLabelProvider;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.papyrus.views.modelexplorer.handler.AbstractModelExplorerHandler;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * The Class ShowModelPartitionHandler.
- * Handler use to display the current partitioning of a model. It will reveal the current selected element
- */
-public class ShowModelPartitionHandler extends AbstractModelExplorerHandler {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- List<EObject> selection = getCurrentSelectionAdaptedToType(event, EObject.class);
- PreviewDialog dialog = new PreviewDialog(Display.getDefault().getActiveShell(), new ExtensivePartitionNameLabelProvider(UIUtils.getModelExplorerLavelProvider()), "Model Partition",
- "The name of each partition appear between the [] before each element name");
- if (selection != null && !selection.isEmpty()) {
- dialog.setObjectsToReveal(selection);
- }
- dialog.open();
- return null;
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/queries/IsCollabQuery.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/queries/IsCollabQuery.java
deleted file mode 100644
index ac8a606e20f..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/queries/IsCollabQuery.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.queries;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.PapyrusResourceUtils;
-
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Sets;
-
-
-/**
- * Return true if the element is a collab element
- *
- * @author adaussy
- *
- */
-public class IsCollabQuery implements IJavaModelQuery<EObject, Boolean> {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery#evaluate(org.eclipse.emf.ecore.EObject,
- * org.eclipse.emf.facet.infra.query.core.java.ParameterValueList)
- */
- @Override
- public Boolean evaluate(EObject arg0, ParameterValueList arg1) throws ModelQueryExecutionException {
- List<URI> uris = new ArrayList<URI>();
- URI uri = arg0.eResource().getURI();
- ResourceSet resourceSet = arg0.eResource().getResourceSet();
- uris.add(uri);
- PapyrusResourceUtils.addExtraResources(resourceSet, uris, uri);
- Set<IExtendedURI> extendedURIS = Sets.newHashSet(Collections2.transform(uris, CollabFunctionsFactory.getURIToExtendedURIWithContainment()));
- ILocker locker = ICollaborativeManager.INSTANCE.getLocker(extendedURIS, resourceSet);
- if (locker == null) {
- return false;
- }
- boolean result = false;
- for (IExtendedURI extURI : extendedURIS) {
- if (locker.isLocked(extURI).isOK()) {
- result = true;
- }
- }
- return result;
-
-
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/queries/IsPartialyLocked.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/queries/IsPartialyLocked.java
deleted file mode 100644
index a025c8b5dd9..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/queries/IsPartialyLocked.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.queries;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.PapyrusResourceUtils;
-
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Sets;
-
-
-/**
- * The Class IsPartialyLocked.
- * Return true if the element is partialy locked. Partialy locked mean that there is one of the di or uml or notation model that has not been locked
- */
-public class IsPartialyLocked implements IJavaModelQuery<EObject, Boolean> {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery#evaluate(org.eclipse.emf.ecore.EObject,
- * org.eclipse.emf.facet.infra.query.core.java.ParameterValueList)
- */
- @Override
- public Boolean evaluate(EObject arg0, ParameterValueList arg1) throws ModelQueryExecutionException {
- List<URI> uris = new ArrayList<URI>();
- URI uri = arg0.eResource().getURI();
- ResourceSet resourceSet = arg0.eResource().getResourceSet();
- uris.add(uri);
- PapyrusResourceUtils.addExtraResources(resourceSet, uris, uri);
- Set<IExtendedURI> extendedURIS = Sets.newHashSet(Collections2.transform(uris, CollabFunctionsFactory.getURIToExtendedURIWithContainment()));
- ILocker locker = ICollaborativeManager.INSTANCE.getLocker(extendedURIS, resourceSet);
- if (locker == null) {
- return false;
- }
- boolean oneLocked = false;
- boolean oneUnlocked = false;
- for (IExtendedURI extURI : extendedURIS) {
- if (locker.isLocked(extURI).isOK()) {
- oneLocked = true;
- } else {
- oneUnlocked = true;
- }
- }
- return oneUnlocked && oneLocked;
-
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/ui/CreateCollabModelFragmentDialog.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/ui/CreateCollabModelFragmentDialog.java
deleted file mode 100644
index 758b4164933..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/ui/CreateCollabModelFragmentDialog.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Anyware Technologies. All rights reserved. This program
- * and the accompanying materials are made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Jacques Lescot (Anyware Technologies) - initial API and
- * implementation
- ******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.ui;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.papyrus.team.collaborative.controlmode.Activator;
-import org.eclipse.papyrus.team.collaborative.core.reports.LogHelper;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.core.utils.URIUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Dialog that will ask the user the name of the new partition and create an {@link URI}
- *
- * @author adaussy
- *
- */
-public class CreateCollabModelFragmentDialog extends Dialog {
-
- private URI uri;
-
- private Resource currentResource;
-
- private String defaultName;
-
-
- private static final String COLLAB_FOLDER_PATH = ".collab/";
-
- /**
- * The constructor
- *
- * @param parent
- * @param theDomain
- * @param theCurrentResource
- * @param defaultName
- */
- public CreateCollabModelFragmentDialog(Shell parent, Resource theCurrentResource, String defaultName) {
- super(parent);
- this.currentResource = theCurrentResource;
- this.defaultName = defaultName;
- this.title = "Create new partition";
- this.style = SWT.SAVE;
-
- normalizeStyle();
- setShellStyle(getShellStyle() | SWT.MAX | SWT.RESIZE);
- }
-
- private URI computetURI() {
- IFile file = CollabFunctionsFactory.getResourceToIFile().apply(currentResource);
- IProject project = file.getProject();
- IFolder folder = project.getFolder(COLLAB_FOLDER_PATH);
- if (!folder.exists()) {
- try {
- folder.create(true, true, null);
- } catch (CoreException e) {
- e.printStackTrace();
- LogHelper.getInstance().logError("Unable to fragment the model", Activator.PLUGIN_ID, e);
- return null;
- }
- }
-
- return URIUtils.getURI(folder.getFullPath());
- }
-
- @Override
- protected Control createContents(Composite parent) {
- Control result = super.createContents(parent);
- this.uriField.setText(defaultName);
- return result;
- }
-
- /**
- * Creates and, if it already exists, loads the specified resource. This implementation verifies
- * that a resource can be opened for that URI, that the resource is not the object's current
- * container, and that it is not read-only in the editing domain. If there is an existing
- * resource with that URI, it prompts before overriding or adding to it.
- *
- * @see org.eclipse.emf.common.ui.dialogs.ResourceDialog#processResources()
- */
- protected boolean processResources() {
- String uriText = getURIText();
- if ("".equals(uriText)) {
- ErrorDialog.openError(Display.getDefault().getActiveShell(), "Illegal partition name", "The name can not be empty", new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Illegal name"));
- return false;
- }
- Matcher matcher = LEGAL_NAME.matcher(uriText);
- if (matcher.matches()) {
- URI uri = computetURI().appendSegment(uriText).appendFileExtension("uml");
- if (!alreadyExist(uri)) {
- this.uri = uri;
- return true;
- } else {
- ErrorDialog.openError(Display.getDefault().getActiveShell(), "Illegal partition name", "This name is already used", new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Illegal name"));
- return false;
- }
- }
- ErrorDialog.openError(Display.getDefault().getActiveShell(), "Illegal partition name", "The partition name shoudl respect ^[a-zA-Z][a-zA-Z0-9]*?$ convention", new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Illegal name"));
- return false;
- }
-
- protected boolean alreadyExist(URI uri) {
- for (Resource r : currentResource.getResourceSet().getResources()) {
- if (r.getURI().equals(uri)) {
- return true;
- }
- }
- return false;
- }
-
- private static final Pattern LEGAL_NAME = Pattern.compile("^[a-zA-Z][a-zA-Z0-9_]*?$");
-
- /**
- * Return the created Resource
- *
- * @return the Resource
- */
- public URI getURI() {
- return uri;
- }
-
-
- protected static final int CONTROL_OFFSET = 10;
-
- protected String title;
-
- protected int style;
-
- protected Text uriField;
-
- protected String uriText;
-
- protected void normalizeStyle() {
- // Ensure there are no extraneous style bits.
- //
- if ((style & ~(SWT.MULTI | SWT.SINGLE | SWT.OPEN | SWT.SAVE)) != 0) {
- throw new IllegalArgumentException("extraneous style bits specified (only SWT.MULTI, SWT.SINGLE, SWT.OPEN, SWT.SAVE allowed");
- }
-
- // Assign default style bits, if necessary, and ensure none conflict.
- //
- if ((style & SWT.MULTI) == 0 && (style & SWT.SINGLE) == 0) {
- style |= SWT.SINGLE;
- } else if ((style & SWT.MULTI) != 0 && (style & SWT.SINGLE) != 0) {
- throw new IllegalArgumentException("conflicting style bits specified (sWT.MUTLI and SWT.SINGLE)");
- }
-
- if ((style & SWT.OPEN) == 0 && (style & SWT.SAVE) == 0) {
- style |= SWT.OPEN;
- } else if ((style & SWT.OPEN) != 0 && (style & SWT.SAVE) != 0) {
- throw new IllegalArgumentException("conflicting style bits specified (sWT.OPEN and SWT.SAVE)");
- }
-
- if (isMulti() && isSave()) {
- throw new IllegalArgumentException("conflicting style bits specified (sWT.MULTI and SWT.SAVE)");
- }
- }
-
- protected boolean isSave() {
- return (style & SWT.SAVE) != 0;
- }
-
- protected boolean isMulti() {
- return (style & SWT.MULTI) != 0;
- }
-
- @Override
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(title);
- }
-
- /**
- * Creates and returns the contents of the upper part of this dialog.
- * This implementation creates a labeled text field for the URI(s) and buttons for browsing the
- * file system and workspace. These buttons are configured (selection listeners are added) by calling {@link #prepareBrowseFileSystemButton} and {@link #prepareBrowseWorkspaceButton}, respectively.
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- {
- FormLayout layout = new FormLayout();
- composite.setLayout(layout);
-
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = 500;
- composite.setLayoutData(data);
- }
-
- // buttonComposite has to be the first child of composite because subclasses are expecting this.
- Composite buttonComposite = new Composite(composite, SWT.NONE);
-
- Label resourceURILabel = new Label(composite, SWT.LEFT);
- {
- resourceURILabel.setText("Name of the new partition");
- FormData data = new FormData();
- data.left = new FormAttachment(0, CONTROL_OFFSET);
- data.top = new FormAttachment(0, CONTROL_OFFSET);
- resourceURILabel.setLayoutData(data);
- }
-
- {
- FormData data = new FormData();
- data.top = new FormAttachment(resourceURILabel, CONTROL_OFFSET, SWT.CENTER);
- data.left = new FormAttachment(resourceURILabel, CONTROL_OFFSET);
- data.right = new FormAttachment(100, -CONTROL_OFFSET);
- buttonComposite.setLayoutData(data);
-
- buttonComposite.setLayout(new FormLayout());
- }
-
- uriField = new Text(composite, SWT.BORDER);
- {
- FormData data = new FormData();
- data.top = new FormAttachment(buttonComposite, CONTROL_OFFSET);
- data.left = new FormAttachment(0, CONTROL_OFFSET);
- data.right = new FormAttachment(100, -CONTROL_OFFSET);
- uriField.setLayoutData(data);
- }
-
- composite.setTabList(new Control[] { uriField, buttonComposite });
- return composite;
- }
-
- /**
- * Called to prepare the Browse File System button, this implementation adds a selection listener
- * that creates an appropriate {@link FileDialog}.
- */
- protected void prepareBrowseFileSystemButton(Button browseFileSystemButton) {
- browseFileSystemButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- FileDialog fileDialog = new FileDialog(getShell(), style);
- fileDialog.open();
-
- String filterPath = fileDialog.getFilterPath();
- if (isMulti()) {
- String[] fileNames = fileDialog.getFileNames();
- StringBuffer uris = new StringBuffer();
-
- for (int i = 0, len = fileNames.length; i < len; i++) {
- uris.append(URI.createFileURI(filterPath + File.separator + fileNames[i]).toString());
- uris.append(" ");
- }
- uriField.setText((uriField.getText() + " " + uris.toString()).trim());
- } else {
- String fileName = fileDialog.getFileName();
- if (fileName != null) {
- uriField.setText(URI.createFileURI(filterPath + File.separator + fileName).toString());
- }
- }
- }
- });
- }
-
- /**
- * Called to prepare the Browse Workspace button, this implementation adds a selection listener
- * that creates an appropriate {@link WorkspaceResourceDialog}.
- */
- protected void prepareBrowseWorkspaceButton(Button browseWorkspaceButton) {
- browseWorkspaceButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- if (isMulti()) {
- StringBuffer uris = new StringBuffer();
-
- IFile[] files = WorkspaceResourceDialog.openFileSelection(getShell(), null, null, true, null, null);
- for (int i = 0, len = files.length; i < len; i++) {
- uris.append(URI.createPlatformResourceURI(files[i].getFullPath().toString(), true));
- uris.append(" ");
- }
- uriField.setText((uriField.getText() + " " + uris.toString()).trim());
- } else {
- IFile file = null;
-
- if (isSave()) {
- file = WorkspaceResourceDialog.openNewFile(getShell(), null, null, null, null);
- } else {
- IFile[] files = WorkspaceResourceDialog.openFileSelection(getShell(), null, null, false, null, null);
- if (files.length != 0) {
- file = files[0];
- }
- }
-
- if (file != null) {
- uriField.setText(URI.createPlatformResourceURI(file.getFullPath().toString(), true).toString());
- }
- }
- }
- });
- }
-
- /**
- * Called when the OK button has been pressed, this method calls {@link #getURIText} to cache and return
- * the URI text field's value (so that it may be retrieved even after the field has been disposed).
- * It then calls {@link #processResources} to handle the specified URIs and optionally closes the dialog,
- * based on its return value.
- */
- @Override
- protected void okPressed() {
- uriText = getURIText();
- if (processResources()) {
- super.okPressed();
- } else {
- uriField.selectAll();
- uriField.setFocus();
- }
- }
-
- /**
- * Returns the value of the URI text field.
- */
- public String getURIText() {
- return uriField != null && !uriField.isDisposed() ? uriField.getText() : uriText;
- }
-
- /**
- * Returns the list of space-separated URIs from the URI text field.
- */
- public List<URI> getURIs() {
- List<URI> uris = new ArrayList<URI>();
- for (StringTokenizer stringTokenizer = new StringTokenizer(getURIText()); stringTokenizer.hasMoreTokens();) {
- String uri = stringTokenizer.nextToken();
- uris.add(URI.createURI(uri));
- }
- return uris;
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/ui/IconsPath.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/ui/IconsPath.java
deleted file mode 100644
index 19bb9db32ec..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode/src/org/eclipse/papyrus/team/collaborative/controlmode/ui/IconsPath.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.controlmode.ui;
-
-
-/**
- * The Interface IconsPath.
- */
-public interface IconsPath {
-
- /** The Constant PARTIAL_LOCKED_OVERLAY. */
- public static final String PARTIAL_LOCKED_OVERLAY = "/org.eclipse.papyrus.team.collaborative.core.integration.papyrus.svn/icons/PartialLock_16x16.png";
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.classpath b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.classpath
deleted file mode 100644
index ad32c83a788..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/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/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.gitignore b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.gitignore
deleted file mode 100644
index 19af0f1d5ca..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.class
-*.jar
-/target \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.project b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.project
deleted file mode 100644
index d8664a4a6ed..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.team.collaborative.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/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.settings/org.eclipse.jdt.core.prefs b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6bb81369ac7..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-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.objectteams.otdt.compiler.option.pure_java=enabled
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/META-INF/MANIFEST.MF b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/META-INF/MANIFEST.MF
deleted file mode 100644
index d8059acd10b..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore,
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.core.resources;bundle-version="3.7.101",
- org.eclipse.emf.workspace
-Export-Package: org.eclipse.papyrus.team.collaborative.core,
- org.eclipse.papyrus.team.collaborative.core.participants,
- org.eclipse.papyrus.team.collaborative.core.participants.locker,
- org.eclipse.papyrus.team.collaborative.core.participants.version,
- org.eclipse.papyrus.team.collaborative.core.reports,
- org.eclipse.papyrus.team.collaborative.core.strategy,
- org.eclipse.papyrus.team.collaborative.core.utils,
- org.eclipse.papyrus.team.collaborative.core.utils.funtions;x-internal:=true
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.team.collaborative.core.Activato
- r
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.team.collaborative.core;singl
- eton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/about.html b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/build.properties b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/build.properties
deleted file mode 100644
index 091e01dfa49..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties
-
-src.includes = about.html
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/plugin.properties b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/plugin.properties
deleted file mode 100644
index 88550fa0002..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#/*****************************************************************************
-# * Copyright (c) 2014 Atos Origin.
-# *
-# *
-# * All rights reserved. This program and the accompanying materials
-# * are made available under the terms of the Eclipse Public License v1.0
-# * which accompanies this distribution, and is available at
-# * http://www.eclipse.org/legal/epl-v10.html
-# *
-# *****************************************************************************/
-pluginName = Collaborative Model
-providerName = Eclipse Modeling Project
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/plugin.xml b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/plugin.xml
deleted file mode 100644
index 85196e35f30..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/plugin.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="org.eclipse.papyrus.team.collaborative.core.contribution" name="contribution" schema="schema/contribution.exsd"/>
-
-</plugin>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/pom.xml b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/pom.xml
deleted file mode 100644
index f2aa82430e4..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/pom.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.1.0-SNAPSHOT</version>
- <relativePath>../../../releng/top-pom-extras.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.papyrus.team.collaborative.core</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/schema/contribution.exsd b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/schema/contribution.exsd
deleted file mode 100644
index fa0a5ed6205..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/schema/contribution.exsd
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.team.collaborative.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.team.collaborative.core" id="contribution" name="Collaborative Mode Contribution"/>
- </appinfo>
- <documentation>
- This extension point is used to register contributions to the collaborative framework, either as locking strategies (used to define which objects are to be affected) or as participants implementing one or more of 4 different actions
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element ref="ParticipantFactory"/>
- <element ref="LockingStrategy"/>
- </choice>
- <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="LockingStrategy">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="impl" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.team.collaborative.core.ILockingStrategy"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="ParticipantFactory">
- <annotation>
- <documentation>
- This extension aim to register participant to collaboration
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="impl" type="string" use="required">
- <annotation>
- <documentation>
- This is an implentation of a participant for the collaboration mode. Depending on the feature that this participant provide it as to inherite from ILocker, IUnlocker, IUpdater, ICommitter
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.team.collaborative.core.ICollabFactory"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="priority" type="string" use="required">
- <annotation>
- <documentation>
- Should be a int. The higher int is the most prioritary
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/Activator.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/Activator.java
deleted file mode 100644
index f22465d71a6..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/Activator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core;
-
-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
- /** The Constant PLUGIN_ID. */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.team.collaborative.core"; //$NON-NLS-1$
-
- // The shared instance
- /** The plugin. */
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ExtendedURI.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ExtendedURI.java
deleted file mode 100644
index 5180feb3bb8..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ExtendedURI.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-
-
-/**
- * The Class ExtendedURI.
- * The {@link ExtendedURI} uri is a wrapper for {@link URI}.
- * However it add a way to express containment. This aim to be used for performance issues
- */
-public class ExtendedURI implements IExtendedURI {
-
- /** The Constant CONTAINMENT_PARAMETER_KEY. */
- public static final String CONTAINMENT_PARAMETER_KEY = "Containment";
-
- /** The uri. */
- private URI uri;
-
- /** The parameters. */
- private Map<String, Object> parameters = new HashMap<String, Object>();
-
- /**
- * Instantiates a new extended uri.
- *
- * @param uri
- * the uri
- */
- public ExtendedURI(URI uri) {
- super();
- this.uri = uri;
- }
-
-
- /**
- * Sets the containment.
- *
- * @param containment
- * the containment
- * @return the extended uri
- */
- public ExtendedURI setContainment(boolean containment) {
- return setParameter(CONTAINMENT_PARAMETER_KEY, containment);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.IExtendedURI#isContainment()
- */
- @Override
- public boolean isContainment() {
- Object containment = getParameter(CONTAINMENT_PARAMETER_KEY);
- if (containment != null) {
- return (Boolean) containment;
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.IExtendedURI#setParameter(java.lang.String, java.lang.Object)
- */
- @Override
- public ExtendedURI setParameter(String id, Object value) {
- parameters.put(id, value);
- return this;
- }
-
-
-
-
- /**
- * Sets the uri.
- *
- * @param uri
- * the uri
- * @return the extended uri
- */
- public IExtendedURI setUri(URI uri) {
- this.uri = uri;
- return this;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.IExtendedURI#getParameter(java.lang.String)
- */
- @Override
- public Object getParameter(String id) {
- return parameters.get(id);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.IExtendedURI#getUri()
- */
- @Override
- public URI getUri() {
- return uri;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((parameters == null) ? 0 : parameters.hashCode());
- result = prime * result + ((uri == null) ? 0 : uri.hashCode());
- return result;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- ExtendedURI other = (ExtendedURI) obj;
- if (parameters == null) {
- if (other.parameters != null) {
- return false;
- }
- } else if (!parameters.equals(other.parameters)) {
- return false;
- }
- if (uri == null) {
- if (other.uri != null) {
- return false;
- }
- } else if (!uri.equals(other.uri)) {
- return false;
- }
- return true;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append(uri.toString());
- stringBuilder.append("[");
- stringBuilder.append(isContainment());
- stringBuilder.append("]");
- return stringBuilder.toString();
- }
-
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ICollabFactory.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ICollabFactory.java
deleted file mode 100644
index e5c45bb6791..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ICollabFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core;
-
-import java.util.Set;
-
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.IUnlocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IReverter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IUpdater;
-
-
-/**
- * Factory for creating all necessary participant for collaborative actions
- *
- * @author adaussy
- *
- */
-public interface ICollabFactory {
-
- ILocker createLocker(Set<IExtendedURI> uris, ResourceSet resourceSet);
-
- IUnlocker createUnlocker(Set<IExtendedURI> uris, ResourceSet resourceSet);
-
- IReverter createReverter(Set<IExtendedURI> uris, ResourceSet resourceSet);
-
- ICommitter createCommitter(Set<IExtendedURI> uris, ResourceSet resourceSet);
-
- IUpdater createUpdater(Set<IExtendedURI> uris, ResourceSet resourceSet);
-
- boolean provide(Set<IExtendedURI> uris, ResourceSet resourceSet);
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ICollaborativeManager.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ICollaborativeManager.java
deleted file mode 100644
index e4890dc3aa6..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/ICollaborativeManager.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.impl.CollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.participants.ICollabParticipant;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.IUnlocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IReverter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IUpdater;
-import org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy;
-
-/**
- * The Interface ICollaborativeManager.
- * Manager all {@link ICollabParticipant} such as {@link IUpdater}, {@link ICommitter}, {@link IReverter}, {@link ILocker}, {@link IUnlocker}.
- * It also handle {@link ILockingStrategy} items
- */
-public interface ICollaborativeManager {
-
- /**
- * Gets the strategies.
- *
- * @return the strategies or null if not found
- */
- public Map<String, ILockingStrategy.Descriptor> getStrategies();
-
-
- /**
- * Gets the locking strategy.
- *
- * @param id
- * the id
- * @return the locking strategy or null if not found
- */
- public ILockingStrategy getLockingStrategy(String id);
-
- /**
- * Gets the locker.
- *
- * @param objectToLock
- * the object to lock
- * @param resourceSet
- * the resource set
- * @return the locker or null if not found
- */
- public ILocker getLocker(Set<IExtendedURI> objectToLock, ResourceSet resourceSet);
-
- /**
- * Gets the unlocker.
- *
- * @param objectToLock
- * the object to lock
- * @param resourceSet
- * the resource set
- * @return the unlocker or null if not found
- */
- public IUnlocker getUnlocker(Set<IExtendedURI> objectToLock, ResourceSet resourceSet);
-
- /**
- * Gets the updater.
- *
- * @param objectToLock
- * the object to lock
- * @param resourceSet
- * the resource set
- * @return the updater or null if not found
- */
- public IUpdater getUpdater(Set<IExtendedURI> objectToLock, ResourceSet resourceSet);
-
- /**
- * Gets the committer.
- *
- * @param objectToLock
- * the object to lock
- * @param resourceSet
- * the resource set
- * @return the committer or null if not found
- */
- public ICommitter getCommitter(Set<IExtendedURI> objectToLock, ResourceSet resourceSet);
-
- /**
- * Gets the reverter.
- *
- * @param objectToLock
- * the object to lock
- * @param resourceSet
- * the resource set
- * @return the reverter or null if not found
- */
- public IReverter getReverter(Set<IExtendedURI> objectToLock, ResourceSet resourceSet);
-
- /**
- * Checks if is collab.
- *
- * @param objectToLock
- * the object to lock
- * @param resourceSet
- * the resource set
- * @return true, if is collab
- */
- public boolean isCollab(Set<IExtendedURI> objectToLock, ResourceSet resourceSet);
-
- /** The instance. */
- public static ICollaborativeManager INSTANCE = CollaborativeManager.getInstance();
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/IExtendedURI.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/IExtendedURI.java
deleted file mode 100644
index 2b44271dbfd..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/IExtendedURI.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core;
-
-import org.eclipse.emf.common.util.URI;
-
-
-
-public interface IExtendedURI {
-
- /**
- * Checks if this {@link ExtendedURI} is express containment.
- *
- * @return true, if is containment
- */
- public abstract boolean isContainment();
-
- /**
- * Sets the parameter.
- *
- * @param id
- * the id
- * @param value
- * the value
- * @return the extended uri
- */
- public abstract IExtendedURI setParameter(String id, Object value);
-
- /**
- * Gets the parameter.
- *
- * @param id
- * the id
- * @return the parameter
- */
- public abstract Object getParameter(String id);
-
- /**
- * Gets the uri.
- *
- * @return the uri
- */
- public abstract URI getUri();
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/impl/CollaborativeManager.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/impl/CollaborativeManager.java
deleted file mode 100644
index d7ff30d4672..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/impl/CollaborativeManager.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.Activator;
-import org.eclipse.papyrus.team.collaborative.core.ICollabFactory;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.IUnlocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IReverter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IUpdater;
-import org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy;
-
-
-/**
- * The Class CollaborativeManager.
- * This the default implementation of {@link ICollaborativeManager}
- *
- * @author adaussy
- */
-public class CollaborativeManager implements ICollaborativeManager {
-
- /**
- * The Class SingletonHolder.
- */
- private static class SingletonHolder {
-
- /** The instance. */
- private static ICollaborativeManager INSTANCE = new CollaborativeManager();
- }
-
- /**
- * Private constructor.
- */
- private CollaborativeManager() {
- init();
- }
-
- /**
- * Returns the Singleton instance.
- * <p>
- *
- * @return The Singleton instance.
- */
- public static ICollaborativeManager getInstance() {
- return SingletonHolder.INSTANCE;
- }
-
- /** The strategies. */
- protected Map<String, ILockingStrategy.Descriptor> strategies;
-
-
- /** The factories of all {@link ParticipantFactoryWrapper} */
- List<ParticipantFactoryWrapper> factories = null;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager#getStrategies()
- */
- @Override
- public Map<String, ILockingStrategy.Descriptor> getStrategies() {
- return strategies;
- }
-
-
- /**
- * Inits the manager.
- */
- protected void init() {
- strategies = new HashMap<String, ILockingStrategy.Descriptor>();
- factories = new ArrayList<CollaborativeManager.ParticipantFactoryWrapper>();
- IConfigurationElement[] confs = Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.PLUGIN_ID, "collaborative");
- for (IConfigurationElement conf : confs) {
- if ("LockingStrategy".equals(conf.getName())) {
- try {
- ILockingStrategy strategy = (ILockingStrategy) conf.createExecutableExtension("impl");
- String id = conf.getAttribute("id");
- String name = conf.getAttribute("name");
- strategies.put(id, new ILockingStrategy.Descriptor(strategy, name));
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- } else if ("ParticipantFactory".equals(conf.getName())) {
- try {
- ICollabFactory factory = (ICollabFactory) conf.createExecutableExtension("impl");
- String id = conf.getAttribute("id");
- Integer priority = Integer.parseInt(conf.getAttribute("priority"));
- factories.add(new ParticipantFactoryWrapper(factory, priority, id));
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- }
- }
- Collections.sort(factories);
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager#getLockingStrategy(java.lang.String)
- */
- @Override
- public ILockingStrategy getLockingStrategy(String id) {
- return getStrategies().get(id).getStrategy();
- }
-
- /**
- * Gets the factory.
- *
- * @param objectToLock
- * the object to lock
- * @param resourceSet
- * the resource set
- * @return the factory
- */
- protected ICollabFactory getFactory(Set<IExtendedURI> objectToLock, ResourceSet resourceSet) {
- for (ParticipantFactoryWrapper wrapper : factories) {
- if (wrapper.factory.provide(objectToLock, resourceSet)) {
- return wrapper.factory;
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager#getLocker(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public ILocker getLocker(Set<IExtendedURI> objectToLock, ResourceSet resourceSet) {
- ICollabFactory factory = getFactory(objectToLock, resourceSet);
- if (factory == null) {
- return null;
- }
- return factory.createLocker(objectToLock, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager#getUnlocker(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public IUnlocker getUnlocker(Set<IExtendedURI> objectToLock, ResourceSet resourceSet) {
- ICollabFactory factory = getFactory(objectToLock, resourceSet);
- if (factory == null) {
- return null;
- }
- return factory.createUnlocker(objectToLock, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager#getUpdater(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public IUpdater getUpdater(Set<IExtendedURI> objectToLock, ResourceSet resourceSet) {
- ICollabFactory factory = getFactory(objectToLock, resourceSet);
- if (factory == null) {
- return null;
- }
- return factory.createUpdater(objectToLock, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager#getCommitter(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public ICommitter getCommitter(Set<IExtendedURI> objectToLock, ResourceSet resourceSet) {
- ICollabFactory factory = getFactory(objectToLock, resourceSet);
- if (factory == null) {
- return null;
- }
- return factory.createCommitter(objectToLock, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager#getReverter(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public IReverter getReverter(Set<IExtendedURI> objectToLock, ResourceSet resourceSet) {
- ICollabFactory factory = getFactory(objectToLock, resourceSet);
- if (factory == null) {
- return null;
- }
- return factory.createReverter(objectToLock, resourceSet);
- }
-
-
- /** The resource set cash. */
- protected Map<URI, ResourceSet> resourceSetCash = new HashMap<URI, ResourceSet>();
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager#isCollab(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public boolean isCollab(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- for (ParticipantFactoryWrapper wrapper : factories) {
- if (wrapper.factory.provide(uris, resourceSet)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * The Class ParticipantFactoryWrapper.
- */
- private static class ParticipantFactoryWrapper implements Comparable<ParticipantFactoryWrapper> {
-
- /** The factory. */
- public ICollabFactory factory;
-
- /** The priority. */
- public Integer priority;
-
- /** The id. */
- public String id;
-
- /**
- * Instantiates a new participant factory wrapper.
- *
- * @param factory
- * the factory
- * @param priority
- * the priority
- * @param id
- * the id
- */
- public ParticipantFactoryWrapper(ICollabFactory factory, Integer priority, String id) {
- super();
- this.factory = factory;
- this.priority = priority;
- this.id = id;
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- @Override
- public int compareTo(ParticipantFactoryWrapper o) {
- return priority.compareTo(o.priority);
- }
-
-
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/AbstractExtendedURIBuilder.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/AbstractExtendedURIBuilder.java
deleted file mode 100644
index 9e01f08892d..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/AbstractExtendedURIBuilder.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants;
-
-import java.util.HashSet;
-import java.util.Set;
-
-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.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.URIUtils;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class AbstractExtendedURIBuilder.
- * Abstract class for all element that implement {@link IExtendedURISuperSet}
- */
-public abstract class AbstractExtendedURIBuilder implements IExtendedURISuperSet {
-
- /** The uris. */
- private Set<IExtendedURI> uris;
-
- /** The resource set. */
- private ResourceSet resourceSet;
-
- /** The uri to handle. */
- private Set<IExtendedURI> uriToHandle;
-
- /** The to resouce function. */
- private Function<URI, Resource> toResouceFunction = null;
-
-
- /**
- * Instantiates a new abstract extended uri builder.
- *
- * @param uris
- * the uris
- * @param resourceSet
- * the resource set
- */
- public AbstractExtendedURIBuilder(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- this.uris = uris;
- this.resourceSet = resourceSet;
- this.toResouceFunction = new Function<URI, Resource>() {
-
- @Override
- public Resource apply(URI from) {
- return getResourceSet().getResource(from, false);
- }
- };
- uriToHandle = doBuild();
-
- }
-
-
- /**
- * Do build.
- *
- * @return the sets the
- */
- protected abstract Set<IExtendedURI> doBuild();
-
- /**
- * Gets the uris.
- *
- * @return the uris
- */
- protected Set<IExtendedURI> getUris() {
- return uris;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.participants.IExtendedURISuperSet#getResourceSet()
- */
- @Override
- public ResourceSet getResourceSet() {
- return resourceSet;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.participants.IExtendedURISuperSet#getExtendedSet()
- */
- @Override
- public Set<IExtendedURI> getExtendedSet() {
- if (uriToHandle == null) {
- uriToHandle = new HashSet<IExtendedURI>();
- }
- return uriToHandle;
- }
-
- /**
- * Gets the target resources.
- *
- * @return the target resources
- */
- protected Set<Resource> getTargetResources() {
- Set<Resource> resourcesTolock = new HashSet<Resource>();
- for (IExtendedURI toLock : getExtendedSet()) {
- Resource resource = getResourceSet().getResource(toLock.getUri(), false);
- if (resource != null) {
- resourcesTolock.add(resource);
- }
- }
- return resourcesTolock;
- }
-
- /**
- * To resource.
- *
- * @param uri
- * the uri
- * @return the resource
- */
- protected Resource toResource(URI uri) {
- if (uri != null) {
- return toResouceFunction.apply(uri);
- }
- return null;
-
- }
-
-
-
- /**
- * Gets the resource uri.
- *
- * @param extendedURI
- * the extended uri
- * @return the resource uri
- */
- protected IExtendedURI getResourceURI(IExtendedURI extendedURI) {
- URI uri = extendedURI.getUri();
- IExtendedURI resourceURI = null;
- if (URIUtils.isResourceURI(uri, getResourceSet())) {
- resourceURI = extendedURI;
- } else if (URIUtils.isEObject(uri, getResourceSet())) {
- resourceURI = new ExtendedURI(uri.trimFragment()).setContainment(extendedURI.isContainment());
- }
- return resourceURI;
- }
-
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/ICollabParticipant.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/ICollabParticipant.java
deleted file mode 100644
index ddffe32afde..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/ICollabParticipant.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants;
-
-
-/**
- * The Interface ICollabParticipant.
- * All participant to collabaroration shall implement this interface
- */
-public interface ICollabParticipant {
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/IExtendedURISuperSet.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/IExtendedURISuperSet.java
deleted file mode 100644
index e557aef1246..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/IExtendedURISuperSet.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants;
-
-import java.util.Set;
-
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.IUnlocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IReverter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IUpdater;
-
-
-/**
- * Interface which return a super set of set using specific rules.
- *
- * @author adaussy
- */
-public interface IExtendedURISuperSet extends ICollabParticipant {
-
-
- /**
- * Return set of {@link ExtendedURI} which as to be used for an operation (see {@link ILocker}, {@link IUnlocker}, {@link IReverter},.
- *
- * @return the extended set {@link ICommitter}, {@link IUpdater}
- */
- Set<IExtendedURI> getExtendedSet();
-
- /**
- * ResourceSet that is in use for those {@link ExtendedURI}.
- *
- * @return the resource set
- */
- ResourceSet getResourceSet();
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/locker/ILocker.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/locker/ILocker.java
deleted file mode 100644
index 9e631d8b44c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/locker/ILocker.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants.locker;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.IExtendedURISuperSet;
-
-
-/**
- * Object to perform a lock
- *
- * @author adaussy
- */
-public interface ILocker extends IExtendedURISuperSet {
-
-
- /**
- * Lock the element of {@link IExtendedURISuperSet#getExtendedSet()}
- *
- * @return
- * @throws CollabException
- */
- IStatus lock();
-
- /**
- * Return true if the {@link ExtendedURI} is locked
- *
- * @return
- */
- IStatus isLocked(IExtendedURI uri);
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/locker/IUnlocker.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/locker/IUnlocker.java
deleted file mode 100644
index d0443e5b782..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/locker/IUnlocker.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants.locker;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.IExtendedURISuperSet;
-
-
-/**
- * Object used to unlock Object.
- *
- * @author adaussy
- *
- */
-public interface IUnlocker extends IExtendedURISuperSet {
-
- /**
- * Unlock element in {@link IExtendedURISuperSet#getExtendedSet()}
- *
- * @return A success status is everything went well
- * @throws CollabException
- */
- IStatus unlock();
-
- /**
- * Return true is at least one of {@link ExtendedURI} is locked
- *
- * @return
- */
- IStatus isLocked(IExtendedURI uri);
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/ICommitter.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/ICommitter.java
deleted file mode 100644
index 24e6e6b8c21..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/ICommitter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants.version;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.papyrus.team.collaborative.core.participants.IExtendedURISuperSet;
-
-
-/**
- * Object to commit elements
- *
- * @author adaussy
- *
- */
-public interface ICommitter extends IExtendedURISuperSet, IWorkOnModifiedElementParticipant {
-
- /**
- * Commit {@link IExtendedURISuperSet#getExtendedSet()}
- *
- * @param message
- * Message for the commit
- * @param keepLock
- * If the lock has to be kept
- * @return Success status is everything went fine
- * @throws CollabException
- */
- IStatus commit(String message, boolean keepLock);
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IReverter.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IReverter.java
deleted file mode 100644
index 5ad6ff03698..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IReverter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants.version;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.papyrus.team.collaborative.core.participants.IExtendedURISuperSet;
-
-
-/**
- * Do a reverter action
- *
- * @author adaussy
- *
- */
-public interface IReverter extends IExtendedURISuperSet, IWorkOnModifiedElementParticipant {
-
- /**
- * Revert changes on {@link IExtendedURISuperSet#getExtendedSet()}
- *
- * @return
- * @throws CollabException
- */
- IStatus revert();
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IUpdater.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IUpdater.java
deleted file mode 100644
index 16faeb4655c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IUpdater.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants.version;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.papyrus.team.collaborative.core.Activator;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.IExtendedURISuperSet;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-
-
-/**
- * Do an update action
- *
- * @author adaussy
- *
- *
- */
-public interface IUpdater extends IExtendedURISuperSet {
-
- /** The Constant NOT_UP_TO_DATE. */
- public static final CollabStatus NOT_UP_TO_DATE = CollabStatus.createErrorStatus("Not up to Date");
-
-
- /**
- * Update element of {@link IExtendedURISuperSet#getExtendedSet()}
- *
- * @return
- * @throws CollabException
- */
- IStatus update();
-
- /**
- * Check if the elements has been modified
- *
- * @param uri
- * @return
- * @throws CollabException
- */
- UpToDateStatus isUpToDate(IExtendedURI uri);
-
- public static class UpToDateStatus extends CollabStatus {
-
- protected String author;
-
- protected Long date;
-
- protected Long revision;
-
- private UpToDateStatus(int severity, String pluginId, int code, String message, Throwable exception, String author, Long date, Long revision) {
- super(severity, pluginId, code, message, exception);
- this.author = author;
- this.date = date;
- this.revision = revision;
- }
-
- public static int UP_TO_DATE_CODE = 578463;
-
- public static int NOT_UP_TO_DATE_CODE = 578463;
-
- public static int ERROR_DURING_OPERATION_CODE = 578462;
-
- public boolean isUpToDate() {
- return getSeverity() < IStatus.ERROR && getCode() == UP_TO_DATE_CODE;
- }
-
- public static UpToDateStatus createUpToDataStatus(String author, Long date, Long revision) {
- return new UpToDateStatus(IStatus.OK, Activator.PLUGIN_ID, UP_TO_DATE_CODE, "Is up to date", null, author, date, revision);
- }
-
- public static UpToDateStatus createNotUpToDataStatus(String author, Long date, Long revision) {
- return new UpToDateStatus(IStatus.ERROR, Activator.PLUGIN_ID, NOT_UP_TO_DATE_CODE, "Is noy up to date", null, author, date, revision);
- }
-
- public static UpToDateStatus createErrorDuringUpToDataStatus(String message, Throwable e) {
- return new UpToDateStatus(IStatus.ERROR, Activator.PLUGIN_ID, ERROR_DURING_OPERATION_CODE, message, e, null, null, null);
- }
-
-
- public static UpToDateStatus createErrorDuringUpToDataStatus(String message) {
- return createErrorDuringUpToDataStatus(message, null);
- }
-
-
-
-
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IWorkOnModifiedElementParticipant.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IWorkOnModifiedElementParticipant.java
deleted file mode 100644
index 557491150b9..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/participants/version/IWorkOnModifiedElementParticipant.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.participants.version;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-
-
-/**
- * The Interface IWorkOnModifiedElementParticipant.
- * This kin of object are able to difference {@link ExtendedURI} which has been modified
- */
-public interface IWorkOnModifiedElementParticipant {
-
- public static final CollabStatus MODIFIED_STATUS = CollabStatus.createErrorStatus("Modified file");
-
- /**
- * Checks if the {@link ExtendedURI} has been modified.
- *
- * @param uri
- * the uri
- * @return the Istatus
- * @throws CollabException
- * the collab exception
- */
- IStatus isModified(IExtendedURI uri);
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/reports/CollabStatus.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/reports/CollabStatus.java
deleted file mode 100644
index f68e673c2ca..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/reports/CollabStatus.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.reports;
-
-import org.eclipse.core.runtime.Status;
-
-/**
- * The Class CollabStatus.
- */
-public class CollabStatus extends Status {
-
- /**
- * Instantiates a new collab status.
- *
- * @param severity
- * the severity
- * @param pluginId
- * the plugin id
- * @param code
- * the code
- * @param message
- * the message
- * @param exception
- * the exception
- */
- public CollabStatus(int severity, String pluginId, int code, String message, Throwable exception) {
- super(severity, pluginId, code, message, exception);
- }
-
- /**
- * Instantiates a new collab status.
- *
- * @param severity
- * the severity
- * @param pluginId
- * the plugin id
- * @param message
- * the message
- * @param exception
- * the exception
- */
- public CollabStatus(int severity, String pluginId, String message, Throwable exception) {
- super(severity, pluginId, message, exception);
- }
-
- /**
- * Instantiates a new collab status.
- *
- * @param severity
- * the severity
- * @param pluginId
- * the plugin id
- * @param message
- * the message
- */
- public CollabStatus(int severity, String pluginId, String message) {
- super(severity, pluginId, message);
- }
-
- /**
- * Creates the error status.
- *
- * @param message
- * the message
- * @return the collab status
- */
- public static CollabStatus createErrorStatus(String message) {
- return new CollabStatus(ERROR, org.eclipse.papyrus.team.collaborative.core.Activator.PLUGIN_ID, message);
- }
-
- /**
- * Creates the error status.
- *
- * @param message
- * the message
- * @param e
- * the e
- * @return the collab status
- */
- public static CollabStatus createErrorStatus(String message, Throwable e) {
- return new CollabStatus(ERROR, org.eclipse.papyrus.team.collaborative.core.Activator.PLUGIN_ID, message, e);
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/reports/LogHelper.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/reports/LogHelper.java
deleted file mode 100644
index 4944083dc89..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/reports/LogHelper.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.reports;
-
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.team.collaborative.core.Activator;
-
-
-/**
- * The Class LogHelper.
- * This class intend to help the user to log stuff
- */
-public class LogHelper {
-
- /**
- * The Class SingletonHolder.
- */
- private static class SingletonHolder {
-
- /** The Constant INSTANCE. */
- private static final LogHelper INSTANCE = new LogHelper();
- }
-
- /**
- * Gets the single instance of LogHelper.
- *
- * @return single instance of LogHelper
- */
- public static LogHelper getInstance() {
- return SingletonHolder.INSTANCE;
- }
-
- /**
- * Log info.
- *
- * @param message
- * the message
- * @param bundleId
- * the bundle id
- */
- public void logInfo(String message, String bundleId) {
- getLogger().log(createWarningStatus(bundleId, message));
- }
-
- /**
- * Creates the warning status.
- *
- * @param bundleId
- * the bundle id
- * @param message
- * the message
- * @return the i status
- */
- protected IStatus createWarningStatus(String bundleId, String message) {
- return createStatus(IStatus.WARNING, bundleId, message);
- }
-
- /**
- * Log error.
- *
- * @param message
- * the message
- * @param bundleId
- * the bundle id
- * @param e
- * the e
- */
- public void logError(String message, String bundleId, Throwable e) {
- getLogger().log(createErrorStatus(bundleId, message, e));
- }
-
- /**
- * Log error.
- *
- * @param message
- * the message
- * @param bundleId
- * the bundle id
- */
- public void logError(String message, String bundleId) {
- getLogger().log(createErrorStatus(bundleId, message));
- }
-
- /**
- * Gets the logger.
- *
- * @return the logger
- */
- protected ILog getLogger() {
- return Activator.getDefault().getLog();
- }
-
- /**
- * Creates the error status.
- *
- * @param pluginId
- * the plugin id
- * @param message
- * the message
- * @return the i status
- */
- protected IStatus createErrorStatus(String pluginId, String message) {
- return createStatus(IStatus.ERROR, pluginId, message);
- }
-
- /**
- * Creates the error status.
- *
- * @param pluginId
- * the plugin id
- * @param message
- * the message
- * @param e
- * the e
- * @return the i status
- */
- protected IStatus createErrorStatus(String pluginId, String message, Throwable e) {
- return createStatus(IStatus.ERROR, pluginId, message, e);
- }
-
- /**
- * Creates the status.
- *
- * @param severity
- * the severity
- * @param pluginId
- * the plugin id
- * @param message
- * the message
- * @param e
- * the e
- * @return the i status
- */
- protected IStatus createStatus(int severity, String pluginId, String message, Throwable e) {
- return new Status(severity, pluginId, message, e);
- }
-
- /**
- * Creates the status.
- *
- * @param severity
- * the severity
- * @param pluginId
- * the plugin id
- * @param message
- * the message
- * @return the i status
- */
- protected IStatus createStatus(int severity, String pluginId, String message) {
- return new Status(severity, pluginId, message);
- }
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/strategy/AbstractLockingStrategy.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/strategy/AbstractLockingStrategy.java
deleted file mode 100644
index f99e8e3b9de..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/strategy/AbstractLockingStrategy.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.strategy;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-
-
-/**
- * The Class AbstractLockingStrategy.
- * This only give a default implementation to {@link ILockingStrategy#applyOn(Collection)}
- */
-public abstract class AbstractLockingStrategy implements ILockingStrategy {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy#applyOn(java.util.Collection)
- */
- @Override
- public boolean applyOn(Collection<EObject> target) {
- return !target.isEmpty();
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/strategy/ILockingStrategy.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/strategy/ILockingStrategy.java
deleted file mode 100644
index d7f2d5770d7..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/strategy/ILockingStrategy.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.strategy;
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-
-
-/**
- * The Interface ILockingStrategy.
- * A locking strategy is used to build a set of business object using the defined strategy
- */
-public interface ILockingStrategy {
-
- /**
- * Get the business object define by this strategy
- *
- * @param eOjbect
- * the e ojbect
- * @return the object to lock
- */
- Set<IExtendedURI> getBusinessObject(Collection<EObject> eOjbect);
-
- /**
- * Return true if this strategy apply on the selected objects
- *
- * @param target
- * the target
- * @return true, if successful
- */
- public boolean applyOn(Collection<EObject> target);
-
- /**
- * The Class Descriptor.
- */
- public class Descriptor {
-
- /** The strategy. */
- private ILockingStrategy strategy;
-
- /** The name. */
- private String name;
-
-
- /**
- * Gets the strategy.
- *
- * @return the strategy
- */
- public ILockingStrategy getStrategy() {
- return strategy;
- }
-
-
- /**
- * Gets the name.
- *
- * @return the name
- */
- public String getName() {
- return name;
- }
-
-
- /**
- * Instantiates a new descriptor.
- *
- * @param strategy
- * the strategy
- * @param name
- * the name
- */
- public Descriptor(ILockingStrategy strategy, String name) {
- super();
- this.strategy = strategy;
- this.name = name;
- }
-
-
-
-
-
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/AbstractRunnableWithProgressWithResult.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/AbstractRunnableWithProgressWithResult.java
deleted file mode 100644
index 782064172ce..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/AbstractRunnableWithProgressWithResult.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils;
-
-
-
-/**
- * Default implementation for {@link IRunnableWithProgressWithResult}
- */
-public abstract class AbstractRunnableWithProgressWithResult<T> implements IRunnableWithProgressWithResult<T> {
-
- /** The result. */
- protected T result;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.utils.IRunnableWithProgressWithResult#getResult()
- */
- @Override
- public T getResult() {
- return result;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/CollabFunctionsFactory.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/CollabFunctionsFactory.java
deleted file mode 100644
index ee240b4a3cf..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/CollabFunctionsFactory.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils;
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-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.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.funtions.EObjectToExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.funtions.ExtendedURIToEObjects;
-import org.eclipse.papyrus.team.collaborative.core.utils.funtions.ExtendedURIToIResource;
-import org.eclipse.papyrus.team.collaborative.core.utils.funtions.ResourceToIFile;
-import org.eclipse.papyrus.team.collaborative.core.utils.funtions.ResourceToURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.funtions.URIToExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.funtions.URIToExtendedURIWithContainment;
-
-import com.google.common.base.Function;
-import com.google.common.base.Functions;
-
-
-/**
- * A factory for creating CollabFunctions objects.
- * This a factory used to gather all function that are often use to collaboration function
- */
-public class CollabFunctionsFactory {
-
- /** The Constant RESOURCE__TO__URI. */
- public static final ResourceToURI RESOURCE__TO__URI = ResourceToURI.getInstance();
-
- /** The Constant URI__TO__EXTENDED_URI_CONTAINMENT. */
- public static final URIToExtendedURIWithContainment URI__TO__EXTENDED_URI_CONTAINMENT = URIToExtendedURIWithContainment.getInstance();
-
- /** The Constant RESOURCE__TO__EXTENDED_URI. */
- public static final Function<Resource, IExtendedURI> RESOURCE__TO__EXTENDED_URI = Functions.compose(URI__TO__EXTENDED_URI_CONTAINMENT, RESOURCE__TO__URI);
-
- /**
- * Gets the {@link ExtendedURI} to {@link IResource}.
- *
- * @param resourceSet
- * the resource set
- * @return the extended uri to i resource
- */
- public static Function<IExtendedURI, IResource> getExtendedURIToIResource(ResourceSet resourceSet) {
- return new ExtendedURIToIResource(resourceSet);
- }
-
- /**
- * Gets the {@link Resource} to {@link IFile}.
- *
- * @return the resource to i file
- */
- public static Function<Resource, IFile> getResourceToIFile() {
- return ResourceToIFile.getInstance();
- }
-
- /**
- * Gets the {@link Resource} to {@link ExtendedURI} with containment.
- *
- * @return the resource to extended uri with containment
- */
- public static Function<Resource, IExtendedURI> getResourceToExtendedURIWithContainment() {
- return RESOURCE__TO__EXTENDED_URI;
- }
-
- /**
- * Gets the {@link URI} to {@link ExtendedURI} with containment.
- *
- * @return the uRI to extended uri with containment
- */
- public static Function<URI, IExtendedURI> getURIToExtendedURIWithContainment() {
- return URIToExtendedURIWithContainment.getInstance();
- }
-
- public static Function<URI, IExtendedURI> getURIToExtendedURI() {
- return URIToExtendedURI.getInstance();
- }
-
- /**
- * Gets the {@link ExtendedURI} to Collection of {@link EObject}.
- *
- * @param resourceSet
- * the resource set
- * @return the extended uri to e objects
- */
- public static Function<IExtendedURI, Collection<EObject>> getExtendedURIToEObjects(ResourceSet resourceSet) {
- return new ExtendedURIToEObjects(resourceSet);
- }
-
- /**
- * Get the {@link IExtendedURI} from an {@link EObject}
- *
- * @return
- */
- public static Function<EObject, IExtendedURI> getEObjectToExtendedURI() {
- return EObjectToExtendedURI.getInstance();
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/CollabUtils.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/CollabUtils.java
deleted file mode 100644
index 7cd469ffb33..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/CollabUtils.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils;
-
-import java.util.Collections;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.utils.funtions.EObjectToExtendedURI;
-
-
-/**
- * The Class CollabUtils.
- * Util class for collaborative work
- */
-public class CollabUtils {
-
-
- /**
- * Instantiates a new collab utils.
- */
- CollabUtils() {
- }
-
- /**
- * Checks if an {@link EObject} can be used in the collaborative framework.
- *
- * @param input
- * the input
- * @return true, if is collab
- */
- public static boolean isCollab(EObject input) {
- return ICollaborativeManager.INSTANCE.isCollab(Collections.singleton(EObjectToExtendedURI.getInstance().apply(input)), input.eResource().getResourceSet());
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ExtendedURIUtil.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ExtendedURIUtil.java
deleted file mode 100644
index 71a12753ea6..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ExtendedURIUtil.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils;
-
-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.papyrus.team.collaborative.core.IExtendedURI;
-
-
-public class ExtendedURIUtil {
-
-
- /**
- * Return true if all
- *
- * @param input
- * @param resourceExtendedURI
- * @param resourceSet
- * @return
- */
- protected static boolean isEObjectContainedResourceExtendedURI(EObject input, IExtendedURI resourceExtendedURI, ResourceSet resourceSet) {
- URI uri = resourceExtendedURI.getUri();
- if (resourceExtendedURI.isContainment()) {
- Resource resource = resourceSet.getResource(uri, false);
- for (EObject rootObject : resource.getContents()) {
- if (EcoreUtil.isAncestor(rootObject, input)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public static boolean isIncluded(EObject input, IExtendedURI extendedURI) {
- if (input != null) {
- Resource eResource = input.eResource();
- if (eResource != null) {
- ResourceSet resourceSet = eResource.getResourceSet();
- URI uri = extendedURI.getUri();
- // If same URI ok
- if (uri.equals(input.eResource().getURI())) {
- return true;
- }
- if (URIUtils.isResourceURI(uri, resourceSet)) {
- // If resource
- return ExtendedURIUtil.isEObjectContainedResourceExtendedURI(input, extendedURI, resourceSet);
- } else if (URIUtils.isEObject(uri, resourceSet)) {
- // If EObject
- if (extendedURI.isContainment()) {
- EObject eObject = resourceSet.getEObject(uri, false);
- if (EcoreUtil.isAncestor(eObject, input)) {
- return true;
- }
- }
- }
- }
- }
- return false;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/IRunnableWithProgressWithResult.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/IRunnableWithProgressWithResult.java
deleted file mode 100644
index a504db7d808..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/IRunnableWithProgressWithResult.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils;
-
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-
-/**
- * The Class AbstractRunnableWithProgressWithResult.
- * Runnable used to return a result
- *
- * @param <T>
- * the generic type
- */
-public interface IRunnableWithProgressWithResult<T> extends IRunnableWithProgress {
-
- /**
- * Gets the result.
- *
- * @return the result
- */
- public T getResult();
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ModelsUtil.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ModelsUtil.java
deleted file mode 100644
index 7c8144ab688..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ModelsUtil.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/**
- * Copyright (c) 2010-2012 Thales Global Services S.A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Thales Global Services S.A.S. - initial API and implementation
- *
- */
-package org.eclipse.papyrus.team.collaborative.core.utils;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-
-/**
- * A utility class related to the structure of models.
- *
- * @author Olivier Constant
- */
-public final class ModelsUtil {
-
- /**
- * An interface defining filters for model elements
- */
- public static interface IElementFilter {
-
- /**
- * Return whether the given element is accepted by this filter
- *
- * @param element_p
- * a non-null element
- */
- boolean accepts(EObject element_p);
- }
-
-
- /**
- * Constructor
- */
- private ModelsUtil() {
- // Forbids instantiation
- }
-
- /**
- * From a set of elements, return all the elements of their containment trees in
- * depth-first order
- * Postcondition: elements_p is not modified.
- *
- * @param elements_p
- * a non-null collection
- * @param filter_p
- * an optional filter
- * @return a non-null, modifiable list
- */
- private static List<EObject> getAllContentsDF(Collection<? extends EObject> elements_p, IElementFilter filter_p) {
- List<EObject> result = new ArrayList<EObject>();
- for (EObject element : elements_p) {
- result.addAll(getAllContentsDF(element, filter_p));
- }
- return result;
- }
-
- /**
- * Return all the elements of the containment tree of the given element in depth-first
- * order
- *
- * @param element_p
- * a non-null element
- * @param filter_p
- * an optional filter
- * @return a non-null, modifiable list
- */
- private static List<EObject> getAllContentsDF(EObject element_p, IElementFilter filter_p) {
- List<EObject> result = new ArrayList<EObject>();
- if (filter_p == null || filter_p.accepts(element_p)) {
- result.add(element_p);
- }
- TreeIterator<EObject> it = element_p.eAllContents();
- while (it.hasNext()) {
- EObject current = it.next();
- if (filter_p == null || filter_p.accepts(current)) {
- result.add(current);
- }
- }
- return result;
- }
-
- /**
- * From a set of elements, build a list of all the elements of their containment trees in
- * breadth-first order
- * Postcondition: elements_p is not modified.
- * We use a LinkedList for queuing behavior.
- *
- * @param elements_p
- * a non-null, modifiable, potentially empty queue of the roots
- * @param result_p
- * the non-null modifiable result being built
- * @param filter_p
- * an optional filter
- */
- private static void getAllContentsBF(LinkedList<EObject> elements_p, List<EObject> result_p, IElementFilter filter_p) {
- if (!elements_p.isEmpty()) {
- EObject current = elements_p.poll();
- if (filter_p == null || filter_p.accepts(current)) {
- result_p.add(current);
- elements_p.addAll(current.eContents());
- }
- getAllContentsBF(elements_p, result_p, filter_p);
- }
- }
-
- /**
- * Return all the elements in the containment tree of the given element
- *
- * @param element_p
- * a non-null element
- * @param depthFirst_p
- * whether the elements must be returned in breadth-first order or in
- * depth-first order
- * @param filter_p
- * an optional filter
- * @return a non-null, modifiable list
- */
- public static List<EObject> getAllContents(EObject element_p, boolean depthFirst_p, IElementFilter filter_p) {
- return getAllContents(Collections.singletonList(element_p), depthFirst_p, filter_p);
- }
-
- /**
- * From a set of elements, return all the elements in their containment trees
- * Postcondition: elements_p is not modified.
- *
- * @param elements_p
- * a non-null collection
- * @param depthFirst_p
- * whether the elements must be returned in breadth-first order or in
- * depth-first order
- * @param filter_p
- * an optional filter
- * @return a non-null, modifiable list
- */
- public static List<EObject> getAllContents(Collection<? extends EObject> elements_p, boolean depthFirst_p, IElementFilter filter_p) {
- List<EObject> result;
- if (depthFirst_p) {
- result = getAllContentsDF(elements_p, filter_p);
- } else {
- result = new ArrayList<EObject>();
- getAllContentsBF(new LinkedList<EObject>(elements_p), result, filter_p);
- }
- return result;
- }
-
- /**
- * Return the list of ancestors including self, from higher to deeper.
- * The result is not immutable but modifying it has no impact whatsoever.
- *
- * @param element_p
- * a potentially null element
- * @return a non-null, modifiable ordered set
- */
- public static List<EObject> getAncestors(EObject element_p) {
- if (element_p == null) {
- return new ArrayList<EObject>();
- }
- List<EObject> containerList = getAncestors(element_p.eContainer());
- containerList.add(element_p);
- return containerList;
- }
-
- /**
- * Return the lowest common ancestor in the containment hierarchy, if any,
- * of the given set of elements
- *
- * @param acceptSelf_p
- * whether the result can be any of the given elements
- * @return a potentially null element
- */
- public static EObject getCommonAncestor(Collection<? extends EObject> elements_p, boolean acceptSelf_p) {
- if (elements_p == null || elements_p.isEmpty()) {
- return null;
- }
- Iterator<? extends EObject> it = elements_p.iterator();
- List<EObject> commonHierarchy = getAncestors(it.next());
- while (it.hasNext()) {
- List<EObject> currentHierarchy = getAncestors(it.next());
- // Compute intersection of ancestors
- commonHierarchy.retainAll(currentHierarchy);
- }
- // Exclude the given elements
- if (!acceptSelf_p) {
- commonHierarchy.removeAll(elements_p);
- }
- // Take lowest ancestor in common hierarchy
- if (commonHierarchy.isEmpty()) {
- return null;
- }
- return commonHierarchy.get(commonHierarchy.size() - 1);
- }
-
- /**
- * Return the lowest common ancestor, in the containment hierarchy,
- * of the two given elements (inclusive)
- *
- * @param first_p
- * a non-null element
- * @param second_p
- * a non-null element
- * @return a potentially null element
- */
- public static EObject getCommonAncestor(EObject first_p, EObject second_p) {
- if (null == first_p || null == second_p) {
- return null;
- }
- return getCommonAncestor(Arrays.asList(new EObject[] { first_p, second_p }), true);
- }
-
- /**
- * Given a set of elements, find their lowest common meta-class
- *
- * @param elements_p
- * a non-null collection of model elements
- * @return a meta-class which is not null if elements_p is not empty
- */
- public static EClass getCommonType(Collection<? extends EObject> elements_p) {
- EClass result = null;
- if (!elements_p.isEmpty()) {
- List<EClass> common = new ArrayList<EClass>(getSuperTypes(elements_p.iterator().next().eClass()));
- for (EObject elt : elements_p) {
- common.retainAll(getSuperTypes(elt.eClass()));
- }
- if (!common.isEmpty()) {
- result = common.get(common.size() - 1);
- }
- }
- return result;
- }
-
- /**
- * Return the depth in the containment tree of the given element
- *
- * @param element_p
- * a potentially null element
- * @return 0 if null, a strictly positive integer otherwise
- */
- public static int getDepth(EObject element_p) {
- if (element_p == null) {
- return 0;
- }
- return 1 + getDepth(element_p.eContainer());
- }
-
- /**
- * Return the overall depth in the containment tree of the given collection of elements,
- * where overall means maximum if max_p is true, or minimum otherwise
- *
- * @param elements_p
- * a non-null, potentially empty collection of elements
- */
- public static int getDepth(Iterable<? extends EObject> elements_p, boolean max_p) {
- int result = max_p ? 0 : Integer.MAX_VALUE;
- for (EObject element : elements_p) {
- int depth = getDepth(element);
- result = max_p ? Math.max(result, depth) : Math.min(result, depth);
- }
- return result;
- }
-
- /**
- * From a set of elements, return all the leaves in their containment trees
- *
- * @param elements_p
- * a non-null collection
- * @return a non-null list
- */
- public static List<EObject> getLeaves(Collection<? extends EObject> elements_p) {
- List<EObject> result = new ArrayList<EObject>();
- for (EObject element : elements_p) {
- result.addAll(getLeaves(element));
- }
- return result;
- }
-
- /**
- * Return all the leaves in the containment tree of the given element
- *
- * @param element_p
- * a non-null element
- * @return a non-null list
- */
- public static List<EObject> getLeaves(EObject element_p) {
- List<EObject> result;
- if (element_p.eContents().isEmpty()) {
- result = Collections.singletonList(element_p);
- } else {
- result = getLeaves(element_p.eContents());
- }
- return result;
- }
-
- /**
- * From a set of elements, filter out those which are transitively contained
- * in others
- *
- * @param elements_p
- * a non-null collection
- * @return a non-null list
- */
- public static <T extends EObject> List<T> getRoots(Collection<? extends T> elements_p) {
- List<T> result = new ArrayList<T>();
- Collection<T> elements = new HashSet<T>(elements_p);
- for (T element : elements) {
- if (!result.contains(element) && isRootAmong(element, elements)) {
- result.add(element);
- }
- }
- return result;
- }
-
- /**
- * Return the super types of the given meta-class including the class itself,
- * ordered from higher to lower in the hierarchy
- *
- * @param class_p
- * a non-null meta-class
- * @return a non-null, non-empty, unmodifiable list
- */
- private static List<EClass> getSuperTypes(EClass class_p) {
- List<EClass> allButSelf = class_p.getEAllSuperTypes();
- List<EClass> result = new ArrayList<EClass>(allButSelf.size() + 1);
- result.addAll(allButSelf);
- result.add(class_p);
- return Collections.unmodifiableList(result);
- }
-
- /**
- * Return whether the given element is not transitively contained by any
- * of the given elements, unless it is one of the given elements
- *
- * @param element_p
- * a non-null element
- * @param elements_p
- * a non-null collection
- */
- private static boolean isRootAmong(EObject element_p, Collection<? extends EObject> elements_p) {
- Collection<EObject> filtered = new HashSet<EObject>(elements_p);
- filtered.remove(element_p);
- return !EcoreUtil.isAncestor(filtered, element_p);
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ResourceUtils.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ResourceUtils.java
deleted file mode 100644
index f3ce699807b..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/ResourceUtils.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.emf.ecore.resource.Resource;
-
-
-/**
- * The Class ResourceUtils.
- * Utils class use to handle {@link Resource}
- */
-public class ResourceUtils {
-
-
- /**
- * Instantiates a new resource utils.
- */
- protected ResourceUtils() {
- }
-
- // /**
- // * Gets the list of non collab ancestor.
- // *
- // * @param inputResources
- // * the input resources
- // * @param resourceSet
- // * the resource set
- // * @return the list of non collab ancestor
- // */
- // public static List<IResource> getListOfNonCollabAncestor(Collection<? extends IResource> inputResources, ResourceSet resourceSet) {
- // List<IResource> result = new ArrayList<IResource>();
- // for(IResource f : inputResources) {
- // if(!(f instanceof IProject) && (f instanceof IContainer || f instanceof IFile)) {
- // getListOfNonCollabAncestor(Collections.singletonList(f.getParent()), resourceSet);
- // if(!result.contains(f)) {
- // if(!ICollaborativeManager.INSTANCE.isCollab(Collections.singleton(IResourceToExtendedURI.getInstance().apply(f)), resourceSet)) {
- // result.add(f);
- // }
- // }
- // }
- // }
- // return result;
- // }
-
-
- /**
- * Gets the list ancestors.
- *
- * @param inputResources
- * the input resources
- * @return the list ancestors
- */
- public static List<IResource> getListAncestors(Collection<? extends IResource> inputResources) {
- List<IResource> result = new ArrayList<IResource>();
- for (IResource f : inputResources) {
- if (!(f instanceof IProject) && (f instanceof IContainer || f instanceof IFile)) {
- getListAncestors(Collections.singletonList(f.getParent()));
- if (!result.contains(f)) {
- result.add(f);
- }
- }
- }
- return result;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/URIUtils.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/URIUtils.java
deleted file mode 100644
index 27db2b0d7cc..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/URIUtils.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-
-/**
- * The Class URIUtils.
- */
-public class URIUtils {
-
- /**
- * Checks if is {@link Resource} {@link URI}.
- *
- * @param uri
- * the uri
- * @param resourceSet
- * the resource set
- * @return true, if is resource uri
- */
- public static boolean isResourceURI(URI uri, ResourceSet resourceSet) {
- return resourceSet.getResource(uri, false) != null;
- }
-
- /**
- * Checks if an {@link URI} is an {@link EObject}.
- *
- * @param uri
- * the uri
- * @param resourceSet
- * the resource set
- * @return true, if is e object
- */
- public static boolean isEObject(URI uri, ResourceSet resourceSet) {
- return uri.hasFragment() && resourceSet.getEObject(uri, false) != null;
- }
-
-
- /**
- * Gets the satellite resource {@link URI}.
- *
- * @param uri
- * the base uri
- * @param fileExtension
- * the file extension
- * @return the satelite resource
- */
- public static URI getSateliteResource(URI uri, String fileExtension) {
- return uri.trimFileExtension().appendFileExtension(fileExtension);
- }
-
-
-
- /**
- * Convert EMF URI to Eclipse file
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param uri
- * the uri
- * @return the file
- */
- public static IFile getFile(URI uri) {
- String platformString = uri.toPlatformString(true);
- if (platformString != null) {
- Path path = new Path(platformString);
- return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- return null;
- }
-
- /**
- * Convert EMF URI to Eclipse folder
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param uri
- * the uri
- * @return the folder
- */
- public static IFolder getFolder(URI uri) {
- Path path = new Path(uri.toPlatformString(true));
- return ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
- }
-
- /**
- * Convert Eclipse resource to EMF URI
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param file
- * the file
- * @return the uri
- */
- public static URI getURI(IResource file) {
- return getURI(file.getFullPath());
- }
-
- /**
- * Create an EMF URI from an Eclipse path
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param path
- * the path
- * @return the uri
- */
- public static URI getURI(IPath path) {
- return URI.createPlatformResourceURI(path.toString(), true);
- }
-
- /**
- * Convert a file name to an EMF URI
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param fileName
- * the file name
- * @return EMF URI
- */
- public static URI getURI(String fileName) {
- return getURI(new File(fileName));
- }
-
- /**
- * Convert a file name to an EMF URI
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param file
- * the file
- * @return EMF URI
- */
- public static URI getURI(File file) {
- return URI.createFileURI(file.getAbsolutePath());
- }
-
- /**
- * Get Java URL from EMF URI
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param uri
- * EMF URI
- * @return Java URL
- */
- public static URL getURL(URI uri) {
- try {
- URL url = new URL(uri.toString());
- return url;
- } catch (MalformedURLException e) {
- return null;
- }
- }
-
- /**
- * Get EMF URI from Java URL
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param url
- * Java URL
- * @return EMF URI
- */
- public static URI getURI(URL url) {
- return URI.createURI(url.toString());
- }
-
- /**
- * Replace extension of a file
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param file
- * File
- * @param ext
- * New extension
- * @return New file
- */
- public static IFile replaceExtension(IFile file, String ext) {
- IProject project = file.getProject();
- return project.getFile(file.getProjectRelativePath().removeFileExtension().addFileExtension(ext));
- }
-
- /**
- * Replace extension of a EMF URI
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param uri
- * EMF URI
- * @param ext
- * New extension
- * @return New EMF URI
- */
- public static URI replaceExtension(URI uri, String ext) {
- return uri.trimFileExtension().appendFileExtension(ext);
- }
-
- /**
- * Get the Java file for a URI
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param uri
- * the uri
- * @return Java file
- */
- public static File getJavaFile(URI uri) {
- if (uri.isPlatform()) {
- IFile file = getFile(uri);
- IPath location = file.getLocation();
- return location.toFile();
- }
- return new File(uri.toFileString());
- }
-
- /**
- * Get the relative path of a {@link URI} w.r.t. another {@link URI}.
- * Copied from org.eclipse.emf.edapt.common.URIUtils
- *
- * @param uri
- * the uri
- * @param relativeTo
- * the relative to
- * @return the relative path
- */
- public static URI getRelativePath(URI uri, URI relativeTo) {
- return uri.deresolve(relativeTo, true, true, true);
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/EObjectToExtendedURI.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/EObjectToExtendedURI.java
deleted file mode 100644
index 15689c4507c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/EObjectToExtendedURI.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class EObjectToExtendedURI.
- * Function to convert {@link EObject} to {@link ExtendedURI}
- */
-public class EObjectToExtendedURI implements Function<EObject, IExtendedURI> {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public IExtendedURI apply(EObject from) {
- Resource resoure = from.eResource();
- return new ExtendedURI(resoure.getURI().appendFragment(resoure.getURIFragment(from)));
- }
-
- /**
- * The Class SingletonHolder.
- */
- private static class SingletonHolder {
-
- /** The instance. */
- private static EObjectToExtendedURI INSTANCE = new EObjectToExtendedURI();
- }
-
- /**
- * Private constructor.
- */
- private EObjectToExtendedURI() {
- }
-
- /**
- * Returns the Singleton instance.
- * <p>
- *
- * @return The Singleton instance.
- */
- public static EObjectToExtendedURI getInstance() {
- return SingletonHolder.INSTANCE;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToEObjects.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToEObjects.java
deleted file mode 100644
index ea60d511401..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToEObjects.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.URIUtils;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class ExtendedURIToEObjects.
- * Function used to convert {@link ExtendedURI} to {@link java.util.List} of {@link EObject}
- */
-public class ExtendedURIToEObjects implements Function<IExtendedURI, Collection<EObject>> {
-
- /** The resource set. */
- private ResourceSet resourceSet;
-
- /**
- * Instantiates a new extended uri to e objects.
- *
- * @param resourceSet
- * the resource set
- */
- public ExtendedURIToEObjects(ResourceSet resourceSet) {
- super();
- this.resourceSet = resourceSet;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public Collection<EObject> apply(IExtendedURI from) {
- if (URIUtils.isEObject(from.getUri(), resourceSet)) {
- return Collections.singleton(resourceSet.getEObject(from.getUri(), false));
- } else if (URIUtils.isResourceURI(from.getUri(), resourceSet)) {
- Resource resource = resourceSet.getResource(from.getUri(), false);
- if (resource != null) {
- return resource.getContents();
- }
- }
- return Collections.emptyList();
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToIResource.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToIResource.java
deleted file mode 100644
index 349680711c4..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToIResource.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import org.eclipse.core.resources.IResource;
-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.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.URIUtils;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class ExtendedURIToIResource.
- * Function used to convert {@link ExtendedURI} to {@link IResource}
- */
-public class ExtendedURIToIResource implements Function<IExtendedURI, IResource> {
-
- /** The resource set. */
- private ResourceSet resourceSet;
-
- /**
- * Instantiates a new extended uri to i resource.
- *
- * @param resourceSet
- * the resource set
- */
- public ExtendedURIToIResource(ResourceSet resourceSet) {
- super();
- this.resourceSet = resourceSet;
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public IResource apply(IExtendedURI from) {
- URI uri = from.getUri();
- IResource result = null;
- if (URIUtils.isEObject(from.getUri(), resourceSet)) {
- result = WorkspaceSynchronizer.getFile(resourceSet.getEObject(uri, false).eResource());
- } else if (URIUtils.isResourceURI(from.getUri(), resourceSet)) {
- Resource resource = resourceSet.getResource(from.getUri(), false);
- result = WorkspaceSynchronizer.getFile(resource);
- } else {
- result = URIUtils.getFile(uri);
- if (result == null) {
- result = URIUtils.getFolder(uri);
- }
- }
- return result;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToURI.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToURI.java
deleted file mode 100644
index b3449727a4e..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ExtendedURIToURI.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class ExtendedURIToURI.
- * Function used to convert {@link ExtendedURI} to {@link URI}
- */
-public class ExtendedURIToURI implements Function<ExtendedURI, URI> {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public URI apply(ExtendedURI from) {
- return from.getUri();
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java
deleted file mode 100644
index e5cfcaa2f2c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IResource;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class IFileToFile.
- * Function used to convert {@link IResource} to {@link File}
- *
- * @param <T>
- * the generic type
- */
-public class IFileToFile<T extends IResource> implements Function<T, File> {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public File apply(T from) {
- return from.getFullPath().toFile();
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IResourceToExtendedURI.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IResourceToExtendedURI.java
deleted file mode 100644
index 1e335e63b79..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IResourceToExtendedURI.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.URIUtils;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class IResourceToExtendedURI.
- * Function used to convert {@link IResource} to {@link ExtendedURI}
- */
-public class IResourceToExtendedURI implements Function<IResource, ExtendedURI> {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public ExtendedURI apply(IResource from) {
- return new ExtendedURI(URIUtils.getURI(from));
- }
-
- /**
- * The Class SingletonHolder.
- */
- private static class SingletonHolder {
-
- /** The instance. */
- private static IResourceToExtendedURI INSTANCE = new IResourceToExtendedURI();
- }
-
- /**
- * Private constructor.
- */
- private IResourceToExtendedURI() {
- }
-
- /**
- * Returns the Singleton instance.
- * <p>
- *
- * @return The Singleton instance.
- */
- public static IResourceToExtendedURI getInstance() {
- return SingletonHolder.INSTANCE;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ResourceToIFile.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ResourceToIFile.java
deleted file mode 100644
index 92ea6e0bc5e..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ResourceToIFile.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class ResourceToIFile.
- * Function used to convert {@link Resource} to {@link IFile}
- */
-public class ResourceToIFile implements Function<Resource, IFile> {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public IFile apply(Resource from) {
- return WorkspaceSynchronizer.getFile(from);
- }
-
-
- /**
- * The Class SingletonHolder.
- */
- private static class SingletonHolder {
-
- /** The instance. */
- private static ResourceToIFile INSTANCE = new ResourceToIFile();
- }
-
- /**
- * Private constructor.
- */
- private ResourceToIFile() {
- // TODO auto-generated constructor
- }
-
- /**
- * Returns the Singleton instance.
- * <p>
- *
- * @return The Singleton instance.
- */
- public static ResourceToIFile getInstance() {
- return SingletonHolder.INSTANCE;
- }
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ResourceToURI.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ResourceToURI.java
deleted file mode 100644
index dd8cec96a73..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/ResourceToURI.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class ResourceToURI.
- * Function used to convert {@link Resource} to {@link URI}
- */
-public class ResourceToURI implements Function<Resource, URI> {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public URI apply(Resource from) {
- return from.getURI();
- }
-
- /**
- * The Class SingletonHolder.
- */
- private static class SingletonHolder {
-
- /** The instance. */
- private static ResourceToURI INSTANCE = new ResourceToURI();
- }
-
- /**
- * Private constructor.
- */
- private ResourceToURI() {
- // TODO auto-generated constructor
- }
-
- /**
- * Returns the Singleton instance.
- * <p>
- *
- * @return The Singleton instance.
- */
- public static ResourceToURI getInstance() {
- return SingletonHolder.INSTANCE;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/URIToExtendedURI.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/URIToExtendedURI.java
deleted file mode 100644
index 62890f8df91..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/URIToExtendedURI.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class URIToExtendedURI.
- * Function used to convert {@link URI} to {@link ExtendedURI} (No containment)
- */
-public class URIToExtendedURI implements Function<URI, IExtendedURI> {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public IExtendedURI apply(URI from) {
- return new ExtendedURI(from);
- }
-
- private static class SingletonHolder {
-
- private static URIToExtendedURI INSTANCE = new URIToExtendedURI();
- }
-
- /**
- * Private constructor.
- */
- private URIToExtendedURI() {
- // TODO auto-generated constructor
- }
-
- /**
- * Returns the Singleton instance.
- * <p>
- *
- * @return The Singleton instance.
- */
- public static URIToExtendedURI getInstance() {
- return SingletonHolder.INSTANCE;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/URIToExtendedURIWithContainment.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/URIToExtendedURIWithContainment.java
deleted file mode 100644
index 2f51bb7b77f..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/URIToExtendedURIWithContainment.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.core.utils.funtions;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-
-import com.google.common.base.Function;
-
-
-/**
- * The Class URIToExtendedURIWithContainment.
- * Function used to convert {@link URI} to {@link ExtendedURI} with containment
- */
-public class URIToExtendedURIWithContainment implements Function<URI, IExtendedURI> {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.common.base.Function#apply(java.lang.Object)
- */
- @Override
- public ExtendedURI apply(URI from) {
- return new ExtendedURI(from).setContainment(true);
- }
-
- /**
- * The Class SingletonHolder.
- */
- private static class SingletonHolder {
-
- /** The instance. */
- private static URIToExtendedURIWithContainment INSTANCE = new URIToExtendedURIWithContainment();
- }
-
- /**
- * Private constructor.
- */
- private URIToExtendedURIWithContainment() {
- // TODO auto-generated constructor
- }
-
- /**
- * Returns the Singleton instance.
- * <p>
- *
- * @return The Singleton instance.
- */
- public static URIToExtendedURIWithContainment getInstance() {
- return SingletonHolder.INSTANCE;
- }
-
-} \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.classpath b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.classpath
deleted file mode 100644
index ad32c83a788..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/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/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.gitignore b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.gitignore
deleted file mode 100644
index 19af0f1d5ca..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.class
-*.jar
-/target \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.project b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.project
deleted file mode 100644
index 5b272c03654..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.team.collaborative.strategy</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/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.settings/org.eclipse.jdt.core.prefs b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 42337f02afe..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.objectteams.otdt.compiler.option.pure_java=enabled
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/META-INF/MANIFEST.MF b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/META-INF/MANIFEST.MF
deleted file mode 100644
index cf1ece27612..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.team.collaborative.core;bundle-version="1.1.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.emf.ecore;bundle-version="2.7.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.modelexplorer;bundle-version="1.1.0",
- org.eclipse.ui.navigator;bundle-version="3.5.101",
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0",
- org.eclipse.core.expressions,
- org.eclipse.uml2.uml;bundle-version="3.2.100",
- org.eclipse.emf.edit,
- org.eclipse.gmf.runtime.common.ui,
- org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
- org.eclipse.ui.ide,
- org.eclipse.ui.views.properties.tabbed,
- org.eclipse.emf.transaction,
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.views.modelexplorer;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0"
-Export-Package: org.eclipse.papyrus.team.collaborative.strategy.ui.actions,
- org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs,
- org.eclipse.papyrus.team.collaborative.strategy.ui.providers,
- org.eclipse.papyrus.team.collaborative.strategy.utils
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Name: %pluginName
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.team.collaborative.core.integrat
- ion.papyrus.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.team.collaborative.strategy;s
- ingleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/about.html b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/build.properties b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/build.properties
deleted file mode 100644
index eda3cdc73bd..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- plugin.properties
-src.includes = about.html
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/TeamIcon.png b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/TeamIcon.png
deleted file mode 100644
index bb1d469d844..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/TeamIcon.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/commit.gif b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/commit.gif
deleted file mode 100644
index b67692df435..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/commit.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/lock.gif b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/lock.gif
deleted file mode 100644
index 1075ee45868..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/lock.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/revert.gif b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/revert.gif
deleted file mode 100644
index c01c38436f0..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/revert.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/unlock.gif b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/unlock.gif
deleted file mode 100644
index 73f3c2d02a4..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/unlock.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/update.gif b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/update.gif
deleted file mode 100644
index 8c76387e8d1..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/icons/update.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/plugin.properties b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/plugin.properties
deleted file mode 100644
index 13d9f9c5199..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#/*****************************************************************************
-# * Copyright (c) 2014 Atos Origin.
-# *
-# *
-# * All rights reserved. This program and the accompanying materials
-# * are made available under the terms of the Eclipse Public License v1.0
-# * which accompanies this distribution, and is available at
-# * http://www.eclipse.org/legal/epl-v10.html
-# *
-# *****************************************************************************/
-pluginName = Collaborative Locking Strategies
-providerName = Eclipse Modeling Project
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/plugin.xml b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/plugin.xml
deleted file mode 100644
index 84c12743f5f..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/plugin.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup">
- <menu
- icon="icons/TeamIcon.png"
- id="org.eclipse.papyrus.team.collaborative.core.ui.collab.menu"
- label="Collaborative">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="selection">
- <test
- property="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.isCollab"
- value="true">
- </test>
- </with>
- </visibleWhen>
- </menu>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.team.collaborative.core.ui.collab.menu">
- <menu
- icon="icons/lock.gif"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.menu"
- label="Lock">
- <dynamic
- class="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.ui.items.LockStrategyItemProvider"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.lockItems">
- </dynamic>
- </menu>
- <menu
- icon="icons/unlock.gif"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.unlock"
- label="Unlock">
- <dynamic
- class="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.ui.items.UnlockStrategyItemProvider"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.UnlockItem">
- </dynamic>
- </menu>
- <command
- commandId="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.update"
- icon="icons/update.gif"
- label="Update"
- style="push"
- tooltip="Update the all model from the repository">
- </command>
- <command
- commandId="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.commit"
- icon="icons/commit.gif"
- label="Commit"
- style="push"
- tooltip="Commit all modification to the repository">
- </command>
- <command
- commandId="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.revert"
- icon="icons/revert.gif"
- label="Revert"
- style="push"
- tooltip="Revert all changes">
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.papyrus.team.collaborative.core.contribution">
- <LockingStrategy
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.elementsandcontents"
- impl="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.stategies.PapyrusSelectionAllContent"
- name="Selected element and content">
- </LockingStrategy>
- <LockingStrategy
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.papyrusResourceContent"
- impl="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.stategies.PapyrusCurrentResource"
- name="Selected element">
- </LockingStrategy>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.ui.actions.UpdateHandler"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.update"
- name="Update">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.ui.actions.CommitHandler"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.commit"
- name="Commit">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.ui.actions.RevertHandler"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.revert"
- name="Revert">
- </command>
- </extension>
- <extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.IsCollabPropertyTest"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.iCollabID"
- namespace="org.eclipse.papyrus.team.collaborative.core.integration.papyrus"
- properties="isCollab"
- type="org.eclipse.jface.viewers.ISelection">
- </propertyTester>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.emf.readonly.readOnlyHandler">
- <readOnlyHandler
- class="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.security.CollabReadOnlyHandler"
- id="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.CollabReadOnlyHandler"
- priority="700">
- </readOnlyHandler>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.core.model">
- <modelSetSnippet
- classname="org.eclipse.papyrus.team.collaborative.core.integration.papyrus.security.PreCommitReadOnlyHandler">
- </modelSetSnippet>
- </extension>
-
-</plugin>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/pom.xml b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/pom.xml
deleted file mode 100644
index fab3f6f0d17..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/pom.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.1.0-SNAPSHOT</version>
- <relativePath>../../../releng/top-pom-extras.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.papyrus.team.collaborative.strategy</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/Activator.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/Activator.java
deleted file mode 100644
index d8aa6aa01a9..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/Activator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy;
-
-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
- /** The Constant PLUGIN_ID. */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.team.collaborative.core.integration.papyrus"; //$NON-NLS-1$
-
- // The shared instance
- /** The plugin. */
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/IsCollabPropertyTest.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/IsCollabPropertyTest.java
deleted file mode 100644
index 024086d6414..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/IsCollabPropertyTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabUtils;
-
-
-/**
- * Tester to check if the selection belong to a collaborative model.
- *
- * @author adaussy
- */
-public class IsCollabPropertyTest extends PropertyTester {
-
- /** The Constant IS_COLLAB_PROPERTY. */
- private static final String IS_COLLAB_PROPERTY = "isCollab";
-
- /**
- * Instantiates a new checks if is collab property test.
- */
- public IsCollabPropertyTest() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (IS_COLLAB_PROPERTY.equals(property)) {
- if (receiver instanceof ISelection) {
- ISelection selection = (ISelection) receiver;
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structurSelection = (IStructuredSelection) selection;
- Object first = structurSelection.getFirstElement();
- EObject eObject = EMFHelper.getEObject(first);
- if (eObject != null) {
- return CollabUtils.isCollab(eObject);
- }
- }
- }
- }
- return false;
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/MatchingURIObject.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/MatchingURIObject.java
deleted file mode 100644
index 3b42b260f3f..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/MatchingURIObject.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.ExtendedURIUtil;
-import org.eclipse.uml2.uml.Element;
-
-import com.google.common.base.Predicate;
-
-
-/**
- * The Class MatchingURIObject.
- * Predicate that will return true if the EObject belong to the set of {@link IExtendedURI}
- */
-public class MatchingURIObject implements Predicate<EObject> {
-
- private Set<IExtendedURI> uris;
-
- public MatchingURIObject(Set<IExtendedURI> uris) {
- super();
- this.uris = uris;
- }
-
- @Override
- public boolean apply(EObject input) {
- List<EObject> objectToTEObjects = new ArrayList<EObject>();
- objectToTEObjects.add(input);
- objectToTEObjects.addAll(NotationUtils.getLoadedAssociatedDiagrams(input));
- for (IExtendedURI extendedURI : uris) {
- for (EObject o : objectToTEObjects) {
- boolean contained = ExtendedURIUtil.isIncluded(o, extendedURI);
-
- if (contained) {
- return contained;
- }
- }
- }
- return false;
- }
-
-
- protected EObject getSemanticObject(EObject eObject) {
- EObject result = null;
- if (eObject instanceof Element) {
- result = eObject;
- } else if (eObject instanceof View) {
- // Handle view
- result = ((View) eObject).getElement();
- } else {
- // Handle setereotype
- Element baseElement = org.eclipse.uml2.uml.util.UMLUtil.getBaseElement(eObject);
- if (baseElement != null) {
- result = baseElement;
- }
- // TODO handle tab
- }
- return result;
- }
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/RefreshHelper.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/RefreshHelper.java
deleted file mode 100644
index efc000c8240..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/RefreshHelper.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Olivier Melois <a href="mailto:olivier.melois@atos.net"> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy;
-
-import java.util.Collection;
-import java.util.HashSet;
-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.emf.ecore.EObject;
-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.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
-import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Helper used to store method for refreshin model explorer view
- *
- * @author omelois
- *
- */
-public final class RefreshHelper {
-
-
- private RefreshHelper() {
- }
-
-
- /**
- * Runnable that will be used to refresh the model explorer view
- *
- * @author adaussy
- *
- */
- public static final class RefreshModelExplorerRunnable implements Runnable {
-
- private final Collection<EObject> elementsToRefresh;
-
- private static final int TIME_TO_REFRESH_MODEL_EXPLORER = 100;
-
- /**
- * @param elementsToRefresh
- * Element to Refresh
- */
- public RefreshModelExplorerRunnable(Collection<EObject> elementsToRefresh) {
- this.elementsToRefresh = elementsToRefresh;
- }
-
- @Override
- public void run() {
-
- try {
- Thread.sleep(TIME_TO_REFRESH_MODEL_EXPLORER);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- if (elementsToRefresh != null) {
- IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (activePage != null) {
- IViewReference viewRef = activePage.findViewReference(ModelExplorerPageBookView.VIEW_ID);
- if (viewRef != null && viewRef.getView(false) instanceof ModelExplorerView) {
- ModelExplorerView modelExplorerView = (ModelExplorerView) viewRef.getView(false);
- modelExplorerView.refresh();
- // Set<Object> alreadyRefreshed = new HashSet<Object>();
- // if(view != null) {
- // for(EObject elementToRefresh : elementsToRefresh) {
- //
- // view.refreshObject(elementToRefresh, alreadyRefreshed);
- // alreadyRefreshed.add(elementToRefresh);
- // }
- // }
- }
- }
- // IViewReference[] viewReferences = activePage.getViewReferences();
- // for(IViewReference viewRef : viewReferences) {
- // if(viewRef.getId().equals(ModelExplorerPageBookView.VIEW_ID));
- // }
-
- }
- }
- }
-
- protected static final String ELEMENTS_TO_REFRESH_KEY = "elementsToRefresh"; //$NON-NLS-1$
-
- /**
- * Get the model explorer refresh command
- *
- * @param request
- * IEditCommandRequest which implies refresh
- * @return
- */
- public static ICommand getRefreshCommand(final IEditCommandRequest request) {
- return new AbstractCommand("Refresh") //$NON-NLS-1$
- {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- refreshPostMove(request);
- return CommandResult.newOKCommandResult();
- }
-
- @Override
- protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- refreshPostMove(request);
- return CommandResult.newOKCommandResult();
- }
-
- @Override
- protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- refreshPostMove(request);
- return CommandResult.newOKCommandResult();
- }
- };
- }
-
- /**
- * Function to asynchronously refresh the model explorer after moving a breakdown element.
- *
- * @param request
- */
- private static void refreshPostMove(final IEditCommandRequest request) {
- @SuppressWarnings("unchecked")
- final Set<EObject> elementsToRefresh = (Set<EObject>) request.getParameter(ELEMENTS_TO_REFRESH_KEY);
-
- refreshModelExplorer(elementsToRefresh);
- }
-
- public static void refreshModelExplorer(Collection<EObject> elementsToRefresh) {
- if (elementsToRefresh != null && !(elementsToRefresh.isEmpty())) {
- Display.getDefault().asyncExec(new RefreshModelExplorerRunnable(elementsToRefresh));
- }
- }
-
- /**
- * Adds an element to the list of elements that should be refreshed, in the request.
- *
- * @param element
- * Element you want to refresh
- * @param request
- * Request in which the information about a refresh will be added
- */
- @SuppressWarnings({ "unchecked", "rawtypes" })
- public static void addElementToRefresh(EObject element, IEditCommandRequest request) {
- Object elementsToRefresh = request.getParameter(ELEMENTS_TO_REFRESH_KEY);
- if (elementsToRefresh == null) {
- elementsToRefresh = new HashSet<EObject>();
- request.getParameters().put(ELEMENTS_TO_REFRESH_KEY, elementsToRefresh);
- }
- if (elementsToRefresh instanceof Set<?>) {
- ((Set) elementsToRefresh).add(element);
- }
- }
-
- /**
- * Checks whether a request has elements to refresh;
- *
- * @param request
- * Request in which the information about a refresh will be added
- * @return
- */
- public static boolean hasElementsToRefresh(IEditCommandRequest request) {
- Object elementsToRefresh = request.getParameter(ELEMENTS_TO_REFRESH_KEY);
- return elementsToRefresh instanceof Set<?> && (!((Set<?>) elementsToRefresh).isEmpty());
- }
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/security/CollabReadOnlyHandler.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/security/CollabReadOnlyHandler.java
deleted file mode 100644
index f3e2567542e..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/security/CollabReadOnlyHandler.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.security;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler;
-import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler;
-import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.actions.LockAction;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
-
-/**
- * The Class CollabReadOnlyHandler.
- * This read only handler implement {@link IReadOnlyHandler} using the collaborative framework
- */
-public class CollabReadOnlyHandler extends AbstractReadOnlyHandler {
-
- public CollabReadOnlyHandler(EditingDomain editingDomain) {
- super(editingDomain);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.readonly.IReadOnlyHandler#isReadOnly(org.eclipse.emf.common.util.URI[], org.eclipse.emf.edit.domain.EditingDomain)
- */
- @Override
- public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
- if (uris != null && uris.length > 0 && getEditingDomain() != null && axes.contains(ReadOnlyAxis.PERMISSION)) {
- ArrayList<URI> urisList = Lists.newArrayList(uris);
- Collection<IExtendedURI> extendedURICollection = Collections2.transform(urisList, CollabFunctionsFactory.getURIToExtendedURIWithContainment());
- HashSet<IExtendedURI> extendURISet = Sets.newHashSet(extendedURICollection);
- ResourceSet resourceSet = getEditingDomain().getResourceSet();
- if (ICollaborativeManager.INSTANCE.isCollab(extendURISet, resourceSet)) {
- ILocker locker;
- locker = ICollaborativeManager.INSTANCE.getLocker(extendURISet, resourceSet);
- if (locker == null) {
- return Optional.absent();
- }
- for (IExtendedURI extendURI : locker.getExtendedSet()) {
- if (!locker.isLocked(extendURI).isOK()) {
- return Optional.of(true);
- }
- }
- }
- }
- return Optional.absent();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.readonly.IReadOnlyHandler#enableWrite(org.eclipse.emf.common.util.URI[], org.eclipse.emf.edit.domain.EditingDomain)
- */
- @Override
- public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
- if (axes.contains(ReadOnlyAxis.PERMISSION)) {
- ArrayList<URI> urisList = Lists.newArrayList(uris);
- Collection<IExtendedURI> extendedURICollection = Collections2.transform(urisList, CollabFunctionsFactory.getURIToExtendedURIWithContainment());
- HashSet<IExtendedURI> extendedURISet = Sets.newHashSet(extendedURICollection);
- ResourceSet resourceSet = getEditingDomain().getResourceSet();
- if (ICollaborativeManager.INSTANCE.isCollab(extendedURISet, resourceSet)) {
- IStatus status = LockAction.doSafeLock(resourceSet, extendedURISet, true);
- if (!status.isOK()) {
- return Optional.absent();
- }
- return Optional.of(true);
- }
- }
- return Optional.absent();
- }
-} \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/security/PreCommitReadOnlyHandler.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/security/PreCommitReadOnlyHandler.java
deleted file mode 100644
index 48492ceb6e7..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/security/PreCommitReadOnlyHandler.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.security;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.WeakHashMap;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.ResourceSetChangeEvent;
-import org.eclipse.emf.transaction.ResourceSetListenerImpl;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.core.resource.IModelSetSnippet;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.actions.LockAction;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Sets;
-
-
-/**
- * This model snippet will register a new {@link ResourceSetListener} that will provide a new security on modifed resources.
- * Each time a resource will be set to modified this listener will check that the resources has been locked. If the resources is not lock then it will
- * try to rollback the current transaction
- *
- * @author adaussy
- *
- */
-public class PreCommitReadOnlyHandler implements IModelSetSnippet {
-
- /**
- * This {@link ResourceSetListener} will listen each time a resource is modified to check that it has been locked or will ask for lock
- *
- * @author adaussy
- *
- */
- private static class ResourceSetListener extends ResourceSetListenerImpl {
-
- @Override
- public boolean isPostcommitOnly() {
- return false;
- }
-
- @Override
- public boolean isPrecommitOnly() {
- return true;
- }
-
- @Override
- public boolean isAggregatePrecommitListener() {
- return false;
- }
-
- /**
- * Filter only IS_MODIFIED notification
- */
- private static NotificationFilter filter = NotificationFilter.createFeatureFilter(Resource.class, Resource.RESOURCE__IS_MODIFIED);
-
- @Override
- public NotificationFilter getFilter() {
- return filter;
- }
-
-
- @Override
- public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException {
- final Set<Resource> resourceToTest = new HashSet<Resource>();
- for (Notification n : event.getNotifications()) {
- if (n.getNewBooleanValue()) {
- Resource resource = (Resource) n.getNotifier();
- // Filtered out any DI resource. Those resource are not collaborative resources
- if (!DiModel.MODEL_FILE_EXTENSION.equals(resource.getURI().fileExtension())) {
- resourceToTest.add(resource);
- }
- }
- }
- if (!resourceToTest.isEmpty()) {
- TransactionalEditingDomain editingDomain = event.getEditingDomain();
- ResourceSet resourceSet = editingDomain.getResourceSet();
- HashSet<IExtendedURI> uriToTest = Sets.newHashSet(Collections2.transform(resourceToTest, CollabFunctionsFactory.getResourceToExtendedURIWithContainment()));
- if (ICollaborativeManager.INSTANCE.isCollab(uriToTest, resourceSet)) {
- Set<IExtendedURI> uriToLock = new HashSet<IExtendedURI>();
- ILocker locker = ICollaborativeManager.INSTANCE.getLocker(uriToTest, resourceSet);
- if (locker == null) {
- return null;
- }
- for (IExtendedURI extendURI : locker.getExtendedSet()) {
- if (!locker.isLocked(extendURI).isOK()) {
- uriToLock.add(extendURI);
- }
- }
- if (!uriToLock.isEmpty()) {
- final IStatus status = LockAction.doSafeLock(resourceSet, uriToLock, true);
- if (!status.isOK()) {
- UIUtils.errorDialog(status, "Unable to lock");
- throw new RollbackException(status);
-
- }
- }
- }
- }
- return null;
- }
- }
-
- public PreCommitReadOnlyHandler() {
- }
-
-
- private WeakHashMap<EditingDomain, ResourceSetListener> link = new WeakHashMap<EditingDomain, PreCommitReadOnlyHandler.ResourceSetListener>();
-
- @Override
- public void start(ModelSet modelsManager) {
- TransactionalEditingDomain transactionalEditingDomain = modelsManager.getTransactionalEditingDomain();
- ResourceSetListener listener = new ResourceSetListener();
- link.put(transactionalEditingDomain, listener);
- transactionalEditingDomain.addResourceSetListener(listener);
-
- }
-
- @Override
- public void dispose(ModelSet modelsManager) {
- TransactionalEditingDomain transactionalEditingDomain = modelsManager.getTransactionalEditingDomain();
- transactionalEditingDomain.removeResourceSetListener(link.get(transactionalEditingDomain));
-
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/AbstractResourceBaseStrategy.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/AbstractResourceBaseStrategy.java
deleted file mode 100644
index e4b27613e19..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/AbstractResourceBaseStrategy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.stategies;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.strategy.AbstractLockingStrategy;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.PapyrusResourceUtils;
-
-
-/**
- * The Class AbstractResourceBaseStrategy.
- * Abstract class for strategy based on resources
- * TODO remove this class after release
- */
-public abstract class AbstractResourceBaseStrategy extends AbstractLockingStrategy {
-
-
-
- /**
- * Add all satellite resources (uml,di,notation).
- *
- * @param ressourceSet
- * the ressource set
- * @param uris
- * the uris
- * @param uri
- * the uri
- */
- protected void addExtraResources(ResourceSet ressourceSet, Collection<URI> uris, URI uri) {
- PapyrusResourceUtils.addExtraResources(ressourceSet, uris, uri);
- }
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/PapyrusCurrentResource.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/PapyrusCurrentResource.java
deleted file mode 100644
index 879c4b1a6b1..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/PapyrusCurrentResource.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.stategies;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.core.utils.ModelsUtil;
-
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Sets;
-
-
-/**
- * Strategy that will lock the current triplet resource of the selection (uml,di,notation).
- *
- * @author adaussy
- */
-public class PapyrusCurrentResource extends AbstractResourceBaseStrategy {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy#getBusinessObject(java.util.Collection)
- */
- @Override
- public Set<IExtendedURI> getBusinessObject(Collection<EObject> eOjbects) {
- if (!eOjbects.isEmpty()) {
- ResourceSet ressourceSet = eOjbects.iterator().next().eResource().getResourceSet();
- Collection<URI> uris = new HashSet<URI>();
- for (EObject o : ModelsUtil.getRoots(eOjbects)) {
- URI uri = o.eResource().getURI();
- if (!uris.contains(uri)) {
- uris.add(uri);
- addExtraResources(ressourceSet, uris, uri);
- }
- }
- return Sets.newHashSet(Collections2.transform(uris, CollabFunctionsFactory.getURIToExtendedURI()));
- }
- return Collections.emptySet();
- }
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/PapyrusSelectionAllContent.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/PapyrusSelectionAllContent.java
deleted file mode 100644
index a8eb05355d7..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/stategies/PapyrusSelectionAllContent.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.stategies;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-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.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.core.utils.ModelsUtil;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.Sets;
-
-
-/**
- * Locking strategy that will lock all resources which contains element contained by the selection.
- *
- * @author adaussy
- */
-public class PapyrusSelectionAllContent extends AbstractResourceBaseStrategy {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy#getBusinessObject(java.util.Collection)
- */
- @Override
- public Set<IExtendedURI> getBusinessObject(Collection<EObject> eOjbects) {
- if (!eOjbects.isEmpty()) {
- ResourceSet ressourceSet = eOjbects.iterator().next().eResource().getResourceSet();
- Collection<URI> uris = new HashSet<URI>();
- for (EObject o : ModelsUtil.getRoots(eOjbects)) {
- URI uri = o.eResource().getURI();
- if (!uris.contains(uri)) {
- uris.add(uri);
- addExtraResources(ressourceSet, uris, uri);
- }
- Predicate<Resource> semanticResourcePredicate = new Predicate<Resource>() {
-
- @Override
- public boolean apply(Resource input) {
- return "uml".equals(input.getURI().fileExtension());
- }
- };
- // Add all resource that contains at least one descendant of a selected resource
- for (Resource r : Collections2.filter(ressourceSet.getResources(), semanticResourcePredicate)) {
- for (EObject potentialDescedant : r.getContents()) {
- if (EcoreUtil.isAncestor(o, potentialDescedant)) {
- URI childResourceURI = r.getURI();
- if (!uris.contains(childResourceURI)) {
- uris.add(childResourceURI);
- addExtraResources(ressourceSet, uris, childResourceURI);
- continue;
- }
- }
- }
- }
- }
- return Sets.newHashSet(Collections2.transform(uris, CollabFunctionsFactory.getURIToExtendedURIWithContainment()));
- }
- return Collections.emptySet();
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/ICollabColors.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/ICollabColors.java
deleted file mode 100644
index eaad616c593..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/ICollabColors.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui;
-
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-
-
-public interface ICollabColors {
-
- public static final Color COMMIT_COLLOR = UIUtils.RESOURCE_MANAGER.createColor(new RGB(255, 65, 72));
-
- public static final Color UPDATE_COLLOR = UIUtils.RESOURCE_MANAGER.createColor(new RGB(133, 255, 161));
-
- public static final Color REVERT_COLLOR = UIUtils.RESOURCE_MANAGER.createColor(new RGB(255, 215, 78));
-
- public static final Color UNLOCK_COLLOR = UIUtils.RESOURCE_MANAGER.createColor(new RGB(172, 209, 62));
-
- public static final Color LOCK_COLLOR = UIUtils.RESOURCE_MANAGER.createColor(new RGB(232, 132, 59));
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/AbstractCollabHandler.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/AbstractCollabHandler.java
deleted file mode 100644
index ae6038489f0..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/AbstractCollabHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.actions;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.infra.core.editor.CoreMultiDiagramEditor;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabUtils;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * Abstract class for Collaborative handler which are enable only if the project is collaborative.
- *
- * @author adaussy
- */
-public abstract class AbstractCollabHandler extends AbstractHandler {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- EObject firstSelection = UIUtils.getFirstSelection();
- if (firstSelection != null) {
- return CollabUtils.isCollab(firstSelection);
- }
- return false;
- }
-
- protected ResourceSet getResourceSet() {
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if (editor instanceof CoreMultiDiagramEditor) {
- CoreMultiDiagramEditor papyrusEditor = (CoreMultiDiagramEditor) editor;
- return papyrusEditor.getEditingDomain().getResourceSet();
- } else {
- return null;
- }
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/CommitHandler.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/CommitHandler.java
deleted file mode 100644
index 87ab26c53cb..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/CommitHandler.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.actions;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.strategy.MatchingURIObject;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.ICollabColors;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs.CommitDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs.PreviewDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.providers.ExtensivePartitionNameLabelProvider;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * Handler use to deal with Commit action
- * The commit action will be performed on all the current model
- *
- * @author adaussy
- */
-public class CommitHandler extends AbstractCollabHandler {
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- // Check that everything is commit
- if (!UIUtils.saveAllDirtyEditor().isOK()) {
- return null;
- }
- ResourceSet resourceSet = getResourceSet();
- if (resourceSet == null) {
- UIUtils.errorDialog(CollabStatus.createErrorStatus("unable to retreive the resource set"), "Collaboratibe error");
- return null;
- }
- Set<IExtendedURI> uris = new HashSet<IExtendedURI>();
- for (Resource r : resourceSet.getResources()) {
- IFile file = WorkspaceSynchronizer.getFile(r);
- if (file != null && file.exists()) {
- uris.add(new ExtendedURI(r.getURI()));
- }
- }
- IStatus status = doCommit(uris, resourceSet, true, null);
- if (!status.isOK() && status.getCode() == IStatus.ERROR) {
- UIUtils.errorDialog(status, "Error");
- }
- return null;
-
-
- }
-
- /**
- * Do commit action
- *
- * @param uris
- * the uris to commit
- * @param resourceSet
- * the resource set
- * @param isPreview
- * Set to true if the used to be given preview
- * @param message
- * the message used for the commit operation
- * @return the {@link IStatus} of the operation
- */
- public static IStatus doCommit(Set<IExtendedURI> uris, ResourceSet resourceSet, boolean isPreview, String message) {
- ICommitter committer = ICollaborativeManager.INSTANCE.getCommitter(uris, resourceSet);
- if (committer == null) {
- return CollabStatus.createErrorStatus("Unable to get a ICommitter for uris\n" + uris);
- }
- Set<IExtendedURI> toBeCommitted = committer.getExtendedSet();
- IStatus status = doCommitFromBuilder(resourceSet, committer, toBeCommitted, isPreview, message);
- if (!status.isOK()) {
- return status;
- }
- return Status.OK_STATUS;
-
- }
-
- /**
- * Do commit from builder using a already created {@link ICommitter}
- *
- * @param resourceSet
- * the resource set
- * @param committer
- * the {@link ICommitter} to use
- * @param toBeCommitted
- * {@link IExtendedURI} of what is about to be committed
- * @param isPreview
- * Set to true if the user has to be given preview
- * @param message
- * the message
- * @return the i status
- * @throws CollabException
- * the collab exception
- */
- public static IStatus doCommitFromBuilder(ResourceSet resourceSet, ICommitter committer, Set<IExtendedURI> toBeCommitted, boolean isPreview, String message) {
- if (isPreview || message == null) {
- ExtensivePartitionNameLabelProvider labelProvider = new ExtensivePartitionNameLabelProvider(new MatchingURIObject(toBeCommitted), UIUtils.getModelExplorerLavelProvider());
- labelProvider.setColor(ICollabColors.COMMIT_COLLOR);
- CommitDialog commitDialog = new CommitDialog(Display.getDefault().getActiveShell(), labelProvider, "Commit Dialog", "Element in red will be committed");
- Collection<EObject> objectsToReveal = UIUtils.getLeafSemanticElement(toBeCommitted, resourceSet);
- if (objectsToReveal != null && !objectsToReveal.isEmpty()) {
- commitDialog.setObjectsToReveal(objectsToReveal);
- }
- if (commitDialog.open() == Window.OK) {
- message = commitDialog.getCommitMessage();
- } else {
- return Status.CANCEL_STATUS;
- }
- }
-
- // Keep lock force to true. This shall be improve later
- IStatus commitStatus = committer.commit(message, true);
- UIUtils.refreshModelExplorer(toBeCommitted, resourceSet);
- if (!commitStatus.isOK()) {
- return commitStatus;
- }
- return Status.OK_STATUS;
- }
-
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/LockAction.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/LockAction.java
deleted file mode 100644
index a9ab5cf7c32..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/LockAction.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.actions;
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IUpdater;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy;
-import org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy.Descriptor;
-import org.eclipse.papyrus.team.collaborative.strategy.MatchingURIObject;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.ICollabColors;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs.PreviewDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.providers.ExtensivePartitionNameLabelProvider;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * The Class LockAction.
- */
-public class LockAction extends Action {
-
- /** The strategy. */
- protected ILockingStrategy.Descriptor strategy;
-
- /**
- * Instantiates a new lock action.
- *
- * @param strategy
- * the strategy
- */
- public LockAction(Descriptor strategy) {
- super();
- this.strategy = strategy;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- super.run();
- Collection<EObject> selection = UIUtils.getSelection();
- if (!selection.isEmpty()) {
- IStatus status = doLock(selection, strategy);
- if (!status.isOK()) {
- UIUtils.errorDialog(status, "Unable to lock");
- }
- }
- return;
- }
-
-
- /**
- * Do lock action
- *
- * @param selection
- * the selection
- * @param strategy
- * the strategy the selected {@link ILockingStrategy.Descriptor}
- * @return the i status
- */
- public static IStatus doLock(Collection<EObject> selection, ILockingStrategy.Descriptor strategy) {
- EObject eObject = selection.iterator().next();
- ResourceSet resourceSet = eObject.eResource().getResourceSet();
- // Execute the strategy to define the functional object to lock
- Set<IExtendedURI> objectToLock = strategy.getStrategy().getBusinessObject(selection);
- return doSafeLock(resourceSet, objectToLock, true);
- }
-
-
- /**
- * Do lock action
- *
- * @param resourceSet
- * the resource set
- * @param objectToLock
- * the {@link IExtendedURI} about to be locked
- * @param usePreview
- * Set to true if the user has to be given preview
- * @return the {@link IStatus} of the operation
- */
- public static IStatus doSafeLock(ResourceSet resourceSet, Set<IExtendedURI> objectToLock, boolean usePreview) {
- // Check that everything is up to date
- IUpdater updater = ICollaborativeManager.INSTANCE.getUpdater(objectToLock, resourceSet);
- if (updater == null) {
- UIUtils.errorDialog(CollabStatus.createErrorStatus("Unable to find a updater"), "Unable to find a updater");
- return CollabStatus.createErrorStatus("Unable to find a updater");
- }
- if (!updater.getExtendedSet().isEmpty()) {
- if (MessageDialog.openConfirm(Display.getDefault().getActiveShell(), "Need update", "You need to update those elements in order to perform a lock")) {
- IStatus status = UpdateHandler.doUpdateFromUpdater(resourceSet, updater, true);
- if (!status.isOK()) {
- UIUtils.errorDialog(status, "Error");
- }
- resourceSet = UIUtils.getCurrentResourceSet();
- } else {
- return Status.CANCEL_STATUS;
- }
- }
-
- return doUnlock(resourceSet, objectToLock, usePreview);
-
- }
-
- protected static IStatus doUnlock(ResourceSet resourceSet, Set<IExtendedURI> objectToLock, boolean usePreview) {
- ILocker locker = ICollaborativeManager.INSTANCE.getLocker(objectToLock, resourceSet);
- if (locker == null) {
- UIUtils.errorDialog(CollabStatus.createErrorStatus("Unable to find a locker"), "Unable to lock");
- return CollabStatus.createErrorStatus("Unable to find a locker");
- }
-
- Set<IExtendedURI> needsLock = locker.getExtendedSet();
- if (usePreview) {
- // Check if the lock can be taken
- ExtensivePartitionNameLabelProvider labelProvider = new ExtensivePartitionNameLabelProvider(new MatchingURIObject(needsLock), UIUtils.getModelExplorerLavelProvider());
- labelProvider.setColor(ICollabColors.LOCK_COLLOR);
- PreviewDialog previewDialog = new PreviewDialog(Display.getDefault().getActiveShell(), labelProvider, "Lock Preview", "Element in orange will be locked");
- Collection<EObject> objectsToReveal = UIUtils.getLeafSemanticElement(needsLock, resourceSet);
- if (objectsToReveal != null && !objectsToReveal.isEmpty()) {
- previewDialog.setObjectsToReveal(objectsToReveal);
- }
- if (previewDialog.open() != Window.OK) {
- return Status.CANCEL_STATUS;
- }
- }
- IStatus status = locker.lock();
- UIUtils.refreshModelExplorer(needsLock, resourceSet);
- return status;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.Action#getText()
- */
- @Override
- public String getText() {
- return strategy.getName();
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/RevertHandler.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/RevertHandler.java
deleted file mode 100644
index c40a709a56d..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/RevertHandler.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.actions;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IReverter;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.strategy.MatchingURIObject;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.ICollabColors;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs.PreviewDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.providers.ExtensivePartitionNameLabelProvider;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.swt.widgets.Display;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * Handler use for Revert action
- * The revert action will be performe on all the current model.
- *
- * @author adaussy
- */
-public class RevertHandler extends AbstractCollabHandler {
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- // Check that everything is commit
- if (!UIUtils.saveAllDirtyEditor().isOK()) {
- return null;
- }
- ResourceSet resourceSet = getResourceSet();
- if (resourceSet == null) {
- UIUtils.errorDialog(CollabStatus.createErrorStatus("unable to retreive the resource set"), "Collaboratibe error");
- return null;
- }
- Set<IExtendedURI> uris = new HashSet<IExtendedURI>();
- for (Resource r : resourceSet.getResources()) {
- IFile file = WorkspaceSynchronizer.getFile(r);
- if (file != null && file.exists()) {
- uris.add(new ExtendedURI(r.getURI()));
- }
- }
- IStatus status = doRevert(uris, resourceSet);
- if (!status.isOK() && status.getCode() == IStatus.ERROR) {
- UIUtils.errorDialog(status, "Error");
- }
-
- return null;
-
- }
-
- /**
- * Do revert action
- *
- * @param uris
- * the uris about to be reverted
- * @param resourceSet
- * the resource set
- * @return the {@link IStatus} of the operation
- * @throws CollabException
- * the collab exception
- */
- public static IStatus doRevert(Set<IExtendedURI> uris, ResourceSet resourceSet) {
-
- IReverter reverter = ICollaborativeManager.INSTANCE.getReverter(uris, resourceSet);
- if (reverter == null) {
- CollabStatus errorStatus = CollabStatus.createErrorStatus("Unable to find a reverter");
- return errorStatus;
- }
-
- Set<IExtendedURI> toBeCommitted = reverter.getExtendedSet();
- IStatus status = doRevertFromBuilder(resourceSet, reverter, toBeCommitted);
- return status;
-
- }
-
- /**
- * Do revert using an existing {@link IReverter}s
- *
- * @param resourceSet
- * the resource set
- * @param reverter
- * the reverter
- * @param toBeReverted
- * the {@link IExtendedURI} about to be reverted
- * @return the {@link IStatus} of the operation
- * @throws CollabException
- * the collab exception
- */
- public static IStatus doRevertFromBuilder(ResourceSet resourceSet, IReverter reverter, Set<IExtendedURI> toBeReverted) {
- ExtensivePartitionNameLabelProvider labelProvider = new ExtensivePartitionNameLabelProvider(new MatchingURIObject(toBeReverted), UIUtils.getModelExplorerLavelProvider());
- labelProvider.setColor(ICollabColors.REVERT_COLLOR);
- PreviewDialog revertDialog = new PreviewDialog(Display.getDefault().getActiveShell(), labelProvider, "Revert Dialog", "Element in yellow will be reverted");
- Collection<EObject> objectsToReveal = UIUtils.getLeafSemanticElement(toBeReverted, resourceSet);
- if (objectsToReveal != null && !objectsToReveal.isEmpty()) {
- revertDialog.setObjectsToReveal(objectsToReveal);
- }
- if (revertDialog.open() == Window.OK) {
-
- // Keep lock force to true. This shall be improve later
- IStatus commitStatus = reverter.revert();
- UIUtils.refreshModelExplorer(toBeReverted, resourceSet);
- UIUtils.reloadEditor();
- return commitStatus;
- } else {
- return Status.CANCEL_STATUS;
- }
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/UnlockAction.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/UnlockAction.java
deleted file mode 100644
index 74e331bc0ae..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/UnlockAction.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.actions;
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.IUnlocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy;
-import org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy.Descriptor;
-import org.eclipse.papyrus.team.collaborative.strategy.MatchingURIObject;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.ICollabColors;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs.PreviewDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.providers.ExtensivePartitionNameLabelProvider;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * Handler for the Unlock action in Papyrus
- */
-public class UnlockAction extends Action {
-
- /** The strategy. */
- protected ILockingStrategy.Descriptor strategy;
-
- /**
- * Instantiates a new unlock action.
- *
- * @param strategy
- * the strategy
- */
- public UnlockAction(Descriptor strategy) {
- super();
- this.strategy = strategy;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- if (!UIUtils.saveAllDirtyEditor().isOK()) {
- return;
- }
- Collection<EObject> selection = UIUtils.getSelection();
- if (!selection.isEmpty()) {
- IStatus status = doSafeUnlock(selection, strategy);
- if (!status.isOK()) {
- UIUtils.errorDialog(status, "Error during Unlock");
- }
- }
- super.run();
- }
-
- /**
- * Do unlock.
- *
- * @param selection
- * The {@link EObject} selected by the user
- * @param strategy
- * the strategy use to compute the business object set to unlock
- * @throws CollabException
- * the collab exception
- */
- public static IStatus doSafeUnlock(Collection<EObject> selection, ILockingStrategy.Descriptor strategy) {
- EObject firstSelectedObject = selection.iterator().next();
- ResourceSet resourceSet = firstSelectedObject.eResource().getResourceSet();
-
- // Execute the strategy to define the functional object to lock
- Set<IExtendedURI> objectToLock = strategy.getStrategy().getBusinessObject(selection);
- // First check there no modification uncommitted
- ICommitter committer = ICollaborativeManager.INSTANCE.getCommitter(objectToLock, resourceSet);
- if (committer == null) {
- return CollabStatus.createErrorStatus("Unable to find an Committer");
- }
-
- IStatus preventUnlockingWithUntrackedModification = preventUnlockingWithUntrackedModification(resourceSet, objectToLock, committer, firstSelectedObject);
- if (!preventUnlockingWithUntrackedModification.isOK()) {
- return preventUnlockingWithUntrackedModification;
- }
- // Reset the resourceSet because the editor may have been reloaded
- resourceSet = UIUtils.getCurrentResourceSet();
-
- IUnlocker unlocker = ICollaborativeManager.INSTANCE.getUnlocker(objectToLock, resourceSet);
- if (unlocker == null) {
- return CollabStatus.createErrorStatus("Unable to find a unlocker for:\n " + objectToLock);
- }
- return doUnlock(resourceSet, unlocker);
- }
-
- protected static IStatus doUnlock(ResourceSet resourceSet, IUnlocker unlocker) {
- Set<IExtendedURI> needUnlock = unlocker.getExtendedSet();
- // Check if the lock can be taken
- ExtensivePartitionNameLabelProvider labelProvider = new ExtensivePartitionNameLabelProvider(new MatchingURIObject(needUnlock), UIUtils.getModelExplorerLavelProvider());
- labelProvider.setColor(ICollabColors.UNLOCK_COLLOR);
- PreviewDialog unlockPreviewDialog = new PreviewDialog(Display.getDefault().getActiveShell(), labelProvider, "Unlock Preview", "Element in green will be unlocked");
- Collection<EObject> objectsToReveal = UIUtils.getLeafSemanticElement(needUnlock, resourceSet);
- if (objectsToReveal != null && !objectsToReveal.isEmpty()) {
- unlockPreviewDialog.setObjectsToReveal(objectsToReveal);
- }
- if (unlockPreviewDialog.open() == Window.OK) {
- IStatus lockResult = unlocker.unlock();
- UIUtils.refreshModelExplorer(needUnlock, resourceSet);
- return lockResult;
- } else {
- return Status.CANCEL_STATUS;
- }
- }
-
-
- /**
- * Prevent unlocking with untracked modification.
- *
- * @param resourceSet
- * the resource set
- * @param objectToLock
- * the object to lock
- * @param committer
- * the committer
- * @param selected
- * the selected
- * @return the i status
- */
- private static IStatus preventUnlockingWithUntrackedModification(ResourceSet resourceSet, Set<IExtendedURI> objectToLock, ICommitter committer, EObject selected) {
- Set<IExtendedURI> committableResource = committer.getExtendedSet();
- if (!committableResource.isEmpty()) {
- // The user shall either commit or revert it's changes
- MessageDialog dialog = new MessageDialog(Display.getCurrent().getActiveShell(), "Modification in progess", null, "You have untrackted modification. You either have to commit it or revert it(Everything will be lost) to release the lock",
- MessageDialog.WARNING, new String[] { "Commit", "Revert" }, 0);
- int dialogResult = dialog.open();
- if (dialogResult == 0) {
- // then commit
- return CommitHandler.doCommitFromBuilder(resourceSet, committer, committableResource, true, null);
- } else if (dialogResult == 1) {
- // then revert
- return RevertHandler.doRevert(committableResource, resourceSet);
- } else {
- // cancel
- return Status.CANCEL_STATUS;
- }
- }
- return Status.OK_STATUS;
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.Action#getText()
- */
- @Override
- public String getText() {
- return strategy.getName();
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/UpdateHandler.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/UpdateHandler.java
deleted file mode 100644
index 30ee80749f3..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/actions/UpdateHandler.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.actions;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.team.collaborative.core.ExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IUpdater;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.strategy.MatchingURIObject;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.ICollabColors;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs.PreviewDialog;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.providers.ExtensivePartitionNameLabelProvider;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * Handler for Update action in Papyrus
- * The update will be performed in all the current model
- */
-public class UpdateHandler extends AbstractCollabHandler {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- if (!UIUtils.saveAllDirtyEditor().isOK()) {
- return null;
- }
- ResourceSet resourceSet = getResourceSet();
- if (resourceSet == null) {
- UIUtils.errorDialog(CollabStatus.createErrorStatus("unable to retreive the resource set"), "Collaboratibe error");
- return null;
- }
- Set<IExtendedURI> uris = new HashSet<IExtendedURI>();
- for (Resource r : resourceSet.getResources()) {
- IFile file = WorkspaceSynchronizer.getFile(r);
- if (file != null && file.exists()) {
- uris.add(new ExtendedURI(r.getURI()));
- }
- }
- IStatus status = doUpdate(uris, resourceSet, true);
- if (!status.isOK()) {
- UIUtils.errorDialog(status, "Error");
- }
- return null;
-
- }
-
- /**
- * Do update action
- *
- * @param uris
- * the {@link IExtendedURI} to update
- * @param resourceSet
- * the resource set
- * @throws CollabException
- * the collab exception
- */
- public static IStatus doUpdate(Set<IExtendedURI> uris, ResourceSet resourceSet, boolean preview) {
- IUpdater updater = ICollaborativeManager.INSTANCE.getUpdater(uris, resourceSet);
- if (updater == null) {
- return CollabStatus.createErrorStatus("Unable to find an Updater for: \n" + uris);
- }
- return doUpdateFromUpdater(resourceSet, updater, preview);
-
- }
-
- public static IStatus doUpdateFromUpdater(ResourceSet resourceSet, IUpdater updater, boolean preview) {
- Set<IExtendedURI> toUpdate = updater.getExtendedSet();
- if (!toUpdate.isEmpty()) {
- if (preview) {
- ExtensivePartitionNameLabelProvider labelProvider = new ExtensivePartitionNameLabelProvider(new MatchingURIObject(toUpdate), UIUtils.getModelExplorerLavelProvider());
- labelProvider.setColor(ICollabColors.UPDATE_COLLOR);
- PreviewDialog previewDialog = new PreviewDialog(Display.getDefault().getActiveShell(), labelProvider, "Update Preview", "Element in light green will be updated");
- Collection<EObject> objectsToReveal = UIUtils.getLeafSemanticElement(toUpdate, resourceSet);
- if (objectsToReveal != null && !objectsToReveal.isEmpty()) {
- previewDialog.setObjectsToReveal(objectsToReveal);
- }
- if (previewDialog.open() != Window.OK) {
- return CollabStatus.createErrorStatus("Canceled by user");
- }
- }
- IStatus updateStatus = updater.update();
- UIUtils.reloadEditor();
- return updateStatus;
- } else {
- MessageDialog.openInformation(Display.getDefault().getActiveShell(), "Nothing to do", "Nothing to update");
- return Status.OK_STATUS;
- }
- }
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/dialogs/CommitDialog.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/dialogs/CommitDialog.java
deleted file mode 100644
index 9851b158d1b..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/dialogs/CommitDialog.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-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.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-
-/**
- * Dialog used to gather inforamtion before commit
- */
-public class CommitDialog extends PreviewDialog {
-
- /** The toolkit. */
- private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());
-
- /** The message value text. */
- private Text messageValueText;
-
- /**
- * Instantiates a new commit dialog.
- *
- * @param parentShell
- * the parent shell
- * @param labelProvider
- * the label provider
- * @param title
- * the title
- * @param message
- * the message
- */
- public CommitDialog(Shell parentShell, ILabelProvider labelProvider, String title, String message) {
- super(parentShell, labelProvider, title, message);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.integration.papyrus.ui.dialogs.PreviewDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- Control result = super.createDialogArea(parent);
- commitComposite((Composite) result, SWT.BORDER);
- return result;
-
- }
-
- /** The message. */
- protected String message = "";
-
- /** The keep lock. */
- protected boolean keepLock = false;
-
- /**
- * Commit composite.
- *
- * @param parent
- * the parent
- * @param style
- * the style
- * @return the composite
- */
- public Composite commitComposite(Composite parent, int style) {
- Composite commitComposite = new Composite(parent, style);
- commitComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- toolkit.adapt(commitComposite);
- toolkit.paintBordersFor(commitComposite);
- commitComposite.setLayout(new GridLayout(1, false));
-
- Label lblMessage = new Label(commitComposite, SWT.NONE);
- toolkit.adapt(lblMessage, true, true);
- lblMessage.setText("Message:");
-
- messageValueText = new Text(commitComposite, SWT.BORDER);
- messageValueText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- messageValueText.addModifyListener(new ModifyListener() {
-
- @Override
- public void modifyText(ModifyEvent e) {
- message = messageValueText.getMessage();
-
- }
- });
- toolkit.adapt(messageValueText, true, true);
-
- Composite composite = new Composite(commitComposite, SWT.NONE);
- toolkit.adapt(composite);
- toolkit.paintBordersFor(composite);
- composite.setLayout(new GridLayout(1, false));
- return commitComposite;
- }
-
-
- /**
- * Gets the commit message.
- *
- * @return the commit message
- */
- public String getCommitMessage() {
- return message;
- }
-
-
- /**
- * Checks if is keep lock.
- *
- * @return true, if is keep lock
- */
- public boolean isKeepLock() {
- return keepLock;
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/dialogs/PreviewDialog.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/dialogs/PreviewDialog.java
deleted file mode 100644
index 2da0482f141..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/dialogs/PreviewDialog.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForWorkbenchPage;
-import org.eclipse.papyrus.uml.tools.providers.SemanticUMLContentProvider;
-import org.eclipse.papyrus.views.modelexplorer.CustomCommonViewer;
-import org.eclipse.papyrus.views.modelexplorer.matching.IMatchingItem;
-import org.eclipse.papyrus.views.modelexplorer.matching.ModelElementItemMatchingItem;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
-
-
-/**
- * The Class PreviewDialog.
- * The preview dialog is a generic dialog use to display feedback to the user using specific {@link ILabelProvider}
- */
-public class PreviewDialog extends TitleAreaDialog {
-
-
- /** The title. */
- private String title;
-
- /** The message. */
- private String message;
-
- /** The label provider. */
- private ILabelProvider labelProvider;
-
- /** The tree viewer. */
- private TreeViewer treeViewer;
-
- /** The objects to reveal. */
- private Collection<EObject> objectsToReveal;
-
-
-
- /**
- * Sets the objects to reveal.
- *
- * @param objectToReveal
- * the new objects to reveal
- */
- public void setObjectsToReveal(Collection<EObject> objectToReveal) {
- this.objectsToReveal = objectToReveal;
- }
-
- /**
- * Create contents of the dialog.
- *
- * @param parent
- * the parent
- * @return the control
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- setMessage(message);
- setTitle(title);
- Composite area = (Composite) super.createDialogArea(parent);
- Composite container = new Composite(area, SWT.NONE);
- container.setLayout(new FillLayout(SWT.HORIZONTAL));
- container.setLayoutData(new GridData(GridData.FILL_BOTH));
- treeViewer = new CustomCommonViewer("org.eclipse.papyrus.modelexplorer.modelexplorer", container, SWT.BORDER);
- treeViewer.setContentProvider(new SemanticUMLContentProvider() {
-
- // @Override
- // protected static EObject[] getRoots(ResourceSet root) {
- // if(root instanceof ModelSet) {
- // ModelSet modelSet = (ModelSet)root;
- // UmlModel umlModel = (UmlUtils.getUmlModel(modelSet));
- //
- // if(umlModel == null)
- // return null;
- //
- // EList<EObject> contents = umlModel.getResource().getContents();
- // ArrayList<EObject> result = new ArrayList<EObject>();
- // Iterator<EObject> iterator = contents.iterator();
- // while(iterator.hasNext()) {
- // EObject eObject = (EObject)iterator.next();
- // //Shall be improved
- // if(eObject.eClass().getEPackage().getNsURI().contains("uml")) {
- // result.add(eObject);
- // }
- // }
- // }
- // return result.toArray(new EObject[result.size()]);
- // }
-
- // @Override
- // public Object[] getChildren(Object parentElement) {
- // //Remove duplicate
- // Object[] superChildren = super.getChildren(parentElement);
- //
- // List<Object> result = new ArrayList<Object>();
- // for(int i = 0; i < superChildren.length; i++) {
- // Object c = superChildren[i];
- // if(!result.contains(c)) {
- // result.add(c);
- // }
- // }
- // return result.toArray(new Object[result.size()]);
- // }
- });
- treeViewer.setLabelProvider(labelProvider);
-
- try {
- IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- ServicesRegistry serviceRegistry = ServiceUtilsForWorkbenchPage.getInstance().getServiceRegistry(activePage);
- treeViewer.setInput(serviceRegistry);
- if (objectsToReveal != null) {
- reveal(objectsToReveal);
- }
- } catch (ServiceException e) {
- e.printStackTrace();
- }
-
- return area;
- }
-
- /**
- * Create contents of the button bar.
- *
- * @param parent
- * the parent
- */
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /**
- * Return the initial size of the dialog.
- *
- * @return the initial size
- */
- @Override
- protected Point getInitialSize() {
- return new Point(600, 600);
- }
-
- /**
- * Create the dialog.
- *
- * @param parentShell
- * the parent shell
- * @param labelProvider
- * the label provider
- * @param title
- * the title
- * @param message
- * the message
- */
- public PreviewDialog(Shell parentShell, ILabelProvider labelProvider, String title, String message) {
- super(parentShell);
- setShellStyle(SWT.SHELL_TRIM);
- setHelpAvailable(false);
- this.title = title;
- this.message = message;
- this.labelProvider = labelProvider;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.window.Window#open()
- */
- @Override
- public int open() {
- int result = super.open();
- return result;
- }
-
-
-
- /**
- * Reveal.
- *
- * @param elementList
- * the element list
- */
- public void reveal(Iterable<?> elementList) {
- ArrayList<IMatchingItem> matchingItemsToSelect = new ArrayList<IMatchingItem>();
- // filter out non EMF objects
- Iterable<EObject> list = Iterables.transform(Iterables.filter(elementList, EObject.class), new Function<Object, EObject>() {
-
- @Override
- public EObject apply(Object from) {
- return (EObject) from;
- }
- });
-
- for (EObject currentEObject : list) {
- // TODO The custom ModelExplorer Revealer feature has not yet been backported.
- // See bug 426360. For now, we only reveal the given EObjects.
- // EObject itemToSelect = ModelExplorerRevealerManager.getTargetObjectToRegveal(currentEObject);
- matchingItemsToSelect.add(new ModelElementItemMatchingItem(currentEObject));
-
- // Does the content provider exist?
- // if(treeViewer.getContentProvider() != null) {
-
- /*
- * reveal the ancestors tree using expandToLevel on each of them
- * in the good order. This is a lot faster than going through the whole tree
- * using getChildren of the ContentProvider since our Viewer uses a Hashtable
- * to keep track of the revealed elements.
- *
- * However we need to use a dedicated MatchingItem to do the matching,
- * and a specific comparer in our viewer so than the equals of MatchingItem is
- * used in priority.
- *
- * Please refer to MatchingItem for more infos.
- */
- // for(IMatchingItem item : ModelExplorerRevealerManager.getChainToReveal(itemToSelect)) {
- // treeViewer.expandToLevel(item, 1);
- // }
- // }
- }
- treeViewer.expandToLevel(new StructuredSelection(matchingItemsToSelect), AbstractTreeViewer.ALL_LEVELS);
- }
-
- /**
- * Select reveal.
- *
- * @param selection
- * the selection
- */
- public void selectReveal(ISelection selection) {
- if (treeViewer != null) {
- treeViewer.setSelection(selection, true);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.core.ui.IRevealSemanticElement#revealSemanticElement(java.util.List)
- */
- /**
- * Reveal semantic element.
- *
- * @param elementList
- * the element list
- */
- public void revealSemanticElement(List<?> elementList) {
- reveal(elementList);
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/items/LockStrategyItemProvider.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/items/LockStrategyItemProvider.java
deleted file mode 100644
index 2b07215adba..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/items/LockStrategyItemProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.items;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabUtils;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.actions.LockAction;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Collections2;
-
-
-/**
- * Item provider which fill the menu with all lock strategy.
- *
- * @author adaussy
- */
-public class LockStrategyItemProvider extends org.eclipse.ui.actions.CompoundContributionItem {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
- */
- @Override
- protected IContributionItem[] getContributionItems() {
- if (isEnabled()) {
- Collection<ActionContributionItem> contribution = Collections2.transform(ICollaborativeManager.INSTANCE.getStrategies().values(), new Function<ILockingStrategy.Descriptor, ActionContributionItem>() {
-
- @Override
- public ActionContributionItem apply(final ILockingStrategy.Descriptor from) {
-
- Action action = new LockAction(from);
- ActionContributionItem actionContributionItem = new ActionContributionItem(action);
- return actionContributionItem;
- }
- });
- return contribution.toArray(new IContributionItem[contribution.size()]);
- }
-
- return new IContributionItem[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.ContributionItem#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- EObject firstSelection = UIUtils.getFirstSelection();
- if (firstSelection != null) {
- return CollabUtils.isCollab(firstSelection);
- }
- return false;
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/items/UnlockStrategyItemProvider.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/items/UnlockStrategyItemProvider.java
deleted file mode 100644
index 4cdc5d42429..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/items/UnlockStrategyItemProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.items;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.papyrus.team.collaborative.core.ICollaborativeManager;
-import org.eclipse.papyrus.team.collaborative.core.strategy.ILockingStrategy;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabUtils;
-import org.eclipse.papyrus.team.collaborative.strategy.ui.actions.UnlockAction;
-import org.eclipse.papyrus.team.collaborative.strategy.utils.UIUtils;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Collections2;
-
-
-/**
- * Item provider which fill the menu with all unlock strategy.
- */
-public class UnlockStrategyItemProvider extends org.eclipse.ui.actions.CompoundContributionItem {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
- */
- @Override
- protected IContributionItem[] getContributionItems() {
- if (isEnabled()) {
- Collection<ActionContributionItem> contribution = Collections2.transform(ICollaborativeManager.INSTANCE.getStrategies().values(), new Function<ILockingStrategy.Descriptor, ActionContributionItem>() {
-
- @Override
- public ActionContributionItem apply(final ILockingStrategy.Descriptor from) {
-
- Action action = new UnlockAction(from);
- ActionContributionItem actionContributionItem = new ActionContributionItem(action);
- return actionContributionItem;
- }
- });
-
-
- return contribution.toArray(new IContributionItem[contribution.size()]);
- }
-
- return new IContributionItem[0];
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.ContributionItem#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- EObject firstSelection = UIUtils.getFirstSelection();
- if (firstSelection != null) {
- return CollabUtils.isCollab(firstSelection);
- }
- return false;
- }
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/providers/ExtensivePartitionNameLabelProvider.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/providers/ExtensivePartitionNameLabelProvider.java
deleted file mode 100644
index 17d66cc1a0f..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/ui/providers/ExtensivePartitionNameLabelProvider.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.ui.providers;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.IFontProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-
-import com.google.common.base.Predicate;
-
-
-/**
- * The Class ExtensiveLabelProvider. {@link ILabelProvider} that extend the one use by the model explorer view.
- * This label provider can customize label and color of display object using predicate
- */
-public class ExtensivePartitionNameLabelProvider implements IFontProvider, IColorProvider, ILabelProvider {
-
-
- private ILabelProvider internal;
-
-
- /** The color. */
- private Color color;
-
- /** The font. */
- private Font font;
-
- /** The predicate. */
- private Predicate<EObject> predicate;
-
- /**
- * Instantiates a new extensive label provider.
- *
- * @param predicate
- * the predicate
- */
- public ExtensivePartitionNameLabelProvider(Predicate<EObject> predicate, ILabelProvider internal) {
- super();
- this.predicate = predicate;
- this.internal = internal;
- }
-
- public ExtensivePartitionNameLabelProvider(ILabelProvider internal) {
- super();
- this.predicate = null;
- this.internal = internal;
- }
-
-
- /**
- * Sets the color.
- *
- * @param color
- * the new color
- */
- public void setColor(Color color) {
- this.color = color;
- }
-
-
- /**
- * Sets the font.
- *
- * @param font
- * the new font
- */
- public void setFont(Font font) {
- this.font = font;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.modelexplorer.MoDiscoLabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText(Object element) {
- String superText = internal.getText(element);
- EObject eObject = EMFHelper.getEObject(element);
- if (eObject != null) {
- String partitionName = getPartitionName(eObject);
- if (partitionName != null) {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append(partitionName);
- stringBuilder.append(superText);
- superText = stringBuilder.toString();
- }
- }
- return superText;
- }
-
- private static final String CLOSING_BRACKET = "] ";
-
- private static final String OPEN_BRACKET = "[";
-
-
- /**
- * Gets the partition name.
- *
- * @param eObject
- * the e object
- * @return the partition name
- */
- protected String getPartitionName(EObject eObject) {
- Resource resource = eObject.eResource();
- if (resource != null) {
- URI uri = resource.getURI().trimFileExtension();
- String partitionName = uri.segment(uri.segmentCount() - 1);
- StringBuilder builder = new StringBuilder(OPEN_BRACKET);
- builder.append(partitionName);
- builder.append(CLOSING_BRACKET);
- return builder.toString();
- }
- return null;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.facet.infra.browser.uicore.CustomizableModelLabelProvider#getFont(java.lang.Object)
- */
- @Override
- public Font getFont(Object element) {
- if (predicate != null) {
- EObject eObject = EMFHelper.getEObject(element);
- if (eObject != null) {
- if (font != null) {
- if (predicate.apply(eObject)) {
- return font;
- }
- }
- }
- }
- if (internal instanceof IFontProvider) {
- return ((IFontProvider) internal).getFont(element);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.facet.infra.browser.uicore.CustomizableModelLabelProvider#getForeground(java.lang.Object)
- */
- @Override
- public Color getForeground(Object element) {
- if (predicate != null) {
- EObject eObject = EMFHelper.getEObject(element);
- if (eObject != null) {
- if (color != null) {
- if (predicate.apply(eObject)) {
- return color;
- }
- }
- }
- }
- if (internal instanceof IColorProvider) {
- return ((IColorProvider) internal).getForeground(element);
- }
- return null;
- }
-
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- internal.addListener(listener);
-
- }
-
-
- @Override
- public void dispose() {
- internal.dispose();
-
- }
-
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return internal.isLabelProperty(element, property);
- }
-
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- internal.removeListener(listener);
-
- }
-
-
- @Override
- public Image getImage(Object element) {
- return internal.getImage(element);
- }
-
-
- @Override
- public Color getBackground(Object element) {
- if (internal instanceof IColorProvider) {
- return ((IColorProvider) internal).getBackground(element);
- }
- return null;
- }
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/utils/PapyrusResourceUtils.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/utils/PapyrusResourceUtils.java
deleted file mode 100644
index e287737aea4..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/utils/PapyrusResourceUtils.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.utils;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
-import org.eclipse.papyrus.team.collaborative.core.utils.URIUtils;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-
-
-public class PapyrusResourceUtils {
-
- private static final String[] FILE_EXTENSIONS = new String[] { UmlModel.UML_FILE_EXTENSION, NotationModel.NOTATION_FILE_EXTENSION, DiModel.MODEL_FILE_EXTENSION };
-
-
- public static void addExtraResources(ResourceSet ressourceSet, Collection<URI> uris, URI uri) {
- String currentExtension = uri.fileExtension();
- for (String ext : FILE_EXTENSIONS) {
- if (!ext.equals(currentExtension)) {
- URI sateliteResource = URIUtils.getSateliteResource(uri, ext);
- if (URIUtils.isResourceURI(sateliteResource, ressourceSet)) {
- uris.add(sateliteResource);
- }
- }
- }
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/utils/UIUtils.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/utils/UIUtils.java
deleted file mode 100644
index 0ba09687cc0..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy/src/org/eclipse/papyrus/team/collaborative/strategy/utils/UIUtils.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.strategy.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-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.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.gmf.runtime.common.ui.dialogs.SaveAllDirtyEditorsDialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.resource.LocalResourceManager;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.infra.core.editor.CoreMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForWorkbenchPage;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.core.reports.LogHelper;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.core.utils.ModelsUtil;
-import org.eclipse.papyrus.team.collaborative.strategy.Activator;
-import org.eclipse.papyrus.team.collaborative.strategy.RefreshHelper;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Collections2;
-
-
-/**
- * Utility class for User Interface interactions.
- *
- * @author adaussy
- */
-public class UIUtils {
-
- /** The resource manager. */
- public static LocalResourceManager RESOURCE_MANAGER = new LocalResourceManager(JFaceResources.getResources());
-
- /**
- * Save all dirty editor.
- *
- * @return the {@link IStatus}
- */
- public static IStatus saveAllDirtyEditor() {
- // Force save
- IEditorPart[] dirtyEditors = SaveAllDirtyEditorsDialog.getDirtyEditors();
- if (dirtyEditors.length > 0) {
- SaveAllDirtyEditorsDialog dialog = new SaveAllDirtyEditorsDialog(Display.getDefault().getActiveShell());
- if (dialog.open() == Window.CANCEL) {
- return Status.CANCEL_STATUS;
- } else {
- for (int i = 0; i < dirtyEditors.length; i++) {
- IEditorPart editorI = dirtyEditors[i];
- editorI.doSave(new NullProgressMonitor());
- }
- }
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Gets the current resource set.
- *
- * @return the current resource set
- */
- public static ResourceSet getCurrentResourceSet() {
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if (editor instanceof CoreMultiDiagramEditor) {
- CoreMultiDiagramEditor papyrusEditor = (CoreMultiDiagramEditor) editor;
- return papyrusEditor.getEditingDomain().getResourceSet();
- }
- return null;
- }
-
- /**
- * Return all the leaf from the semantic meta model
- *
- * @param uris
- * Input set for the search of leaf
- * @param resourceSet
- * @return
- */
- public static Collection<EObject> getLeafSemanticElement(Collection<IExtendedURI> uris, ResourceSet resourceSet) {
- Collection<IExtendedURI> semanticURIS = Collections2.filter(uris, new Predicate<IExtendedURI>() {
-
- @Override
- public boolean apply(IExtendedURI arg0) {
- return UmlModel.UML_FILE_EXTENSION.equals(arg0.getUri().fileExtension());
- }
- });
- Collection<Collection<EObject>> eObjects = Collections2.transform(semanticURIS, CollabFunctionsFactory.getExtendedURIToEObjects(resourceSet));
- Set<EObject> semanticElements = new HashSet<EObject>();
- for (Collection<EObject> eos : eObjects) {
- semanticElements.addAll(eos);
- }
- return ModelsUtil.getRoots(semanticElements);
- }
-
- /**
- * Gets the first selection from the workbench
- *
- * @return the first selection
- */
- public static EObject getFirstSelection() {
- Collection<EObject> selection = getSelection();
- if (selection.isEmpty()) {
- return null;
- }
- return selection.iterator().next();
- }
-
- /**
- * Gets the selection from the workbench
- *
- * @return the selection
- */
- public static Collection<EObject> getSelection() {
- ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
- ISelection selection = selectionService.getSelection();
- if (selection != null) {
- if (selection instanceof IStructuredSelection) {
- List<EObject> result = new ArrayList<EObject>();
- Iterator<?> ite = ((IStructuredSelection) selection).iterator();
- while (ite.hasNext()) {
- Object next = ite.next();
- EObject eObject = EMFHelper.getEObject(next);
- if (eObject != null) {
- result.add(eObject);
- }
- }
- return result;
- }
- }
- return Collections.emptyList();
- }
-
- /**
- * Refresh elements in model explorer view.
- *
- * @param uris
- * {@link IExtendedURI} to refresh
- * @param resourceSet
- * the resource set
- */
- public static void refreshModelExplorer(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- for (Collection<EObject> objects : Collections2.transform(uris, CollabFunctionsFactory.getExtendedURIToEObjects(resourceSet))) {
- RefreshHelper.refreshModelExplorer(objects);
- }
- }
-
- /**
- * This reload the current editor
- * WARNING : BE careful after this action the ancient resourceSet will deprecated you may use getCurrentResourceSet() to retrieve the new one.
- */
- public static void reloadEditor() {
- Display.getCurrent().syncExec(new Runnable() {
-
- @Override
- public void run() {
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchPage page = wb.getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = page.getActiveEditor();
- IEditorInput input = editor.getEditorInput();
- page.closeEditor(editor, true);
- try {
- IEditorDescriptor desc = wb.getEditorRegistry().getDefaultEditor(input.getName());
- page.openEditor(input, desc.getId(), false);
- } catch (PartInitException e) {
- LogHelper.getInstance().logError("Error during reloading", Activator.PLUGIN_ID, e);
- }
- }
- });
- }
-
- /**
- * Display an error dialog using a status.
- *
- * @param errorStatus
- * the error status
- * @param title
- * the title
- */
- public static void errorDialog(IStatus errorStatus, String title) {
- ErrorDialog dialog = new ErrorDialog(Display.getDefault().getActiveShell(), title, errorStatus.getMessage(), errorStatus, IStatus.ERROR);
- dialog.open();
- LogHelper.getInstance().logError(errorStatus.getMessage(), Activator.PLUGIN_ID, errorStatus.getException());
- }
-
- /**
- * Error dialog.
- *
- * @param throwable
- * the throwable
- * @param title
- * the title
- * @param message
- * the message
- */
- public static void errorDialog(Throwable throwable, String title, String message) {
- errorDialog(CollabStatus.createErrorStatus(message, throwable), title);
- }
-
- /** The adapter factory. */
- private static ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- /**
- * Try to get a correct label from a Object
- * Handle: {@link EObject} {@link Resource}.
- *
- * @param object
- * the object
- * @return the label
- */
- public static String getLabel(Object object) {
- if (object instanceof EObject) {
- EObject eObject = (EObject) object;
- IItemLabelProvider labelProvider = (IItemLabelProvider) adapterFactory.adapt(eObject, IItemLabelProvider.class);
- return labelProvider.getText(eObject);
- } else if (object instanceof Resource) {
- return "Resouce " + ((Resource) object).getURI();
- }
- return object.toString();
- }
-
- public static ILabelProvider getModelExplorerLavelProvider() {
- ILabelProvider labelProvider = getLabelProvider(ModelExplorerView.LABEL_PROVIDER_SERVICE_CONTEXT);
- if (labelProvider == null) {
- labelProvider = getLabelProvider();
- }
- return labelProvider;
- }
-
- public static ILabelProvider getLabelProvider() {
- return getLabelProvider(null);
- }
-
- public static ILabelProvider getLabelProvider(String context) {
-
- try {
- IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- ServicesRegistry serviceRegistry = ServiceUtilsForWorkbenchPage.getInstance().getServiceRegistry(activePage);
- LabelProviderService service = serviceRegistry.getService(LabelProviderService.class);
- if (context != null) {
- return service.getLabelProvider(context);
- } else {
- return service.getLabelProvider();
- }
- } catch (ServiceException e) {
- e.printStackTrace();
- }
-
- return null;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.classpath b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.classpath
deleted file mode 100644
index ad32c83a788..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/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/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.gitignore b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.gitignore
deleted file mode 100644
index 19af0f1d5ca..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.class
-*.jar
-/target \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.options b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.options
deleted file mode 100644
index 058af1e91aa..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.papyrus.team.collaborative.core.connector.svn/debug=true
-org.eclipse.papyrus.team.collaborative.core.connector.svn/debug/commit=true
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.project b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.project
deleted file mode 100644
index 8ac71ef3f16..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.team.collaborative.svn</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/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.settings/org.eclipse.jdt.core.prefs b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 42337f02afe..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.objectteams.otdt.compiler.option.pure_java=enabled
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/META-INF/MANIFEST.MF b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/META-INF/MANIFEST.MF
deleted file mode 100644
index 53a8a473ec2..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.team.collaborative.core;bundle-version="1.1.0",
- org.eclipse.emf.ecore,
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.core.resources,
- org.eclipse.emf.workspace,
- org.eclipse.team.core,
- org.eclipse.team.ui,
- org.eclipse.team.svn.core,
- org.eclipse.team.svn.ui
-Export-Package: org.eclipse.papyrus.team.collaborative.svn,
- org.eclipse.papyrus.team.collaborative.svn.tracing,
- org.eclipse.papyrus.team.collaborative.svn.utils,
- org.eclipse.papyrus.team.collaborative.svn.versioncontroller
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Name: %pluginName
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.team.collaborative.svn.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.team.collaborative.svn;single
- ton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/about.html b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/build.properties b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/build.properties
deleted file mode 100644
index ae0f8166468..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- .options
-src.includes = about.html
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/plugin.properties b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/plugin.properties
deleted file mode 100644
index e62f4e4b682..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#/*****************************************************************************
-# * Copyright (c) 2014 Atos Origin.
-# *
-# *
-# * All rights reserved. This program and the accompanying materials
-# * are made available under the terms of the Eclipse Public License v1.0
-# * which accompanies this distribution, and is available at
-# * http://www.eclipse.org/legal/epl-v10.html
-# *
-# *****************************************************************************/
-pluginName = Collaborative SVN Connector
-providerName = Eclipse Modeling Project
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/plugin.xml b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/plugin.xml
deleted file mode 100644
index cbbbe02cc78..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/plugin.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.team.collaborative.core.contribution">
- <ParticipantFactory
- id="org.eclipse.papyrus.team.collaborative.svn"
- impl="org.eclipse.papyrus.team.collaborative.svn.SVNCollabFactory"
- priority="10">
- </ParticipantFactory>
- </extension>
-
-
-</plugin>
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/pom.xml b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/pom.xml
deleted file mode 100644
index 1959774dda9..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/pom.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.1.0-SNAPSHOT</version>
- <relativePath>../../../releng/top-pom-extras.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.papyrus.team.collaborative.svn</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/AbstractExtendedURIBuilderForFile.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/AbstractExtendedURIBuilderForFile.java
deleted file mode 100644
index 4d5b305e393..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/AbstractExtendedURIBuilderForFile.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn;
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.AbstractExtendedURIBuilder;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Collections2;
-
-
-/**
- * Extends {@link AbstractExtendedURIBuilder} adding some utilitary method to manipulate files
- *
- * @author adaussy
- *
- */
-public abstract class AbstractExtendedURIBuilderForFile extends AbstractExtendedURIBuilder {
-
- public AbstractExtendedURIBuilderForFile(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
- /**
- * Transform resource to {@link IFile}
- *
- * @param r
- * the r
- * @return the i file
- */
- protected IFile toIFile(Resource r) {
- if (r != null) {
- return TO_FILE_FUNCTION.apply(r);
- }
- return null;
- }
-
- /** The Constant TO_FILE_FUNCTION. */
- protected static final Function<Resource, IFile> TO_FILE_FUNCTION = new Function<Resource, IFile>() {
-
- @Override
- public IFile apply(Resource from) {
-
- return WorkspaceSynchronizer.getFile(from);
- }
- };
-
- /**
- * Gets the target files.
- *
- * @param resourcesToLock
- * the resources to lock
- * @return the target files
- */
- protected static IFile[] getTargetFiles(Collection<Resource> resourcesToLock) {
- Collection<IFile> iResourcesToLock = Collections2.transform(resourcesToLock, TO_FILE_FUNCTION);
- return iResourcesToLock.toArray(new IFile[iResourcesToLock.size()]);
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/Activator.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/Activator.java
deleted file mode 100644
index b9f8e3ffb92..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/Activator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn;
-
-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.team.collaborative.core.connector.svn"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/CollabResourceSelector.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/CollabResourceSelector.java
deleted file mode 100644
index 9cb714ddbbc..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/CollabResourceSelector.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The Class CollabResourceSelector.
- * Implementation of {@link IResourceSelector} for use in collaboration
- */
-public class CollabResourceSelector implements IResourceSelector {
-
- /** The resources. */
- private IResource[] resources;
-
- /** The shell. */
- private Shell shell;
-
- /**
- * Instantiates a new collab resource selector.
- *
- * @param resources
- * the resources
- * @param shell
- * the shell
- */
- public CollabResourceSelector(IResource[] resources, Shell shell) {
- super();
- this.resources = resources;
- this.shell = shell;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.svn.ui.action.IRecursiveResourceSelector#getSelectedResourcesRecursive(org.eclipse.team.svn.core.IStateFilter)
- */
- public IResource[] getSelectedResourcesRecursive(IStateFilter filter) {
- return this.getSelectedResourcesRecursive(filter, IResource.DEPTH_INFINITE);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.svn.ui.action.IRecursiveResourceSelector#getSelectedResourcesRecursive(org.eclipse.team.svn.core.IStateFilter, int)
- */
- public IResource[] getSelectedResourcesRecursive(final IStateFilter filter, final int depth) {
- final IResource[][] retVal = new IResource[][] { new IResource[0] };
- IActionOperation op = new AbstractActionOperation("Operation_CollectingResources", SVNUIMessages.class) { //$NON-NLS-1$
-
- protected void runImpl(IProgressMonitor monitor) throws Exception {
- retVal[0] = FileUtility.getResourcesRecursive(getSelectedResources(), filter, depth, this, monitor);
- }
- };
- if (CoreExtensionsManager.instance().getOptionProvider().isSVNCacheEnabled()) {
- UIMonitorUtility.doTaskBusyDefault(op);
- } else {
- UIMonitorUtility.doTaskNowDefault(shell, op, true);
- }
- return retVal[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.svn.ui.action.IPlainResourceSelector#getSelectedResources()
- */
- public IResource[] getSelectedResources() {
- return resources;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.svn.ui.action.IPlainResourceSelector#getSelectedResources(org.eclipse.team.svn.core.IStateFilter)
- */
- public IResource[] getSelectedResources(IStateFilter filter) {
- return FileUtility.getResourcesRecursive(this.getSelectedResources(), filter, IResource.DEPTH_ZERO);
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/SVNCollabFactory.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/SVNCollabFactory.java
deleted file mode 100644
index f6edce56539..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/SVNCollabFactory.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- * Philippe Roland (Atos) philippe.roland@atos.net - added workaround for eclipse bug 385394
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.WeakHashMap;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.ICollabFactory;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.IUnlocker;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IReverter;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IUpdater;
-import org.eclipse.papyrus.team.collaborative.core.utils.CollabFunctionsFactory;
-import org.eclipse.papyrus.team.collaborative.svn.locker.SVNLocker;
-import org.eclipse.papyrus.team.collaborative.svn.locker.SVNUnlocker;
-import org.eclipse.papyrus.team.collaborative.svn.versioncontroller.SVNCommitter;
-import org.eclipse.papyrus.team.collaborative.svn.versioncontroller.SVNReverter;
-import org.eclipse.papyrus.team.collaborative.svn.versioncontroller.SVNUpdater;
-import com.google.common.collect.Collections2;
-
-
-/**
- * Factory to build element to do collaborative work with SVN.
- *
- * @author adaussy
- */
-public class SVNCollabFactory implements ICollabFactory {
-
- /** The Constant SVN_COLLAB_ID. */
- public static final String SVN_COLLAB_ID = "org.eclipse.papyrus.team.collaborative.core.connector.svn";
-
- /**
- * Resource set svn status cache
- */
- private WeakHashMap<ResourceSet, Boolean> alreadyOnSvnCache = new WeakHashMap<ResourceSet, Boolean>();
-
- /**
- * Instantiates a new sVN collab factory.
- */
- public SVNCollabFactory() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollabFactory#provide(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public boolean provide(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- /**
- * Workaround for eclipse bug 385394. This bug causes property testers to be called very frequently
- * even if no activity is taking place, causing important slowdowns when a right-click on a model explorer element is performed.
- * a cache prevents these calls (and the subsequent calls to FileUtility.alreadyOnSVN) from being too taxing on system resources.
- *
- * This bug was fixed on 16/01/2014 but its fix has not yet been released outside of integration builds. Remove this workaround when it is.
- */
- if (alreadyOnSvnCache.containsKey(resourceSet)) {
- return alreadyOnSvnCache.get(resourceSet);
- }
- boolean result;
- Set<IProject> projects = new HashSet<IProject>();
- for (IResource iResource : Collections2.transform(uris, CollabFunctionsFactory.getExtendedURIToIResource(resourceSet))) {
- if (iResource != null) {
- projects.add(iResource.getProject());
- }
- }
- if (projects.isEmpty()) {
- result = false;
- alreadyOnSvnCache.put(resourceSet, result);
- return result;
- }
- for (IProject iProject : projects) {
- if (!FileUtility.alreadyOnSVN(iProject)) {
- result = false;
- alreadyOnSvnCache.put(resourceSet, result);
- return result;
- }
- }
- result = true;
- alreadyOnSvnCache.put(resourceSet, result);
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollabFactory#createLocker(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public ILocker createLocker(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- return new SVNLocker(uris, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollabFactory#createUnlocker(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public IUnlocker createUnlocker(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- return new SVNUnlocker(uris, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollabFactory#createReverter(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public IReverter createReverter(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- return new SVNReverter(uris, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollabFactory#createCommitter(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public ICommitter createCommitter(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- return new SVNCommitter(uris, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.ICollabFactory#createUpdater(java.util.Set, org.eclipse.emf.ecore.resource.ResourceSet)
- */
- @Override
- public IUpdater createUpdater(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- return new SVNUpdater(uris, resourceSet);
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/AbstractSVNCollab.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/AbstractSVNCollab.java
deleted file mode 100644
index 30a92d873c8..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/AbstractSVNCollab.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.locker;
-
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.ICollabParticipant;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.svn.AbstractExtendedURIBuilderForFile;
-
-
-/**
- * The Class AbstractSVNCollab.
- * Abstract class used for {@link ICollabParticipant} for SVN
- */
-public abstract class AbstractSVNCollab extends AbstractExtendedURIBuilderForFile {
-
- public AbstractSVNCollab(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
- /** The Constant NOT_LOCK_STATUS. */
- public static final CollabStatus NOT_LOCK_STATUS = CollabStatus.createErrorStatus("Not locked");
-
- /**
- * Checks if is locked.
- *
- * @param uri
- * the uri
- * @return the i status
- */
- public IStatus isLocked(IExtendedURI uri) {
- Resource resourceToLock = getResourceSet().getResource(uri.getUri(), false);
- IFile iResourcesToLock = WorkspaceSynchronizer.getFile(resourceToLock);
- if (iResourcesToLock != null) {
- if (iResourcesToLock.exists()) {
- ILocalResource local = SVNRemoteStorage.instance().asLocalResource(iResourcesToLock);
- if (local.isLocked()) {
- return Status.OK_STATUS;
- } else {
- return NOT_LOCK_STATUS;
- }
- }
- }
- return Status.OK_STATUS;
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/SVNLocker.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/SVNLocker.java
deleted file mode 100644
index c756506d1ea..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/SVNLocker.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.locker;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.ITracingConstant;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.Tracer;
-import org.eclipse.papyrus.team.collaborative.svn.utils.SVNUtils;
-
-
-/**
- * SVN implementation of {@link ILocker}
- *
- * @author adaussy
- *
- */
-public class SVNLocker extends AbstractSVNCollab implements ILocker {
-
-
- public SVNLocker(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.participants.locker.ILocker#lock()
- */
- @Override
- public IStatus lock() {
- IResource[] resourcesToProcess = getTargetFiles(getTargetResources());
- // Check that every file is on repository
- List<IResource> fileToAddToRepo = new ArrayList<IResource>();
- for (int i = 0; i < resourcesToProcess.length; i++) {
- IResource currentResource = resourcesToProcess[i];
- if (!SVNUtils.isAddedToRepository(currentResource)) {
- return CollabStatus.createErrorStatus(currentResource.getFullPath() + "is not in the repository");
- }
- }
- // Add resource to repository
- IStatus addStatus = SVNUtils.addToRepository("Adding new resource to repository", fileToAddToRepo);
- if (!addStatus.isOK()) {
- return addStatus;
- }
- if (ITracingConstant.LOCK_TRACING) {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append("Locking: ").append("\n");
- for (IResource r : resourcesToProcess) {
- stringBuilder.append(r.getFullPath()).append("\n");
- }
- Tracer.logInfo(stringBuilder.toString());
- }
- // Lock operation
- LockOperation mainOp = new LockOperation(resourcesToProcess, "Lock taken", false);
- CompositeOperation op = new CompositeOperation(mainOp.getId(), mainOp.getMessagesClass());
- op.add(mainOp);
- op.add(new RefreshResourcesOperation(resourcesToProcess));
- ICancellableOperationWrapper runnable = UIMonitorUtility.doTaskNowDefault(op, false);
- IActionOperation resultStatus = runnable.getOperation();
- return resultStatus.getStatus();
- }
-
-
-
- @Override
- protected Set<IExtendedURI> doBuild() {
- for (IExtendedURI extendedURI : getUris()) {
- IExtendedURI resourceURI = getResourceURI(extendedURI);
- if (resourceURI != null) {
- if (!isLocked(resourceURI).isOK()) {
- getExtendedSet().add(resourceURI);
- }
- }
- }
- return getExtendedSet();
- }
-
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/SVNUnlocker.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/SVNUnlocker.java
deleted file mode 100644
index 1b95e34b882..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/locker/SVNUnlocker.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.locker;
-
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.locker.IUnlocker;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.ITracingConstant;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.Tracer;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * SVN implementation of {@link IUnlocker}.
- *
- * @author adaussy
- */
-public class SVNUnlocker extends AbstractSVNCollab implements IUnlocker {
-
- /**
- * Instantiates a new SVN unlocker.
- *
- * @param uris
- * the uris
- * @param resourceSet
- * the resource set
- */
- public SVNUnlocker(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.participants.locker.IUnlocker#unlock()
- */
- @Override
- public IStatus unlock() {
- IResource[] resourcesToProcess = getTargetFiles(getTargetResources());
- if (ITracingConstant.UNLOCK_TRACING) {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append("Unlocking: ").append("\n");
- for (IResource r : resourcesToProcess) {
- stringBuilder.append(r.getFullPath()).append("\n");
- }
- Tracer.logInfo(stringBuilder.toString());
- }
- // Unlock operation
- UnlockOperation mainOp = new UnlockOperation(resourcesToProcess);
- CompositeOperation op = new CompositeOperation(mainOp.getId(), mainOp.getMessagesClass());
- op.add(mainOp);
- op.add(new RefreshResourcesOperation(resourcesToProcess));
- ICancellableOperationWrapper runnable = UIMonitorUtility.doTaskNowDefault(op, false);
- IActionOperation resultStatus = runnable.getOperation();
-
- IStatus status = resultStatus.getStatus();
- if (status.isOK()) {
- return Status.OK_STATUS;
- }
- return CollabStatus.createErrorStatus(status.getMessage(), status.getException());
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.participants.AbstractExtendedURIBuilder#doBuild()
- */
- @Override
- protected Set<IExtendedURI> doBuild() {
- for (IExtendedURI extendedURI : getUris()) {
- IExtendedURI resourceURI = getResourceURI(extendedURI);
- if (resourceURI != null) {
- if (isLocked(resourceURI).isOK()) {
- getExtendedSet().add(resourceURI);
- }
- }
- }
- return getExtendedSet();
- }
-
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/tracing/ITracingConstant.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/tracing/ITracingConstant.java
deleted file mode 100644
index a86e977f597..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/tracing/ITracingConstant.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.tracing;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.papyrus.team.collaborative.svn.Activator;
-
-/**
- * Constant use to trace.
- *
- * @author adaussy
- */
-public interface ITracingConstant {
-
- /** Trace everything related to commmit. */
- public static final boolean COMMIT_TRACING = Activator.getDefault().isDebugging() && "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.papyrus.team.collaborative.core.connector.svn/debug/commit"));
-
- /** Trace everything related to lock. */
- public static final boolean LOCK_TRACING = Activator.getDefault().isDebugging() && "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.papyrus.team.collaborative.core.connector.svn/debug/lock"));
-
- /** Trace everything related to unlock. */
- public static final boolean UNLOCK_TRACING = Activator.getDefault().isDebugging() && "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.papyrus.team.collaborative.core.connector.svn/debug/unlock"));
-
- /** Trace everything related to Update. */
- public static final boolean UPDATE_TRACING = Activator.getDefault().isDebugging() && "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.papyrus.team.collaborative.core.connector.svn/debug/update"));
-
- /** Trace everything related to Revert. */
- public static final boolean REVERT_TRACING = Activator.getDefault().isDebugging() && "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.papyrus.team.collaborative.core.connector.svn/debug/revert"));
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/tracing/Tracer.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/tracing/Tracer.java
deleted file mode 100644
index b1c0b47a8a6..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/tracing/Tracer.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy <a href="mailto:arthur.daussy@atos.net"> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.tracing;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.team.collaborative.svn.Activator;
-
-/**
- * Utils class used to trace element
- *
- * @author adaussy
- *
- */
-public final class Tracer {
-
- private Tracer() {
- }
-
- /**
- * Return true if the plugin is debugging
- *
- * @return
- */
- public static boolean isDebuging() {
- return Activator.getDefault().isDebugging();
- }
-
- /**
- * Log info if the plugin is tracing
- *
- * @param info
- * Info you want to log
- * @param raisedException
- * if true the the trace raise an exception
- */
- public static void logInfo(String info, boolean raisedException) {
- log(IStatus.OK, info, raisedException);
- }
-
- /**
- * Log an info
- *
- * @param info
- * Info you want to log
- */
- public static void logInfo(String info) {
- logInfo(info, false);
- }
-
- // /**
- // * Log an error
- // * @param error Message you want to log
- // * @param raisedException if true the the trace raise an exception
- // */
- // public static void logError(String error, boolean raisedException) {
- // log(Status.ERROR, error, raisedException);
- // }
-
- /**
- * Log something
- *
- * @param severity
- * Severity of what is going to be logged see {@link IStatus} constants
- * @param message
- * Message to log
- * @param raisedException
- * if true raise an exception
- */
- public static void log(int severity, String message, boolean raisedException) {
- if (Activator.getDefault() != null) {
- if (raisedException) {
- Activator.getDefault().getLog().log(new Status(severity, Activator.PLUGIN_ID, message, new Exception()));
- } else {
- Activator.getDefault().getLog().log(new Status(severity, Activator.PLUGIN_ID, message));
- }
- }
- }
-
- // /**
- // * Log an error
- // * @param message Message you want to log
- // * @param raisedException the exception to raise
- // */
- // public static void logExceptionError(String message, Exception raisedException) {
- // Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, message, raisedException));
- // }
-
- /**
- * Log warning
- *
- * @param message
- * Message you want to log
- * @param raisedException
- * the exception to raise
- */
- public static void logExceptionWarning(String message, Exception raisedException) {
- Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, message, raisedException));
- }
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/CommitActionUtilityWithProperties.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/CommitActionUtilityWithProperties.java
deleted file mode 100644
index 53747bdd615..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/CommitActionUtilityWithProperties.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy <a href="mailto:arthur.daussy@atos.net"> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.utils;
-
-import java.util.Arrays;
-import java.util.HashSet;
-
-import org.eclipse.core.resources.IResource;
-
-
-/**
- * Same as {@link CommitActionUtility} however it add to commit set if the file has SVN properties changes
- *
- * @author adaussy
- *
- */
-public class CommitActionUtilityWithProperties extends CommitActionUtility {
-
- public CommitActionUtilityWithProperties(IResourceSelector selector) {
- super(selector);
- }
-
- @Override
- public void initialize(IResourceSelector selector) {
- this.selector = selector;
-
- this.allResourcesSet = new HashSet<IResource>();
- this.allResourcesSet.addAll(Arrays.asList(this.selector.getSelectedResourcesRecursive(new IStateFilter.OrStateFilter(new IStateFilter[] { IStateFilter.SF_COMMITABLE, IStateFilter.SF_CONFLICTING, IStateFilter.SF_TREE_CONFLICTING, IStateFilter.SF_NEW,
- IStateFilter.SF_HAS_PROPERTIES_CHANGES }))));
-
- this.newNonRecursive = new HashSet<IResource>(Arrays.asList(this.selector.getSelectedResources(IStateFilter.SF_IGNORED_BUT_NOT_EXTERNAL)));
- this.newRecursive = new HashSet<IResource>(Arrays.asList(FileUtility.getResourcesRecursive((IResource[]) this.allResourcesSet.toArray(new IResource[this.allResourcesSet.size()]), IStateFilter.SF_NEW, IResource.DEPTH_ZERO)));
-
- HashSet<IResource> fullSet = new HashSet<IResource>(this.newNonRecursive);
- fullSet.addAll(this.newRecursive);
- this.parents = new HashSet<IResource>(Arrays.asList(FileUtility.getOperableParents((IResource[]) fullSet.toArray(new IResource[fullSet.size()]), IStateFilter.SF_UNVERSIONED)));
- this.newNonRecursive.addAll(this.parents);
- fullSet.addAll(this.parents);
-
- this.allResourcesSet.addAll(fullSet);
-
- this.allResources = (IResource[]) this.allResourcesSet.toArray(new IResource[this.allResourcesSet.size()]);
- this.allResourcesSet.addAll(Arrays.asList(FileUtility.addOperableParents(this.allResources, IStateFilter.SF_ADDED, true)));
- this.allResources = (IResource[]) this.allResourcesSet.toArray(new IResource[this.allResourcesSet.size()]);
-
- this.canBeRecursiveCommit = FileUtility.getOperableParents(this.selector.getSelectedResources(), IStateFilter.SF_ADDED, false).length == 0;
- if (this.canBeRecursiveCommit && FileUtility.checkForResourcesPresence(this.allResources, IStateFilter.SF_SWITCHED, IResource.DEPTH_ZERO)) {
- this.canBeRecursiveCommit = false;
- }
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/SVNUtils.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/SVNUtils.java
deleted file mode 100644
index dc78898cd4b..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/SVNUtils.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.utils;
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.ITracingConstant;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.Tracer;
-import org.eclipse.papyrus.team.collaborative.svn.versioncontroller.SVNCommitter;
-
-/**
- * The Class SVNUtils.
- */
-public class SVNUtils {
-
- /** The Constant SVN_NEEDS_LOCK. */
- private static final String SVN_NEEDS_LOCK = "svn:needs-lock";
-
- /** The SVN connector factory. */
- static ISVNConnectorFactory svnConnectorFactory = CoreExtensionsManager.instance().getSVNConnectorFactory();
-
-
- /**
- * Gets the resource SVN info.
- *
- * @param resource
- * the resource
- * @return the SVN info
- */
- public static SVNChangeStatus getSVNInfo(IResource resource) {
- return SVNUtility.getSVNInfoForNotConnected(resource);
- }
-
-
-
- /**
- * Add resources to the SVN repository.
- *
- * @param message
- * Message for the Add operation
- * @param resources
- * The resources to add
- * @return the i status
- */
- public static IStatus addToRepository(String message, Collection<? extends IResource> resources) {
- IResource[] iResources = new IResource[resources.size()];
- resources.toArray(iResources);
- IStatus status = SVNCommitter.doCommit(message, true, resources);
- if (!status.isOK()) {
- return status;
- }
-
- // Set need lock property
- if (ITracingConstant.COMMIT_TRACING) {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append("Set need lock property on: ").append("\n");
- for (IResource r : iResources) {
- stringBuilder.append(r).append("\n");
- }
- Tracer.logInfo(stringBuilder.toString());
- }
- SetPropertyActionNow.doSetPropertyNow(iResources, SVN_NEEDS_LOCK, "*", "", false, true, 0, false, "*", false, null);
-
- // Commit the property change
- status = SVNCommitter.doCommit(message, true, resources);
- if (!status.isOK()) {
- return status;
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Test if a {@link IResource}.
- *
- * @param resource
- * the resource
- * @return true, if is added to repository
- */
- public static boolean isAddedToRepository(IResource resource) {
- SVNChangeStatus svnInfo = getSVNInfo(resource);
- if (svnInfo != null) {
- String value = SVNUtility.getPropertyForNotConnected(resource, SVN_NEEDS_LOCK);
- return value != null && !value.isEmpty();
- }
- return false;
-
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/SetPropertyActionNow.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/SetPropertyActionNow.java
deleted file mode 100644
index 1cb8a868874..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/utils/SetPropertyActionNow.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.utils;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-
-/**
- * The Class SetPropertyActionNow.
- * Util class used to set SVN property. This implementation set the property immediatly
- */
-public class SetPropertyActionNow {
-
- /**
- * Do set property.
- *
- * @param resources
- * the resources
- * @param panel
- * the panel
- * @param addOn
- * the add on
- */
- public static void doSetProperty(final IResource[] resources, ResourcePropertyEditPanel panel, IActionOperation addOn) {
- SetPropertyAction.doSetProperty(resources, panel.getPropertyName(), panel.getPropertyValue(), panel.getPropertyFile(), panel.isFileSelected(), panel.isRecursiveSelected(), panel.getApplyMethod(), panel.useMask(), panel.getFilterMask(),
- panel.isStrict(), addOn);
- }
-
- /**
- * Do set property now.
- *
- * @param resources
- * the resources
- * @param propertyName
- * the property name
- * @param value
- * the value
- * @param fileName
- * the file name
- * @param isFileSelected
- * the is file selected
- * @param isRecursive
- * the is recursive
- * @param applyMethod
- * the apply method
- * @param useMask
- * the use mask
- * @param filterMask
- * the filter mask
- * @param strict
- * the strict
- * @param addOn
- * the add on
- */
- public static void doSetPropertyNow(final IResource[] resources, String propertyName, String value, String fileName, boolean isFileSelected, boolean isRecursive, final int applyMethod, boolean useMask, String filterMask, boolean strict,
- IActionOperation addOn) {
- final SVNProperty[] data = new SVNProperty[] { new SVNProperty(propertyName, value) };
- IActionOperation loadOp = null;
- if (isFileSelected) {
- final File f = new File(fileName);
- loadOp = new AbstractActionOperation("Operation_SLoadFileContent", SVNUIMessages.class) { //$NON-NLS-1$
-
- protected void runImpl(IProgressMonitor monitor) throws Exception {
- FileInputStream input = null;
- try {
- input = new FileInputStream(f);
- byte[] binary = new byte[(int) f.length()];
- input.read(binary);
- data[0] = new SVNProperty(data[0].name, new String(binary));
- } finally {
- if (input != null) {
- input.close();
- }
- }
- }
- };
- }
- doSetPropertyNow(resources, data, loadOp, isRecursive, applyMethod, useMask, filterMask, strict, addOn);
- }
-
- /**
- * Do set property now.
- *
- * @param resources
- * the resources
- * @param data
- * the data
- * @param loadOp
- * the load op
- * @param isRecursive
- * the is recursive
- * @param applyMethod
- * the apply method
- * @param useMask
- * the use mask
- * @param filterMask
- * the filter mask
- * @param strict
- * the strict
- * @param addOn
- * the add on
- */
- public static void doSetPropertyNow(final IResource[] resources, SVNProperty[] data, IActionOperation loadOp, boolean isRecursive, final int applyMethod, boolean useMask, String filterMask, boolean strict, IActionOperation addOn) {
- ArrayList<SVNProperty> folderPropsList = new ArrayList<SVNProperty>();
- ArrayList<SVNProperty> filePropsList = new ArrayList<SVNProperty>();
- IPredefinedPropertySet set = CoreExtensionsManager.instance().getPredefinedPropertySet();
- for (SVNProperty prop : data) {
- int type = PredefinedProperty.TYPE_COMMON;
- PredefinedProperty pProp = set.getPredefinedProperty(prop.name);
- if (pProp != null) {
- type = pProp.type;
- }
- if (type == PredefinedProperty.TYPE_FILE) {
- filePropsList.add(prop);
- } else if (type == PredefinedProperty.TYPE_FOLDER) {
- folderPropsList.add(prop);
- } else if (type == PredefinedProperty.TYPE_COMMON) {
- filePropsList.add(prop);
- folderPropsList.add(prop);
- }
- }
- final SVNProperty[] folderProps = folderPropsList.toArray(new SVNProperty[folderPropsList.size()]);
- final SVNProperty[] fileProps = filePropsList.toArray(new SVNProperty[filePropsList.size()]);
-
- final StringMatcher matcher = useMask ? new StringMatcher(filterMask) : null;
- IStateFilter filter = new IStateFilter.AbstractStateFilter() {
-
- protected boolean allowsRecursionImpl(ILocalResource local, IResource resource, String state, int mask) {
- return IStateFilter.SF_EXCLUDE_PREREPLACED_AND_DELETED.allowsRecursion(resource, state, mask) || state == IStateFilter.ST_ADDED;
- }
-
- protected boolean acceptImpl(ILocalResource local, IResource resource, String state, int mask) {
- if (applyMethod == PropertiesComposite.APPLY_TO_FILES && resource.getType() != IResource.FILE || applyMethod == PropertiesComposite.APPLY_TO_FOLDERS && resource.getType() == IResource.FILE
- || !IStateFilter.SF_EXCLUDE_PREREPLACED_AND_DELETED.accept(resource, state, mask) || matcher != null && !matcher.match(resource.getName())) {
- return false;
- }
- return true;
- }
- };
-
- IActionOperation mainOp;
- if ((!isRecursive || applyMethod == PropertiesComposite.APPLY_TO_ALL && !useMask) && folderProps.length == fileProps.length) {
- // use faster version
- mainOp = new SetPropertiesOperation(FileUtility.getResourcesRecursive(resources, filter, IResource.DEPTH_ZERO), data, isRecursive & !strict);
- } else {
- IPropertyProvider propertyProvider = new IPropertyProvider() {
-
- public SVNProperty[] getProperties(IResource resource) {
- return resource.getType() == IResource.FILE ? fileProps : folderProps;
- }
- };
- mainOp = new SetMultiPropertiesOperation(resources, propertyProvider, filter, isRecursive && !strict ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO);
- }
- CompositeOperation composite = new CompositeOperation(mainOp.getId(), mainOp.getMessagesClass());
- if (loadOp != null) {
- composite.add(loadOp);
- composite.add(mainOp, new IActionOperation[] { loadOp });
- } else {
- composite.add(mainOp);
- }
- if (addOn != null) {
- composite.add(addOn);
- }
- composite.add(new RefreshResourcesOperation(resources, IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_ALL), new IActionOperation[] { mainOp });
- UIMonitorUtility.doTaskNowDefault(composite, false);
- }
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/AbstractSVNVersionController.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/AbstractSVNVersionController.java
deleted file mode 100644
index 02c823a8812..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/AbstractSVNVersionController.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.versioncontroller;
-
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-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.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IWorkOnModifiedElementParticipant;
-import org.eclipse.papyrus.team.collaborative.core.reports.CollabStatus;
-import org.eclipse.papyrus.team.collaborative.svn.AbstractExtendedURIBuilderForFile;
-import org.eclipse.papyrus.team.collaborative.svn.utils.SVNUtils;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * Abstract class for action with version control (update, commit, revert etc..) on SVN.
- *
- * @author adaussy
- *
- */
-public abstract class AbstractSVNVersionController extends AbstractExtendedURIBuilderForFile implements IWorkOnModifiedElementParticipant {
-
- /**
- * Instantiates a new abstract SVN version controller.
- *
- * @param uris
- * the uris
- * @param resourceSet
- * the resource set
- */
- public AbstractSVNVersionController(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
- /**
- * Check if the element pointed by the URI is modified.
- *
- * @param uri
- * the uri
- * @return the i status
- * @throws CollabException
- * the collab exception
- */
- @Override
- public IStatus isModified(IExtendedURI uri) {
- IExtendedURI resourceEURI = getResourceURI(uri);
- if (resourceEURI == null) {
- return Status.OK_STATUS;
- }
- URI resourceURI = resourceEURI.getUri();
- Resource resource = toResource(resourceURI);
- if (resource == null) {
- return CollabStatus.createErrorStatus(resourceURI + " is not a URI pointing to a resource");
- }
- IFile file = toIFile(resource);
- if (file == null || !file.exists()) {
- return CollabStatus.createErrorStatus(resourceURI + " is not a URI pointing to a existing file");
- }
- SVNChangeStatus svnInfo = SVNUtils.getSVNInfo(file);
- if (svnInfo == null) {
- return CollabStatus.createErrorStatus("Can not retreive SVN info for " + resourceURI);
- }
- if (svnInfo.repositoryPropStatus == SVNEntryStatus.Kind.MODIFIED) {
- return MODIFIED_STATUS;
- }
- return Status.OK_STATUS;
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNCommitter.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNCommitter.java
deleted file mode 100644
index 8f4d51fab60..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNCommitter.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.versioncontroller;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter;
-import org.eclipse.papyrus.team.collaborative.core.utils.ResourceUtils;
-import org.eclipse.papyrus.team.collaborative.svn.CollabResourceSelector;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.ITracingConstant;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.Tracer;
-import org.eclipse.papyrus.team.collaborative.svn.utils.CommitActionUtilityWithProperties;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-
-import com.google.common.collect.Lists;
-
-
-/**
- * SVN implementation for {@link ICommitter}.
- *
- * @author adaussy
- */
-public class SVNCommitter extends SVNWorkOnModifiedFile implements ICommitter {
-
-
- /**
- * Instantiates a new SVN committer.
- *
- * @param uris
- * the uris
- * @param resourceSet
- * the resource set
- */
- public SVNCommitter(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.team.collaborative.core.participants.version.ICommitter#commit(java.lang.String, boolean)
- */
- @Override
- public IStatus commit(String message, boolean keepLock) {
- IStatus status = doCommit(message, keepLock, getTargetResources());
- return status;
- }
-
- /**
- * Do commit.
- *
- * @param message
- * the message for the commit action
- * @param keepLock
- * the keep lock set to true if the lock has to be kept
- * @param resourceToCommit
- * the resource to commit
- * @return the i status
- */
- public static IStatus doCommit(String message, boolean keepLock, Set<Resource> resourceToCommit) {
- if (resourceToCommit != null && !resourceToCommit.isEmpty()) {
- List<IFile> targetIFileList = Lists.newArrayList(getTargetFiles(resourceToCommit));
- return doCommit(message, keepLock, ResourceUtils.getListAncestors(targetIFileList));
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Do commit.
- *
- * @param message
- * the message for the commit action
- * @param keepLock
- * the keep lock set to true if the lock has to be kept
- * @param filesToCommit
- * the files to commit
- * @return the i status
- */
- public static IStatus doCommit(String message, boolean keepLock, Collection<? extends IResource> filesToCommit) {
- CommitActionUtilityWithProperties tt = new CommitActionUtilityWithProperties(new CollabResourceSelector(filesToCommit.toArray(new IResource[filesToCommit.size()]), Display.getDefault().getActiveShell()));
- IResource[] allResources = tt.getAllResources();
- if (ITracingConstant.COMMIT_TRACING) {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append("Committing ").append(message).append("\n");
- for (IResource r : allResources) {
- stringBuilder.append(r).append("\n");
- }
- Tracer.logInfo(stringBuilder.toString());
- }
- CompositeOperation mainOp = tt.getCompositeCommitOperation(allResources, new IResource[0], message, keepLock, Display.getDefault().getActiveShell(), PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart());
- ICancellableOperationWrapper runnable = UIMonitorUtility.doTaskNowDefault(mainOp, false);
- IActionOperation resultStatus = runnable.getOperation();
- return resultStatus.getStatus();
- }
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNReverter.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNReverter.java
deleted file mode 100644
index 8c46acee065..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNReverter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.versioncontroller;
-
-/*******************************************************************************
- * Copyright (c) 2013 Atos.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy <a href="mailto:arthur.daussy@atos.net"> - initial API and implementation
- ******************************************************************************/
-import java.io.File;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IReverter;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.ITracingConstant;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.Tracer;
-
-
-/**
- * SVN Implementation for {@link IReverter}
- *
- * @author adaussy
- *
- */
-public class SVNReverter extends SVNWorkOnModifiedFile implements IReverter {
-
-
- public SVNReverter(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
- @Override
- public IStatus revert() {
- File[] modifiedFiles = getModifiedFile(getTargetResources());
- if (ITracingConstant.REVERT_TRACING) {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append("Reverting: ").append("\n");
- for (File f : modifiedFiles) {
- stringBuilder.append(f).append("\n");
- }
- Tracer.logInfo(stringBuilder.toString());
- }
- // Revert operation
- RevertOperation mainOp = new RevertOperation(modifiedFiles, true);
- CompositeOperation op = new CompositeOperation(mainOp.getId(), mainOp.getMessagesClass());
- op.add(mainOp);
- op.add(new RefreshResourcesOperation(getTargetFiles(getTargetResources())));
- ICancellableOperationWrapper runnable = UIMonitorUtility.doTaskNowDefault(op, false);
- IActionOperation resultStatus = runnable.getOperation();
-
- return resultStatus.getStatus();
- }
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNUpdater.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNUpdater.java
deleted file mode 100644
index f476a9b9e94..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNUpdater.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.versioncontroller;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.version.IUpdater;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.ITracingConstant;
-import org.eclipse.papyrus.team.collaborative.svn.tracing.Tracer;
-
-
-/**
- * SVN implementation of {@link IUpdater}
- *
- * @author adaussy
- *
- */
-public class SVNUpdater extends AbstractSVNVersionController implements IUpdater {
-
- /**
- * Instantiates a new sVN updater.
- *
- * @param uris
- * the uris
- * @param resourceSet
- * the resource set
- */
- public SVNUpdater(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
- @Override
- public IStatus update() {
- IFile[] resourcesToProcess = getTargetFiles(getTargetResources());
- // The all project of each file shall be updated (In order to see if new files appeared (New control))
- Set<IProject> projects = new HashSet<IProject>();
- for (IFile f : resourcesToProcess) {
- projects.add(f.getProject());
- }
-
- IProject[] projectsToUpdate = new IProject[projects.size()];
- projects.toArray(projectsToUpdate);
- if (ITracingConstant.UPDATE_TRACING) {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append("Updating projects: ").append("\n");
- for (IProject p : projectsToUpdate) {
- stringBuilder.append(p.getFullPath()).append("\n");
- }
- Tracer.logInfo(stringBuilder.toString());
- }
- CompositeOperation op = UpdateAction.getUpdateOperation(projectsToUpdate, SVNRevision.HEAD);
- ICancellableOperationWrapper runnable = UIMonitorUtility.doTaskNowDefault(op, false);
- IActionOperation resultStatus = runnable.getOperation();
-
- return resultStatus.getStatus();
- }
-
- @Override
- protected Set<IExtendedURI> doBuild() {
- for (IExtendedURI extendedURI : getUris()) {
- IExtendedURI resourceURI = getResourceURI(extendedURI);
- if (resourceURI != null) {
- IFile file = toIFile(toResource(resourceURI.getUri()));
- if (file != null && file.exists()) {
- if (!isUpToDate(resourceURI).isUpToDate()) {
- getExtendedSet().add(resourceURI);
- }
- }
- }
- }
- return getExtendedSet();
- }
-
-
- /**
- * Checks if is up to date.
- *
- * @param uri
- * the uri
- * @return the i status
- */
- @Override
- public UpToDateStatus isUpToDate(IExtendedURI uri) {
- IExtendedURI resourceEURI = getResourceURI(uri);
- if (resourceEURI == null) {
- return UpToDateStatus.createErrorDuringUpToDataStatus("The URI is null");
- }
- UpToDateStatus status = getCache().get(resourceEURI);
- if (status == null) {
- URI resourceURI = resourceEURI.getUri();
- Resource resource = toResource(resourceURI);
- if (resource == null) {
- return UpToDateStatus.createErrorDuringUpToDataStatus(resourceURI + " is not a URI pointing to a resource");
- }
- IFile file = toIFile(resource);
- if (file == null || !file.exists()) {
- return UpToDateStatus.createErrorDuringUpToDataStatus(resourceURI + " is not a URI pointing to a existing file");
- }
-
- SVNLogEntry log = getRemoteHEADRevision(file);
- if (log == null) {
- return UpToDateStatus.createErrorDuringUpToDataStatus("Unable to get remote HEAD revision for file " + file.getFullPath());
- }
- InfoOperation refreshOperation = new InfoOperation(file);
- refreshOperation.run(new NullProgressMonitor());
- SVNEntryInfo info = refreshOperation.getInfo();
- long localRevision = info.revision;
- if (log.revision > localRevision) {
- status = UpToDateStatus.createNotUpToDataStatus(log.author, log.date, log.revision);
- getCache().put(resourceEURI, status);
- return status;
- } else {
- status = UpToDateStatus.createUpToDataStatus(log.author, log.date, log.revision);
- getCache().put(resourceEURI, status);
- }
- }
- return status;
- }
-
-
-
-
- protected Map<IExtendedURI, UpToDateStatus> getCache() {
- if (cache == null) {
- cache = new HashMap<IExtendedURI, IUpdater.UpToDateStatus>();
- }
- return cache;
- }
-
-
-
- private Map<IExtendedURI, UpToDateStatus> cache = null;
-
- public static final long INVALID_REVISION = -1;
-
-
- public SVNLogEntry getRemoteHEADRevision(IResource resource) {
- IRepositoryResource remote = SVNRemoteStorage.instance().asRepositoryResource(resource);
- GetLogMessagesOperation logOp = new GetLogMessagesOperation(remote);
- logOp.setLimit(1);
- logOp.run(new NullProgressMonitor());
- if (logOp.getExecutionState() == IActionOperation.OK && logOp.getMessages() != null) {
- SVNLogEntry[] messages = logOp.getMessages();
- if (messages.length > 0) {
- return messages[0];
- }
- }
- return null;
- }
-
-
-
-
-
-}
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNWorkOnModifiedFile.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNWorkOnModifiedFile.java
deleted file mode 100644
index 74be5ce4ede..00000000000
--- a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn/src/org/eclipse/papyrus/team/collaborative/svn/versioncontroller/SVNWorkOnModifiedFile.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy - initial implementation
- *******************************************************************************/
-package org.eclipse.papyrus.team.collaborative.svn.versioncontroller;
-
-
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.team.collaborative.core.IExtendedURI;
-import org.eclipse.papyrus.team.collaborative.core.participants.IExtendedURISuperSet;
-import org.eclipse.papyrus.team.collaborative.svn.CollabResourceSelector;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Abstract class used to SVN action which used modified files ad {@link IExtendedURISuperSet#getExtendedSet()}
- *
- * @author adaussy
- *
- */
-public abstract class SVNWorkOnModifiedFile extends AbstractSVNVersionController {
-
- public SVNWorkOnModifiedFile(Set<IExtendedURI> uris, ResourceSet resourceSet) {
- super(uris, resourceSet);
- }
-
- /**
- * Gets the modified file.
- *
- * @param input
- * the input
- * @return the modified file
- */
- protected static File[] getModifiedFile(Collection<Resource> input) {
- IFile[] resourcesToProcess = getTargetFiles(input);
- File[] result = new File[resourcesToProcess.length];
- for (int i = 0; i < resourcesToProcess.length; i++) {
- result[i] = resourcesToProcess[i].getRawLocation().makeAbsolute().toFile();
- }
- return result;
- }
-
- @Override
- protected Set<IExtendedURI> doBuild() {
- List<IResource> toCommit = new ArrayList<IResource>();
- Map<IResource, IExtendedURI> cach = new HashMap<IResource, IExtendedURI>();
- for (IExtendedURI extendedURI : getUris()) {
- IExtendedURI resourceURI = getResourceURI(extendedURI);
- if (resourceURI != null) {
- IFile file = toIFile(toResource(resourceURI.getUri()));
- if (file != null && file.exists()) {
- if (isModified(resourceURI).isOK()) {
- toCommit.add(file);
- cach.put(file, resourceURI);
- }
- }
- }
- }
- CommitActionUtility commitUtility = new CommitActionUtility(new CollabResourceSelector(toCommit.toArray(new IResource[toCommit.size()]), Display.getDefault().getActiveShell()));
- IResource[] allResources = commitUtility.getAllResources();
- for (int i = 0; i < allResources.length; i++) {
- getExtendedSet().add(cach.get(allResources[i]));
- }
- return getExtendedSet();
- }
-
-}
diff --git a/releng/top-pom-extras.xml b/releng/top-pom-extras.xml
index 96809c4fde5..da9c3220acf 100644
--- a/releng/top-pom-extras.xml
+++ b/releng/top-pom-extras.xml
@@ -195,10 +195,6 @@
<module>../extraplugins/revision/org.eclipse.papyrus.revisiontool</module>
<module>../extraplugins/spem2/org.eclipse.papyrus.spem2.profile</module>
- <!-- Missing org.eclipse.emf.facet.infra.query.core 0.0.0 <module>../extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.controlmode</module> -->
- <module>../extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.core</module>
- <!-- Compilation failure: <module>../extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.strategy</module>-->
- <!-- Compilation failure: <module>../extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative.svn</module>-->
<module>extras</module>
</modules>

Back to the top