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/qompass/designer
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/qompass/designer')
-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
5 files changed, 12 insertions, 10 deletions
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));
}
}
}

Back to the top