Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-04-04 14:07:24 +0000
committerLaurent Wouters2014-04-04 14:07:24 +0000
commitff2f9e3e5e2c0f7bd3afbcfd23a11c5fc04cd44c (patch)
tree0482822c1374995cb9186da7864e44a4684ecbe2
parentdd288e06f9f27ccbfff71558457d3b2e14f3a0df (diff)
downloadorg.eclipse.papyrus-ff2f9e3e5e2c0f7bd3afbcfd23a11c5fc04cd44c.tar.gz
org.eclipse.papyrus-ff2f9e3e5e2c0f7bd3afbcfd23a11c5fc04cd44c.tar.xz
org.eclipse.papyrus-ff2f9e3e5e2c0f7bd3afbcfd23a11c5fc04cd44c.zip
[clean] Retiring org.eclipse.papyrus.uml.properties.runtimelast/org.eclipse.papyrus.uml.properties.runtime
Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.classpath7
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.project28
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/META-INF/MANIFEST.MF19
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/about.html28
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/build.properties7
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/icons/ModelHandler.gifbin214 -> 0 bytes
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/icons/MultiplicityHandler.gifbin361 -> 0 bytes
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/plugin.properties12
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/plugin.xml48
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/Activator.java76
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/Messages.java36
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/messages.properties2
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationHandlerState.java90
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationModelHandler.java311
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationModelHandlerFactory.java31
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerHandlerState.java90
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerModelHandler.java344
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerModelHandlerFactory.java32
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityHandlerState.java118
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityModelHandler.java363
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityModelHandlerFactory.java56
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/MultiplicityPropertyEditor.java187
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/MultiplicityPropertyEditorValidator.java43
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/descriptor/MultiplicityPropertyEditorDescriptor.java74
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/descriptor/MultiplicityPropertyEditorDescriptorFactory.java78
26 files changed, 0 insertions, 2088 deletions
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.classpath b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.classpath
deleted file mode 100644
index 2d1a4302f04..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.project b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.project
deleted file mode 100644
index 347dd18f844..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.properties.runtime</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.settings/org.eclipse.jdt.core.prefs b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c55927e2860..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Fri May 07 20:40:04 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/META-INF/MANIFEST.MF b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/META-INF/MANIFEST.MF
deleted file mode 100644
index d7ac4097613..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.views.properties.runtime;bundle-version="0.9.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="0.9.0",
- org.eclipse.uml2.uml;bundle-version="3.1.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="0.9.0",
- org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.9.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.properties.runtime.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.properties.runtime;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/about.html b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/about.html
deleted file mode 100644
index 82d49bf5f81..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/build.properties b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/build.properties
deleted file mode 100644
index f34ef5681a6..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-#Mon Sep 12 09:30:06 CEST 2011
-bin.includes=META-INF/,.,plugin.properties,plugin.xml,icons/,about.html
-output..=bin/
-src.includes=about.html,META-INF/,.,plugin.properties,plugin.xml,icons/
-source..=src/
-bin..=bin/
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/icons/ModelHandler.gif b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/icons/ModelHandler.gif
deleted file mode 100644
index 3d4241b5229..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/icons/ModelHandler.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/icons/MultiplicityHandler.gif b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/icons/MultiplicityHandler.gif
deleted file mode 100644
index f1f019535ea..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/icons/MultiplicityHandler.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/plugin.properties b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/plugin.properties
deleted file mode 100644
index 43acfa6af79..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# Copyright (c) 2010 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:
-# Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - initial API and implementation
-##################################################################################
-pluginName=Papyrus Properties Editor Runtime for UML (Incubation)
-providerName=Eclipse Modeling Project
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/plugin.xml b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/plugin.xml
deleted file mode 100644
index b9cc0333795..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/plugin.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.views.properties.runtime.propertyModelHandler">
- <propertyModelHandler
- class="org.eclipse.papyrus.uml.properties.runtime.modelhandler.MultiplicityModelHandlerFactory"
- description="this is the model handler for multiplicity"
- id="Multiplicity"
- name="Multiplicity EMF model handler">
- </propertyModelHandler>
- </extension>
- <extension
- point="org.eclipse.papyrus.views.properties.runtime.propertyModelHandler">
- <propertyModelHandler
- class="org.eclipse.papyrus.uml.properties.runtime.modelhandler.AssociationEndOwnerModelHandlerFactory"
- description="this is the model handler for owner of association ends"
- id="AssociationEndOwner"
- name="AssociationEndOwner EMF model handler">
- </propertyModelHandler>
- </extension>
- <extension
- point="org.eclipse.papyrus.views.properties.runtime.propertyModelHandler">
- <propertyModelHandler
- class="org.eclipse.papyrus.uml.properties.runtime.modelhandler.AssociationEndNavigationModelHandlerFactory"
- description="this is the model handler for navigation of association ends"
- id="AssociationEndNavigation"
- name="AssociationEndNavigation EMF model handler">
- </propertyModelHandler>
- </extension>
- <extension
- point="org.eclipse.papyrus.views.properties.runtime.propertyEditorProvider">
- <propertyEditorProvider
- class="org.eclipse.papyrus.views.properties.runtime.propertyeditor.PropertyEditorProvider">
- <Priority
- name="Lowest">
- </Priority>
- <PropertyEditor
- allowMultiValue="false"
- class="org.eclipse.papyrus.uml.properties.runtime.propertyeditor.MultiplicityPropertyEditor"
- description="This editor allows edition of multiplicity properties "
- factory="org.eclipse.papyrus.uml.properties.runtime.propertyeditor.descriptor.MultiplicityPropertyEditorDescriptorFactory"
- id="org.eclipse.papyrus.views.properties.runtime.uml.multiplicityPropertyEditor"
- typeValidator="org.eclipse.papyrus.uml.properties.runtime.propertyeditor.MultiplicityPropertyEditorValidator">
- </PropertyEditor>
- </propertyEditorProvider>
- </extension>
-</plugin>
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/Activator.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/Activator.java
deleted file mode 100644
index c89f6e39d7c..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/Activator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.papyrus.uml.properties.runtime;
-
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.properties.runtime"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /** Logging helper */
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(plugin);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- log = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns the image from the given image descriptor
- *
- * @param path
- * the path of the image to be displayed
- * @return the image found
- */
- public static Image getImage(String path) {
- final ImageRegistry registry = getDefault().getImageRegistry();
- Image image = registry.get(path);
- if(image == null) {
- registry.put(path, imageDescriptorFromPlugin(PLUGIN_ID, path));
- image = registry.get(path);
- }
- return image;
-
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/Messages.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/Messages.java
deleted file mode 100644
index 8c2e223a4d9..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/Messages.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Internationalization class.
- */
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.properties.runtime.messages"; //$NON-NLS-1$
-
- /** feature of AssociationEndOwnerModelHandler_ComboValue_Association */
- public static String AssociationEndOwnerModelHandler_ComboValue_Association;
-
- /** feature of AssociationEndOwnerModelHandler_ComboValue_Class */
- public static String AssociationEndOwnerModelHandler_ComboValue_Class;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/messages.properties b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/messages.properties
deleted file mode 100644
index 0a081a7cea9..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-AssociationEndOwnerModelHandler_ComboValue_Association=Association
-AssociationEndOwnerModelHandler_ComboValue_Class=Class
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationHandlerState.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationHandlerState.java
deleted file mode 100644
index 0f1f9feb57d..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationHandlerState.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import java.beans.PropertyChangeListener;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandlerState;
-import org.eclipse.papyrus.views.properties.runtime.state.AbstractState;
-import org.eclipse.papyrus.views.properties.runtime.state.ITraversableModelElement;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * state for {@link AssociationEndNavigationModelHandler}
- */
-public class AssociationEndNavigationHandlerState extends AbstractState implements IEMFModelHandlerState {
-
- /** model handler managed by this state */
- private final AssociationEndNavigationModelHandler modelHandler;
-
- /**
- * Creates a new MultiplicityHandlerState.
- *
- * @param modelHandler
- * the model handler managed by this state
- * @param readOnly
- * the read only mode for this state
- */
- public AssociationEndNavigationHandlerState(AssociationEndNavigationModelHandler modelHandler, boolean readOnly) {
- super(readOnly);
- this.modelHandler = modelHandler;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<? extends ITraversableModelElement> getChildren() {
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- */
- public AssociationEndNavigationModelHandler getDescriptor() {
- return modelHandler;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getEditionDialogId() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- // nothing here
- }
-
- /**
- * {@inheritDoc}
- */
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- // nothing here
- }
-
- /**
- * {@inheritDoc}
- */
- public Node generateNode(Document document) {
- Element node = document.createElement("feature");
- node.setAttribute("handlerID", getDescriptor().getId());
- return node;
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationModelHandler.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationModelHandler.java
deleted file mode 100644
index c8e5226ea16..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationModelHandler.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.papyrus.views.properties.runtime.controller.EMFPropertyEditorController;
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandler;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IBoundedValuesPropertyEditorDescriptor;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IPropertyEditorDescriptor;
-import org.eclipse.papyrus.uml.properties.runtime.Activator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.uml2.uml.Association;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.UMLPackage;
-
-
-/**
- * Model Handler for the navigation of Association ends
- */
-public class AssociationEndNavigationModelHandler implements IEMFModelHandler {
-
- /** list of available values */
- private final List<String> availableValues;
-
- /** id of this model handler */
- public final static String ID = "AssociationEndNavigation"; //$NON-NLS-1$
-
- /**
- * Creates a new AssociationEndOwnerModelHandler.
- */
- public AssociationEndNavigationModelHandler() {
- super();
- this.availableValues = Arrays.asList("true", "false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * {@inheritDoc}
- */
- public void setValueInModel(EObject objectToEdit, Object newValue) {
- if(!(objectToEdit instanceof Property)) {
- Activator.log.warn("the object to edit is not a Property"); //$NON-NLS-1$
- return;
- }
-
- boolean isNavigable = Boolean.parseBoolean((String)newValue);
-
- Property property = (Property)objectToEdit;
- Association association = property.getAssociation();
- if(association == null) {
- Activator.log.warn("the property is not a member end of an association"); //$NON-NLS-1$
- return;
- }
-
- EStructuralFeature feature = UMLPackage.eINSTANCE.getAssociation_NavigableOwnedEnd();
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(association.getNavigableOwnedEnds());
- if(isNavigable) {
- attributeList.add(property);
- } else {
- attributeList.remove(property);
- }
- association.eSet(feature, attributeList);
- }
-
- /**
- * {@inheritDoc}
- */
- public void completeEditorDescriptor(IPropertyEditorDescriptor descriptor, List<? extends EObject> objectToEdit) {
- if(descriptor instanceof IBoundedValuesPropertyEditorDescriptor) {
- ((IBoundedValuesPropertyEditorDescriptor)descriptor).setAvailableValues(getAvailableValues(null));
- } else {
- Activator.log.warn(descriptor + "could not be completed."); //$NON-NLS-1$
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Object getValueToEdit(EObject objectToEdit) {
- if(!(objectToEdit instanceof Property)) {
- Activator.log.warn("the object to edit is not a Property"); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- Property property = (Property)objectToEdit;
- Association association = property.getAssociation();
- if(association == null) {
- Activator.log.warn("the property is not a member end of an association"); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- if(association.getNavigableOwnedEnds().contains(property)) {
- return "true"; //$NON-NLS-1$
- }
- return "false"; //$NON-NLS-1$
-
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isChangeable(List<? extends EObject> objectsToEdit) {
- // always true for this implementation
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getId() {
- return ID;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getText() {
- return "AssociationEndNavigationHandler"; //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- public Image getImage() {
- return Activator.getImage("/icons/ModelHandler.gif"); //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- public AssociationEndNavigationHandlerState createState(boolean readOnly) {
- return new AssociationEndNavigationHandlerState(this, readOnly);
- }
-
- /**
- * {@inheritDoc}
- */
- public List<String> getAvailableValues(EObject objects) {
- return availableValues;
- }
-
- /**
- * {@inheritDoc}
- */
- public void handleNotifyChange(Notification notification, List<? extends EObject> objects, EMFPropertyEditorController adapter) {
- // nothing specific here
- // should perhaps filter a bit more here, but seems to be sufficient here.
- Object notificationFeature = notification.getFeature();
- if(!(UMLPackage.eINSTANCE.getAssociation_NavigableOwnedEnd().equals(notificationFeature))) {
- return;
- }
-
- switch(notification.getEventType()) {
- case Notification.ADD:
- case Notification.ADD_MANY:
- case Notification.REMOVE:
- case Notification.REMOVE_MANY:
- case Notification.SET:
- case Notification.UNSET:
- adapter.refreshDisplay();
- break;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addListenersToModel(List<? extends EObject> objectsToEdit, EMFPropertyEditorController controller) {
- for(EObject object : objectsToEdit) {
- object.eAdapters().add(controller);
-
- // add also to the association owner
- // remove also the association
- if(object instanceof Property) {
- Association association = ((Property)object).getAssociation();
- if(association != null) {
- association.eAdapters().add(controller);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeListenersFromModel(List<? extends EObject> objectsToEdit, EMFPropertyEditorController controller) {
- for(EObject object : objectsToEdit) {
- object.eAdapters().remove(controller);
-
- // remove also the association
- if(object instanceof Property) {
- Association association = ((Property)object).getAssociation();
- if(association != null) {
- association.eAdapters().remove(controller);
- }
- }
- }
-
- }
-
- /**
- * {@inheritDoc}
- */
- public List<IUndoableOperation> getCreateValueOperations(List<? extends EObject> objectsToEdit, Composite parent) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateValueOperations(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getDeleteValueOperation(List<? extends EObject> objectsToEdit, Composite parent, List<Integer> indexes) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateDeleteValueOperation(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getEditValueOperation(List<? extends EObject> objectsToEdit, int index, Composite parent, Object value) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateEditValueOperation(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getMoveValueOperation(List<? extends EObject> objectsToEdit, List<Integer> indexes, Composite parent, int delta) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateMoveValueOperation(List<? extends EObject> objectsToEdit, List<Integer> indexes, Composite parent, int delta) {
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandler#getSetRequest(org.eclipse.emf.transaction.TransactionalEditingDomain,
- * org.eclipse.emf.ecore.EObject, java.lang.Object)
- *
- * @param domain
- * @param objectToEdit
- * @param newValue
- * @return
- */
- public SetRequest[] getSetRequest(TransactionalEditingDomain domain, EObject objectToEdit, Object newValue) {
- if(!(objectToEdit instanceof Property)) {
- Activator.log.warn("the object to edit is not a Property"); //$NON-NLS-1$
- return null;
- }
-
- boolean isNavigable = Boolean.parseBoolean((String)newValue);
-
- Property property = (Property)objectToEdit;
- Association association = property.getAssociation();
- if(association == null) {
- Activator.log.warn("the property is not a member end of an association"); //$NON-NLS-1$
- return null;
- }
-
- EStructuralFeature feature = UMLPackage.eINSTANCE.getAssociation_NavigableOwnedEnd();
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(association.getNavigableOwnedEnds());
- if(isNavigable) {
- attributeList.add(property);
- } else {
- attributeList.remove(property);
- }
-
- return new SetRequest[]{ new SetRequest(domain, association, feature, attributeList) };
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationModelHandlerFactory.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationModelHandlerFactory.java
deleted file mode 100644
index 8de3b4a84bf..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndNavigationModelHandlerFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.EMFModelHandlerFactory;
-import org.w3c.dom.Node;
-
-
-/**
- * factory for Association end navigation model handlers
- */
-public class AssociationEndNavigationModelHandlerFactory extends EMFModelHandlerFactory {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public AssociationEndNavigationModelHandler createModelHandler(Node modelHandlerNode) {
- return new AssociationEndNavigationModelHandler();
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerHandlerState.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerHandlerState.java
deleted file mode 100644
index d2c7a39afdf..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerHandlerState.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import java.beans.PropertyChangeListener;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandlerState;
-import org.eclipse.papyrus.views.properties.runtime.state.AbstractState;
-import org.eclipse.papyrus.views.properties.runtime.state.ITraversableModelElement;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * state for {@link MultiplicityModelHandler}
- */
-public class AssociationEndOwnerHandlerState extends AbstractState implements IEMFModelHandlerState {
-
- /** model handler managed by this state */
- private final AssociationEndOwnerModelHandler modelHandler;
-
- /**
- * Creates a new MultiplicityHandlerState.
- *
- * @param modelHandler
- * the model handler managed by this state
- * @param readOnly
- * the read only mode for this state
- */
- public AssociationEndOwnerHandlerState(AssociationEndOwnerModelHandler modelHandler, boolean readOnly) {
- super(readOnly);
- this.modelHandler = modelHandler;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<? extends ITraversableModelElement> getChildren() {
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- */
- public AssociationEndOwnerModelHandler getDescriptor() {
- return modelHandler;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getEditionDialogId() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- // nothing here
- }
-
- /**
- * {@inheritDoc}
- */
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- // nothing here
- }
-
- /**
- * {@inheritDoc}
- */
- public Node generateNode(Document document) {
- Element node = document.createElement("feature");
- node.setAttribute("handlerID", getDescriptor().getId());
- return node;
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerModelHandler.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerModelHandler.java
deleted file mode 100644
index 53f94be8b40..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerModelHandler.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.papyrus.views.properties.runtime.controller.EMFPropertyEditorController;
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandler;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IBoundedValuesPropertyEditorDescriptor;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IPropertyEditorDescriptor;
-import org.eclipse.papyrus.uml.properties.runtime.Activator;
-import org.eclipse.papyrus.uml.properties.runtime.Messages;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.uml2.uml.Association;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-
-
-/**
- * Model Handler for the Owner of Association ends
- */
-public class AssociationEndOwnerModelHandler implements IEMFModelHandler {
-
- /** list of available values */
- private final List<String> availableValues;
-
- /** id of this model handler */
- public final static String ID = "AssociationEndOwner"; //$NON-NLS-1$
-
- /**
- * Creates a new AssociationEndOwnerModelHandler.
- */
- public AssociationEndOwnerModelHandler() {
- super();
- this.availableValues = Arrays.asList(Messages.AssociationEndOwnerModelHandler_ComboValue_Association, Messages.AssociationEndOwnerModelHandler_ComboValue_Class);
- }
-
- /**
- * {@inheritDoc}
- */
- public void setValueInModel(EObject objectToEdit, Object newValue) {
- if(!(newValue instanceof String)) {
- Activator.log.warn("the new value for the association end owner handler was no a String"); //$NON-NLS-1$
- return;
- }
-
- if(!(objectToEdit instanceof Property)) {
- Activator.log.warn("the object to edit is not a Property"); //$NON-NLS-1$
- return;
- }
-
- Property property = (Property)objectToEdit;
- Association association = property.getAssociation();
- if(association == null) {
- Activator.log.warn("the property is not a member end of an association"); //$NON-NLS-1$
- return;
- }
- String value = (String)newValue;
-
- Type owner = null;
- if(Messages.AssociationEndOwnerModelHandler_ComboValue_Class.equals(value)) {
- // it already belongs to the right component, does not change...
- if(!(property.getOwner() instanceof Association)) {
- return;
- } else {
- //look for the owner of the property to Set
- List<Type> ownerList = association.getEndTypes();
- if(ownerList.get(0).equals(property.getType()) && ownerList.size() > 1) {
- owner = ownerList.get(1);
- } else {
- owner = ownerList.get(0);
- }
- }
- // this is a classifier , construct and run the command
- EStructuralFeature feature = UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute();
- if(owner instanceof org.eclipse.uml2.uml.Class) {
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(((org.eclipse.uml2.uml.Class)owner).getAttributes());
- attributeList.add(property);
- ((org.eclipse.uml2.uml.Class)owner).eSet(feature, attributeList);
- return;
- }
- Activator.log.error("The owner was not a class: " + owner, null); //$NON-NLS-1$
- return;
- } else {
- EStructuralFeature feature = UMLPackage.eINSTANCE.getAssociation_OwnedEnd();
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(association.getOwnedEnds());
- attributeList.add(property);
- association.eSet(feature, attributeList);
- }
-
- }
-
- /**
- * {@inheritDoc}
- */
- public void completeEditorDescriptor(IPropertyEditorDescriptor descriptor, List<? extends EObject> objectToEdit) {
- if(descriptor instanceof IBoundedValuesPropertyEditorDescriptor) {
- ((IBoundedValuesPropertyEditorDescriptor)descriptor).setAvailableValues(getAvailableValues(null));
- } else {
- Activator.log.warn(descriptor + "could not be completed."); //$NON-NLS-1$
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Object getValueToEdit(EObject objectToEdit) {
- if(!(objectToEdit instanceof Property)) {
- Activator.log.warn("the object to edit is not a Property"); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
-
- Property property = (Property)objectToEdit;
- Association association = property.getAssociation();
- if(association == null) {
- Activator.log.warn("the property is not a member end of an association"); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
-
- if(association.equals(property.getOwner())) {
- return Messages.AssociationEndOwnerModelHandler_ComboValue_Association;
- }
- return Messages.AssociationEndOwnerModelHandler_ComboValue_Class;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isChangeable(List<? extends EObject> objectsToEdit) {
- // always true for this implementation
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getId() {
- return ID;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getText() {
- return "AssociationEndOwnerHandler"; //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- public Image getImage() {
- return Activator.getImage("/icons/ModelHandler.gif"); //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- public AssociationEndOwnerHandlerState createState(boolean readOnly) {
- return new AssociationEndOwnerHandlerState(this, readOnly);
- }
-
- /**
- * {@inheritDoc}
- */
- public List<String> getAvailableValues(EObject objects) {
- return availableValues;
- }
-
- /**
- * {@inheritDoc}
- */
- public void handleNotifyChange(Notification notification, List<? extends EObject> objects, EMFPropertyEditorController adapter) {
- Object notificationFeature = notification.getFeature();
- if(!(UMLPackage.eINSTANCE.getProperty_OwningAssociation().equals(notificationFeature))) {
- return;
- }
-
-
- switch(notification.getEventType()) {
- case Notification.SET:
- case Notification.UNSET:
- adapter.refreshDisplay();
- break;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addListenersToModel(List<? extends EObject> objectsToEdit, EMFPropertyEditorController controller) {
- for(EObject object : objectsToEdit) {
- object.eAdapters().add(controller);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeListenersFromModel(List<? extends EObject> objectsToEdit, EMFPropertyEditorController controller) {
- for(EObject object : objectsToEdit) {
- object.eAdapters().remove(controller);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public List<IUndoableOperation> getCreateValueOperations(List<? extends EObject> objectsToEdit, Composite parent) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateValueOperations(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getDeleteValueOperation(List<? extends EObject> objectsToEdit, Composite parent, List<Integer> indexes) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateDeleteValueOperation(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getEditValueOperation(List<? extends EObject> objectsToEdit, int index, Composite parent, Object value) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateEditValueOperation(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getMoveValueOperation(List<? extends EObject> objectsToEdit, List<Integer> indexes, Composite parent, int delta) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateMoveValueOperation(List<? extends EObject> objectsToEdit, List<Integer> indexes, Composite parent, int delta) {
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandler#getSetRequest(org.eclipse.emf.transaction.TransactionalEditingDomain,
- * org.eclipse.emf.ecore.EObject, java.lang.Object)
- *
- * @param domain
- * @param objectToEdit
- * @param newValue
- * @return
- */
- public SetRequest[] getSetRequest(TransactionalEditingDomain domain, EObject objectToEdit, Object newValue) {
- if(!(newValue instanceof String)) {
- Activator.log.warn("the new value for the association end owner handler was no a String"); //$NON-NLS-1$
- return null;
- }
-
- if(!(objectToEdit instanceof Property)) {
- Activator.log.warn("the object to edit is not a Property"); //$NON-NLS-1$
- return null;
- }
-
- Property property = (Property)objectToEdit;
- Association association = property.getAssociation();
- if(association == null) {
- Activator.log.warn("the property is not a member end of an association"); //$NON-NLS-1$
- return null;
- }
- String value = (String)newValue;
-
- Type owner = null;
- if(Messages.AssociationEndOwnerModelHandler_ComboValue_Class.equals(value)) {
- // it already belongs to the right component, does not change...
- if(!(property.getOwner() instanceof Association)) {
- return null;
- } else {
- //look for the owner of the property to Set
- List<Type> ownerList = association.getEndTypes();
- if(ownerList.get(0).equals(property.getType()) && ownerList.size() > 1) {
- owner = ownerList.get(1);
- } else {
- owner = ownerList.get(0);
- }
- }
- // this is a classifier , construct and run the command
- EStructuralFeature feature = UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute();
- if(owner instanceof org.eclipse.uml2.uml.Class) {
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(((org.eclipse.uml2.uml.Class)owner).getAttributes());
- attributeList.add(property);
- return new SetRequest[]{ new SetRequest(domain, owner, feature, attributeList) };
- }
- Activator.log.error("The owner was not a class: " + owner, null); //$NON-NLS-1$
- return null;
- } else {
- EStructuralFeature feature = UMLPackage.eINSTANCE.getAssociation_OwnedEnd();
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(association.getOwnedEnds());
- attributeList.add(property);
- return new SetRequest[]{ new SetRequest(domain, association, feature, attributeList) };
- }
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerModelHandlerFactory.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerModelHandlerFactory.java
deleted file mode 100644
index 8e46921e0e3..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/AssociationEndOwnerModelHandlerFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.EMFModelHandlerFactory;
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandler;
-import org.w3c.dom.Node;
-
-
-/**
- * factory for Multiplicity model handlers
- */
-public class AssociationEndOwnerModelHandlerFactory extends EMFModelHandlerFactory {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IEMFModelHandler createModelHandler(Node modelHandlerNode) {
- return new AssociationEndOwnerModelHandler();
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityHandlerState.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityHandlerState.java
deleted file mode 100644
index e53bb12f788..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityHandlerState.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import java.beans.PropertyChangeListener;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandlerState;
-import org.eclipse.papyrus.views.properties.runtime.state.AbstractState;
-import org.eclipse.papyrus.views.properties.runtime.state.ITraversableModelElement;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * state for {@link MultiplicityModelHandler}
- */
-public class MultiplicityHandlerState extends AbstractState implements IEMFModelHandlerState {
-
- /** model handler managed by this state */
- private final MultiplicityModelHandler modelHandler;
-
- /**
- * Creates a new MultiplicityHandlerState.
- *
- * @param modelHandler
- * model handler managed by this state
- * @param readOnly
- * read only mode of the state
- */
- public MultiplicityHandlerState(MultiplicityModelHandler modelHandler, boolean readOnly) {
- super(readOnly);
- this.modelHandler = modelHandler;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<? extends ITraversableModelElement> getChildren() {
- return Collections.emptyList();
- }
-
- /**
- * {@inheritDoc}
- */
- public MultiplicityModelHandler getDescriptor() {
- return modelHandler;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getEditionDialogId() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- // nothing here
- }
-
- /**
- * {@inheritDoc}
- */
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- // nothing here
- }
-
- /**
- * {@inheritDoc}
- */
- public Node generateNode(Document document) {
- /*
- * <feature handlerID="Multiplicity">
- * <availableValue value="0..1"/>
- * <availableValue value="1..1"/>
- * <availableValue value="0..*"/>
- * <availableValue value="1..*"/>
- * </feature>
- */
- Element node = document.createElement("feature");
- node.setAttribute("handlerID", getDescriptor().getId());
-
- for(String availableValue : getDescriptor().getAvailableValues(null)) { // no problem with null, as the method returns a constant value
- node.appendChild(generateAvailableValue(availableValue, document));
- }
- return node;
- }
-
- /**
- * Generates the available value node for the given value
- *
- * @param availableValue
- * the available value to generate
- * @param document
- * the document used to create XML nodes
- * @return the available value node for the given value
- */
- protected Node generateAvailableValue(String availableValue, Document document) {
- Element node = document.createElement("availableValue");
- node.setAttribute("value", availableValue);
- return node;
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityModelHandler.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityModelHandler.java
deleted file mode 100644
index 85aaa4b4d4c..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityModelHandler.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import java.util.List;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.papyrus.views.properties.runtime.controller.EMFPropertyEditorController;
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.EMFUtils;
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandler;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IBoundedValuesPropertyEditorDescriptor;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IPropertyEditorDescriptor;
-import org.eclipse.papyrus.uml.properties.runtime.Activator;
-import org.eclipse.papyrus.uml.tools.utils.MultiplicityElementUtil;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.uml2.uml.MultiplicityElement;
-import org.eclipse.uml2.uml.UMLPackage;
-
-
-/**
- * Model Handler for the Multiplicity of {@link MultiplicityElement}
- */
-public class MultiplicityModelHandler implements IEMFModelHandler {
-
- /** list of available values */
- private final List<String> availableValues;
-
- /** id of this model handler */
- public final static String ID = "Multiplicity"; //$NON-NLS-1$
-
- /**
- * Creates a new MultiplicityModelHandler.
- *
- * @param availableValues
- * the list of predefined multiplicities
- */
- public MultiplicityModelHandler(List<String> availableValues) {
- super();
- this.availableValues = availableValues;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setValueInModel(EObject objectToEdit, Object newValue) {
- // new Value should be a String with specific format:
- // either m..n with m integer and n unlimited natural (including -1 or *)
- // or n, with n integer (this is a shortcut for n..n)
- if(!(newValue instanceof String)) {
- Activator.log.warn("the new value for the multiplicity model handler was no a String"); //$NON-NLS-1$
- return;
- }
-
- String value = (String)newValue;
- try {
- int[] values = MultiplicityElementUtil.parseMultiplicity(value);
- if(values.length == 2) {
- int lower = values[0];
- int upper = values[1];
-
- EStructuralFeature lowerFeature = EMFUtils.getFeatureByName(objectToEdit, "lower"); //$NON-NLS-1$
- EStructuralFeature upperFeature = EMFUtils.getFeatureByName(objectToEdit, "upper"); //$NON-NLS-1$
-
- if(lowerFeature != null && upperFeature != null) {
- objectToEdit.eSet(lowerFeature, lower);
- objectToEdit.eSet(upperFeature, upper);
- }
- }
- } catch (NumberFormatException e) {
- Activator.log.error("Error during multiplicity parsing", e); //$NON-NLS-1$
- }
-
- }
-
- /**
- * {@inheritDoc}
- */
- public void completeEditorDescriptor(IPropertyEditorDescriptor descriptor, List<? extends EObject> objectToEdit) {
- if(descriptor instanceof IBoundedValuesPropertyEditorDescriptor) {
- ((IBoundedValuesPropertyEditorDescriptor)descriptor).setAvailableValues(getAvailableValues(null));
- } else {
- Activator.log.warn(descriptor + "could not be completed."); //$NON-NLS-1$
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Object getValueToEdit(EObject objectToEdit) {
- if(objectToEdit instanceof MultiplicityElement) {
- return MultiplicityElementUtil.getMultiplicityAsStringWithoutSquareBrackets((MultiplicityElement)objectToEdit);
- }
- return "NaN"; //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isChangeable(List<? extends EObject> objectsToEdit) {
- // always true for this implementation
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getId() {
- return ID;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getText() {
- return "MultiplicityHandler"; //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- public Image getImage() {
- return Activator.getImage("/icons/MultiplicityHandler.gif"); //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- public MultiplicityHandlerState createState(boolean readOnly) {
- return new MultiplicityHandlerState(this, readOnly);
- }
-
- /**
- * {@inheritDoc}
- */
- public List<String> getAvailableValues(EObject objects) {
- return availableValues;
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public void handleNotifyChange(Notification notification, List<? extends EObject> objects, EMFPropertyEditorController adapter) {
- // if one element is added to the feature, should also add this as a listener
- // if one element is removed from the feature, should also remove this as a listener
- // in other case, except removing adapters, should refresh
- Object notificationFeature = notification.getFeature();
- if(!(UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue().equals(notificationFeature) || UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue().equals(notificationFeature))) {
- return;
- }
-
- switch(notification.getEventType()) {
- case Notification.ADD:
- // check which feature has been modified
- ((EObject)notification.getNewValue()).eAdapters().add(adapter);
- // refresh the editors
- adapter.refreshDisplay();
- break;
- case Notification.ADD_MANY:
- // check which feature has been modified
- for(EObject newValue : ((List<EObject>)notification.getNewValue())) {
- newValue.eAdapters().add(adapter);
- }
- // refresh the editors
- adapter.refreshDisplay();
- break;
-
- case Notification.REMOVE:
- // check which feature has been modified
- ((EObject)notification.getOldValue()).eAdapters().remove(this);
- // refresh the editors
- adapter.refreshDisplay();
- break;
-
- case Notification.REMOVE_MANY:
- for(EObject newValue : ((List<EObject>)notification.getOldValue())) {
- newValue.eAdapters().remove(adapter);
- }
- // refresh the editors
- adapter.refreshDisplay();
- break;
- case Notification.SET:
- case Notification.UNSET:
- adapter.refreshDisplay();
- break;
- }
-
-
-
-
-
- // if one element is added to the feature, should also add this as a listener
- // if one element is removed from the feature, should also remove this as a listener
- // in other case, except removing adapters, should refresh
- if(Notification.ADD == notification.getEventType()) {
- // check which feature has been modified
- Object o = notification.getFeature();
- if(o.equals(UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue()) || o.equals(UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue())) {
- ((EObject)notification.getNewValue()).eAdapters().add(adapter);
- // refresh the editors
- adapter.refreshDisplay();
- }
- } else if(Notification.ADD_MANY == notification.getEventType()) {
- Object o = notification.getFeature();
- if(o.equals(UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue()) || o.equals(UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue())) {
- for(EObject newValue : ((List<EObject>)notification.getNewValue())) {
- newValue.eAdapters().add(adapter);
- }
- // refresh the editors
- adapter.refreshDisplay();
- }
- } else if(Notification.REMOVE == notification.getEventType()) {
- // check which feature has been modified
- Object o = notification.getFeature();
- if(o.equals(UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue()) || o.equals(UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue())) {
- ((EObject)notification.getOldValue()).eAdapters().remove(this);
- // refresh the editors
- adapter.refreshDisplay();
- }
- } else if(Notification.REMOVE_MANY == notification.getEventType()) {
- Object o = notification.getFeature();
- if(o.equals(UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue()) || o.equals(UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue())) {
- for(EObject newValue : ((List<EObject>)notification.getOldValue())) {
- newValue.eAdapters().remove(adapter);
- }
- // refresh the editors
- adapter.refreshDisplay();
- }
- }
-
- }
-
- /**
- * {@inheritDoc}
- */
- public void addListenersToModel(List<? extends EObject> objectsToEdit, EMFPropertyEditorController controller) {
- for(EObject object : objectsToEdit) {
- object.eAdapters().add(controller);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeListenersFromModel(List<? extends EObject> objectsToEdit, EMFPropertyEditorController controller) {
- for(EObject object : objectsToEdit) {
- object.eAdapters().remove(controller);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public List<IUndoableOperation> getCreateValueOperations(List<? extends EObject> objectsToEdit, Composite parent) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateValueOperations(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getDeleteValueOperation(List<? extends EObject> objectsToEdit, Composite parent, List<Integer> indexes) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateDeleteValueOperation(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getEditValueOperation(List<? extends EObject> objectsToEdit, int index, Composite parent, Object value) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateEditValueOperation(List<? extends EObject> objectsToEdit) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public IUndoableOperation getMoveValueOperation(List<? extends EObject> objectsToEdit, List<Integer> indexes, Composite parent, int delta) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean canCreateMoveValueOperation(List<? extends EObject> objectsToEdit, List<Integer> indexes, Composite parent, int delta) {
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandler#getSetRequest(org.eclipse.emf.transaction.TransactionalEditingDomain,
- * org.eclipse.emf.ecore.EObject, java.lang.Object)
- *
- * @param domain
- * @param objectToEdit
- * @param newValue
- * @return
- */
- public SetRequest[] getSetRequest(TransactionalEditingDomain domain, EObject objectToEdit, Object newValue) {
- // new Value should be a String with specific format:
- // either m..n with m integer and n unlimited natural (including -1 or *)
- // or n, with n integer (this is a shortcut for n..n)
- if(!(newValue instanceof String)) {
- Activator.log.warn("the new value for the multiplicity model handler was no a String"); //$NON-NLS-1$
- return null;
- }
-
- String value = (String)newValue;
- try {
- int[] values = MultiplicityElementUtil.parseMultiplicity(value);
- if(values.length == 2) {
- int lower = values[0];
- int upper = values[1];
-
- EStructuralFeature lowerFeature = EMFUtils.getFeatureByName(objectToEdit, "lower"); //$NON-NLS-1$
- EStructuralFeature upperFeature = EMFUtils.getFeatureByName(objectToEdit, "upper"); //$NON-NLS-1$
-
- if(lowerFeature != null && upperFeature != null) {
- SetRequest req1 = new SetRequest(domain, objectToEdit, lowerFeature, lower);
- SetRequest req2 = new SetRequest(domain, objectToEdit, upperFeature, upper);
- return new SetRequest[]{ req1, req2 };
- }
- }
- } catch (NumberFormatException e) {
- Activator.log.error("Error during multiplicity parsing", e); //$NON-NLS-1$
- }
- return null;
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityModelHandlerFactory.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityModelHandlerFactory.java
deleted file mode 100644
index 4d0744f1bc8..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/modelhandler/MultiplicityModelHandlerFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.modelhandler;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.EMFModelHandlerFactory;
-import org.eclipse.papyrus.views.properties.runtime.modelhandler.emf.IEMFModelHandler;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-/**
- * factory for Multiplicity model handlers
- */
-public class MultiplicityModelHandlerFactory extends EMFModelHandlerFactory {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IEMFModelHandler createModelHandler(Node modelHandlerNode) {
- List<String> availableValues = new ArrayList<String>();
-
- // parses proposed values by this model handler
- NodeList availableValueNodes = modelHandlerNode.getChildNodes();
- for(int i = 0; i < availableValueNodes.getLength(); i++) {
- Node availableValueNode = availableValueNodes.item(i);
- String availableValueNodeName = availableValueNode.getNodeName();
- if("availableValue".equals(availableValueNodeName)) {
- // this is an available value node, store the given value to display
- NamedNodeMap attributes = availableValueNode.getAttributes();
- if(attributes != null) {
- Node valueNode = attributes.getNamedItem("value");
- if(valueNode != null) {
- availableValues.add(valueNode.getNodeValue());
- }
- }
- }
- }
-
- return new MultiplicityModelHandler(availableValues);
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/MultiplicityPropertyEditor.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/MultiplicityPropertyEditor.java
deleted file mode 100644
index 6f34723d00d..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/MultiplicityPropertyEditor.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.propertyeditor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.views.properties.runtime.Activator;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.AbstractPropertyEditor;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IBoundedValuesPropertyEditorDescriptor;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IPropertyEditorDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * Property editors for enumeration
- */
-public class MultiplicityPropertyEditor extends AbstractPropertyEditor {
-
- /** id of this editor */
- public static final String ID = "org.eclipse.papyrus.uml.properties.view.multiplicityPropertyEditor";
-
- /** main composite created by this property editor */
- private Composite composite;
-
- /** list of available elements */
- protected List<String> values = new ArrayList<String>();
-
- /** combo that edit values */
- private CCombo combo;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Composite createContent(Composite parent) {
- composite = getWidgetFactory().createComposite(parent, SWT.NONE);
- int columnNu = getColumnNumber();
- GridLayout layout = new GridLayout(columnNu, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- composite.setLayoutData(data);
-
- if((getDescriptor().getLabelPosition() & (SWT.LEFT | SWT.TOP)) != 0) {
- createLabel(composite);
- }
-
- combo = getWidgetFactory().createCCombo(composite, SWT.FLAT | SWT.BORDER);
- combo.setItems(values.toArray(new String[]{}));
- data = new GridData(SWT.FILL, SWT.FILL, true, false);
- combo.setLayoutData(data);
- getWidgetFactory().adapt(combo);
- combo.addFocusListener(new FocusListener() {
-
- public void focusLost(FocusEvent e) {
- handleContentChanged();
- }
-
- public void focusGained(FocusEvent e) {
- }
- });
- combo.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- handleContentChanged();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
-
- }
- });
- combo.setEnabled(!getIsReadOnly());
-
- if((getDescriptor().getLabelPosition() & (SWT.RIGHT | SWT.BOTTOM)) != 0) {
- createLabel(composite);
- }
-
- return composite;
- }
-
- /**
- * Returns the number of column for the composite
- *
- * @return the number of column for the composite
- */
- protected int getColumnNumber() {
- if((getDescriptor().getLabelPosition() & (SWT.TOP | SWT.BOTTOM)) != 0) {
- return 1;
- }
- return 2;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void dispose() {
- if(isValid(composite)) {
- composite.dispose();
- composite = null;
- setController(null);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isDisposed() {
- if(composite == null) {
- return true;
- }
- return composite.isDisposed();
- }
-
- /**
- * Returns the current String value or <code>null</code>
- */
- @Override
- public Object getValue() {
- if(isValid(combo)) {
- return combo.getText();
- } else {
- Activator.log.error("trying to read the value of the combo whereas the combo is disposed", null);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void handleContentChanged() {
- // this should tells the controller that the input has to be applied to the model
- getController().updateModel();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IStatus init(IPropertyEditorDescriptor descriptor) {
- setDescriptor(descriptor);
- if(descriptor instanceof IBoundedValuesPropertyEditorDescriptor) {
- for(Object object : ((IBoundedValuesPropertyEditorDescriptor)descriptor).getAvailableValues()) {
- this.values.add(object.toString());
- }
- return Status.OK_STATUS;
- }
- return new Status(IStatus.ERROR, Activator.ID, "Impossible to initialize the editor using descriptor :" + descriptor);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setValue(Object valueToEdit) {
- if(!isValid(combo)) {
- return;
- }
- if(valueToEdit instanceof String) {
- combo.setText((String)valueToEdit);
- }
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/MultiplicityPropertyEditorValidator.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/MultiplicityPropertyEditorValidator.java
deleted file mode 100644
index 8de15182f59..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/MultiplicityPropertyEditorValidator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.propertyeditor;
-
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.AbstractPropertyEditor;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.IPropertyEditorTypeValidator;
-
-/**
- * Validator for the simple reference property editors
- */
-public class MultiplicityPropertyEditorValidator implements IPropertyEditorTypeValidator {
-
- /**
- * Creates a new SimpleReferencePropertyEditorValidator.
- */
- public MultiplicityPropertyEditorValidator() {
-
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isValidForValue(Object valueToEdit) {
- //FIXME additional checks to do here... multiplicity should be parseable!
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setPropertyEditor(AbstractPropertyEditor editor) {
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/descriptor/MultiplicityPropertyEditorDescriptor.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/descriptor/MultiplicityPropertyEditorDescriptor.java
deleted file mode 100644
index 74c475ba92e..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/descriptor/MultiplicityPropertyEditorDescriptor.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.propertyeditor.descriptor;
-
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IBoundedValuesPropertyEditorDescriptor;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.PropertyEditorDescriptor;
-
-
-/**
- * Descriptor specific to the combo property editor
- */
-public class MultiplicityPropertyEditorDescriptor extends PropertyEditorDescriptor implements IBoundedValuesPropertyEditorDescriptor {
-
- /** list of available values */
- private List<?> values;
-
- /**
- * Creates a new MultiplicityPropertyEditorDescriptor.
- *
- * @param editorId
- * the unique identifier for this editor factory
- * @param label
- * the label for this property editor
- * @param tooltipText
- * the tooltip text for this property editor
- */
- public MultiplicityPropertyEditorDescriptor(String editorId, String label, String tooltipText) {
- super(editorId, label, tooltipText);
- }
-
- /**
- * Creates a new MultiplicityPropertyEditorDescriptor.
- *
- * @param editorId
- * the unique identifier for this editor factory
- * @param label
- * the label for this property editor
- * @param labelPosition
- * the label position for this property editor
- * @param tooltipText
- * the tooltip text for this property editor
- * @param imageDescriptor
- * the icon for this property editor
- */
- public MultiplicityPropertyEditorDescriptor(String editorId, String label, int labelPosition, String tooltipText, ImageDescriptor imageDescriptor) {
- super(editorId, label, labelPosition, tooltipText, imageDescriptor);
- }
-
- /**
- * {@inheritDoc}
- */
- public void setAvailableValues(List<?> values) {
- this.values = values;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<?> getAvailableValues() {
- return values;
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/descriptor/MultiplicityPropertyEditorDescriptorFactory.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/descriptor/MultiplicityPropertyEditorDescriptorFactory.java
deleted file mode 100644
index fefa2620934..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.runtime/src/org/eclipse/papyrus/uml/properties/runtime/propertyeditor/descriptor/MultiplicityPropertyEditorDescriptorFactory.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.runtime.propertyeditor.descriptor;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.views.properties.runtime.Activator;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.IPropertyEditorDescriptorFactory;
-import org.eclipse.papyrus.views.properties.runtime.propertyeditor.descriptor.PropertyEditorDescriptor;
-import org.eclipse.swt.SWT;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-/**
- * factory for property editor descriptors
- */
-public class MultiplicityPropertyEditorDescriptorFactory implements IPropertyEditorDescriptorFactory {
-
- /**
- * {@inheritDoc}
- */
- public PropertyEditorDescriptor createEditorDescriptor(Node editorNode) {
- String identifier = "";
- String label = "";
- String tooltipText = "";
- int labelPosition = SWT.LEFT;
- ImageDescriptor imageDescriptor = null;
-
- // retrieve id, label, label position and tooltipText
- NamedNodeMap attributes = editorNode.getAttributes();
- if(attributes != null) {
- for(int i = 0; i < attributes.getLength(); i++) {
- Node attribute = attributes.item(i);
- String nodeName = attribute.getNodeName();
- if("label".equals(nodeName)) {
- label = attribute.getNodeValue();
- } else if("labelPosition".equals(nodeName)) {
- labelPosition = Integer.parseInt(attribute.getNodeValue());
- } else if("id".equals(nodeName)) {
- identifier = attribute.getNodeValue();
- } else if("tooltip".equals(nodeName)) {
- tooltipText = attribute.getNodeValue();
- }
- }
- }
-
- // retrieve icon
- NodeList children = editorNode.getChildNodes();
- for(int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if("icon".equals(child.getNodeName())) {
- NamedNodeMap iconAttributes = child.getAttributes();
- if(iconAttributes != null) {
- // retrieve plugin id and path
- for(int j = 0; j < iconAttributes.getLength(); j++) {
- Node pluginIDNode = iconAttributes.getNamedItem("pluginID");
- Node pathNode = iconAttributes.getNamedItem("path");
- if(pluginIDNode != null && pathNode != null) {
- imageDescriptor = Activator.imageDescriptorFromPlugin(pluginIDNode.getNodeValue(), pathNode.getNodeValue());
- }
- }
- }
- }
- }
-
- return new MultiplicityPropertyEditorDescriptor(identifier, label, labelPosition, tooltipText, imageDescriptor);
- }
-}

Back to the top