summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-04-04 10:12:17 (EDT)
committerLaurent Wouters2014-04-04 10:12:17 (EDT)
commit6253d6e2d97971b685422bd5ad59322a915714f1 (patch)
tree836fba685213c9d139f25971e8e4f4523003f3a4
parent556319573977fa4219f753efb97a8ac87c4e5151 (diff)
downloadorg.eclipse.papyrus-6253d6e2d97971b685422bd5ad59322a915714f1.zip
org.eclipse.papyrus-6253d6e2d97971b685422bd5ad59322a915714f1.tar.gz
org.eclipse.papyrus-6253d6e2d97971b685422bd5ad59322a915714f1.tar.bz2
[clean] Retiring org.eclipse.papyrus.qvtTransformationlast/org.eclipse.papyrus.qvtTransformation
Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF17
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/build.properties6
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/icons/icon.gifbin279 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/plugin.xml29
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java77
-rw-r--r--deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java176
9 files changed, 0 insertions, 348 deletions
diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/.classpath b/deprecated/org.eclipse.papyrus.qvtTransformation/.classpath
deleted file mode 100644
index 8a8f166..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/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/deprecated/org.eclipse.papyrus.qvtTransformation/.project b/deprecated/org.eclipse.papyrus.qvtTransformation/.project
deleted file mode 100644
index fc20664..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.qvtTransformation</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bedb6e4..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Aug 25 14:15:47 CEST 2010
-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.compliance=1.6
-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/deprecated/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF
deleted file mode 100644
index 366e510..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: QvtTransformation
-Bundle-SymbolicName: org.eclipse.papyrus.qvtTransformation; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.qvttransformation.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.emf.ecore;bundle-version="2.5.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.4.0",
- org.eclipse.m2m.qvt.oml;bundle-version="3.0.0",
- org.eclipse.papyrus.core,
- org.eclipse.m2m.qvt.oml.runtime;bundle-version="2.1.0",
- org.eclipse.m2m.qvt.oml.common;bundle-version="2.1.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/build.properties b/deprecated/org.eclipse.papyrus.qvtTransformation/build.properties
deleted file mode 100644
index 4b8162a..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/
diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/icons/icon.gif b/deprecated/org.eclipse.papyrus.qvtTransformation/icons/icon.gif
deleted file mode 100644
index 2c1ceaf..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/icons/icon.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/plugin.xml b/deprecated/org.eclipse.papyrus.qvtTransformation/plugin.xml
deleted file mode 100644
index 8294a8d4f..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart"
- id="org.eclipse.papyrus.qvtTransformation.contribution1">
- <menu
- icon="icons/icon.gif"
- id="org.eclipse.papyrus.qvtTransformation.menu1"
- label="Execute QVT Transformation"
- path="additions">
- <separator
- name="group1">
- </separator>
- </menu>
- <action
- class="org.eclipse.papyrus.qvttransformation.popup.actions.SelectQVTTransformation"
- enablesFor="1"
- id="org.eclipse.papyrus.qvtTransformation.newAction"
- label="Select QVT Transformation"
- menubarPath="org.eclipse.papyrus.qvtTransformation.menu1/group1">
- </action>
- </objectContribution>
- </extension>
-
-</plugin>
diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java b/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java
deleted file mode 100644
index bed24bd..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.qvttransformation;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-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.qvtTransformation"; //$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;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java b/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java
deleted file mode 100644
index 33d9fc4..0000000
--- a/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.qvttransformation.popup.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.internal.resources.File;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.m2m.internal.qvt.oml.common.MdaException;
-import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtInterpretedTransformation;
-import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation;
-import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation.TransformationParameter;
-import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation.TransformationParameter.DirectionKind;
-import org.eclipse.m2m.qvt.oml.BasicModelExtent;
-import org.eclipse.m2m.qvt.oml.ExecutionContextImpl;
-import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic;
-import org.eclipse.m2m.qvt.oml.ModelExtent;
-import org.eclipse.m2m.qvt.oml.TransformationExecutor;
-import org.eclipse.papyrus.core.utils.EditorUtils;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- *
- * This class implements a possible integration of QVTo in Papyrus
- *
- *
- */
-public class SelectQVTTransformation implements IObjectActionDelegate {
-
- private Shell shell;
-
- /**
- * The selected DiagramEditPart
- */
- protected DiagramEditPart diagramEditPart = null;
-
- /**
- * Constructor for SelectQVTTransformation.
- */
- public SelectQVTTransformation() {
- super();
- }
-
- /**
- * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- shell = targetPart.getSite().getShell();
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- if(diagramEditPart != null) {
- //Open a dialog to select the transformation to execute
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell, new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider());
- dialog.setTitle("Select a transformation");
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setAllowMultiple(false);
- dialog.open();
- Object[] result = dialog.getResult();
-
- if(result != null) {
-
- final File transformationFile = (File)result[0];
- if(transformationFile.getFileExtension().contains("qvt")) {
-
- //Reification of the transformation
- QvtTransformation transfo = new QvtInterpretedTransformation(transformationFile);
- //Retrieve transformation's parameters
- List<TransformationParameter> params;
- try {
- params = transfo.getParameters();
-
- //The transformation must have only one parameter.
- if(params.size() == 1) {
- //Retrieve first parameter's metamodels
- List<EPackage> metamodels = params.get(0).getMetamodels();
-
- //The parameter must be INOUT and it only have UML as metamodel
- if(params.get(0).getDirectionKind() == DirectionKind.INOUT && metamodels.size() == 1 && metamodels.get(0).getNsPrefix().compareToIgnoreCase("uml") == 0) {
-
- //Define the command in Papyrus' editing domain
- RecordingCommand command = new RecordingCommand(EditorUtils.getTransactionalEditingDomain()) {
-
- @Override
- protected void doExecute() {
- URI uri = URI.createPlatformResourceURI(transformationFile.getFullPath().toString(), true);
-
- //Create a executor for the transformation
- TransformationExecutor executor = new TransformationExecutor(uri);
-
- //Define the input as the model that contains the selected diagramEditPart
- List<EObject> contents = new ArrayList<EObject>();
- EObject element = diagramEditPart.resolveSemanticElement();
- contents.add(element);
-
- ModelExtent input = new BasicModelExtent(contents);
- //ModelExtent output = new BasicModelExtent();
-
- ExecutionContextImpl context = new ExecutionContextImpl();
- //Execute the transformation
- ExecutionDiagnostic diagnostic = executor.execute(context, input);
-
- //Report success or failure
- if(diagnostic.getSeverity() == Diagnostic.OK) {
- MessageDialog.openInformation(shell, "QvtTransformation", "Transformation was executed corretly.");
- } else {
- IStatus status = BasicDiagnostic.toIStatus(diagnostic);
- MessageDialog.openError(shell, "QvtTransformation", "Errors occured during the transformation: " + status.getMessage());
- }
- }
- };
-
- //Execute the command
- EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(command);
-
- } else {
- MessageDialog.openError(shell, "QvtTransformation", "Transformation signature is invalid : we support only transformations with only one parameter. This parameter must be INOUT and it only have UML as metamodel");
- }
- } else {
- MessageDialog.openError(shell, "QvtTransformation", "Transformation signature is invalid : the transformation must have only one parameter");
- }
- } catch (MdaException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if(selection instanceof IStructuredSelection) {
- Object selectedElement = ((IStructuredSelection)selection).getFirstElement();
- if(selectedElement instanceof DiagramEditPart) {
- diagramEditPart = (DiagramEditPart)selectedElement;
- }
- }
- }
-
-}