Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2011-12-22 09:39:29 -0500
committercletavernie2011-12-22 09:39:29 -0500
commit528c01335d849caa29dc88e5bac03c06635f3ccd (patch)
treecdc4a5398b734dcd580b4d1afaa6f4c96849e592 /plugins/customization
parentce71958c25fa13b2fc28d1dce03f9b7460db0852 (diff)
downloadorg.eclipse.papyrus-528c01335d849caa29dc88e5bac03c06635f3ccd.tar.gz
org.eclipse.papyrus-528c01335d849caa29dc88e5bac03c06635f3ccd.tar.xz
org.eclipse.papyrus-528c01335d849caa29dc88e5bac03c06635f3ccd.zip
351802: [Constraints] The Property View constraints model should be more generic
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351802
Diffstat (limited to 'plugins/customization')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ContextEditorActionBarContributor.java25
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ViewFilter.java2
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java5
3 files changed, 17 insertions, 15 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ContextEditorActionBarContributor.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ContextEditorActionBarContributor.java
index 93b3575de31..4e232a3ff2a 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ContextEditorActionBarContributor.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ContextEditorActionBarContributor.java
@@ -12,6 +12,7 @@
package org.eclipse.papyrus.customization.properties.editor;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
@@ -27,7 +28,6 @@ import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.papyrus.customization.properties.editor.actions.CreateSectionAction;
import org.eclipse.papyrus.customization.properties.editor.actions.CreateSectionWidgetAction;
import org.eclipse.papyrus.customization.properties.editor.actions.MoDiscoCopyAction;
import org.eclipse.papyrus.customization.properties.editor.actions.MoDiscoCutAction;
@@ -225,17 +225,18 @@ public class ContextEditorActionBarContributor extends EcoreActionBarContributor
* The list of newly created {@link IAction}s
*/
protected Collection<IAction> createChildForView(ISelection selection, View view) {
- Collection<IAction> actions = new LinkedList<IAction>();
- if(view.getContext() == null) {
- return actions;
- }
-
- String sectionName = getSectionName(view.getContext());
- String sectionFile = getSectionFile(sectionName);
- IAction action = new CreateSectionAction(selection, sectionName, sectionFile);
- actions.add(action);
-
- return actions;
+ return Collections.EMPTY_LIST;
+ // Collection<IAction> actions = new LinkedList<IAction>();
+ // if(view.getContext() == null) {
+ // return actions;
+ // }
+ //
+ // String sectionName = getSectionName(view.getContext());
+ // String sectionFile = getSectionFile(sectionName);
+ // IAction action = new CreateSectionAction(selection, sectionName, sectionFile);
+ // actions.add(action);
+ //
+ // return actions;
}
/**
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ViewFilter.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ViewFilter.java
index f8ef8b7a82c..4ef44922cc4 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ViewFilter.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/ViewFilter.java
@@ -56,7 +56,7 @@ public class ViewFilter extends ViewerFilter {
}
return matcher.match(viewName);
} else if(eObject instanceof DataContextPackage) {
- //FIXME : Le filtre ne fonctionne pas correctement pour afficher un DCElement dans un Package
+ //FIXME : The filter doesn't work correctly for displaying a DataContextElement in a Package
return select((DataContextPackage)eObject);
} else if(eObject instanceof DataContextElement) {
return select((DataContextElement)eObject);
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java
index 247c5eb2b9e..a41e350993e 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java
@@ -28,6 +28,7 @@ import org.eclipse.papyrus.customization.properties.providers.PropertyContentPro
import org.eclipse.papyrus.customization.properties.providers.PropertyEditorTypeContentProvider;
import org.eclipse.papyrus.customization.properties.providers.TabContentProvider;
import org.eclipse.papyrus.infra.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.infra.constraints.providers.ConstraintTypeContentProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
@@ -80,9 +81,10 @@ public class CustomizationModelElement extends AbstractModelElement {
providers = new HashMap<EClassifier, IStaticContentProvider>();
providers.put(EnvironmentPackage.eINSTANCE.getCompositeWidgetType(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_CompositeWidgetTypes()));
providers.put(EnvironmentPackage.eINSTANCE.getStandardWidgetType(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_WidgetTypes()));
- providers.put(org.eclipse.papyrus.infra.constraints.environment.EnvironmentPackage.eINSTANCE.getConstraintType(), new EnvironmentContentProvider(org.eclipse.papyrus.infra.constraints.environment.EnvironmentPackage.eINSTANCE.getConstraintEnvironment_ConstraintTypes()));
providers.put(EnvironmentPackage.eINSTANCE.getLayoutType(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_LayoutTypes()));
providers.put(EnvironmentPackage.eINSTANCE.getModelElementFactoryDescriptor(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_ModelElementFactories()));
+
+ providers.put(org.eclipse.papyrus.infra.constraints.environment.EnvironmentPackage.eINSTANCE.getConstraintType(), new ConstraintTypeContentProvider());
}
@Override
@@ -139,7 +141,6 @@ public class CustomizationModelElement extends AbstractModelElement {
@Override
public ILabelProvider getLabelProvider(String propertyPath) {
return new ContextLabelProvider();
- // return new EMFObjectLabelProvider();
}
@Override

Back to the top