diff options
author | vlorenzo | 2012-08-20 14:21:12 +0000 |
---|---|---|
committer | vlorenzo | 2012-08-20 14:21:12 +0000 |
commit | c751087ab173f767808fca87a5d7b3631188dab7 (patch) | |
tree | 4d013f23483cd2c7e99be9672b1f368c1c898b6e /sandbox/org.eclipse.papyrus.uml.table.efacet.parameter | |
parent | f417780669d9677fab4731617c140dcaaf183367 (diff) | |
download | org.eclipse.papyrus-c751087ab173f767808fca87a5d7b3631188dab7.tar.gz org.eclipse.papyrus-c751087ab173f767808fca87a5d7b3631188dab7.tar.xz org.eclipse.papyrus-c751087ab173f767808fca87a5d7b3631188dab7.zip |
Share the new projects oep.sysml.table.efacet.flowport
Diffstat (limited to 'sandbox/org.eclipse.papyrus.uml.table.efacet.parameter')
13 files changed, 372 insertions, 0 deletions
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.classpath b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.project b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.project new file mode 100644 index 00000000000..219e8cfcd6a --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.table.efacet.parameter</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>
+ <buildCommand>
+ <name>org.eclipse.emf.facet.common.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.emf.facet.common.ProjectNature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.settings/org.eclipse.jdt.core.prefs b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..44217f8c068 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/.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.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/META-INF/MANIFEST.MF b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..a61c6e830f8 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Parameter Table Efacet (Incubation) +Bundle-SymbolicName: org.eclipse.papyrus.uml.table.efacet.parameter;singleton:=true +Bundle-Version: 0.9.0.qualifier +Bundle-Activator: org.eclipse.papyrus.uml.table.efacet.parameter.Activator +Bundle-Vendor: Eclipse Modeling Project +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core.log;bundle-version="0.9.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.table.efacet.common;bundle-version="0.9.0", + org.eclipse.papyrus.infra.table.efacet;bundle-version="0.9.0", + org.eclipse.papyrus.infra.table.efacet.metamodel;bundle-version="0.9.0", + org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel;bundle-version="0.9.0", + org.eclipse.papyrus.infra.core +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-ActivationPolicy: lazy diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/build.properties b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/build.properties new file mode 100644 index 00000000000..6f20375d6c7 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/build.properties @@ -0,0 +1,5 @@ +source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/icons/parameter_table.gif b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/icons/parameter_table.gif Binary files differnew file mode 100644 index 00000000000..eb6a5a96518 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/icons/parameter_table.gif diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/icons/parameter_table.png b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/icons/parameter_table.png Binary files differnew file mode 100644 index 00000000000..6147c953a70 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/icons/parameter_table.png diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/plugin.xml b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/plugin.xml new file mode 100644 index 00000000000..f661bc22e31 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/plugin.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.core.papyrusDiagram">
+ <editorDiagram
+ factoryClass="org.eclipse.papyrus.uml.table.efacet.parameter.factory.ParameterTableEditorFactory"
+ icon="icons/parameter_table.gif">
+ </editorDiagram>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Create a UML Parameter Table Editor"
+ id="org.eclipse.papyrus.uml.table.efacet.parameter.command"
+ name="Create a UML Parameter Table Editor">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.table.efacet.parameter.handler.CreateParameterTableEditorHandler"
+ commandId="org.eclipse.papyrus.uml.table.efacet.parameter.command">
+ <activeWhen>
+ <or>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </or>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.table.efacet.creation">
+ <command
+ commandId="org.eclipse.papyrus.uml.table.efacet.parameter.command"
+ icon="icons/parameter_table.gif"
+ label="UML Parameter Table"
+ mnemonic="&P"
+ style="push"
+ tooltip="Create a new UUML Parameter Table">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="menu:org.eclipse.papyrus.ui.menu.efacet.table.creation">
+ <command
+ commandId="org.eclipse.papyrus.uml.table.efacet.parameter.command"
+ icon="icons/parameter_table.gif"
+ label="UML Parameter Table"
+ mnemonic="&P"
+ style="push"
+ tooltip="Create a new UUML Parameter Table">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.papyrus.toolbar.table.efacet.creation">
+ <command
+ commandId="org.eclipse.papyrus.uml.table.efacet.parameter.command"
+ icon="icons/parameter_table.gif"
+ label="UML Parameter Table"
+ mnemonic="&P"
+ style="push"
+ tooltip="Create a new UUML Parameter Table">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+</plugin>
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/resources/uml_parameter_table.papyrustableconfiguration b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/resources/uml_parameter_table.papyrustableconfiguration new file mode 100644 index 00000000000..567899a74cd --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/resources/uml_parameter_table.papyrustableconfiguration @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration:PapyrusTableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration="http://www.eclipse.org/Papyrus/PapyrusTableConfiguration/0.9.0/papyrustableconfiguration" fillingMode="CONTEXT_FEATURE">
+ <listenContextFeature href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioralFeature/ownedParameter"/>
+ <tableConfiguration/>
+</org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration:PapyrusTableConfiguration>
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/Activator.java b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/Activator.java new file mode 100644 index 00000000000..600ae7a0065 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/Activator.java @@ -0,0 +1,58 @@ +package org.eclipse.papyrus.uml.table.efacet.parameter;
+
+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.uml.table.efacet.parameter"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final 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(final 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/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/editor/ParameterTableEditor.java b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/editor/ParameterTableEditor.java new file mode 100644 index 00000000000..e6379cfd929 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/editor/ParameterTableEditor.java @@ -0,0 +1,39 @@ +/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.efacet.parameter.editor;
+
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.table.efacet.common.editor.AbstractTableEditor;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+
+
+public class ParameterTableEditor extends AbstractTableEditor {
+
+ /** the type of the editor */
+ public static final String EDITOR_TYPE = "PapyrusUMLParameterTable"; //$NON-NLS-1$
+
+ /** the default name for this table */
+ public static final String DEFAULT_NAME = "ParameterTable"; //$NON-NLS-1$
+
+ /**
+ * @param servicesRegistry
+ * @param rawModel
+ *
+ */
+ public ParameterTableEditor(final ServicesRegistry servicesRegistry, final PapyrusTable rawModel) {
+ super(servicesRegistry, rawModel);
+ }
+
+
+}
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/factory/ParameterTableEditorFactory.java b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/factory/ParameterTableEditorFactory.java new file mode 100644 index 00000000000..5030fd0d225 --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/factory/ParameterTableEditorFactory.java @@ -0,0 +1,40 @@ +/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+
+package org.eclipse.papyrus.uml.table.efacet.parameter.factory;
+
+import org.eclipse.papyrus.infra.table.efacet.common.factory.AbstractTableEditorFactory;
+import org.eclipse.papyrus.uml.table.efacet.parameter.editor.ParameterTableEditor;
+
+
+/**
+ *
+ *
+ */
+public class ParameterTableEditorFactory extends AbstractTableEditorFactory {
+
+
+ /**
+ * Constructor.
+ *
+ * @param diagramClass
+ * @param expectedType
+ */
+ public ParameterTableEditorFactory() {
+ super(ParameterTableEditor.class, ParameterTableEditor.EDITOR_TYPE);
+ }
+
+
+}
diff --git a/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/handler/CreateParameterTableEditorHandler.java b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/handler/CreateParameterTableEditorHandler.java new file mode 100644 index 00000000000..fc019f7abef --- /dev/null +++ b/sandbox/org.eclipse.papyrus.uml.table.efacet.parameter/src/org/eclipse/papyrus/uml/table/efacet/parameter/handler/CreateParameterTableEditorHandler.java @@ -0,0 +1,59 @@ +/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.efacet.parameter.handler;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.table.efacet.common.handlers.AbstractCreateTableEditorHandler;
+import org.eclipse.papyrus.uml.table.efacet.parameter.Activator;
+import org.eclipse.papyrus.uml.table.efacet.parameter.editor.ParameterTableEditor;
+import org.eclipse.uml2.uml.Operation;
+
+
+public class CreateParameterTableEditorHandler extends AbstractCreateTableEditorHandler {
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public CreateParameterTableEditorHandler() {
+ super(ParameterTableEditor.EDITOR_TYPE, ParameterTableEditor.DEFAULT_NAME);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.common.handlers.AbstractCreateTableEditorHandler#isEnabled()
+ *
+ * @return
+ */
+ @Override
+ public boolean isEnabled() {
+ return getTableContext() instanceof Operation;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.common.handlers.AbstractCreateTableEditorHandler#getPapyrusTableConfigurationURI()
+ *
+ * @return
+ */
+ @Override
+ protected URI getPapyrusTableConfigurationURI() {
+ final String symbolicName = Activator.getDefault().getBundle().getSymbolicName();
+ final URI uri = URI.createPlatformPluginURI(symbolicName + "/resources/uml_parameter_table.papyrustableconfiguration", true); //$NON-NLS-1$
+ return uri;
+ }
+
+}
|