diff options
author | vlorenzo | 2012-05-22 09:26:56 +0000 |
---|---|---|
committer | vlorenzo | 2012-05-22 09:26:56 +0000 |
commit | 03a34be8328785812ca488ac1b2690f7cee6283a (patch) | |
tree | 24a3b1dd620a95f5ed48e94ea29cacb38d69707e /incoming | |
parent | b39b164dfe1da4c4f6de0bb7254d752df9eca13d (diff) | |
download | org.eclipse.papyrus-03a34be8328785812ca488ac1b2690f7cee6283a.tar.gz org.eclipse.papyrus-03a34be8328785812ca488ac1b2690f7cee6283a.tar.xz org.eclipse.papyrus-03a34be8328785812ca488ac1b2690f7cee6283a.zip |
380230: [UML Table] the UML table should be rewritten to use the new table metamodel
https://bugs.eclipse.org/bugs/show_bug.cgi?id=380230
Diffstat (limited to 'incoming')
16 files changed, 413 insertions, 0 deletions
diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/.classpath b/incoming/org.eclipse.papyrus.table.uml.generic/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/.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/incoming/org.eclipse.papyrus.table.uml.generic/.project b/incoming/org.eclipse.papyrus.table.uml.generic/.project new file mode 100644 index 00000000000..93fc92d3415 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.table.uml.generic</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/incoming/org.eclipse.papyrus.table.uml.generic/.settings/org.eclipse.jdt.core.prefs b/incoming/org.eclipse.papyrus.table.uml.generic/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..44217f8c068 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/.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/incoming/org.eclipse.papyrus.table.uml.generic/META-INF/MANIFEST.MF b/incoming/org.eclipse.papyrus.table.uml.generic/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..ad310acf5be --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.table.uml.generic;singleton:=true +Bundle-Version: 0.9.0.qualifier +Bundle-Activator: org.eclipse.papyrus.table.uml.generic.Activator +Bundle-Vendor: %providerName +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.infra.core, + org.eclipse.papyrus.infra.table.metamodel, + org.eclipse.papyrus.infra.table.common;bundle-version="0.9.0", + org.eclipse.emf.facet.widgets.table.metamodel.edit;bundle-version="0.2.0", + org.eclipse.emf.facet.widgets.table.ui;bundle-version="0.2.0", + org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/about.html b/incoming/org.eclipse.papyrus.table.uml.generic/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/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 ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" 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 ("Redistributor") 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/incoming/org.eclipse.papyrus.table.uml.generic/build.properties b/incoming/org.eclipse.papyrus.table.uml.generic/build.properties new file mode 100644 index 00000000000..8665ac2ffec --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/build.properties @@ -0,0 +1,6 @@ +source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties
diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/icons/generic_UML_table.gif b/incoming/org.eclipse.papyrus.table.uml.generic/icons/generic_UML_table.gif Binary files differnew file mode 100644 index 00000000000..7dba0a044de --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/icons/generic_UML_table.gif diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/icons/generic_UML_table.png b/incoming/org.eclipse.papyrus.table.uml.generic/icons/generic_UML_table.png Binary files differnew file mode 100644 index 00000000000..4bec73c4147 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/icons/generic_UML_table.png diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/plugin.pdoc b/incoming/org.eclipse.papyrus.table.uml.generic/plugin.pdoc new file mode 100644 index 00000000000..9661e051ca1 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/plugin.pdoc @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides the new table for UML.">
+ <referent firstName="vincent" lastName="lorenzo" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/plugin.properties b/incoming/org.eclipse.papyrus.table.uml.generic/plugin.properties new file mode 100644 index 00000000000..481c44e9cec --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/plugin.properties @@ -0,0 +1,3 @@ +#Properties file for org.eclipse.papyrus.table.uml.generic
+providerName = Eclispe Modeling Project
+pluginName = Generic Table for UML (Incubation)
\ No newline at end of file diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/plugin.xml b/incoming/org.eclipse.papyrus.table.uml.generic/plugin.xml new file mode 100644 index 00000000000..f37daf120f0 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/plugin.xml @@ -0,0 +1,103 @@ +<?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.table.uml.generic.factory.GenericTableEditorFactory"
+ icon="icons/generic_UML_table.png">
+ </editorDiagram>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Create a new UML Table Editor (Generic)"
+ id="org.eclipse.papyrus.uml.generic.table.command"
+ name="Create a UML Table Editor (Generic)">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.table.uml.generic.handlers.CreateGenericTableEditorHandler"
+ commandId="org.eclipse.papyrus.uml.generic.table.command">
+ <activeWhen>
+ <or>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </or>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ id="create.table.menus"
+ name="Create Table Menus"
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.createtable">
+ <command
+ commandId="org.eclipse.papyrus.uml.generic.table.command"
+ icon="icons/generic_UML_table.png"
+ label="UML Generic Table"
+ mnemonic="&G"
+ style="push"
+ tooltip="Create a new UML Generic 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.table.ui.menu.tables">
+ <command
+ commandId="org.eclipse.papyrus.uml.generic.table.command"
+ icon="icons/generic_UML_table.png"
+ label="UML Generic Table"
+ mnemonic="&G"
+ style="push"
+ tooltip="Create a new UML Generic 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.table.ui.toolbar">
+ <command
+ commandId="org.eclipse.papyrus.uml.generic.table.command"
+ icon="icons/generic_UML_table.png"
+ label="UML Generic Table"
+ mnemonic="&G"
+ style="push"
+ tooltip="Create a new UML Generic Table">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+</plugin>
diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/resources/uml_generic_table.papyrustableconfiguration b/incoming/org.eclipse.papyrus.table.uml.generic/resources/uml_generic_table.papyrustableconfiguration new file mode 100644 index 00000000000..6a4c2e34775 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/resources/uml_generic_table.papyrustableconfiguration @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<org.eclipse.papyrus.infra.table.papyrustableconfiguration:PapyrusTableConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:org.eclipse.papyrus.infra.table.papyrustableconfiguration="http://www.eclipse.org/Papyrus/PapyrusTableConfiguration/0.9.0/papyrustableconfiguration">
+ <tableConfiguration/>
+</org.eclipse.papyrus.infra.table.papyrustableconfiguration:PapyrusTableConfiguration>
diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/Activator.java b/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/Activator.java new file mode 100644 index 00000000000..d59d22d522b --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/Activator.java @@ -0,0 +1,63 @@ +/*****************************************************************************
+ * 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.table.uml.generic;
+
+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.table.uml.generic"; //$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/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/editor/GenericTableEditor.java b/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/editor/GenericTableEditor.java new file mode 100644 index 00000000000..7af54ad0c76 --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/editor/GenericTableEditor.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.table.uml.generic.editor;
+
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.table.common.editor.AbstractTableEditor;
+import org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable;
+
+
+public class GenericTableEditor extends AbstractTableEditor{
+
+ /** the type of the editor */
+ public static final String EDITOR_TYPE = "PapyrusGenericTable"; //$NON-NLS-1$
+
+ /** the default name for this table */
+ public static final String DEFAULT_NAME = "GenericTable"; //$NON-NLS-1$
+
+ /**
+ * @param servicesRegistry
+ * @param rawModel
+ *
+ */
+ public GenericTableEditor(final ServicesRegistry servicesRegistry, final PapyrusTable rawModel) {
+ super(servicesRegistry, rawModel);
+ }
+
+
+}
diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/factory/GenericTableEditorFactory.java b/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/factory/GenericTableEditorFactory.java new file mode 100644 index 00000000000..d6743091e0c --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/factory/GenericTableEditorFactory.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.table.uml.generic.factory;
+
+import org.eclipse.papyrus.infra.table.common.factory.AbstractTableEditorFactory;
+import org.eclipse.papyrus.table.uml.generic.editor.GenericTableEditor;
+
+
+/**
+ * @author dumoulin
+ *
+ */
+public class GenericTableEditorFactory extends AbstractTableEditorFactory {
+
+
+ /**
+ * Constructor.
+ *
+ * @param diagramClass
+ * @param expectedType
+ */
+ public GenericTableEditorFactory() {
+ super(GenericTableEditor.class, GenericTableEditor.EDITOR_TYPE);
+ }
+
+
+}
diff --git a/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/handlers/CreateGenericTableEditorHandler.java b/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/handlers/CreateGenericTableEditorHandler.java new file mode 100644 index 00000000000..12b06bbc6cb --- /dev/null +++ b/incoming/org.eclipse.papyrus.table.uml.generic/src/org/eclipse/papyrus/table/uml/generic/handlers/CreateGenericTableEditorHandler.java @@ -0,0 +1,60 @@ +/*****************************************************************************
+ * 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.table.uml.generic.handlers;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.papyrus.infra.table.common.handlers.AbstractCreateTableEditorHandler;
+import org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration;
+
+import org.eclipse.papyrus.table.uml.generic.Activator;
+import org.eclipse.papyrus.table.uml.generic.editor.GenericTableEditor;
+
+
+public class CreateGenericTableEditorHandler extends AbstractCreateTableEditorHandler {
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public CreateGenericTableEditorHandler() {
+ super(GenericTableEditor.EDITOR_TYPE, GenericTableEditor.DEFAULT_NAME);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.common.handlers.AbstractCreateTableEditorHandler#getPapyrusTableConfiguration()
+ *
+ * @return
+ */
+ @Override
+ protected PapyrusTableConfiguration getPapyrusTableConfiguration() {
+ final ResourceSet resourceSet = new ResourceSetImpl();
+
+ final String symbolicName = Activator.getDefault().getBundle().getSymbolicName();
+ final URI uri = URI.createPlatformPluginURI(symbolicName + "/resources/uml_generic_table.papyrustableconfiguration", true); //$NON-NLS-1$
+ final Resource resource = resourceSet.getResource(uri, true);
+
+ PapyrusTableConfiguration configuration = null;
+
+ if(resource.getContents().get(0) instanceof PapyrusTableConfiguration) {
+ configuration = (PapyrusTableConfiguration)resource.getContents().get(0);
+ }
+ return configuration;
+ }
+
+}
|