Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-01-15 18:27:40 +0000
committerChristian W. Damus2016-01-22 15:57:12 +0000
commit929e9738301b35cef5cc1ab00f47047671940bd5 (patch)
tree3557a10c2577b834d83909689755a39b86162517 /extraplugins
parent652333238a0a1651c1b69a4563b72961250c5398 (diff)
downloadorg.eclipse.papyrus-929e9738301b35cef5cc1ab00f47047671940bd5.tar.gz
org.eclipse.papyrus-929e9738301b35cef5cc1ab00f47047671940bd5.tar.xz
org.eclipse.papyrus-929e9738301b35cef5cc1ab00f47047671940bd5.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.constraints bundle to a new org.eclipse.papyrus.infra.constraints.ui bundle. Replace usage of ISelection and IStructuredSelection in Constraint and ConstraintEngine API methods with Object and Collection<?>, respectively. Move the ElementTypesPreferences class from the infra.elementtypesconfigurations bundle to a new infra.elementtypesconfigurations.ui bundle. For compatibility, it still persists its data via an `IMemento` in the preferences of the core `infra.elementtypesconfigurations` bundle. It implements a new provider extension interface that allows the core bundle's element-type registry to call out to it to get user-defined element types from the workspace. Move the RuntimeValuesEditionAdviceEditHelperAdvice class and some of its attendants from the infra.elementtypesconfigurations.emf bundle to the new infra.elementtypesconfigurations.ui bundle because it needs to open the EditionDialog to let the user edit objects. Likewise the similar APIs in the infra.extendedtypes bundle, including also the entire providers package for action-providers, with the ExtendedElementTypeActionService class, the IExtendedElementTypeActionProvider interface, and the corresponding extension point namespace. Move the ElementTypeValidator class from the infra.services.edit bundle to a new infra.services.edit.ui bundle. Other fixes for simple inessential UI dependencies and also conflicts in bundle classpaths (such as in the Sequence Diagram particularly) that cause deadlocks in class loading in a complete Papyrus environment, such as the AllTests suite. Factor the UI dependencies out of the infra.onefile bundle into a new infra.onefile.ui bundle. Tests all still pass (inasmuch as they do in the nightly master builds). Change-Id: I43510c84f54c3e0e52cd7d2aa3ca6aca95b894a7
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java7
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/PapyrusElementLabelProvider.java37
-rw-r--r--extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/src/org/eclipse/papyrus/uml/diagram/ecore/util/ConvertToEcoreUtil.java2
5 files changed, 10 insertions, 42 deletions
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF
index de765e3afb5..8344552be2b 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF
@@ -53,7 +53,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.emf.facet.custom.metamodel;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;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.onefile.ui;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java
index a8ad07a9e24..a4c375cd895 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/ModelImportNodeLabelProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 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
@@ -8,6 +8,8 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
*****************************************************************************/
package org.eclipse.papyrus.cdo.internal.ui.providers;
@@ -22,6 +24,7 @@ import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.papyrus.cdo.core.importer.IModelTransferNode;
import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
import org.eclipse.papyrus.cdo.internal.ui.util.CompositeLabelProvider;
+import org.eclipse.papyrus.infra.onefile.ui.providers.PapyrusLabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.model.WorkbenchLabelProvider;
@@ -30,7 +33,7 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
*/
public class ModelImportNodeLabelProvider implements ILabelProvider {
- private final ILabelProvider delegate = new CompositeLabelProvider(new PapyrusElementLabelProvider(), new WorkbenchLabelProvider());
+ private final ILabelProvider delegate = new CompositeLabelProvider(new PapyrusLabelProvider(), new WorkbenchLabelProvider());
public ModelImportNodeLabelProvider() {
super();
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/PapyrusElementLabelProvider.java b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/PapyrusElementLabelProvider.java
deleted file mode 100644
index 548ecc72505..00000000000
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/providers/PapyrusElementLabelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 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.cdo.internal.ui.providers;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.papyrus.infra.onefile.model.IPapyrusElement;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * This is the PapyrusElementLabelProvider type. Enjoy.
- */
-public class PapyrusElementLabelProvider
- extends LabelProvider {
-
- @Override
- public Image getImage(Object element) {
- return (element instanceof IPapyrusElement)
- ? ((IPapyrusElement) element).getImage()
- : null;
- }
-
- @Override
- public String getText(Object element) {
- return (element instanceof IPapyrusElement)
- ? ((IPapyrusElement) element).getText()
- : null;
- }
-} \ No newline at end of file
diff --git a/extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/META-INF/MANIFEST.MF b/extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/META-INF/MANIFEST.MF
index ea1fe55af6c..de25edf6f38 100644
--- a/extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/META-INF/MANIFEST.MF
+++ b/extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/META-INF/MANIFEST.MF
@@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.onefile;bundle-version="1.2.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.uml2.examples.uml.ui;bundle-version="5.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.onefile.ui;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 0.7.0.qualifier
diff --git a/extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/src/org/eclipse/papyrus/uml/diagram/ecore/util/ConvertToEcoreUtil.java b/extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/src/org/eclipse/papyrus/uml/diagram/ecore/util/ConvertToEcoreUtil.java
index 29f34577523..842f79d28b0 100644
--- a/extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/src/org/eclipse/papyrus/uml/diagram/ecore/util/ConvertToEcoreUtil.java
+++ b/extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore/src/org/eclipse/papyrus/uml/diagram/ecore/util/ConvertToEcoreUtil.java
@@ -28,7 +28,7 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
-import org.eclipse.papyrus.infra.onefile.providers.PapyrusLabelProvider;
+import org.eclipse.papyrus.infra.onefile.ui.providers.PapyrusLabelProvider;
import org.eclipse.uml2.common.util.UML2Util;
import org.eclipse.uml2.examples.uml.ui.UMLExamplesUIPlugin;
import org.eclipse.uml2.uml.Package;

Back to the top