Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-05-02 17:12:40 +0000
committercletavernie2013-05-02 17:12:40 +0000
commitaf129eadd962673d4af20467774e43adf4364535 (patch)
tree8e554affe00702a80987394761172a945d24bd41 /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties
parentd6ccc58a7bc604352ed98ab02e72619a2c2bf19a (diff)
downloadorg.eclipse.papyrus-af129eadd962673d4af20467774e43adf4364535.tar.gz
org.eclipse.papyrus-af129eadd962673d4af20467774e43adf4364535.tar.xz
org.eclipse.papyrus-af129eadd962673d4af20467774e43adf4364535.zip
407086: [All Diagrams] Databinding for GMF elements should be moved to infra.gmfdiag.common plugin
https://bugs.eclipse.org/bugs/show_bug.cgi?id=407086
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AbstractCustomStyleListValueCommand.java95
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AbstractCustomStyleObservableValue.java115
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AddAllCustomStyleListValueCommand.java47
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AddCustomStyleListValueCommand.java44
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomBooleanStyleObservableList.java24
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomBooleanStyleObservableValue.java48
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomEObjectStyleObservableList.java25
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomEObjectStyleObservableValue.java49
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomIntStyleObservableList.java24
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomIntStyleObservableValue.java48
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStringStyleObservableList.java24
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStringStyleObservableValue.java48
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStyleObservableList.java149
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStyleValueCommand.java84
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/RemoveAllCustomStyleListValueCommand.java39
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/RemoveCustomStyleListValueCommand.java36
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/SetCustomStyleListValueCommand.java39
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/CustomStyleModelElement.java16
19 files changed, 9 insertions, 948 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
index ae3cd45b5b1..ef95f008731 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
@@ -20,8 +20,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.tools;bundle-version="0.10.0",
org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.2.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.0"
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom,
- org.eclipse.papyrus.infra.gmfdiag.properties.extension,
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.properties.extension,
org.eclipse.papyrus.infra.gmfdiag.properties.modelelement
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AbstractCustomStyleListValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AbstractCustomStyleListValueCommand.java
deleted file mode 100644
index 42d01b914da..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AbstractCustomStyleListValueCommand.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public abstract class AbstractCustomStyleListValueCommand extends AbstractCommand {
-
- protected View view;
-
- protected EClass styleClass;
-
- protected String styleName;
-
- protected boolean needsCreate;
-
- protected EStructuralFeature styleFeature;
-
- protected EditingDomain domain;
-
- protected Command command;
-
- protected NamedStyle style;
-
- public AbstractCustomStyleListValueCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature) {
- this.view = view;
- this.styleName = styleName;
- this.styleClass = styleClass;
- this.styleFeature = styleFeature;
- this.domain = domain;
- }
-
- public void execute() {
- //FIXME: Related to CompoundCommand vs StrictCompoundCommand.
- //Sometimes, canExecute() is not called, and the command is not prepared
- if(!isPrepared) {
- prepare();
- isPrepared = true;
- }
-
- if(needsCreate) {
- view.getStyles().add(style);
- }
- command.execute();
- }
-
- public void redo() {
- execute();
- }
-
- @Override
- public boolean prepare() {
- style = view.getNamedStyle(styleClass, styleName);
-
- if(needsCreate = (style == null)) {
- style = (NamedStyle)NotationFactory.eINSTANCE.create(styleClass);
- style.setName(styleName);
- }
-
- command = createCommand();
-
- // return true;
- return command.canExecute();
- }
-
- protected abstract Command createCommand();
-
- @Override
- public void undo() {
- EList currentList = (EList)(style.eGet(styleFeature));
- command.undo();
- if(needsCreate) {
- view.getStyles().remove(style);
- }
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AbstractCustomStyleObservableValue.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AbstractCustomStyleObservableValue.java
deleted file mode 100644
index 6564c946446..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AbstractCustomStyleObservableValue.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.listener.CustomStyleListener;
-import org.eclipse.papyrus.uml.tools.databinding.CommandBasedObservableValue;
-
-/**
- * Abstract implementation for an ObservableValue associated to a GMF custom
- * style (NamedStyle).
- *
- * @author Camille Letavernier
- *
- */
-public abstract class AbstractCustomStyleObservableValue extends AbstractObservableValue implements CommandBasedObservableValue, IChangeListener {
-
- protected View source;
-
- protected EditingDomain domain;
-
- protected String styleName;
-
- protected Object lastValue;
-
- protected CustomStyleListener listener;
-
- protected EClass styleClass;
-
- protected EStructuralFeature styleFeature;
-
- public AbstractCustomStyleObservableValue(View source, EditingDomain domain, String styleName, EClass styleClass, EStructuralFeature styleFeature) {
- this.source = source;
- this.domain = domain;
- this.styleName = styleName;
- this.styleClass = styleClass;
- this.styleFeature = styleFeature;
- source.eAdapters().add(listener = new CustomStyleListener(source, styleFeature, this, styleName));
- }
-
- public void handleChange(ChangeEvent event) {
-
- final Object oldValue = lastValue;
- final Object newValue = doGetValue();
-
- fireValueChange(new ValueDiff() {
-
- @Override
- public Object getOldValue() {
- return oldValue;
- }
-
- @Override
- public Object getNewValue() {
- return newValue;
- }
-
- });
- }
-
- @Override
- protected Object doGetValue() {
- NamedStyle valueStyle = source.getNamedStyle(styleClass, styleName);
- if(valueStyle != null) {
- lastValue = valueStyle.eGet(styleFeature);
- } else {
- lastValue = getDefaultValue();
- }
- return lastValue;
- }
-
- /**
- * Gets the default value when this style is not set.
- *
- * @return The default value for this NamedStyle
- */
- protected abstract Object getDefaultValue();
-
- @Override
- protected void doSetValue(Object value) {
- Command command = getCommand(value);
- domain.getCommandStack().execute(command);
- doGetValue(); //Refresh the lastValue
- }
-
- public Command getCommand(Object value) {
- return new CustomStyleValueCommand(source, value, styleClass, styleFeature, styleName);
- }
-
- @Override
- public void dispose() {
- source.eAdapters().remove(listener);
- listener.dispose();
- listener = null;
- super.dispose();
- }
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AddAllCustomStyleListValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AddAllCustomStyleListValueCommand.java
deleted file mode 100644
index cb4bfdefb9b..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AddAllCustomStyleListValueCommand.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class AddAllCustomStyleListValueCommand extends AbstractCustomStyleListValueCommand {
-
- protected int index = CommandParameter.NO_INDEX;
-
- protected Collection<?> values;
-
- protected Command command;
-
- public AddAllCustomStyleListValueCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Collection<?> values, int index) {
- super(domain, view, styleName, styleClass, styleFeature);
- this.index = index;
- this.values = values;
- }
-
- public AddAllCustomStyleListValueCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature feature, Collection<?> values) {
- this(domain, view, styleName, styleClass, feature, values, CommandParameter.NO_INDEX);
- }
-
- @Override
- protected Command createCommand() {
- return AddCommand.create(domain, style, styleFeature, values, index);
- }
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AddCustomStyleListValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AddCustomStyleListValueCommand.java
deleted file mode 100644
index 9ea23b3bb0c..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/AddCustomStyleListValueCommand.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class AddCustomStyleListValueCommand extends AbstractCustomStyleListValueCommand {
-
- protected int index = CommandParameter.NO_INDEX;
-
- protected Object value;
-
- public AddCustomStyleListValueCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Object value, int index) {
- super(domain, view, styleName, styleClass, styleFeature);
- this.index = index;
- this.value = value;
- }
-
- public AddCustomStyleListValueCommand(EditingDomain domain, View view, String styleName, EClass styleClass, EStructuralFeature styleFeature, Object value) {
- this(domain, view, styleName, styleClass, styleFeature, value, CommandParameter.NO_INDEX);
- }
-
- @Override
- protected Command createCommand() {
- return AddCommand.create(domain, style, styleFeature, value, index);
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomBooleanStyleObservableList.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomBooleanStyleObservableList.java
deleted file mode 100644
index 40d8555196f..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomBooleanStyleObservableList.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-
-public class CustomBooleanStyleObservableList extends CustomStyleObservableList {
-
- public CustomBooleanStyleObservableList(View view, EditingDomain domain, String styleName) {
- super(view, styleName, domain, NotationPackage.eINSTANCE.getBooleanListValueStyle(), NotationPackage.eINSTANCE.getBooleanListValueStyle_BooleanListValue());
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomBooleanStyleObservableValue.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomBooleanStyleObservableValue.java
deleted file mode 100644
index 007625bfea6..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomBooleanStyleObservableValue.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class CustomBooleanStyleObservableValue extends AbstractCustomStyleObservableValue {
-
- public CustomBooleanStyleObservableValue(View source, EditingDomain domain, String styleName) {
- super(source, domain, styleName, NotationPackage.eINSTANCE.getBooleanValueStyle(), NotationPackage.eINSTANCE.getBooleanValueStyle_BooleanValue());
- }
-
- public Object getValueType() {
- return Boolean.class;
- }
-
- /**
- * Gets the default value when this style is not set.
- * Subclasses may override
- *
- * @return The default value for this BooleanStyleValue
- */
- @Override
- protected Boolean getDefaultValue() {
- return false;
- }
-
- @Override
- public Command getCommand(Object value) {
- if(value instanceof Boolean) {
- return super.getCommand(value);
- }
- throw new IllegalArgumentException("The value " + value + " is not a valid Boolean Value");
- }
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomEObjectStyleObservableList.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomEObjectStyleObservableList.java
deleted file mode 100644
index eb18e625667..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomEObjectStyleObservableList.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-
-public class CustomEObjectStyleObservableList extends CustomStyleObservableList {
-
- //TODO: The super class is probably powerful enough to handle EObjects.
- public CustomEObjectStyleObservableList(View view, EditingDomain domain, String styleName) {
- super(view, styleName, domain, NotationPackage.eINSTANCE.getEObjectListValueStyle(), NotationPackage.eINSTANCE.getEObjectListValueStyle_EObjectListValue());
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomEObjectStyleObservableValue.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomEObjectStyleObservableValue.java
deleted file mode 100644
index 15513e59f37..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomEObjectStyleObservableValue.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class CustomEObjectStyleObservableValue extends AbstractCustomStyleObservableValue {
-
- public CustomEObjectStyleObservableValue(View source, EditingDomain domain, String styleName) {
- super(source, domain, styleName, NotationPackage.eINSTANCE.getEObjectValueStyle(), NotationPackage.eINSTANCE.getEObjectValueStyle_EObjectValue());
- }
-
- public Object getValueType() {
- return EObject.class;
- }
-
- /**
- * Gets the default value when this style is not set.
- * Subclasses may override
- *
- * @return The default value for this EObjectStyleValue
- */
- @Override
- protected EObject getDefaultValue() {
- return null;
- }
-
- @Override
- public Command getCommand(Object value) {
- if(value instanceof EObject) {
- return super.getCommand(value);
- }
- throw new IllegalArgumentException("The value " + value + " is not a valid EObject Value");
- }
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomIntStyleObservableList.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomIntStyleObservableList.java
deleted file mode 100644
index 5db23b5b195..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomIntStyleObservableList.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-
-public class CustomIntStyleObservableList extends CustomStyleObservableList {
-
- public CustomIntStyleObservableList(View view, EditingDomain domain, String styleName) {
- super(view, styleName, domain, NotationPackage.eINSTANCE.getIntListValueStyle(), NotationPackage.eINSTANCE.getIntListValueStyle_IntListValue());
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomIntStyleObservableValue.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomIntStyleObservableValue.java
deleted file mode 100644
index 2443e8136b2..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomIntStyleObservableValue.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class CustomIntStyleObservableValue extends AbstractCustomStyleObservableValue {
-
- public CustomIntStyleObservableValue(View source, EditingDomain domain, String styleName) {
- super(source, domain, styleName, NotationPackage.eINSTANCE.getIntValueStyle(), NotationPackage.eINSTANCE.getIntValueStyle_IntValue());
- }
-
- public Object getValueType() {
- return Integer.class;
- }
-
- /**
- * Gets the default value when this style is not set.
- * Subclasses may override
- *
- * @return The default value for this IntegerStyleValue
- */
- @Override
- protected Integer getDefaultValue() {
- return 0;
- }
-
- @Override
- public Command getCommand(Object value) {
- if(value instanceof Integer) {
- return super.getCommand(value);
- }
- throw new IllegalArgumentException("The value " + value + " is not a valid Integer Value");
- }
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStringStyleObservableList.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStringStyleObservableList.java
deleted file mode 100644
index 84dc817e020..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStringStyleObservableList.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-
-public class CustomStringStyleObservableList extends CustomStyleObservableList {
-
- public CustomStringStyleObservableList(View view, EditingDomain domain, String styleName) {
- super(view, styleName, domain, NotationPackage.eINSTANCE.getStringListValueStyle(), NotationPackage.eINSTANCE.getStringListValueStyle_StringListValue());
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStringStyleObservableValue.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStringStyleObservableValue.java
deleted file mode 100644
index f4d32f89dd2..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStringStyleObservableValue.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class CustomStringStyleObservableValue extends AbstractCustomStyleObservableValue {
-
- public CustomStringStyleObservableValue(View source, EditingDomain domain, String styleName) {
- super(source, domain, styleName, NotationPackage.eINSTANCE.getStringValueStyle(), NotationPackage.eINSTANCE.getStringValueStyle_StringValue());
- }
-
- public Object getValueType() {
- return String.class;
- }
-
- /**
- * Gets the default value when this style is not set.
- * Subclasses may override
- *
- * @return The default value for this StringStyleValue
- */
- @Override
- protected String getDefaultValue() {
- return ""; //$NON-NLS-1$
- }
-
- @Override
- public Command getCommand(Object value) {
- if(value instanceof String) {
- return super.getCommand(value);
- }
- throw new IllegalArgumentException("The value " + value + " is not a valid String Value");
- }
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStyleObservableList.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStyleObservableList.java
deleted file mode 100644
index b8d3095430b..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStyleObservableList.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import java.util.Collection;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.databinding.EMFObservableList;
-import org.eclipse.papyrus.infra.gmfdiag.common.listener.CustomStyleListener;
-import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
-
-
-public class CustomStyleObservableList extends EMFObservableList implements IChangeListener {
-
- protected EClass eClass;
-
- protected EStructuralFeature feature;
-
- protected String styleName;
-
- protected View view;
-
- protected EditingDomain domain;
-
- protected CustomStyleListener listener;
-
- protected boolean styleExists;
-
- protected boolean changing = false;
-
- //Equals to concreteList
- protected IObservableList observableConcreteList;
-
- // protected final List<?> transientList;
-
- public CustomStyleObservableList(View view, String styleName, EditingDomain domain, EClass eClass, EStructuralFeature feature) {
- super(getWrappedList(view, styleName, eClass, feature), domain, null, null);
- this.eClass = eClass;
- this.feature = feature;
- this.styleName = styleName;
- this.view = view;
- this.domain = domain;
- observableConcreteList = (IObservableList)concreteList;
- styleExists = isStyleCreated();
-
- view.eAdapters().add(listener = new CustomStyleListener(view, feature, this, styleName));
- }
-
- @Override
- public void commit(AbstractEditor editor) {
- changing = true;
- super.commit(editor);
- changing = false;
- }
-
- private boolean isStyleCreated() {
- return view.getNamedStyle(eClass, styleName) != null;
- }
-
- private static IObservableList getWrappedList(View view, String styleName, EClass eClass, EStructuralFeature feature) {
- NamedStyle style = view.getNamedStyle(eClass, styleName);
-
- if(style != null) {
- return EMFProperties.list(feature).observe(style);
- }
-
- //The style doesn't exist yet, we need to simulate it
- //(With an empty list)
- return new WritableList();
- }
-
- @Override
- public Command getAddCommand(int index, Object value) {
- return new AddCustomStyleListValueCommand(domain, view, styleName, eClass, feature, value, index);
- }
-
- @Override
- public Command getAddCommand(Object value) {
- return new AddCustomStyleListValueCommand(domain, view, styleName, eClass, feature, value);
- }
-
- @Override
- public Command getAddAllCommand(Collection<?> values) {
- return new AddAllCustomStyleListValueCommand(domain, view, styleName, eClass, feature, values);
- }
-
- @Override
- public Command getAddAllCommand(int index, Collection<?> values) {
- return new AddCustomStyleListValueCommand(domain, view, styleName, eClass, feature, values, index);
- }
-
- @Override
- public Command getRemoveCommand(Object value) {
- return new RemoveCustomStyleListValueCommand(domain, view, styleName, eClass, feature, value);
- }
-
- @Override
- public Command getRemoveAllCommand(Collection<?> values) {
- return new RemoveAllCustomStyleListValueCommand(domain, view, styleName, eClass, feature, values);
- }
-
- @Override
- public Command getSetCommand(int index, Object value) {
- return new SetCustomStyleListValueCommand(domain, view, styleName, eClass, feature, index, value);
- }
-
- public void handleChange(ChangeEvent event) {
- //If the ListValueStyle has been created or removed, we need to resync
- //the concrete list with it
- if(styleExists != (styleExists = isStyleCreated())) {
- observableConcreteList.dispose();
- concreteList = observableConcreteList = getWrappedList(view, styleName, eClass, feature);
- }
-
- //If this observable is not the source of the change, the wrapped
- //list should also be refreshed.
- if(!changing) {
- refreshCacheList();
- }
- }
-
- @Override
- public void dispose() {
- view.eAdapters().remove(listener);
- listener.dispose();
- listener = null;
- observableConcreteList.dispose();
- super.dispose();
- }
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStyleValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStyleValueCommand.java
deleted file mode 100644
index 7185225242a..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/CustomStyleValueCommand.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.View;
-
-public class CustomStyleValueCommand extends AbstractCommand {
-
- private boolean createStyle;
-
- private Object value;
-
- private Object oldValue;
-
- private EClass styleClass;
-
- private View view;
-
- private String styleName;
-
- private EStructuralFeature styleFeature;
-
- public CustomStyleValueCommand(View view, Object value, EClass styleClass, EStructuralFeature styleFeature, String styleName) {
- this.value = value;
- this.styleClass = styleClass;
- this.view = view;
- this.styleName = styleName;
- this.styleFeature = styleFeature;
- }
-
- public void execute() {
- NamedStyle valueStyle = view.getNamedStyle(styleClass, styleName);
- createStyle = valueStyle == null;
- if(createStyle) {
- valueStyle = createStyle();
- } else {
- oldValue = valueStyle.eGet(styleFeature);
- }
-
- valueStyle.eSet(styleFeature, value);
- if(createStyle) {
- view.getStyles().add(valueStyle);
- }
- }
-
- protected NamedStyle createStyle() {
- NamedStyle result = (NamedStyle)NotationFactory.eINSTANCE.create(styleClass);
- result.setName(styleName);
- return result;
- }
-
- public void redo() {
- execute();
- }
-
- @Override
- public void undo() {
- NamedStyle valueStyle = view.getNamedStyle(styleClass, styleName);;
- if(createStyle) {
- view.getStyles().remove(valueStyle);
- } else {
- valueStyle.eSet(styleFeature, oldValue);
- }
- }
-
- @Override
- public boolean prepare() {
- return true;
- }
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/RemoveAllCustomStyleListValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/RemoveAllCustomStyleListValueCommand.java
deleted file mode 100644
index a1813377652..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/RemoveAllCustomStyleListValueCommand.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class RemoveAllCustomStyleListValueCommand extends AbstractCustomStyleListValueCommand {
-
- protected Collection<?> values;
-
- public RemoveAllCustomStyleListValueCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, Collection<?> values) {
- super(domain, view, styleName, eClass, feature);
- this.values = values;
- }
-
- @Override
- protected Command createCommand() {
- return RemoveCommand.create(domain, style, styleFeature, values);
- }
-
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/RemoveCustomStyleListValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/RemoveCustomStyleListValueCommand.java
deleted file mode 100644
index 22adf4ae199..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/RemoveCustomStyleListValueCommand.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class RemoveCustomStyleListValueCommand extends AbstractCustomStyleListValueCommand {
-
- protected Object value;
-
- public RemoveCustomStyleListValueCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, Object value) {
- super(domain, view, styleName, eClass, feature);
- this.value = value;
- }
-
- @Override
- protected Command createCommand() {
- return RemoveCommand.create(domain, style, styleFeature, value);
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/SetCustomStyleListValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/SetCustomStyleListValueCommand.java
deleted file mode 100644
index 6e9df507e7d..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/custom/SetCustomStyleListValueCommand.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-
-
-public class SetCustomStyleListValueCommand extends AbstractCustomStyleListValueCommand {
-
- private int index;
-
- private Object value;
-
- public SetCustomStyleListValueCommand(EditingDomain domain, View view, String styleName, EClass eClass, EStructuralFeature feature, int index, Object value) {
- super(domain, view, styleName, eClass, feature);
- this.index = index;
- this.value = value;
- }
-
- @Override
- protected Command createCommand() {
- return SetCommand.create(domain, style, styleFeature, value, index);
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/CustomStyleModelElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/CustomStyleModelElement.java
index 6b2f340f712..2956c311344 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/CustomStyleModelElement.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/CustomStyleModelElement.java
@@ -15,14 +15,14 @@ import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom.CustomBooleanStyleObservableList;
-import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom.CustomBooleanStyleObservableValue;
-import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom.CustomEObjectStyleObservableList;
-import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom.CustomEObjectStyleObservableValue;
-import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom.CustomIntStyleObservableList;
-import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom.CustomIntStyleObservableValue;
-import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom.CustomStringStyleObservableList;
-import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.custom.CustomStringStyleObservableValue;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomBooleanStyleObservableList;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomBooleanStyleObservableValue;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomEObjectStyleObservableList;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomEObjectStyleObservableValue;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomIntStyleObservableList;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomIntStyleObservableValue;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomStringStyleObservableList;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomStringStyleObservableValue;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.creation.StringEditionFactory;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;

Back to the top