Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2014-04-27 08:44:19 +0000
committerAnsgar Radermacher2014-04-27 08:45:03 +0000
commitd5ba9e67bf369bf19be940d2910671363e4dce61 (patch)
tree1bf32b8de4e62d7c1a487eb178ba8c4ad0791ef0 /extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types
parent87baaaa8c423a5f7b405e8aecb3e074918fcc03b (diff)
downloadorg.eclipse.papyrus-d5ba9e67bf369bf19be940d2910671363e4dce61.tar.gz
org.eclipse.papyrus-d5ba9e67bf369bf19be940d2910671363e4dce61.tar.xz
org.eclipse.papyrus-d5ba9e67bf369bf19be940d2910671363e4dce61.zip
Bug 433584 - [EAST-ADL] Switch to new EAST-ADL version 2.1.12
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types')
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.classpath7
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.project28
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.settings/org.eclipse.jdt.core.prefs11
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.settings/org.eclipse.papyrus.infra.gmfdiag.preferences.prefs3
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/META-INF/MANIFEST.MF27
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/about.html28
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/build.properties5
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/plugin.properties13
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/plugin.xml59
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/Activator.java50
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/elements/EastadlElementTypes.java13
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/filter/EastadlCommandFilter.java35
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/handlers/AbstractEastadlCreateCommandHandler.java14
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/helper/AllocateEditHelperAdvice.java43
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/matcher/AllocateMatcher.java24
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/menu/AbstractCreateEastadlChildMenu.java17
16 files changed, 377 insertions, 0 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.classpath b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.classpath
new file mode 100644
index 00000000000..ad32c83a788
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.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.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.project b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.project
new file mode 100644
index 00000000000..b31f7fbf1e4
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.eastadl.service.types</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/eastadl/org.eclipse.papyrus.eastadl.service.types/.settings/org.eclipse.jdt.core.prefs b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..54e493c07c9
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.settings/org.eclipse.papyrus.infra.gmfdiag.preferences.prefs b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.settings/org.eclipse.papyrus.infra.gmfdiag.preferences.prefs
new file mode 100644
index 00000000000..773b5964f08
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/.settings/org.eclipse.papyrus.infra.gmfdiag.preferences.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+print.page.height=11.692913385826772
+print.page.width=8.267716535433072
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/META-INF/MANIFEST.MF b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..603d047f2db
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.eastadl.service.types;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.eastadl.service.types.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.uml2.uml;bundle-version="4.1.0",
+ org.eclipse.papyrus.eastadl;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
+ org.eclipse.papyrus.uml.service.types;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.1",
+ org.eclipse.gmf.runtime.notation;bundle-version="1.7.0",
+ org.eclipse.uml2.uml.profile.standard;bundle-version="1.0.0",
+ org.eclipse.core.expressions;bundle-version="3.4.500",
+ org.eclipse.papyrus.infra.tools;bundle-version="0.10.1",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="0.10.1"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.eastadl.service.types,
+ org.eclipse.papyrus.eastadl.service.types.elements,
+ org.eclipse.papyrus.eastadl.service.types.filter,
+ org.eclipse.papyrus.eastadl.service.types.handlers,
+ org.eclipse.papyrus.eastadl.service.types.menu
+Bundle-Vendor: %providerName
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/about.html b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/about.html
new file mode 100644
index 00000000000..209103075a7
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/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>November 14, 2008</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> \ No newline at end of file
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/build.properties b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/build.properties
new file mode 100644
index 00000000000..6f20375d6c7
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/plugin.properties b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/plugin.properties
new file mode 100644
index 00000000000..c27032d0bd0
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/plugin.properties
@@ -0,0 +1,13 @@
+#################################################################################
+# 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:
+# Vincent LORENZO vincent.lorenzo@cea.fr - Initial API and implementation
+##################################################################################
+
+pluginName = UML Profile for East-ADL,, service types (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/plugin.xml b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/plugin.xml
new file mode 100644
index 00000000000..893d700c1b6
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/plugin.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.eastadl.service.types.eastadlElementCreationCommands"
+ description="Create a new FunctionAllocation"
+ id="org.eclipse.papyrus.eastadl.service.types.AllocateCreateCommand"
+ name="Create a new FunctionAllocation">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.papyrus.eastadl.service.types.AllocateCreateCommand"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif">
+ </image>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.papyrus.eastadl.service.types.eastadlElementCreationCommands"
+ name="Commands for the creation of Eastadl elements">
+ </category>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+ <metamodel
+ nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
+ <specializationType
+ edithelperadvice="org.eclipse.papyrus.eastadl.service.types.helper.AllocateEditHelperAdvice"
+ id="org.eclipse.papyrus.eastadl.structure.functionmodeling.FunctionAllocation"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ name="EAST-ADL2::Structure::FunctionModeling::FunctionAllocation">
+ <specializes
+ id="org.eclipse.papyrus.uml.Abstraction">
+ </specializes>
+ <param
+ name="semanticHint"
+ value="EAST-ADL2::Structure::FunctionModeling::FunctionAllocation">
+ </param>
+ <matcher
+ class="org.eclipse.papyrus.eastadl.service.types.matcher.AllocateMatcher">
+ </matcher>
+ </specializationType>
+ </metamodel>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+ <binding
+ context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <elementType
+ ref="org.eclipse.papyrus.eastadl.structure.functionmodeling.FunctionAllocation">
+ </elementType>
+ </binding>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/Activator.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/Activator.java
new file mode 100644
index 00000000000..ba2dbb4bb3d
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.eastadl.service.types;
+
+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.eastadl.service.types"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/elements/EastadlElementTypes.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/elements/EastadlElementTypes.java
new file mode 100644
index 00000000000..fda6739baa6
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/elements/EastadlElementTypes.java
@@ -0,0 +1,13 @@
+package org.eclipse.papyrus.eastadl.service.types.elements;
+
+import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+public class EastadlElementTypes extends AbstractElementTypeEnumerator{
+
+ /** Constant for SysML nature */
+ public static final String SYSML_NATURE = "East-adl_Nature";
+
+ /** IElementType for SysML Allocate */
+ public static final IHintedType FUNCTION_ALLOCATE = (IHintedType)getElementType("org.eclipse.papyrus.eastadl.structure.functionmodeling.FunctionAllocation"); //$NON-NLS-1$
+}
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/filter/EastadlCommandFilter.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/filter/EastadlCommandFilter.java
new file mode 100644
index 00000000000..be17bb2ad2a
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/filter/EastadlCommandFilter.java
@@ -0,0 +1,35 @@
+package org.eclipse.papyrus.eastadl.service.types.filter;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.eastadl.service.types.elements.EastadlElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.filter.ICommandFilter;
+
+public class EastadlCommandFilter implements ICommandFilter {
+
+ public static final EastadlCommandFilter INSTANCE = new EastadlCommandFilter();
+ private EastadlCommandFilter() {
+
+ }
+ private List<IElementType> visibleCommands;
+ @Override
+ public List<IElementType> getVisibleCommands() {
+ if (visibleCommands == null) {
+ List<IElementType> localVisibleCommands = new ArrayList<IElementType>();
+
+ localVisibleCommands = new ArrayList<IElementType>();
+
+ localVisibleCommands.add(EastadlElementTypes.FUNCTION_ALLOCATE);
+
+ localVisibleCommands.add(UMLElementTypes.PROPERTY);
+
+ this.visibleCommands = Collections.unmodifiableList(localVisibleCommands);
+ }
+ return visibleCommands;
+ }
+
+}
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/handlers/AbstractEastadlCreateCommandHandler.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/handlers/AbstractEastadlCreateCommandHandler.java
new file mode 100644
index 00000000000..5d29f8193f3
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/handlers/AbstractEastadlCreateCommandHandler.java
@@ -0,0 +1,14 @@
+package org.eclipse.papyrus.eastadl.service.types.handlers;
+
+import org.eclipse.papyrus.eastadl.service.types.filter.EastadlCommandFilter;
+import org.eclipse.papyrus.uml.service.types.filter.ICommandFilter;
+import org.eclipse.papyrus.uml.service.types.handlers.AbstractCreateCommandHandler;
+
+public abstract class AbstractEastadlCreateCommandHandler extends
+ AbstractCreateCommandHandler {
+
+ private static final ICommandFilter filter = EastadlCommandFilter.INSTANCE;
+ public ICommandFilter getCommandFilter() {
+ return filter;
+ }
+}
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/helper/AllocateEditHelperAdvice.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/helper/AllocateEditHelperAdvice.java
new file mode 100644
index 00000000000..16e886365fe
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/helper/AllocateEditHelperAdvice.java
@@ -0,0 +1,43 @@
+package org.eclipse.papyrus.eastadl.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.eastadl.structure.functionmodeling.FunctionmodelingPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+public class AllocateEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public AllocateEditHelperAdvice() {
+ requiredProfiles.add(FunctionmodelingPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement)request.getElementToConfigure();
+ if(element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, FunctionmodelingPackage.eINSTANCE.getFunctionAllocation());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(FunctionmodelingPackage.eINSTANCE.getFunctionAllocation().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/matcher/AllocateMatcher.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/matcher/AllocateMatcher.java
new file mode 100644
index 00000000000..fcf31bd268a
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/matcher/AllocateMatcher.java
@@ -0,0 +1,24 @@
+package org.eclipse.papyrus.eastadl.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.eastadl.structure.functionmodeling.FunctionAllocation;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class AllocateMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if(eObject instanceof Abstraction) {
+
+ Abstraction element = (Abstraction)eObject;
+ if(UMLUtil.getStereotypeApplication(element, FunctionAllocation.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/menu/AbstractCreateEastadlChildMenu.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/menu/AbstractCreateEastadlChildMenu.java
new file mode 100644
index 00000000000..0e504a65251
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types/src/org/eclipse/papyrus/eastadl/service/types/menu/AbstractCreateEastadlChildMenu.java
@@ -0,0 +1,17 @@
+package org.eclipse.papyrus.eastadl.service.types.menu;
+
+import org.eclipse.papyrus.infra.tools.util.AbstractCreateMenuFromCommandCategory;
+
+public class AbstractCreateEastadlChildMenu extends AbstractCreateMenuFromCommandCategory {
+
+ /** the cateogory of the command used to create SysML elements */
+ public static final String SYSML_CREATION_COMMAND_CATEGORY = "org.eclipse.papyrus.eastadl.service.types.eastadlElementCreationCommands"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ *
+ */
+ public AbstractCreateEastadlChildMenu() {
+ super(SYSML_CREATION_COMMAND_CATEGORY);
+ }
+}

Back to the top