Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-02-11 21:38:52 +0000
committerChristian W. Damus2016-02-24 22:26:27 +0000
commit09fde7a4087685b065b7f1e40375686fb9f19f2a (patch)
tree36668c0515a08586179a74cefcf1dc6197311d70 /plugins/infra
parent2f0dd86c51f8543f56a99cd4371965a01287fcaa (diff)
downloadorg.eclipse.papyrus-09fde7a4087685b065b7f1e40375686fb9f19f2a.tar.gz
org.eclipse.papyrus-09fde7a4087685b065b7f1e40375686fb9f19f2a.tar.xz
org.eclipse.papyrus-09fde7a4087685b065b7f1e40375686fb9f19f2a.zip
Bug 485220: [Architecture] Provide a more modular architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485220 Implement version management: PDE API Tooling and Oomph Version Management. Introduce two new plug-in projects to manage versioning using Oomph: * org.eclipse.papyrus.releng.main.release for the Main bundles and features * org.eclipse.papyrus.releng.dev.release for the Dev Tools Add new menu actions to the Dev Tools: * main menu bar: * synchronize POM and manifest versions * "Configure" context menu on bundle projects and MANIFEST.MF * optimize bundle dependencies and re-exports * update dependency version ranges to match current workspace and PDE target Remove obsolete menu actions from the Dev Tools: * main menu bar: * Set all Papyrus feature versions * Set all Papyrus plug-in versions * Set versions of all Papyrus dependencies in Papyrus plug-ins Fix versioning errors reported by PDE and Oomph. Ensure proper version ranges consistent with latest build target. Optimize the dependencies of all Papyrus Main bundles and Dev Tools. Remove version- and reexport-checking tests in the BundlesTests that are now not needed because, on the one hand, we now implement discrete bundle versioning (managed by PDE/Oomph) and on the other, we now use re-exports properly to ensure classpath consistency in clients of a bundle's API. Thorough overhaul of the "project editors" API, including: * rationalize the API interfaces * refactor the all-in-one PluginEditor class from the customization bundle to the project-editors bundle * update clients in the Customization and DSML Validation components * fix a bunch of operations that didn't work * add missing operations required by the new Dev Tools actions * complete some unimplemented APIs * add a comprehensive JUnit test suite covering all of the project-editors API Change-Id: I6a699d93909f61099226ceb994140f03ea99a70f
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/.project24
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/META-INF/MANIFEST.MF8
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/pom.xml2
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/.project24
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/META-INF/MANIFEST.MF14
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/pom.xml2
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/.project24
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/META-INF/MANIFEST.MF9
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/.project24
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/META-INF/MANIFEST.MF9
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/pom.xml2
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/AbstractConstraint.java5
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/Constraint.java1
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/ConstraintEngine.java1
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/DefaultConstraintEngine.java6
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.log/.project80
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.log/META-INF/MANIFEST.MF24
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.log/src/org/eclipse/papyrus/infra/core/log/LogHelper.java524
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.project80
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF29
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/.project80
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/META-INF/MANIFEST.MF47
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelManager.java668
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngr.java504
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/IPageModelFactory.java156
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageManagerImpl.java327
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/utils/IPageUtils.java173
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/pom.xml2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/.project90
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF54
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/pom.xml2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ICloseablePart.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/PagePart.java553
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/.project24
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/META-INF/MANIFEST.MF12
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/DiPackage.java11
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/PageRef.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/SashModel.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/TabFolder.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/DiPackageImpl.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/PageRefImpl.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/SashModelImpl.java7
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/TabFolderImpl.java6
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src/org/eclipse/papyrus/infra/core/sashwindows/di/util/DiUtils.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/.project80
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF73
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/Activator.java167
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageProvider.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModel.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java8
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelsReader.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java26
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModelUtils.java303
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/ExtensionServicesRegistry.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/spi/IContextualServiceRegistryTracker.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/AbstractServiceUtils.java4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusCallable.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusRunnable.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IServiceRegistryProvider.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java11
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/.project28
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/.settings/.api_filters35
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF12
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/Activator.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservable.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservableValue.java3
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/TouchableValue.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/WritableListWithIterator.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/IContext.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotification.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotificationBuilder.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/LogNotification.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationBuilder.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationRunnable.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/Type.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/IExecutorServiceFactory.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/INotificationBuilderFactory.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CompositeServiceTracker.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CoreExecutors.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IExecutorService.java2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressCallable.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressRunnable.java1
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/PlatformHelper.java2
-rw-r--r--plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.edit/.project62
-rw-r--r--plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.editor/.project62
-rw-r--r--plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/.project62
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project80
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF31
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project80
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.settings/.api_filters21
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF61
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/pom.xml2
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java168
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project80
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF34
-rw-r--r--plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/.project24
-rw-r--r--plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/META-INF/MANIFEST.MF26
-rw-r--r--plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/.project24
-rw-r--r--plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/META-INF/MANIFEST.MF26
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.project80
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.settings/.api_filters11
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/META-INF/MANIFEST.MF36
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/.project80
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/META-INF/MANIFEST.MF17
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/.project24
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/META-INF/MANIFEST.MF13
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.project80
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF17
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/pom.xml4
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java1179
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/spi/IReadOnlyManagerProcessor.java4
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/.project18
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/META-INF/MANIFEST.MF23
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/pom.xml2
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/.project74
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/META-INF/MANIFEST.MF70
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/pom.xml2
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/.project80
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF52
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/pom.xml4
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java1
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/EObjectResolverService.java2
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/IEObjectResolver.java2
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java2246
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.project24
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/META-INF/MANIFEST.MF30
-rw-r--r--plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.classpath4
-rw-r--r--plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.project24
-rw-r--r--plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/META-INF/MANIFEST.MF10
-rw-r--r--plugins/infra/filters/org.eclipse.papyrus.infra.filters/.project24
-rw-r--r--plugins/infra/filters/org.eclipse.papyrus.infra.filters/.settings/.api_filters11
-rw-r--r--plugins/infra/filters/org.eclipse.papyrus.infra.filters/META-INF/MANIFEST.MF9
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/.project18
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/META-INF/MANIFEST.MF37
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/.project18
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/META-INF/MANIFEST.MF37
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/.project18
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/META-INF/MANIFEST.MF38
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.project22
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/META-INF/MANIFEST.MF65
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/.project74
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/META-INF/MANIFEST.MF46
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/.project74
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF32
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/.project74
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/META-INF/MANIFEST.MF14
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/.project76
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF33
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/.project18
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui/META-INF/MANIFEST.MF24
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/.launch/Launch Runtime Eclipse.launch2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/.project18
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext/META-INF/MANIFEST.MF69
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/META-INF/MANIFEST.MF46
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/MANIFEST.MF46
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF25
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.project78
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF59
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode/META-INF/MANIFEST.MF32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/.project76
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model/META-INF/MANIFEST.MF7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/META-INF/MANIFEST.MF36
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/.project18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/META-INF/MANIFEST.MF21
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gef/.project18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gef/META-INF/MANIFEST.MF11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter/META-INF/MANIFEST.MF25
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/META-INF/MANIFEST.MF27
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/META-INF/MANIFEST.MF44
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/.project76
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF31
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/META-INF/MANIFEST.MF27
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/META-INF/MANIFEST.MF17
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/.project78
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/META-INF/MANIFEST.MF8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher/META-INF/MANIFEST.MF15
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/.project18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/META-INF/MANIFEST.MF34
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/.project74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/META-INF/MANIFEST.MF12
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/.project24
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF26
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/pom.xml4
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/Activator.java21
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/helper/ObjectHyperLinkHelper.java4
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/service/HyperlinkContributor.java1
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/service/HyperlinkService.java3
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/AbstractLookForEditorShell.java21
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/HyperLinkManagerShell.java1
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/util/HyperLinkConstants.java6
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/util/HyperLinkLabelProvider.java9
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/util/TreeViewContentProvider.java5
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.psf/.project24
-rw-r--r--plugins/infra/misc/org.eclipse.papyrus.infra.psf/META-INF/MANIFEST.MF13
-rwxr-xr-xplugins/infra/misc/org.eclipse.papyrus.infra.sync/.project24
-rwxr-xr-xplugins/infra/misc/org.eclipse.papyrus.infra.sync/META-INF/MANIFEST.MF10
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF26
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/META-INF/MANIFEST.MF33
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF16
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.gmfdiag/.project18
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.gmfdiag/META-INF/MANIFEST.MF31
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF52
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/META-INF/MANIFEST.MF61
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/META-INF/MANIFEST.MF93
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/Activator.java122
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF23
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF32
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/META-INF/MANIFEST.MF24
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor/META-INF/MANIFEST.MF18
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/.project74
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF43
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/.project24
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/.settings/.api_filters11
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/META-INF/MANIFEST.MF13
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/.project6
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/.project24
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/.settings/.api_filters11
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF23
-rw-r--r--plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/.project24
-rw-r--r--plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/META-INF/MANIFEST.MF9
-rw-r--r--plugins/infra/onefile/org.eclipse.papyrus.infra.onefile/pom.xml4
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations/.settings/.api_filters273
-rw-r--r--plugins/infra/properties/org.eclipse.papyrus.infra.properties.edit/.project24
-rw-r--r--plugins/infra/properties/org.eclipse.papyrus.infra.properties.edit/META-INF/MANIFEST.MF14
-rw-r--r--plugins/infra/properties/org.eclipse.papyrus.infra.properties.editor/.project24
-rw-r--r--plugins/infra/properties/org.eclipse.papyrus.infra.properties.editor/META-INF/MANIFEST.MF16
-rw-r--r--plugins/infra/properties/org.eclipse.papyrus.infra.properties.ui/.project24
-rw-r--r--plugins/infra/properties/org.eclipse.papyrus.infra.properties.ui/META-INF/MANIFEST.MF24
-rw-r--r--plugins/infra/properties/org.eclipse.papyrus.infra.properties/.project24
-rw-r--r--plugins/infra/properties/org.eclipse.papyrus.infra.properties/META-INF/MANIFEST.MF8
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.history/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.history/META-INF/MANIFEST.MF35
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/META-INF/MANIFEST.MF25
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/META-INF/MANIFEST.MF41
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.edit.ui/.project18
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.edit.ui/META-INF/MANIFEST.MF18
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.edit/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.edit/META-INF/MANIFEST.MF49
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider/META-INF/MANIFEST.MF32
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.localizer/.project18
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.localizer/META-INF/MANIFEST.MF35
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.markerlistener/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.markerlistener/META-INF/MANIFEST.MF41
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.navigation/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.navigation/META-INF/MANIFEST.MF34
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.openelement/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.openelement/META-INF/MANIFEST.MF39
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.ui/.project18
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.ui/META-INF/MANIFEST.MF21
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/META-INF/MANIFEST.MF17
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/META-INF/MANIFEST.MF29
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.validation/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.validation/META-INF/MANIFEST.MF22
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.viewersearch/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.viewersearch/META-INF/MANIFEST.MF29
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.viewlabelprovider/.project74
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.viewlabelprovider/META-INF/MANIFEST.MF31
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.core/.project74
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.core/META-INF/MANIFEST.MF53
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.core/pom.xml2
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.edit/.project74
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.edit/META-INF/MANIFEST.MF32
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.edit/pom.xml2
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.editor/.project74
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.editor/META-INF/MANIFEST.MF35
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.editor/pom.xml2
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.rulebased/.project74
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.rulebased/META-INF/MANIFEST.MF48
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.rulebased/pom.xml2
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.ui/.project18
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.ui/META-INF/MANIFEST.MF31
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.ui/pom.xml2
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types/.project18
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types/META-INF/MANIFEST.MF7
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types/pom.xml2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.onefile.ui/.project24
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.onefile.ui/META-INF/MANIFEST.MF27
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui.resources/.project24
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui.resources/META-INF/MANIFEST.MF16
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/.project24
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/META-INF/MANIFEST.MF27
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/command/AbstractCommandHandler.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/command/AbstractPapyrusHandler.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/contentoutline/ContentOutlineRegistry.java3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/contentoutline/IPapyrusContentOutlinePage.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/contentoutline/NestedEditorDelegatedOutlinePage.java4
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/converter/AbstractStringValueConverter.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/converter/ConvertedValueContainer.java5
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/converter/EMFStringValueConverter.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/converter/IStringValueConverter.java3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/converter/MultiConvertedValueContainer.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/converter/StringValueConverterStatus.java3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/dnd/PapyrusTransfer.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/ContentProviderServiceFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/CoreMultiDiagramEditor.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/DiSashModelManagerServiceFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/DiSashModelMngrServiceFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/IMultiDiagramEditor.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/IPapyrusPageInput.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/IReloadableEditor.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/PageIconRegistryServiceFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/PageMngrServiceFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/PapyrusPageInput.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/CompositeReloadContext.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/DelegatingReloadContext.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/EMFSelectionContext.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/EMFTreeViewerContext.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/EditorReloadAdapter.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/EditorReloadEvent.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/IDisposableReloadContext.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/IEditorReloadListener.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/IReloadContextProvider.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/SelectionContext.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editor/reload/TreeViewerContext.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editorsfactory/AbstractGetEditorIconQuery.java5
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editorsfactory/IEditorFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editorsfactory/IEditorIconFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editorsfactory/IEditorIconFactoryExtended.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editorsfactory/IPageIconsRegistry.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editorsfactory/IPageIconsRegistryExtended.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editorsfactory/PageIconsRegistry.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/editorsfactory/PageModelFactoryRegistry.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/commands/ICreationCondition.java3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/commands/IModelCreationCommand.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/commands/PerspectiveContextDependence.java5
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/AbstractEditorFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/EditorDescriptor.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/EditorDescriptorExtensionFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/EditorFactoryProxy.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/EditorIconFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/EditorNotFoundException.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/IPluggableEditorFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/MultiDiagramException.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/extension/diagrameditor/PluggableEditorFactoryReader.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/lifecycleevents/DoSaveEvent.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/lifecycleevents/IEditorInputChangedListener.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/lifecycleevents/ILifeCycleEventsProvider.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/lifecycleevents/ISaveAndDirtyService.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/lifecycleevents/ISaveEventListener.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/lifecycleevents/LifeCycleEventsProvider.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/lifecycleevents/LifeCycleEventsProviderServiceFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/lifecycleevents/SaveAndDirtyService.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/multidiagram/actionbarcontributor/ActionBarContributorDescriptor.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/multidiagram/actionbarcontributor/ActionBarContributorExtensionFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/multidiagram/actionbarcontributor/ActionBarContributorRegistry.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/multidiagram/actionbarcontributor/CoreComposedActionBarContributor.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/multidiagram/actionbarcontributor/IActionBarContributorFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/preferences/AbstractPapyrusPreferencePage.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/preferences/AbstractPapyrusPreferenceStore.java3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/preferences/AbstractPreferenceGroup.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/preferences/IPapyrusPreferencePage.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/preferences/PapyrusScopedPreferenceStore.java47
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/preferences/VisiblePageSingleton.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/preferences/dialog/AbstractApplyValueOnPreferenceKeyDialog.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/preferences/dialog/AbstractPreferenceKeyDialog.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositePapyrusContentProvider.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositeSemanticContentProviderFactory.java20
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProvider.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/ISemanticContentProviderFactory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/EditorLifecycleEventListener.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/EditorLifecycleManager.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/ResourceUpdateService.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/services/SaveLayoutBeforeClose.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/AbstractCreateMenuFromCommandCategory.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/DisplayUtils.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/EclipseCommandUtils.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/EditorHelper.java6
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/EditorUtils.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ICallableWithProgress.java50
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/PapyrusImageUtils.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/SelectionHelper.java13
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForActionHandlers.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForHandlers.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForIEvaluationContext.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForSelection.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/ServiceUtilsForWorkbenchPage.java3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/TransactionUIHelper.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/UIUtil.java29
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/WorkbenchPartHelper.java6
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets.toolbox/.project24
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets.toolbox/META-INF/MANIFEST.MF13
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets.toolbox/src/org/eclipse/papyrus/infra/widgets/toolbox/notification/builders/NotificationBuilder.java2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/.project28
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/.settings/.api_filters67
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/META-INF/MANIFEST.MF23
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/pom.xml2
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/SelectionMenu.java99
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/CompositeContentProvider.java3
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/INameResolutionHelper.java4
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.project74
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF40
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.project74
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/META-INF/MANIFEST.MF40
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.project74
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF52
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.project74
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/META-INF/MANIFEST.MF30
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.project74
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/META-INF/MANIFEST.MF32
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.project74
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/META-INF/MANIFEST.MF62
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.project74
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/META-INF/MANIFEST.MF31
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.edit/.project24
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.edit/META-INF/MANIFEST.MF13
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.edit/pom.xml4
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.editor/.project6
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.emf/.project24
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF20
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.emf/pom.xml4
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java2
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java3
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.ui/.project24
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes.ui/META-INF/MANIFEST.MF11
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes/.project24
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF10
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes/pom.xml4
-rw-r--r--plugins/infra/xtypes/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/util/InternalUtils.java2
455 files changed, 10300 insertions, 7879 deletions
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/.project b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/.project
index bd6c5dc5bdd..98e1597521c 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/.project
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/.project
@@ -20,9 +20,33 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/META-INF/MANIFEST.MF b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/META-INF/MANIFEST.MF
index 0f95843ca91..d88806cffec 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/META-INF/MANIFEST.MF
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/META-INF/MANIFEST.MF
@@ -1,13 +1,13 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.constraints;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.emf.edit;visibility:=reexport
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.papyrus.infra.constraints;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)";visibility:=reexport
Export-Package: org.eclipse.papyrus.infra.constraints.environment.provider,
org.eclipse.papyrus.infra.constraints.provider
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.infra.constraints.provider.ConstraintsEditPlugin$Implementation
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/pom.xml b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/pom.xml
index f18670ccaec..8a0b9f7a565 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/pom.xml
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.constraints.edit</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/.project b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/.project
index 7662e546de1..d4781a594ad 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/.project
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/.project
@@ -20,9 +20,33 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/META-INF/MANIFEST.MF b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/META-INF/MANIFEST.MF
index a2229df65f3..ac90454c9b5 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/META-INF/MANIFEST.MF
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/META-INF/MANIFEST.MF
@@ -1,16 +1,16 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.papyrus.infra.constraints.edit;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.emf.edit.ui;visibility:=reexport,
- org.eclipse.ui.ide
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints.edit;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.edit.ui;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)";visibility:=reexport
Export-Package: org.eclipse.papyrus.infra.constraints.environment.presentation,
org.eclipse.papyrus.infra.constraints.presentation
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.infra.constraints.presentation.ConstraintsEditorPlugin$Implementation
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/pom.xml b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/pom.xml
index a582793ef1f..3863373dc03 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/pom.xml
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.editor/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.constraints.editor</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/.project b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/.project
index 504fa7b2052..7a03413f3d1 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/.project
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/.project
@@ -20,10 +20,34 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.papyrus.emf.facet.common.ProjectNature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/META-INF/MANIFEST.MF b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/META-INF/MANIFEST.MF
index 9406211cf94..fffeb1ed57f 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/META-INF/MANIFEST.MF
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.ui/META-INF/MANIFEST.MF
@@ -1,16 +1,13 @@
Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.constraints.internal.ui,
+Export-Package: org.eclipse.papyrus.infra.constraints.internal.ui;x-internal:=true,
org.eclipse.papyrus.infra.constraints.ui.providers
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui;bundle-version="3.100.0",
- org.eclipse.papyrus.infra.constraints;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.papyrus.infra.constraints;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.widgets;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
Bundle-Vendor: %providerName
Bundle-Version: 1.2.0.qualifier
Eclipse-BuddyPolicy: dependent
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/.project b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/.project
index b25074f0f42..fe645f66b83 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/.project
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/.project
@@ -20,10 +20,34 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.papyrus.emf.facet.common.ProjectNature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/META-INF/MANIFEST.MF b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/META-INF/MANIFEST.MF
index 570db921afc..05ca7503202 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/META-INF/MANIFEST.MF
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/META-INF/MANIFEST.MF
@@ -12,13 +12,10 @@ Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0";visibility:=reexport
+Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf;bundle-version="[2.0.0,3.0.0)"
Bundle-Vendor: %providerName
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Eclipse-BuddyPolicy: dependent
Bundle-Activator: org.eclipse.papyrus.infra.constraints.Activator
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/pom.xml b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/pom.xml
index d0cbe425a31..f5aacd8499d 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/pom.xml
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.constraints</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/AbstractConstraint.java b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/AbstractConstraint.java
index c758dfd4a0f..60f8ec8aa1c 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/AbstractConstraint.java
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/AbstractConstraint.java
@@ -211,6 +211,8 @@ public abstract class AbstractConstraint implements Constraint {
*
* The default implementation matches a selection iff the constraint matches
* each object of the selection.
+ *
+ * @since 2.0
*/
@Override
public boolean match(Collection<?> selection) {
@@ -245,6 +247,9 @@ public abstract class AbstractConstraint implements Constraint {
return false;
}
+ /**
+ * @since 2.0
+ */
protected Object first(Collection<?> collection) {
return (collection instanceof List<?>)
? ((List<?>) collection).get(0)
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/Constraint.java b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/Constraint.java
index b6a96f7bc0b..85f7c20a2ec 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/Constraint.java
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/Constraint.java
@@ -44,6 +44,7 @@ public interface Constraint {
* The selection to be tested against this constraint
* @return
* True if this constraint matches the given selection
+ * @since 2.0
*/
public boolean match(Collection<?> selection);
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/ConstraintEngine.java b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/ConstraintEngine.java
index 0d93115d4d2..ef8ddef5e5f 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/ConstraintEngine.java
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/ConstraintEngine.java
@@ -39,6 +39,7 @@ public interface ConstraintEngine<E extends DisplayUnit> {
* or just a single object
*
* @return the display units applicable to the selection
+ * @since 2.0
*/
public Set<E> getDisplayUnits(Object selection);
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/DefaultConstraintEngine.java b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/DefaultConstraintEngine.java
index 63bae2ba467..2583b740814 100644
--- a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/DefaultConstraintEngine.java
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/runtime/DefaultConstraintEngine.java
@@ -58,6 +58,9 @@ public abstract class DefaultConstraintEngine<E extends DisplayUnit> implements
private final Map<Class<?>, Method> collectionConverters = new HashMap<>();
+ /**
+ * @since 2.0
+ */
protected DefaultConstraintEngine(Class<? extends E> displayUnitType) {
super();
@@ -75,6 +78,9 @@ public abstract class DefaultConstraintEngine<E extends DisplayUnit> implements
}
}
+ /**
+ * @since 2.0
+ */
@Override
public synchronized Set<E> getDisplayUnits(final Object selection) {
Collection<?> collection = asCollection(selection);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.log/.project b/plugins/infra/core/org.eclipse.papyrus.infra.core.log/.project
index ee0abe766e9..b427364eff8 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.log/.project
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.log/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.core.log</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.core.log</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.log/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.log/META-INF/MANIFEST.MF
index 8c2cc0d44e7..f52e6251e77 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.log/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.log/META-INF/MANIFEST.MF
@@ -1,12 +1,12 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime
-Export-Package: org.eclipse.papyrus.infra.core.log
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.infra.core.log.internal.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.infra.core.log
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)";visibility:=reexport
+Export-Package: org.eclipse.papyrus.infra.core.log
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.core.log.internal.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.core.log
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.log/src/org/eclipse/papyrus/infra/core/log/LogHelper.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.log/src/org/eclipse/papyrus/infra/core/log/LogHelper.java
index 9537346595c..333c0a4b5a1 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.log/src/org/eclipse/papyrus/infra/core/log/LogHelper.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.log/src/org/eclipse/papyrus/infra/core/log/LogHelper.java
@@ -1,261 +1,263 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2016 Atos Origin, CEA, Christian W. Damus, and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - initial API and implementation
- * Christian W. Damus (CEA) - bug 422257
- * Christian W. Damus - bugs 465416, 485220
- *
- *******************************************************************************/
-package org.eclipse.papyrus.infra.core.log;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.Bundle;
-
-/**
- * A Log Helper.
- *
- * @author tszadel
- *
- */
-public class LogHelper {
-
- /** The plugin Id. */
- private String pluginId;
-
- /** The plugin related to that helper. */
- private Bundle bundle;
-
- private boolean tracing;
- private Map<String, Boolean> traceOptions;
-
- /**
- * Default Constructor.
- * The associated plugin can be set later.
- * If no plugin is set, use java log.
- */
- public LogHelper() {
- }
-
- /**
- * Constructor.
- *
- * @param activator
- * The activator.
- */
- public LogHelper(Plugin activator) {
- setPlugin(activator);
- }
-
- /**
- * Constructor.
- *
- * @param bundle
- * The bundle.
- */
- public LogHelper(Bundle bundle) {
- setBundle(bundle);
- }
-
- /**
- * Set the associated plugin.
- * This plugin log will be used as log.
- *
- * @param activator
- */
- public void setPlugin(Plugin activator) {
- setBundle(activator.getBundle());
- }
-
- /**
- * Set the associated {@code bundle}.
- * This {@code bundle}'s log will be used as log.
- *
- * @param bundle
- * the bundle
- */
- public void setBundle(Bundle bundle) {
- this.pluginId = bundle.getSymbolicName();
- this.bundle = bundle;
-
- this.tracing = Boolean.valueOf(Platform.getDebugOption(String.format("%s/debug", pluginId))); //$NON-NLS-1$
- if (tracing) {
- this.traceOptions = new ConcurrentHashMap<String, Boolean>(32, 0.75f, 4);
- }
- }
-
- /**
- * Log an informative message into the Eclipse log file
- *
- * @param message
- * the message to log
- */
- public void info(String message) {
- log(message, IStatus.INFO);
- }
-
- /**
- * Log a debug message into the Eclipse log file
- *
- * @param message
- * the message to log
- */
- public void debug(String message) {
- if (isDebugEnabled()) {
- log("[DEBUG] " + message, IStatus.INFO);
- }
- }
-
- /**
- * Test if the platform is in debug mode.
- *
- * @return True if the platform is in debug mode.
- */
- public boolean isDebugEnabled() {
- if (bundle != null) {
- return Platform.inDebugMode();
- }
-
- return false;
- }
-
- /**
- * Queries whether the specified tracing {@code option} is enabled by the user.
- *
- * @param option
- * a tracing option, without the <tt>{@literal <bundle-id>/debug/}</tt> path prefix
- *
- * @return whether the tracing {@code option} is enabled
- *
- * @see #trace(String, String)
- */
- public boolean isTraceEnabled(String option) {
- if (tracing) {
- final String key = String.format("%s/debug/%s", pluginId, option); //$NON-NLS-1$
- Boolean result;
-
- synchronized (traceOptions) {
- result = traceOptions.get(key);
- if (result == null) {
- result = Boolean.valueOf(Platform.getDebugOption(key));
- traceOptions.put(key, result);
- }
- }
-
- return result;
- }
-
- return false;
- }
-
- /**
- * Prints the specified trace {@code message}, if the {@code option} is enabled by the user.
- *
- * @param option
- * the tracing option, without the <tt>{@literal <bundle-id>/debug/}</tt> path prefix
- * @param message
- * the message to print
- *
- * @see #isTraceEnabled(String)
- */
- public void trace(String option, String message) {
- if (isTraceEnabled(option)) {
- System.out.printf("[TRACE:%s] %s%n", option, message); //$NON-NLS-1$
- }
- }
-
- /**
- * Log a message with given level into the Eclipse log file
- *
- * @param message
- * the message to log
- * @param level
- * the message priority
- */
- private void log(String message, int level) {
- log(new Status(level, pluginId, message));
- }
-
- /**
- *
- * @param status
- */
- public void log(IStatus status) {
-
- if (bundle == null) {
- // TODO Do log with java ?
- } else {
- Platform.getLog(bundle).log(status);
- }
- }
-
- /**
- * Log a warning message.
- *
- * @param e
- * the exception to log
- */
- public void warn(String message) {
- log(message, IStatus.WARNING);
- }
-
-
- /**
- * Log an exception into the Eclipse log file
- *
- * @param e
- * the exception to log
- */
- public void error(Throwable e) {
- error("Unexpected Error", e);
- }
-
- /**
- * Log an exception into the Eclipse log file
- *
- * @param message
- * the message
- * @param e
- * the exception to log
- */
- public void error(String message, Throwable e) {
-
- Throwable t = e;
- if (e instanceof InvocationTargetException) {
- t = ((InvocationTargetException) e).getTargetException();
- }
-
- IStatus status;
- if (t instanceof CoreException) {
- status = ((CoreException) t).getStatus();
- } else {
- status = new Status(IStatus.ERROR, pluginId, message, e);
- }
-
- log(status);
- }
-
- /**
- * Obtains the stack-trace description of the caller of the calling method (that is, the method that
- * called the method using this helper method). Useful for logging warning messages etc.
- *
- * @return the caller of my caller, or a placeholder in case the JVM cannot provide the necessary
- * stack information (which is a documented possibility)
- */
- public String getCallerMethod() {
- StackTraceElement[] stack = new Exception().fillInStackTrace().getStackTrace();
- return ((stack == null) || (stack.length < 3)) ? "<unknown caller>" : stack[2].toString();
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2016 Atos Origin, CEA, Christian W. Damus, and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus - bugs 465416, 485220
+ *
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.core.log;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.Bundle;
+
+/**
+ * A Log Helper.
+ *
+ * @author tszadel
+ *
+ */
+public class LogHelper {
+
+ /** The plugin Id. */
+ private String pluginId;
+
+ /** The plugin related to that helper. */
+ private Bundle bundle;
+
+ private boolean tracing;
+ private Map<String, Boolean> traceOptions;
+
+ /**
+ * Default Constructor.
+ * The associated plugin can be set later.
+ * If no plugin is set, use java log.
+ */
+ public LogHelper() {
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param activator
+ * The activator.
+ */
+ public LogHelper(Plugin activator) {
+ setPlugin(activator);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param bundle
+ * The bundle.
+ * @since 1.2
+ */
+ public LogHelper(Bundle bundle) {
+ setBundle(bundle);
+ }
+
+ /**
+ * Set the associated plugin.
+ * This plugin log will be used as log.
+ *
+ * @param activator
+ */
+ public void setPlugin(Plugin activator) {
+ setBundle(activator.getBundle());
+ }
+
+ /**
+ * Set the associated {@code bundle}.
+ * This {@code bundle}'s log will be used as log.
+ *
+ * @param bundle
+ * the bundle
+ * @since 1.2
+ */
+ public void setBundle(Bundle bundle) {
+ this.pluginId = bundle.getSymbolicName();
+ this.bundle = bundle;
+
+ this.tracing = Boolean.valueOf(Platform.getDebugOption(String.format("%s/debug", pluginId))); //$NON-NLS-1$
+ if (tracing) {
+ this.traceOptions = new ConcurrentHashMap<String, Boolean>(32, 0.75f, 4);
+ }
+ }
+
+ /**
+ * Log an informative message into the Eclipse log file
+ *
+ * @param message
+ * the message to log
+ */
+ public void info(String message) {
+ log(message, IStatus.INFO);
+ }
+
+ /**
+ * Log a debug message into the Eclipse log file
+ *
+ * @param message
+ * the message to log
+ */
+ public void debug(String message) {
+ if (isDebugEnabled()) {
+ log("[DEBUG] " + message, IStatus.INFO);
+ }
+ }
+
+ /**
+ * Test if the platform is in debug mode.
+ *
+ * @return True if the platform is in debug mode.
+ */
+ public boolean isDebugEnabled() {
+ if (bundle != null) {
+ return Platform.inDebugMode();
+ }
+
+ return false;
+ }
+
+ /**
+ * Queries whether the specified tracing {@code option} is enabled by the user.
+ *
+ * @param option
+ * a tracing option, without the <tt>{@literal <bundle-id>/debug/}</tt> path prefix
+ *
+ * @return whether the tracing {@code option} is enabled
+ *
+ * @see #trace(String, String)
+ */
+ public boolean isTraceEnabled(String option) {
+ if (tracing) {
+ final String key = String.format("%s/debug/%s", pluginId, option); //$NON-NLS-1$
+ Boolean result;
+
+ synchronized (traceOptions) {
+ result = traceOptions.get(key);
+ if (result == null) {
+ result = Boolean.valueOf(Platform.getDebugOption(key));
+ traceOptions.put(key, result);
+ }
+ }
+
+ return result;
+ }
+
+ return false;
+ }
+
+ /**
+ * Prints the specified trace {@code message}, if the {@code option} is enabled by the user.
+ *
+ * @param option
+ * the tracing option, without the <tt>{@literal <bundle-id>/debug/}</tt> path prefix
+ * @param message
+ * the message to print
+ *
+ * @see #isTraceEnabled(String)
+ */
+ public void trace(String option, String message) {
+ if (isTraceEnabled(option)) {
+ System.out.printf("[TRACE:%s] %s%n", option, message); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Log a message with given level into the Eclipse log file
+ *
+ * @param message
+ * the message to log
+ * @param level
+ * the message priority
+ */
+ private void log(String message, int level) {
+ log(new Status(level, pluginId, message));
+ }
+
+ /**
+ *
+ * @param status
+ */
+ public void log(IStatus status) {
+
+ if (bundle == null) {
+ // TODO Do log with java ?
+ } else {
+ Platform.getLog(bundle).log(status);
+ }
+ }
+
+ /**
+ * Log a warning message.
+ *
+ * @param e
+ * the exception to log
+ */
+ public void warn(String message) {
+ log(message, IStatus.WARNING);
+ }
+
+
+ /**
+ * Log an exception into the Eclipse log file
+ *
+ * @param e
+ * the exception to log
+ */
+ public void error(Throwable e) {
+ error("Unexpected Error", e);
+ }
+
+ /**
+ * Log an exception into the Eclipse log file
+ *
+ * @param message
+ * the message
+ * @param e
+ * the exception to log
+ */
+ public void error(String message, Throwable e) {
+
+ Throwable t = e;
+ if (e instanceof InvocationTargetException) {
+ t = ((InvocationTargetException) e).getTargetException();
+ }
+
+ IStatus status;
+ if (t instanceof CoreException) {
+ status = ((CoreException) t).getStatus();
+ } else {
+ status = new Status(IStatus.ERROR, pluginId, message, e);
+ }
+
+ log(status);
+ }
+
+ /**
+ * Obtains the stack-trace description of the caller of the calling method (that is, the method that
+ * called the method using this helper method). Useful for logging warning messages etc.
+ *
+ * @return the caller of my caller, or a placeholder in case the JVM cannot provide the necessary
+ * stack information (which is a documented possibility)
+ */
+ public String getCallerMethod() {
+ StackTraceElement[] stack = new Exception().fillInStackTrace().getStackTrace();
+ return ((stack == null) || (stack.length < 3)) ? "<unknown caller>" : stack[2].toString();
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.project b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.project
index 935d5ed70f1..4a8749d1e78 100755
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.project
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.core.pluginexplorer</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.core.pluginexplorer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF
index e91b815a11c..90913434d2f 100755
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF
@@ -1,15 +1,14 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.core.pluginexplorer
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.papyrus.infra.core.pluginexplorer.Activator
-Bundle-ManifestVersion: 2
-Bundle-Description: %pluginDescription
-Bundle-SymbolicName: org.eclipse.papyrus.infra.core.pluginexplorer;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.core.pluginexplorer
+Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)";visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-Activator: org.eclipse.papyrus.infra.core.pluginexplorer.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.infra.core.pluginexplorer;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/.project b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/.project
index 46189987209..e0e931c07d1 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/.project
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.core.sasheditor.di</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.core.sasheditor.di</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/META-INF/MANIFEST.MF
index 3d881990d21..f0fdd97593a 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/META-INF/MANIFEST.MF
@@ -1,27 +1,20 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider,
- org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.commands,
- org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal,
- org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.utils
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.swt;bundle-version="3.5.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime;bundle-version="3.6.0",
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;bundle-version="2.5.0";visibility:=reexport,
- org.eclipse.uml2.types;visibility:=reexport,
- org.eclipse.uml2.common;visibility:=reexport,
- org.eclipse.emf.transaction;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
-Bundle-Vendor: %providerName
-Bundle-Version: 1.2.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.core.sasheditor.di;singleton:=true
-Eclipse-ExtensibleAPI: true
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider,
+ org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.commands,
+ org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal;x-internal:=true,
+ org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.utils
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.papyrus.infra.core.sasheditor;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.2.0,2.0.0)";visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.core.sasheditor.di;singleton:=true
+Eclipse-ExtensibleAPI: true
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelManager.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelManager.java
index 2d242f0b080..a06bc084fdf 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelManager.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelManager.java
@@ -1,333 +1,335 @@
-/*****************************************************************************
- * Copyright (c) 2013, 2016 Cedric Dumoulin, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus - bugs 469188, 485220
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider;
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IContentChangedProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.ContentChangedEventProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.CurrentFolderAndPageManager;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.DiContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.ICurrentFolderAndPageMngr;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.PageManagerImpl;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.TransactionalDiContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.TransactionalPageManagerImpl;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.utils.TransactionHelper;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
-import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
-import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
-import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
-
-
-/**
- * Class used as main entry point to access a sash model build on EMF / di
- * This class allows to get facade objects on the diSashModel.
- *
- * @author cedric dumoulin
- *
- */
-public class DiSashModelManager {
-
- /** The EMF model used to store the sash windows structure and pages */
- protected SashWindowsMngr sashWindowMngr;
-
- /**
- * Instance of the {@link PageManagerImpl}.
- */
- private final PageManagerImpl pageMngr;
-
- /**
- * Instance of the DiContentProvider used to manipulate SashModel.
- */
- private final DiContentProvider contentProvider;
-
- private final TransactionalDiContentProvider transDiContentProvider;
-
- private final IPageModelFactory pageModelFactory;
-
- /**
- * Object used externally listen to model changes.
- * The object is also used internally to control how events are fired (limit multiple events).
- */
- protected ContentChangedEventProvider contentChangedEventProvider;
-
- /** The factory used to create IPageModel */
- // private IPageModelFactory pageModelFactory;
-
-
- /**
- *
- * Constructor.
- *
- * @param pageModelFactory
- * @param diResource
- * @param currentFolderAndPageMngr
- */
- public DiSashModelManager(IPageModelFactory pageModelFactory, final Resource diResource, TransactionalEditingDomain editingDomain, ICurrentFolderAndPageMngr currentFolderAndPageMngr) {
- // this.pageModelFactory = pageModelFactory;
-
- // lookup the SashModel
- sashWindowMngr = lookupSashWindowMngr(diResource);
- // If no SashWindow structure is found, create a new one using a transaction.
- if (sashWindowMngr == null) {
- // Create a default model and attach it to resource.
- sashWindowMngr = createDefaultSashModel();
- // Create a command
- RecordingCommand cmd = new RecordingCommand(editingDomain) {
-
- @Override
- protected void doExecute() {
- diResource.getContents().add(sashWindowMngr);
- }
- };
- // Execute command
- editingDomain.getCommandStack().execute(cmd);
- }
-
- this.pageModelFactory = pageModelFactory;
-
- contentProvider = new DiContentProvider(sashWindowMngr.getSashModel(), pageModelFactory, contentChangedEventProvider);
- // Create the TransactionalDiContentProvider
- transDiContentProvider = new TransactionalDiContentProvider(getDiContentProvider(), editingDomain);
-
- // Create the TransactionalPageMngrImpl
- pageMngr = new TransactionalPageManagerImpl(sashWindowMngr, contentChangedEventProvider, currentFolderAndPageMngr);
- }
-
- /**
- *
- * Constructor.
- *
- * @param pageModelFactory
- * @param diResource
- * @param currentFolderAndPageMngr
- */
- public DiSashModelManager(IPageModelFactory pageModelFactory, final Resource diResource, TransactionalEditingDomain editingDomain) {
-
- // lookup the SashModel
- sashWindowMngr = lookupSashWindowMngr(diResource);
- // If no SashWindow structure is found, create a new one using a transaction.
- if (sashWindowMngr == null) {
- // Create a default model and attach it to resource.
- sashWindowMngr = createDefaultSashModel();
-
- try {
- TransactionHelper.run(editingDomain, new Runnable() {
-
- @Override
- public void run() {
- diResource.getContents().add(sashWindowMngr);
-
- };
- });
- } catch (Exception ex) {
- Activator.log.error(ex);
- }
- }
-
- this.pageModelFactory = pageModelFactory;
-
- contentProvider = new DiContentProvider(sashWindowMngr.getSashModel(), pageModelFactory, getContentChangedEventProvider());
- // Create the TransactionalDiContentProvider
- transDiContentProvider = new TransactionalDiContentProvider(getDiContentProvider(), editingDomain);
-
- // Create the TransactionalPageMngrImpl
- pageMngr = new TransactionalPageManagerImpl(sashWindowMngr, getContentChangedEventProvider());
-
- }
-
- /**
- *
- * @param currentFolderAndPageMngr
- */
- public void setCurrentFolderAndPageMngr(ICurrentFolderAndPageMngr currentFolderAndPageMngr) {
- pageMngr.setCurrentFolderAndPageMngr(currentFolderAndPageMngr);
- }
-
- /**
- * Set the CurrentFolderAndPageManager as an instance of {@link CurrentFolderAndPageManager}
- *
- * @param currentFolderAndPageMngr
- */
- public void setCurrentFolderAndPageMngr(ISashWindowsContainer sashWindowsContainer) {
- pageMngr.setCurrentFolderAndPageMngr(new CurrentFolderAndPageManager(sashWindowsContainer));
- }
-
- /**
- *
- * Constructor.
- * Only create a {@link IPageMngr} impl. Do not create the DiContentProvider as there is no factory provided.
- * Internal use.
- *
- * @param pageModelFactory
- * @param diResource
- */
- // private DiSashModelManager(final Resource diResource, TransactionalEditingDomain editingDomain, ICurrentFolderAndPageMngr currentFolderAndPageMngr) {
- // this(null, diResource, editingDomain, currentFolderAndPageMngr);
- //
- // }
-
-
- /**
- * Get the internal EMF implementation.
- * Intended to be used by tests.
- *
- * @return the sashWindowMngr
- */
- protected SashWindowsMngr getDiSashWindowsMngr() {
- return sashWindowMngr;
- }
-
-
- /**
- * Return the internal implementation of ContentProvider.
- * Create if if needed.
- * This method should not be subclassed
- *
- * @return the contentProvider
- */
- protected DiContentProvider getDiContentProvider() {
- return contentProvider;
- }
-
- /**
- * Return the internal implementation of ContentProvider.
- * Create if if needed.
- * This method should not be subclassed
- *
- * @return the contentProvider
- */
- protected TransactionalDiContentProvider getTransactionalDiContentProvider() {
- return transDiContentProvider;
- }
-
- /**
- * Return the internal implementation of PageMngr.
- * Create if if needed.
- * This method should not be subclassed
- *
- * @return the PageMngrImpl
- */
- protected final PageManagerImpl getPageManagerImpl() {
- return pageMngr;
- }
-
- /**
- * Return the internal implementation of ContentChangedEventProvider.
- * Create if if needed.
- * This method should not be subclassed
- *
- * @return the PageMngrImpl
- */
- protected final ContentChangedEventProvider getContentChangedEventProvider() {
- if (contentChangedEventProvider == null) {
- contentChangedEventProvider = new ContentChangedEventProvider(sashWindowMngr);
- }
-
- return contentChangedEventProvider;
- }
-
- /**
- * Get the IPageManager providing basic methods to manage Pages in the sash model.
- *
- * @return
- */
- public IPageManager getIPageManager() {
- return getPageManagerImpl();
- }
-
- /**
- * Get the ContentProvider used by the SashWindows system.
- * This class can also be used to accurately manage the sash model.
- *
- * @return
- */
- public ISashWindowsContentProvider getISashWindowsContentProvider() {
-
- return getTransactionalDiContentProvider();
-
- }
-
- /**
- * Get the ContentChangedProvider for the SashModel
- *
- * @return
- */
- public IContentChangedProvider getSashModelContentChangedProvider() {
- return getContentChangedEventProvider();
- }
-
- /**
- * Create a default model with one window and one folder.
- *
- * @param diResource
- * @return
- */
- protected SashWindowsMngr createDefaultSashModel() {
- SashWindowsMngr result = DiUtils.createDefaultSashWindowsMngr();
-
- if (result.getSashModel() != null) {
- // Default this to true for new models, which store the sash model
- // in the workspace private area by default
- result.getSashModel().setRestoreActivePage(true);
- }
-
- return result;
- }
-
- /**
- * Lookup for the SashModel object in the resource
- *
- * @param diResource
- * @return
- */
- protected SashWindowsMngr lookupSashWindowMngr(Resource diResource) {
-
- return DiUtils.lookupSashWindowsMngr(diResource);
- }
-
- /*
- * Create an instance of IPageMngr acting on the provided resource.
- * This instance is suitable to add, remove, close or open diagrams.
- *
- * @param diResource
- *
- * @return The non transactional version of the IPageMngr
- */
- // public static IPageMngr createIPageMngr(Resource diResource) {
- //
- // // Create an instance of the DiSashModelMngr with no factory.
- // // The factory is not needed since we don't get the ISashWindowsContentProvider.
- // return new DiSashModelManager(null, diResource).getIPageMngr();
- //
- // }
-
- /**
- * Finds a the EditorIDs that can open the given pageIdentifier
- *
- * @param pageIdentifier
- * @return A map of (ID -> Label) for the matching editors
- *
- * @see {@link IPageManager#DEFAULT_EDITOR}
- */
- public Map<String, String> getEditorIDsFor(Object pageIdentifier) {
- return pageModelFactory.getEditorIDsFor(pageIdentifier);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013, 2016 Cedric Dumoulin, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus - bugs 469188, 485220
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IContentChangedProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.ContentChangedEventProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.CurrentFolderAndPageManager;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.DiContentProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.ICurrentFolderAndPageMngr;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.PageManagerImpl;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.TransactionalDiContentProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.TransactionalPageManagerImpl;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.utils.TransactionHelper;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
+
+
+/**
+ * Class used as main entry point to access a sash model build on EMF / di
+ * This class allows to get facade objects on the diSashModel.
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class DiSashModelManager {
+
+ /** The EMF model used to store the sash windows structure and pages */
+ protected SashWindowsMngr sashWindowMngr;
+
+ /**
+ * Instance of the {@link PageManagerImpl}.
+ */
+ private final PageManagerImpl pageMngr;
+
+ /**
+ * Instance of the DiContentProvider used to manipulate SashModel.
+ */
+ private final DiContentProvider contentProvider;
+
+ private final TransactionalDiContentProvider transDiContentProvider;
+
+ private final IPageModelFactory pageModelFactory;
+
+ /**
+ * Object used externally listen to model changes.
+ * The object is also used internally to control how events are fired (limit multiple events).
+ */
+ protected ContentChangedEventProvider contentChangedEventProvider;
+
+ /** The factory used to create IPageModel */
+ // private IPageModelFactory pageModelFactory;
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param pageModelFactory
+ * @param diResource
+ * @param currentFolderAndPageMngr
+ */
+ public DiSashModelManager(IPageModelFactory pageModelFactory, final Resource diResource, TransactionalEditingDomain editingDomain, ICurrentFolderAndPageMngr currentFolderAndPageMngr) {
+ // this.pageModelFactory = pageModelFactory;
+
+ // lookup the SashModel
+ sashWindowMngr = lookupSashWindowMngr(diResource);
+ // If no SashWindow structure is found, create a new one using a transaction.
+ if (sashWindowMngr == null) {
+ // Create a default model and attach it to resource.
+ sashWindowMngr = createDefaultSashModel();
+ // Create a command
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+
+ @Override
+ protected void doExecute() {
+ diResource.getContents().add(sashWindowMngr);
+ }
+ };
+ // Execute command
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+ this.pageModelFactory = pageModelFactory;
+
+ contentProvider = new DiContentProvider(sashWindowMngr.getSashModel(), pageModelFactory, contentChangedEventProvider);
+ // Create the TransactionalDiContentProvider
+ transDiContentProvider = new TransactionalDiContentProvider(getDiContentProvider(), editingDomain);
+
+ // Create the TransactionalPageMngrImpl
+ pageMngr = new TransactionalPageManagerImpl(sashWindowMngr, contentChangedEventProvider, currentFolderAndPageMngr);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param pageModelFactory
+ * @param diResource
+ * @param currentFolderAndPageMngr
+ */
+ public DiSashModelManager(IPageModelFactory pageModelFactory, final Resource diResource, TransactionalEditingDomain editingDomain) {
+
+ // lookup the SashModel
+ sashWindowMngr = lookupSashWindowMngr(diResource);
+ // If no SashWindow structure is found, create a new one using a transaction.
+ if (sashWindowMngr == null) {
+ // Create a default model and attach it to resource.
+ sashWindowMngr = createDefaultSashModel();
+
+ try {
+ TransactionHelper.run(editingDomain, new Runnable() {
+
+ @Override
+ public void run() {
+ diResource.getContents().add(sashWindowMngr);
+
+ };
+ });
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ }
+ }
+
+ this.pageModelFactory = pageModelFactory;
+
+ contentProvider = new DiContentProvider(sashWindowMngr.getSashModel(), pageModelFactory, getContentChangedEventProvider());
+ // Create the TransactionalDiContentProvider
+ transDiContentProvider = new TransactionalDiContentProvider(getDiContentProvider(), editingDomain);
+
+ // Create the TransactionalPageMngrImpl
+ pageMngr = new TransactionalPageManagerImpl(sashWindowMngr, getContentChangedEventProvider());
+
+ }
+
+ /**
+ *
+ * @param currentFolderAndPageMngr
+ */
+ public void setCurrentFolderAndPageMngr(ICurrentFolderAndPageMngr currentFolderAndPageMngr) {
+ pageMngr.setCurrentFolderAndPageMngr(currentFolderAndPageMngr);
+ }
+
+ /**
+ * Set the CurrentFolderAndPageManager as an instance of {@link CurrentFolderAndPageManager}
+ *
+ * @param currentFolderAndPageMngr
+ */
+ public void setCurrentFolderAndPageMngr(ISashWindowsContainer sashWindowsContainer) {
+ pageMngr.setCurrentFolderAndPageMngr(new CurrentFolderAndPageManager(sashWindowsContainer));
+ }
+
+ /**
+ *
+ * Constructor.
+ * Only create a {@link IPageMngr} impl. Do not create the DiContentProvider as there is no factory provided.
+ * Internal use.
+ *
+ * @param pageModelFactory
+ * @param diResource
+ */
+ // private DiSashModelManager(final Resource diResource, TransactionalEditingDomain editingDomain, ICurrentFolderAndPageMngr currentFolderAndPageMngr) {
+ // this(null, diResource, editingDomain, currentFolderAndPageMngr);
+ //
+ // }
+
+
+ /**
+ * Get the internal EMF implementation.
+ * Intended to be used by tests.
+ *
+ * @return the sashWindowMngr
+ */
+ protected SashWindowsMngr getDiSashWindowsMngr() {
+ return sashWindowMngr;
+ }
+
+
+ /**
+ * Return the internal implementation of ContentProvider.
+ * Create if if needed.
+ * This method should not be subclassed
+ *
+ * @return the contentProvider
+ */
+ protected DiContentProvider getDiContentProvider() {
+ return contentProvider;
+ }
+
+ /**
+ * Return the internal implementation of ContentProvider.
+ * Create if if needed.
+ * This method should not be subclassed
+ *
+ * @return the contentProvider
+ */
+ protected TransactionalDiContentProvider getTransactionalDiContentProvider() {
+ return transDiContentProvider;
+ }
+
+ /**
+ * Return the internal implementation of PageMngr.
+ * Create if if needed.
+ * This method should not be subclassed
+ *
+ * @return the PageMngrImpl
+ */
+ protected final PageManagerImpl getPageManagerImpl() {
+ return pageMngr;
+ }
+
+ /**
+ * Return the internal implementation of ContentChangedEventProvider.
+ * Create if if needed.
+ * This method should not be subclassed
+ *
+ * @return the PageMngrImpl
+ */
+ protected final ContentChangedEventProvider getContentChangedEventProvider() {
+ if (contentChangedEventProvider == null) {
+ contentChangedEventProvider = new ContentChangedEventProvider(sashWindowMngr);
+ }
+
+ return contentChangedEventProvider;
+ }
+
+ /**
+ * Get the IPageManager providing basic methods to manage Pages in the sash model.
+ *
+ * @return
+ * @since 2.0
+ */
+ public IPageManager getIPageManager() {
+ return getPageManagerImpl();
+ }
+
+ /**
+ * Get the ContentProvider used by the SashWindows system.
+ * This class can also be used to accurately manage the sash model.
+ *
+ * @return
+ */
+ public ISashWindowsContentProvider getISashWindowsContentProvider() {
+
+ return getTransactionalDiContentProvider();
+
+ }
+
+ /**
+ * Get the ContentChangedProvider for the SashModel
+ *
+ * @return
+ */
+ public IContentChangedProvider getSashModelContentChangedProvider() {
+ return getContentChangedEventProvider();
+ }
+
+ /**
+ * Create a default model with one window and one folder.
+ *
+ * @param diResource
+ * @return
+ */
+ protected SashWindowsMngr createDefaultSashModel() {
+ SashWindowsMngr result = DiUtils.createDefaultSashWindowsMngr();
+
+ if (result.getSashModel() != null) {
+ // Default this to true for new models, which store the sash model
+ // in the workspace private area by default
+ result.getSashModel().setRestoreActivePage(true);
+ }
+
+ return result;
+ }
+
+ /**
+ * Lookup for the SashModel object in the resource
+ *
+ * @param diResource
+ * @return
+ */
+ protected SashWindowsMngr lookupSashWindowMngr(Resource diResource) {
+
+ return DiUtils.lookupSashWindowsMngr(diResource);
+ }
+
+ /*
+ * Create an instance of IPageMngr acting on the provided resource.
+ * This instance is suitable to add, remove, close or open diagrams.
+ *
+ * @param diResource
+ *
+ * @return The non transactional version of the IPageMngr
+ */
+ // public static IPageMngr createIPageMngr(Resource diResource) {
+ //
+ // // Create an instance of the DiSashModelMngr with no factory.
+ // // The factory is not needed since we don't get the ISashWindowsContentProvider.
+ // return new DiSashModelManager(null, diResource).getIPageMngr();
+ //
+ // }
+
+ /**
+ * Finds a the EditorIDs that can open the given pageIdentifier
+ *
+ * @param pageIdentifier
+ * @return A map of (ID -> Label) for the matching editors
+ *
+ * @see {@link IPageManager#DEFAULT_EDITOR}
+ * @since 2.0
+ */
+ public Map<String, String> getEditorIDsFor(Object pageIdentifier) {
+ return pageModelFactory.getEditorIDsFor(pageIdentifier);
+ }
+
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngr.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngr.java
index 75a65785394..ab174d6f9cc 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngr.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngr.java
@@ -1,251 +1,253 @@
-/*****************************************************************************
- * Copyright (c) 2009, 2015 CEA LIST & LIFL, Christian W. Damus, and others
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus - bug 469188
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IContentChangedProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.ContentChangedEventProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.DiContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.PageManagerImpl;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.TransactionalPageManagerImpl;
-import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
-import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
-import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
-
-
-/**
- * Class used as main entry point to access a sash model build on EMF / di
- *
- * @author cedric dumoulin
- */
-public class DiSashModelMngr {
-
- /** The EMF model used to store the sash windows structure and pages */
- protected SashWindowsMngr sashWindowMngr;
-
- /**
- * Instance of the pageMngr.
- */
- private PageManagerImpl pageMngr = null;
-
- /**
- * Instance of the DiContentProvider used to manipulate SashModel.
- */
- private DiContentProvider contentProvider;
-
- /**
- * Object used externally listen to model changes.
- * The object is also used internally to control how events are fired (limit multiple events).
- */
- protected ContentChangedEventProvider contentChangedEventProvider;
-
- /** The factory used to create IPageModel */
- private IPageModelFactory pageModelFactory;
-
-
- /**
- * Constructor.
- * Create a DiSashModelMngr with the specified factory. A SashModel is created but not attached to a resource.
- * This constructor is for subclasses. The subclasses should initialize the sashWindowMngr
- *
- * @param pageModelFactory
- * @param createDefaultSashModel
- * If true, create the default SashModel by calling {@link #createDefaultSashModel()}
- */
- protected DiSashModelMngr(IPageModelFactory pageModelFactory, boolean createDefaultSashModel) {
- this.pageModelFactory = pageModelFactory;
- // Create a SashModel
- if (createDefaultSashModel) {
- sashWindowMngr = createDefaultSashModel();
- }
- }
-
- /**
- * Constructor.
- * Create a DiSashModelMngr with the specified factory. A SashModel is created but not attached to a resource.
- *
- * @param pageModelFactory
- */
- public DiSashModelMngr(IPageModelFactory pageModelFactory) {
- this.pageModelFactory = pageModelFactory;
- // Create a SashModel
- sashWindowMngr = createDefaultSashModel();
- }
-
- /**
- * Constructor.
- * Create a DiSashModelMngr with the specified factory. The SashModel is searched in the Resource. If not found,
- * create one in the resource.
- *
- * @param pageModelFactory
- * @param diResource
- */
- public DiSashModelMngr(IPageModelFactory pageModelFactory, Resource diResource) {
- this.pageModelFactory = pageModelFactory;
-
- // lookup the SashModel
- sashWindowMngr = lookupSashWindowMngr(diResource);
- if (sashWindowMngr == null) {
- // Create a default model and attach it to resource.
- sashWindowMngr = createDefaultSashModel();
- diResource.getContents().add(sashWindowMngr);
- }
- }
-
- /**
- * Constructor.
- * Create a DiSashModelMngr with the specified factory and sashModel.
- *
- * @param pageModelFactory
- * @param sashModel
- */
- public DiSashModelMngr(IPageModelFactory pageModelFactory, SashWindowsMngr sashModel) {
- this.pageModelFactory = pageModelFactory;
- this.sashWindowMngr = sashModel;
- }
-
- /**
- * Get the internal EMF implementation.
- * Intended to be used by tests.
- *
- * @return the sashWindowMngr
- */
- protected SashWindowsMngr getDiSashWindowsMngr() {
- return sashWindowMngr;
- }
-
-
- /**
- * Return the internal implementation of ContentProvider.
- * Create if if needed.
- * This method should not be subclassed
- *
- * @return the contentProvider
- */
- protected final DiContentProvider getDiContentProvider() {
- if (contentProvider == null) {
- contentProvider = new DiContentProvider(sashWindowMngr.getSashModel(), pageModelFactory, getContentChangedEventProvider());
- }
- return contentProvider;
- }
-
- /**
- * Return the internal implementation of PageMngr.
- * Create if if needed.
- * This method should not be subclassed
- *
- * @return the PageMngrImpl
- */
- protected final PageManagerImpl getPageMngrImpl() {
- if (pageMngr == null) {
- pageMngr = new TransactionalPageManagerImpl(sashWindowMngr, getContentChangedEventProvider());
- }
-
- return pageMngr;
- }
-
- /**
- * Return the internal implementation of ContentChangedEventProvider.
- * Create if if needed.
- * This method should not be subclassed
- *
- * @return the PageMngrImpl
- */
- protected final ContentChangedEventProvider getContentChangedEventProvider() {
- if (contentChangedEventProvider == null) {
- contentChangedEventProvider = new ContentChangedEventProvider(sashWindowMngr);
- }
-
- return contentChangedEventProvider;
- }
-
- /**
- * Get the IPageMngr providing basic methods to manage Pages in the sash model.
- *
- * @return
- */
- public IPageManager getIPageMngr() {
- return getPageMngrImpl();
- }
-
- /**
- * Get the ContentProvider used by the SashWindows system.
- * This class can also be used to accurately manage the sash model.
- *
- * @return
- */
- public ISashWindowsContentProvider getISashWindowsContentProvider() {
-
- return getDiContentProvider();
-
- }
-
- /**
- * Get the ContentChangedProvider for the SashModel
- *
- * @return
- */
- public IContentChangedProvider getSashModelContentChangedProvider() {
- return getContentChangedEventProvider();
- }
-
- /**
- * Create a default model with one window and one folder.
- *
- * @param diResource
- * @return
- */
- protected SashWindowsMngr createDefaultSashModel() {
- SashWindowsMngr result = DiUtils.createDefaultSashWindowsMngr();
-
- if (result.getSashModel() != null) {
- // Default this to true for new models, which store the sash model
- // in the workspace private area by default
- result.getSashModel().setRestoreActivePage(true);
- }
-
- return result;
- }
-
- /**
- * Lookup for the SashModel object in the resource
- *
- * @param diResource
- * @return
- */
- protected SashWindowsMngr lookupSashWindowMngr(Resource diResource) {
-
- return DiUtils.lookupSashWindowsMngr(diResource);
- }
-
- /**
- * Create an instance of IPageMngr acting on the provided resource.
- * This instance is suitable to add, remove, close or open diagrams.
- *
- * @param diResource
- * @return The non transactional version of the IPageMngr
- */
- public static IPageManager createIPageMngr(Resource diResource) {
-
- // Create an instance of the DiSashModelMngr with no factory.
- // The factory is not needed since we don't get the ISashWindowsContentProvider.
- return new DiSashModelMngr(null, diResource).getIPageMngr();
-
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2009, 2015 CEA LIST & LIFL, Christian W. Damus, and others
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus - bug 469188
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IContentChangedProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.ContentChangedEventProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.DiContentProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.PageManagerImpl;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal.TransactionalPageManagerImpl;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
+
+
+/**
+ * Class used as main entry point to access a sash model build on EMF / di
+ *
+ * @author cedric dumoulin
+ */
+public class DiSashModelMngr {
+
+ /** The EMF model used to store the sash windows structure and pages */
+ protected SashWindowsMngr sashWindowMngr;
+
+ /**
+ * Instance of the pageMngr.
+ */
+ private PageManagerImpl pageMngr = null;
+
+ /**
+ * Instance of the DiContentProvider used to manipulate SashModel.
+ */
+ private DiContentProvider contentProvider;
+
+ /**
+ * Object used externally listen to model changes.
+ * The object is also used internally to control how events are fired (limit multiple events).
+ */
+ protected ContentChangedEventProvider contentChangedEventProvider;
+
+ /** The factory used to create IPageModel */
+ private IPageModelFactory pageModelFactory;
+
+
+ /**
+ * Constructor.
+ * Create a DiSashModelMngr with the specified factory. A SashModel is created but not attached to a resource.
+ * This constructor is for subclasses. The subclasses should initialize the sashWindowMngr
+ *
+ * @param pageModelFactory
+ * @param createDefaultSashModel
+ * If true, create the default SashModel by calling {@link #createDefaultSashModel()}
+ */
+ protected DiSashModelMngr(IPageModelFactory pageModelFactory, boolean createDefaultSashModel) {
+ this.pageModelFactory = pageModelFactory;
+ // Create a SashModel
+ if (createDefaultSashModel) {
+ sashWindowMngr = createDefaultSashModel();
+ }
+ }
+
+ /**
+ * Constructor.
+ * Create a DiSashModelMngr with the specified factory. A SashModel is created but not attached to a resource.
+ *
+ * @param pageModelFactory
+ */
+ public DiSashModelMngr(IPageModelFactory pageModelFactory) {
+ this.pageModelFactory = pageModelFactory;
+ // Create a SashModel
+ sashWindowMngr = createDefaultSashModel();
+ }
+
+ /**
+ * Constructor.
+ * Create a DiSashModelMngr with the specified factory. The SashModel is searched in the Resource. If not found,
+ * create one in the resource.
+ *
+ * @param pageModelFactory
+ * @param diResource
+ */
+ public DiSashModelMngr(IPageModelFactory pageModelFactory, Resource diResource) {
+ this.pageModelFactory = pageModelFactory;
+
+ // lookup the SashModel
+ sashWindowMngr = lookupSashWindowMngr(diResource);
+ if (sashWindowMngr == null) {
+ // Create a default model and attach it to resource.
+ sashWindowMngr = createDefaultSashModel();
+ diResource.getContents().add(sashWindowMngr);
+ }
+ }
+
+ /**
+ * Constructor.
+ * Create a DiSashModelMngr with the specified factory and sashModel.
+ *
+ * @param pageModelFactory
+ * @param sashModel
+ */
+ public DiSashModelMngr(IPageModelFactory pageModelFactory, SashWindowsMngr sashModel) {
+ this.pageModelFactory = pageModelFactory;
+ this.sashWindowMngr = sashModel;
+ }
+
+ /**
+ * Get the internal EMF implementation.
+ * Intended to be used by tests.
+ *
+ * @return the sashWindowMngr
+ */
+ protected SashWindowsMngr getDiSashWindowsMngr() {
+ return sashWindowMngr;
+ }
+
+
+ /**
+ * Return the internal implementation of ContentProvider.
+ * Create if if needed.
+ * This method should not be subclassed
+ *
+ * @return the contentProvider
+ */
+ protected final DiContentProvider getDiContentProvider() {
+ if (contentProvider == null) {
+ contentProvider = new DiContentProvider(sashWindowMngr.getSashModel(), pageModelFactory, getContentChangedEventProvider());
+ }
+ return contentProvider;
+ }
+
+ /**
+ * Return the internal implementation of PageMngr.
+ * Create if if needed.
+ * This method should not be subclassed
+ *
+ * @return the PageMngrImpl
+ */
+ protected final PageManagerImpl getPageMngrImpl() {
+ if (pageMngr == null) {
+ pageMngr = new TransactionalPageManagerImpl(sashWindowMngr, getContentChangedEventProvider());
+ }
+
+ return pageMngr;
+ }
+
+ /**
+ * Return the internal implementation of ContentChangedEventProvider.
+ * Create if if needed.
+ * This method should not be subclassed
+ *
+ * @return the PageMngrImpl
+ */
+ protected final ContentChangedEventProvider getContentChangedEventProvider() {
+ if (contentChangedEventProvider == null) {
+ contentChangedEventProvider = new ContentChangedEventProvider(sashWindowMngr);
+ }
+
+ return contentChangedEventProvider;
+ }
+
+ /**
+ * Get the IPageMngr providing basic methods to manage Pages in the sash model.
+ *
+ * @return
+ * @since 2.0
+ */
+ public IPageManager getIPageMngr() {
+ return getPageMngrImpl();
+ }
+
+ /**
+ * Get the ContentProvider used by the SashWindows system.
+ * This class can also be used to accurately manage the sash model.
+ *
+ * @return
+ */
+ public ISashWindowsContentProvider getISashWindowsContentProvider() {
+
+ return getDiContentProvider();
+
+ }
+
+ /**
+ * Get the ContentChangedProvider for the SashModel
+ *
+ * @return
+ */
+ public IContentChangedProvider getSashModelContentChangedProvider() {
+ return getContentChangedEventProvider();
+ }
+
+ /**
+ * Create a default model with one window and one folder.
+ *
+ * @param diResource
+ * @return
+ */
+ protected SashWindowsMngr createDefaultSashModel() {
+ SashWindowsMngr result = DiUtils.createDefaultSashWindowsMngr();
+
+ if (result.getSashModel() != null) {
+ // Default this to true for new models, which store the sash model
+ // in the workspace private area by default
+ result.getSashModel().setRestoreActivePage(true);
+ }
+
+ return result;
+ }
+
+ /**
+ * Lookup for the SashModel object in the resource
+ *
+ * @param diResource
+ * @return
+ */
+ protected SashWindowsMngr lookupSashWindowMngr(Resource diResource) {
+
+ return DiUtils.lookupSashWindowsMngr(diResource);
+ }
+
+ /**
+ * Create an instance of IPageMngr acting on the provided resource.
+ * This instance is suitable to add, remove, close or open diagrams.
+ *
+ * @param diResource
+ * @return The non transactional version of the IPageMngr
+ * @since 2.0
+ */
+ public static IPageManager createIPageMngr(Resource diResource) {
+
+ // Create an instance of the DiSashModelMngr with no factory.
+ // The factory is not needed since we don't get the ISashWindowsContentProvider.
+ return new DiSashModelMngr(null, diResource).getIPageMngr();
+
+ }
+
+
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/IPageModelFactory.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/IPageModelFactory.java
index c9a5991f9e7..eed593316ca 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/IPageModelFactory.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/IPageModelFactory.java
@@ -1,76 +1,80 @@
-/*****************************************************************************
- * Copyright (c) 2009 - 2015 CEA LIST & LIFL
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Camille Letavernier (CEA LIST) - camille.letavernier@cea.fr - Bug 476625
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
-import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
-
-
-/**
- * Factory used to create IPageModel from an object identifying a page.
- * IPageModel are objects used by the Sash Windows to create a page.
- *
- * @author cedric dumoulin
- */
-public interface IPageModelFactory {
-
- /**
- * Generic EditorID that represents the default editor associated to any page identifier
- */
- String DEFAULT_EDITOR = IPageManager.class.getCanonicalName() + ".Default";
-
- /**
- * Create the IPageModel for the pageIdentifier. The pageIdentifier is the object passed to
- * the {@link IPageManager#addEditor(EObject)}.
- * This factory method is called by the Sash Windows whenever it needs to create a page. The identifier
- * is found in the sash model.
- *
- * @param pageIdentifier
- * The identifier identifying the page to create.
- * @return
- */
- public IPageModel createIPageModel(Object pageIdentifier);
-
- /**
- * @see org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IPageModelFactory#createIPageModel(java.lang.Object)
- *
- * @param pageIdentifier
- * @return
- */
- default IPageModel createIPageModel(Object pageIdentifier, String favoriteEditorID) {
- return createIPageModel(pageIdentifier);
- }
-
- /**
- * Finds the EditorIDs that can open the given pageIdentifier. This list is a hint
- *
- * The exact behavior is implementation-specific; this method shouldn't be used
- * to determine whether a page identifier can actually be opened.
- *
- * Implementations may return a list containing the {@link IPageManager#DEFAULT_EDITOR} ID,
- * and the list might be incomplete (i.e. editors not listed might
- * still be able to open the given pageIdentifier)
- *
- * @param pageIdentifier
- * @return A map of (ID -> Label) of the editors that can open the given page
- *
- * @see {@link IPageManager#DEFAULT_EDITOR}
- */
- default Map<String, String> getEditorIDsFor(Object pageIdentifier) {
- return Collections.singletonMap(DEFAULT_EDITOR, "Default editor");
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 - 2015 CEA LIST & LIFL
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Camille Letavernier (CEA LIST) - camille.letavernier@cea.fr - Bug 476625
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+
+
+/**
+ * Factory used to create IPageModel from an object identifying a page.
+ * IPageModel are objects used by the Sash Windows to create a page.
+ *
+ * @author cedric dumoulin
+ */
+public interface IPageModelFactory {
+
+ /**
+ * Generic EditorID that represents the default editor associated to any page identifier
+ *
+ * @since 2.0
+ */
+ String DEFAULT_EDITOR = IPageManager.class.getCanonicalName() + ".Default";
+
+ /**
+ * Create the IPageModel for the pageIdentifier. The pageIdentifier is the object passed to
+ * the {@link IPageManager#addEditor(EObject)}.
+ * This factory method is called by the Sash Windows whenever it needs to create a page. The identifier
+ * is found in the sash model.
+ *
+ * @param pageIdentifier
+ * The identifier identifying the page to create.
+ * @return
+ */
+ public IPageModel createIPageModel(Object pageIdentifier);
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IPageModelFactory#createIPageModel(java.lang.Object)
+ *
+ * @param pageIdentifier
+ * @return
+ * @since 2.0
+ */
+ default IPageModel createIPageModel(Object pageIdentifier, String favoriteEditorID) {
+ return createIPageModel(pageIdentifier);
+ }
+
+ /**
+ * Finds the EditorIDs that can open the given pageIdentifier. This list is a hint
+ *
+ * The exact behavior is implementation-specific; this method shouldn't be used
+ * to determine whether a page identifier can actually be opened.
+ *
+ * Implementations may return a list containing the {@link IPageManager#DEFAULT_EDITOR} ID,
+ * and the list might be incomplete (i.e. editors not listed might
+ * still be able to open the given pageIdentifier)
+ *
+ * @param pageIdentifier
+ * @return A map of (ID -> Label) of the editors that can open the given page
+ *
+ * @see {@link IPageManager#DEFAULT_EDITOR}
+ * @since 2.0
+ */
+ default Map<String, String> getEditorIDsFor(Object pageIdentifier) {
+ return Collections.singletonMap(DEFAULT_EDITOR, "Default editor");
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageManagerImpl.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageManagerImpl.java
index 9430edf2787..df2826bf9d3 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageManagerImpl.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageManagerImpl.java
@@ -1,163 +1,166 @@
-/*****************************************************************************
- * Copyright (c) 2013, 2014 Cedric Dumoulin, CEA, and others.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 433371
- * Céline Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 415638
- * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Bug 440754
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable;
-import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
-import org.eclipse.papyrus.infra.core.sashwindows.di.TabFolder;
-import org.eclipse.papyrus.infra.core.sashwindows.di.service.BasicPageManagerImpl;
-import org.eclipse.swt.widgets.Display;
-
-
-/**
- * This class provide high level method to manage the Sash pages through its DI
- * implementation.
- *
- * @author cedric dumoulin
- *
- */
-public class PageManagerImpl extends BasicPageManagerImpl {
-
- /**
- * An object used to get the current folder, or to ask to set the
- * active page.
- * This is usually backuped by the SashWindowContainer. <br>
- */
- private ICurrentFolderAndPageMngr folderAndPageMngr;
-
- private ContentChangedEventProvider contentChangedEventProvider;
-
- /**
- * Constructor.
- * Use a default {@link ICurrentFolderAndPageMngr} that alwayrs use the first
- * folder as the current folder. Futhermore, the default implementation doesn't
- * allow to set the active folder. <br>
- * Suitable for tests
- *
- * @param diSashModel
- * The model onto which operation of this class act.
- * @param contentChangedEventProvider
- * A class listening on changes on the internal model and delivering events to registered listeners. This implementation
- * need the class in order to deactivate event triggering during the operations.
- *
- */
- protected PageManagerImpl(SashWindowsMngr diSashModel, ContentChangedEventProvider contentChangedEventProvider) {
- super(diSashModel);
-
- this.contentChangedEventProvider = contentChangedEventProvider;
- this.folderAndPageMngr = new DefaultCurrentFolderAndPageMngr(diSashModel);
- }
-
- /**
- * Constructor.
- *
- * @param diSashModel
- * the di sash model
- * @param contentChangedEventProvider
- * the content changed event provider
- * @param folderAndPageMngr
- * the folder and page mngr
- */
- protected PageManagerImpl(SashWindowsMngr diSashModel, ContentChangedEventProvider contentChangedEventProvider, ICurrentFolderAndPageMngr folderAndPageMngr) {
- super(diSashModel);
-
- this.contentChangedEventProvider = contentChangedEventProvider;
- this.folderAndPageMngr = folderAndPageMngr;
- }
-
- @Override
- protected TabFolder getCurrentFolder() {
- return folderAndPageMngr.getCurrentFolder();
- }
-
- @Override
- protected boolean isLegacyMode() {
- // We are never in legacy mode even if there is a page list
- return false;
- }
-
- @Override
- protected boolean isPage(EObject content) {
- return Platform.getAdapterManager().getAdapter(content, IOpenable.class) != null;
- }
-
- @Override
- public void closePage(Object pageIdentifier) {
- // Suppress event notifications
- doExecute(() -> super.closePage(pageIdentifier));
- }
-
- @Override
- public void closeAllOpenedPages() {
- // Suppress event notifications
- doExecute(() -> super.closeAllOpenedPages());
- }
-
- @Override
- public void closeOtherPages(Object pageIdentifier) {
- // Suppress event notifications
- doExecute(() -> super.closeOtherPages(pageIdentifier));
- }
-
- @Override
- public void selectPage(final Object pageIdentifier) {
- Display.getDefault().syncExec(new Runnable() {
-
- @Override
- public void run() {
- folderAndPageMngr.setActivePage(pageIdentifier);
- }
- });
- }
-
- /**
- * Sets the current folder and page mngr.
- *
- * @param currentFolderAndPageMngr
- * the new current folder and page mngr
- */
- public void setCurrentFolderAndPageMngr(ICurrentFolderAndPageMngr currentFolderAndPageMngr) {
- this.folderAndPageMngr = currentFolderAndPageMngr;
-
- }
-
- @Override
- protected <T> T doExecute(SashModelOperation<T> sashModelOperation) {
- T result;
-
- final boolean deliver = contentChangedEventProvider.isDeliver();
-
- contentChangedEventProvider.setDeliver(false);
- try {
- result = super.doExecute(sashModelOperation);
- } finally {
- contentChangedEventProvider.setDeliver(deliver);
- }
-
- return result;
- }
-
- private void doExecute(Runnable sashModelOperation) {
- doExecute(ignored -> {
- sashModelOperation.run();
- return ignored;
- });
- }
-
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 Cedric Dumoulin, CEA, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 433371
+ * Céline Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 415638
+ * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Bug 440754
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.internal;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
+import org.eclipse.papyrus.infra.core.sashwindows.di.TabFolder;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.BasicPageManagerImpl;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * This class provide high level method to manage the Sash pages through its DI
+ * implementation.
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class PageManagerImpl extends BasicPageManagerImpl {
+
+ /**
+ * An object used to get the current folder, or to ask to set the
+ * active page.
+ * This is usually backuped by the SashWindowContainer. <br>
+ */
+ private ICurrentFolderAndPageMngr folderAndPageMngr;
+
+ private ContentChangedEventProvider contentChangedEventProvider;
+
+ /**
+ * Constructor.
+ * Use a default {@link ICurrentFolderAndPageMngr} that alwayrs use the first
+ * folder as the current folder. Futhermore, the default implementation doesn't
+ * allow to set the active folder. <br>
+ * Suitable for tests
+ *
+ * @param diSashModel
+ * The model onto which operation of this class act.
+ * @param contentChangedEventProvider
+ * A class listening on changes on the internal model and delivering events to registered listeners. This implementation
+ * need the class in order to deactivate event triggering during the operations.
+ *
+ */
+ protected PageManagerImpl(SashWindowsMngr diSashModel, ContentChangedEventProvider contentChangedEventProvider) {
+ super(diSashModel);
+
+ this.contentChangedEventProvider = contentChangedEventProvider;
+ this.folderAndPageMngr = new DefaultCurrentFolderAndPageMngr(diSashModel);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param diSashModel
+ * the di sash model
+ * @param contentChangedEventProvider
+ * the content changed event provider
+ * @param folderAndPageMngr
+ * the folder and page mngr
+ */
+ protected PageManagerImpl(SashWindowsMngr diSashModel, ContentChangedEventProvider contentChangedEventProvider, ICurrentFolderAndPageMngr folderAndPageMngr) {
+ super(diSashModel);
+
+ this.contentChangedEventProvider = contentChangedEventProvider;
+ this.folderAndPageMngr = folderAndPageMngr;
+ }
+
+ @Override
+ protected TabFolder getCurrentFolder() {
+ return folderAndPageMngr.getCurrentFolder();
+ }
+
+ @Override
+ protected boolean isLegacyMode() {
+ // We are never in legacy mode even if there is a page list
+ return false;
+ }
+
+ /**
+ * @since 2.0
+ */
+ @Override
+ protected boolean isPage(EObject content) {
+ return Platform.getAdapterManager().getAdapter(content, IOpenable.class) != null;
+ }
+
+ @Override
+ public void closePage(Object pageIdentifier) {
+ // Suppress event notifications
+ doExecute(() -> super.closePage(pageIdentifier));
+ }
+
+ @Override
+ public void closeAllOpenedPages() {
+ // Suppress event notifications
+ doExecute(() -> super.closeAllOpenedPages());
+ }
+
+ @Override
+ public void closeOtherPages(Object pageIdentifier) {
+ // Suppress event notifications
+ doExecute(() -> super.closeOtherPages(pageIdentifier));
+ }
+
+ @Override
+ public void selectPage(final Object pageIdentifier) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ folderAndPageMngr.setActivePage(pageIdentifier);
+ }
+ });
+ }
+
+ /**
+ * Sets the current folder and page mngr.
+ *
+ * @param currentFolderAndPageMngr
+ * the new current folder and page mngr
+ */
+ public void setCurrentFolderAndPageMngr(ICurrentFolderAndPageMngr currentFolderAndPageMngr) {
+ this.folderAndPageMngr = currentFolderAndPageMngr;
+
+ }
+
+ @Override
+ protected <T> T doExecute(SashModelOperation<T> sashModelOperation) {
+ T result;
+
+ final boolean deliver = contentChangedEventProvider.isDeliver();
+
+ contentChangedEventProvider.setDeliver(false);
+ try {
+ result = super.doExecute(sashModelOperation);
+ } finally {
+ contentChangedEventProvider.setDeliver(deliver);
+ }
+
+ return result;
+ }
+
+ private void doExecute(Runnable sashModelOperation) {
+ doExecute(ignored -> {
+ sashModelOperation.run();
+ return ignored;
+ });
+ }
+
} \ No newline at end of file
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/utils/IPageUtils.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/utils/IPageUtils.java
index a719de92179..d80bdfdf3a1 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/utils/IPageUtils.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/custom-src/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/utils/IPageUtils.java
@@ -1,86 +1,87 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2015 LIFL, CEA LIST, Christian W. Damus, and others.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 433371
- * Christian W. Damus - bug 469188
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.utils;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ICloseablePart;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
-import org.eclipse.papyrus.infra.core.sashwindows.di.PageRef;
-
-
-/**
- * Class providing a utility methods allowing to get the real Model from the {@link IPage#getRawModel()}.
- * The utility takes into account the bug 309943.
- *
- * @author cedric dumoulin
- *
- */
-public class IPageUtils {
-
- /**
- * Get the real model rather than the PageRef. This method is a trick to temporally solve the bug 309943.
- *
- * @param page
- * @return
- */
- public static Object getRawModel(IPage page) {
-
- if (page == null) {
- return null;
- }
-
- Object pageModel = page.getRawModel();
- // Get the real model because of bug
- if (pageModel instanceof PageRef) {
- return ((PageRef) pageModel).getPageIdentifier();
- }
- // do not use trick
- return pageModel;
- }
-
- /**
- * Lookup the IPage model corresponding to the identifier from the {@link ISashWindowsContainer}.
- * The identifier can be either a {@link PageRef} or a emf Diagram. <br>
- * This method can be used as a hack to bug 401107
- *
- * @param container
- * @param identifier
- * @return The corresponding IPage, or null if not found.
- */
- public static IPage lookupModelPage(ISashWindowsContainer container, Object identifier) {
-
- LookupIPageVisitor visitor = new LookupIPageVisitor(identifier);
- container.visit(visitor);
- return visitor.getResult();
- }
-
- /**
- * Queries whether the user should be permitted to close a {@code page}.
- *
- * @param page
- * a page
- * @return whether it can be closed
- */
- public static boolean canClose(IPage page) {
- ICloseablePart closeable = (page instanceof IAdaptable)
- ? ((IAdaptable) page).getAdapter(ICloseablePart.class)
- : null;
-
- return (closeable == null) || closeable.canClose();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2015 LIFL, CEA LIST, Christian W. Damus, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 433371
+ * Christian W. Damus - bug 469188
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.utils;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ICloseablePart;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.sashwindows.di.PageRef;
+
+
+/**
+ * Class providing a utility methods allowing to get the real Model from the {@link IPage#getRawModel()}.
+ * The utility takes into account the bug 309943.
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class IPageUtils {
+
+ /**
+ * Get the real model rather than the PageRef. This method is a trick to temporally solve the bug 309943.
+ *
+ * @param page
+ * @return
+ */
+ public static Object getRawModel(IPage page) {
+
+ if (page == null) {
+ return null;
+ }
+
+ Object pageModel = page.getRawModel();
+ // Get the real model because of bug
+ if (pageModel instanceof PageRef) {
+ return ((PageRef) pageModel).getPageIdentifier();
+ }
+ // do not use trick
+ return pageModel;
+ }
+
+ /**
+ * Lookup the IPage model corresponding to the identifier from the {@link ISashWindowsContainer}.
+ * The identifier can be either a {@link PageRef} or a emf Diagram. <br>
+ * This method can be used as a hack to bug 401107
+ *
+ * @param container
+ * @param identifier
+ * @return The corresponding IPage, or null if not found.
+ */
+ public static IPage lookupModelPage(ISashWindowsContainer container, Object identifier) {
+
+ LookupIPageVisitor visitor = new LookupIPageVisitor(identifier);
+ container.visit(visitor);
+ return visitor.getResult();
+ }
+
+ /**
+ * Queries whether the user should be permitted to close a {@code page}.
+ *
+ * @param page
+ * a page
+ * @return whether it can be closed
+ * @since 2.0
+ */
+ public static boolean canClose(IPage page) {
+ ICloseablePart closeable = (page instanceof IAdaptable)
+ ? ((IAdaptable) page).getAdapter(ICloseablePart.class)
+ : null;
+
+ return (closeable == null) || closeable.canClose();
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/pom.xml b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/pom.xml
index 1daf5ae6e56..3f95ec850c6 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/pom.xml
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.core.sasheditor.di</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/.project b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/.project
index c456b7b004d..23969754582 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/.project
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/.project
@@ -1,33 +1,57 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.core.sasheditor</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.ibm.etools.common.migration.MigrationBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.core.sasheditor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.ibm.etools.common.migration.MigrationBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF
index b30c3ac802c..a878f6ba291 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/META-INF/MANIFEST.MF
@@ -1,28 +1,26 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.core.sasheditor,
- org.eclipse.papyrus.infra.core.sasheditor.contentprovider,
- org.eclipse.papyrus.infra.core.sasheditor.contentprovider.simple,
- org.eclipse.papyrus.infra.core.sasheditor.editor,
- org.eclipse.papyrus.infra.core.sasheditor.editor.actionbarcontributor,
- org.eclipse.papyrus.infra.core.sasheditor.internal,
- org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy,
- org.eclipse.papyrus.infra.core.sasheditor.multipage.editor,
- org.eclipse.papyrus.infra.core.sasheditor.utils
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.ui,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.e4.core.contexts;bundle-version="1.0.0";resolution:=optional,
- org.eclipse.e4.ui.model.workbench;bundle-version="0.10.0";resolution:=optional,
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0"
-Bundle-Vendor: %providerName
-Bundle-Version: 1.2.0.qualifier
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.infra.core.sasheditor.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.infra.core.sasheditor;singleton:=true
-Eclipse-ExtensibleAPI: true
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.core.sasheditor,
+ org.eclipse.papyrus.infra.core.sasheditor.contentprovider,
+ org.eclipse.papyrus.infra.core.sasheditor.contentprovider.simple,
+ org.eclipse.papyrus.infra.core.sasheditor.editor,
+ org.eclipse.papyrus.infra.core.sasheditor.editor.actionbarcontributor,
+ org.eclipse.papyrus.infra.core.sasheditor.internal;x-internal:=true,
+ org.eclipse.papyrus.infra.core.sasheditor.internal.eclipsecopy;x-internal:=true,
+ org.eclipse.papyrus.infra.core.sasheditor.multipage.editor,
+ org.eclipse.papyrus.infra.core.sasheditor.utils
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)";visibility:=reexport,
+ org.eclipse.e4.core.contexts;bundle-version="[1.5.0,2.0.0)";resolution:=optional,
+ org.eclipse.e4.ui.model.workbench;bundle-version="[1.2.0,2.0.0)";resolution:=optional,
+ org.eclipse.core.expressions;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.papyrus.infra.tools;bundle-version="[2.0.0,3.0.0)"
+Bundle-Vendor: %providerName
+Bundle-Version: 2.0.0.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.core.sasheditor.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.core.sasheditor;singleton:=true
+Eclipse-ExtensibleAPI: true
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/pom.xml b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/pom.xml
index 57ef0408764..9b6018eda67 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/pom.xml
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.core.sasheditor</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ICloseablePart.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ICloseablePart.java
index 9431a6dc30e..c3c2ccd413d 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ICloseablePart.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ICloseablePart.java
@@ -22,6 +22,8 @@ import org.eclipse.ui.IWorkbenchPart;
* {@linkplain IMultiPageEditorPart multi-page editor} that are conditionally
* closeable. That is, parts that may not always be permitted to be closed by the
* user.
+ *
+ * @since 2.0
*/
public interface ICloseablePart {
/**
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/PagePart.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/PagePart.java
index 85a1bb84394..5f40b99dc8f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/PagePart.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/PagePart.java
@@ -1,274 +1,279 @@
-/*****************************************************************************
- * Copyright (c) 2009, 2015 CEA LIST & LIFL, Christian W. Damus, and others
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus - bug 469188
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core.sasheditor.internal;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ICloseablePart;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * This class represent a leaf part that is a part containing an editor or a component.
- *
- * @author dumoulin
- */
-public abstract class PagePart extends AbstractPart implements IPage, IAdaptable {
-
- /** Raw model associated to this part. We store it because the PartModel do not provide it */
- protected Object rawModel;
-
- /** Parent part of this Part */
- protected TabFolderPart parent;
-
-
- /**
- * Constructor.
- *
- * @param sashWindowsContainer
- */
- public PagePart(TabFolderPart parent, Object rawModel) {
- super(parent.getSashWindowContainer());
- this.parent = parent;
- this.rawModel = rawModel;
- }
-
- @Override
- public <T> T getAdapter(Class<T> adapter) {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- /**
- * @return the parent
- */
- protected TabFolderPart getParent() {
- return parent;
- }
-
-
- /**
- * Get the {@link TabItemPart} that is associated to this Page. <br>
- * The {@link TabItemPart} represents the tab in the folder.
- *
- * @return
- */
- protected TabItemPart getAssociatedTabItemPart() {
-
- // TabItemPart is not directly accessible. We should ask it to
- // the parent.
- return getParent().lookupAssociatedTabItemPart(this);
- }
-
- /**
- * Orphan this node. The parent is set to null, but control is left unchanged.
- * The node can be reattached with reparent(). Change garbage state to {@link GarbageState.ORPHANED}.
- * This method as no effect if the Page has already been reparented.
- *
- * @see
- * @return the parent
- */
- public void orphan() {
- // orphan only if we are in COLLECTED state
- if (garbageState == GarbageState.UNVISITED) {
- garbageState = GarbageState.ORPHANED;
- parent = null;
- }
- }
-
- /**
- * Mark this Page as UNCHANGED.
- * The PAge should be in the COLLECTED state.
- *
- * @see
- * @return the parent
- */
- public void unchanged() {
- // orphan only if we are in COLLECTED state
- if (garbageState == GarbageState.UNVISITED || garbageState == GarbageState.ORPHANED) {
- garbageState = GarbageState.UNCHANGED;
- } else {
- // Bad state, this is an internal error
- // TODO : log a warning ?
- throw new IllegalStateException("Try to change state from " + garbageState.toString() + " to UNCHANGED. This is forbidden.");
- }
- }
-
- /**
- * Visit this part.
- *
- * @param visitor
- * @return true if the visit should continue, false otherwise.
- */
- abstract boolean visit(IPartVisitor visitor);
-
- /**
- * Locates the part that intersects the given point and that have the expected type.
- * For a leaf, return the leaf if it is of the expected type.
- *
- * @param position
- * @param expectedTileType
- * @return
- */
- public AbstractPart findPartAt(Point position, Class<?> expectedTileType) {
-
- if (expectedTileType == this.getClass()) {
- return this;
- }
-
- return null;
- }
-
- /**
- * Create the control of this Part, and children's controls.
- *
- * @param parent
- */
- abstract public void createPartControl(Composite parent);
-
- /**
- * Get the control associated to this Part.
- *
- * @return
- */
- @Override
- abstract public Control getControl();
-
- /**
- * reparent this Part with the specified new parent.
- * The part is marked as reparented.
- *
- * @param parent
- */
- abstract public void reparent(TabFolderPart parent);
-
- /**
- * Return the {@link Widget} of the tab associated to this page.
- *
- * @return The {@link Widget} of the tab.
- */
- public Widget getTabWidget() {
- return getAssociatedTabItemPart().control;
- }
-
- /**
- * Add the tree of parts starting from this part.
- * As we are a leaf, add itself only.
- *
- * @param partMap
- */
- public void fillPartMap(PartLists partMap) {
- partMap.addLeaf(this);
- garbageState = GarbageState.UNVISITED;
- }
-
- /**
- * Get the raw model associated to this Part.
- *
- * @return
- */
- @Override
- public Object getRawModel() {
- return rawModel;
- }
-
- /**
- * Return a title for this part. This title can be used by parent to be shown
- * in tabs ...
- * To be implemented by subclasses.
- *
- * @return The title or null.
- */
- @Override
- public String getPageTitle() {
- return null;
- }
-
- /**
- * Return a icon for this part. This title can be used by parent to be shown
- * in tabs ...
- * To be implemented by subclasses.
- *
- * @return The icon or null.
- */
- @Override
- public Image getPageIcon() {
- return null;
- }
-
- /**
- * Refresh the tab of this page (I.e the name and icon in the tab).
- */
- public void refreshTab() {
- getParent().refreshPageTab(this);
- }
-
- /**
- * Queries whether I should be permitted to be closed.
- *
- * @return whether my containing tab should show the close widget
- */
- public boolean canClose() {
- ICloseablePart closeable = getAdapter(ICloseablePart.class);
- return (closeable == null)
- || (closeable == this) // Avoid unbounded re-entry into this method!
- || closeable.canClose();
- }
-
- /**
- * Set focus on the SWT control associated to this PagePart.
- * Used by the ActivePageTracker.
- */
- abstract public void setFocus();
-
- /**
- * Dispose the part. <br/>
- * The part and its associated resource are disposed.
- *
- */
- abstract public void dispose();
-
- /**
- * Dispose this part and all its children.
- * The method is called recursively on children of the part.
- */
- abstract public void disposeThisAndChildren();
-
- /**
- * Garbage the part. <br/>
- * This method is called by the sashwindows garbage mechanism. It means that the part has been marked as "garbage" or
- * is now unreachable. It is no longer used by the {@link SashWindowsContainer}, and it should be garbage. <br/>
- * All resources used by this node should be reclaimed, but not its subnodes.
- *
- */
- abstract public void garbage();
-
- /**
- * Return true if the part is associated to the specified rawModel.
- * Return false otherwise.
- *
- * @param realModel
- * @return
- */
- public boolean isPartFor(Object realModel) {
- return this.rawModel == realModel;
- }
-
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2009, 2015 CEA LIST & LIFL, Christian W. Damus, and others
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus - bug 469188
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.core.sasheditor.internal;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ICloseablePart;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
+import org.eclipse.papyrus.infra.core.sasheditor.internal.AbstractPart.GarbageState;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Widget;
+
+/**
+ * This class represent a leaf part that is a part containing an editor or a component.
+ *
+ * @author dumoulin
+ */
+public abstract class PagePart extends AbstractPart implements IPage, IAdaptable {
+
+ /** Raw model associated to this part. We store it because the PartModel do not provide it */
+ protected Object rawModel;
+
+ /** Parent part of this Part */
+ protected TabFolderPart parent;
+
+
+ /**
+ * Constructor.
+ *
+ * @param sashWindowsContainer
+ */
+ public PagePart(TabFolderPart parent, Object rawModel) {
+ super(parent.getSashWindowContainer());
+ this.parent = parent;
+ this.rawModel = rawModel;
+ }
+
+ /**
+ * @since 2.0
+ */
+ @Override
+ public <T> T getAdapter(Class<T> adapter) {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
+ /**
+ * @return the parent
+ */
+ protected TabFolderPart getParent() {
+ return parent;
+ }
+
+
+ /**
+ * Get the {@link TabItemPart} that is associated to this Page. <br>
+ * The {@link TabItemPart} represents the tab in the folder.
+ *
+ * @return
+ */
+ protected TabItemPart getAssociatedTabItemPart() {
+
+ // TabItemPart is not directly accessible. We should ask it to
+ // the parent.
+ return getParent().lookupAssociatedTabItemPart(this);
+ }
+
+ /**
+ * Orphan this node. The parent is set to null, but control is left unchanged.
+ * The node can be reattached with reparent(). Change garbage state to {@link GarbageState.ORPHANED}.
+ * This method as no effect if the Page has already been reparented.
+ *
+ * @see
+ * @return the parent
+ */
+ public void orphan() {
+ // orphan only if we are in COLLECTED state
+ if (garbageState == GarbageState.UNVISITED) {
+ garbageState = GarbageState.ORPHANED;
+ parent = null;
+ }
+ }
+
+ /**
+ * Mark this Page as UNCHANGED.
+ * The PAge should be in the COLLECTED state.
+ *
+ * @see
+ * @return the parent
+ */
+ public void unchanged() {
+ // orphan only if we are in COLLECTED state
+ if (garbageState == GarbageState.UNVISITED || garbageState == GarbageState.ORPHANED) {
+ garbageState = GarbageState.UNCHANGED;
+ } else {
+ // Bad state, this is an internal error
+ // TODO : log a warning ?
+ throw new IllegalStateException("Try to change state from " + garbageState.toString() + " to UNCHANGED. This is forbidden.");
+ }
+ }
+
+ /**
+ * Visit this part.
+ *
+ * @param visitor
+ * @return true if the visit should continue, false otherwise.
+ */
+ abstract boolean visit(IPartVisitor visitor);
+
+ /**
+ * Locates the part that intersects the given point and that have the expected type.
+ * For a leaf, return the leaf if it is of the expected type.
+ *
+ * @param position
+ * @param expectedTileType
+ * @return
+ */
+ public AbstractPart findPartAt(Point position, Class<?> expectedTileType) {
+
+ if (expectedTileType == this.getClass()) {
+ return this;
+ }
+
+ return null;
+ }
+
+ /**
+ * Create the control of this Part, and children's controls.
+ *
+ * @param parent
+ */
+ abstract public void createPartControl(Composite parent);
+
+ /**
+ * Get the control associated to this Part.
+ *
+ * @return
+ */
+ @Override
+ abstract public Control getControl();
+
+ /**
+ * reparent this Part with the specified new parent.
+ * The part is marked as reparented.
+ *
+ * @param parent
+ */
+ abstract public void reparent(TabFolderPart parent);
+
+ /**
+ * Return the {@link Widget} of the tab associated to this page.
+ *
+ * @return The {@link Widget} of the tab.
+ */
+ public Widget getTabWidget() {
+ return getAssociatedTabItemPart().control;
+ }
+
+ /**
+ * Add the tree of parts starting from this part.
+ * As we are a leaf, add itself only.
+ *
+ * @param partMap
+ */
+ public void fillPartMap(PartLists partMap) {
+ partMap.addLeaf(this);
+ garbageState = GarbageState.UNVISITED;
+ }
+
+ /**
+ * Get the raw model associated to this Part.
+ *
+ * @return
+ */
+ @Override
+ public Object getRawModel() {
+ return rawModel;
+ }
+
+ /**
+ * Return a title for this part. This title can be used by parent to be shown
+ * in tabs ...
+ * To be implemented by subclasses.
+ *
+ * @return The title or null.
+ */
+ @Override
+ public String getPageTitle() {
+ return null;
+ }
+
+ /**
+ * Return a icon for this part. This title can be used by parent to be shown
+ * in tabs ...
+ * To be implemented by subclasses.
+ *
+ * @return The icon or null.
+ */
+ @Override
+ public Image getPageIcon() {
+ return null;
+ }
+
+ /**
+ * Refresh the tab of this page (I.e the name and icon in the tab).
+ */
+ public void refreshTab() {
+ getParent().refreshPageTab(this);
+ }
+
+ /**
+ * Queries whether I should be permitted to be closed.
+ *
+ * @return whether my containing tab should show the close widget
+ * @since 2.0
+ */
+ public boolean canClose() {
+ ICloseablePart closeable = getAdapter(ICloseablePart.class);
+ return (closeable == null)
+ || (closeable == this) // Avoid unbounded re-entry into this method!
+ || closeable.canClose();
+ }
+
+ /**
+ * Set focus on the SWT control associated to this PagePart.
+ * Used by the ActivePageTracker.
+ */
+ abstract public void setFocus();
+
+ /**
+ * Dispose the part. <br/>
+ * The part and its associated resource are disposed.
+ *
+ */
+ abstract public void dispose();
+
+ /**
+ * Dispose this part and all its children.
+ * The method is called recursively on children of the part.
+ */
+ abstract public void disposeThisAndChildren();
+
+ /**
+ * Garbage the part. <br/>
+ * This method is called by the sashwindows garbage mechanism. It means that the part has been marked as "garbage" or
+ * is now unreachable. It is no longer used by the {@link SashWindowsContainer}, and it should be garbage. <br/>
+ * All resources used by this node should be reclaimed, but not its subnodes.
+ *
+ */
+ abstract public void garbage();
+
+ /**
+ * Return true if the part is associated to the specified rawModel.
+ * Return false otherwise.
+ *
+ * @param realModel
+ * @return
+ */
+ public boolean isPartFor(Object realModel) {
+ return this.rawModel == realModel;
+ }
+
+
+
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/.project b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/.project
index 1efb06ad197..ab02956c61f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/.project
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/.project
@@ -20,9 +20,33 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/META-INF/MANIFEST.MF
index 4e7d0584e0b..81205682d25 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/META-INF/MANIFEST.MF
@@ -9,12 +9,12 @@ Bundle-ClassPath: .
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0",
- org.eclipse.emf.ecore.xmi;bundle-version="2.5.0";visibility:=reexport,
- org.eclipse.uml2.types;visibility:=reexport,
- org.eclipse.uml2.common;visibility:=reexport,
- org.eclipse.emf.transaction;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)",
+ org.eclipse.uml2.types;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.uml2.common;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-Version: 1.2.0.qualifier
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/DiPackage.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/DiPackage.java
index dfd6a0b5ec6..49844528c02 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/DiPackage.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/DiPackage.java
@@ -34,6 +34,8 @@ import org.eclipse.emf.ecore.EReference;
* @see org.eclipse.papyrus.infra.core.sashwindows.di.DiFactory
* @model kind="package"
* @generated
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
*/
public interface DiPackage extends EPackage {
@@ -111,6 +113,7 @@ public interface DiPackage extends EPackage {
*
* @generated
* @ordered
+ * @since 1.2
*/
int SASH_MODEL__RESTORE_ACTIVE_PAGE = 2;
@@ -367,6 +370,7 @@ public interface DiPackage extends EPackage {
*
* @generated
* @ordered
+ * @since 1.2
*/
int TAB_FOLDER__CURRENT_SELECTION = ABSTRACT_PANEL_FEATURE_COUNT + 1;
@@ -428,6 +432,7 @@ public interface DiPackage extends EPackage {
*
* @generated
* @ordered
+ * @since 1.2
*/
int PAGE_REF__FAVORITE_EDITOR = 3;
@@ -703,6 +708,7 @@ public interface DiPackage extends EPackage {
* @see org.eclipse.papyrus.infra.core.sashwindows.di.SashModel#isRestoreActivePage()
* @see #getSashModel()
* @generated
+ * @since 1.2
*/
EAttribute getSashModel_RestoreActivePage();
@@ -901,6 +907,7 @@ public interface DiPackage extends EPackage {
* @see org.eclipse.papyrus.infra.core.sashwindows.di.TabFolder#getCurrentSelection()
* @see #getTabFolder()
* @generated
+ * @since 1.2
*/
EReference getTabFolder_CurrentSelection();
@@ -960,6 +967,7 @@ public interface DiPackage extends EPackage {
* @see org.eclipse.papyrus.infra.core.sashwindows.di.PageRef#getFavoriteEditor()
* @see #getPageRef()
* @generated
+ * @since 1.2
*/
EAttribute getPageRef_FavoriteEditor();
@@ -1200,6 +1208,7 @@ public interface DiPackage extends EPackage {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
EAttribute SASH_MODEL__RESTORE_ACTIVE_PAGE = eINSTANCE.getSashModel_RestoreActivePage();
@@ -1365,6 +1374,7 @@ public interface DiPackage extends EPackage {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
EReference TAB_FOLDER__CURRENT_SELECTION = eINSTANCE.getTabFolder_CurrentSelection();
@@ -1412,6 +1422,7 @@ public interface DiPackage extends EPackage {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
EAttribute PAGE_REF__FAVORITE_EDITOR = eINSTANCE.getPageRef_FavoriteEditor();
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/PageRef.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/PageRef.java
index 4820610dea4..f0b8a35b88b 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/PageRef.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/PageRef.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.ecore.EObject;
* @see org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage#getPageRef()
* @model
* @generated
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface PageRef extends EObject {
@@ -129,6 +130,7 @@ public interface PageRef extends EObject {
* @see org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage#getPageRef_FavoriteEditor()
* @model dataType="org.eclipse.uml2.types.String" ordered="false"
* @generated
+ * @since 1.2
*/
String getFavoriteEditor();
@@ -141,6 +143,7 @@ public interface PageRef extends EObject {
* the new value of the '<em>Favorite Editor</em>' attribute.
* @see #getFavoriteEditor()
* @generated
+ * @since 1.2
*/
void setFavoriteEditor(String value);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/SashModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/SashModel.java
index e22c9c9cc73..1066931f633 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/SashModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/SashModel.java
@@ -100,6 +100,7 @@ public interface SashModel extends EObject {
* @see org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage#getSashModel_RestoreActivePage()
* @model dataType="org.eclipse.papyrus.infra.core.sashwindows.di.boolean" required="true" ordered="false"
* @generated
+ * @since 1.2
*/
boolean isRestoreActivePage();
@@ -112,6 +113,7 @@ public interface SashModel extends EObject {
* the new value of the '<em>Restore Active Page</em>' attribute.
* @see #isRestoreActivePage()
* @generated
+ * @since 1.2
*/
void setRestoreActivePage(boolean value);
@@ -167,6 +169,7 @@ public interface SashModel extends EObject {
*
* @model folderRequired="true" folderOrdered="false" pageRefRequired="true" pageRefOrdered="false"
* @generated
+ * @since 1.2
*/
void addPage(TabFolder folder, PageRef pageRef);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/TabFolder.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/TabFolder.java
index 4f23a2bb492..66ad1f1aecd 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/TabFolder.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/TabFolder.java
@@ -72,6 +72,7 @@ public interface TabFolder extends AbstractPanel {
* @see org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage#getTabFolder_CurrentSelection()
* @model ordered="false"
* @generated
+ * @since 1.2
*/
PageRef getCurrentSelection();
@@ -84,6 +85,7 @@ public interface TabFolder extends AbstractPanel {
* the new value of the '<em>Current Selection</em>' reference.
* @see #getCurrentSelection()
* @generated
+ * @since 1.2
*/
void setCurrentSelection(PageRef value);
@@ -129,6 +131,7 @@ public interface TabFolder extends AbstractPanel {
*
* @model pageRefRequired="true" pageRefOrdered="false"
* @generated
+ * @since 1.2
*/
void addPage(PageRef pageRef);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/DiPackageImpl.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/DiPackageImpl.java
index 90b134c448a..a5a67ed8f2d 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/DiPackageImpl.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/DiPackageImpl.java
@@ -44,6 +44,7 @@ import org.eclipse.uml2.types.TypesPackage;
* <!-- end-user-doc -->
*
* @generated
+ * @noreference This class is not intended to be referenced by clients.
*/
public class DiPackageImpl extends EPackageImpl implements DiPackage {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/PageRefImpl.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/PageRefImpl.java
index 7592c4f57a4..816877a3d1a 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/PageRefImpl.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/PageRefImpl.java
@@ -89,6 +89,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
* @see #getFavoriteEditor()
* @generated
* @ordered
+ * @since 1.2
*/
protected static final String FAVORITE_EDITOR_EDEFAULT = null;
@@ -100,6 +101,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
* @see #getFavoriteEditor()
* @generated
* @ordered
+ * @since 1.2
*/
protected String favoriteEditor = FAVORITE_EDITOR_EDEFAULT;
@@ -430,6 +432,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
@Override
public String getFavoriteEditor() {
@@ -441,6 +444,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
@Override
public void setFavoriteEditor(String newFavoriteEditor) {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/SashModelImpl.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/SashModelImpl.java
index 1ee2eba6960..77669197fdd 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/SashModelImpl.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/SashModelImpl.java
@@ -61,7 +61,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
private static final int SWT_VERTICAL = 1 << 9; // from SWT.VERTICAL
private static final int SWT_LEFT = 1 << 14; // from SWT.LEFT
private static final int SWT_RIGHT = 1 << 17; // from SWT.RIGHT
-
+
/**
* The cached value of the '{@link #getWindows() <em>Windows</em>}' containment reference list.
* <!-- begin-user-doc -->
@@ -92,6 +92,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
* @see #isRestoreActivePage()
* @generated
* @ordered
+ * @since 1.2
*/
protected static final boolean RESTORE_ACTIVE_PAGE_EDEFAULT = false;
@@ -103,6 +104,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
* @see #isRestoreActivePage()
* @generated
* @ordered
+ * @since 1.2
*/
protected boolean restoreActivePage = RESTORE_ACTIVE_PAGE_EDEFAULT;
@@ -191,6 +193,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
@Override
public boolean isRestoreActivePage() {
@@ -202,6 +205,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
@Override
public void setRestoreActivePage(boolean newRestoreActivePage) {
@@ -243,6 +247,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
* <!-- end-user-doc -->
*
* @generated NOT
+ * @since 1.2
*/
@Override
public void addPage(TabFolder folder, PageRef pageRef) {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/TabFolderImpl.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/TabFolderImpl.java
index 78b101351ab..75e82c4e982 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/TabFolderImpl.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src-gen/org/eclipse/papyrus/infra/core/sashwindows/di/impl/TabFolderImpl.java
@@ -64,6 +64,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
* @see #getCurrentSelection()
* @generated
* @ordered
+ * @since 1.2
*/
protected PageRef currentSelection;
@@ -110,6 +111,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
* @see #getChildren()
* @generated
* @ordered
+ * @since 1.2
*/
protected static final int[] CHILDREN_ESUBSETS = new int[] { DiPackage.TAB_FOLDER__CURRENT_SELECTION };
@@ -118,6 +120,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
@Override
public PageRef getCurrentSelection() {
@@ -138,6 +141,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
public PageRef basicGetCurrentSelection() {
return currentSelection;
@@ -148,6 +152,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
* <!-- end-user-doc -->
*
* @generated
+ * @since 1.2
*/
@Override
public void setCurrentSelection(PageRef newCurrentSelection) {
@@ -198,6 +203,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
* <!-- end-user-doc -->
*
* @generated NOT
+ * @since 1.2
*/
@Override
public void addPage(PageRef pageRef) {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src/org/eclipse/papyrus/infra/core/sashwindows/di/util/DiUtils.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src/org/eclipse/papyrus/infra/core/sashwindows/di/util/DiUtils.java
index 9161ebbdbfb..7df5f601d12 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src/org/eclipse/papyrus/infra/core/sashwindows/di/util/DiUtils.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sashwindows.di/src/org/eclipse/papyrus/infra/core/sashwindows/di/util/DiUtils.java
@@ -224,6 +224,7 @@ public class DiUtils {
* the identifier of the page(s) to be removed
*
* @return the memoized close-all-pages command, or {@code null} if there are no pages to close
+ * @since 1.2
*/
public static Command getMemoizedCloseAllPagesCommand(final TransactionalEditingDomain domain, final IPageManager pageManager, final Object pageIdentifier) {
Command result = null;
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/.project b/plugins/infra/core/org.eclipse.papyrus.infra.core/.project
index 5aff7adb53d..433d017e1cf 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/.project
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.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>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.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>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
index e0d039e4b5b..13277bf4d84 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
@@ -1,37 +1,36 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.core,
- org.eclipse.papyrus.infra.core.clipboard,
- org.eclipse.papyrus.infra.core.editor,
- org.eclipse.papyrus.infra.core.extension,
- org.eclipse.papyrus.infra.core.internal.expressions;x-internal:=true,
- org.eclipse.papyrus.infra.core.internal.sashmodel;x-internal:=true,
- org.eclipse.papyrus.infra.core.language,
- org.eclipse.papyrus.infra.core.listenerservice,
- org.eclipse.papyrus.infra.core.markers,
- org.eclipse.papyrus.infra.core.modelsetquery,
- org.eclipse.papyrus.infra.core.modelsetquery.impl;x-friends:="org.eclipse.papyrus.uml.resourceloading.profile",
- org.eclipse.papyrus.infra.core.operation,
- org.eclipse.papyrus.infra.core.resource,
- org.eclipse.papyrus.infra.core.resource.additional,
- org.eclipse.papyrus.infra.core.resource.sasheditor,
- org.eclipse.papyrus.infra.core.services,
- org.eclipse.papyrus.infra.core.services.spi,
- org.eclipse.papyrus.infra.core.utils
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.emf.workspace;bundle-version="1.5.1",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.core.filesystem,
- org.eclipse.emf.ecore.xmi;bundle-version="2.12.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
- org.eclipse.core.expressions;bundle-version="3.5.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.papyrus.infra.core.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.core;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.core,
+ org.eclipse.papyrus.infra.core.clipboard,
+ org.eclipse.papyrus.infra.core.editor,
+ org.eclipse.papyrus.infra.core.extension,
+ org.eclipse.papyrus.infra.core.internal.expressions;x-internal:=true,
+ org.eclipse.papyrus.infra.core.internal.sashmodel;x-internal:=true,
+ org.eclipse.papyrus.infra.core.language,
+ org.eclipse.papyrus.infra.core.listenerservice,
+ org.eclipse.papyrus.infra.core.markers,
+ org.eclipse.papyrus.infra.core.modelsetquery,
+ org.eclipse.papyrus.infra.core.modelsetquery.impl;x-friends:="org.eclipse.papyrus.uml.resourceloading.profile",
+ org.eclipse.papyrus.infra.core.operation,
+ org.eclipse.papyrus.infra.core.resource,
+ org.eclipse.papyrus.infra.core.resource.additional,
+ org.eclipse.papyrus.infra.core.resource.sasheditor,
+ org.eclipse.papyrus.infra.core.services,
+ org.eclipse.papyrus.infra.core.services.spi,
+ org.eclipse.papyrus.infra.core.utils
+Require-Bundle: org.eclipse.emf.workspace;bundle-version="[1.5.0,2.0.0)",
+ org.eclipse.papyrus.infra.tools;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.core.filesystem;bundle-version="[1.6.0,2.0.0)",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.core.expressions;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.commands;bundle-version="[3.8.0,4.0.0)";visibility:=reexport,
+ org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)";visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-Activator: org.eclipse.papyrus.infra.core.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.core;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml b/plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml
index 1ac9fb4d645..505d993b1c3 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.core</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/Activator.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/Activator.java
index 11fe67ac9f6..070ea1c06e4 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/Activator.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/Activator.java
@@ -1,83 +1,84 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2016 CEA LIST, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus - bug 485220
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.infra.core.services.spi.IContextualServiceRegistryTracker;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.core";
-
- // The shared instance
- private static Activator plugin;
-
- /** Logging helper */
- public static LogHelper log;
-
- private ServiceTracker<IContextualServiceRegistryTracker, IContextualServiceRegistryTracker> serviceRegistryTrackerTracker;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- // register the log helper
- log = new LogHelper(this);
-
- serviceRegistryTrackerTracker = new ServiceTracker<>(context, IContextualServiceRegistryTracker.class, null);
- serviceRegistryTrackerTracker.open();
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- serviceRegistryTrackerTracker.close();
- serviceRegistryTrackerTracker = null;
-
- plugin = null;
- log = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Obtain the instance of the contextual service-registry tracker service, if any.
- *
- * @return the service-registry tracker service, or {@code null} if none (probably
- * because there is no UI and, therefore, no user to be editing any Papyrus models)
- */
- public IContextualServiceRegistryTracker getContextualServiceRegistryTracker() {
- return serviceRegistryTrackerTracker.getService();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2008, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.core;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.core.services.spi.IContextualServiceRegistryTracker;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.core";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log;
+
+ private ServiceTracker<IContextualServiceRegistryTracker, IContextualServiceRegistryTracker> serviceRegistryTrackerTracker;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ // register the log helper
+ log = new LogHelper(this);
+
+ serviceRegistryTrackerTracker = new ServiceTracker<>(context, IContextualServiceRegistryTracker.class, null);
+ serviceRegistryTrackerTracker.open();
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ serviceRegistryTrackerTracker.close();
+ serviceRegistryTrackerTracker = null;
+
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Obtain the instance of the contextual service-registry tracker service, if any.
+ *
+ * @return the service-registry tracker service, or {@code null} if none (probably
+ * because there is no UI and, therefore, no user to be editing any Papyrus models)
+ * @since 2.0
+ */
+ public IContextualServiceRegistryTracker getContextualServiceRegistryTracker() {
+ return serviceRegistryTrackerTracker.getService();
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java
index 57b9ecf391b..471f1650a36 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java
@@ -61,6 +61,7 @@ public interface ILanguage {
* a model set in which the language is {@linkplain #install(ModelSet) installed}
*
* @return the language's model in the {code modelSet}, or {@code null} if there is no corresponding model
+ * @since 2.0
*/
default IModel getModel(ModelSet modelSet) {
return LanguageModelRegistry.INSTANCE.getModel(this, modelSet);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageProvider.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageProvider.java
index 76388ec7953..f95b2e3a69b 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageProvider.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageProvider.java
@@ -51,6 +51,7 @@ public interface ILanguageProvider {
* a {@link ModelSet} in which to find the instantiated languages
*
* @return the languages instantiated in the specified resource
+ * @since 2.0
*/
default Iterable<ILanguage> getLanguages(ILanguageService languageService, ModelSet modelSet) {
return getLanguages(languageService, modelSet.getURIWithoutExtension(), false);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java
index 9ccc1effb22..1dce4f08f43 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java
@@ -64,6 +64,7 @@ public interface ILanguageService extends IAdaptable, ILanguageChangeListener {
* a {@link ModelSet} in which to find the instantiated languages
*
* @return the languages instantiated in the specified resource
+ * @since 2.0
*/
Set<ILanguage> getLanguages(ModelSet modelSet);
@@ -109,6 +110,7 @@ public interface ILanguageService extends IAdaptable, ILanguageChangeListener {
*
* @return its language models, which may be empty if the model-set is not in a
* service registry that has a language service
+ * @since 2.0
*/
static Collection<IModel> getLanguageModels(ModelSet modelSet) {
List<IModel> result;
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
index a1742831f77..6aa34544b9d 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
@@ -429,6 +429,9 @@ public abstract class AbstractBaseModel extends AbstractModel implements IVersio
return false;
}
+ /**
+ * @since 2.0
+ */
@Override
public Iterable<? extends EObject> getRootElements() {
Iterable<? extends EObject> result;
@@ -452,6 +455,7 @@ public abstract class AbstractBaseModel extends AbstractModel implements IVersio
* @param object
* an object in a resource
* @return whether it is a root element
+ * @since 2.0
*/
protected boolean isRootElement(EObject object) {
return object.eContainer() == null;
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModel.java
index a11561b9a58..4409acfcf85 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModel.java
@@ -144,6 +144,8 @@ public abstract class AbstractModel implements IModel {
/**
* Starts my registered snippets.
+ *
+ * @since 2.0
*/
protected void startSnippets() {
if (!snippetsStarted) {
@@ -154,6 +156,8 @@ public abstract class AbstractModel implements IModel {
/**
* Stops my registered snippets.
+ *
+ * @since 2.0
*/
protected void stopSnippets() {
if (snippetsStarted) {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
index b665e30baef..16a27040ee7 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
@@ -181,14 +181,22 @@ public abstract class EMFLogicalModel extends AbstractBaseModel implements IEMFM
/**
* The very basic requirement is that I have a {@link #getResource() resource} in which
* to persist the {@code object}.
+ *
+ * @since 2.0
*/
@Override
public boolean canPersist(EObject object) {
return (getResource() != null) && isSupportedRoot(object);
}
+ /**
+ * @since 2.0
+ */
protected abstract boolean isSupportedRoot(EObject object);
+ /**
+ * @since 2.0
+ */
@Override
public void persist(EObject object) {
if (!canPersist(object)) {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java
index 63c5c0324fc..c408b0cf8e1 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java
@@ -37,6 +37,7 @@ public interface IEMFModel extends IModel {
* @return the model roots, or an empty iterable if either there definitively are none
* or they cannot be determined (for example, because the main resource is a controlled
* unit and the parent unit is not available)
+ * @since 2.0
*/
public Iterable<? extends EObject> getRootElements();
@@ -66,6 +67,7 @@ public interface IEMFModel extends IModel {
* @return whether I should persist the {@code object}
*
* @see #persist(EObject)
+ * @since 2.0
*/
public boolean canPersist(EObject object);
@@ -80,6 +82,7 @@ public interface IEMFModel extends IModel {
* if I cannot persist the {@code object}
*
* @see #canPersist(EObject)
+ * @since 2.0
*/
public void persist(EObject object);
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java
index ea5967b3683..4aad7200d86 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java
@@ -1300,6 +1300,7 @@ public class ModelSet extends ResourceSetImpl {
* an object to be persisted as a new root of a managed EMF {@code Resource}
*
* @return the model that is best suited to persist the {@code object}, or {@code null} if none
+ * @since 2.0
*/
public IEMFModel getModelToPersist(EObject object) {
return models.values().stream()
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelsReader.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelsReader.java
index ae3edded14d..d64dc7bffb0 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelsReader.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelsReader.java
@@ -357,6 +357,7 @@ public class ModelsReader extends ExtensionUtils {
* @param modelSet
* a model-set
* @return ones that are required
+ * @since 2.0
*/
public Set<IModel> getRequiredModels(ModelSet modelSet) {
return getRequiredModels(modelSet, IModel.class);
@@ -370,6 +371,7 @@ public class ModelsReader extends ExtensionUtils {
* @param modelType
* the specific type of models to request
* @return ones that are required
+ * @since 2.0
*/
public <M extends IModel> Set<M> getRequiredModels(ModelSet modelSet, Class<M> modelType) {
Set<String> requiredModelClasses = Stream.of(getExtensions())
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java
index ea15d69ab94..cb84db8587f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java
@@ -385,6 +385,9 @@ public abstract class ResourceAdapter extends AdapterImpl {
}
}
+ /**
+ * @since 2.0
+ */
protected void handleResourceSetChangeEvent0(ResourceSetChangeEvent event) {
try {
notifications = event.getNotifications();
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
index c853d4b32b7..9b356bb68c9 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
@@ -62,8 +62,17 @@ import com.google.common.base.Objects;
*/
public class SashModel extends EMFLogicalModel implements IModel {
+ /**
+ * @since 2.0
+ */
public static final String PROPERTY_PRIVATE_RESOURCE_URI = "privateResourceURI"; //$NON-NLS-1$
+ /**
+ * @since 2.0
+ */
public static final String PROPERTY_SHARED_RESOURCE_URI = "sharedResourceURI"; //$NON-NLS-1$
+ /**
+ * @since 2.0
+ */
public static final String PROPERTY_LEGACY_MODE = "legacyMode"; //$NON-NLS-1$
private final PropertyChangeSupport bean = new PropertyChangeSupport(this);
@@ -293,6 +302,9 @@ public class SashModel extends EMFLogicalModel implements IModel {
return saveOptions;
}
+ /**
+ * @since 2.0
+ */
public boolean isLegacyMode() {
if (legacyMode == null) {
legacyMode = false; // Assume not
@@ -329,6 +341,7 @@ public class SashModel extends EMFLogicalModel implements IModel {
* of whether that actually is the resource that currently stores the sash model.
*
* @return the private sash-model resource URI
+ * @since 2.0
*/
public URI getPrivateResourceURI() {
URI modelURI = (getModelManager() == null) ? null : getModelManager().getURIWithoutExtension();
@@ -341,6 +354,7 @@ public class SashModel extends EMFLogicalModel implements IModel {
* sash model.
*
* @return the shared sash-model resource URI
+ * @since 2.0
*/
public URI getSharedResourceURI() {
URI modelURI = (getModelManager() == null) ? null : getModelManager().getURIWithoutExtension();
@@ -361,18 +375,30 @@ public class SashModel extends EMFLogicalModel implements IModel {
// Bean API
//
+ /**
+ * @since 2.0
+ */
public void addPropertyChangeListener(PropertyChangeListener listener) {
bean.addPropertyChangeListener(listener);
}
+ /**
+ * @since 2.0
+ */
public void removePropertyChangeListener(PropertyChangeListener listener) {
bean.removePropertyChangeListener(listener);
}
+ /**
+ * @since 2.0
+ */
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
bean.addPropertyChangeListener(propertyName, listener);
}
+ /**
+ * @since 2.0
+ */
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
bean.removePropertyChangeListener(propertyName, listener);
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModelUtils.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModelUtils.java
index 1b8bffb9923..334971d5feb 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModelUtils.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModelUtils.java
@@ -1,150 +1,153 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2016 LIFL, CEA LIST, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * LIFL - Initial API and implementation
- * Christian W. Damus - bug 434983
- * Christian W. Damus - bug 469188
- * Christian W. Damus - bug 485220
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core.resource.sasheditor;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelUtils;
-import org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage;
-import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-
-/**
- * Set of utility methods linked to Trace for ControlMode
- *
- * @author cedric dumoulin
- *
- */
-public class SashModelUtils {
-
- /**
- * Gets the SashModel for the currently selected editor. <br>
- * Warning: This method is designed to be call from ui.handlers. It is not
- * designed to be call from Editors. This method can return null if called
- * during the MultiEditor initialization.
- *
- * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
- *
- * @return The {@link SashModel} of the current editor, or null if not
- * found.
- * @deprecated Use {@link #getSashModel(ModelSet)} or {@link #getSashModel(ServicesRegistry)} instead
- */
- @Deprecated
- public static SashModel getSashModel() {
-
- try {
- return (SashModel) ServiceUtils.getInstance().getModelSet(null).getModel(SashModel.MODEL_ID);
- } catch (ServiceException e) {
- return null;
- }
- }
-
- /**
- * Gets the SashModel for the currently selected editor. <br>
- * Warning: This method is designed to be call from ui.handlers. It is not
- * designed to be call from Editors. This method can return null if called
- * during the MultiEditor initialization.
- *
- * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
- *
- * @return The {@link SashModel} of the current editor, or null if not
- * found.
- * @throws ServiceException
- * If an error occurs while getting or starting the service.
- * @deprecated Use {@link #getSashModelChecked(ServicesRegistry)} instead
- */
- @Deprecated
- public static SashModel getSashModelChecked() throws ServiceException {
-
- return (SashModel) ServiceUtils.getInstance().getModelSet(null).getModel(SashModel.MODEL_ID);
- }
-
- /**
- * Gets the SashModel from the {@link ModelSet}. <br>
- *
- * @param modelsManager
- * The modelManager containing the requested model.
- *
- * @return The {@link SashModel} registered in modelManager, or null if not
- * found.
- */
- public static SashModel getSashModel(ModelSet modelsManager) {
-
- return (SashModel) modelsManager.getModel(SashModel.MODEL_ID);
- }
-
- /**
- * Gets the SashModel from the {@link ModelSet}. <br>
- *
- * @param ServicesRegistry
- * The servie registry under which the ModelSet is registered.
- *
- * @return The {@link SashModel} registered in modelManager, or null if not
- * found.
- */
- public static SashModel getSashModel(ServicesRegistry servicesRegistry) {
-
- try {
- return (SashModel) ModelUtils.getModelSetChecked(servicesRegistry).getModel(SashModel.MODEL_ID);
- } catch (ServiceException e) {
- return null;
- }
- }
-
- /**
- * Gets the SashModel from the {@link ModelSet}. <br>
- *
- * @param ServicesRegistry
- * The servie registry under which the ModelSet is registered.
- *
- * @return The {@link SashModel} registered in modelManager, or null if not
- * found.
- * @throws ServiceException
- * If the service can't be returned.
- */
- public static SashModel getSashModelChecked(ServicesRegistry servicesRegistry) throws ServiceException {
-
- return (SashModel) ModelUtils.getModelSetChecked(servicesRegistry).getModel(SashModel.MODEL_ID);
- }
-
- /**
- * Retrieve the uri of the initial di opened
- *
- * @param modelSet
- * @return
- */
- public static URI getInitialURI(ModelSet modelSet) {
- return SashModelUtils.getSashModel(modelSet).getResourceURI();
- }
-
- public static SashWindowsMngr getSashWindowsMngr(ModelSet modelSet) {
- SashWindowsMngr result = null;
-
- SashModel model = getSashModel(modelSet);
- if (model != null) {
- Resource resource = model.getResource();
- if (resource != null) {
- result = (SashWindowsMngr) EcoreUtil.getObjectByType(resource.getContents(), DiPackage.Literals.SASH_WINDOWS_MNGR);
- }
- }
-
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 LIFL, CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * LIFL - Initial API and implementation
+ * Christian W. Damus - bug 434983
+ * Christian W. Damus - bug 469188
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.core.resource.sasheditor;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelUtils;
+import org.eclipse.papyrus.infra.core.sashwindows.di.DiPackage;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+
+/**
+ * Set of utility methods linked to Trace for ControlMode
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class SashModelUtils {
+
+ /**
+ * Gets the SashModel for the currently selected editor. <br>
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
+ *
+ * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
+ *
+ * @return The {@link SashModel} of the current editor, or null if not
+ * found.
+ * @deprecated Use {@link #getSashModel(ModelSet)} or {@link #getSashModel(ServicesRegistry)} instead
+ */
+ @Deprecated
+ public static SashModel getSashModel() {
+
+ try {
+ return (SashModel) ServiceUtils.getInstance().getModelSet(null).getModel(SashModel.MODEL_ID);
+ } catch (ServiceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the SashModel for the currently selected editor. <br>
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
+ *
+ * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
+ *
+ * @return The {@link SashModel} of the current editor, or null if not
+ * found.
+ * @throws ServiceException
+ * If an error occurs while getting or starting the service.
+ * @deprecated Use {@link #getSashModelChecked(ServicesRegistry)} instead
+ */
+ @Deprecated
+ public static SashModel getSashModelChecked() throws ServiceException {
+
+ return (SashModel) ServiceUtils.getInstance().getModelSet(null).getModel(SashModel.MODEL_ID);
+ }
+
+ /**
+ * Gets the SashModel from the {@link ModelSet}. <br>
+ *
+ * @param modelsManager
+ * The modelManager containing the requested model.
+ *
+ * @return The {@link SashModel} registered in modelManager, or null if not
+ * found.
+ */
+ public static SashModel getSashModel(ModelSet modelsManager) {
+
+ return (SashModel) modelsManager.getModel(SashModel.MODEL_ID);
+ }
+
+ /**
+ * Gets the SashModel from the {@link ModelSet}. <br>
+ *
+ * @param ServicesRegistry
+ * The servie registry under which the ModelSet is registered.
+ *
+ * @return The {@link SashModel} registered in modelManager, or null if not
+ * found.
+ */
+ public static SashModel getSashModel(ServicesRegistry servicesRegistry) {
+
+ try {
+ return (SashModel) ModelUtils.getModelSetChecked(servicesRegistry).getModel(SashModel.MODEL_ID);
+ } catch (ServiceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the SashModel from the {@link ModelSet}. <br>
+ *
+ * @param ServicesRegistry
+ * The servie registry under which the ModelSet is registered.
+ *
+ * @return The {@link SashModel} registered in modelManager, or null if not
+ * found.
+ * @throws ServiceException
+ * If the service can't be returned.
+ */
+ public static SashModel getSashModelChecked(ServicesRegistry servicesRegistry) throws ServiceException {
+
+ return (SashModel) ModelUtils.getModelSetChecked(servicesRegistry).getModel(SashModel.MODEL_ID);
+ }
+
+ /**
+ * Retrieve the uri of the initial di opened
+ *
+ * @param modelSet
+ * @return
+ */
+ public static URI getInitialURI(ModelSet modelSet) {
+ return SashModelUtils.getSashModel(modelSet).getResourceURI();
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static SashWindowsMngr getSashWindowsMngr(ModelSet modelSet) {
+ SashWindowsMngr result = null;
+
+ SashModel model = getSashModel(modelSet);
+ if (model != null) {
+ Resource resource = model.getResource();
+ if (resource != null) {
+ result = (SashWindowsMngr) EcoreUtil.getObjectByType(resource.getContents(), DiPackage.Literals.SASH_WINDOWS_MNGR);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/ExtensionServicesRegistry.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/ExtensionServicesRegistry.java
index a7ce2a07d80..fc78dc5e481 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/ExtensionServicesRegistry.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/ExtensionServicesRegistry.java
@@ -61,6 +61,7 @@ public class ExtensionServicesRegistry extends ServicesRegistry {
*
* @throws ServiceException
* on any problem in the loading of service registrations
+ * @since 2.0
*/
public ExtensionServicesRegistry() throws ServiceException {
this(Activator.PLUGIN_ID);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/spi/IContextualServiceRegistryTracker.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/spi/IContextualServiceRegistryTracker.java
index 1150740f204..b08601506be 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/spi/IContextualServiceRegistryTracker.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/services/spi/IContextualServiceRegistryTracker.java
@@ -20,6 +20,8 @@ import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
* that is associated with the user's current editing context, if any.
* When the user is not editing any Papyrus model, then presumably there
* is no need for any service registry.
+ *
+ * @since 2.0
*/
@FunctionalInterface
public interface IContextualServiceRegistryTracker {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/AbstractServiceUtils.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/AbstractServiceUtils.java
index d04e02fcd7f..54fd40a134c 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/AbstractServiceUtils.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/AbstractServiceUtils.java
@@ -56,6 +56,7 @@ public abstract class AbstractServiceUtils<T> {
* Papyrus editor or view is active (implying the model that the user is currently editing).
*
* @return the contextual service registry, or {@code null} if none can be determined
+ * @since 2.0
*/
protected ServicesRegistry getContextualServiceRegistry() {
IContextualServiceRegistryTracker tracker = Activator.getDefault().getContextualServiceRegistryTracker();
@@ -81,6 +82,7 @@ public abstract class AbstractServiceUtils<T> {
* @return
* @throws ServiceException
* If an error occurs while getting the requested service.
+ * @since 2.0
*/
public IPageManager getIPageManager(T from) throws ServiceException {
return getServiceRegistry(from).getService(IPageManager.class);
@@ -167,6 +169,7 @@ public abstract class AbstractServiceUtils<T> {
* the Papyrus context from which to derive the registry
*
* @return the Papyrus callable
+ * @since 2.0
*/
public <V> IPapyrusCallable<V> callable(IProgressCallable<V> callable, T from) {
return new IPapyrusCallable<V>() {
@@ -200,6 +203,7 @@ public abstract class AbstractServiceUtils<T> {
* the Papyrus context from which to derive the registry
*
* @return the Papyrus runnable
+ * @since 2.0
*/
public IPapyrusRunnable runnable(IProgressRunnable runnable, T from) {
return new IPapyrusRunnable() {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusCallable.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusCallable.java
index 5d7b6edd304..32f7313b03f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusCallable.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusCallable.java
@@ -20,6 +20,8 @@ import org.eclipse.papyrus.infra.tools.util.IProgressCallable;
/**
* Protocol for a callable in the Papyrus context.
+ *
+ * @since 2.0
*/
@FunctionalInterface
public interface IPapyrusCallable<V> extends IProgressCallable<V>, IServiceRegistryProvider {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusRunnable.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusRunnable.java
index 4c8d2f1d008..a08be8c70de 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusRunnable.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IPapyrusRunnable.java
@@ -20,6 +20,8 @@ import org.eclipse.papyrus.infra.tools.util.IProgressRunnable;
/**
* Protocol for a runnable in the Papyrus context.
+ *
+ * @since 2.0
*/
@FunctionalInterface
public interface IPapyrusRunnable extends IProgressRunnable, IServiceRegistryProvider {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IServiceRegistryProvider.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IServiceRegistryProvider.java
index 36c50087af5..67e46de1b3a 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IServiceRegistryProvider.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/IServiceRegistryProvider.java
@@ -18,6 +18,8 @@ import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
/**
* A protocol for any object that can provide the context of a Papyrus
* {@link ServicesRegistry} in which it is exists.
+ *
+ * @since 2.0
*/
@FunctionalInterface
public interface IServiceRegistryProvider {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
index 29fcefbed91..7f00384381a 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
@@ -59,6 +59,9 @@ public class TransactionHelper {
public static final String TRANSACTION_OPTION_MERGE_NESTED_READ = "papyrus.merge_nested_read"; //$NON-NLS-1$
+ /**
+ * @since 2.0
+ */
public static void run(EditingDomain domain, Runnable writeOperation) throws InterruptedException, RollbackException {
if (domain instanceof TransactionalEditingDomain) {
run((TransactionalEditingDomain) domain, writeOperation);
@@ -67,6 +70,9 @@ public class TransactionHelper {
}
}
+ /**
+ * @since 2.0
+ */
public static void run(TransactionalEditingDomain domain, final Runnable writeOperation) throws InterruptedException, RollbackException {
if (domain instanceof InternalTransactionalEditingDomain) {
run((InternalTransactionalEditingDomain) domain, writeOperation);
@@ -82,6 +88,9 @@ public class TransactionHelper {
}
}
+ /**
+ * @since 2.0
+ */
public static void run(InternalTransactionalEditingDomain domain, Runnable writeOperation) throws InterruptedException, RollbackException {
Transaction transaction = domain.startTransaction(false, Collections.emptyMap());
try {
@@ -472,6 +481,7 @@ public class TransactionHelper {
* @param runnable
* a progress runnable that is to borrow the {@code domain}'s active transaction on the modal context thread
* @return the privileged runnable, ready to pass into the {@link IExecutorService} or other such API
+ * @since 2.0
*/
public static IProgressRunnable createPrivilegedRunnable(TransactionalEditingDomain domain, final IProgressRunnable runnable) {
IProgressMonitor monitorHolder[] = { null };
@@ -493,6 +503,7 @@ public class TransactionHelper {
* @param callable
* a progress callable that is to borrow the {@code domain}'s active transaction on the modal context thread
* @return the privileged callable, ready to pass into the {@link IExecutorService} or other such API
+ * @since 2.0
*/
public static <V> IProgressCallable<V> createPrivilegedCallable(TransactionalEditingDomain domain, final IProgressCallable<V> callable) {
IProgressMonitor monitorHolder[] = { null };
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/.project b/plugins/infra/core/org.eclipse.papyrus.infra.tools/.project
index 29096480f24..f5c92898122 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/.project
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/.project
@@ -20,9 +20,37 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.missing.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/.settings/.api_filters b/plugins/infra/core/org.eclipse.papyrus.infra.tools/.settings/.api_filters
new file mode 100644
index 00000000000..793433951ae
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/.settings/.api_filters
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.papyrus.infra.tools" version="2">
+ <resource path="src/org/eclipse/papyrus/infra/tools/databinding/DelegatingObservableCollection.java" type="org.eclipse.papyrus.infra.tools.databinding.DelegatingObservableCollection">
+ <filter comment="Cannot extend the core platform observable class so the interface must be implemented" id="574619656">
+ <message_arguments>
+ <message_argument value="IObservableCollection&lt;E&gt;"/>
+ <message_argument value="DelegatingObservableCollection&lt;T&gt;"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/papyrus/infra/tools/databinding/DelegatingObservableList.java" type="org.eclipse.papyrus.infra.tools.databinding.DelegatingObservableList">
+ <filter comment="Cannot extend the core platform observable class so the interface must be implemented" id="574619656">
+ <message_arguments>
+ <message_argument value="IObservableList&lt;E&gt;"/>
+ <message_argument value="DelegatingObservableList"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/papyrus/infra/tools/databinding/DelegatingObservableSet.java" type="org.eclipse.papyrus.infra.tools.databinding.DelegatingObservableSet">
+ <filter comment="Cannot extend the core platform observable class so the interface must be implemented" id="574619656">
+ <message_arguments>
+ <message_argument value="IObservableSet&lt;E&gt;"/>
+ <message_argument value="DelegatingObservableSet"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/papyrus/infra/tools/databinding/DelegatingObservableValue.java" type="org.eclipse.papyrus.infra.tools.databinding.DelegatingObservableValue">
+ <filter comment="Cannot extend the core platform observable class so the interface must be implemented" id="574619656">
+ <message_arguments>
+ <message_argument value="IObservableValue&lt;T&gt;"/>
+ <message_argument value="DelegatingObservableValue"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF
index 6960891c38a..4bd5703e012 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF
@@ -5,15 +5,13 @@ Export-Package: org.eclipse.papyrus.infra.tools,
org.eclipse.papyrus.infra.tools.notify,
org.eclipse.papyrus.infra.tools.spi,
org.eclipse.papyrus.infra.tools.util
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.emf.ecore.xmi;bundle-version="2.9.0",
- org.eclipse.core.expressions;bundle-version="3.4.500",
- com.google.guava;bundle-version="11.0.0"
+Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ com.google.guava;bundle-version="11.0.0";visibility:=reexport,
+ org.eclipse.core.databinding.observable;bundle-version="[1.6.0,2.0.0)";visibility:=reexport,
+ org.eclipse.emf.common;bundle-version="[2.12.0,3.0.0)";visibility:=reexport
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Eclipse-BuddyPolicy: dependent
Bundle-Name: %Bundle-Name
Bundle-Activator: org.eclipse.papyrus.infra.tools.Activator
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml b/plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml
index 6c56c86b074..28f1cab8cac 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.tools</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/Activator.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/Activator.java
index 4c598486f70..90e4b99cb06 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/Activator.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/Activator.java
@@ -22,6 +22,8 @@ import org.osgi.util.tracker.ServiceTracker;
/**
* The activator class controls the plug-in life cycle
+ *
+ * @since 2.0
*/
public class Activator extends Plugin {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservable.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservable.java
index 1e10dec5a1e..e9ee1d6b91b 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservable.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservable.java
@@ -15,6 +15,9 @@ import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.emf.common.command.Command;
+/**
+ * @since 2.0
+ */
public interface CommandBasedObservable extends IObservable {
/**
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservableValue.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservableValue.java
index 06450cf6856..1ab52646e1f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservableValue.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/CommandBasedObservableValue.java
@@ -14,6 +14,9 @@ package org.eclipse.papyrus.infra.tools.databinding;
import org.eclipse.core.databinding.observable.value.IObservableValue;
+/**
+ * @since 2.0
+ */
public interface CommandBasedObservableValue extends CommandBasedObservable, IObservableValue {
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/TouchableValue.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/TouchableValue.java
index 438f111b664..198010851f5 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/TouchableValue.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/TouchableValue.java
@@ -23,6 +23,8 @@ import org.eclipse.core.databinding.observable.value.WritableValue;
/**
* An analogue of the {@link WritableValue} that supports "touches" to send
* change events even though the value is not replaced.
+ *
+ * @since 2.0
*/
public class TouchableValue<T> extends ReferenceCountedObservable.Value<T> {
private final Class<? extends T> type;
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/WritableListWithIterator.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/WritableListWithIterator.java
index 236d80cfcef..e258fe2c495 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/WritableListWithIterator.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/WritableListWithIterator.java
@@ -31,6 +31,8 @@ import org.eclipse.core.databinding.observable.list.WritableList;
/**
* A specialization of the core Databindings {@link WritableList} providing
* iterators that support modification.
+ *
+ * @since 2.0
*/
public class WritableListWithIterator<E> extends WritableList<E> implements ReferenceCountedObservable {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/IContext.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/IContext.java
index 93d0e10e3dc..2d415d09af8 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/IContext.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/IContext.java
@@ -19,6 +19,8 @@ import java.util.Map;
/**
* The Class Context.
+ *
+ * @since 2.0
*/
public interface IContext {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotification.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotification.java
index 55bc0f2f8cf..29b01e76b1f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotification.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotification.java
@@ -17,6 +17,8 @@ package org.eclipse.papyrus.infra.tools.notify;
/**
* The Interface INotification.
* offers some services for a notification
+ *
+ * @since 2.0
*/
public interface INotification {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotificationBuilder.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotificationBuilder.java
index 84bb3b4ace6..860cca042ef 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotificationBuilder.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/INotificationBuilder.java
@@ -16,6 +16,8 @@ package org.eclipse.papyrus.infra.tools.notify;
/**
* Protocol of a pluggable notification builder.
+ *
+ * @since 2.0
*/
public interface INotificationBuilder {
/** asynchronous, determines if the message needs or not to be synchronous with the notification */
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/LogNotification.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/LogNotification.java
index a4554cb06ed..0a03f47cb24 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/LogNotification.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/LogNotification.java
@@ -17,6 +17,8 @@ import org.eclipse.papyrus.infra.tools.Activator;
/**
* A simple notification that just emits a message to the log.
+ *
+ * @since 2.0
*/
public class LogNotification implements INotification {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationBuilder.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationBuilder.java
index 9d54d4204d9..1bd1241fae9 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationBuilder.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationBuilder.java
@@ -27,6 +27,7 @@ import org.eclipse.papyrus.infra.tools.spi.INotificationBuilderFactory;
* the run method launch the message according to the value of the attributes
*
* @author tristan faure
+ * @since 2.0
*
*/
public class NotificationBuilder implements INotificationBuilder {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationRunnable.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationRunnable.java
index 3df50c005ab..41f25c78146 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationRunnable.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/NotificationRunnable.java
@@ -15,6 +15,8 @@ package org.eclipse.papyrus.infra.tools.notify;
/**
* a runnable
+ *
+ * @since 2.0
*
*/
public interface NotificationRunnable {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/Type.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/Type.java
index 61c73981778..cdc5ad54ce3 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/Type.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/notify/Type.java
@@ -22,6 +22,7 @@ package org.eclipse.papyrus.infra.tools.notify;
* <li>QUESTION</i>
*
* @author tristan faure
+ * @since 2.0
*
*/
public enum Type {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/IExecutorServiceFactory.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/IExecutorServiceFactory.java
index cc2ff542665..b90c2df9c7c 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/IExecutorServiceFactory.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/IExecutorServiceFactory.java
@@ -17,6 +17,8 @@ import org.eclipse.papyrus.infra.tools.util.IExecutorService;
/**
* An OSGi service protocol for creation of an executor service on the UI thread.
+ *
+ * @since 2.0
*/
@FunctionalInterface
public interface IExecutorServiceFactory {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/INotificationBuilderFactory.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/INotificationBuilderFactory.java
index a527ec3c592..6d7ad78d90c 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/INotificationBuilderFactory.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/spi/INotificationBuilderFactory.java
@@ -18,6 +18,8 @@ import org.eclipse.papyrus.infra.tools.notify.INotificationBuilder;
/**
* An OSGi service protocol for creation of a notification builder
* (preferably for UI presentation).
+ *
+ * @since 2.0
*/
@FunctionalInterface
public interface INotificationBuilderFactory {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CompositeServiceTracker.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CompositeServiceTracker.java
index 2dab30d9eba..dd0ffa38648 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CompositeServiceTracker.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CompositeServiceTracker.java
@@ -26,6 +26,8 @@ import org.osgi.util.tracker.ServiceTracker;
/**
* A service tracker that provides a single service as a composite of
* registered service implementations.
+ *
+ * @since 2.0
*/
public class CompositeServiceTracker<S> extends ServiceTracker<S, S> {
private final AtomicReference<S> delegate = new AtomicReference<>();
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CoreExecutors.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CoreExecutors.java
index 14604007bc2..0e8f1578da5 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CoreExecutors.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/CoreExecutors.java
@@ -20,6 +20,8 @@ import org.eclipse.papyrus.infra.tools.Activator;
/**
* A provider of {@link Executor}s offering various synchronous and asynchronous
* execution characteristics.
+ *
+ * @since 2.0
*/
public class CoreExecutors {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IExecutorService.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IExecutorService.java
index e816ade859c..7365980fa29 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IExecutorService.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IExecutorService.java
@@ -23,6 +23,8 @@ import java.util.concurrent.Future;
* execution of tasks, with the possibility that these could be optimized
* where appropriate (such as in a UI-thread executor to use a {@code syncExec}
* call).
+ *
+ * @since 2.0
*/
public interface IExecutorService extends ExecutorService {
/**
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressCallable.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressCallable.java
index ff2601ca8ad..d0706de7829 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressCallable.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressCallable.java
@@ -24,6 +24,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
* reporting to these callables.
*
* @see IExecutorService
+ * @since 2.0
*/
@FunctionalInterface
public interface IProgressCallable<V> {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressRunnable.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressRunnable.java
index 124099a64fc..a70e517fd64 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressRunnable.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IProgressRunnable.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
* reporting to these runnables.
*
* @see IExecutorService
+ * @since 2.0
*/
@FunctionalInterface
public interface IProgressRunnable {
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/PlatformHelper.java b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/PlatformHelper.java
index 316b4683f9a..ea43f2823b9 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/PlatformHelper.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/PlatformHelper.java
@@ -99,6 +99,7 @@ public class PlatformHelper {
* a default adapter to return if none can be obtained (may be {@code null}
*
* @return the best-effort adapter of the given {@code type}, else the {@code defaultAdapter}
+ * @since 2.0
*/
public static <T> T getAdapter(Object object, Class<T> type, T defaultAdapter) {
T result = defaultAdapter;
@@ -125,6 +126,7 @@ public class PlatformHelper {
* obtained by the usual means (may be {@code null}
*
* @return the best-effort adapter of the given {@code type}, else the {@code defaultAdapter}
+ * @since 2.0
*/
public static <T> T getAdapter(Object object, Class<T> type, Supplier<T> defaultAdapter) {
T result = null;
diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.edit/.project b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.edit/.project
index 583a3cf1181..a348ff4a401 100644
--- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.edit/.project
+++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.edit/.project
@@ -1,28 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.core.serviceregistry.edit</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.core.serviceregistry.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.editor/.project b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.editor/.project
index 046bf32ee5e..2f445345d67 100644
--- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.editor/.project
+++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry.editor/.project
@@ -1,28 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.core.serviceregistry.editor</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.core.serviceregistry.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/.project b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/.project
index d686710282c..8519dcb1134 100644
--- a/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/.project
+++ b/plugins/infra/core/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/.project
@@ -1,28 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.core.serviceregistry</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.core.serviceregistry</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project
index 06ea6f87f79..b12e9567745 100644
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.discovery.ui.menu</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.discovery.ui.menu</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF
index 305b9eb7491..2b228c62a4f 100644
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu/META-INF/MANIFEST.MF
@@ -1,16 +1,15 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.discovery.ui.menu,
- org.eclipse.papyrus.infra.discovery.ui.menu.handler
-Require-Bundle: org.eclipse.ui;bundle-version="3.8.0",
- org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.discovery.ui;bundle-version="1.2.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.discovery.ui.menu.Activator
-Bundle-ManifestVersion: 2
-Bundle-Description: %pluginDescription
-Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery.ui.menu;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.discovery.ui.menu,
+ org.eclipse.papyrus.infra.discovery.ui.menu.handler
+Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.discovery.ui;bundle-version="[2.0.0,3.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.infra.discovery.ui.menu.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery.ui.menu;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project
index 07c066b7b71..cbab51d1dfc 100644
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.discovery.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.discovery.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.settings/.api_filters b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.settings/.api_filters
new file mode 100644
index 00000000000..579ec7ece77
--- /dev/null
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/.settings/.api_filters
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.papyrus.infra.discovery.ui" version="2">
+ <resource path="src/org/eclipse/papyrus/infra/discovery/ui/viewer/DiscoveryViewer.java" type="org.eclipse.papyrus.infra.discovery.ui.viewer.DiscoveryViewer">
+ <filter comment="No public setter is provided for FontData.height as for other fields" id="623939596">
+ <message_arguments>
+ <message_argument value="FontData"/>
+ <message_argument value="DiscoveryViewer"/>
+ <message_argument value="height"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java" type="org.eclipse.papyrus.infra.discovery.ui.wizards.DiscoveryComponent">
+ <filter comment="This has to change with every major release and isn't intended for clients anyways" id="388194388">
+ <message_arguments>
+ <message_argument value="org.eclipse.papyrus.infra.discovery.ui.wizards.DiscoveryComponent"/>
+ <message_argument value="DISCOVERY_PAPYRUS_URI"/>
+ <message_argument value="http://www.eclipse.org/modeling/mdt/papyrus/downloads/discovery/mars/papyrus-extra.xmi"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF
index c5b5e3e8c93..0dc71f77056 100644
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/META-INF/MANIFEST.MF
@@ -1,32 +1,29 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.repository,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.operations;resolution:=optional,
- org.eclipse.emf.edit;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.emf.edit.ui;visibility:=reexport,
- org.eclipse.ui,
- org.eclipse.ui.forms,
- org.eclipse.papyrus.infra.discovery;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0"
-Export-Package: org.eclipse.papyrus.infra.discovery.ui,
- org.eclipse.papyrus.infra.discovery.ui.viewer,
- org.eclipse.papyrus.infra.discovery.ui.wizards
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.discovery.ui.Activator
-Bundle-ManifestVersion: 2
-Bundle-Description: %pluginDescription
-Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery.ui;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.equinox.p2.core;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.equinox.p2.ui;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.3.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.equinox.p2.repository;bundle-version="[2.3.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.equinox.p2.director;bundle-version="[2.3.0,3.0.0)",
+ org.eclipse.equinox.p2.operations;bundle-version="[2.4.0,3.0.0)";resolution:=optional,
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.edit.ui;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.ui;bundle-version="[3.107.0,4.0.0)";visibility:=reexport,
+ org.eclipse.ui.forms;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.papyrus.infra.discovery;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)";visibility:=reexport
+Export-Package: org.eclipse.papyrus.infra.discovery.ui,
+ org.eclipse.papyrus.infra.discovery.ui.viewer,
+ org.eclipse.papyrus.infra.discovery.ui.wizards
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 2.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.infra.discovery.ui.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/pom.xml b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/pom.xml
index 355261cb978..e3b9ccc45db 100644
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/pom.xml
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.discovery.ui</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java
index 07cb81eec34..b5861e9dbf7 100644
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/wizards/DiscoveryComponent.java
@@ -1,82 +1,86 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.discovery.ui.wizards;
-
-import java.io.IOException;
-import java.util.Collections;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
-import org.eclipse.papyrus.infra.discovery.ui.viewer.DiscoveryContentProvider;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * Execution class for the execution of the discovery component
- */
-public class DiscoveryComponent {
-
- /** URI of the model where all extra component features to be installed are referenced */
- public static final String DISCOVERY_PAPYRUS_URI = "http://www.eclipse.org/modeling/mdt/papyrus/downloads/discovery/neon/papyrus-extra.xmi";
-
- public static final Object execute() {
- final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- DiscoveryContentProvider provider = new DiscoveryContentProvider() {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected DiscoveryDefinition load() {
- Resource res = new XMIResourceImpl(URI.createURI(DISCOVERY_PAPYRUS_URI));
- try {
- res.load(Collections.EMPTY_MAP);
- } catch (IOException e) {
- MessageDialog.openError(window.getShell(), Messages.DiscoveryComponent_CannotConnectToSource_title, Messages.DiscoveryComponent_CannotConnectToSource_label);
- throw new RuntimeException(e);
- }
- return (DiscoveryDefinition) res.getContents().get(0);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getDescription() {
- return Messages.DiscoveryComponent_description;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getTitle() {
- return Messages.DiscoveryComponent_title;
- }
-
- };
-
-
- DiscoveryWizard wizard = new DiscoveryWizard(provider);
- WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
- return dialog.open();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.discovery.ui.wizards;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.infra.discovery.DiscoveryDefinition;
+import org.eclipse.papyrus.infra.discovery.ui.viewer.DiscoveryContentProvider;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * Execution class for the execution of the discovery component
+ */
+public class DiscoveryComponent {
+
+ /**
+ * URI of the model where all extra component features to be installed are referenced.
+ *
+ * @noreference This field is not intended to be referenced by clients.
+ */
+ public static final String DISCOVERY_PAPYRUS_URI = "http://www.eclipse.org/modeling/mdt/papyrus/downloads/discovery/neon/papyrus-extra.xmi";
+
+ public static final Object execute() {
+ final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ DiscoveryContentProvider provider = new DiscoveryContentProvider() {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected DiscoveryDefinition load() {
+ Resource res = new XMIResourceImpl(URI.createURI(DISCOVERY_PAPYRUS_URI));
+ try {
+ res.load(Collections.EMPTY_MAP);
+ } catch (IOException e) {
+ MessageDialog.openError(window.getShell(), Messages.DiscoveryComponent_CannotConnectToSource_title, Messages.DiscoveryComponent_CannotConnectToSource_label);
+ throw new RuntimeException(e);
+ }
+ return (DiscoveryDefinition) res.getContents().get(0);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getDescription() {
+ return Messages.DiscoveryComponent_description;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getTitle() {
+ return Messages.DiscoveryComponent_title;
+ }
+
+ };
+
+
+ DiscoveryWizard wizard = new DiscoveryWizard(provider);
+ WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
+ return dialog.open();
+ }
+
+}
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project
index 1491287da94..9c77b216c90 100644
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.discovery</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.discovery</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF
index 8e52eae7f03..274072ee03f 100644
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF
+++ b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery/META-INF/MANIFEST.MF
@@ -1,17 +1,17 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.emf.ecore;bundle-version="2.8.0";visibility:=reexport
-Export-Package: org.eclipse.papyrus.infra.discovery,
- org.eclipse.papyrus.infra.discovery.impl,
- org.eclipse.papyrus.infra.discovery.util
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.discovery.Activator$Implementation
-Bundle-ManifestVersion: 2
-Bundle-Description: %pluginDescription
-Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport
+Export-Package: org.eclipse.papyrus.infra.discovery,
+ org.eclipse.papyrus.infra.discovery.impl,
+ org.eclipse.papyrus.infra.discovery.util
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.infra.discovery.Activator$Implementation
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.infra.discovery;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/.project b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/.project
index 7759ae463d1..31e6ffdcd28 100644
--- a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/.project
+++ b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/.project
@@ -20,9 +20,33 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/META-INF/MANIFEST.MF b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/META-INF/MANIFEST.MF
index 8acb2478870..ebe3263362b 100644
--- a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/META-INF/MANIFEST.MF
+++ b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome.nattable/META-INF/MANIFEST.MF
@@ -6,23 +6,15 @@ Export-Package: org.eclipse.papyrus.infra.editor.welcome.nattable,
org.eclipse.papyrus.infra.editor.welcome.nattable.painter,
org.eclipse.papyrus.infra.editor.welcome.nattable.sorting,
org.eclipse.papyrus.infra.editor.welcome.nattable.widgets
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0",
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.ui;bundle-version="3.100.0",
- org.eclipse.core.databinding;bundle-version="1.6.0",
- org.eclipse.nebula.widgets.nattable.core;bundle-version="1.4.0",
- org.eclipse.nebula.widgets.nattable.extension.glazedlists;bundle-version="1.4.0",
- ca.odell.glazedlists;bundle-version="1.9.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.navigation;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.properties.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.editor.welcome;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.ui;bundle-version="[3.107.0,4.0.0)";visibility:=reexport,
+ org.eclipse.core.databinding.observable;bundle-version="[1.6.0,2.0.0)";visibility:=reexport,
+ org.eclipse.nebula.widgets.nattable.core;bundle-version="[1.4.0,2.0.0)";visibility:=reexport,
+ org.eclipse.nebula.widgets.nattable.extension.glazedlists;bundle-version="[1.4.0,2.0.0)",
+ ca.odell.glazedlists;bundle-version="[1.9.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.services.navigation;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.editor.welcome;bundle-version="[1.2.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/.project b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/.project
index df264f6400e..78847e5adf3 100644
--- a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/.project
+++ b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/.project
@@ -20,9 +20,33 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/META-INF/MANIFEST.MF b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/META-INF/MANIFEST.MF
index 9dc8a6d97c7..b31bb6ac1d6 100644
--- a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/META-INF/MANIFEST.MF
+++ b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/META-INF/MANIFEST.MF
@@ -3,33 +3,17 @@ Export-Package: org.eclipse.papyrus.infra.editor.welcome,
org.eclipse.papyrus.infra.editor.welcome.internal;x-internal:=true,
org.eclipse.papyrus.infra.editor.welcome.internal.commands;x-internal:=true,
org.eclipse.papyrus.infra.editor.welcome.internal.constraints;x-internal:=true,
- org.eclipse.papyrus.infra.editor.welcome.internal.dnd,
+ org.eclipse.papyrus.infra.editor.welcome.internal.dnd;x-internal:=true,
org.eclipse.papyrus.infra.editor.welcome.internal.impl;x-internal:=true,
org.eclipse.papyrus.infra.editor.welcome.internal.modelelements;x-friends:="org.eclipse.papyrus.infra.editor.welcome.nattable",
org.eclipse.papyrus.infra.editor.welcome.internal.operations;x-internal:=true,
org.eclipse.papyrus.infra.editor.welcome.internal.preferences;x-internal:=true,
org.eclipse.papyrus.infra.editor.welcome.internal.widgets;x-internal:=true,
org.eclipse.papyrus.infra.editor.welcome.util
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0",
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.uml2.types;visibility:=reexport,
- org.eclipse.uml2.common;visibility:=reexport,
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.ui;bundle-version="3.100.0",
- org.eclipse.ui.forms;bundle-version="3.7.0",
- org.eclipse.papyrus.infra.properties.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.constraints;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.properties;bundle-version="1.2.0",
- org.eclipse.ui.views.properties.tabbed;bundle-version="3.6.0",
- org.eclipse.core.databinding;bundle-version="1.6.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.emf.transaction;bundle-version="1.9.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.uml2.types;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.uml2.common;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="[1.2.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.papyrus.infra.editor.welcome.internal.constraints"
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.project
index 8c0d3ad1182..5990bca3999 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.project
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.emf.appearance</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf.appearance</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.settings/.api_filters b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.settings/.api_filters
new file mode 100644
index 00000000000..ec19a254b99
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.papyrus.infra.emf.appearance" version="2">
+ <resource path="src/org/eclipse/papyrus/infra/emf/appearance/helper/AppearanceHelper.java" type="org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper">
+ <filter comment="No developer would reasonably have modified this field" id="388100214">
+ <message_arguments>
+ <message_argument value="org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper"/>
+ <message_argument value="EXTENSION_ID"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/META-INF/MANIFEST.MF
index 76bf4d94668..036070fdca5 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance/META-INF/MANIFEST.MF
@@ -1,20 +1,16 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.emf.appearance,
- org.eclipse.papyrus.infra.emf.appearance.commands,
- org.eclipse.papyrus.infra.emf.appearance.helper,
- org.eclipse.papyrus.infra.emf.appearance.style
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore;bundle-version="2.8.0",
- org.eclipse.emf.transaction;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0"
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %Bundle-Name
-Bundle-Activator: org.eclipse.papyrus.infra.emf.appearance.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.appearance;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.emf.appearance,
+ org.eclipse.papyrus.infra.emf.appearance.commands,
+ org.eclipse.papyrus.infra.emf.appearance.helper,
+ org.eclipse.papyrus.infra.emf.appearance.style
+Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.infra.emf.appearance.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.appearance;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/.project
index 3e7b2dd7dcf..12dd7756c1e 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/.project
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.emf.diagram.common</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf.diagram.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/META-INF/MANIFEST.MF
index f1bffdb6c75..c0809d5521b 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common/META-INF/MANIFEST.MF
@@ -1,17 +1,12 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.emf.diagram.common,
org.eclipse.papyrus.infra.emf.diagram.common.handler
-Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.emf.transaction;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
- org.eclipse.core.commands;bundle-version="3.6.1",
- org.eclipse.ui,
- org.eclipse.papyrus.infra.emf.gmf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.notation;bundle-version="[1.8.0,2.0.0)",
+ org.eclipse.core.commands;bundle-version="[3.8.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[1.2.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/.project
index d198355a356..66de7666aa5 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/.project
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/.project
@@ -20,9 +20,33 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/META-INF/MANIFEST.MF
index 55ed840f623..f44ee9b426e 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/META-INF/MANIFEST.MF
@@ -2,14 +2,11 @@ Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.emf.gmf.command,
org.eclipse.papyrus.infra.emf.gmf.util,
org.eclipse.papyrus.infra.emf.internal.gmf;x-internal:=true
-Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.core.expressions;bundle-version="3.4.400",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.gmf.runtime.common.core;bundle-version="[1.7.0,2.0.0)";visibility:=reexport,
+ org.eclipse.emf.workspace;bundle-version="[1.5.0,2.0.0)";visibility:=reexport
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.project
index ebfa82252ba..0d1f05526ae 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.project
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.emf.readonly</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf.readonly</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF
index 09cd9998ca9..9845b1cdb2b 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/META-INF/MANIFEST.MF
@@ -2,19 +2,14 @@ Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.emf.readonly,
org.eclipse.papyrus.infra.emf.readonly.internal;x-friends:="org.eclipse.papyrus.infra.ui.emf",
org.eclipse.papyrus.infra.emf.readonly.spi
-Require-Bundle: org.eclipse.papyrus.infra.onefile;bundle-version="1.2.0",
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.emf.workspace;bundle-version="1.4.0",
- org.eclipse.gmf.runtime.common.core;bundle-version="1.4.1",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf.gmf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.papyrus.infra.onefile;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.gmf.runtime.common.core;bundle-version="[1.7.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/pom.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/pom.xml
index ead630febec..c801f2cf18f 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/pom.xml
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.emf.readonly</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
+</project> \ No newline at end of file
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java
index 83d35ab9af5..45ca48d7724 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManager.java
@@ -1,589 +1,590 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2016 Atos Origin, CEA, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- * Christian W. Damus (CEA) - support non-IFile resources and object-level permissions (CDO)
- * Christian W. Damus (CEA) - bugs 323802, 429826, 422257, 437217
- * Christian W. Damus - bugs 457560, 463564, 485220
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.emf.readonly;
-
-import static org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis.permissionAxes;
-
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-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.IReadOnlyHandler2;
-import org.eclipse.papyrus.infra.core.resource.IReadOnlyListener;
-import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
-import org.eclipse.papyrus.infra.core.resource.ReadOnlyEvent;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-import com.google.common.collect.MapMaker;
-
-
-public class ReadOnlyManager implements IReadOnlyHandler2 {
-
- // Use weak values because the values otherwise retain the keys (indirectly)
- protected static final ConcurrentMap<EditingDomain, IReadOnlyHandler2> roHandlers = new MapMaker().weakKeys().weakValues().makeMap();
-
- private final CopyOnWriteArrayList<IReadOnlyListener> listeners = new CopyOnWriteArrayList<IReadOnlyListener>();
-
- private final ReadOnlyCache cache;
-
- private IReadOnlyListener forwardingListener;
-
- public static IReadOnlyHandler2 getReadOnlyHandler(EditingDomain editingDomain) {
- IReadOnlyHandler2 roHandler = IReadOnlyHandler2.NULL;
-
- if (editingDomain != null) {
- roHandler = roHandlers.get(editingDomain);
- if (roHandler == null) {
- roHandler = new ReadOnlyManager(editingDomain);
- process((ReadOnlyManager) roHandler, editingDomain);
- IReadOnlyHandler2 existing = roHandlers.putIfAbsent(editingDomain, roHandler);
- if (existing != null) {
- // Another thread beat us to it since we checked for an existing instance
- ((ReadOnlyManager) roHandler).cache.dispose();
- roHandler = existing;
- }
- }
- }
-
- return roHandler;
- }
-
- private static void process(ReadOnlyManager manager, EditingDomain domain) {
- Activator.getDefault().getReadOnlyManagerProcessors().forEach(p -> p.processReadOnlyManager(manager, domain));
- }
-
- protected static class HandlerPriorityPair implements Comparable<HandlerPriorityPair> {
-
- public Class<?> handlerClass;
-
- public int priority;
-
- public Set<ReadOnlyAxis> axes;
-
- @Override
- public int compareTo(HandlerPriorityPair o) {
- if (o.priority > priority) {
- return 1;
- } else if (o.priority < priority) {
- return -1;
- } else {
- return 0;
- }
- }
- }
-
- protected static final Map<Class<?>, Set<ReadOnlyAxis>> orderedHandlerClasses;
-
- static {
- IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.papyrus.infra.emf.readonly", "readOnlyHandler");
-
- List<HandlerPriorityPair> handlerPriorityPairs = new LinkedList<HandlerPriorityPair>();
- Map<String, HandlerPriorityPair> idMap = new HashMap<String, HandlerPriorityPair>();
-
- for (IConfigurationElement elem : configElements) {
- if ("readOnlyHandler".equals(elem.getName())) {
- try {
- HandlerPriorityPair handlerPriorityPair = new HandlerPriorityPair();
- String className = elem.getAttribute("class");
- handlerPriorityPair.handlerClass = Platform.getBundle(elem.getContributor().getName()).loadClass(className);
-
- handlerPriorityPair.priority = Integer.parseInt(elem.getAttribute("priority"));
-
- IConfigurationElement[] affinities = elem.getChildren("affinity");
- if ((affinities == null) || (affinities.length == 0)) {
- // implicit affinity is with any axis
- handlerPriorityPair.axes = ReadOnlyAxis.anyAxis();
- } else {
- handlerPriorityPair.axes = EnumSet.noneOf(ReadOnlyAxis.class);
- for (IConfigurationElement next : affinities) {
- handlerPriorityPair.axes.add(ReadOnlyAxis.valueOf(next.getAttribute("axis").toUpperCase()));
- }
- }
-
- String id = elem.getAttribute("id");
- if (id != null) {
- // if any then the handler could be overrided by another registration
- HandlerPriorityPair oldHandler = idMap.get(id);
- if (oldHandler == null) {
- idMap.put(id, handlerPriorityPair);
- handlerPriorityPairs.add(handlerPriorityPair);
- } else {
- if (oldHandler.priority < handlerPriorityPair.priority) {
- handlerPriorityPairs.remove(oldHandler);
- handlerPriorityPairs.add(handlerPriorityPair);
- }
- }
- } else {
- // If none the handler can not be overrided
- handlerPriorityPairs.add(handlerPriorityPair);
- }
- } catch (Throwable t) {
- // FIXME: We need to catch Throwables because we rely on external contributions. It is required to also catch Errors (such as compilation errors).
- // Move this code to an initialization method, because if a throwable is not caught, this will prevent the whole class initialization
- Activator.log.error(t);
- }
- }
- }
-
- Collections.sort(handlerPriorityPairs);
-
- orderedHandlerClasses = new LinkedHashMap<Class<?>, Set<ReadOnlyAxis>>();
-
- for (HandlerPriorityPair next : handlerPriorityPairs) {
- orderedHandlerClasses.put(next.handlerClass, next.axes);
- }
- }
-
-
- @SuppressWarnings("deprecation")
- protected static IReadOnlyHandler2 create(final Class<?> handlerClass, EditingDomain editingDomain) {
- boolean isEditingDomainConstructor = true;
- Constructor<?> constructor = null;
- try {
- constructor = handlerClass.getConstructor(EditingDomain.class);
- if (constructor == null) {
- isEditingDomainConstructor = false;
- constructor = handlerClass.getConstructor();
- }
-
- if (IReadOnlyHandler2.class.isAssignableFrom(constructor.getDeclaringClass())) {
- if (isEditingDomainConstructor) {
- return (IReadOnlyHandler2) constructor.newInstance(editingDomain);
- } else {
- return (IReadOnlyHandler2) constructor.newInstance();
- }
- } else if (IReadOnlyHandler.class.isAssignableFrom(constructor.getDeclaringClass())) {
- if (isEditingDomainConstructor) {
- return AbstractReadOnlyHandler.adapt((IReadOnlyHandler) constructor.newInstance(editingDomain), editingDomain);
- } else {
- return AbstractReadOnlyHandler.adapt((IReadOnlyHandler) constructor.newInstance(), editingDomain);
- }
- } else if (org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler.class.isAssignableFrom(constructor.getDeclaringClass())) {
- return new OldStyleHandlerAdapter((org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler) constructor.newInstance(), editingDomain);
- }
- } catch (Exception e) {
- }
-
- return null;
- }
-
- protected Map<ReadOnlyAxis, IReadOnlyHandler2[]> orderedHandlersByAxis;
-
- public ReadOnlyManager(final EditingDomain editingDomain) {
- // Create our transaction cache
- cache = ReadOnlyCache.create(this, Activator.getDefault().getReadOnlyCacheExecutor());
-
- final Map<ReadOnlyAxis, List<IReadOnlyHandler2>> handlers = new EnumMap<ReadOnlyAxis, List<IReadOnlyHandler2>>(ReadOnlyAxis.class);
- cache.run(new Runnable() {
-
- @Override
- public void run() {
- for (Map.Entry<Class<?>, Set<ReadOnlyAxis>> roClass : orderedHandlerClasses.entrySet()) {
- IReadOnlyHandler2 h = create(roClass.getKey(), editingDomain);
- if (h != null) {
- h.addReadOnlyListener(getForwardingListener());
-
- for (ReadOnlyAxis axis : roClass.getValue()) {
- List<IReadOnlyHandler2> list = handlers.get(axis);
- if (list == null) {
- list = new ArrayList<IReadOnlyHandler2>();
- handlers.put(axis, list);
- }
- list.add(h);
- }
- }
- }
- }
- });
-
- // Iterate the enumeration to make sure all axes are represented (even if only by an empty array)
- orderedHandlersByAxis = new EnumMap<ReadOnlyAxis, IReadOnlyHandler2[]>(ReadOnlyAxis.class);
- for (ReadOnlyAxis axis : ReadOnlyAxis.values()) {
- List<IReadOnlyHandler2> list = handlers.get(axis);
- if (list == null) {
- orderedHandlersByAxis.put(axis, new IReadOnlyHandler2[0]);
- } else {
- orderedHandlersByAxis.put(axis, list.toArray(new IReadOnlyHandler2[list.size()]));
- }
- }
- }
-
- @Override
- public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
- final Set<URI> uriSet = ImmutableSet.copyOf(uris);
- Optional<Boolean> result = cache.getResources(axes, uriSet);
- if (result == null) {
- result = Optional.absent();
-
- ReadOnlyAxis[] all = ReadOnlyAxis.values();
- for (int i = 0; (i < all.length) && !result.or(Boolean.FALSE); i++) {
- if (axes.contains(all[i])) {
- result = anyReadOnly(all[i], uris);
- }
- }
-
- cache.putResources(axes, uriSet, result);
- }
-
- return result.isPresent() ? result : Optional.of(Boolean.FALSE);
- }
-
- private Optional<Boolean> anyReadOnly(ReadOnlyAxis axis, URI[] uris) {
- final Set<URI> uriSet = ImmutableSet.copyOf(uris);
- Set<ReadOnlyAxis> axes = axis.singleton();
- Optional<Boolean> result = cache.getResources(axes, uriSet);
- if (result == null) {
- result = Optional.absent();
-
- IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
- for (int i = 0; (i < orderedHandlers.length) && !result.isPresent(); i++) {
- result = orderedHandlers[i].anyReadOnly(axes, uris);
- }
-
- cache.putResources(axes, uriSet, result);
- }
-
- return result.isPresent() ? result : Optional.of(Boolean.FALSE);
- }
-
- @Override
- public Optional<Boolean> isReadOnly(Set<ReadOnlyAxis> axes, EObject eObject) {
- Optional<Boolean> result = cache.getObject(axes, eObject);
- if (result == null) {
- result = Optional.absent();
-
- ReadOnlyAxis[] all = ReadOnlyAxis.values();
- for (int i = 0; (i < all.length) && !result.or(Boolean.FALSE); i++) {
- if (axes.contains(all[i])) {
- result = isReadOnly(all[i], eObject);
- }
- }
-
- cache.putObject(axes, eObject, result);
- }
-
- return result.isPresent() ? result : Optional.of(Boolean.FALSE);
- }
-
- private Optional<Boolean> isReadOnly(ReadOnlyAxis axis, EObject eObject) {
- Set<ReadOnlyAxis> axes = axis.singleton();
- Optional<Boolean> result = cache.getObject(axes, eObject);
- if (result == null) {
- result = Optional.absent();
-
- IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
- for (int i = 0; (i < orderedHandlers.length) && !result.isPresent(); i++) {
- result = orderedHandlers[i].isReadOnly(axes, eObject);
- }
-
- cache.putObject(axes, eObject, result);
- }
-
- return result.isPresent() ? result : Optional.of(Boolean.FALSE);
- }
-
- @Override
- public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
- Boolean finalResult = true;
-
- ReadOnlyAxis[] all = ReadOnlyAxis.values();
- for (int i = 0; (i < all.length) && finalResult; i++) {
- if (axes.contains(all[i])) {
- finalResult = makeWritable(all[i], uris);
- }
- }
-
- return Optional.of(finalResult);
- }
-
- private Boolean makeWritable(ReadOnlyAxis axis, URI[] uris) {
- Set<ReadOnlyAxis> axes = axis.singleton();
- Boolean finalResult = true;
-
- try {
- IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
- for (int i = 0; (i < orderedHandlers.length); i++) {
- Optional<Boolean> isRO = orderedHandlers[i].anyReadOnly(axes, uris);
- if (isRO.or(Boolean.FALSE)) {
- Optional<Boolean> result = orderedHandlers[i].makeWritable(axes, uris);
- // makeWritable should provide an answer since anyReadOnly returned a positive value.
- // If no answer consider it a failure
- if (!result.or(Boolean.FALSE)) {
- finalResult = false;
- break;
- }
- }
- }
- } finally {
- cache.clear();
- }
-
- return finalResult;
- }
-
- @Override
- public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, EObject eObject) {
- Boolean finalResult = true;
-
- ReadOnlyAxis[] all = ReadOnlyAxis.values();
- for (int i = 0; (i < all.length) && finalResult; i++) {
- if (axes.contains(all[i])) {
- finalResult = makeWritable(all[i], eObject);
- }
- }
-
- return Optional.of(finalResult);
- }
-
- private Boolean makeWritable(ReadOnlyAxis axis, EObject eObject) {
- Set<ReadOnlyAxis> axes = axis.singleton();
- Boolean finalResult = true;
-
- try {
- IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
- for (int i = 0; (i < orderedHandlers.length); i++) {
- Optional<Boolean> isRO = orderedHandlers[i].isReadOnly(axes, eObject);
- if (isRO.or(Boolean.FALSE)) {
- Optional<Boolean> result = orderedHandlers[i].makeWritable(axes, eObject);
- // makeWritable should provide an answer since anyReadOnly returned a positive value
- // if no answer consider it a failure
- if (!result.or(Boolean.FALSE)) {
- finalResult = false;
- break;
- }
- }
- }
- } finally {
- cache.clear();
- }
-
- return finalResult;
- }
-
- @Override
- public Optional<Boolean> canMakeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
- Boolean result = false;
-
- ReadOnlyAxis[] all = ReadOnlyAxis.values();
- for (int i = 0; (i < all.length) && !result; i++) {
- if (axes.contains(all[i])) {
- result = canMakeWritable(all[i], uris);
- }
- }
-
- return Optional.of(result);
- }
-
- private Boolean canMakeWritable(ReadOnlyAxis axis, URI[] uris) {
- Set<ReadOnlyAxis> axes = axis.singleton();
- Boolean result = false;
-
- IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
- for (int i = 0; (i < orderedHandlers.length); i++) {
- if (orderedHandlers[i].anyReadOnly(axes, uris).or(false)) {
- // Only ask a handler about making writable what it considers to be read-only
- Optional<Boolean> canMakeWritable = orderedHandlers[i].canMakeWritable(axes, uris);
- if (canMakeWritable.isPresent()) {
- result = canMakeWritable.get();
- break;
- }
- }
- }
-
- return result;
- }
-
- @Override
- public Optional<Boolean> canMakeWritable(Set<ReadOnlyAxis> axes, EObject object) {
- Boolean result = false;
-
- ReadOnlyAxis[] all = ReadOnlyAxis.values();
- for (int i = 0; (i < all.length) && !result; i++) {
- if (axes.contains(all[i])) {
- result = canMakeWritable(all[i], object);
- }
- }
-
- return Optional.of(result);
- }
-
- private Boolean canMakeWritable(ReadOnlyAxis axis, EObject object) {
- Set<ReadOnlyAxis> axes = axis.singleton();
- Boolean result = false;
-
- IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
- for (int i = 0; (i < orderedHandlers.length); i++) {
- if (orderedHandlers[i].isReadOnly(axes, object).or(false)) {
- // Only ask a handler about making writable what it considers to be read-only
- Optional<Boolean> canMakeWritable = orderedHandlers[i].canMakeWritable(axes, object);
- if (canMakeWritable.isPresent()) {
- result = canMakeWritable.get();
- break;
- }
- }
- }
-
- return result;
- }
-
- @Override
- public void addReadOnlyListener(IReadOnlyListener listener) {
- listeners.addIfAbsent(listener);
- }
-
- @Override
- public void removeReadOnlyListener(IReadOnlyListener listener) {
- listeners.remove(listener);
- }
-
- private IReadOnlyListener getForwardingListener() {
- if (forwardingListener == null) {
- forwardingListener = new IReadOnlyListener() {
-
- @Override
- public void readOnlyStateChanged(ReadOnlyEvent event) {
- ReadOnlyEvent myEvent;
-
- switch (event.getEventType()) {
- case ReadOnlyEvent.OBJECT_READ_ONLY_STATE_CHANGED:
- myEvent = new ReadOnlyEvent(ReadOnlyManager.this, event.getAxis(), event.getObject(), event.isReadOnly());
- break;
- default:
- myEvent = new ReadOnlyEvent(ReadOnlyManager.this, event.getAxis(), event.getResourceURI(), event.isReadOnly());
- break;
- }
-
- notifyReadOnlyStateChanged(myEvent);
- }
- };
- }
-
- return forwardingListener;
- }
-
- protected void notifyReadOnlyStateChanged(ReadOnlyEvent event) {
- if (!listeners.isEmpty()) {
- for (IReadOnlyListener next : listeners) {
- try {
- next.readOnlyStateChanged(event);
- } catch (Exception e) {
- Activator.log.error("Uncaught exception in read-only state change listener.", e); //$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- * Obtains a snapshot of the read-only handlers currently registered with me.
- *
- * @return my read-only handlers, by axis of affiliation. Changes to this collection
- * do not affect my registered handlers
- */
- public final Map<ReadOnlyAxis, Collection<IReadOnlyHandler2>> getReadOnlyHandlers() {
- Map<ReadOnlyAxis, Collection<IReadOnlyHandler2>> result = new HashMap<>();
-
- // Be sure not to provide lists that are actually backed by the arrays!
- orderedHandlersByAxis.forEach((axis, handlers) -> result.put(axis, Lists.newArrayList(handlers)));
-
- return result;
- }
-
- //
- // Deprecated API
- //
-
- @Override
- @Deprecated
- public Optional<Boolean> anyReadOnly(URI[] uris) {
- return anyReadOnly(permissionAxes(), uris);
- }
-
- @Override
- @Deprecated
- public Optional<Boolean> isReadOnly(EObject eObject) {
- return isReadOnly(permissionAxes(), eObject);
- }
-
- @Override
- @Deprecated
- public Optional<Boolean> makeWritable(URI[] uris) {
- return makeWritable(permissionAxes(), uris);
- }
-
- @Override
- @Deprecated
- public Optional<Boolean> makeWritable(EObject eObject) {
- return makeWritable(permissionAxes(), eObject);
- }
-
- //
- // Legacy adapters
- //
-
- @SuppressWarnings("deprecation")
- private static final class OldStyleHandlerAdapter extends AbstractReadOnlyHandler {
-
- private final org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler delegate;
-
- OldStyleHandlerAdapter(org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler handler, EditingDomain editingDomain) {
- super(editingDomain);
-
- this.delegate = handler;
- }
-
- @Override
- public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
-
- // the old API contract is that handlers only return true if they
- // know it to be true, because the manager takes the first positive
- // answer. Moreover, they only dealt with permission-based read-only-ness
- boolean delegateResult = axes.contains(ReadOnlyAxis.PERMISSION) && delegate.isReadOnly(uris, getEditingDomain());
- return delegateResult ? Optional.of(Boolean.TRUE) : Optional.<Boolean> absent();
- }
-
- @Override
- public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
-
- // the old API contract is that handlers only return false if they
- // tried to but could not make the resources writable, because the
- // manager takes the first negative answer (this is opposite to the
- // isReadOnly logic). Moreover, they only dealt with permission-based
- // read-only-ness
- boolean delegateResult = axes.contains(ReadOnlyAxis.PERMISSION) && delegate.enableWrite(uris, getEditingDomain());
- return delegateResult ? Optional.<Boolean> absent() : Optional.of(Boolean.FALSE);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 Atos Origin, CEA, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
+ * Christian W. Damus (CEA) - support non-IFile resources and object-level permissions (CDO)
+ * Christian W. Damus (CEA) - bugs 323802, 429826, 422257, 437217
+ * Christian W. Damus - bugs 457560, 463564, 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.readonly;
+
+import static org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis.permissionAxes;
+
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+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.IReadOnlyHandler2;
+import org.eclipse.papyrus.infra.core.resource.IReadOnlyListener;
+import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
+import org.eclipse.papyrus.infra.core.resource.ReadOnlyEvent;
+
+import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import com.google.common.collect.MapMaker;
+
+
+public class ReadOnlyManager implements IReadOnlyHandler2 {
+
+ // Use weak values because the values otherwise retain the keys (indirectly)
+ protected static final ConcurrentMap<EditingDomain, IReadOnlyHandler2> roHandlers = new MapMaker().weakKeys().weakValues().makeMap();
+
+ private final CopyOnWriteArrayList<IReadOnlyListener> listeners = new CopyOnWriteArrayList<IReadOnlyListener>();
+
+ private final ReadOnlyCache cache;
+
+ private IReadOnlyListener forwardingListener;
+
+ public static IReadOnlyHandler2 getReadOnlyHandler(EditingDomain editingDomain) {
+ IReadOnlyHandler2 roHandler = IReadOnlyHandler2.NULL;
+
+ if (editingDomain != null) {
+ roHandler = roHandlers.get(editingDomain);
+ if (roHandler == null) {
+ roHandler = new ReadOnlyManager(editingDomain);
+ process((ReadOnlyManager) roHandler, editingDomain);
+ IReadOnlyHandler2 existing = roHandlers.putIfAbsent(editingDomain, roHandler);
+ if (existing != null) {
+ // Another thread beat us to it since we checked for an existing instance
+ ((ReadOnlyManager) roHandler).cache.dispose();
+ roHandler = existing;
+ }
+ }
+ }
+
+ return roHandler;
+ }
+
+ private static void process(ReadOnlyManager manager, EditingDomain domain) {
+ Activator.getDefault().getReadOnlyManagerProcessors().forEach(p -> p.processReadOnlyManager(manager, domain));
+ }
+
+ protected static class HandlerPriorityPair implements Comparable<HandlerPriorityPair> {
+
+ public Class<?> handlerClass;
+
+ public int priority;
+
+ public Set<ReadOnlyAxis> axes;
+
+ @Override
+ public int compareTo(HandlerPriorityPair o) {
+ if (o.priority > priority) {
+ return 1;
+ } else if (o.priority < priority) {
+ return -1;
+ } else {
+ return 0;
+ }
+ }
+ }
+
+ protected static final Map<Class<?>, Set<ReadOnlyAxis>> orderedHandlerClasses;
+
+ static {
+ IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.papyrus.infra.emf.readonly", "readOnlyHandler");
+
+ List<HandlerPriorityPair> handlerPriorityPairs = new LinkedList<HandlerPriorityPair>();
+ Map<String, HandlerPriorityPair> idMap = new HashMap<String, HandlerPriorityPair>();
+
+ for (IConfigurationElement elem : configElements) {
+ if ("readOnlyHandler".equals(elem.getName())) {
+ try {
+ HandlerPriorityPair handlerPriorityPair = new HandlerPriorityPair();
+ String className = elem.getAttribute("class");
+ handlerPriorityPair.handlerClass = Platform.getBundle(elem.getContributor().getName()).loadClass(className);
+
+ handlerPriorityPair.priority = Integer.parseInt(elem.getAttribute("priority"));
+
+ IConfigurationElement[] affinities = elem.getChildren("affinity");
+ if ((affinities == null) || (affinities.length == 0)) {
+ // implicit affinity is with any axis
+ handlerPriorityPair.axes = ReadOnlyAxis.anyAxis();
+ } else {
+ handlerPriorityPair.axes = EnumSet.noneOf(ReadOnlyAxis.class);
+ for (IConfigurationElement next : affinities) {
+ handlerPriorityPair.axes.add(ReadOnlyAxis.valueOf(next.getAttribute("axis").toUpperCase()));
+ }
+ }
+
+ String id = elem.getAttribute("id");
+ if (id != null) {
+ // if any then the handler could be overrided by another registration
+ HandlerPriorityPair oldHandler = idMap.get(id);
+ if (oldHandler == null) {
+ idMap.put(id, handlerPriorityPair);
+ handlerPriorityPairs.add(handlerPriorityPair);
+ } else {
+ if (oldHandler.priority < handlerPriorityPair.priority) {
+ handlerPriorityPairs.remove(oldHandler);
+ handlerPriorityPairs.add(handlerPriorityPair);
+ }
+ }
+ } else {
+ // If none the handler can not be overrided
+ handlerPriorityPairs.add(handlerPriorityPair);
+ }
+ } catch (Throwable t) {
+ // FIXME: We need to catch Throwables because we rely on external contributions. It is required to also catch Errors (such as compilation errors).
+ // Move this code to an initialization method, because if a throwable is not caught, this will prevent the whole class initialization
+ Activator.log.error(t);
+ }
+ }
+ }
+
+ Collections.sort(handlerPriorityPairs);
+
+ orderedHandlerClasses = new LinkedHashMap<Class<?>, Set<ReadOnlyAxis>>();
+
+ for (HandlerPriorityPair next : handlerPriorityPairs) {
+ orderedHandlerClasses.put(next.handlerClass, next.axes);
+ }
+ }
+
+
+ @SuppressWarnings("deprecation")
+ protected static IReadOnlyHandler2 create(final Class<?> handlerClass, EditingDomain editingDomain) {
+ boolean isEditingDomainConstructor = true;
+ Constructor<?> constructor = null;
+ try {
+ constructor = handlerClass.getConstructor(EditingDomain.class);
+ if (constructor == null) {
+ isEditingDomainConstructor = false;
+ constructor = handlerClass.getConstructor();
+ }
+
+ if (IReadOnlyHandler2.class.isAssignableFrom(constructor.getDeclaringClass())) {
+ if (isEditingDomainConstructor) {
+ return (IReadOnlyHandler2) constructor.newInstance(editingDomain);
+ } else {
+ return (IReadOnlyHandler2) constructor.newInstance();
+ }
+ } else if (IReadOnlyHandler.class.isAssignableFrom(constructor.getDeclaringClass())) {
+ if (isEditingDomainConstructor) {
+ return AbstractReadOnlyHandler.adapt((IReadOnlyHandler) constructor.newInstance(editingDomain), editingDomain);
+ } else {
+ return AbstractReadOnlyHandler.adapt((IReadOnlyHandler) constructor.newInstance(), editingDomain);
+ }
+ } else if (org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler.class.isAssignableFrom(constructor.getDeclaringClass())) {
+ return new OldStyleHandlerAdapter((org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler) constructor.newInstance(), editingDomain);
+ }
+ } catch (Exception e) {
+ }
+
+ return null;
+ }
+
+ protected Map<ReadOnlyAxis, IReadOnlyHandler2[]> orderedHandlersByAxis;
+
+ public ReadOnlyManager(final EditingDomain editingDomain) {
+ // Create our transaction cache
+ cache = ReadOnlyCache.create(this, Activator.getDefault().getReadOnlyCacheExecutor());
+
+ final Map<ReadOnlyAxis, List<IReadOnlyHandler2>> handlers = new EnumMap<ReadOnlyAxis, List<IReadOnlyHandler2>>(ReadOnlyAxis.class);
+ cache.run(new Runnable() {
+
+ @Override
+ public void run() {
+ for (Map.Entry<Class<?>, Set<ReadOnlyAxis>> roClass : orderedHandlerClasses.entrySet()) {
+ IReadOnlyHandler2 h = create(roClass.getKey(), editingDomain);
+ if (h != null) {
+ h.addReadOnlyListener(getForwardingListener());
+
+ for (ReadOnlyAxis axis : roClass.getValue()) {
+ List<IReadOnlyHandler2> list = handlers.get(axis);
+ if (list == null) {
+ list = new ArrayList<IReadOnlyHandler2>();
+ handlers.put(axis, list);
+ }
+ list.add(h);
+ }
+ }
+ }
+ }
+ });
+
+ // Iterate the enumeration to make sure all axes are represented (even if only by an empty array)
+ orderedHandlersByAxis = new EnumMap<ReadOnlyAxis, IReadOnlyHandler2[]>(ReadOnlyAxis.class);
+ for (ReadOnlyAxis axis : ReadOnlyAxis.values()) {
+ List<IReadOnlyHandler2> list = handlers.get(axis);
+ if (list == null) {
+ orderedHandlersByAxis.put(axis, new IReadOnlyHandler2[0]);
+ } else {
+ orderedHandlersByAxis.put(axis, list.toArray(new IReadOnlyHandler2[list.size()]));
+ }
+ }
+ }
+
+ @Override
+ public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
+ final Set<URI> uriSet = ImmutableSet.copyOf(uris);
+ Optional<Boolean> result = cache.getResources(axes, uriSet);
+ if (result == null) {
+ result = Optional.absent();
+
+ ReadOnlyAxis[] all = ReadOnlyAxis.values();
+ for (int i = 0; (i < all.length) && !result.or(Boolean.FALSE); i++) {
+ if (axes.contains(all[i])) {
+ result = anyReadOnly(all[i], uris);
+ }
+ }
+
+ cache.putResources(axes, uriSet, result);
+ }
+
+ return result.isPresent() ? result : Optional.of(Boolean.FALSE);
+ }
+
+ private Optional<Boolean> anyReadOnly(ReadOnlyAxis axis, URI[] uris) {
+ final Set<URI> uriSet = ImmutableSet.copyOf(uris);
+ Set<ReadOnlyAxis> axes = axis.singleton();
+ Optional<Boolean> result = cache.getResources(axes, uriSet);
+ if (result == null) {
+ result = Optional.absent();
+
+ IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
+ for (int i = 0; (i < orderedHandlers.length) && !result.isPresent(); i++) {
+ result = orderedHandlers[i].anyReadOnly(axes, uris);
+ }
+
+ cache.putResources(axes, uriSet, result);
+ }
+
+ return result.isPresent() ? result : Optional.of(Boolean.FALSE);
+ }
+
+ @Override
+ public Optional<Boolean> isReadOnly(Set<ReadOnlyAxis> axes, EObject eObject) {
+ Optional<Boolean> result = cache.getObject(axes, eObject);
+ if (result == null) {
+ result = Optional.absent();
+
+ ReadOnlyAxis[] all = ReadOnlyAxis.values();
+ for (int i = 0; (i < all.length) && !result.or(Boolean.FALSE); i++) {
+ if (axes.contains(all[i])) {
+ result = isReadOnly(all[i], eObject);
+ }
+ }
+
+ cache.putObject(axes, eObject, result);
+ }
+
+ return result.isPresent() ? result : Optional.of(Boolean.FALSE);
+ }
+
+ private Optional<Boolean> isReadOnly(ReadOnlyAxis axis, EObject eObject) {
+ Set<ReadOnlyAxis> axes = axis.singleton();
+ Optional<Boolean> result = cache.getObject(axes, eObject);
+ if (result == null) {
+ result = Optional.absent();
+
+ IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
+ for (int i = 0; (i < orderedHandlers.length) && !result.isPresent(); i++) {
+ result = orderedHandlers[i].isReadOnly(axes, eObject);
+ }
+
+ cache.putObject(axes, eObject, result);
+ }
+
+ return result.isPresent() ? result : Optional.of(Boolean.FALSE);
+ }
+
+ @Override
+ public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
+ Boolean finalResult = true;
+
+ ReadOnlyAxis[] all = ReadOnlyAxis.values();
+ for (int i = 0; (i < all.length) && finalResult; i++) {
+ if (axes.contains(all[i])) {
+ finalResult = makeWritable(all[i], uris);
+ }
+ }
+
+ return Optional.of(finalResult);
+ }
+
+ private Boolean makeWritable(ReadOnlyAxis axis, URI[] uris) {
+ Set<ReadOnlyAxis> axes = axis.singleton();
+ Boolean finalResult = true;
+
+ try {
+ IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
+ for (int i = 0; (i < orderedHandlers.length); i++) {
+ Optional<Boolean> isRO = orderedHandlers[i].anyReadOnly(axes, uris);
+ if (isRO.or(Boolean.FALSE)) {
+ Optional<Boolean> result = orderedHandlers[i].makeWritable(axes, uris);
+ // makeWritable should provide an answer since anyReadOnly returned a positive value.
+ // If no answer consider it a failure
+ if (!result.or(Boolean.FALSE)) {
+ finalResult = false;
+ break;
+ }
+ }
+ }
+ } finally {
+ cache.clear();
+ }
+
+ return finalResult;
+ }
+
+ @Override
+ public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, EObject eObject) {
+ Boolean finalResult = true;
+
+ ReadOnlyAxis[] all = ReadOnlyAxis.values();
+ for (int i = 0; (i < all.length) && finalResult; i++) {
+ if (axes.contains(all[i])) {
+ finalResult = makeWritable(all[i], eObject);
+ }
+ }
+
+ return Optional.of(finalResult);
+ }
+
+ private Boolean makeWritable(ReadOnlyAxis axis, EObject eObject) {
+ Set<ReadOnlyAxis> axes = axis.singleton();
+ Boolean finalResult = true;
+
+ try {
+ IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
+ for (int i = 0; (i < orderedHandlers.length); i++) {
+ Optional<Boolean> isRO = orderedHandlers[i].isReadOnly(axes, eObject);
+ if (isRO.or(Boolean.FALSE)) {
+ Optional<Boolean> result = orderedHandlers[i].makeWritable(axes, eObject);
+ // makeWritable should provide an answer since anyReadOnly returned a positive value
+ // if no answer consider it a failure
+ if (!result.or(Boolean.FALSE)) {
+ finalResult = false;
+ break;
+ }
+ }
+ }
+ } finally {
+ cache.clear();
+ }
+
+ return finalResult;
+ }
+
+ @Override
+ public Optional<Boolean> canMakeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
+ Boolean result = false;
+
+ ReadOnlyAxis[] all = ReadOnlyAxis.values();
+ for (int i = 0; (i < all.length) && !result; i++) {
+ if (axes.contains(all[i])) {
+ result = canMakeWritable(all[i], uris);
+ }
+ }
+
+ return Optional.of(result);
+ }
+
+ private Boolean canMakeWritable(ReadOnlyAxis axis, URI[] uris) {
+ Set<ReadOnlyAxis> axes = axis.singleton();
+ Boolean result = false;
+
+ IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
+ for (int i = 0; (i < orderedHandlers.length); i++) {
+ if (orderedHandlers[i].anyReadOnly(axes, uris).or(false)) {
+ // Only ask a handler about making writable what it considers to be read-only
+ Optional<Boolean> canMakeWritable = orderedHandlers[i].canMakeWritable(axes, uris);
+ if (canMakeWritable.isPresent()) {
+ result = canMakeWritable.get();
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Optional<Boolean> canMakeWritable(Set<ReadOnlyAxis> axes, EObject object) {
+ Boolean result = false;
+
+ ReadOnlyAxis[] all = ReadOnlyAxis.values();
+ for (int i = 0; (i < all.length) && !result; i++) {
+ if (axes.contains(all[i])) {
+ result = canMakeWritable(all[i], object);
+ }
+ }
+
+ return Optional.of(result);
+ }
+
+ private Boolean canMakeWritable(ReadOnlyAxis axis, EObject object) {
+ Set<ReadOnlyAxis> axes = axis.singleton();
+ Boolean result = false;
+
+ IReadOnlyHandler2[] orderedHandlers = orderedHandlersByAxis.get(axis);
+ for (int i = 0; (i < orderedHandlers.length); i++) {
+ if (orderedHandlers[i].isReadOnly(axes, object).or(false)) {
+ // Only ask a handler about making writable what it considers to be read-only
+ Optional<Boolean> canMakeWritable = orderedHandlers[i].canMakeWritable(axes, object);
+ if (canMakeWritable.isPresent()) {
+ result = canMakeWritable.get();
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public void addReadOnlyListener(IReadOnlyListener listener) {
+ listeners.addIfAbsent(listener);
+ }
+
+ @Override
+ public void removeReadOnlyListener(IReadOnlyListener listener) {
+ listeners.remove(listener);
+ }
+
+ private IReadOnlyListener getForwardingListener() {
+ if (forwardingListener == null) {
+ forwardingListener = new IReadOnlyListener() {
+
+ @Override
+ public void readOnlyStateChanged(ReadOnlyEvent event) {
+ ReadOnlyEvent myEvent;
+
+ switch (event.getEventType()) {
+ case ReadOnlyEvent.OBJECT_READ_ONLY_STATE_CHANGED:
+ myEvent = new ReadOnlyEvent(ReadOnlyManager.this, event.getAxis(), event.getObject(), event.isReadOnly());
+ break;
+ default:
+ myEvent = new ReadOnlyEvent(ReadOnlyManager.this, event.getAxis(), event.getResourceURI(), event.isReadOnly());
+ break;
+ }
+
+ notifyReadOnlyStateChanged(myEvent);
+ }
+ };
+ }
+
+ return forwardingListener;
+ }
+
+ protected void notifyReadOnlyStateChanged(ReadOnlyEvent event) {
+ if (!listeners.isEmpty()) {
+ for (IReadOnlyListener next : listeners) {
+ try {
+ next.readOnlyStateChanged(event);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in read-only state change listener.", e); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ /**
+ * Obtains a snapshot of the read-only handlers currently registered with me.
+ *
+ * @return my read-only handlers, by axis of affiliation. Changes to this collection
+ * do not affect my registered handlers
+ * @since 2.0
+ */
+ public final Map<ReadOnlyAxis, Collection<IReadOnlyHandler2>> getReadOnlyHandlers() {
+ Map<ReadOnlyAxis, Collection<IReadOnlyHandler2>> result = new HashMap<>();
+
+ // Be sure not to provide lists that are actually backed by the arrays!
+ orderedHandlersByAxis.forEach((axis, handlers) -> result.put(axis, Lists.newArrayList(handlers)));
+
+ return result;
+ }
+
+ //
+ // Deprecated API
+ //
+
+ @Override
+ @Deprecated
+ public Optional<Boolean> anyReadOnly(URI[] uris) {
+ return anyReadOnly(permissionAxes(), uris);
+ }
+
+ @Override
+ @Deprecated
+ public Optional<Boolean> isReadOnly(EObject eObject) {
+ return isReadOnly(permissionAxes(), eObject);
+ }
+
+ @Override
+ @Deprecated
+ public Optional<Boolean> makeWritable(URI[] uris) {
+ return makeWritable(permissionAxes(), uris);
+ }
+
+ @Override
+ @Deprecated
+ public Optional<Boolean> makeWritable(EObject eObject) {
+ return makeWritable(permissionAxes(), eObject);
+ }
+
+ //
+ // Legacy adapters
+ //
+
+ @SuppressWarnings("deprecation")
+ private static final class OldStyleHandlerAdapter extends AbstractReadOnlyHandler {
+
+ private final org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler delegate;
+
+ OldStyleHandlerAdapter(org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler handler, EditingDomain editingDomain) {
+ super(editingDomain);
+
+ this.delegate = handler;
+ }
+
+ @Override
+ public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
+
+ // the old API contract is that handlers only return true if they
+ // know it to be true, because the manager takes the first positive
+ // answer. Moreover, they only dealt with permission-based read-only-ness
+ boolean delegateResult = axes.contains(ReadOnlyAxis.PERMISSION) && delegate.isReadOnly(uris, getEditingDomain());
+ return delegateResult ? Optional.of(Boolean.TRUE) : Optional.<Boolean> absent();
+ }
+
+ @Override
+ public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
+
+ // the old API contract is that handlers only return false if they
+ // tried to but could not make the resources writable, because the
+ // manager takes the first negative answer (this is opposite to the
+ // isReadOnly logic). Moreover, they only dealt with permission-based
+ // read-only-ness
+ boolean delegateResult = axes.contains(ReadOnlyAxis.PERMISSION) && delegate.enableWrite(uris, getEditingDomain());
+ return delegateResult ? Optional.<Boolean> absent() : Optional.of(Boolean.FALSE);
+ }
+ }
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/spi/IReadOnlyManagerProcessor.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/spi/IReadOnlyManagerProcessor.java
index e56620c8fec..9fa0c779ada 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/spi/IReadOnlyManagerProcessor.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/spi/IReadOnlyManagerProcessor.java
@@ -18,7 +18,7 @@ import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager;
/**
* <p>
- * An OSGi service interface for hooks to process the a new {@link ReadOnlyManager}
+ * An OSGi service interface for hooks to process a new {@link ReadOnlyManager}
* upon its creation. There is no special provision for notification of when the
* manager is no longer being used.
* </p>
@@ -26,6 +26,8 @@ import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager;
* Any number of of implementations of this service may be registered; all will be
* invoked for each read-only manager.
* </p>
+ *
+ * @since 2.0
*/
@FunctionalInterface
public interface IReadOnlyManagerProcessor {
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/.project
index 739a883bc87..6d2edc9f146 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/.project
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/.project
@@ -20,9 +20,27 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/META-INF/MANIFEST.MF
index f1b58b7d9dd..eb196ce4666 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/META-INF/MANIFEST.MF
@@ -2,25 +2,14 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.types.ui;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.papyrus.infra.emf.types.ui.advices.values.provider.RuntimeValuesAdviceEditPlugin$Implementation
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.papyrus.infra.constraints;visibility:=reexport,
- org.eclipse.papyrus.infra.types;visibility:=reexport,
- org.eclipse.papyrus.infra.types.core;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.papyrus.infra.properties;visibility:=reexport,
- org.eclipse.emf.edit;visibility:=reexport,
- org.eclipse.papyrus.infra.constraints.edit;visibility:=reexport,
- org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.papyrus.infra.types.edit;visibility:=reexport,
- org.eclipse.papyrus.infra.properties.edit;visibility:=reexport,
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.9.0",
- org.eclipse.papyrus.views.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.papyrus.infra.types.core;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.types.edit;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.properties.edit;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.views.properties;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[1.2.0,2.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/pom.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/pom.xml
index d7e09280b23..4debef138e1 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/pom.xml
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types.ui/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.emf.types.ui</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/.project
index 6c62ecfe762..2270d511be4 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/.project
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/.project
@@ -1,28 +1,46 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.emf.types</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf.types</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/META-INF/MANIFEST.MF
index d56fcb5df95..76a601a2ec2 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/META-INF/MANIFEST.MF
@@ -1,43 +1,27 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.papyrus.infra.types;visibility:=reexport,
- org.eclipse.papyrus.infra.types.rulebased;visibility:=reexport,
- org.eclipse.papyrus.infra.constraints;visibility:=reexport,
- org.eclipse.papyrus.infra.types;visibility:=reexport,
- org.eclipse.uml2.uml;visibility:=reexport,
- org.eclipse.uml2.types;visibility:=reexport,
- org.eclipse.papyrus.infra.properties;visibility:=reexport,
- org.eclipse.papyrus.infra.types.rulebased;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.emf.edit;visibility:=reexport,
- org.eclipse.papyrus.infra.constraints.edit;visibility:=reexport,
- org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.papyrus.infra.types.edit;visibility:=reexport,
- org.eclipse.papyrus.infra.properties.edit;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.uml2.uml.edit;visibility:=reexport,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
- org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0"
-Export-Package: org.eclipse.papyrus.infra.emf.types,
- org.eclipse.papyrus.infra.emf.types.advices.values,
- org.eclipse.papyrus.infra.emf.types.advices.values.impl,
- org.eclipse.papyrus.infra.emf.types.advices.values.provider,
- org.eclipse.papyrus.infra.emf.types.advices.values.util,
- org.eclipse.papyrus.infra.emf.types.converter,
- org.eclipse.papyrus.infra.emf.types.rules.container,
- org.eclipse.papyrus.infra.emf.types.rules.container.impl,
- org.eclipse.papyrus.infra.emf.types.rules.container.provider,
- org.eclipse.papyrus.infra.emf.types.rules.container.util
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.infra.emf.types.rules.container.provider.InvariantContainerRuleEditPlugin$Implementation
-Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.types;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.types.rulebased;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.types.rulebased;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.properties.edit;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.uml2.uml.edit;bundle-version="[5.1.0,6.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.core.databinding;bundle-version="[1.6.0,2.0.0)";visibility:=reexport
+Export-Package: org.eclipse.papyrus.infra.emf.types,
+ org.eclipse.papyrus.infra.emf.types.advices.values,
+ org.eclipse.papyrus.infra.emf.types.advices.values.impl,
+ org.eclipse.papyrus.infra.emf.types.advices.values.provider,
+ org.eclipse.papyrus.infra.emf.types.advices.values.util,
+ org.eclipse.papyrus.infra.emf.types.converter,
+ org.eclipse.papyrus.infra.emf.types.rules.container,
+ org.eclipse.papyrus.infra.emf.types.rules.container.impl,
+ org.eclipse.papyrus.infra.emf.types.rules.container.provider,
+ org.eclipse.papyrus.infra.emf.types.rules.container.util
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 2.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.emf.types.rules.container.provider.InvariantContainerRuleEditPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.types;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/pom.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/pom.xml
index a3299c0e10a..ea2d92d93e0 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/pom.xml
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.types/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.emf.types</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.project
index 2e261c7b71c..a79b6ba3e7f 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.project
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.project
@@ -1,28 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.emf</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
index f79d3178a14..ea5faf931d5 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
@@ -1,28 +1,24 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.emf,
- org.eclipse.papyrus.infra.emf.adapters,
- org.eclipse.papyrus.infra.emf.advice,
- org.eclipse.papyrus.infra.emf.commands,
- org.eclipse.papyrus.infra.emf.edit.domain,
- org.eclipse.papyrus.infra.emf.requests,
- org.eclipse.papyrus.infra.emf.resource,
- org.eclipse.papyrus.infra.emf.resource.index,
- org.eclipse.papyrus.infra.emf.spi.resolver,
- org.eclipse.papyrus.infra.emf.utils
-Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.core.expressions;bundle-version="3.4.400",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: EMF Tools
-Bundle-Activator: org.eclipse.papyrus.infra.emf.Activator
-Bundle-ManifestVersion: 2
-Bundle-Description: %pluginDescription
-Bundle-SymbolicName: org.eclipse.papyrus.infra.emf;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.emf,
+ org.eclipse.papyrus.infra.emf.adapters,
+ org.eclipse.papyrus.infra.emf.advice,
+ org.eclipse.papyrus.infra.emf.commands,
+ org.eclipse.papyrus.infra.emf.edit.domain,
+ org.eclipse.papyrus.infra.emf.requests,
+ org.eclipse.papyrus.infra.emf.resource,
+ org.eclipse.papyrus.infra.emf.resource.index,
+ org.eclipse.papyrus.infra.emf.spi.resolver,
+ org.eclipse.papyrus.infra.emf.utils
+Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.core.expressions;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.9.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="[1.2.0,2.0.0)";visibility:=reexport
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.0.0.qualifier
+Bundle-Name: EMF Tools
+Bundle-Activator: org.eclipse.papyrus.infra.emf.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.infra.emf;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/pom.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/pom.xml
index cc4360ddd2d..afbd61aedc8 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/pom.xml
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.emf</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
+</project> \ No newline at end of file
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java
index a3c0e69cc06..0698bdea266 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java
@@ -121,6 +121,7 @@ public class Activator extends Plugin {
* Obtain the instance of the {@link EObject} resolver service, if any.
*
* @return the object resolver service (never {@code null} while this bundle is active)
+ * @since 2.0
*/
public IEObjectResolver getEObjectResolver() {
return resolverService;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/EObjectResolverService.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/EObjectResolverService.java
index dd9f1e67d95..1892e863144 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/EObjectResolverService.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/EObjectResolverService.java
@@ -19,6 +19,8 @@ import org.osgi.framework.BundleContext;
/**
* A resolver that delegates to registered OSGi services in a <em>Chain of Command</em>
* pattern to provide the first available service result.
+ *
+ * @since 2.0
*/
public class EObjectResolverService implements IEObjectResolver {
private final CompositeServiceTracker<IEObjectResolver> tracker;
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/IEObjectResolver.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/IEObjectResolver.java
index 8f968d2db5e..82bf50aacb0 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/IEObjectResolver.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/spi/resolver/IEObjectResolver.java
@@ -20,6 +20,8 @@ import org.eclipse.emf.ecore.EObject;
* A service interface for resolution of the {@linkplain EObject EMF object} wrapped
* in an EMF Facet content-provider node or anything else that doesn't implement
* the usual {@link IAdaptable} protocol with respect to provision of an {@link EObject}.
+ *
+ * @since 2.0
*/
@FunctionalInterface
public interface IEObjectResolver {
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java
index feef59d314d..bd806fec1c2 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java
@@ -1,1122 +1,1124 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - filter out EObjects that are Resources (CDO)
- * Christian W. Damus (CEA) - Support read-only state at object level (CDO)
- * Christian W. Damus (CEA) - bugs 323802, 429826, 408491, 432813, 422257
- * Christian W. Damus - bugs 469188, 485220
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.emf.utils;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.URIConverter;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler;
-import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
-import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.Activator;
-import org.eclipse.papyrus.infra.tools.util.PlatformHelper;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-
-/**
- * A Helper class for manipulating EMF Objects
- *
- * @author Camille Letavernier
- */
-// TODO : Check implementations. Most of them are old and don't always match the specification
-public class EMFHelper {
-
- /**
- * Returns the EClass corresponding to the given nsUri and className
- *
- * @param nsUri
- * The NSURI of the EClass' EPackage
- * @param className
- * The EClass' name
- * @return
- * The EClass instance, or null if the EClass couldn't be found
- */
- public static EClass getEClass(final String nsUri, final String className) {
- EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(nsUri);
- if (ePackage == null) {
- Activator.log.warn("Cannot find an EPackage matching the nsURI " + nsUri); //$NON-NLS-1$
- return null;
- }
- return getEClass(ePackage, className);
- }
-
- /**
- * Return the EClass corresponding to the given EPackage and className
- *
- * @param metamodel
- * The EClass' EPackage
- * @param className
- * The EClass' name
- * @return
- * The EClass instance, or null if the EClass couldn't be found
- */
- public static EClass getEClass(final EPackage metamodel, final String className) {
- EClassifier classifier = metamodel.getEClassifier(className);
- if (classifier == null) {
- Activator.log.warn("Classifier " + className + " not found in metamodel " + metamodel.getName() + " (" + metamodel.getNsURI() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- if (classifier instanceof EClass) {
- return (EClass) classifier;
- } else {
- Activator.log.warn("Classifier " + className + " in " + metamodel.getName() + " (" + metamodel.getNsURI() + ") is not an EClass"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- return null;
- }
-
- /**
- * Tests if an Object is an instance of the given EClass
- *
- * @param element
- * The EObject to test
- * @param className
- * The name of the EClass
- * @param metamodel
- * The EPackage owning the EClass
- * @return
- * True if the EObject is an instance of the EClass, or of one of the EClass' subtypes
- */
- public static boolean isInstance(final EObject element, final String className, final EPackage metamodel) {
-
- EClassifier theClass = metamodel.getEClassifier(className);
-
- if (theClass == null) {
- String message = String.format("Class %s not found in metamodel: %s (%s)", className, metamodel.getName(), metamodel.getNsURI());//$NON-NLS-1$
- Activator.log.warn(message);
- return false;
- }
-
- return theClass.isInstance(element);
- }
-
-
- /**
- * Tests if an Object is an instance of the given EClass
- *
- * @param element
- * The EObject to test
- * @param className
- * The name of the EClass
- * @param metamodel
- * The URI of the EPackage owning the EClass
- * @return
- * True if the EObject is an instance of the EClass, or of one of the EClass' subtypes
- */
- public static boolean isInstance(EObject selectedItem, String className, String nsUri) {
- EClass actualEClass = selectedItem.eClass();
-
- // Exact match
- if (isExactMatch(actualEClass, className, nsUri)) {
- return true;
- }
-
- List<EClass> allSuperTypes = actualEClass.getEAllSuperTypes();
- for (EClass eClass : allSuperTypes) {
- if (isExactMatch(eClass, className, nsUri)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Tests whether the given EClass has the given className and belongs to the EPackage represented by nsUri
- *
- * @param eClass
- * The EClass to test
- * @param className
- *
- * @param nsUri
- * @return
- * True if the EClass' name is className and the EClass' EPackage's nsURI is nsUri
- */
- private static boolean isExactMatch(EClass eClass, String className, String nsUri) {
- return className.equals(eClass.getName()) && nsUri.equals(eClass.getEPackage().getNsURI());
- }
-
- /**
- * Tests if the given eClass is a Subclass of fromClass
- * Also returns true when eClass == fromClass
- *
- * @param eClass
- * @param fromClass
- * @return
- * true if eClass is a subclass of fromClass
- */
- public static boolean isSubclass(final EClass eClass, final EClass fromClass) {
- // Everything is an EObject
- if (eClass != null && fromClass == EcorePackage.eINSTANCE.getEObject()) {
- return true;
- }
-
- if (eClass == fromClass) {
- return true;
- }
-
- List<EClass> superTypes = eClass.getEAllSuperTypes();
- if (superTypes.contains(fromClass)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Returns the EObject corresponding to the input object
- * Tests if the input is an EObject, or if it is Adaptable
- * to an EObject
- *
- * @param source
- * @return An EObject corresponding to the input source, or null
- * if the EObject could not be resolved
- */
- public static EObject getEObject(final Object source) {
-
- // Support for EMF 0.2 CustomizedTree: The TreeElements are IAdaptable, but the
- // EObject adapter for some of them (e.g. reference node) is not what we need
- Object resolved = Activator.getDefault().getEObjectResolver().resolve(source);
- if ((resolved != source) && isEMFModelElement(resolved)) {
- return (EObject) resolved;
- }
-
- // General case
- if (isEMFModelElement(source)) {
- return (EObject) source;
- }
-
- // Try to get an intrinsic adapter
- if (source instanceof IAdaptable) {
- EObject eObject = ((IAdaptable) source).getAdapter(EObject.class);
- if (eObject == null) { // EMF Facet 0.1
- eObject = ((IAdaptable) source).getAdapter(EReference.class);
- }
-
- if (eObject != null) {
- return asEMFModelElement(eObject); // in case the adapter is a CDOResource
- }
- }
-
- // External adapter (last ditch case)
- if (source != null) {
- return asEMFModelElement(Platform.getAdapterManager().getAdapter(source, EObject.class));
- }
-
- return null;
- }
-
- /**
- * Queries whether an {@code object} is an EMF model element, an instance of
- * some {@link EClass} from an EMF model. This isn't as simple as checking
- * whether the object is an {@link EObject} because there are edge cases
- * where objects are {@code EObject}s but shouldn't be treated as
- * "model content". But, a minimum requirement is that the {@code object} is
- * an {@link EObject}.
- *
- * @param object
- * an object
- * @return whether it is "model content"
- *
- * @see EMFHelper#asEMFModelElement(Object)
- */
- public static boolean isEMFModelElement(Object object) {
- return (object instanceof EObject) && !(object instanceof Resource);
- }
-
- /**
- * Casts an {@code object} as an EMF model element, if appropriate.
- *
- * @param object
- * an object
- * @return the object as an EMF model element, or {@code null} if it is not
- * an EMF model element
- *
- * @see #isEMFModelElement(Object)
- */
- public static EObject asEMFModelElement(Object object) {
- return isEMFModelElement(object) ? (EObject) object : null;
- }
-
- /**
- * Retrieve the EditingDomain for the given source object. The object is first
- * resolved to an EObject through #getEObject when possible.
- *
- * @param source
- * @return
- * The source object's editing domain, or null if it couldn't be found
- */
- public static EditingDomain resolveEditingDomain(final Object source) {
- return resolveEditingDomain(getEObject(source));
- }
-
- /**
- * Retrieve the EditingDomain for the given source EObject
- *
- * @param source
- * @return
- * The source eObject's editing domain, or null if it couldn't be found
- */
- public static EditingDomain resolveEditingDomain(final EObject source) {
- EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(source);
- if (domain == null) {
- try {
- domain = ServiceUtils.getInstance().getTransactionalEditingDomain(null);
- } catch (ServiceException e) {
- // Ignore: We cannot find the domain
- }
- }
- return domain;
- }
-
- /**
- * Return the eClassifier' qualified name. The qualified name is obtained by the concatenation
- * of its package hierarchy with the class name, separated by the given separator
- *
- * @param eClassifier
- * @param separator
- * The separator used between each package name
- * @return
- * The EClassifier' qualified name
- */
- public static String getQualifiedName(final EClassifier eClassifier, final String separator) {
- return getQualifiedName(eClassifier.getEPackage(), separator) + separator + eClassifier.getName();
- }
-
- /**
- * Return the ePackage's qualified name. The qualified name is obtained by the concatenation
- * of its superPackage hierarchy with the ePackage name, separated by the given separator
- *
- * @param ePackage
- * @param separator
- * The separator used between each package name
- * @return
- * The EPackage's qualified name
- */
- public static String getQualifiedName(final EPackage ePackage, final String separator) {
- if (ePackage.getESuperPackage() == null) {
- return ePackage.getName();
- }
- return getQualifiedName(ePackage.getESuperPackage(), separator) + separator + ePackage.getName();
- }
-
-
- /**
- * Loads and returns the first EObject at the given URI.
- * The EObject is loaded in the given resourceSet.
- *
- * @param resourceSet
- * The ResourceSet in which the model will be loaded
- * @param uri
- * The URI describing the location of the model to load
- * @return
- * The first EObject located at the given URI
- * @throws IOException
- * When the URI cannot be loaded
- */
- public static EObject loadEMFModel(ResourceSet resourceSet, final URI uri) throws IOException {
- assert resourceSet != null : "null resourceSet"; //$NON-NLS-1$
- if (resourceSet == null) {
- Activator.log.warn("Created a new resourceSet to load an EMF model in " + Activator.log.getCallerMethod()); //$NON-NLS-1$
- resourceSet = new ResourceSetImpl();
- }
-
- try {
- Resource resource = resourceSet.getResource(uri, true);
- if (resource != null) {
- if (!resource.getContents().isEmpty()) {
- return resource.getContents().get(0);
- }
- }
- } catch (Exception ex) {
- IOException exception = new IOException(ex.toString());
- exception.initCause(ex);
- throw exception;
- }
-
- return null;
- }
-
- /**
- * Completely unloads a resource set so that it and all the models it contained may be reclaimed by the
- * Java garbage collector. This includes, at least:
- * <ul>
- * <li>unloading all resources in the set, which converts all model elements to proxies and removes all adapters from them</li>
- * <li>removing all resources from the set</li>
- * <li>removing all adapters from all resources</li>
- * <li>removing all adapters from the resource set</li>
- * </ul>
- *
- * @param resourceSet
- * the resource set to purge
- */
- public static void unload(ResourceSet resourceSet) {
- List<Resource> resources = ImmutableList.copyOf(resourceSet.getResources());
- resourceSet.getResources().clear();
- for (Resource next : resources) {
- next.unload();
- next.eAdapters().clear();
- }
- resourceSet.eAdapters().clear();
-
- // Clear the package registry (it may contain dynamic profile EPackages that we don't
- // want to leak in BasicExtendedMetaData instances attached to static EPackages)
- // Works around EMF bug 433108
- EPackage.Registry packageRegistry = resourceSet.getPackageRegistry();
- if (packageRegistry != null) {
- packageRegistry.clear();
- }
- }
-
- /**
- * Return the root package containing the given package, or the package
- * itself if it is already the root
- *
- * @param ePackage
- * @return
- * The Root package
- */
- public static EPackage getRootPackage(final EPackage ePackage) {
- if (ePackage == null) {
- return null;
- }
-
- if (ePackage.getESuperPackage() == null) {
- return ePackage;
- }
- return getRootPackage(ePackage.getESuperPackage());
- }
-
- /**
- * Gets the object of a given {@code type} containing an {@code object}, or the
- * {@code object} itself if it is of that {@code type}.
- *
- * @param object
- * the object for which to search for a container
- * @param type
- * the type of container to find
- *
- * @return the container of the requested {@code type}, or {@code null} if none
- */
- public static <T extends EObject> T getContainer(EObject object, EClass type) {
- T result = null;
-
- for (EObject next = object; (next != null) && (result == null); next = next.eContainer()) {
- if (type.isInstance(next)) {
- @SuppressWarnings("unchecked")
- T nextAsT = (T) next;
- result = nextAsT;
- }
- }
-
- return result;
- }
-
- /**
- * Gets the object of a given {@code type} containing an {@code object}, or the
- * {@code object} itself if it is of that {@code type}.
- *
- * @param object
- * the object for which to search for a container
- * @param type
- * the type of container to find
- *
- * @return the container of the requested {@code type}, or {@code null} if none
- */
- public static <T extends EObject> T getContainer(EObject object, Class<T> type) {
- T result = null;
-
- for (EObject next = object; (next != null) && (result == null); next = next.eContainer()) {
- if (type.isInstance(next)) {
- result = type.cast(next);
- }
- }
-
- return result;
- }
-
- /**
- * Return the list of EClasses that are subtypes
- * of the given EClass
- *
- * @param type
- * @param concreteClassesOnly
- * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
- * @return
- * The list of EClasses implementing or extending the given EClass
- */
- public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly) {
- Set<EClass> result = new LinkedHashSet<EClass>();
- if (!concreteClassesOnly || (!type.isAbstract() && !type.isInterface())) {
- result.add(type);
- }
-
- EPackage ePackage = getRootPackage(type.getEPackage());
- getSubclassesOf(type, ePackage, result, concreteClassesOnly);
- return new LinkedList<EClass>(result);
- }
-
- /**
- * Return the list of EClasses that are sub types
- * of the given EClass
- *
- * @param type
- * @param concreteClassesOnly
- * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
- * @param packagesToBrowse
- * The EPackages in which the EClasses should be retrieved
- * @return
- * The list of EClasses implementing or extending the given EClass
- */
- public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly, Collection<EPackage> packagesToBrowse) {
- Set<EClass> result = new LinkedHashSet<EClass>();
- if (!concreteClassesOnly || (!type.isAbstract() && !type.isInterface())) {
- result.add(type);
- }
-
- for (EPackage ePackage : packagesToBrowse) {
- getSubclassesOf(type, ePackage, result, concreteClassesOnly);
- }
-
- return new LinkedList<EClass>(result);
- }
-
- /**
- * Return the list of EClasses that are sub types of the given EClass
- *
- * @param type
- * @param concreteClassesOnly
- * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
- * @param browseAllRegisteredPackages
- * If true, all registered EPackages will be navigated to retrieve the matching EClasses. Otherwise,
- * only the current EPackage will be used.
- * @return
- * The list of EClasses implementing or extending the given EClass
- */
- public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly, final boolean browseAllRegisteredPackages) {
- // If the current package is a dynamic package, it may not be registered (?). Add it directly
- EPackage currentPackage = getRootPackage(type.getEPackage());
-
- Set<EPackage> allPackages = new LinkedHashSet<EPackage>();
- allPackages.add(currentPackage);
-
- if (browseAllRegisteredPackages) {
- // FIXME // WARNING: This loop will load all EPackages. The first call is expensive.
- Set<String> allUris = new HashSet<String>(EPackage.Registry.INSTANCE.keySet());
-
- for (String nsURI : allUris) {
- allPackages.add(EPackage.Registry.INSTANCE.getEPackage(nsURI));
- }
- }
-
- return getSubclassesOf(type, concreteClassesOnly, allPackages);
- }
-
- private static void getSubclassesOf(final EClass type, final EPackage fromPackage, final Set<EClass> result, final boolean concreteClassesOnly) {
- for (EClassifier classifier : fromPackage.getEClassifiers()) {
- if (classifier instanceof EClass) {
- EClass eClass = (EClass) classifier;
- if (eClass.getEAllSuperTypes().contains(type)) {
- if (!concreteClassesOnly || (!eClass.isAbstract() && !eClass.isInterface())) {
- result.add(eClass);
- }
- }
- }
- }
-
- for (EPackage subPackage : fromPackage.getESubpackages()) {
- getSubclassesOf(type, subPackage, result, concreteClassesOnly);
- }
- }
-
- /**
- * Tests if an EObject is read only on any {@linkplain ReadOnlyAxis axis}.
- * Delegates to the EObject's editing domain if it can be found
- *
- * @param eObject
- * @return
- * True if the EObject is read only on any axis
- * @see #isReadOnly(Set, EObject, EditingDomain)
- */
- public static boolean isReadOnly(final EObject eObject) {
- return isReadOnly(ReadOnlyAxis.anyAxis(), eObject);
- }
-
- /**
- * Tests if an EObject is read only on any of the specified {@code axes}.
- * Delegates to the EObject's editing domain if it can be found
- *
- * @param axes
- * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
- * @param eObject
- * @return
- * True if the EObject is read only on any of the given {@code axes}
- */
- public static boolean isReadOnly(Set<ReadOnlyAxis> axes, final EObject eObject) {
- EditingDomain domain = resolveEditingDomain(eObject);
- return isReadOnly(axes, eObject, domain);
- }
-
- /**
- * Tests if an EObject is read only on any {@linkplain ReadOnlyAxis axis}.
- * Delegates to the given editing domain if it isn't null
- *
- * @param eObject
- * @param domain
- * @return
- * True if the EObject is read only on any axis
- */
- public static boolean isReadOnly(final EObject eObject, final EditingDomain domain) {
- return isReadOnly(ReadOnlyAxis.anyAxis(), eObject, domain);
- }
-
- /**
- * Tests if an EObject is read only on any of the specified {@code axes}.
- * Delegates to the given editing domain if it isn't null
- *
- * @param axes
- * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
- * @param eObject
- *
- * @param domain
- * @return
- * True if the EObject is read only
- */
- public static boolean isReadOnly(Set<ReadOnlyAxis> axes, final EObject eObject, final EditingDomain domain) {
- if (domain != null) {
- Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
- if (handler instanceof IReadOnlyHandler2) {
- return ((IReadOnlyHandler2) handler).isReadOnly(axes, eObject).get();
- } else if (handler instanceof IReadOnlyHandler) {
- // these handlers only deal with permission-based read-only-ness
- return axes.contains(ReadOnlyAxis.PERMISSION) && ((IReadOnlyHandler) handler).isReadOnly(eObject).get();
- }
-
- if (eObject.eResource() != null) {
- return domain.isReadOnly(eObject.eResource());
- }
- }
- return false;
- }
-
- /**
- * Tests if the Resource is read only on any {@linkplain ReadOnlyAxis axis}.
- * Delegates to the given editing domain if it isn't null
- *
- * @param resource
- * @param domain
- * @return
- * True if the Resource is read only on any axis
- */
- public static boolean isReadOnly(final Resource resource, final EditingDomain domain) {
- return isReadOnly(ReadOnlyAxis.anyAxis(), resource, domain);
- }
-
- /**
- * Tests if the Resource is read only on any of the given {@code axes}.
- * Delegates to the given editing domain if it isn't null
- *
- * @param axes
- * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
- * @param resource
- * @param domain
- * @return
- * True if the Resource is read only on any of the given {@code axes}
- */
- public static boolean isReadOnly(Set<ReadOnlyAxis> axes, final Resource resource, final EditingDomain domain) {
- if (resource == null) {
- return false;
- }
-
- if (domain != null && resource.getURI() != null) {
- Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
- if (handler instanceof IReadOnlyHandler2) {
- return ((IReadOnlyHandler2) handler).anyReadOnly(axes, new URI[] { resource.getURI() }).get();
- } else if (handler instanceof IReadOnlyHandler) {
- // these handlers only deal with permission-based read-only-ness
- return axes.contains(ReadOnlyAxis.PERMISSION) && ((IReadOnlyHandler) handler).anyReadOnly(new URI[] { resource.getURI() }).get();
- }
- return domain.isReadOnly(resource);
- }
-
- // no editing domain : use file system attribute
- ResourceSet resourceSet = resource.getResourceSet();
-
- if (resourceSet == null) {
- return false;
- }
-
- Map<String, ?> attributes = resourceSet.getURIConverter().getAttributes(resource.getURI(), null);
- Boolean readOnly = (Boolean) attributes.get(URIConverter.ATTRIBUTE_READ_ONLY);
-
- return readOnly == null ? false : readOnly;
- }
-
- /**
- * Tests if an object that is read only could possibly be made writable by some means (file system attributes, team provider hook, database
- * permissions, etc.)
- *
- * @param eObject
- * an object that is assumed to be read-only
- * @param domain
- * the editing domain context of the {@link eObject}
- * @return
- * whether the {@code eObject} could be made writable
- */
- public static boolean canMakeWritable(final EObject eObject, final EditingDomain domain) {
- return canMakeWritable(ReadOnlyAxis.anyAxis(), eObject, domain);
- }
-
- /**
- * Tests if an object that is read only could possibly be made writable according to any of
- * the specified {@code axes} of read-only-ness.
- *
- * @param axes
- * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
- * @param eObject
- * an object that is assumed to be read-only
- * @param domain
- * the editing domain context of the {@link eObject}
- * @return
- * whether the {@code eObject} could be made writable
- */
- public static boolean canMakeWritable(Set<ReadOnlyAxis> axes, final EObject eObject, final EditingDomain domain) {
- if (domain != null) {
- Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
- if (handler instanceof IReadOnlyHandler2) {
- return ((IReadOnlyHandler2) handler).canMakeWritable(axes, eObject).or(false);
- }
- }
- return false;
- }
-
- /**
- * Tests if a resource that is read only could possibly be made writable by some means (file system attributes, team provider hook, database
- * permissions, etc.)
- *
- * @param resource
- * a resource that is assumed to be read-only
- * @param domain
- * the editing domain context of the {@link resource}
- * @return
- * whether the {@code resource} could be made writable
- */
- public static boolean canMakeWritable(final Resource resource, final EditingDomain domain) {
- return canMakeWritable(ReadOnlyAxis.anyAxis(), resource, domain);
- }
-
- /**
- * Tests if a resource that is read only could possibly be made writable according to any of
- * the specified {@code axes} of read-only-ness.
- *
- * @param axes
- * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
- * @param resource
- * a resource that is assumed to be read-only
- * @param domain
- * the editing domain context of the {@link resource}
- * @return
- * whether the {@code resource} could be made writable
- */
- public static boolean canMakeWritable(Set<ReadOnlyAxis> axes, final Resource resource, final EditingDomain domain) {
- if (domain != null) {
- Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
- if (handler instanceof IReadOnlyHandler2) {
- return ((IReadOnlyHandler2) handler).canMakeWritable(axes, new URI[] { resource.getURI() }).or(false);
- }
- }
- return false;
- }
-
- /**
- * Tests if the given EStructuralFeature is required (ie. should always
- * have a value)
- *
- * A feature is required if at least of one the following conditions if
- * true :
- *
- * - It has a defaultValue
- * - Its lowerBound is at least 1
- * - It is an enumeration (Enumerations always have a default value)
- * - It is a Java primitive type, and is not marked as Unsettable
- *
- * @param feature
- * the feature to test
- * @return
- * true if the feature is required, false otherwise
- */
- public static boolean isRequired(final EStructuralFeature feature) {
- EClassifier eType = feature.getEType();
- if (eType == null) {
- return false;
- }
-
- // EEnums are always required, as an EEnum always has a default value
- if (eType instanceof EEnum) {
- return true;
- }
-
- // At least one value means it is required
- if (feature.getLowerBound() >= 1) {
- return true;
- }
-
- // Java primitive types cannot have a null value
- // if the feature is not specifically marked as unsettable, then it is required
- if (eType.getInstanceClass() != null && eType.getInstanceClass().isPrimitive() && !feature.isUnsettable()) {
- return true;
- }
-
- // If there is a default value, there is always a value
- if (feature.getDefaultValueLiteral() != null) {
- return true;
- }
-
- return false; // The property if not required
- }
-
- /**
- * Returns all objects of type T contained in the resource
- *
- * @param resource
- * @param type
- * @return
- */
- public static <T> Set<T> allInstances(final Resource resource, Class<T> type) {
- TreeIterator<EObject> iterator = resource.getAllContents();
- Set<T> result = new LinkedHashSet<T>();
-
- while (iterator.hasNext()) {
- EObject element = iterator.next();
- if (type.isInstance(element)) {
- result.add(type.cast(element));
- }
- }
-
- return result;
- }
-
- /**
- * Returns all the EPackages and nested EPackages contained in this resource
- *
- * @param resource
- * @return
- */
- public static Set<EPackage> getAllEPackages(final Resource resource) {
- Set<EPackage> result = new LinkedHashSet<EPackage>();
-
- for (EObject rootElement : resource.getContents()) {
- if (rootElement instanceof EPackage) {
- result.add((EPackage) rootElement);
- result.addAll(getAllNestedPackages((EPackage) rootElement));
- }
- }
-
- return result;
- }
-
- /**
- * Returns all packages nested in the given EPackage (recursively). Does not
- * include the base EPackage.
- *
- * @param basePackage
- * @return
- */
- public static Set<EPackage> getAllNestedPackages(EPackage basePackage) {
- Set<EPackage> result = new LinkedHashSet<EPackage>();
-
- for (EPackage nestedPackage : basePackage.getESubpackages()) {
- result.add(nestedPackage);
- result.addAll(getAllNestedPackages(nestedPackage));
- }
-
- return result;
- }
-
- /**
- *
- * @param resource
- * a resource
- *
- * @return
- * the list of the metamodels known by the resource
- */
- public static Set<EPackage> getMetamodels(final Resource resource) {
- Set<EPackage> metamodels = new HashSet<EPackage>();
- if (resource != null) {
- final List<EObject> contents = new ArrayList<EObject>(resource.getContents());
- for (final EObject current : contents) {
- metamodels.add(current.eClass().getEPackage());
- }
- }
- return metamodels;
- }
-
- /**
- *
- * Returns the XMI ID of the given {@link EObject} or <code>null</code> if it cannot be resolved.
- *
- * @param object
- * Object which we seek the XMI ID of.
- * @return <code>object</code>'s XMI ID, <code>null</code> if not applicable.
- */
- public static final String getXMIID(final EObject object) {
- String objectID = null;
- if (object != null && object.eResource() instanceof XMIResource) {
- objectID = ((XMIResource) object.eResource()).getID(object);
- }
- return objectID;
- }
-
-
-
- /**
- * Gets the usages.
- *
- * @param source
- * the source
- *
- * @return the usages or null if there is no usages
- */
- public static Collection<Setting> getUsages(EObject source) {
- // the functional code is defined in core because we need it in infra.core
- // but infra.core can't depend on infra.emf (circular dependency)
- return org.eclipse.papyrus.infra.core.utils.EMFHelper.getUsages(source);
- }
-
-
- /**
- * <pre>
- * Test if the used element is referenced by other elements than the known
- * referencer (except its container). It ignores references from an other meta-model.
- * </pre>
- *
- * @param usedObject
- * the used object
- * @param knownReferencer
- * the known referencer
- * @return true if the known referencer is the only referencer.
- */
- public static boolean isOnlyUsage(EObject usedObject, EObject knownReferencer) {
- boolean isUsed = false;
- EPackage mmPackage = usedObject.eClass().getEPackage();
-
- // Retrieve the list of elements referencing the usedObject.
- Set<EObject> crossReferences = new HashSet<EObject>();
- for (Setting setting : getUsages(usedObject)) {
- EObject eObj = setting.getEObject();
- if (eObj.eClass().getEPackage().equals(mmPackage)) {
- crossReferences.add(eObj);
- }
- }
-
- // Remove the container of used object.
- crossReferences.remove(usedObject.eContainer());
- // Remove the knownReferencer from the list of references.
- crossReferences.remove(knownReferencer);
-
- // If no referencer remains in the list, the known element is the only
- // usage.
- if (crossReferences.isEmpty()) {
- isUsed = true;
- }
-
- return isUsed;
- }
-
- /**
- *
- * @param superType
- * an eclassifier
- * @param subType
- * another eClassifier
- * @return
- * <code>true</code> if the 2nd {@link EClassifier} is a subtype of the first one
- */
- public static boolean isSuperType(final EClassifier superType, final EClassifier subType) {
- if (superType == subType) {
- return true;
- }
-
- if (superType instanceof EClass && subType instanceof EClass) {
- // special case because isSuperTypeOf doesn't handle it
- if (superType == EcorePackage.eINSTANCE.getEObject()) {
- return true;
- }
-
- EClass superTypeEClass = (EClass) superType;
- EClass subTypeEClass = (EClass) subType;
- return superTypeEClass.isSuperTypeOf(subTypeEClass);
- }
-
- // manage EDtataType
- if (superType == EcorePackage.eINSTANCE.getEDataType() && subType instanceof EDataType) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Computes the path from the root EObject to the given element, as a List of EObjects
- *
- * @param element
- * @return
- */
- public static List<EObject> getContainmentPath(EObject element) {
- List<EObject> result;
- if (element.eContainer() == null) {
- result = new LinkedList<EObject>();
- result.add(element);
- return result;
- } else {
- result = getContainmentPath(element.eContainer());
- result.add(element);
- }
- return result;
- }
-
- /**
- * Returns the given element, reloaded into the resource set of the context element,
- * or the source element itself if not possible.
- *
- * Use this method for e.g. loading an element from a shared resource set into another resource set
- * (Apply a registered profile/library, drop an element from the project explorer, ...)
- *
- * @param element
- * @param contextElement
- * @return
- */
- public static <T extends EObject> T reloadIntoContext(T element, EObject contextElement) {
- ResourceSet sourceResourceSet = getResourceSet(element);
- ResourceSet loadingContext = getResourceSet(contextElement);
-
- if (sourceResourceSet == loadingContext || loadingContext == null) {
- return element;
- }
-
- URI sourceURI = EcoreUtil.getURI(element);
- EObject result = loadingContext.getEObject(sourceURI, true);
-
- return (T) result;
- }
-
- /**
- * Returns the resourceSet owning this eObject, or null if it is detached
- *
- * @param eObject
- */
- public static ResourceSet getResourceSet(EObject eObject) {
- Resource resource = (eObject == null) ? null : eObject.eResource();
- return (resource == null) ? null : resource.getResourceSet();
- }
-
- /**
- * Best-effort loads a resource, returning the first root element of the requested {@code type}. Unlike the {@link #loadChecked(ResourceSet, URI, Class) loadChecked} method, this will never throw an exception.
- *
- * @param rset
- * a resource set in which to load the resource
- * @param uri
- * the URI of the resource to load
- * @param type
- * the type of root element to retrieve
- *
- * @return the requested root element, or {@code null} if the resource does not contain such an element or could not be loaded
- *
- * @see #loadChecked(ResourceSet, URI, Class)
- */
- public static <T extends EObject> T load(ResourceSet rset, URI uri, Class<T> type) {
- T result = null;
-
- try {
- result = loadChecked(rset, uri, type);
- } catch (Exception e) {
- Activator.log.error("Exception in loading resource " + uri, e); //$NON-NLS-1$
-
- // Maybe it was partially loaded? If so, try again
- Resource res = rset.getResource(uri, false);
- if ((res != null) && res.isLoaded()) {
- result = Iterables.getFirst(Iterables.filter(res.getContents(), type), null);
- }
- }
-
- return result;
- }
-
- /**
- * Best-effort loads a resource, returning the first root element of the requested {@code type}.
- *
- * @param rset
- * a resource set in which to load the resource
- * @param uri
- * the URI of the resource to load
- * @param type
- * the type of root element to retrieve
- *
- * @return the requested root element, or {@code null} if the resource does not contain such an element or could not be loaded
- * @throws IOException
- * on an I/O problem in loading the resource
- * @throw RuntimeException on any other unforeseen (usually programming error) problem
- *
- * @see #load(ResourceSet, URI, Class)
- */
- public static <T extends EObject> T loadChecked(ResourceSet rset, URI uri, Class<T> type) throws IOException {
- try {
- return Iterables.getFirst(Iterables.filter(rset.getResource(uri, true).getContents(), type), null);
- } catch (WrappedException e) {
- if (e.exception() instanceof IOException) {
- throw (IOException) e.exception();
- } else if (e.exception() instanceof RuntimeException) {
- throw (RuntimeException) e.exception();
- } else {
- throw e;
- }
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - filter out EObjects that are Resources (CDO)
+ * Christian W. Damus (CEA) - Support read-only state at object level (CDO)
+ * Christian W. Damus (CEA) - bugs 323802, 429826, 408491, 432813, 422257
+ * Christian W. Damus - bugs 469188, 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler;
+import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
+import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.emf.Activator;
+import org.eclipse.papyrus.infra.tools.util.PlatformHelper;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+
+/**
+ * A Helper class for manipulating EMF Objects
+ *
+ * @author Camille Letavernier
+ */
+// TODO : Check implementations. Most of them are old and don't always match the specification
+public class EMFHelper {
+
+ /**
+ * Returns the EClass corresponding to the given nsUri and className
+ *
+ * @param nsUri
+ * The NSURI of the EClass' EPackage
+ * @param className
+ * The EClass' name
+ * @return
+ * The EClass instance, or null if the EClass couldn't be found
+ */
+ public static EClass getEClass(final String nsUri, final String className) {
+ EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(nsUri);
+ if (ePackage == null) {
+ Activator.log.warn("Cannot find an EPackage matching the nsURI " + nsUri); //$NON-NLS-1$
+ return null;
+ }
+ return getEClass(ePackage, className);
+ }
+
+ /**
+ * Return the EClass corresponding to the given EPackage and className
+ *
+ * @param metamodel
+ * The EClass' EPackage
+ * @param className
+ * The EClass' name
+ * @return
+ * The EClass instance, or null if the EClass couldn't be found
+ */
+ public static EClass getEClass(final EPackage metamodel, final String className) {
+ EClassifier classifier = metamodel.getEClassifier(className);
+ if (classifier == null) {
+ Activator.log.warn("Classifier " + className + " not found in metamodel " + metamodel.getName() + " (" + metamodel.getNsURI() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ }
+ if (classifier instanceof EClass) {
+ return (EClass) classifier;
+ } else {
+ Activator.log.warn("Classifier " + className + " in " + metamodel.getName() + " (" + metamodel.getNsURI() + ") is not an EClass"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ }
+
+ return null;
+ }
+
+ /**
+ * Tests if an Object is an instance of the given EClass
+ *
+ * @param element
+ * The EObject to test
+ * @param className
+ * The name of the EClass
+ * @param metamodel
+ * The EPackage owning the EClass
+ * @return
+ * True if the EObject is an instance of the EClass, or of one of the EClass' subtypes
+ */
+ public static boolean isInstance(final EObject element, final String className, final EPackage metamodel) {
+
+ EClassifier theClass = metamodel.getEClassifier(className);
+
+ if (theClass == null) {
+ String message = String.format("Class %s not found in metamodel: %s (%s)", className, metamodel.getName(), metamodel.getNsURI());//$NON-NLS-1$
+ Activator.log.warn(message);
+ return false;
+ }
+
+ return theClass.isInstance(element);
+ }
+
+
+ /**
+ * Tests if an Object is an instance of the given EClass
+ *
+ * @param element
+ * The EObject to test
+ * @param className
+ * The name of the EClass
+ * @param metamodel
+ * The URI of the EPackage owning the EClass
+ * @return
+ * True if the EObject is an instance of the EClass, or of one of the EClass' subtypes
+ */
+ public static boolean isInstance(EObject selectedItem, String className, String nsUri) {
+ EClass actualEClass = selectedItem.eClass();
+
+ // Exact match
+ if (isExactMatch(actualEClass, className, nsUri)) {
+ return true;
+ }
+
+ List<EClass> allSuperTypes = actualEClass.getEAllSuperTypes();
+ for (EClass eClass : allSuperTypes) {
+ if (isExactMatch(eClass, className, nsUri)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Tests whether the given EClass has the given className and belongs to the EPackage represented by nsUri
+ *
+ * @param eClass
+ * The EClass to test
+ * @param className
+ *
+ * @param nsUri
+ * @return
+ * True if the EClass' name is className and the EClass' EPackage's nsURI is nsUri
+ */
+ private static boolean isExactMatch(EClass eClass, String className, String nsUri) {
+ return className.equals(eClass.getName()) && nsUri.equals(eClass.getEPackage().getNsURI());
+ }
+
+ /**
+ * Tests if the given eClass is a Subclass of fromClass
+ * Also returns true when eClass == fromClass
+ *
+ * @param eClass
+ * @param fromClass
+ * @return
+ * true if eClass is a subclass of fromClass
+ */
+ public static boolean isSubclass(final EClass eClass, final EClass fromClass) {
+ // Everything is an EObject
+ if (eClass != null && fromClass == EcorePackage.eINSTANCE.getEObject()) {
+ return true;
+ }
+
+ if (eClass == fromClass) {
+ return true;
+ }
+
+ List<EClass> superTypes = eClass.getEAllSuperTypes();
+ if (superTypes.contains(fromClass)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the EObject corresponding to the input object
+ * Tests if the input is an EObject, or if it is Adaptable
+ * to an EObject
+ *
+ * @param source
+ * @return An EObject corresponding to the input source, or null
+ * if the EObject could not be resolved
+ */
+ public static EObject getEObject(final Object source) {
+
+ // Support for EMF 0.2 CustomizedTree: The TreeElements are IAdaptable, but the
+ // EObject adapter for some of them (e.g. reference node) is not what we need
+ Object resolved = Activator.getDefault().getEObjectResolver().resolve(source);
+ if ((resolved != source) && isEMFModelElement(resolved)) {
+ return (EObject) resolved;
+ }
+
+ // General case
+ if (isEMFModelElement(source)) {
+ return (EObject) source;
+ }
+
+ // Try to get an intrinsic adapter
+ if (source instanceof IAdaptable) {
+ EObject eObject = ((IAdaptable) source).getAdapter(EObject.class);
+ if (eObject == null) { // EMF Facet 0.1
+ eObject = ((IAdaptable) source).getAdapter(EReference.class);
+ }
+
+ if (eObject != null) {
+ return asEMFModelElement(eObject); // in case the adapter is a CDOResource
+ }
+ }
+
+ // External adapter (last ditch case)
+ if (source != null) {
+ return asEMFModelElement(Platform.getAdapterManager().getAdapter(source, EObject.class));
+ }
+
+ return null;
+ }
+
+ /**
+ * Queries whether an {@code object} is an EMF model element, an instance of
+ * some {@link EClass} from an EMF model. This isn't as simple as checking
+ * whether the object is an {@link EObject} because there are edge cases
+ * where objects are {@code EObject}s but shouldn't be treated as
+ * "model content". But, a minimum requirement is that the {@code object} is
+ * an {@link EObject}.
+ *
+ * @param object
+ * an object
+ * @return whether it is "model content"
+ *
+ * @see EMFHelper#asEMFModelElement(Object)
+ */
+ public static boolean isEMFModelElement(Object object) {
+ return (object instanceof EObject) && !(object instanceof Resource);
+ }
+
+ /**
+ * Casts an {@code object} as an EMF model element, if appropriate.
+ *
+ * @param object
+ * an object
+ * @return the object as an EMF model element, or {@code null} if it is not
+ * an EMF model element
+ *
+ * @see #isEMFModelElement(Object)
+ */
+ public static EObject asEMFModelElement(Object object) {
+ return isEMFModelElement(object) ? (EObject) object : null;
+ }
+
+ /**
+ * Retrieve the EditingDomain for the given source object. The object is first
+ * resolved to an EObject through #getEObject when possible.
+ *
+ * @param source
+ * @return
+ * The source object's editing domain, or null if it couldn't be found
+ */
+ public static EditingDomain resolveEditingDomain(final Object source) {
+ return resolveEditingDomain(getEObject(source));
+ }
+
+ /**
+ * Retrieve the EditingDomain for the given source EObject
+ *
+ * @param source
+ * @return
+ * The source eObject's editing domain, or null if it couldn't be found
+ */
+ public static EditingDomain resolveEditingDomain(final EObject source) {
+ EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(source);
+ if (domain == null) {
+ try {
+ domain = ServiceUtils.getInstance().getTransactionalEditingDomain(null);
+ } catch (ServiceException e) {
+ // Ignore: We cannot find the domain
+ }
+ }
+ return domain;
+ }
+
+ /**
+ * Return the eClassifier' qualified name. The qualified name is obtained by the concatenation
+ * of its package hierarchy with the class name, separated by the given separator
+ *
+ * @param eClassifier
+ * @param separator
+ * The separator used between each package name
+ * @return
+ * The EClassifier' qualified name
+ */
+ public static String getQualifiedName(final EClassifier eClassifier, final String separator) {
+ return getQualifiedName(eClassifier.getEPackage(), separator) + separator + eClassifier.getName();
+ }
+
+ /**
+ * Return the ePackage's qualified name. The qualified name is obtained by the concatenation
+ * of its superPackage hierarchy with the ePackage name, separated by the given separator
+ *
+ * @param ePackage
+ * @param separator
+ * The separator used between each package name
+ * @return
+ * The EPackage's qualified name
+ */
+ public static String getQualifiedName(final EPackage ePackage, final String separator) {
+ if (ePackage.getESuperPackage() == null) {
+ return ePackage.getName();
+ }
+ return getQualifiedName(ePackage.getESuperPackage(), separator) + separator + ePackage.getName();
+ }
+
+
+ /**
+ * Loads and returns the first EObject at the given URI.
+ * The EObject is loaded in the given resourceSet.
+ *
+ * @param resourceSet
+ * The ResourceSet in which the model will be loaded
+ * @param uri
+ * The URI describing the location of the model to load
+ * @return
+ * The first EObject located at the given URI
+ * @throws IOException
+ * When the URI cannot be loaded
+ */
+ public static EObject loadEMFModel(ResourceSet resourceSet, final URI uri) throws IOException {
+ assert resourceSet != null : "null resourceSet"; //$NON-NLS-1$
+ if (resourceSet == null) {
+ Activator.log.warn("Created a new resourceSet to load an EMF model in " + Activator.log.getCallerMethod()); //$NON-NLS-1$
+ resourceSet = new ResourceSetImpl();
+ }
+
+ try {
+ Resource resource = resourceSet.getResource(uri, true);
+ if (resource != null) {
+ if (!resource.getContents().isEmpty()) {
+ return resource.getContents().get(0);
+ }
+ }
+ } catch (Exception ex) {
+ IOException exception = new IOException(ex.toString());
+ exception.initCause(ex);
+ throw exception;
+ }
+
+ return null;
+ }
+
+ /**
+ * Completely unloads a resource set so that it and all the models it contained may be reclaimed by the
+ * Java garbage collector. This includes, at least:
+ * <ul>
+ * <li>unloading all resources in the set, which converts all model elements to proxies and removes all adapters from them</li>
+ * <li>removing all resources from the set</li>
+ * <li>removing all adapters from all resources</li>
+ * <li>removing all adapters from the resource set</li>
+ * </ul>
+ *
+ * @param resourceSet
+ * the resource set to purge
+ */
+ public static void unload(ResourceSet resourceSet) {
+ List<Resource> resources = ImmutableList.copyOf(resourceSet.getResources());
+ resourceSet.getResources().clear();
+ for (Resource next : resources) {
+ next.unload();
+ next.eAdapters().clear();
+ }
+ resourceSet.eAdapters().clear();
+
+ // Clear the package registry (it may contain dynamic profile EPackages that we don't
+ // want to leak in BasicExtendedMetaData instances attached to static EPackages)
+ // Works around EMF bug 433108
+ EPackage.Registry packageRegistry = resourceSet.getPackageRegistry();
+ if (packageRegistry != null) {
+ packageRegistry.clear();
+ }
+ }
+
+ /**
+ * Return the root package containing the given package, or the package
+ * itself if it is already the root
+ *
+ * @param ePackage
+ * @return
+ * The Root package
+ */
+ public static EPackage getRootPackage(final EPackage ePackage) {
+ if (ePackage == null) {
+ return null;
+ }
+
+ if (ePackage.getESuperPackage() == null) {
+ return ePackage;
+ }
+ return getRootPackage(ePackage.getESuperPackage());
+ }
+
+ /**
+ * Gets the object of a given {@code type} containing an {@code object}, or the
+ * {@code object} itself if it is of that {@code type}.
+ *
+ * @param object
+ * the object for which to search for a container
+ * @param type
+ * the type of container to find
+ *
+ * @return the container of the requested {@code type}, or {@code null} if none
+ * @since 2.0
+ */
+ public static <T extends EObject> T getContainer(EObject object, EClass type) {
+ T result = null;
+
+ for (EObject next = object; (next != null) && (result == null); next = next.eContainer()) {
+ if (type.isInstance(next)) {
+ @SuppressWarnings("unchecked")
+ T nextAsT = (T) next;
+ result = nextAsT;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets the object of a given {@code type} containing an {@code object}, or the
+ * {@code object} itself if it is of that {@code type}.
+ *
+ * @param object
+ * the object for which to search for a container
+ * @param type
+ * the type of container to find
+ *
+ * @return the container of the requested {@code type}, or {@code null} if none
+ * @since 2.0
+ */
+ public static <T extends EObject> T getContainer(EObject object, Class<T> type) {
+ T result = null;
+
+ for (EObject next = object; (next != null) && (result == null); next = next.eContainer()) {
+ if (type.isInstance(next)) {
+ result = type.cast(next);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Return the list of EClasses that are subtypes
+ * of the given EClass
+ *
+ * @param type
+ * @param concreteClassesOnly
+ * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
+ * @return
+ * The list of EClasses implementing or extending the given EClass
+ */
+ public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly) {
+ Set<EClass> result = new LinkedHashSet<EClass>();
+ if (!concreteClassesOnly || (!type.isAbstract() && !type.isInterface())) {
+ result.add(type);
+ }
+
+ EPackage ePackage = getRootPackage(type.getEPackage());
+ getSubclassesOf(type, ePackage, result, concreteClassesOnly);
+ return new LinkedList<EClass>(result);
+ }
+
+ /**
+ * Return the list of EClasses that are sub types
+ * of the given EClass
+ *
+ * @param type
+ * @param concreteClassesOnly
+ * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
+ * @param packagesToBrowse
+ * The EPackages in which the EClasses should be retrieved
+ * @return
+ * The list of EClasses implementing or extending the given EClass
+ */
+ public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly, Collection<EPackage> packagesToBrowse) {
+ Set<EClass> result = new LinkedHashSet<EClass>();
+ if (!concreteClassesOnly || (!type.isAbstract() && !type.isInterface())) {
+ result.add(type);
+ }
+
+ for (EPackage ePackage : packagesToBrowse) {
+ getSubclassesOf(type, ePackage, result, concreteClassesOnly);
+ }
+
+ return new LinkedList<EClass>(result);
+ }
+
+ /**
+ * Return the list of EClasses that are sub types of the given EClass
+ *
+ * @param type
+ * @param concreteClassesOnly
+ * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
+ * @param browseAllRegisteredPackages
+ * If true, all registered EPackages will be navigated to retrieve the matching EClasses. Otherwise,
+ * only the current EPackage will be used.
+ * @return
+ * The list of EClasses implementing or extending the given EClass
+ */
+ public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly, final boolean browseAllRegisteredPackages) {
+ // If the current package is a dynamic package, it may not be registered (?). Add it directly
+ EPackage currentPackage = getRootPackage(type.getEPackage());
+
+ Set<EPackage> allPackages = new LinkedHashSet<EPackage>();
+ allPackages.add(currentPackage);
+
+ if (browseAllRegisteredPackages) {
+ // FIXME // WARNING: This loop will load all EPackages. The first call is expensive.
+ Set<String> allUris = new HashSet<String>(EPackage.Registry.INSTANCE.keySet());
+
+ for (String nsURI : allUris) {
+ allPackages.add(EPackage.Registry.INSTANCE.getEPackage(nsURI));
+ }
+ }
+
+ return getSubclassesOf(type, concreteClassesOnly, allPackages);
+ }
+
+ private static void getSubclassesOf(final EClass type, final EPackage fromPackage, final Set<EClass> result, final boolean concreteClassesOnly) {
+ for (EClassifier classifier : fromPackage.getEClassifiers()) {
+ if (classifier instanceof EClass) {
+ EClass eClass = (EClass) classifier;
+ if (eClass.getEAllSuperTypes().contains(type)) {
+ if (!concreteClassesOnly || (!eClass.isAbstract() && !eClass.isInterface())) {
+ result.add(eClass);
+ }
+ }
+ }
+ }
+
+ for (EPackage subPackage : fromPackage.getESubpackages()) {
+ getSubclassesOf(type, subPackage, result, concreteClassesOnly);
+ }
+ }
+
+ /**
+ * Tests if an EObject is read only on any {@linkplain ReadOnlyAxis axis}.
+ * Delegates to the EObject's editing domain if it can be found
+ *
+ * @param eObject
+ * @return
+ * True if the EObject is read only on any axis
+ * @see #isReadOnly(Set, EObject, EditingDomain)
+ */
+ public static boolean isReadOnly(final EObject eObject) {
+ return isReadOnly(ReadOnlyAxis.anyAxis(), eObject);
+ }
+
+ /**
+ * Tests if an EObject is read only on any of the specified {@code axes}.
+ * Delegates to the EObject's editing domain if it can be found
+ *
+ * @param axes
+ * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
+ * @param eObject
+ * @return
+ * True if the EObject is read only on any of the given {@code axes}
+ */
+ public static boolean isReadOnly(Set<ReadOnlyAxis> axes, final EObject eObject) {
+ EditingDomain domain = resolveEditingDomain(eObject);
+ return isReadOnly(axes, eObject, domain);
+ }
+
+ /**
+ * Tests if an EObject is read only on any {@linkplain ReadOnlyAxis axis}.
+ * Delegates to the given editing domain if it isn't null
+ *
+ * @param eObject
+ * @param domain
+ * @return
+ * True if the EObject is read only on any axis
+ */
+ public static boolean isReadOnly(final EObject eObject, final EditingDomain domain) {
+ return isReadOnly(ReadOnlyAxis.anyAxis(), eObject, domain);
+ }
+
+ /**
+ * Tests if an EObject is read only on any of the specified {@code axes}.
+ * Delegates to the given editing domain if it isn't null
+ *
+ * @param axes
+ * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
+ * @param eObject
+ *
+ * @param domain
+ * @return
+ * True if the EObject is read only
+ */
+ public static boolean isReadOnly(Set<ReadOnlyAxis> axes, final EObject eObject, final EditingDomain domain) {
+ if (domain != null) {
+ Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
+ if (handler instanceof IReadOnlyHandler2) {
+ return ((IReadOnlyHandler2) handler).isReadOnly(axes, eObject).get();
+ } else if (handler instanceof IReadOnlyHandler) {
+ // these handlers only deal with permission-based read-only-ness
+ return axes.contains(ReadOnlyAxis.PERMISSION) && ((IReadOnlyHandler) handler).isReadOnly(eObject).get();
+ }
+
+ if (eObject.eResource() != null) {
+ return domain.isReadOnly(eObject.eResource());
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Tests if the Resource is read only on any {@linkplain ReadOnlyAxis axis}.
+ * Delegates to the given editing domain if it isn't null
+ *
+ * @param resource
+ * @param domain
+ * @return
+ * True if the Resource is read only on any axis
+ */
+ public static boolean isReadOnly(final Resource resource, final EditingDomain domain) {
+ return isReadOnly(ReadOnlyAxis.anyAxis(), resource, domain);
+ }
+
+ /**
+ * Tests if the Resource is read only on any of the given {@code axes}.
+ * Delegates to the given editing domain if it isn't null
+ *
+ * @param axes
+ * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
+ * @param resource
+ * @param domain
+ * @return
+ * True if the Resource is read only on any of the given {@code axes}
+ */
+ public static boolean isReadOnly(Set<ReadOnlyAxis> axes, final Resource resource, final EditingDomain domain) {
+ if (resource == null) {
+ return false;
+ }
+
+ if (domain != null && resource.getURI() != null) {
+ Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
+ if (handler instanceof IReadOnlyHandler2) {
+ return ((IReadOnlyHandler2) handler).anyReadOnly(axes, new URI[] { resource.getURI() }).get();
+ } else if (handler instanceof IReadOnlyHandler) {
+ // these handlers only deal with permission-based read-only-ness
+ return axes.contains(ReadOnlyAxis.PERMISSION) && ((IReadOnlyHandler) handler).anyReadOnly(new URI[] { resource.getURI() }).get();
+ }
+ return domain.isReadOnly(resource);
+ }
+
+ // no editing domain : use file system attribute
+ ResourceSet resourceSet = resource.getResourceSet();
+
+ if (resourceSet == null) {
+ return false;
+ }
+
+ Map<String, ?> attributes = resourceSet.getURIConverter().getAttributes(resource.getURI(), null);
+ Boolean readOnly = (Boolean) attributes.get(URIConverter.ATTRIBUTE_READ_ONLY);
+
+ return readOnly == null ? false : readOnly;
+ }
+
+ /**
+ * Tests if an object that is read only could possibly be made writable by some means (file system attributes, team provider hook, database
+ * permissions, etc.)
+ *
+ * @param eObject
+ * an object that is assumed to be read-only
+ * @param domain
+ * the editing domain context of the {@link eObject}
+ * @return
+ * whether the {@code eObject} could be made writable
+ */
+ public static boolean canMakeWritable(final EObject eObject, final EditingDomain domain) {
+ return canMakeWritable(ReadOnlyAxis.anyAxis(), eObject, domain);
+ }
+
+ /**
+ * Tests if an object that is read only could possibly be made writable according to any of
+ * the specified {@code axes} of read-only-ness.
+ *
+ * @param axes
+ * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
+ * @param eObject
+ * an object that is assumed to be read-only
+ * @param domain
+ * the editing domain context of the {@link eObject}
+ * @return
+ * whether the {@code eObject} could be made writable
+ */
+ public static boolean canMakeWritable(Set<ReadOnlyAxis> axes, final EObject eObject, final EditingDomain domain) {
+ if (domain != null) {
+ Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
+ if (handler instanceof IReadOnlyHandler2) {
+ return ((IReadOnlyHandler2) handler).canMakeWritable(axes, eObject).or(false);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Tests if a resource that is read only could possibly be made writable by some means (file system attributes, team provider hook, database
+ * permissions, etc.)
+ *
+ * @param resource
+ * a resource that is assumed to be read-only
+ * @param domain
+ * the editing domain context of the {@link resource}
+ * @return
+ * whether the {@code resource} could be made writable
+ */
+ public static boolean canMakeWritable(final Resource resource, final EditingDomain domain) {
+ return canMakeWritable(ReadOnlyAxis.anyAxis(), resource, domain);
+ }
+
+ /**
+ * Tests if a resource that is read only could possibly be made writable according to any of
+ * the specified {@code axes} of read-only-ness.
+ *
+ * @param axes
+ * a set if orthogonal axes of read-only-ness to consider. May be empty, but that would not be especially useful
+ * @param resource
+ * a resource that is assumed to be read-only
+ * @param domain
+ * the editing domain context of the {@link resource}
+ * @return
+ * whether the {@code resource} could be made writable
+ */
+ public static boolean canMakeWritable(Set<ReadOnlyAxis> axes, final Resource resource, final EditingDomain domain) {
+ if (domain != null) {
+ Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
+ if (handler instanceof IReadOnlyHandler2) {
+ return ((IReadOnlyHandler2) handler).canMakeWritable(axes, new URI[] { resource.getURI() }).or(false);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Tests if the given EStructuralFeature is required (ie. should always
+ * have a value)
+ *
+ * A feature is required if at least of one the following conditions if
+ * true :
+ *
+ * - It has a defaultValue
+ * - Its lowerBound is at least 1
+ * - It is an enumeration (Enumerations always have a default value)
+ * - It is a Java primitive type, and is not marked as Unsettable
+ *
+ * @param feature
+ * the feature to test
+ * @return
+ * true if the feature is required, false otherwise
+ */
+ public static boolean isRequired(final EStructuralFeature feature) {
+ EClassifier eType = feature.getEType();
+ if (eType == null) {
+ return false;
+ }
+
+ // EEnums are always required, as an EEnum always has a default value
+ if (eType instanceof EEnum) {
+ return true;
+ }
+
+ // At least one value means it is required
+ if (feature.getLowerBound() >= 1) {
+ return true;
+ }
+
+ // Java primitive types cannot have a null value
+ // if the feature is not specifically marked as unsettable, then it is required
+ if (eType.getInstanceClass() != null && eType.getInstanceClass().isPrimitive() && !feature.isUnsettable()) {
+ return true;
+ }
+
+ // If there is a default value, there is always a value
+ if (feature.getDefaultValueLiteral() != null) {
+ return true;
+ }
+
+ return false; // The property if not required
+ }
+
+ /**
+ * Returns all objects of type T contained in the resource
+ *
+ * @param resource
+ * @param type
+ * @return
+ */
+ public static <T> Set<T> allInstances(final Resource resource, Class<T> type) {
+ TreeIterator<EObject> iterator = resource.getAllContents();
+ Set<T> result = new LinkedHashSet<T>();
+
+ while (iterator.hasNext()) {
+ EObject element = iterator.next();
+ if (type.isInstance(element)) {
+ result.add(type.cast(element));
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Returns all the EPackages and nested EPackages contained in this resource
+ *
+ * @param resource
+ * @return
+ */
+ public static Set<EPackage> getAllEPackages(final Resource resource) {
+ Set<EPackage> result = new LinkedHashSet<EPackage>();
+
+ for (EObject rootElement : resource.getContents()) {
+ if (rootElement instanceof EPackage) {
+ result.add((EPackage) rootElement);
+ result.addAll(getAllNestedPackages((EPackage) rootElement));
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Returns all packages nested in the given EPackage (recursively). Does not
+ * include the base EPackage.
+ *
+ * @param basePackage
+ * @return
+ */
+ public static Set<EPackage> getAllNestedPackages(EPackage basePackage) {
+ Set<EPackage> result = new LinkedHashSet<EPackage>();
+
+ for (EPackage nestedPackage : basePackage.getESubpackages()) {
+ result.add(nestedPackage);
+ result.addAll(getAllNestedPackages(nestedPackage));
+ }
+
+ return result;
+ }
+
+ /**
+ *
+ * @param resource
+ * a resource
+ *
+ * @return
+ * the list of the metamodels known by the resource
+ */
+ public static Set<EPackage> getMetamodels(final Resource resource) {
+ Set<EPackage> metamodels = new HashSet<EPackage>();
+ if (resource != null) {
+ final List<EObject> contents = new ArrayList<EObject>(resource.getContents());
+ for (final EObject current : contents) {
+ metamodels.add(current.eClass().getEPackage());
+ }
+ }
+ return metamodels;
+ }
+
+ /**
+ *
+ * Returns the XMI ID of the given {@link EObject} or <code>null</code> if it cannot be resolved.
+ *
+ * @param object
+ * Object which we seek the XMI ID of.
+ * @return <code>object</code>'s XMI ID, <code>null</code> if not applicable.
+ */
+ public static final String getXMIID(final EObject object) {
+ String objectID = null;
+ if (object != null && object.eResource() instanceof XMIResource) {
+ objectID = ((XMIResource) object.eResource()).getID(object);
+ }
+ return objectID;
+ }
+
+
+
+ /**
+ * Gets the usages.
+ *
+ * @param source
+ * the source
+ *
+ * @return the usages or null if there is no usages
+ */
+ public static Collection<Setting> getUsages(EObject source) {
+ // the functional code is defined in core because we need it in infra.core
+ // but infra.core can't depend on infra.emf (circular dependency)
+ return org.eclipse.papyrus.infra.core.utils.EMFHelper.getUsages(source);
+ }
+
+
+ /**
+ * <pre>
+ * Test if the used element is referenced by other elements than the known
+ * referencer (except its container). It ignores references from an other meta-model.
+ * </pre>
+ *
+ * @param usedObject
+ * the used object
+ * @param knownReferencer
+ * the known referencer
+ * @return true if the known referencer is the only referencer.
+ */
+ public static boolean isOnlyUsage(EObject usedObject, EObject knownReferencer) {
+ boolean isUsed = false;
+ EPackage mmPackage = usedObject.eClass().getEPackage();
+
+ // Retrieve the list of elements referencing the usedObject.
+ Set<EObject> crossReferences = new HashSet<EObject>();
+ for (Setting setting : getUsages(usedObject)) {
+ EObject eObj = setting.getEObject();
+ if (eObj.eClass().getEPackage().equals(mmPackage)) {
+ crossReferences.add(eObj);
+ }
+ }
+
+ // Remove the container of used object.
+ crossReferences.remove(usedObject.eContainer());
+ // Remove the knownReferencer from the list of references.
+ crossReferences.remove(knownReferencer);
+
+ // If no referencer remains in the list, the known element is the only
+ // usage.
+ if (crossReferences.isEmpty()) {
+ isUsed = true;
+ }
+
+ return isUsed;
+ }
+
+ /**
+ *
+ * @param superType
+ * an eclassifier
+ * @param subType
+ * another eClassifier
+ * @return
+ * <code>true</code> if the 2nd {@link EClassifier} is a subtype of the first one
+ */
+ public static boolean isSuperType(final EClassifier superType, final EClassifier subType) {
+ if (superType == subType) {
+ return true;
+ }
+
+ if (superType instanceof EClass && subType instanceof EClass) {
+ // special case because isSuperTypeOf doesn't handle it
+ if (superType == EcorePackage.eINSTANCE.getEObject()) {
+ return true;
+ }
+
+ EClass superTypeEClass = (EClass) superType;
+ EClass subTypeEClass = (EClass) subType;
+ return superTypeEClass.isSuperTypeOf(subTypeEClass);
+ }
+
+ // manage EDtataType
+ if (superType == EcorePackage.eINSTANCE.getEDataType() && subType instanceof EDataType) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Computes the path from the root EObject to the given element, as a List of EObjects
+ *
+ * @param element
+ * @return
+ */
+ public static List<EObject> getContainmentPath(EObject element) {
+ List<EObject> result;
+ if (element.eContainer() == null) {
+ result = new LinkedList<EObject>();
+ result.add(element);
+ return result;
+ } else {
+ result = getContainmentPath(element.eContainer());
+ result.add(element);
+ }
+ return result;
+ }
+
+ /**
+ * Returns the given element, reloaded into the resource set of the context element,
+ * or the source element itself if not possible.
+ *
+ * Use this method for e.g. loading an element from a shared resource set into another resource set
+ * (Apply a registered profile/library, drop an element from the project explorer, ...)
+ *
+ * @param element
+ * @param contextElement
+ * @return
+ */
+ public static <T extends EObject> T reloadIntoContext(T element, EObject contextElement) {
+ ResourceSet sourceResourceSet = getResourceSet(element);
+ ResourceSet loadingContext = getResourceSet(contextElement);
+
+ if (sourceResourceSet == loadingContext || loadingContext == null) {
+ return element;
+ }
+
+ URI sourceURI = EcoreUtil.getURI(element);
+ EObject result = loadingContext.getEObject(sourceURI, true);
+
+ return (T) result;
+ }
+
+ /**
+ * Returns the resourceSet owning this eObject, or null if it is detached
+ *
+ * @param eObject
+ */
+ public static ResourceSet getResourceSet(EObject eObject) {
+ Resource resource = (eObject == null) ? null : eObject.eResource();
+ return (resource == null) ? null : resource.getResourceSet();
+ }
+
+ /**
+ * Best-effort loads a resource, returning the first root element of the requested {@code type}. Unlike the {@link #loadChecked(ResourceSet, URI, Class) loadChecked} method, this will never throw an exception.
+ *
+ * @param rset
+ * a resource set in which to load the resource
+ * @param uri
+ * the URI of the resource to load
+ * @param type
+ * the type of root element to retrieve
+ *
+ * @return the requested root element, or {@code null} if the resource does not contain such an element or could not be loaded
+ *
+ * @see #loadChecked(ResourceSet, URI, Class)
+ */
+ public static <T extends EObject> T load(ResourceSet rset, URI uri, Class<T> type) {
+ T result = null;
+
+ try {
+ result = loadChecked(rset, uri, type);
+ } catch (Exception e) {
+ Activator.log.error("Exception in loading resource " + uri, e); //$NON-NLS-1$
+
+ // Maybe it was partially loaded? If so, try again
+ Resource res = rset.getResource(uri, false);
+ if ((res != null) && res.isLoaded()) {
+ result = Iterables.getFirst(Iterables.filter(res.getContents(), type), null);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Best-effort loads a resource, returning the first root element of the requested {@code type}.
+ *
+ * @param rset
+ * a resource set in which to load the resource
+ * @param uri
+ * the URI of the resource to load
+ * @param type
+ * the type of root element to retrieve
+ *
+ * @return the requested root element, or {@code null} if the resource does not contain such an element or could not be loaded
+ * @throws IOException
+ * on an I/O problem in loading the resource
+ * @throw RuntimeException on any other unforeseen (usually programming error) problem
+ *
+ * @see #load(ResourceSet, URI, Class)
+ */
+ public static <T extends EObject> T loadChecked(ResourceSet rset, URI uri, Class<T> type) throws IOException {
+ try {
+ return Iterables.getFirst(Iterables.filter(rset.getResource(uri, true).getContents(), type), null);
+ } catch (WrappedException e) {
+ if (e.exception() instanceof IOException) {
+ throw (IOException) e.exception();
+ } else if (e.exception() instanceof RuntimeException) {
+ throw (RuntimeException) e.exception();
+ } else {
+ throw e;
+ }
+ }
+ }
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.project b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.project
index 16fd397042a..8368019aeaa 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.project
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/.project
@@ -20,9 +20,33 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/META-INF/MANIFEST.MF
index cddde77a32d..4ed317ef7fd 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/META-INF/MANIFEST.MF
@@ -7,26 +7,16 @@ Export-Package: org.eclipse.papyrus.infra.ui.emf.adapters,
org.eclipse.papyrus.infra.ui.emf.utils,
org.eclipse.papyrus.infra.ui.internal.emf;x-internal:=true,
org.eclipse.papyrus.infra.ui.internal.emf.expressions;x-internal:=true,
- org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers
-Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.emf.edit.ui;bundle-version="2.8.0",
- org.eclipse.emf.databinding;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.core.expressions;bundle-version="3.4.400",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.onefile;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui.internal.emf.readonly.handlers;x-internal:=true
+Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.databinding;bundle-version="[1.3.0,2.0.0)";visibility:=reexport,
+ org.eclipse.core.databinding.property;bundle-version="[1.6.0,2.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.notation;bundle-version="[1.8.0,2.0.0)",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.onefile;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[1.2.0,2.0.0)";visibility:=reexport
Bundle-Vendor: %pluginProvider
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.classpath b/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.classpath
index e4dad7e73e2..664b52ed755 100644
--- a/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.classpath
+++ b/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src-gen"/>
- <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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.project b/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.project
index ccfe5b57b73..46c71d72ecd 100644
--- a/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.project
+++ b/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/.project
@@ -20,9 +20,33 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/META-INF/MANIFEST.MF b/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/META-INF/MANIFEST.MF
index 11762be1a9c..a988e3a3387 100644
--- a/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/META-INF/MANIFEST.MF
+++ b/plugins/infra/filters/org.eclipse.papyrus.infra.filters.edit/META-INF/MANIFEST.MF
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.filters.provider
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.filters;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.emf.edit;bundle-version="2.11.0";visibility:=reexport,
- org.eclipse.uml2.types;bundle-version="2.0.0";visibility:=reexport,
- org.eclipse.uml2.common.edit;bundle-version="2.0.0";visibility:=reexport
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.papyrus.infra.filters;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.emf.edit;bundle-version="[2.11.0,3.0.0)";visibility:=reexport,
+ org.eclipse.uml2.types;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.uml2.common.edit;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/plugins/infra/filters/org.eclipse.papyrus.infra.filters/.project b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/.project
index bbf564865dc..8b80a6227c0 100644
--- a/plugins/infra/filters/org.eclipse.papyrus.infra.filters/.project
+++ b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/.project
@@ -20,10 +20,34 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.papyrus.emf.facet.common.ProjectNature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/filters/org.eclipse.papyrus.infra.filters/.settings/.api_filters b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/.settings/.api_filters
new file mode 100644
index 00000000000..93e4f961d9b
--- /dev/null
+++ b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.papyrus.infra.filters" version="2">
+ <resource path="META-INF/MANIFEST.MF">
+ <filter id="927989779">
+ <message_arguments>
+ <message_argument value="1.2.0"/>
+ <message_argument value="org.eclipse.uml2.common"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/infra/filters/org.eclipse.papyrus.infra.filters/META-INF/MANIFEST.MF b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/META-INF/MANIFEST.MF
index 975b7f92cfc..a298a1ab49f 100644
--- a/plugins/infra/filters/org.eclipse.papyrus.infra.filters/META-INF/MANIFEST.MF
+++ b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/META-INF/MANIFEST.MF
@@ -1,9 +1,8 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;bundle-version="2.11.0";visibility:=reexport,
- org.eclipse.uml2.types;bundle-version="2.0.0";visibility:=reexport,
- org.eclipse.uml2.common;visibility:=reexport,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0"
+Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.11.0,3.0.0)";visibility:=reexport,
+ org.eclipse.uml2.types;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.uml2.common;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)"
Export-Package: org.eclipse.papyrus.infra.filters,
org.eclipse.papyrus.infra.filters.impl,
org.eclipse.papyrus.infra.filters.internal;x-internal:=true,
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/.project b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/.project
index 62867c1fd82..e4a39af0e95 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/.project
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/.project
@@ -20,9 +20,27 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/META-INF/MANIFEST.MF
index b73cbc3a7aa..3fb6c54c087 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit/META-INF/MANIFEST.MF
@@ -1,22 +1,15 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.assistant.provider
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.gmfdiag.assistant;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.emf.edit;bundle-version="2.11.0";visibility:=reexport,
- org.eclipse.emf.ecore;bundle-version="2.11.0";visibility:=reexport,
- org.eclipse.emf.ecore.edit;bundle-version="2.9.0";visibility:=reexport,
- org.eclipse.papyrus.infra.filters;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.papyrus.infra.filters.edit;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.uml2.types;bundle-version="2.0.0";visibility:=reexport,
- org.eclipse.uml2.common.edit;bundle-version="2.0.0";visibility:=reexport,
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.assistant.provider.AssistantEditPlugin$Implementation
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.assistant.edit;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.assistant.provider
+Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.assistant;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.filters.edit;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.9.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.assistant.provider.AssistantEditPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.assistant.edit;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/.project b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/.project
index 2019bfd4ece..cf062ceb8dc 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/.project
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/.project
@@ -20,9 +20,27 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/META-INF/MANIFEST.MF
index 0b3afa38886..9b84e5825bf 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/META-INF/MANIFEST.MF
@@ -1,20 +1,17 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.assistant.presentation
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources;visibility:=reexport,
- org.eclipse.papyrus.infra.gmfdiag.assistant.edit;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.emf.ecore.xmi;bundle-version="2.11.0";visibility:=reexport,
- org.eclipse.emf.edit.ui;bundle-version="2.11.0";visibility:=reexport,
- org.eclipse.ui.ide;bundle-version="3.10.100";visibility:=reexport,
- org.eclipse.emf.ecore.edit;bundle-version="2.9.0";visibility:=reexport,
- org.eclipse.papyrus.infra.filters.edit;bundle-version="1.2.0";visibility:=reexport
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.assistant.presentation.AssistantEditorPlugin$Implementation
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.assistant.editor;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.assistant.presentation
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.gmfdiag.assistant.edit;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.emf.edit.ui;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)";visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.assistant.presentation.AssistantEditorPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.assistant.editor;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/.project b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/.project
index d213e8c37a5..cd99ffa33c9 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/.project
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/.project
@@ -20,9 +20,27 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/META-INF/MANIFEST.MF
index fc1e09a16dc..ac73c9d4d6d 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui/META-INF/MANIFEST.MF
@@ -1,21 +1,17 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime,
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.ui;bundle-version="3.107.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.assistant;bundle-version="1.2.0",
- org.eclipse.core.resources;bundle-version="3.9.100",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0"
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.assistant.internal.ui;x-internal:=true,
- org.eclipse.papyrus.infra.gmfdiag.assistant.internal.ui.handlers;x-internal:=true
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.assistant.internal.ui.Activator
-Bundle-ManifestVersion: 2
-Bundle-Description: %pluginDescription
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.assistant.ui;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.assistant;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[2.0.0,3.0.0)"
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.assistant.internal.ui;x-internal:=true,
+ org.eclipse.papyrus.infra.gmfdiag.assistant.internal.ui.handlers;x-internal:=true
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.assistant.internal.ui.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.assistant.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.project b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.project
index 465a683be7b..1ffc12045fe 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.project
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.project
@@ -20,9 +20,31 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.missing.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/META-INF/MANIFEST.MF
index 13911bc17f6..d9ced935578 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/META-INF/MANIFEST.MF
@@ -1,39 +1,26 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;bundle-version="2.11.0";visibility:=reexport,
- org.eclipse.emf.ecore.xmi;bundle-version="2.11.0";visibility:=reexport,
- org.eclipse.papyrus.infra.filters;bundle-version="1.2.0";visibility:=reexport