Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-01-17 17:28:49 +0000
committerChristian W. Damus2016-01-22 15:57:12 +0000
commit652333238a0a1651c1b69a4563b72961250c5398 (patch)
tree36c503855e644803f2baeec27c47bb6d6ac56085 /extraplugins
parentb089eab1fca586752027404cc398a173237337f8 (diff)
downloadorg.eclipse.papyrus-652333238a0a1651c1b69a4563b72961250c5398.tar.gz
org.eclipse.papyrus-652333238a0a1651c1b69a4563b72961250c5398.tar.xz
org.eclipse.papyrus-652333238a0a1651c1b69a4563b72961250c5398.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.emf bundle to a new org.eclipse.papyrus.infra.ui.emf bundle. Accordingly move tests into a new org.eclipse.papyrus.infra.ui.emf.tests bundle. Now that we have an UI EMF bundle, move the editor-page advices from the infra.ui bundle into it, which is a more appropriate home for them. One UI dependency is removed by reordering of code in the EMFHelper::getEObject(Object) API: * the EMF Facet tree elements are once again IAdaptables, providing their encapsulated EObjects or EReferences as adapters. So, the case handling IAdaptable is moved ahead of the test for is-an-EObject because these tree elements are also EObjects but are not interesting in themselves Also, the dialog-settings for the EMF Facet customization manager are moved into the infra.ui.emf bundle, as is the lazy initialization of the manager from those settings. Clients are refactored to get the customization manager from this new bundle (via a new ProviderHelper API) to ensure this lazy initialization. Various UI-dependent ServiceUtilsForXyz classes that were in the infra.emf bundle but had nothing to do with EMF are moved into the infra.ui bundle. UI-dependent classes from the org.eclipse.papyrus.infra.emf.readonly bundle are moved into the org.eclipse.papyrus.infra.ui.emf, also. These include extraction of the editor reload listener from the ReadOnlyManager class by means of a new general-purpose IReadOnlyManagerProcessor OSGi service interface. Tests all still pass (inasmuch as they do in the nightly master builds). Change-Id: Ieb0993b2ed1a7a49890d3471c7b42bc4f218fec6
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java2
-rw-r--r--extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java2
-rw-r--r--extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java2
-rw-r--r--extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java2
-rw-r--r--extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java2
-rw-r--r--extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java2
-rw-r--r--extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java5
-rw-r--r--extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java8
-rw-r--r--extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java74
-rw-r--r--extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java2
-rw-r--r--extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java2
-rw-r--r--extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java2
-rw-r--r--extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java2
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java2
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF3
23 files changed, 75 insertions, 61 deletions
diff --git a/extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF b/extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF
index f288e71d01d..a1a5c31bcad 100644
--- a/extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF
+++ b/extraplugins/EFFBD/org.eclipse.papyrus.effbd/META-INF/MANIFEST.MF
@@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.tools.utils,
org.eclipse.papyrus.extensionpoints.editors,
org.eclipse.papyrus.infra.emf.appearance,
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java
index 1a9b80dc549..814a3c88824 100644
--- a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java
+++ b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/src/org/eclipse/papyrus/layers/stackmodel/diagram/ui/handlers/AbstractLayerCommand.java
@@ -26,7 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocument
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext;
import org.eclipse.papyrus.layers.runtime.NotationDiagramHelper;
import org.eclipse.papyrus.layers.runtime.model.LayersModel;
import org.eclipse.papyrus.layers.stackmodel.NotFoundException;
diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java
index 0abe0660f4a..36aff65c90a 100644
--- a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java
+++ b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayerStackCommand.java
@@ -26,7 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocument
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext;
import org.eclipse.papyrus.layers.runtime.NotationDiagramHelper;
import org.eclipse.papyrus.layers.runtime.model.LayersModel;
import org.eclipse.papyrus.layers.stackmodel.NotFoundException;
diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java
index 967aa5e65a5..49e6305b357 100644
--- a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java
+++ b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/commands/AbstractLayersCommand.java
@@ -31,7 +31,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext;
import org.eclipse.papyrus.layers.runtime.NotationDiagramHelper;
import org.eclipse.papyrus.layers.runtime.model.LayersModel;
import org.eclipse.papyrus.layers.stackmodel.NotFoundException;
diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java
index 85ef692b7a3..b33ede85147 100644
--- a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java
+++ b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/AttachDiagramSelectedItemsToCurrentLayer.java
@@ -32,7 +32,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext;
import org.eclipse.papyrus.layers.stackmodel.NotFoundException;
import org.eclipse.papyrus.layers.stackmodel.layers.Layer;
import org.eclipse.papyrus.layers3.ui.commands.AbstractLayersCommand;
diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java
index decec23faec..65fec475c3b 100644
--- a/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java
+++ b/extraplugins/layers/org.eclipse.papyrus.layers.ui/src/org/eclipse/papyrus/layers3/ui/handlers/RemoveDiagramSelectedItemsFromCurrentLayer.java
@@ -32,7 +32,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForIEvaluationContext;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForIEvaluationContext;
import org.eclipse.papyrus.layers.stackmodel.NotFoundException;
import org.eclipse.papyrus.layers.stackmodel.layers.Layer;
import org.eclipse.papyrus.layers3.ui.commands.AbstractLayersCommand;
diff --git a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java
index 5131d325044..0fc7988ca58 100644
--- a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java
+++ b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java
@@ -41,7 +41,7 @@ import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.papyrus.texteditor.cdt.Activator;
import org.eclipse.papyrus.texteditor.cdt.TextEditorConstants;
import org.eclipse.papyrus.texteditor.cdt.editor.PapyrusCDTEditor;
diff --git a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF
index 9228e09c908..b8bcf9e2ee4 100644
--- a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF
+++ b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/META-INF/MANIFEST.MF
@@ -35,7 +35,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
org.eclipse.ui,
org.eclipse.papyrus.codegen.extensionpoints;bundle-version="1.2.0",
- org.eclipse.uml2.uml.profile.standard;bundle-version="1.0.100"
+ org.eclipse.uml2.uml.profile.standard;bundle-version="1.0.100",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java
index 1ec058df103..6a3bb2e68ec 100644
--- a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java
+++ b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/CommandSupport.java
@@ -29,7 +29,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
/**
* Utility function. Allow execution of commands on a transactional command stack
@@ -89,8 +89,7 @@ public class CommandSupport {
public static void exec(TransactionalEditingDomain domain, String label, final Runnable command) {
if (domain == null) {
command.run();
- }
- else {
+ } else {
IOperationHistory history = OperationHistoryFactory.getOperationHistory();
try {
history.execute(new AbstractTransactionalCommand(domain, label, Collections.EMPTY_LIST) {
diff --git a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF
index e34e95512eb..b5e652c6ee3 100644
--- a/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/qompass/designer/org.eclipse.papyrus.qompass.designer.ui/META-INF/MANIFEST.MF
@@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.tools.utils;bundle-version="1.2.0",
org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.2.0",
org.eclipse.papyrus.qompass.designer.core;bundle-version="1.2.0",
- org.eclipse.papyrus.qompass.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.qompass.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF b/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF
index 36e9fe9b7ba..3f019c3f448 100644
--- a/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF
+++ b/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui,
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.gmfdiag.commands;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Export-Package: org.eclipse.papyrus.infra.services.tracepoints,
org.eclipse.papyrus.infra.services.tracepoints.commands,
org.eclipse.papyrus.infra.services.tracepoints.dialogs,
diff --git a/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java b/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java
index 5f4c6281690..38a5e2884b8 100644
--- a/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java
+++ b/extraplugins/qompass/designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java
@@ -27,8 +27,8 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.services.tracepoints.Activator;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.ui.PlatformUI;
/**
@@ -50,7 +50,7 @@ public abstract class AbstractCommandHandler extends AbstractHandler {
* Returns the command to execute (to be implemented
* in children implementing this class)
*
- * @return the command to execute
+ * @return the command to execute
*
* </pre>
*/
@@ -111,14 +111,14 @@ public abstract class AbstractCommandHandler extends AbstractHandler {
for (Object current : structuredSelection.toArray()) {
// Adapt current selection to EObject
if (current instanceof IAdaptable) {
- selectedEObjects.add((EObject) ((IAdaptable) current).getAdapter(EObject.class));
+ selectedEObjects.add(((IAdaptable) current).getAdapter(EObject.class));
}
}
} else { // Not a IStructuredSelection
if (selection != null) {
// Adapt current selection to EObject
if (selection instanceof IAdaptable) {
- selectedEObjects.add((EObject) ((IAdaptable) selection).getAdapter(EObject.class));
+ selectedEObjects.add(((IAdaptable) selection).getAdapter(EObject.class));
}
}
}
diff --git a/extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java b/extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java
index 04451a3d718..1cca6515f1f 100644
--- a/extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java
+++ b/extraplugins/req/org.eclipse.papyrus.req.domainModel2Profile/src/org/eclipse/papyrus/req/domainModel2Profile/handler/PapyrusAbstractHandler.java
@@ -26,8 +26,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Element;
@@ -38,79 +38,85 @@ import org.eclipse.uml2.uml.Element;
*/
public abstract class PapyrusAbstractHandler extends AbstractHandler {
- protected TransactionalEditingDomain transactionalEditingDomain=null;
+ protected TransactionalEditingDomain transactionalEditingDomain = null;
protected IMultiDiagramEditor papyrusEditor;
/**
* install element of Papyrus in order to execute commands
- * @param event the context of the execution
+ *
+ * @param event
+ * the context of the execution
*/
- protected void setPapyrusEnvironment(ExecutionEvent event){
- //look for papyrus
+ protected void setPapyrusEnvironment(ExecutionEvent event) {
+ // look for papyrus
try {
papyrusEditor = ServiceUtilsForHandlers.getInstance().getService(IMultiDiagramEditor.class, event);
- transactionalEditingDomain= ServiceUtilsForHandlers.getInstance().getService(org.eclipse.emf.transaction.TransactionalEditingDomain.class, event);
+ transactionalEditingDomain = ServiceUtilsForHandlers.getInstance().getService(org.eclipse.emf.transaction.TransactionalEditingDomain.class, event);
} catch (ServiceException ex) {
System.err.println(ex);
}
}
+
/**
* getSelected element in the diagram or in the model explorer
+ *
* @return Element or null
*/
- protected Element getSelection(){
- org.eclipse.uml2.uml.Element selectedElement =null;
+ protected Element getSelection() {
+ org.eclipse.uml2.uml.Element selectedElement = null;
ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
- //look for papyrus
- if(selection instanceof IStructuredSelection) {
- Object selectedobject = ((IStructuredSelection)selection).getFirstElement();
- if(selectedobject instanceof GraphicalEditPart) {
- Object graphicalElement = ((GraphicalEditPart)selectedobject).getModel();
- if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
- selectedElement = (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement();
+ // look for papyrus
+ if (selection instanceof IStructuredSelection) {
+ Object selectedobject = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedobject instanceof GraphicalEditPart) {
+ Object graphicalElement = ((GraphicalEditPart) selectedobject).getModel();
+ if ((graphicalElement instanceof View) && ((View) graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
+ selectedElement = (org.eclipse.uml2.uml.Element) ((View) graphicalElement).getElement();
}
- }
- else if(selectedobject instanceof IAdaptable) {
- EObject selectedEObject = (EObject)((IAdaptable)selectedobject).getAdapter(EObject.class);
- if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
- selectedElement=(Element)selectedEObject;
+ } else if (selectedobject instanceof IAdaptable) {
+ EObject selectedEObject = ((IAdaptable) selectedobject).getAdapter(EObject.class);
+ if (selectedEObject instanceof org.eclipse.uml2.uml.Element) {
+ selectedElement = (Element) selectedEObject;
}
}
}
return selectedElement;
}
- public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
setPapyrusEnvironment(event);
return null;
}
+
/**
* getSelected element in the diagram or in the model explorer
+ *
* @return Element or null
*/
- protected ArrayList<Element> getSelectionSet(){
- ArrayList<Element> selectedSet =new ArrayList<Element>();
+ protected ArrayList<Element> getSelectionSet() {
+ ArrayList<Element> selectedSet = new ArrayList<Element>();
ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ISelection selection = selectionService.getSelection();
- if(selection instanceof IStructuredSelection) {
+ if (selection instanceof IStructuredSelection) {
@SuppressWarnings("rawtypes")
- Iterator selectedobjectIteractor = ((IStructuredSelection)selection).iterator();
+ Iterator selectedobjectIteractor = ((IStructuredSelection) selection).iterator();
while (selectedobjectIteractor.hasNext()) {
Object currentSelection = selectedobjectIteractor.next();
- if(currentSelection instanceof GraphicalEditPart) {
- Object graphicalElement = ((GraphicalEditPart)currentSelection).getModel();
- if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
- selectedSet.add( (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement());
+ if (currentSelection instanceof GraphicalEditPart) {
+ Object graphicalElement = ((GraphicalEditPart) currentSelection).getModel();
+ if ((graphicalElement instanceof View) && ((View) graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
+ selectedSet.add((org.eclipse.uml2.uml.Element) ((View) graphicalElement).getElement());
}
- }
- else if(currentSelection instanceof IAdaptable) {
- EObject selectedEObject = (EObject)((IAdaptable)currentSelection).getAdapter(EObject.class);
- if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
- selectedSet.add((Element)selectedEObject);
+ } else if (currentSelection instanceof IAdaptable) {
+ EObject selectedEObject = ((IAdaptable) currentSelection).getAdapter(EObject.class);
+ if (selectedEObject instanceof org.eclipse.uml2.uml.Element) {
+ selectedSet.add((Element) selectedEObject);
}
}
}
diff --git a/extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF b/extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF
index 0094ab34909..2b0b12345d6 100644
--- a/extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF
+++ b/extraplugins/req/org.eclipse.papyrus.req.reqif/META-INF/MANIFEST.MF
@@ -36,7 +36,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.emf.facet.efacet.core,
org.eclipse.papyrus.emf.facet.efacet.metamodel,
org.eclipse.papyrus.emf.facet.query.java.core,
- org.eclipse.papyrus.infra.widgets.toolbox
+ org.eclipse.papyrus.infra.widgets.toolbox,
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.req.reqif;uses:="org.osgi.framework,org.eclipse.ui.plugin",
diff --git a/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java b/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java
index a94a6785488..b132e6fb77e 100644
--- a/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java
+++ b/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/integration/assistant/AbstractWizardForPapyrus.java
@@ -27,7 +27,7 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.IWorkbench;
diff --git a/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF b/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF
index b6e4bbef5f7..e067a571143 100644
--- a/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF
+++ b/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
org.eclipse.core.expressions;bundle-version="3.5.0",
org.eclipse.papyrus.req.domainModel2Profile;bundle-version="0.7.0",
org.eclipse.papyrus.uml.profile.drafter;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.req.sysml.assistant,
diff --git a/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java b/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java
index 2f5c089dd9f..dd999d97ba2 100644
--- a/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java
+++ b/extraplugins/req/org.eclipse.papyrus.req.sysml.assistant/src/org/eclipse/papyrus/req/sysml/assistant/handler/PapyrusAbstractHandler.java
@@ -26,8 +26,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Element;
diff --git a/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF b/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF
index 864a4f7d717..158611f060a 100644
--- a/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF
+++ b/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core,
org.eclipse.papyrus.uml.extensionpoints,
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.req.sysml.traceabilityassistant.analysis,
org.eclipse.papyrus.req.sysml.traceabilityassistant.command
diff --git a/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java b/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java
index b188b25eeec..18ae6fe85b8 100644
--- a/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java
+++ b/extraplugins/req/org.eclipse.papyrus.req.sysml.traceabilityassistant/src/org/eclipse/papyrus/req/sysml/traceabilityassistant/handler/ApplyTracabilityHandler.java
@@ -26,8 +26,8 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.ui.util.EditorUtils;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
import org.eclipse.papyrus.req.sysml.traceabilityassistant.analysis.TracabilityAnalyzer;
import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
diff --git a/extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF b/extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF
index 2f58390c8e4..61d2c2eaab4 100644
--- a/extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF
+++ b/extraplugins/revision/org.eclipse.papyrus.revisiontool/META-INF/MANIFEST.MF
@@ -33,7 +33,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
org.eclipse.papyrus.infra.services.edit,
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.papyrus.revision.tool,
org.eclipse.papyrus.revision.tool.core,
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
index eee9e4b07a2..46642f05607 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
@@ -21,8 +21,8 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.ModelsReader;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java
index 2af9390d38b..ffd04dc050d 100644
--- a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java
@@ -24,8 +24,8 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.ModelsReader;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
import org.eclipse.papyrus.soaml.diagram.common.Activator;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.IEditorPart;
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF
index 07c15ecf974..0cd52338d3e 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF
@@ -27,7 +27,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.sync;bundle-version="1.2.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0"
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier

Back to the top