Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-01-17 17:27:59 +0000
committerChristian W. Damus2016-01-22 15:57:11 +0000
commitb089eab1fca586752027404cc398a173237337f8 (patch)
tree3d5f106bd6ba19ab6364284dec8cd34341cfd758 /plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml
parente8587f9c60ed458d6daee5128186f5b1ee54ac00 (diff)
downloadorg.eclipse.papyrus-b089eab1fca586752027404cc398a173237337f8.tar.gz
org.eclipse.papyrus-b089eab1fca586752027404cc398a173237337f8.tar.xz
org.eclipse.papyrus-b089eab1fca586752027404cc398a173237337f8.zip
Bug 485220: [Architecture] Provide a more modular architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485220 Move UI-dependent APIs from the org.eclipse.papyrus.infra.tools bundle to org.eclipse.papyrus.infra.ui. Accordingly move tests into a new org.eclipse.papyrus.infra.ui.tests bundle. Two crucial UI dependencies are inverted by introduction of new OSGi services with core interfaces specified in the non-UI layer: * IExecutorService extends Java Platform's ExecutorService with APIs for synchronous execution (a la Display.syncExec). A new CoreExecutors class in the infra.tools bundle supplies the instance provided by the OSGi service implementation in the infra.ui bundle. This provides compatibility for clients of various UIUtil APIs that they can no longer access * IContextualServiceRegistryTracker abstracts the concept of the default ServicesRegistry found in the currently active editor, which the ServiceUtilsForHandlers class (and hence all of its clients) relies on. Again an OSGi service implementation in the infra.ui bundle supplies the implementation of this tracker, which is exposed in infra.core through the service-utils API Also move UI-dependent APIs from the org.eclipse.papyrus.infra.core bundle into org.eclipse.papyrus.infra.ui. This includes * moving the 'papyrusDiagram' and 'papyrusContentOutline' extension points into the org.eclipse.papyrus.infra.ui namespace * moving various UI-related services such as EditorLifeycleManager, SaveLayoutBeforeClose, and the IMultiDiagramEditor, itself, into the org.eclipse.papyrus.infra.ui bundle This necessitates not only widespread refactorings on the moved APIs, but also concomitant move of other APIs in other bundles because they cannot plausibly use these moved APIs from their new home in org.eclipse.papyrus.infra.ui and/or they cannot reasonably also be moved to the UI bundle and/or they must be used by bundles that now have no UI dependency: * the DI/sash-windows EMF model is moved out of infra.core.sasheditor.di bundle into a new model-only org.eclipse.papyrus.infra.sashwindows.di bundle (which symbolic name incidentally now better reflects the contained Java package names) * the IPageManager and ILocalPageService interfaces are moved out of infra.core.sasheditor.di bundle because they need to remain accessible by headless code such as the edit advices that ensure deletion of sash-model pages for notations that are deleted. These are now in a package named org.eclipse.papyrus.infra.code.sashwindows.di.service. Accordingly the class hierarchy implementing the IPageManager interface is changed: the obsolete PageMngrImpl is deleted, replaced by a BasicPageManagerImpl which now the PageManagerImpl extends. A service factory creates the basic page manager in a headless context, but is overridden by the UI-aware implementation when the UI bundles are installed * the MultiDiagramEditorGefDelegate (which has a GEF 3 dependency) is moved from the org.eclipse.papyrus.infra.core.sasheditor bundle to a new org.eclipse.papyrus.infra.gmfdiag.gef bundle. Its usage for an adapter of ActionRegistry type is extracted out of the CoreMultiDiagramEditor class into a new external adapter-factory in the infra.gmfdiag.gef bundle Tests all still pass (inasmuch as they do in the nightly master builds). Change-Id: I573dee5d9312d6e5746d74575350d0152b591ab3
Diffstat (limited to 'plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml')
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml364
1 files changed, 11 insertions, 353 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml b/plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml
index 2879ff91084..06e5a11d674 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml
@@ -1,213 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
- <extension-point id="papyrusDiagram" name="PapyrusDiagram" schema="schema/papyrusDiagram.exsd"/>
<extension-point id="modelListener" name="ModelListener" schema="schema/modelListener.exsd"/>
- <extension-point id="papyrusContentOutline" name="PapyrusContentOutline" schema="schema/contentOutline.exsd"/>
<extension-point id="service" name="Service" schema="schema/service.exsd"/>
<extension-point id="model" name="plugin.xml.ModelName" schema="schema/model.exsd"/>
<extension-point id="transactionalEditingDomainProvider" name="transactionalEditingDomainProvider" schema="schema/transactionalEditingDomainProvider.exsd"/>
<extension-point id="sashModelProvider" name="Sash Model Providers" schema="schema/sashModelProvider.exsd"/>
<extension-point id="language" name="Modeling Language" schema="schema/language.exsd"/>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.infra.core.commands.dropdowncommand"
- icon="icons/papyrus/Papyrus_16x16.gif"
- label="Close Diagrams"
- style="pulldown"
- tooltip="Close Current Editor&apos;s Diagrams ">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
- <menuContribution
- locationURI="toolbar:org.eclipse.papyrus.uml.diagram.ui.toolbar">
- </menuContribution>
- <menuContribution
- locationURI="popup:org.eclipse.papyrus.infra.core.editor.ui.tabmenu?endof=tabcommands">
- <command
- commandId="org.eclipse.papyrus.infra.core.commands.closediagram"
- label="Close Diagram"
- style="push"
- tooltip="Close Currently Selected Diagram">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.core.commands.closealldiagram"
- label="Close All Diagrams"
- style="push"
- tooltip="Close All Opened Diagrams">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.core.commands.closeothersdiagrams"
- label="Close Other Diagrams"
- style="push"
- tooltip="Close All Diagrams except the selected one">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.core.sasheditor.command.tabdoubleclick"
- label="&amp;Rename Diagram"
- style="push"
- tooltip="Rename the diagram">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="menu:org.eclipse.papyrus.infra.core.commands.dropdowncommand">
- <command
- commandId="org.eclipse.papyrus.infra.core.commands.closediagram"
- style="push"
- tooltip="Close Currently Selected Diagram">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.core.commands.closealldiagram"
- label="Close All Diagrams"
- style="push"
- tooltip="Close All Opened Diagrams">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.core.commands.closeothersdiagrams"
- label="Close Other Diagrams"
- style="push"
- tooltip="Close All Diagrams except the selected one">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.infra.core.commands.privatePageLayout"
- label="Private Page Layout"
- style="toggle"
- tooltip="Store editor page layout privately, not shared in the DI file">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.papyrus.infra.core.commands.closealldiagram"
- name="Close All Diagrams">
- </command>
- <command
- id="org.eclipse.papyrus.infra.core.commands.closediagram"
- name="Close Diagram">
- </command>
- <command
- id="org.eclipse.papyrus.infra.core.commands.closeothersdiagrams"
- name="Close Other Diagrams">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.commands.CloseDiagramCommand"
- id="org.eclipse.papyrus.infra.core.commands.dropdowncommand"
- name="dropdown tool">
- </command>
- <command
- id="org.eclipse.papyrus.infra.core.sasheditor.command.tabdoubleclick"
- name="Rename diagram">
- </command>
- <command
- id="org.eclipse.papyrus.infra.core.commands.privatePageLayout"
- name="Private Page Layout"
- description="Store editor page layout privately, not shared in the DI file">
- <state
- id="org.eclipse.ui.commands.toggleState"
- class="org.eclipse.papyrus.infra.core.internal.commands.PageLayoutStorageState">
- </state>
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.commands.CloseDiagramCommand"
- commandId="org.eclipse.papyrus.infra.core.commands.closediagram">
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.commands.CloseAllDiagramsCommand"
- commandId="org.eclipse.papyrus.infra.core.commands.closealldiagram">
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.commands.CloseOtherDiagramsCommand"
- commandId="org.eclipse.papyrus.infra.core.commands.closeothersdiagrams">
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.core.internal.commands.TogglePageLayoutStorageHandler"
- commandId="org.eclipse.papyrus.infra.core.commands.privatePageLayout">
- </handler>
- </extension>
- <extension
+ <extension
point="org.eclipse.papyrus.infra.core.model">
<model
classname="org.eclipse.papyrus.infra.core.resource.sasheditor.SashModel"
@@ -263,130 +64,6 @@
serviceKeyRef="org.eclipse.papyrus.infra.core.resource.ModelSet">
</dependsOn>
</serviceFactory>
- <serviceFactory
- classname="org.eclipse.papyrus.infra.core.editor.PageIconRegistryServiceFactory"
- id="org.eclipse.papyrus.infra.core.editorsfactory.IPageIconsRegistry"
- priority="1"
- startKind="startup">
- </serviceFactory>
- <serviceFactory
- classname="org.eclipse.papyrus.infra.core.editor.DiSashModelManagerServiceFactory"
- description="The concrete implementation of SashContentProviderr and IPageMngr"
- id="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.DiSashModelManager"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceKeyRef="org.eclipse.emf.transaction.TransactionalEditingDomain">
- </dependsOn>
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.resource.ModelSet">
- </dependsOn>
- </serviceFactory>
- <serviceFactory
- classname="org.eclipse.papyrus.infra.core.editor.DiSashModelMngrServiceFactory"
- description="The concrete implementation of SashContentProviderr and IPageMngr"
- id="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.DiSashModelMngr"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceKeyRef="org.eclipse.emf.transaction.TransactionalEditingDomain">
- </dependsOn>
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.resource.ModelSet">
- </dependsOn>
- </serviceFactory>
- <serviceFactory
- classname="org.eclipse.papyrus.infra.core.editor.PageMngrServiceFactory"
- description="IPageMngr allows to add and remove pages to the editor."
- id="org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageMngr"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.DiSashModelManager">
- </dependsOn>
- </serviceFactory>
- <serviceFactory
- classname="org.eclipse.papyrus.infra.core.editor.ContentProviderServiceFactory"
- description="The SashContentProvider maintain the structure of pages of the editor."
- id="org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.DiSashModelManager">
- </dependsOn>
- </serviceFactory>
- <service
- classname="org.eclipse.papyrus.infra.core.lifecycleevents.SaveAndDirtyService"
- description="Service used to maintain the dirty state, and to perform save and saveAs"
- id="org.eclipse.papyrus.infra.core.lifecycleevents.ISaveAndDirtyService"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceKeyRef="org.eclipse.emf.transaction.TransactionalEditingDomain">
- </dependsOn>
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.resource.ModelSet">
- </dependsOn>
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor">
- </dependsOn>
- </service>
- <serviceFactory
- classname="org.eclipse.papyrus.infra.core.lifecycleevents.LifeCycleEventsProviderServiceFactory"
- description="Service allowing to listen on save events."
- id="org.eclipse.papyrus.infra.core.lifecycleevents.ILifeCycleEventsProvider"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceKeyRef=" org.eclipse.papyrus.infra.core.lifecycleevents.ISaveAndDirtyService">
- </dependsOn>
- </serviceFactory>
- <serviceFactory
- classname="org.eclipse.papyrus.infra.core.editor.PageMngrServiceFactory"
- description="IPageManager allows to add and remove pages to the editor."
- id="org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.DiSashModelManager">
- </dependsOn>
- </serviceFactory>
- <service
- classname="org.eclipse.papyrus.infra.core.services.ResourceUpdateService"
- id="org.eclipse.papyrus.infra.core.services.ResourceUpdateService"
- priority="1"
- startKind="startup">
- <dependsOn
- description="This service is used to reopen the IMultiDiagramEditor when changes are detected"
- serviceKeyRef="org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor">
- </dependsOn>
- </service>
- <service
- classname="org.eclipse.papyrus.infra.core.services.SaveLayoutBeforeClose"
- description="Saves the sash model when closing the editor"
- priority="1"
- startKind="startup">
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.resource.ModelSet">
- </dependsOn>
- <dependsOn
- serviceKeyRef="org.eclipse.papyrus.infra.core.services.EditorLifecycleManager">
- </dependsOn>
- </service>
- </extension>
- <extension
- point="org.eclipse.ui.exportWizards">
- <category
- id="org.eclipse.papyrus.infra.core.exportcategory"
- name="Papyrus">
- </category>
- </extension>
- <extension
- point="org.eclipse.ui.importWizards">
- <category
- id="org.eclipse.papyrus.infra.core.importcategory"
- name="Papyrus">
- </category>
</extension>
<extension
id="org.eclipse.papyrus.modelmarker"
@@ -400,20 +77,6 @@
</persistent>
</extension>
<extension
- point="org.eclipse.papyrus.infra.core.papyrusContentOutline">
- <contentoutline
- class="org.eclipse.papyrus.infra.core.contentoutline.NestedEditorDelegatedOutlinePage"
- description="Generic outline for Papyrus"
- priority="2">
- </contentoutline>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.core.papyrusDiagram">
- <editorDiagram
- factoryClass="org.eclipse.papyrus.infra.core.editorsfactory.anytype.AnyTypeEditorFactory">
- </editorDiagram>
- </extension>
- <extension
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.papyrus.infra.core.resource.ModelSet"
@@ -431,20 +94,15 @@
priority="10"
startKind="startup">
</service>
+ <serviceFactory
+ classname="org.eclipse.papyrus.infra.core.internal.sashmodel.BasicPageManagerServiceFactory"
+ description="Default IPageManager service for headless operation."
+ id="org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager"
+ priority="1"
+ startKind="startup">
+ <dependsOn
+ serviceKeyRef="org.eclipse.papyrus.infra.core.resource.ModelSet">
+ </dependsOn>
+ </serviceFactory>
</extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.papyrus.infra.core.internal.preferences.EditorPreferences$Initializer">
- </initializer>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
- class="org.eclipse.papyrus.infra.core.internal.preferences.EditorPreferencePage"
- id="org.eclipse.papyrus.infra.core.editorPrefs"
- name="Editor">
- </page>
- </extension>
</plugin>

Back to the top