Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle')
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.classpath7
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.gitignore1
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.options3
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.project28
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/META-INF/MANIFEST.MF16
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/about.html28
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/build.properties5
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/pom.xml16
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/Activator.java76
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ActorPartPropertyProcessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/AllocateProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/BlockProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConformProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintBlockParameterProcessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintBlockProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintPropertyProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/CopyProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/DimensionProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowPortProcessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowPropertyProcessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowSpecificationprocessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ItemFlowProcessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/PartPropertyProcessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ReferencePropertyProcessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/RequirementProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/SatisfyProcessor.java63
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/UnitProcessor.java63
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ValuePropertyProcessor.java61
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ValueTypeProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/VerifyProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ViewPointProcessor.java62
-rwxr-xr-xextraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ViewProcessor.java61
33 files changed, 1605 insertions, 0 deletions
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.classpath b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.classpath
new file mode 100755
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.classpath
@@ -0,0 +1,7 @@
+<?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/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.gitignore b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.gitignore
new file mode 100755
index 00000000000..ae3c1726048
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.options b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.options
new file mode 100755
index 00000000000..7e6399d8f73
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.options
@@ -0,0 +1,3 @@
+# Tracing options for the org.eclipse.paprus.sysml.propertylifecycle plug-in
+org.eclipse.papyrus.sysml.propertylifecycle/debug=true
+org.eclipse.papyrus.sysml.propertylifecycle/debug/PLCStrategy_SYSMLproperty=true
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.project b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.project
new file mode 100755
index 00000000000..87e7fb0ea85
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.propertylifecycle</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/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.settings/org.eclipse.jdt.core.prefs b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..0c68a61dca8
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/META-INF/MANIFEST.MF b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..95c197e9742
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Propertylifecycle
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.propertylifecycle
+Bundle-Version: 0.0.1.qualifier
+Bundle-Activator: org.eclipse.papyrus.sysml.propertylifecycle.Activator
+Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
+ org.eclipse.core.runtime;bundle-version="3.12.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.propertylifecycle;bundle-version="0.0.1",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.9.0",
+ org.eclipse.uml2.uml;bundle-version="5.2.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/about.html b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/about.html
new file mode 100755
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/about.html
@@ -0,0 +1,28 @@
+<!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/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/build.properties b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/build.properties
new file mode 100755
index 00000000000..17daa5b49ca
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/pom.xml b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/pom.xml
new file mode 100755
index 00000000000..840663ba8aa
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/pom.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.sysml.propertylifecycle</artifactId>
+ <version>0.0.1.qualifier</version>
+ <groupId>org.eclipse.papyrus</groupId>
+ <packaging>eclipse-plugin</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra.propertylifecycle</artifactId>
+ <version>0.0.1.qualifier</version>
+ <relativePath>../../../infra/propertylifecycle/org.eclipse.papyrus.infra.propertylifecycle/pom.xml</relativePath>
+ </parent>
+</project>
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/Activator.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/Activator.java
new file mode 100755
index 00000000000..d6a4e567c78
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/Activator.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+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.sysml.propertylifecycle"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log;
+
+ /** The tag to identify the trace when activating the messages in the .options file */
+ public static String PLCSTRATEGY_TRACE = "PLCStrategy_SYSMLproperty";
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @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;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ActorPartPropertyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ActorPartPropertyProcessor.java
new file mode 100755
index 00000000000..7a5b96740e4
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ActorPartPropertyProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ActorPartPropertyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ActorPartPropertyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase("actorPart", element.eContainer().eContents()); //$NON-NLS-1$
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ActorPartProperty_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/AllocateProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/AllocateProcessor.java
new file mode 100755
index 00000000000..d0cb3974167
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/AllocateProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class AllocateProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public AllocateProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(AllocationsPackage.eINSTANCE.getAllocate().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("Allocate_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/BlockProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/BlockProcessor.java
new file mode 100755
index 00000000000..d5a6f362f11
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/BlockProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class BlockProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public BlockProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getBlock().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("Block_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConformProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConformProcessor.java
new file mode 100755
index 00000000000..b5ed7f98409
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConformProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ConformProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ConformProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(ModelelementsPackage.eINSTANCE.getConform().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("Conform_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintBlockParameterProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintBlockParameterProcessor.java
new file mode 100755
index 00000000000..40275d05319
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintBlockParameterProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ConstraintBlockParameterProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ConstraintBlockParameterProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase("parameter", element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ConstraintBlockParameter_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintBlockProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintBlockProcessor.java
new file mode 100755
index 00000000000..af48c7914cb
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintBlockProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ConstraintBlockProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ConstraintBlockProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(ConstraintsPackage.eINSTANCE.getConstraintBlock().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ConstraintBlock_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintPropertyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintPropertyProcessor.java
new file mode 100755
index 00000000000..0e428f51989
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ConstraintPropertyProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ConstraintPropertyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ConstraintPropertyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(ConstraintsPackage.eINSTANCE.getConstraintProperty().getName().toLowerCase(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ConstraintProperty_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/CopyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/CopyProcessor.java
new file mode 100755
index 00000000000..524b97cf174
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/CopyProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class CopyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public CopyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getCopy().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("Copy_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/DimensionProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/DimensionProcessor.java
new file mode 100755
index 00000000000..90464ba4a24
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/DimensionProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class DimensionProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public DimensionProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getDimension().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("Dimension_ConfR", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowPortProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowPortProcessor.java
new file mode 100755
index 00000000000..776c0bcd66b
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowPortProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class FlowPortProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public FlowPortProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(PortandflowsPackage.eINSTANCE.getFlowPort().getName().toLowerCase(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("FlowPort_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowPropertyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowPropertyProcessor.java
new file mode 100755
index 00000000000..6026500a4fc
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowPropertyProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class FlowPropertyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public FlowPropertyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(PortandflowsPackage.eINSTANCE.getFlowProperty().getName().toLowerCase(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("FlowProperty_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowSpecificationprocessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowSpecificationprocessor.java
new file mode 100755
index 00000000000..bfc47f6cf8b
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/FlowSpecificationprocessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class FlowSpecificationprocessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public FlowSpecificationprocessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(PortandflowsPackage.eINSTANCE.getFlowSpecification().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("FlowSpecification_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ItemFlowProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ItemFlowProcessor.java
new file mode 100755
index 00000000000..06ab7963676
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ItemFlowProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ItemFlowProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ItemFlowProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(PortandflowsPackage.eINSTANCE.getItemFlow().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ItemFlow_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/PartPropertyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/PartPropertyProcessor.java
new file mode 100755
index 00000000000..0970ea6b0c4
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/PartPropertyProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class PartPropertyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public PartPropertyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase("part", element.eContainer().eContents()); //$NON-NLS-1$
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("PartProperty_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ReferencePropertyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ReferencePropertyProcessor.java
new file mode 100755
index 00000000000..91ad8adb0d0
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ReferencePropertyProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ReferencePropertyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ReferencePropertyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase("reference", element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ReferenceProperty_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/RequirementProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/RequirementProcessor.java
new file mode 100755
index 00000000000..6115c79a3fc
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/RequirementProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class RequirementProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public RequirementProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getRequirement().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("Requirement_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/SatisfyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/SatisfyProcessor.java
new file mode 100755
index 00000000000..33f7a0aebe2
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/SatisfyProcessor.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class SatisfyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public SatisfyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (!(request instanceof ConfigureRequest)) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getSatisfy().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("Satisfy_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/UnitProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/UnitProcessor.java
new file mode 100755
index 00000000000..1d1c88082da
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/UnitProcessor.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class UnitProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public UnitProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getUnit().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("UnitProcessor_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ValuePropertyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ValuePropertyProcessor.java
new file mode 100755
index 00000000000..1e69fdb51f1
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ValuePropertyProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ValuePropertyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ValuePropertyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase("value", element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ValueProperty_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ValueTypeProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ValueTypeProcessor.java
new file mode 100755
index 00000000000..2161e56752b
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ValueTypeProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ValueTypeProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ValueTypeProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getValueType().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ValueType_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/VerifyProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/VerifyProcessor.java
new file mode 100755
index 00000000000..213579ac754
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/VerifyProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class VerifyProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public VerifyProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getVerify().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("VerifyProcessor_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ViewPointProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ViewPointProcessor.java
new file mode 100755
index 00000000000..412da66abd0
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ViewPointProcessor.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.messages.Messages;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ViewPointProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ViewPointProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature(Messages.FEATURELABEL_NAME);
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(ModelelementsPackage.eINSTANCE.getViewPoint().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ViewPointProcessor_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ViewProcessor.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ViewProcessor.java
new file mode 100755
index 00000000000..4bebed37eb8
--- /dev/null
+++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.sysml.propertylifecycle/src/org/eclipse/papyrus/sysml/propertylifecycle/processors/ViewProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.propertylifecycle.processors;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.propertylifecycle.commands.LifecycleSetCommand;
+import org.eclipse.papyrus.propertylifecycle.utils.CommandValueProcessor;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ViewProcessor implements CommandValueProcessor {
+
+ @Override
+ public ICommand setValueFromRequest(String featureLabel, boolean isImmutable, AbstractEditCommandRequest request) {
+ return setName(request);
+ }
+
+ public ViewProcessor() {
+
+ }
+
+ public ICommand setName(AbstractEditCommandRequest request) {
+ ICommand gmfCommand = null;
+
+ if (request instanceof ConfigureRequest) {
+ ConfigureRequest confRequest = (ConfigureRequest) request;
+
+ NamedElement element = (NamedElement) confRequest.getElementToConfigure();
+ EStructuralFeature feature = element.eClass().getEStructuralFeature("name");
+ if (element != null && feature != null) {
+
+ // Set default name
+ String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(ModelelementsPackage.eINSTANCE.getView().getName(), element.eContainer().eContents());
+ LifecycleSetCommand setCommand = new LifecycleSetCommand("ViewProcessor_SetName", element, feature, initializedName);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setCommand);
+ }
+ }
+
+ return gmfCommand;
+ }
+
+}

Back to the top