RESOLVED - bug 503063: Provide launching support for Sphinx Workflows
https://bugs.eclipse.org/bugs/show_bug.cgi?id=503063
diff --git a/docs/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx b/docs/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx
index ed24456..9f07ca1 100644
--- a/docs/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx
+++ b/docs/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx
Binary files differ
diff --git a/docs/org.eclipse.sphinx.doc.design/txt/Sphinx Plug-in & Feature Conventions.txt b/docs/org.eclipse.sphinx.doc.design/txt/Sphinx Plug-in & Feature Conventions.txt
index a0f8d7b..5683d46 100644
--- a/docs/org.eclipse.sphinx.doc.design/txt/Sphinx Plug-in & Feature Conventions.txt
+++ b/docs/org.eclipse.sphinx.doc.design/txt/Sphinx Plug-in & Feature Conventions.txt
@@ -5,18 +5,20 @@
* no invalid UI dependencies
* no imported packages
* Java package name prefix = plug-in name
-* plug-in name/provider and feature name/provider/description exported to plugin.properties/feature.properties
+* plug-in name/provider and feature name/provider/description/copyright exported to plugin.properties/feature.properties
* plug-in provider and feature provider = Eclipse Modeling Project
-* plugin.properties/feature.properties included in Binary Build (build.properties)
+* plugin.properties/feature.properties included in Binary Build
* appropriate plug-in and feature versions
-* presence of required legal files in plug-ins (about.html) and included in Binary Build and Source Build (build.properties)
+* presence of required legal files in plug-ins (about.html) and included in Binary Build and Source Build
* presence of "Bundle-Localization: plugin" header in MANIFEST.MF
-* presence of reference to license feature
-* Java 7 as minimum Java execution environment
-* update of project settings according to latest changes in org.eclipse.sphinx.templates.project.plugin
+* presence of EPL 1.0 URL and reference to license feature in feature.xml
+* Java 8 as minimum Java execution environment
+* project settings updated wrt latest changes in org.eclipse.sphinx.templates.project.plugin
* appropriate EMF/EMF UI activator classes in internal package
* elimination of compiler warnings as far as possible (e.g., missing @override annotations, etc.)
* feature project name = feature id plus "-feature" postfix
-* update Team project set (*.psf) files
-* update Sphinx feature map (/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx)
-* update Sphinx architecture on Sphinx wiki (https://wiki.eclipse.org/Sphinx/architecture)
+* pom.xml file with artifact id and version matching MANIFEST.MF/feature.xml and additional Maven plug-ins (e.g., xtend-maven-plugin) as appropriate
+* new plug-ins and features appropriately hooked up in parent features and Maven/Tycho build (i.e., /org.eclipse.sphinx.releng.builds/pom.xml)
+* new plug-ins and features added to Team project set (*.psf) files
+* new plug-ins and features added to Sphinx feature map (/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx)
+* new plug-ins and features added to Sphinx architecture on Sphinx wiki (https://wiki.eclipse.org/Sphinx/architecture)
diff --git "a/examples/org.eclipse.sphinx.examples.hummingbird20.workflows/launch/Print Hummingbird 2.0 Content Workflow \050Class\051.launch" "b/examples/org.eclipse.sphinx.examples.hummingbird20.workflows/launch/Print Hummingbird 2.0 Content Workflow \050Class\051.launch"
new file mode 100644
index 0000000..e01011a
--- /dev/null
+++ "b/examples/org.eclipse.sphinx.examples.hummingbird20.workflows/launch/Print Hummingbird 2.0 Content Workflow \050Class\051.launch"
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.sphinx.emf.mwe.dynamic.launching.launchConfigurationTypes.workflow">
+<mapAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.ARGUMENTS"/>
+<booleanAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.AUTO_SAVE" value="true"/>
+<stringAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.MODEL" value="org.eclipse.sphinx.examples.hummingbird20.workflows/model/sample.instancemodel#//MyComp1"/>
+<stringAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.WORKFLOW" value="org.eclipse.sphinx.examples.workflows.model.PrintModelContentWorkflow"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.sphinx.examples.workflows.lib/src/org/eclipse/sphinx/examples/workflows/lib/ModelWorkflowExtensions.xtend b/examples/org.eclipse.sphinx.examples.workflows.lib/src/org/eclipse/sphinx/examples/workflows/lib/ModelWorkflowExtensions.xtend
index e84361c..3d4b871 100644
--- a/examples/org.eclipse.sphinx.examples.workflows.lib/src/org/eclipse/sphinx/examples/workflows/lib/ModelWorkflowExtensions.xtend
+++ b/examples/org.eclipse.sphinx.examples.workflows.lib/src/org/eclipse/sphinx/examples/workflows/lib/ModelWorkflowExtensions.xtend
@@ -1,46 +1,46 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014 itemis 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:
- * itemis - Initial API and implementation
- *
- * </copyright>
- */
-package org.eclipse.sphinx.examples.workflows.lib
-
-import java.util.List
-import org.eclipse.core.runtime.OperationCanceledException
-import org.eclipse.emf.ecore.EObject
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator
-import org.eclipse.emf.mwe.core.WorkflowContext
-import org.eclipse.sphinx.emf.mwe.dynamic.IWorkflowSlots
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory
-
-class ModelWorkflowExtensions {
-
- def static List<EObject> getModelSlot(WorkflowContext ctx) throws OperationCanceledException {
- val modelSlot = ctx.get(IWorkflowSlots.MODEL_SLOT_NAME) as List<EObject>
- if (modelSlot == null || modelSlot.empty) {
- println("Model slot is empty, nothing to do!")
- throw new OperationCanceledException
- }
- return modelSlot
- }
-
- def static String getLabel(EObject modelObject) {
- val adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- val delegator = new AdapterFactoryItemDelegator(adapterFactory)
- val label = delegator.getText(modelObject)
- if (label != null && !label.empty) {
- return label
- } else {
- return modelObject.eClass.name + " <Unnamed>"
- }
- }
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.examples.workflows.lib
+
+import java.util.List
+import java.util.Map
+import org.eclipse.emf.ecore.EObject
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory
+import org.eclipse.emf.mwe.core.WorkflowContext
+import org.eclipse.sphinx.emf.mwe.dynamic.IModelWorkflowSlots
+
+class ModelWorkflowExtensions {
+
+ def static List<EObject> getModelSlot(WorkflowContext ctx) {
+ ctx.get(IModelWorkflowSlots.MODEL_SLOT_NAME) as List<EObject>
+ }
+
+ def static Map<String, Object> getArgumentsSlot(WorkflowContext ctx) {
+ ctx.get(IModelWorkflowSlots.ARGUMENTS_SLOT_NAME) as Map<String, Object>
+ }
+
+ def static String getLabel(EObject modelObject) {
+ val adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ val delegator = new AdapterFactoryItemDelegator(adapterFactory)
+ val label = delegator.getText(modelObject)
+ if (label != null && !label.empty) {
+ return label
+ } else {
+ return modelObject.eClass.name + " <Unnamed>"
+ }
+ }
+}
diff --git "a/examples/org.eclipse.sphinx.examples.workflows/launch/Run Simple Java Workflow \050Java\051.bat" "b/examples/org.eclipse.sphinx.examples.workflows/launch/Run Simple Java Workflow \050Java\051.bat"
new file mode 100644
index 0000000..c3b696d
--- /dev/null
+++ "b/examples/org.eclipse.sphinx.examples.workflows/launch/Run Simple Java Workflow \050Java\051.bat"
@@ -0,0 +1,15 @@
+@echo off
+W:
+cd W:\eclipse-sphinx\org.eclipse.sphinx\examples\org.eclipse.sphinx.examples.workflows\launch
+
+set ECLIPSE_HOME=C:/Eclipse/committers-neon/eclipse
+set APPLICATION_NAME=org.eclipse.sphinx.emf.mwe.dynamic.headless.WorkflowRunner
+set APPLICATION_ARGS=-workflow /org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/java/SimpleJavaWorkflow.java
+set PROGRAM_ARGS=-consoleLog
+set VM_ARGS=
+set WORKSPACE_LOC=W:/eclipse-sphinx/.runtime
+set DEV_WORKSPACE_URL=file:W:/eclipse-sphinx
+set DEV_LAUNCH_CONFIG_NAME=Run Simple Java Workflow (Java)
+
+call ../../../plugins/org.eclipse.sphinx.platform.launching/resources/launch/runEclipseApplication.bat
+pause
\ No newline at end of file
diff --git "a/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Java\051.bat" "b/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Java\051.bat"
new file mode 100644
index 0000000..aed012f
--- /dev/null
+++ "b/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Java\051.bat"
@@ -0,0 +1,15 @@
+@echo off
+W:
+cd W:\eclipse-sphinx\org.eclipse.sphinx\examples\org.eclipse.sphinx.examples.workflows\launch
+
+set ECLIPSE_HOME=C:/Eclipse/committers-neon/eclipse
+set APPLICATION_NAME=org.eclipse.sphinx.platform.launching.Launcher
+set APPLICATION_ARGS=-launch "/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow (Java).launch"
+set PROGRAM_ARGS=
+set VM_ARGS=
+set WORKSPACE_LOC=W:/eclipse-sphinx/.runtime
+set DEV_WORKSPACE_URL=file:W:/eclipse-sphinx
+set DEV_LAUNCH_CONFIG_NAME=Launcher
+
+call ../../../plugins/org.eclipse.sphinx.platform.launching/resources/launch/runEclipseApplication.bat
+pause
\ No newline at end of file
diff --git "a/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Java\051.launch" "b/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Java\051.launch"
new file mode 100644
index 0000000..f150b21
--- /dev/null
+++ "b/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Java\051.launch"
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.sphinx.emf.mwe.dynamic.launching.launchConfigurationTypes.workflow">
+<mapAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.ARGUMENTS">
+<mapEntry key="booleanArg" value="false"/>
+<mapEntry key="stringArg" value="stringValue"/>
+<mapEntry key="uriArg" value="file://C:/folder/file.ext"/>
+</mapAttribute>
+<booleanAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.AUTO_SAVE" value="true"/>
+<stringAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.MODEL" value=""/>
+<stringAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.WORKFLOW" value="/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/java/SimpleJavaWorkflow.java"/>
+</launchConfiguration>
diff --git "a/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Xtend\051.launch" "b/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Xtend\051.launch"
new file mode 100644
index 0000000..cede73d
--- /dev/null
+++ "b/examples/org.eclipse.sphinx.examples.workflows/launch/Simple Java Workflow \050Xtend\051.launch"
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.sphinx.emf.mwe.dynamic.launching.launchConfigurationTypes.workflow">
+<mapAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.ARGUMENTS">
+<mapEntry key="booleanArg" value="false"/>
+<mapEntry key="stringArg" value="stringValue"/>
+<mapEntry key="uriArg" value="file://C:/folder/file.ext"/>
+</mapAttribute>
+<booleanAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.AUTO_SAVE" value="true"/>
+<stringAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.MODEL" value=""/>
+<stringAttribute key="org.eclipse.sphinx.emf.mwe.dynamic.launching.WORKFLOW" value="/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/xtend/SimpleXtendWorkflow.xtend"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/model/PrintModelContentWorkflow.xtend b/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/model/PrintModelContentWorkflow.xtend
index 4bc57fe..983ce99 100644
--- a/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/model/PrintModelContentWorkflow.xtend
+++ b/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/model/PrintModelContentWorkflow.xtend
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2014 itemis and others.
+ * Copyright (c) 2014-2016 itemis 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
@@ -9,6 +9,7 @@
*
* Contributors:
* itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
@@ -19,9 +20,9 @@
import org.eclipse.emf.mwe.core.monitor.ProgressMonitor
import org.eclipse.sphinx.emf.mwe.dynamic.WorkspaceWorkflow
import org.eclipse.sphinx.emf.mwe.dynamic.components.AbstractModelWorkflowComponent
+import org.eclipse.sphinx.emf.util.EcoreResourceUtil
import static extension org.eclipse.sphinx.examples.workflows.lib.ModelWorkflowExtensions.*
-import org.eclipse.sphinx.emf.util.EcoreResourceUtil
class PrintModelContentWorkflow extends WorkspaceWorkflow {
diff --git a/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/java/SimpleJavaWorkflowComponent.java b/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/java/SimpleJavaWorkflowComponent.java
index 6f8081a..f2c594f 100644
--- a/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/java/SimpleJavaWorkflowComponent.java
+++ b/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/java/SimpleJavaWorkflowComponent.java
@@ -1,36 +1,40 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014 itemis 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:
- * itemis - Initial API and implementation
- *
- * </copyright>
- */
-package org.eclipse.sphinx.examples.workflows.simple.java;
-
-import org.eclipse.emf.mwe.core.WorkflowContext;
-import org.eclipse.emf.mwe.core.issues.Issues;
-import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2;
-import org.eclipse.emf.mwe.core.monitor.ProgressMonitor;
-import org.eclipse.sphinx.examples.workflows.lib.ExampleWorkflowHelper;
-
-@SuppressWarnings("nls")
-public class SimpleJavaWorkflowComponent extends AbstractWorkflowComponent2 {
-
- @Override
- protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
- System.out.println("Executing simple Java-based workflow component");
-
- System.out.println("Using some class from another project: " + ExampleWorkflowHelper.class);
- ExampleWorkflowHelper helper = new ExampleWorkflowHelper();
- helper.doSomething();
-
- System.out.println("Done!");
- }
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.examples.workflows.simple.java;
+
+import org.eclipse.emf.mwe.core.WorkflowContext;
+import org.eclipse.emf.mwe.core.issues.Issues;
+import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2;
+import org.eclipse.emf.mwe.core.monitor.ProgressMonitor;
+import org.eclipse.sphinx.examples.workflows.lib.ExampleWorkflowHelper;
+import org.eclipse.sphinx.examples.workflows.lib.ModelWorkflowExtensions;
+
+@SuppressWarnings("nls")
+public class SimpleJavaWorkflowComponent extends AbstractWorkflowComponent2 {
+
+ @Override
+ protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
+ System.out.println("Executing simple Java-based workflow component");
+
+ System.out.println("Arguments: " + ModelWorkflowExtensions.getArgumentsSlot(ctx));
+
+ System.out.println("Using some class from another project: " + ExampleWorkflowHelper.class);
+ ExampleWorkflowHelper helper = new ExampleWorkflowHelper();
+ helper.doSomething();
+
+ System.out.println("Done!");
+ }
+}
diff --git a/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/xtend/SimpleXtendWorkflow.xtend b/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/xtend/SimpleXtendWorkflow.xtend
index 9e26fe0..7fbd390 100644
--- a/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/xtend/SimpleXtendWorkflow.xtend
+++ b/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/xtend/SimpleXtendWorkflow.xtend
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2014 itemis and others.
+ * Copyright (c) 2014-2016 itemis 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
@@ -9,14 +9,22 @@
*
* Contributors:
* itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
package org.eclipse.sphinx.examples.workflows.simple.xtend
+import org.eclipse.emf.mwe.core.WorkflowContext
+import org.eclipse.emf.mwe.core.issues.Issues
+import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2
+import org.eclipse.emf.mwe.core.monitor.ProgressMonitor
import org.eclipse.emf.mwe2.runtime.workflow.Workflow
+import org.eclipse.sphinx.examples.workflows.lib.ExampleWorkflowHelper
import org.eclipse.sphinx.examples.workflows.simple.java.SimpleJavaWorkflowComponent
+import static extension org.eclipse.sphinx.examples.workflows.lib.ModelWorkflowExtensions.*
+
class SimpleXtendWorkflow extends Workflow {
new() {
@@ -26,4 +34,19 @@
children += new SimpleJavaWorkflowComponent
children += new SimpleXtendWorkflowComponent
}
+}
+
+class SimpleXtendWorkflowComponent extends AbstractWorkflowComponent2 {
+
+ override protected invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
+ println("Executing simple Xtend-based workflow component")
+
+ println("Arguments: " + ctx.argumentsSlot)
+
+ println("Using some class from another project: " + ExampleWorkflowHelper)
+ val helper = new ExampleWorkflowHelper()
+ helper.doSomething
+
+ println("Done!")
+ }
}
\ No newline at end of file
diff --git a/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/xtend/SimpleXtendWorkflowComponent.xtend b/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/xtend/SimpleXtendWorkflowComponent.xtend
deleted file mode 100644
index 534d1f2..0000000
--- a/examples/org.eclipse.sphinx.examples.workflows/src/org/eclipse/sphinx/examples/workflows/simple/xtend/SimpleXtendWorkflowComponent.xtend
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014 itemis 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:
- * itemis - Initial API and implementation
- *
- * </copyright>
- */
-package org.eclipse.sphinx.examples.workflows.simple.xtend
-
-import org.eclipse.emf.mwe.core.WorkflowContext
-import org.eclipse.emf.mwe.core.issues.Issues
-import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2
-import org.eclipse.emf.mwe.core.monitor.ProgressMonitor
-import org.eclipse.sphinx.examples.workflows.lib.ExampleWorkflowHelper
-
-class SimpleXtendWorkflowComponent extends AbstractWorkflowComponent2 {
-
- override protected invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
- println("Executing simple Xtend-based workflow component")
-
- println("Using some class from another project: " + ExampleWorkflowHelper)
- val helper = new ExampleWorkflowHelper()
- helper.doSomething
-
- println("Done!")
- }
-}
\ No newline at end of file
diff --git a/features/org.eclipse.sphinx.core-feature/feature.xml b/features/org.eclipse.sphinx.core-feature/feature.xml
index 0067a03..2f8a6c1 100644
--- a/features/org.eclipse.sphinx.core-feature/feature.xml
+++ b/features/org.eclipse.sphinx.core-feature/feature.xml
@@ -1,64 +1,71 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.sphinx.core"
- label="%featureName"
- version="0.11.0.qualifier"
- provider-name="%providerName"
- license-feature="org.eclipse.license"
- license-feature-version="1.0.1.v20140414-1359">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.sphinx.platform"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.sphinx.platform.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.sphinx.emf.workspace"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.sphinx.emf.workspace.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.sphinx.emf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.sphinx.emf.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.sphinx.core"
+ label="%featureName"
+ version="0.11.0.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="1.0.1.v20140414-1359">
+
+ <description>
+ %description
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.sphinx.platform"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.platform.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.emf.workspace"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.emf.workspace.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.emf"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.emf.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.platform.launching"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.sphinx.emf.mwe.dynamic-feature/feature.xml b/features/org.eclipse.sphinx.emf.mwe.dynamic-feature/feature.xml
index 0bbdaff..b7266c7 100644
--- a/features/org.eclipse.sphinx.emf.mwe.dynamic-feature/feature.xml
+++ b/features/org.eclipse.sphinx.emf.mwe.dynamic-feature/feature.xml
@@ -1,43 +1,57 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.sphinx.emf.mwe.dynamic"
- label="%featureName"
- version="0.11.0.qualifier"
- provider-name="%providerName"
- license-feature="org.eclipse.license"
- license-feature-version="1.0.1.v20140414-1359">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.sphinx.emf.mwe.dynamic"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.sphinx.emf.mwe.dynamic.headless"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.sphinx.emf.mwe.dynamic.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.sphinx.emf.mwe.dynamic"
+ label="%featureName"
+ version="0.11.0.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="1.0.1.v20140414-1359">
+
+ <description>
+ %description
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.sphinx.emf.mwe.dynamic"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.emf.mwe.dynamic.headless"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.emf.mwe.dynamic.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.emf.mwe.dynamic.launching"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.sphinx.emf.mwe.dynamic.launching.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/plugins/org.eclipse.sphinx.emf.check/src/org/eclipse/sphinx/emf/check/workflows/AbstractCheckValidationWorkflowComponent.java b/plugins/org.eclipse.sphinx.emf.check/src/org/eclipse/sphinx/emf/check/workflows/AbstractCheckValidationWorkflowComponent.java
index d95d19e..da7a30c 100644
--- a/plugins/org.eclipse.sphinx.emf.check/src/org/eclipse/sphinx/emf/check/workflows/AbstractCheckValidationWorkflowComponent.java
+++ b/plugins/org.eclipse.sphinx.emf.check/src/org/eclipse/sphinx/emf/check/workflows/AbstractCheckValidationWorkflowComponent.java
@@ -1,91 +1,92 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014-2015 itemis 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:
- * itemis - Initial API and implementation
- * itemis - [458976] Validators are not singleton when they implement checks for different EPackages
- * itemis - [463895] org.eclipse.sphinx.emf.check.AbstractCheckValidator.validate(EClass, EObject, DiagnosticChain, Map<Object, Object>) throws NPE
- * itemis - [473260] Progress indication of check framework
- * itemis - [473261] Check Validation: Cancel button unresponsive
- *
- * </copyright>
- */
-package org.eclipse.sphinx.emf.check.workflows;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.mwe.core.WorkflowContext;
-import org.eclipse.emf.mwe.core.issues.Issues;
-import org.eclipse.emf.mwe.core.monitor.ProgressMonitor;
-import org.eclipse.sphinx.emf.check.ICheckValidator;
-import org.eclipse.sphinx.emf.check.operations.BasicCheckValidationOperation;
-import org.eclipse.sphinx.emf.check.util.EclipseProgressMonitorAdapter;
-import org.eclipse.sphinx.emf.mwe.dynamic.IWorkflowSlots;
-import org.eclipse.sphinx.emf.mwe.dynamic.components.AbstractWorkspaceWorkflowComponent;
-import org.eclipse.sphinx.emf.mwe.dynamic.components.IWorkspaceWorkflowComponent;
-
-/**
- * An abstract {@link IWorkspaceWorkflowComponent workflow component} that can be used to perform check validation of
- * the models provided in the {@link IWorkflowSlots#MODEL_SLOT_NAME model slot}.
- */
-public abstract class AbstractCheckValidationWorkflowComponent extends AbstractWorkspaceWorkflowComponent {
-
- private Set<String> categories;
- private boolean intrinsicModelIntegrityConstraintsEnabled;
-
- public Set<String> getCategories() {
- if (categories == null) {
- categories = new HashSet<String>();
- }
- return categories;
- }
-
- public boolean isIntrinsicModelIntegrityConstraintsEnabled() {
- return intrinsicModelIntegrityConstraintsEnabled;
- }
-
- public void setIntrinsicModelIntegrityConstraintsEnabled(boolean intrinsicModelIntegrityConstraintsEnabled) {
- this.intrinsicModelIntegrityConstraintsEnabled = intrinsicModelIntegrityConstraintsEnabled;
- }
-
- protected Map<Object, Object> createOptions() {
- Map<Object, Object> options = new HashMap<Object, Object>();
- options.put(ICheckValidator.OPTION_CATEGORIES, getCategories());
- options.put(ICheckValidator.OPTION_ENABLE_INTRINSIC_MODEL_INTEGRITY_CONSTRAINTS, intrinsicModelIntegrityConstraintsEnabled);
- return options;
- }
-
- protected BasicCheckValidationOperation createCheckValidationOperation(List<EObject> modelObjects, Map<Object, Object> options) {
- return new BasicCheckValidationOperation(modelObjects, options);
- }
-
- @Override
- protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
- @SuppressWarnings("unchecked")
- List<EObject> models = (List<EObject>) ctx.get(IWorkflowSlots.MODEL_SLOT_NAME);
- if (models == null || models.isEmpty()) {
- return;
- }
-
- try {
- BasicCheckValidationOperation operation = createCheckValidationOperation(models, createOptions());
- operation.run(new EclipseProgressMonitorAdapter(monitor));
- } catch (OperationCanceledException ex) {
- return;
- } catch (Exception ex) {
- issues.addError(this, ex.getMessage(), models, ex, null);
- }
- }
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [458976] Validators are not singleton when they implement checks for different EPackages
+ * itemis - [463895] org.eclipse.sphinx.emf.check.AbstractCheckValidator.validate(EClass, EObject, DiagnosticChain, Map<Object, Object>) throws NPE
+ * itemis - [473260] Progress indication of check framework
+ * itemis - [473261] Check Validation: Cancel button unresponsive
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.emf.check.workflows;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.mwe.core.WorkflowContext;
+import org.eclipse.emf.mwe.core.issues.Issues;
+import org.eclipse.emf.mwe.core.monitor.ProgressMonitor;
+import org.eclipse.sphinx.emf.check.ICheckValidator;
+import org.eclipse.sphinx.emf.check.operations.BasicCheckValidationOperation;
+import org.eclipse.sphinx.emf.check.util.EclipseProgressMonitorAdapter;
+import org.eclipse.sphinx.emf.mwe.dynamic.IModelWorkflowSlots;
+import org.eclipse.sphinx.emf.mwe.dynamic.components.AbstractWorkspaceWorkflowComponent;
+import org.eclipse.sphinx.emf.mwe.dynamic.components.IWorkspaceWorkflowComponent;
+
+/**
+ * An abstract {@link IWorkspaceWorkflowComponent workflow component} that can be used to perform check validation of
+ * the models provided in the {@link IModelWorkflowSlots#MODEL_SLOT_NAME model slot}.
+ */
+public abstract class AbstractCheckValidationWorkflowComponent extends AbstractWorkspaceWorkflowComponent {
+
+ private Set<String> categories;
+ private boolean intrinsicModelIntegrityConstraintsEnabled;
+
+ public Set<String> getCategories() {
+ if (categories == null) {
+ categories = new HashSet<String>();
+ }
+ return categories;
+ }
+
+ public boolean isIntrinsicModelIntegrityConstraintsEnabled() {
+ return intrinsicModelIntegrityConstraintsEnabled;
+ }
+
+ public void setIntrinsicModelIntegrityConstraintsEnabled(boolean intrinsicModelIntegrityConstraintsEnabled) {
+ this.intrinsicModelIntegrityConstraintsEnabled = intrinsicModelIntegrityConstraintsEnabled;
+ }
+
+ protected Map<Object, Object> createOptions() {
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(ICheckValidator.OPTION_CATEGORIES, getCategories());
+ options.put(ICheckValidator.OPTION_ENABLE_INTRINSIC_MODEL_INTEGRITY_CONSTRAINTS, intrinsicModelIntegrityConstraintsEnabled);
+ return options;
+ }
+
+ protected BasicCheckValidationOperation createCheckValidationOperation(List<EObject> modelObjects, Map<Object, Object> options) {
+ return new BasicCheckValidationOperation(modelObjects, options);
+ }
+
+ @Override
+ protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
+ @SuppressWarnings("unchecked")
+ List<EObject> models = (List<EObject>) ctx.get(IModelWorkflowSlots.MODEL_SLOT_NAME);
+ if (models == null || models.isEmpty()) {
+ return;
+ }
+
+ try {
+ BasicCheckValidationOperation operation = createCheckValidationOperation(models, createOptions());
+ operation.run(new EclipseProgressMonitorAdapter(monitor));
+ } catch (OperationCanceledException ex) {
+ return;
+ } catch (Exception ex) {
+ issues.addError(this, ex.getMessage(), models, ex, null);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/BasicWorkflowRunnerApplication.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/BasicWorkflowRunnerApplication.java
index 54dff75..e1f7c00 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/BasicWorkflowRunnerApplication.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/BasicWorkflowRunnerApplication.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2014 itemis and others.
+ * Copyright (c) 2014-2016 itemis 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
@@ -12,32 +12,21 @@
* itemis - [454532] NPE in BasicWorkflowRunnerApplication
* itemis - [463978] org.eclipse.sphinx.emf.mwe.dynamic.headless.BasicWorkflowRunnerApplication.interrogate() handling of null URI
* itemis - [472576] Headless workflow runner application unable to resolve model element URIs
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
package org.eclipse.sphinx.emf.mwe.dynamic.headless;
-import java.io.FileNotFoundException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.sphinx.emf.mwe.dynamic.headless.internal.messages.Messages;
import org.eclipse.sphinx.emf.mwe.dynamic.operations.BasicWorkflowRunnerOperation;
import org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation;
-import org.eclipse.sphinx.emf.util.EcorePlatformUtil;
-import org.eclipse.sphinx.emf.util.EcoreResourceUtil;
+import org.eclipse.sphinx.emf.mwe.dynamic.util.WorkflowRunnerHelper;
import org.eclipse.sphinx.platform.cli.AbstractCLIApplication;
import org.eclipse.sphinx.platform.cli.ICommonCLIConstants;
@@ -81,11 +70,12 @@
* -workflow org.example/src/org/example/MyWorkflowFile.xtend</li>
* </ul>
*/
+// TODO Add support for passing in workflow arguments (see
+// org.eclipse.sphinx.emf.mwe.dynamic.launching.WorkflowLaunchConfigurationDelegate for details)
// TODO Externalize strings in related extention point contributions (see plugin.xml for details)
public class BasicWorkflowRunnerApplication extends AbstractCLIApplication {
- // TODO Replace with JavaExtensions.CLASS_NAME_PATTERN
- private static final Pattern JAVA_CLASS_NAME_PATTERN = Pattern.compile("((?:\\w|\\.)+)(\\.)([A-Z](?:\\w)+)"); //$NON-NLS-1$
+ protected WorkflowRunnerHelper helper = new WorkflowRunnerHelper();
/*
* @see org.eclipse.sphinx.platform.cli.AbstractCLIApplication#getCommandLineSyntax()
@@ -129,21 +119,17 @@
String modelOptionValue = commandLine.getOptionValue(IWorkflowRunnerCLIConstants.OPTION_MODEL);
boolean skipSaveOption = commandLine.hasOption(IWorkflowRunnerCLIConstants.OPTION_SKIP_SAVE);
- final URI modelURI = getModelURI(modelOptionValue);
- if (modelURI != null) {
- // Check if model resource exists
- URI uri = modelURI.trimFragment();
- if (!EcoreResourceUtil.exists(uri)) {
- throw new FileNotFoundException(NLS.bind(Messages.cliError_modelResourceDoesNotExist, uri.toPlatformString(true)));
- }
- }
-
- // Create the workflow operation
- Object workflow = getWorkflow(workflowOptionValue);
+ // Retrieve workflow class or file and create the workflow operation
+ Object workflow = helper.toWorkflowObject(workflowOptionValue);
IWorkflowRunnerOperation operation = createWorkflowRunnerOperation(workflow);
+
+ // Retrieve model URI and add it to workflow operation
+ URI modelURI = helper.toModelURIObject(modelOptionValue);
if (modelURI != null) {
operation.getModelURIs().add(modelURI);
}
+
+ // Retrieve auto save option and set it on workflow operation
operation.setAutoSave(!skipSaveOption);
// Run workflow operation
@@ -152,39 +138,6 @@
return ERROR_NO;
}
- protected Object getWorkflow(String workflowOptionValue) throws ClassNotFoundException, FileNotFoundException {
- Assert.isNotNull(workflowOptionValue);
-
- Matcher matcher = JAVA_CLASS_NAME_PATTERN.matcher(workflowOptionValue);
- if (matcher.find()) {
- // Workflow is a fully qualified Java class name
- try {
- return Class.forName(workflowOptionValue);
- } catch (ClassNotFoundException ex) {
- throw new ClassNotFoundException(NLS.bind(Messages.cliError_workflowClassNotFound, workflowOptionValue));
- }
- } else {
- // Workflow is assumed to be a workspace-relative path
- Path workflowPath = new Path(workflowOptionValue);
- IFile workflowFile = ResourcesPlugin.getWorkspace().getRoot().getFile(workflowPath);
- if (!workflowFile.exists()) {
- IPath workflowLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(workflowPath);
- throw new FileNotFoundException(NLS.bind(Messages.cliError_workflowFileDoesNotExist, workflowLocation.toOSString()));
- }
- return workflowFile;
- }
- }
-
- protected URI getModelURI(String modelOptionValue) {
- if (modelOptionValue != null) {
- URI modelURI = URI.createURI(modelOptionValue);
- Path modelFilePath = new Path(modelURI.trimFragment().toString());
- URI absoluteModelFileURI = EcorePlatformUtil.createURI(modelFilePath.makeAbsolute());
- return absoluteModelFileURI.appendFragment(modelURI.fragment());
- }
- return null;
- }
-
protected BasicWorkflowRunnerOperation createWorkflowRunnerOperation(Object workflow) {
return new BasicWorkflowRunnerOperation(IWorkflowRunnerCLIConstants.APPLICATION_NAME, workflow);
}
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/internal/messages/Messages.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/internal/messages/Messages.java
index cb6e87a..b4e233d 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/internal/messages/Messages.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/internal/messages/Messages.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2014 itemis and others.
+ * Copyright (c) 2014-2016 itemis 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
@@ -9,6 +9,7 @@
*
* Contributors:
* itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
@@ -19,8 +20,6 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.sphinx.emf.mwe.dynamic.headless.internal.messages.messages"; //$NON-NLS-1$
- public static String BasicWorkflowRunnerApplication_ApplicationName;
-
public static String cliOption_workflow_argName;
public static String cliOption_workflow_description;
@@ -29,10 +28,6 @@
public static String cliOption_skipSave_description;
- public static String cliError_workflowClassNotFound;
- public static String cliError_workflowFileDoesNotExist;
- public static String cliError_modelResourceDoesNotExist;
-
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/internal/messages/messages.properties b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/internal/messages/messages.properties
index a2d8160..b3930e1 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/internal/messages/messages.properties
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless/src/org/eclipse/sphinx/emf/mwe/dynamic/headless/internal/messages/messages.properties
@@ -1,6 +1,6 @@
# <copyright>
#
-# Copyright (c) 2014 itemis and others.
+# Copyright (c) 2014-2016 itemis 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
@@ -8,6 +8,7 @@
#
# Contributors:
# itemis - Initial API and implementation
+# itemis - [503063] Provide launching support for Sphinx Workflows
#
# </copyright>
@@ -16,15 +17,10 @@
# Internal messages for org.eclipse.sphinx.emf.mwe.dynamic.headless #
# ------------------------------------------------------------------- #
-BasicWorkflowRunnerApplication_ApplicationName=BasicWorkflowRunner
-
cliOption_workflow_argName=path or name
cliOption_workflow_description=workspace-relative <path> of the workflow file or fully qualified <name> of the workflow class to be run (required)
+
cliOption_model_argName=path or uri
cliOption_model_description=workspace-relative <path> or absolute <uri> of the model resource or model element to be processed by the workflow (optional)
-cliOption_skipSave_description=don't save model after workflow execution (optional)
-
-cliError_workflowClassNotFound=Workflow class ''{0}'' could not be found
-cliError_workflowFileDoesNotExist=Workflow file ''{0}'' does not exist
-cliError_modelResourceDoesNotExist=Model resource ''{0}'' does not exist
+cliOption_skipSave_description=don't save model after workflow execution (optional)
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/META-INF/MANIFEST.MF
index 0172b0d..f942237 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@
Require-Bundle: org.eclipse.jdt.ui,
org.eclipse.pde.core,
org.eclipse.sphinx.emf.ui,
- org.eclipse.sphinx.emf.mwe.dynamic
+ org.eclipse.sphinx.emf.mwe.dynamic;visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.sphinx.emf.mwe.dynamic.ui,
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/actions/BasicWorkflowRunnerAction.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/actions/BasicWorkflowRunnerAction.java
index 2965e72..6a40e6b 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/actions/BasicWorkflowRunnerAction.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/actions/BasicWorkflowRunnerAction.java
@@ -1,121 +1,122 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014-2015 itemis 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:
- * itemis - Initial API and implementation
- * itemis - [473260] Progress indication of check framework
- * itemis - [473261] Check Validation: Cancel button unresponsive
- *
- * </copyright>
- */
-package org.eclipse.sphinx.emf.mwe.dynamic.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.sphinx.emf.mwe.dynamic.operations.BasicWorkflowRunnerOperation;
-import org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation;
-import org.eclipse.sphinx.emf.mwe.dynamic.ui.internal.Activator;
-import org.eclipse.sphinx.emf.mwe.dynamic.ui.internal.messages.Messages;
-import org.eclipse.sphinx.emf.mwe.dynamic.ui.util.WorkflowRunnerActionHandlerHelper;
-import org.eclipse.sphinx.platform.jobs.WorkspaceOperationWorkspaceJob;
-import org.eclipse.sphinx.platform.ui.operations.RunnableWithProgressAdapter;
-import org.eclipse.sphinx.platform.ui.util.ExtendedPlatformUI;
-import org.eclipse.sphinx.platform.util.PlatformLogUtil;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-public class BasicWorkflowRunnerAction extends BaseSelectionListenerAction {
-
- private boolean runInBackground;
-
- protected WorkflowRunnerActionHandlerHelper helper;
-
- public BasicWorkflowRunnerAction() {
- this(Messages.action_runWorkflow_label);
- }
-
- public BasicWorkflowRunnerAction(String text) {
- super(text);
- setRunInBackground(false);
- helper = new WorkflowRunnerActionHandlerHelper();
- }
-
- public boolean isRunInBackground() {
- return runInBackground;
- }
-
- public void setRunInBackground(boolean runInBackground) {
- this.runInBackground = runInBackground;
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection) {
- if (helper.isWorkflow(getStructuredSelection())) {
- setText(Messages.action_runWorkflow_label);
- return true;
- }
- if (helper.isModel(getStructuredSelection())) {
- setText(Messages.action_runWorkflow_label + "..."); //$NON-NLS-1$
- return true;
- }
- return false;
- }
-
- public String getOperationName() {
- return Messages.operation_runWorkflow_label;
- }
-
- protected IWorkflowRunnerOperation createWorkflowRunnerOperation() {
- Object workflow = helper.getWorkflow(getStructuredSelection());
- if (workflow == null) {
- workflow = helper.promptForWorkflow(getStructuredSelection());
- }
-
- IWorkflowRunnerOperation operation = new BasicWorkflowRunnerOperation(getOperationName(), workflow);
- List<URI> modelURIs = helper.getModelURIs(getStructuredSelection());
- operation.getModelURIs().addAll(modelURIs);
-
- return operation;
- }
-
- protected WorkspaceJob createWorkspaceOperationJob(IWorkflowRunnerOperation operation) {
- return new WorkspaceOperationWorkspaceJob(operation);
- }
-
- /*
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- ExtendedPlatformUI.showSystemConsole();
-
- // Create the workflow operation
- IWorkflowRunnerOperation operation = createWorkflowRunnerOperation();
-
- if (isRunInBackground()) {
- // Run the workflow operation in a workspace job
- WorkspaceJob job = createWorkspaceOperationJob(operation);
- job.schedule();
- } else {
- // Run the workflow operation in a progress monitor dialog
- try {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(ExtendedPlatformUI.getActiveShell());
- dialog.run(true, true, new RunnableWithProgressAdapter(operation));
- } catch (InterruptedException ex) {
- // Operation has been canceled by user, do nothing
- } catch (InvocationTargetException ex) {
- PlatformLogUtil.logAsError(Activator.getDefault(), ex);
- }
- }
- }
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [473260] Progress indication of check framework
+ * itemis - [473261] Check Validation: Cancel button unresponsive
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.emf.mwe.dynamic.ui.actions;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.sphinx.emf.mwe.dynamic.operations.BasicWorkflowRunnerOperation;
+import org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation;
+import org.eclipse.sphinx.emf.mwe.dynamic.ui.internal.Activator;
+import org.eclipse.sphinx.emf.mwe.dynamic.ui.internal.messages.Messages;
+import org.eclipse.sphinx.emf.mwe.dynamic.ui.util.WorkflowRunnerUIHelper;
+import org.eclipse.sphinx.platform.jobs.WorkspaceOperationWorkspaceJob;
+import org.eclipse.sphinx.platform.ui.operations.RunnableWithProgressAdapter;
+import org.eclipse.sphinx.platform.ui.util.ExtendedPlatformUI;
+import org.eclipse.sphinx.platform.util.PlatformLogUtil;
+import org.eclipse.ui.actions.BaseSelectionListenerAction;
+
+public class BasicWorkflowRunnerAction extends BaseSelectionListenerAction {
+
+ private boolean runInBackground;
+
+ protected WorkflowRunnerUIHelper helper;
+
+ public BasicWorkflowRunnerAction() {
+ this(Messages.action_runWorkflow_label);
+ }
+
+ public BasicWorkflowRunnerAction(String text) {
+ super(text);
+ setRunInBackground(false);
+ helper = new WorkflowRunnerUIHelper();
+ }
+
+ public boolean isRunInBackground() {
+ return runInBackground;
+ }
+
+ public void setRunInBackground(boolean runInBackground) {
+ this.runInBackground = runInBackground;
+ }
+
+ @Override
+ protected boolean updateSelection(IStructuredSelection selection) {
+ if (helper.isWorkflow(getStructuredSelection())) {
+ setText(Messages.action_runWorkflow_label);
+ return true;
+ }
+ if (helper.isModel(getStructuredSelection())) {
+ setText(Messages.action_runWorkflow_label + "..."); //$NON-NLS-1$
+ return true;
+ }
+ return false;
+ }
+
+ public String getOperationName() {
+ return Messages.operation_runWorkflow_label;
+ }
+
+ protected IWorkflowRunnerOperation createWorkflowRunnerOperation() {
+ Object workflow = helper.getWorkflow(getStructuredSelection());
+ if (workflow == null) {
+ workflow = helper.promptForWorkflowType();
+ }
+
+ IWorkflowRunnerOperation operation = new BasicWorkflowRunnerOperation(getOperationName(), workflow);
+ List<URI> modelURIs = helper.getModelURIs(getStructuredSelection());
+ operation.getModelURIs().addAll(modelURIs);
+
+ return operation;
+ }
+
+ protected WorkspaceJob createWorkspaceOperationJob(IWorkflowRunnerOperation operation) {
+ return new WorkspaceOperationWorkspaceJob(operation);
+ }
+
+ /*
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ ExtendedPlatformUI.showSystemConsole();
+
+ // Create the workflow operation
+ IWorkflowRunnerOperation operation = createWorkflowRunnerOperation();
+
+ if (isRunInBackground()) {
+ // Run the workflow operation in a workspace job
+ WorkspaceJob job = createWorkspaceOperationJob(operation);
+ job.schedule();
+ } else {
+ // Run the workflow operation in a progress monitor dialog
+ try {
+ ProgressMonitorDialog dialog = new ProgressMonitorDialog(ExtendedPlatformUI.getActiveShell());
+ dialog.run(true, true, new RunnableWithProgressAdapter(operation));
+ } catch (InterruptedException ex) {
+ // Operation has been canceled by user, do nothing
+ } catch (InvocationTargetException ex) {
+ PlatformLogUtil.logAsError(Activator.getDefault(), ex);
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/handlers/BasicWorkflowRunnerHandler.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/handlers/BasicWorkflowRunnerHandler.java
index f93eecd..1ae3865 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/handlers/BasicWorkflowRunnerHandler.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/handlers/BasicWorkflowRunnerHandler.java
@@ -1,114 +1,115 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014-2015 itemis 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:
- * itemis - Initial API and implementation
- * itemis - [473260] Progress indication of check framework
- * itemis - [473261] Check Validation: Cancel button unresponsive
- *
- * </copyright>
- */
-package org.eclipse.sphinx.emf.mwe.dynamic.ui.handlers;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.sphinx.emf.mwe.dynamic.operations.BasicWorkflowRunnerOperation;
-import org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation;
-import org.eclipse.sphinx.emf.mwe.dynamic.ui.internal.messages.Messages;
-import org.eclipse.sphinx.emf.mwe.dynamic.ui.util.WorkflowRunnerActionHandlerHelper;
-import org.eclipse.sphinx.platform.jobs.WorkspaceOperationWorkspaceJob;
-import org.eclipse.sphinx.platform.ui.operations.RunnableWithProgressAdapter;
-import org.eclipse.sphinx.platform.ui.util.ExtendedPlatformUI;
-import org.eclipse.sphinx.platform.ui.util.SelectionUtil;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class BasicWorkflowRunnerHandler extends AbstractHandler {
-
- private IStructuredSelection selection;
- private boolean runInBackground;
-
- protected WorkflowRunnerActionHandlerHelper helper;
-
- public BasicWorkflowRunnerHandler() {
- setRunInBackground(false);
- helper = new WorkflowRunnerActionHandlerHelper();
- }
-
- public boolean isRunInBackground() {
- return runInBackground;
- }
-
- public void setRunInBackground(boolean runInBackground) {
- this.runInBackground = runInBackground;
- }
-
- protected IStructuredSelection getStructuredSelection() {
- return selection;
- }
-
- protected String getOperationName() {
- return Messages.operation_runWorkflow_label;
- }
-
- protected IWorkflowRunnerOperation createWorkflowRunnerOperation() {
- Object workflow = helper.getWorkflow(getStructuredSelection());
- if (workflow == null) {
- workflow = helper.promptForWorkflow(getStructuredSelection());
- }
-
- IWorkflowRunnerOperation operation = new BasicWorkflowRunnerOperation(getOperationName(), workflow);
- List<URI> modelURIs = helper.getModelURIs(getStructuredSelection());
- operation.getModelURIs().addAll(modelURIs);
-
- return operation;
- }
-
- protected WorkspaceJob createWorkspaceOperationJob(IWorkflowRunnerOperation operation) {
- return new WorkspaceOperationWorkspaceJob(operation);
- }
-
- /*
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- selection = SelectionUtil.getStructuredSelection(HandlerUtil.getActiveMenuSelection(event));
-
- ExtendedPlatformUI.showSystemConsole();
-
- // Create the workflow operation
- IWorkflowRunnerOperation operation = createWorkflowRunnerOperation();
-
- if (isRunInBackground()) {
- // Run the workflow operation in a workspace job
- WorkspaceJob job = createWorkspaceOperationJob(operation);
- job.schedule();
- } else {
- // Run the workflow operation in a progress monitor dialog
- try {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(ExtendedPlatformUI.getActiveShell());
- dialog.run(true, true, new RunnableWithProgressAdapter(operation));
- } catch (InterruptedException ex) {
- // Operation has been canceled by user, do nothing
- } catch (InvocationTargetException ex) {
- throw new ExecutionException(ex.getMessage(), ex);
- }
- }
-
- return null;
- }
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [473260] Progress indication of check framework
+ * itemis - [473261] Check Validation: Cancel button unresponsive
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.emf.mwe.dynamic.ui.handlers;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.sphinx.emf.mwe.dynamic.operations.BasicWorkflowRunnerOperation;
+import org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation;
+import org.eclipse.sphinx.emf.mwe.dynamic.ui.internal.messages.Messages;
+import org.eclipse.sphinx.emf.mwe.dynamic.ui.util.WorkflowRunnerUIHelper;
+import org.eclipse.sphinx.platform.jobs.WorkspaceOperationWorkspaceJob;
+import org.eclipse.sphinx.platform.ui.operations.RunnableWithProgressAdapter;
+import org.eclipse.sphinx.platform.ui.util.ExtendedPlatformUI;
+import org.eclipse.sphinx.platform.ui.util.SelectionUtil;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class BasicWorkflowRunnerHandler extends AbstractHandler {
+
+ private IStructuredSelection selection;
+ private boolean runInBackground;
+
+ protected WorkflowRunnerUIHelper helper;
+
+ public BasicWorkflowRunnerHandler() {
+ setRunInBackground(false);
+ helper = new WorkflowRunnerUIHelper();
+ }
+
+ public boolean isRunInBackground() {
+ return runInBackground;
+ }
+
+ public void setRunInBackground(boolean runInBackground) {
+ this.runInBackground = runInBackground;
+ }
+
+ protected IStructuredSelection getStructuredSelection() {
+ return selection;
+ }
+
+ protected String getOperationName() {
+ return Messages.operation_runWorkflow_label;
+ }
+
+ protected IWorkflowRunnerOperation createWorkflowRunnerOperation() {
+ Object workflow = helper.getWorkflow(getStructuredSelection());
+ if (workflow == null) {
+ workflow = helper.promptForWorkflowType();
+ }
+
+ IWorkflowRunnerOperation operation = new BasicWorkflowRunnerOperation(getOperationName(), workflow);
+ List<URI> modelURIs = helper.getModelURIs(getStructuredSelection());
+ operation.getModelURIs().addAll(modelURIs);
+
+ return operation;
+ }
+
+ protected WorkspaceJob createWorkspaceOperationJob(IWorkflowRunnerOperation operation) {
+ return new WorkspaceOperationWorkspaceJob(operation);
+ }
+
+ /*
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ selection = SelectionUtil.getStructuredSelection(HandlerUtil.getActiveMenuSelection(event));
+
+ ExtendedPlatformUI.showSystemConsole();
+
+ // Create the workflow operation
+ IWorkflowRunnerOperation operation = createWorkflowRunnerOperation();
+
+ if (isRunInBackground()) {
+ // Run the workflow operation in a workspace job
+ WorkspaceJob job = createWorkspaceOperationJob(operation);
+ job.schedule();
+ } else {
+ // Run the workflow operation in a progress monitor dialog
+ try {
+ ProgressMonitorDialog dialog = new ProgressMonitorDialog(ExtendedPlatformUI.getActiveShell());
+ dialog.run(true, true, new RunnableWithProgressAdapter(operation));
+ } catch (InterruptedException ex) {
+ // Operation has been canceled by user, do nothing
+ } catch (InvocationTargetException ex) {
+ throw new ExecutionException(ex.getMessage(), ex);
+ }
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/util/WorkflowRunnerActionHandlerHelper.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/util/WorkflowRunnerUIHelper.java
similarity index 96%
rename from plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/util/WorkflowRunnerActionHandlerHelper.java
rename to plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/util/WorkflowRunnerUIHelper.java
index ff4d8ae..33448e9 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/util/WorkflowRunnerActionHandlerHelper.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui/src/org/eclipse/sphinx/emf/mwe/dynamic/ui/util/WorkflowRunnerUIHelper.java
@@ -35,7 +35,7 @@
import org.eclipse.sphinx.platform.ui.util.ExtendedPlatformUI;
import org.eclipse.ui.dialogs.SelectionDialog;
-public class WorkflowRunnerActionHandlerHelper {
+public class WorkflowRunnerUIHelper {
public boolean isWorkflow(IStructuredSelection structuredSelection) {
return getWorkflow(structuredSelection) != null;
@@ -65,14 +65,14 @@
return null;
}
- public Object promptForWorkflow(IStructuredSelection structuredSelection) {
+ public IType promptForWorkflowType() {
SelectionDialog dialog = new WorkflowTypeSelectionDialog(ExtendedPlatformUI.getActiveShell());
int returnCode = dialog.open();
if (returnCode == IDialogConstants.OK_ID) {
Object[] workflowTypes = dialog.getResult();
if (workflowTypes.length > 0) {
- return workflowTypes[0];
+ return (IType) workflowTypes[0];
}
}
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/IModelWorkflowSlots.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/IModelWorkflowSlots.java
new file mode 100644
index 0000000..78cedf9
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/IModelWorkflowSlots.java
@@ -0,0 +1,41 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.emf.mwe.dynamic;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot;
+import org.eclipse.emf.mwe2.runtime.workflow.Workflow;
+
+public interface IModelWorkflowSlots {
+
+ /**
+ * Name of slot for passing a {@link EObject model element} to {@link Workflow workflow}s and
+ * {@link WorkflowComponentWithModelSlot workflow component}s.
+ */
+ String MODEL_SLOT_NAME = "model"; //$NON-NLS-1$
+
+ /**
+ * Name of slot for passing arguments to {@link Workflow workflow}s and {@link WorkflowComponentWithModelSlot
+ * workflow component}s.
+ */
+ String ARGUMENTS_SLOT_NAME = "arguments"; //$NON-NLS-1$
+
+ /**
+ * Name of slot for passing a {@link IProgressMonitor progress monitor} to {@link Workflow workflow}s and
+ * {@link WorkflowComponentWithModelSlot workflow component}s.
+ */
+ String PROGRESS_MONTIOR_SLOT_NAME = "progressMonitor"; //$NON-NLS-1$
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/IWorkflowSlots.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/IWorkflowSlots.java
index a5e3f89..752f19a 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/IWorkflowSlots.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/IWorkflowSlots.java
@@ -1,35 +1,24 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014 itemis 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:
- * itemis - Initial API and implementation
- *
- * </copyright>
- */
-package org.eclipse.sphinx.emf.mwe.dynamic;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.mwe.core.lib.WorkflowComponentWithModelSlot;
-import org.eclipse.emf.mwe2.runtime.workflow.Workflow;
-
-public interface IWorkflowSlots {
-
- /**
- * Name of slot for passing a {@link EObject model element} to {@link Workflow workflow}s and
- * {@link WorkflowComponentWithModelSlot workflow component}s.
- */
- String MODEL_SLOT_NAME = "model"; //$NON-NLS-1$
-
- /**
- * Name of slot for passing a {@link IProgressMonitor progress monitor} to {@link Workflow workflow}s and
- * {@link WorkflowComponentWithModelSlot workflow component}s.
- */
- String PROGRESS_MONTIOR_SLOT_NAME = "progressMonitor"; //$NON-NLS-1$
-}
\ No newline at end of file
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.emf.mwe.dynamic;
+
+/**
+ * @deprecated Use {@link IModelWorkflowSlots} instead.
+ */
+@Deprecated
+public interface IWorkflowSlots extends IModelWorkflowSlots {
+
+}
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/ModelWorkflowContext.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/ModelWorkflowContext.java
index a32b25f..ed81c83 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/ModelWorkflowContext.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/ModelWorkflowContext.java
@@ -1,40 +1,47 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014 itemis 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:
- * itemis - Initial API and implementation
- *
- * </copyright>
- */
-package org.eclipse.sphinx.emf.mwe.dynamic;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl;
-
-// TODO Check if type of model should be List<EObject> rather than Object
-// TODO Provide "model" spezialization of org.eclipse.emf.mwe.core.WorkflowContext and use it in AbstractWorkspaceWorkflowComponent.WorkspaceMwe2Bridge#invoke(IWorkflowContext)
-public class ModelWorkflowContext extends WorkflowContextImpl {
-
- public ModelWorkflowContext(Object model, IProgressMonitor monitor) {
- put(IWorkflowSlots.MODEL_SLOT_NAME, model);
- put(IWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME, monitor);
- }
-
- @SuppressWarnings("unchecked")
- public List<EObject> getModel() {
- return (List<EObject>) get(IWorkflowSlots.MODEL_SLOT_NAME);
- }
-
- public IProgressMonitor getProgressMonitor() {
- return (IProgressMonitor) get(IWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME);
- }
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.emf.mwe.dynamic;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.mwe2.runtime.workflow.WorkflowContextImpl;
+
+// TODO Provide "model" specialization of org.eclipse.emf.mwe.core.WorkflowContext and use it in AbstractWorkspaceWorkflowComponent.WorkspaceMwe2Bridge#invoke(IWorkflowContext)
+public class ModelWorkflowContext extends WorkflowContextImpl {
+
+ public ModelWorkflowContext(Object model, Map<String, Object> arguments, IProgressMonitor monitor) {
+ put(IModelWorkflowSlots.MODEL_SLOT_NAME, model);
+ put(IModelWorkflowSlots.ARGUMENTS_SLOT_NAME, arguments);
+ put(IModelWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME, monitor);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<EObject> getModel() {
+ return (List<EObject>) get(IModelWorkflowSlots.MODEL_SLOT_NAME);
+ }
+
+ @SuppressWarnings("unchecked")
+ public Map<String, Object> getArguments() {
+ return (Map<String, Object>) get(IModelWorkflowSlots.ARGUMENTS_SLOT_NAME);
+ }
+
+ public IProgressMonitor getProgressMonitor() {
+ return (IProgressMonitor) get(IModelWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME);
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/WorkspaceWorkflow.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/WorkspaceWorkflow.java
index f195b18..9bd1f92 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/WorkspaceWorkflow.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/WorkspaceWorkflow.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2014 itemis and others.
+ * Copyright (c) 2014-2016 itemis 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
@@ -9,6 +9,7 @@
*
* Contributors:
* itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
@@ -33,7 +34,7 @@
*/
@Override
public void invoke(IWorkflowContext ctx) {
- Object monitorAsObject = ctx.get(IWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME);
+ Object monitorAsObject = ctx.get(IModelWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME);
IProgressMonitor monitor = monitorAsObject instanceof IProgressMonitor ? (IProgressMonitor) monitorAsObject : new NullProgressMonitor();
SubMonitor progress = SubMonitor.convert(monitor, getChildren().size());
if (progress.isCanceled()) {
@@ -41,7 +42,7 @@
}
for (IWorkflowComponent component : getChildren()) {
- ctx.put(IWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME, progress.newChild(1));
+ ctx.put(IModelWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME, progress.newChild(1));
component.invoke(ctx);
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/components/AbstractWorkspaceWorkflowComponent.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/components/AbstractWorkspaceWorkflowComponent.java
index de18d30..077abfa 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/components/AbstractWorkspaceWorkflowComponent.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/components/AbstractWorkspaceWorkflowComponent.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2014 itemis and others.
+ * Copyright (c) 2014-2016 itemis 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
@@ -9,6 +9,7 @@
*
* Contributors:
* itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
@@ -26,7 +27,7 @@
import org.eclipse.emf.mwe.core.monitor.ProgressMonitor;
import org.eclipse.emf.mwe.core.monitor.ProgressMonitorAdapter;
import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowContext;
-import org.eclipse.sphinx.emf.mwe.dynamic.IWorkflowSlots;
+import org.eclipse.sphinx.emf.mwe.dynamic.IModelWorkflowSlots;
import org.eclipse.sphinx.emf.mwe.dynamic.internal.Activator;
import org.eclipse.sphinx.platform.util.PlatformLogUtil;
@@ -65,7 +66,7 @@
public void invoke(final IWorkflowContext ctx) {
IssuesImpl issues = new IssuesImpl();
- Object monitorAsObject = ctx.get(IWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME);
+ Object monitorAsObject = ctx.get(IModelWorkflowSlots.PROGRESS_MONTIOR_SLOT_NAME);
ProgressMonitor monitor = monitorAsObject instanceof IProgressMonitor ? new ProgressMonitorAdapter((IProgressMonitor) monitorAsObject)
: new NullProgressMonitor();
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/internal/messages/Messages.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/internal/messages/Messages.java
index 21ce32e..5e4f2f1 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/internal/messages/Messages.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/internal/messages/Messages.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2014 itemis and others.
+ * Copyright (c) 2014-2016 itemis 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
@@ -9,6 +9,7 @@
*
* Contributors:
* itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
@@ -19,9 +20,12 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.sphinx.emf.mwe.dynamic.internal.messages.messages"; //$NON-NLS-1$
- public static String modelResourceDoesNotExistError;
- public static String modelResourceContainsNoMatchingElementError;
- public static String modelResourceCouldNotBeLoadedError;
+ public static String error_workflowClassNotFound;
+ public static String error_workflowFileDoesNotExist;
+ public static String error_modelResourceDoesNotExist;
+
+ public static String error_modelResourceContainsNoMatchingElement;
+ public static String error_modelResourceCouldNotBeLoaded;
static {
// initialize resource bundle
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/internal/messages/messages.properties b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/internal/messages/messages.properties
index 1d88a46..6b3a368 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/internal/messages/messages.properties
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/internal/messages/messages.properties
@@ -1,6 +1,6 @@
# <copyright>
#
-# Copyright (c) 2014 itemis and others.
+# Copyright (c) 2014-2016 itemis 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
@@ -8,6 +8,7 @@
#
# Contributors:
# itemis - Initial API and implementation
+# itemis - [503063] Provide launching support for Sphinx Workflows
#
# </copyright>
@@ -15,6 +16,10 @@
# ------------------------------------------------------------------- #
# Internal messages for org.eclipse.sphinx.emf.mwe.dynamic #
# ------------------------------------------------------------------- #
-modelResourceDoesNotExistError=Model resource ''{0}'' does not exist
-modelResourceContainsNoMatchingElementError=Model resource ''{0}'' contains no ''{1}'' element
-modelResourceCouldNotBeLoadedError=Model resource ''{0}'' could not be loaded
+
+error_workflowClassNotFound=Workflow class ''{0}'' could not be found
+error_workflowFileDoesNotExist=Workflow file ''{0}'' does not exist
+error_modelResourceDoesNotExist=Model resource ''{0}'' does not exist
+
+error_modelResourceContainsNoMatchingElement=Model resource ''{0}'' contains no ''{1}'' element
+error_modelResourceCouldNotBeLoaded=Model resource ''{0}'' could not be loaded
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/BasicWorkflowRunnerOperation.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/BasicWorkflowRunnerOperation.java
index 94dd9b1..d388503 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/BasicWorkflowRunnerOperation.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/BasicWorkflowRunnerOperation.java
@@ -1,459 +1,472 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014 itemis 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:
- * itemis - Initial API and implementation
- * itemis - [463980] org.eclipse.sphinx.emf.mwe.dynamic.operations.BasicWorkflowRunnerOperation.run(IProgressMonitor) should not be final
- *
- * </copyright>
- */
-package org.eclipse.sphinx.emf.mwe.dynamic.operations;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-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.emf.mwe2.runtime.workflow.IWorkflow;
-import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent;
-import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowContext;
-import org.eclipse.emf.mwe2.runtime.workflow.Workflow;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.sphinx.emf.model.IModelDescriptor;
-import org.eclipse.sphinx.emf.model.ModelDescriptorRegistry;
-import org.eclipse.sphinx.emf.mwe.dynamic.IWorkflowHandler;
-import org.eclipse.sphinx.emf.mwe.dynamic.ModelWorkflowContext;
-import org.eclipse.sphinx.emf.mwe.dynamic.WorkflowContributorRegistry;
-import org.eclipse.sphinx.emf.mwe.dynamic.WorkflowHandlerRegistry;
-import org.eclipse.sphinx.emf.mwe.dynamic.WorkspaceWorkflow;
-import org.eclipse.sphinx.emf.mwe.dynamic.components.IModelWorkflowComponent;
-import org.eclipse.sphinx.emf.mwe.dynamic.internal.Activator;
-import org.eclipse.sphinx.emf.mwe.dynamic.internal.messages.Messages;
-import org.eclipse.sphinx.emf.mwe.dynamic.util.XtendUtil;
-import org.eclipse.sphinx.emf.saving.SaveIndicatorUtil;
-import org.eclipse.sphinx.emf.util.EcorePlatformUtil;
-import org.eclipse.sphinx.emf.util.EcoreResourceUtil;
-import org.eclipse.sphinx.emf.util.WorkspaceTransactionUtil;
-import org.eclipse.sphinx.emf.workspace.loading.ModelLoadManager;
-import org.eclipse.sphinx.jdt.loaders.ProjectClassLoader;
-import org.eclipse.sphinx.platform.operations.AbstractLabeledRunnable;
-import org.eclipse.sphinx.platform.operations.AbstractWorkspaceOperation;
-import org.eclipse.sphinx.platform.operations.ILabeledRunnable;
-import org.eclipse.sphinx.platform.util.StatusUtil;
-
-public class BasicWorkflowRunnerOperation extends AbstractWorkspaceOperation implements IWorkflowRunnerOperation {
-
- private Object model;
- private Object workflow;
- private Workflow workflowInstance = null;
-
- private boolean autoSave = false;
-
- private List<URI> modelURIs = new ArrayList<URI>();
- private Set<IModelDescriptor> modelDescriptors = new HashSet<IModelDescriptor>();
- private Set<Resource> emfModelResources = new HashSet<Resource>();
-
- public BasicWorkflowRunnerOperation(String label, Object workflow) {
- super(label);
- this.workflow = workflow;
- }
-
- /*
- * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#getWorkflow()
- */
- @Override
- public Object getWorkflow() {
- return workflow;
- }
-
- /*
- * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#getModelURIs()
- */
- @Override
- public List<URI> getModelURIs() {
- return modelURIs;
- }
-
- /*
- * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#setAutoSave(boolean)
- */
- @Override
- public void setAutoSave(boolean autoSave) {
- this.autoSave = autoSave;
- }
-
- /*
- * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#isAutoSave()
- */
- @Override
- public boolean isAutoSave() {
- return autoSave;
- }
-
- /*
- * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#getModel()
- */
- @Override
- public Object getModel() {
- return model;
- }
-
- /*
- * @see org.eclipse.sphinx.platform.operations.IWorkspaceOperation#getRule()
- */
- @Override
- public ISchedulingRule getRule() {
- // TODO Compute scheduling rule by combining scheduling rules from workflow components
- return null;
- }
-
- /*
- * @see org.eclipse.core.resources.IWorkspaceRunnable#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void run(final IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- try {
- SubMonitor progress = SubMonitor.convert(monitor, 100);
- if (progress.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- final Workflow workflowInstance = getWorkflowInstance();
- if (workflowInstance == null) {
- return;
- }
-
- // Load selected Sphinx/EMF model file (if any)
- // FIXME Don't pass model around - just let methods directly access the field
- model = loadModel(progress.newChild(5));
-
- final IWorkflowContext context = createWorkflowContext(model, progress.newChild(90));
-
- // Pre-run handers sorted by their priority
- List<IWorkflowHandler> sortedHandlers = WorkflowHandlerRegistry.INSTANCE.getSortedHandlers(workflowInstance.getClass().asSubclass(
- IWorkflow.class));
- for (IWorkflowHandler workflowHandler : sortedHandlers) {
- workflowHandler.preRun(workflowInstance, context);
- }
-
- ILabeledRunnable runnable = new AbstractLabeledRunnable(getLabel()) {
- @Override
- public void run() {
- workflowInstance.run(context);
- }
- };
-
- // Workflow dealing with some model?
- // FIXME Don't pass model around - just let methods directly access the field
- TransactionalEditingDomain editingDomain = getEditingDomain(model);
- if (editingDomain != null && hasModelWorkflowComponents(workflowInstance)) {
- // Workflow intending to modify the model?
- if (isModifyingModel(workflowInstance)) {
- // Execute in write transaction
- WorkspaceTransactionUtil.executeInWriteTransaction(editingDomain, runnable);
- } else {
- // Execute in read transaction
- editingDomain.runExclusive(runnable);
- }
- } else {
- // Execute right away
- runnable.run();
- }
-
- // Post-run handlers
- for (IWorkflowHandler workflowHandler : sortedHandlers) {
- workflowHandler.postRun(workflowInstance, context);
- }
-
- // Save model if needed
- if (isAutoSave()) {
- saveModel(progress.newChild(5));
- } else {
- progress.worked(5);
- }
- } catch (OperationCanceledException ex) {
- throw ex;
- } catch (Exception ex) {
- IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
- throw new CoreException(status);
- }
- }
-
- protected IWorkflowContext createWorkflowContext(Object model, IProgressMonitor monitor) {
- return new ModelWorkflowContext(model, monitor);
- }
-
- protected Workflow getWorkflowInstance() throws CoreException {
- try {
- if (workflowInstance == null) {
- Class<Workflow> workflowClass = null;
-
- IType workflowType = getWorkflowType();
- if (workflowType != null) {
- workflowClass = loadWorkflowClass(workflowType);
- } else {
- workflowClass = getWorkflowClass();
- }
-
- if (workflowClass != null) {
- workflowInstance = workflowClass.newInstance();
- }
- }
- return workflowInstance;
- } catch (CoreException ex) {
- throw ex;
- } catch (Exception ex) {
- IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
- throw new CoreException(status);
- }
- }
-
- protected IType getWorkflowType() {
- if (workflow instanceof IType) {
- return (IType) workflow;
- }
- if (workflow instanceof ICompilationUnit) {
- return ((ICompilationUnit) workflow).findPrimaryType();
- }
- if (workflow instanceof IFile) {
- IJavaElement workflowJavaElement = XtendUtil.getJavaElement((IFile) workflow);
- if (workflowJavaElement instanceof ICompilationUnit) {
- return ((ICompilationUnit) workflowJavaElement).findPrimaryType();
- }
- }
- return null;
- }
-
- protected Class<Workflow> getWorkflowClass() throws CoreException {
- if (workflow instanceof Class<?>) {
- Class<?> clazz = (Class<?>) workflow;
- if (!Workflow.class.isAssignableFrom(clazz)) {
- Exception ex = new IllegalStateException("Workflow class '" + clazz.getName() + "' is not a subclass of " + Workflow.class.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
- throw new CoreException(status);
- }
- @SuppressWarnings("unchecked")
- Class<Workflow> workflowClass = (Class<Workflow>) clazz;
- return workflowClass;
- }
- return null;
- }
-
- protected Class<Workflow> loadWorkflowClass(IType workflowType) throws CoreException {
- Assert.isNotNull(workflowType);
-
- try {
- // Find out where given workflow type originates from
- if (!workflowType.isBinary()) {
- // Workflow type refers to an on-the-fly compiled Java class in the runtime workspace
-
- // Create project class loader capable of loading Java class behind workflow type from underlying Java
- // or plug-in project in runtime workspace
- ProjectClassLoader projectClassLoader = new ProjectClassLoader(workflowType.getJavaProject());
-
- // TODO Surround with appropriate tracing option
- // ClassLoaderExtensions.printHierarchy(projectClassLoader);
-
- // Use project class loader to load Java class behind workflow type
- Class<?> clazz = projectClassLoader.loadClass(workflowType.getFullyQualifiedName());
- if (!Workflow.class.isAssignableFrom(clazz)) {
- throw new IllegalStateException("Workflow class '" + clazz.getName() + "' is not a subclass of " + Workflow.class.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- @SuppressWarnings("unchecked")
- Class<Workflow> workflowClass = (Class<Workflow>) clazz;
- return workflowClass;
- } else {
- // Workflow type refers to a binary Java class from the running Eclipse instance
-
- // Load Java class behind workflow type from underlying contributor plug-in
- return WorkflowContributorRegistry.INSTANCE.loadContributedWorkflowClass(workflowType);
- }
- } catch (CoreException ex) {
- throw ex;
- } catch (Exception ex) {
- IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
- throw new CoreException(status);
- }
- }
-
- protected TransactionalEditingDomain getEditingDomain(Object model) {
- if (model instanceof EObject || model instanceof Resource) {
- return TransactionUtil.getEditingDomain(model);
- }
- if (model instanceof List) {
- List<?> models = (List<?>) model;
- if (!models.isEmpty()) {
- return getEditingDomain(models.get(0));
- }
- }
- return null;
- }
-
- protected boolean hasModelWorkflowComponents(Workflow workflow) {
- if (workflow instanceof WorkspaceWorkflow) {
- List<IWorkflowComponent> children = ((WorkspaceWorkflow) workflow).getChildren();
- for (IWorkflowComponent component : children) {
- if (component instanceof IModelWorkflowComponent) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected boolean isModifyingModel(Workflow workflow) {
- if (workflow instanceof WorkspaceWorkflow) {
- List<IWorkflowComponent> children = ((WorkspaceWorkflow) workflow).getChildren();
- for (IWorkflowComponent component : children) {
- if (component instanceof IModelWorkflowComponent) {
- if (((IModelWorkflowComponent) component).isModifyingModel()) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- protected Object loadModel(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- if (modelURIs.isEmpty()) {
- return null;
- }
-
- final SubMonitor progress = SubMonitor.convert(monitor, modelURIs.size() * 2);
- if (progress.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- List<EObject> modelObjects = new ArrayList<EObject>();
-
- // Loads Sphinx integrated models
- // FIXME Pass appropriate SubMonitor instance rather than monitor directly
- ModelLoadManager.INSTANCE.loadURIs(modelURIs, false, progress.newChild(modelURIs.size()));
-
- // FIXME ResourceSet for regular EMF model files must not go out of scope and resources must be unloaded after
- // workflow execution; implement this ResourceSet as field and use it as replacement for emfModelResources
- ResourceSet resouceSet = new ResourceSetImpl();
- for (URI modelURI : modelURIs) {
- IFile file = EcorePlatformUtil.getFile(modelURI.trimFragment());
- // Sphinx integrated model
- if (ModelDescriptorRegistry.INSTANCE.isModelFile(file)) {
- String fragment = modelURI.fragment();
- if (fragment != null) {
- // URI refers to a model object
- EObject eObject = EcorePlatformUtil.getEObject(modelURI);
- if (eObject == null) {
- IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(),
- NLS.bind(Messages.modelResourceContainsNoMatchingElementError, modelURI.toPlatformString(true), fragment));
- throw new CoreException(status);
- }
- modelObjects.add(eObject);
- IModelDescriptor modelDescriptor = ModelDescriptorRegistry.INSTANCE.getModel(eObject.eResource());
- modelDescriptors.add(modelDescriptor);
- } else {
- // URI refers to a model resource
- // Exclude Xtend files from being considered as workflow models
- if (!XtendUtil.isXtendResource(modelURI)) {
- Resource modelResource = EcorePlatformUtil.getResource(modelURI);
- if (modelResource == null) {
- IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(),
- NLS.bind(Messages.modelResourceCouldNotBeLoadedError, modelURI.toPlatformString(true)));
- throw new CoreException(status);
- }
- modelObjects.addAll(modelResource.getContents());
- IModelDescriptor modelDescriptor = ModelDescriptorRegistry.INSTANCE.getModel(modelResource);
- modelDescriptors.add(modelDescriptor);
- }
- }
- } else {
- // Regular EMF model
- String fragment = modelURI.fragment();
- if (fragment != null) {
- // URI refers to a model object
- EObject eObject = EcoreResourceUtil.loadEObject(resouceSet, modelURI);
- if (eObject == null) {
- IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(),
- NLS.bind(Messages.modelResourceContainsNoMatchingElementError, modelURI.toPlatformString(true), fragment));
- throw new CoreException(status);
- }
- modelObjects.add(eObject);
- emfModelResources.add(eObject.eResource());
- } else {
- // URI refers to a model resource
- // Exclude Xtend files from being considered as workflow models
- if (!XtendUtil.isXtendResource(modelURI)) {
- Resource modelResource = EcoreResourceUtil.loadResource(resouceSet, modelURI, null);
- if (modelResource == null) {
- IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(),
- NLS.bind(Messages.modelResourceCouldNotBeLoadedError, modelURI.toPlatformString(true)));
- throw new CoreException(status);
- }
- modelObjects.addAll(modelResource.getContents());
- emfModelResources.add(modelResource);
- }
- }
- }
-
- progress.worked(1);
- if (progress.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
-
- return !modelObjects.isEmpty() ? modelObjects : null;
- }
-
- protected void saveModel(IProgressMonitor monitor) {
- final SubMonitor progress = SubMonitor.convert(monitor, modelDescriptors.size() + emfModelResources.size());
- if (progress.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- // Save Sphinx integrated models
- for (IModelDescriptor modelDescriptor : modelDescriptors) {
- if (SaveIndicatorUtil.isDirty(modelDescriptor)) {
- EcorePlatformUtil.saveModel(modelDescriptor, false, progress.newChild(1));
-
- if (progress.isCanceled()) {
- throw new OperationCanceledException();
- }
- } else {
- progress.worked(1);
- }
- }
-
- // Save regular EMF models
- for (Resource modelResource : emfModelResources) {
- EcoreResourceUtil.saveModelResource(modelResource, null);
- progress.worked(1);
-
- if (progress.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
- }
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [463980] org.eclipse.sphinx.emf.mwe.dynamic.operations.BasicWorkflowRunnerOperation.run(IProgressMonitor) should not be final
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.emf.mwe.dynamic.operations;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+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.emf.mwe2.runtime.workflow.IWorkflow;
+import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent;
+import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowContext;
+import org.eclipse.emf.mwe2.runtime.workflow.Workflow;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.sphinx.emf.model.IModelDescriptor;
+import org.eclipse.sphinx.emf.model.ModelDescriptorRegistry;
+import org.eclipse.sphinx.emf.mwe.dynamic.IWorkflowHandler;
+import org.eclipse.sphinx.emf.mwe.dynamic.ModelWorkflowContext;
+import org.eclipse.sphinx.emf.mwe.dynamic.WorkflowContributorRegistry;
+import org.eclipse.sphinx.emf.mwe.dynamic.WorkflowHandlerRegistry;
+import org.eclipse.sphinx.emf.mwe.dynamic.WorkspaceWorkflow;
+import org.eclipse.sphinx.emf.mwe.dynamic.components.IModelWorkflowComponent;
+import org.eclipse.sphinx.emf.mwe.dynamic.internal.Activator;
+import org.eclipse.sphinx.emf.mwe.dynamic.internal.messages.Messages;
+import org.eclipse.sphinx.emf.mwe.dynamic.util.XtendUtil;
+import org.eclipse.sphinx.emf.saving.SaveIndicatorUtil;
+import org.eclipse.sphinx.emf.util.EcorePlatformUtil;
+import org.eclipse.sphinx.emf.util.EcoreResourceUtil;
+import org.eclipse.sphinx.emf.util.WorkspaceTransactionUtil;
+import org.eclipse.sphinx.emf.workspace.loading.ModelLoadManager;
+import org.eclipse.sphinx.jdt.loaders.ProjectClassLoader;
+import org.eclipse.sphinx.platform.operations.AbstractLabeledRunnable;
+import org.eclipse.sphinx.platform.operations.AbstractWorkspaceOperation;
+import org.eclipse.sphinx.platform.operations.ILabeledRunnable;
+import org.eclipse.sphinx.platform.util.StatusUtil;
+
+public class BasicWorkflowRunnerOperation extends AbstractWorkspaceOperation implements IWorkflowRunnerOperation {
+
+ private Object workflow;
+ private Workflow workflowInstance = null;
+
+ private Object model;
+ private List<URI> modelURIs = new ArrayList<URI>();
+ private Set<IModelDescriptor> modelDescriptors = new HashSet<IModelDescriptor>();
+ private Set<Resource> emfModelResources = new HashSet<Resource>();
+
+ private boolean autoSave = false;
+
+ private Map<String, Object> arguments = new HashMap<String, Object>();
+
+ public BasicWorkflowRunnerOperation(String label, Object workflow) {
+ super(label);
+ this.workflow = workflow;
+ }
+
+ /*
+ * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#getWorkflow()
+ */
+ @Override
+ public Object getWorkflow() {
+ return workflow;
+ }
+
+ /*
+ * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#getModel()
+ */
+ @Override
+ public Object getModel() {
+ return model;
+ }
+
+ /*
+ * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#getModelURIs()
+ */
+ @Override
+ public List<URI> getModelURIs() {
+ return modelURIs;
+ }
+
+ /*
+ * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#isAutoSave()
+ */
+ @Override
+ public boolean isAutoSave() {
+ return autoSave;
+ }
+
+ /*
+ * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#setAutoSave(boolean)
+ */
+ @Override
+ public void setAutoSave(boolean autoSave) {
+ this.autoSave = autoSave;
+ }
+
+ /*
+ * @see org.eclipse.sphinx.emf.mwe.dynamic.operations.IWorkflowRunnerOperation#getArguments()
+ */
+ @Override
+ public Map<String, Object> getArguments() {
+ return arguments;
+ }
+
+ /*
+ * @see org.eclipse.sphinx.platform.operations.IWorkspaceOperation#getRule()
+ */
+ @Override
+ public ISchedulingRule getRule() {
+ // TODO Compute scheduling rule by combining scheduling rules from workflow components
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.core.resources.IWorkspaceRunnable#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ public void run(final IProgressMonitor monitor) throws CoreException, OperationCanceledException {
+ try {
+ SubMonitor progress = SubMonitor.convert(monitor, 100);
+ if (progress.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+
+ final Workflow workflowInstance = getWorkflowInstance();
+ if (workflowInstance == null) {
+ return;
+ }
+
+ // Load selected Sphinx/EMF model file (if any)
+ // FIXME Don't pass model around - just let methods directly access the field
+ model = loadModel(progress.newChild(5));
+
+ final IWorkflowContext context = createWorkflowContext(model, arguments, progress.newChild(90));
+
+ // Pre-run handers sorted by their priority
+ List<IWorkflowHandler> sortedHandlers = WorkflowHandlerRegistry.INSTANCE
+ .getSortedHandlers(workflowInstance.getClass().asSubclass(IWorkflow.class));
+ for (IWorkflowHandler workflowHandler : sortedHandlers) {
+ workflowHandler.preRun(workflowInstance, context);
+ }
+
+ ILabeledRunnable runnable = new AbstractLabeledRunnable(getLabel()) {
+ @Override
+ public void run() {
+ workflowInstance.run(context);
+ }
+ };
+
+ // Workflow dealing with some model?
+ // FIXME Don't pass model around - just let methods directly access the field
+ TransactionalEditingDomain editingDomain = getEditingDomain(model);
+ if (editingDomain != null && hasModelWorkflowComponents(workflowInstance)) {
+ // Workflow intending to modify the model?
+ if (isModifyingModel(workflowInstance)) {
+ // Execute in write transaction
+ WorkspaceTransactionUtil.executeInWriteTransaction(editingDomain, runnable);
+ } else {
+ // Execute in read transaction
+ editingDomain.runExclusive(runnable);
+ }
+ } else {
+ // Execute right away
+ runnable.run();
+ }
+
+ // Post-run handlers
+ for (IWorkflowHandler workflowHandler : sortedHandlers) {
+ workflowHandler.postRun(workflowInstance, context);
+ }
+
+ // Save model if needed
+ if (isAutoSave()) {
+ saveModel(progress.newChild(5));
+ } else {
+ progress.worked(5);
+ }
+ } catch (OperationCanceledException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
+ throw new CoreException(status);
+ }
+ }
+
+ protected IWorkflowContext createWorkflowContext(Object model, Map<String, Object> arguments, IProgressMonitor monitor) {
+ return new ModelWorkflowContext(model, arguments, monitor);
+ }
+
+ protected Workflow getWorkflowInstance() throws CoreException {
+ try {
+ if (workflowInstance == null) {
+ Class<Workflow> workflowClass = null;
+
+ IType workflowType = getWorkflowType();
+ if (workflowType != null) {
+ workflowClass = loadWorkflowClass(workflowType);
+ } else {
+ workflowClass = getWorkflowClass();
+ }
+
+ if (workflowClass != null) {
+ workflowInstance = workflowClass.newInstance();
+ }
+ }
+ return workflowInstance;
+ } catch (CoreException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
+ throw new CoreException(status);
+ }
+ }
+
+ protected IType getWorkflowType() {
+ if (workflow instanceof IType) {
+ return (IType) workflow;
+ }
+ if (workflow instanceof ICompilationUnit) {
+ return ((ICompilationUnit) workflow).findPrimaryType();
+ }
+ if (workflow instanceof IFile) {
+ IJavaElement workflowJavaElement = XtendUtil.getJavaElement((IFile) workflow);
+ if (workflowJavaElement instanceof ICompilationUnit) {
+ return ((ICompilationUnit) workflowJavaElement).findPrimaryType();
+ }
+ }
+ return null;
+ }
+
+ protected Class<Workflow> getWorkflowClass() throws CoreException {
+ if (workflow instanceof Class<?>) {
+ Class<?> clazz = (Class<?>) workflow;
+ if (!Workflow.class.isAssignableFrom(clazz)) {
+ Exception ex = new IllegalStateException("Workflow class '" + clazz.getName() + "' is not a subclass of " + Workflow.class.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
+ throw new CoreException(status);
+ }
+ @SuppressWarnings("unchecked")
+ Class<Workflow> workflowClass = (Class<Workflow>) clazz;
+ return workflowClass;
+ }
+ return null;
+ }
+
+ protected Class<Workflow> loadWorkflowClass(IType workflowType) throws CoreException {
+ Assert.isNotNull(workflowType);
+
+ try {
+ // Find out where given workflow type originates from
+ if (!workflowType.isBinary()) {
+ // Workflow type refers to an on-the-fly compiled Java class in the runtime workspace
+
+ // Create project class loader capable of loading Java class behind workflow type from underlying Java
+ // or plug-in project in runtime workspace
+ ProjectClassLoader projectClassLoader = new ProjectClassLoader(workflowType.getJavaProject());
+
+ // TODO Surround with appropriate tracing option
+ // ClassLoaderExtensions.printHierarchy(projectClassLoader);
+
+ // Use project class loader to load Java class behind workflow type
+ Class<?> clazz = projectClassLoader.loadClass(workflowType.getFullyQualifiedName());
+ if (!Workflow.class.isAssignableFrom(clazz)) {
+ throw new IllegalStateException("Workflow class '" + clazz.getName() + "' is not a subclass of " + Workflow.class.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ @SuppressWarnings("unchecked")
+ Class<Workflow> workflowClass = (Class<Workflow>) clazz;
+ return workflowClass;
+ } else {
+ // Workflow type refers to a binary Java class from the running Eclipse instance
+
+ // Load Java class behind workflow type from underlying contributor plug-in
+ return WorkflowContributorRegistry.INSTANCE.loadContributedWorkflowClass(workflowType);
+ }
+ } catch (CoreException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
+ throw new CoreException(status);
+ }
+ }
+
+ protected TransactionalEditingDomain getEditingDomain(Object model) {
+ if (model instanceof EObject || model instanceof Resource) {
+ return TransactionUtil.getEditingDomain(model);
+ }
+ if (model instanceof List) {
+ List<?> models = (List<?>) model;
+ if (!models.isEmpty()) {
+ return getEditingDomain(models.get(0));
+ }
+ }
+ return null;
+ }
+
+ protected boolean hasModelWorkflowComponents(Workflow workflow) {
+ if (workflow instanceof WorkspaceWorkflow) {
+ List<IWorkflowComponent> children = ((WorkspaceWorkflow) workflow).getChildren();
+ for (IWorkflowComponent component : children) {
+ if (component instanceof IModelWorkflowComponent) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ protected boolean isModifyingModel(Workflow workflow) {
+ if (workflow instanceof WorkspaceWorkflow) {
+ List<IWorkflowComponent> children = ((WorkspaceWorkflow) workflow).getChildren();
+ for (IWorkflowComponent component : children) {
+ if (component instanceof IModelWorkflowComponent) {
+ if (((IModelWorkflowComponent) component).isModifyingModel()) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ protected Object loadModel(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
+ if (modelURIs.isEmpty()) {
+ return null;
+ }
+
+ final SubMonitor progress = SubMonitor.convert(monitor, modelURIs.size() * 2);
+ if (progress.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+
+ List<EObject> modelObjects = new ArrayList<EObject>();
+
+ // Loads Sphinx integrated models
+ // FIXME Pass appropriate SubMonitor instance rather than monitor directly
+ ModelLoadManager.INSTANCE.loadURIs(modelURIs, false, progress.newChild(modelURIs.size()));
+
+ // FIXME ResourceSet for regular EMF model files must not go out of scope and resources must be unloaded after
+ // workflow execution; implement this ResourceSet as field and use it as replacement for emfModelResources
+ ResourceSet resouceSet = new ResourceSetImpl();
+ for (URI modelURI : modelURIs) {
+ IFile file = EcorePlatformUtil.getFile(modelURI.trimFragment());
+ // Sphinx integrated model
+ if (ModelDescriptorRegistry.INSTANCE.isModelFile(file)) {
+ String fragment = modelURI.fragment();
+ if (fragment != null) {
+ // URI refers to a model object
+ EObject eObject = EcorePlatformUtil.getEObject(modelURI);
+ if (eObject == null) {
+ IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(),
+ NLS.bind(Messages.error_modelResourceContainsNoMatchingElement, modelURI.toPlatformString(true), fragment));
+ throw new CoreException(status);
+ }
+ modelObjects.add(eObject);
+ IModelDescriptor modelDescriptor = ModelDescriptorRegistry.INSTANCE.getModel(eObject.eResource());
+ modelDescriptors.add(modelDescriptor);
+ } else {
+ // URI refers to a model resource
+ // Exclude Xtend files from being considered as workflow models
+ if (!XtendUtil.isXtendResource(modelURI)) {
+ Resource modelResource = EcorePlatformUtil.getResource(modelURI);
+ if (modelResource == null) {
+ IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(),
+ NLS.bind(Messages.error_modelResourceCouldNotBeLoaded, modelURI.toPlatformString(true)));
+ throw new CoreException(status);
+ }
+ modelObjects.addAll(modelResource.getContents());
+ IModelDescriptor modelDescriptor = ModelDescriptorRegistry.INSTANCE.getModel(modelResource);
+ modelDescriptors.add(modelDescriptor);
+ }
+ }
+ } else {
+ // Regular EMF model
+ String fragment = modelURI.fragment();
+ if (fragment != null) {
+ // URI refers to a model object
+ EObject eObject = EcoreResourceUtil.loadEObject(resouceSet, modelURI);
+ if (eObject == null) {
+ IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(),
+ NLS.bind(Messages.error_modelResourceContainsNoMatchingElement, modelURI.toPlatformString(true), fragment));
+ throw new CoreException(status);
+ }
+ modelObjects.add(eObject);
+ emfModelResources.add(eObject.eResource());
+ } else {
+ // URI refers to a model resource
+ // Exclude Xtend files from being considered as workflow models
+ if (!XtendUtil.isXtendResource(modelURI)) {
+ Resource modelResource = EcoreResourceUtil.loadResource(resouceSet, modelURI, null);
+ if (modelResource == null) {
+ IStatus status = StatusUtil.createErrorStatus(Activator.getPlugin(),
+ NLS.bind(Messages.error_modelResourceCouldNotBeLoaded, modelURI.toPlatformString(true)));
+ throw new CoreException(status);
+ }
+ modelObjects.addAll(modelResource.getContents());
+ emfModelResources.add(modelResource);
+ }
+ }
+ }
+
+ progress.worked(1);
+ if (progress.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+
+ return !modelObjects.isEmpty() ? modelObjects : null;
+ }
+
+ protected void saveModel(IProgressMonitor monitor) {
+ final SubMonitor progress = SubMonitor.convert(monitor, modelDescriptors.size() + emfModelResources.size());
+ if (progress.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+
+ // Save Sphinx integrated models
+ for (IModelDescriptor modelDescriptor : modelDescriptors) {
+ if (SaveIndicatorUtil.isDirty(modelDescriptor)) {
+ EcorePlatformUtil.saveModel(modelDescriptor, false, progress.newChild(1));
+
+ if (progress.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ } else {
+ progress.worked(1);
+ }
+ }
+
+ // Save regular EMF models
+ for (Resource modelResource : emfModelResources) {
+ EcoreResourceUtil.saveModelResource(modelResource, null);
+ progress.worked(1);
+
+ if (progress.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/IWorkflowRunnerOperation.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/IWorkflowRunnerOperation.java
index ff751fe..4e3c4da 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/IWorkflowRunnerOperation.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/IWorkflowRunnerOperation.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2014 itemis and others.
+ * Copyright (c) 2014-2016 itemis 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
@@ -9,12 +9,14 @@
*
* Contributors:
* itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
package org.eclipse.sphinx.emf.mwe.dynamic.operations;
import java.util.List;
+import java.util.Map;
import org.eclipse.emf.common.util.URI;
import org.eclipse.sphinx.platform.operations.IWorkspaceOperation;
@@ -23,11 +25,13 @@
Object getWorkflow();
- List<URI> getModelURIs();
+ Object getModel();
- void setAutoSave(boolean autoSave);
+ List<URI> getModelURIs();
boolean isAutoSave();
- Object getModel();
+ void setAutoSave(boolean autoSave);
+
+ Map<String, Object> getArguments();
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/util/WorkflowRunnerHelper.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/util/WorkflowRunnerHelper.java
new file mode 100644
index 0000000..0d15f3d
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/util/WorkflowRunnerHelper.java
@@ -0,0 +1,157 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2016 itemis 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:
+ * itemis - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.emf.mwe.dynamic.util;
+
+import java.io.FileNotFoundException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.internal.core.SourceType;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.sphinx.emf.mwe.dynamic.internal.messages.Messages;
+import org.eclipse.sphinx.emf.util.EcorePlatformUtil;
+import org.eclipse.sphinx.emf.util.EcoreResourceUtil;
+import org.eclipse.sphinx.emf.util.URIExtensions;
+import org.eclipse.sphinx.jdt.util.JavaExtensions;
+
+@SuppressWarnings("restriction")
+public class WorkflowRunnerHelper {
+
+ public String toWorkflowString(IType workflowType) {
+ Assert.isNotNull(workflowType);
+
+ if (workflowType.isBinary()) {
+ return workflowType.getFullyQualifiedName();
+ } else {
+ return ((SourceType) workflowType).getPath().toString();
+ }
+ }
+
+ public Object toWorkflowObject(String workflowString) throws ClassNotFoundException, FileNotFoundException {
+ if (workflowString == null) {
+ return null;
+ }
+ workflowString = workflowString.trim();
+
+ Matcher matcher = JavaExtensions.CLASS_NAME_PATTERN.matcher(workflowString);
+ if (matcher.find()) {
+ // Workflow is a fully qualified Java class name
+ try {
+ return Class.forName(workflowString);
+ } catch (ClassNotFoundException ex) {
+ throw new ClassNotFoundException(NLS.bind(Messages.error_workflowClassNotFound, workflowString));
+ }
+ } else {
+ // Workflow is assumed to be a workspace-relative path
+ IPath workflowPath = new Path(workflowString);
+ // TODO Perform more sophisticated error handling like below
+ // TODO Move resulting logic to separate method and use it in toModelURIObject() as well
+ // IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ // IStatus status = workspace.validateName(workflow, IResource.PROJECT);
+ // if (status.isOK()) {
+ // IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(workflow);
+ // if (!project.exists()) {
+ // setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_20, new String[] { workflow }));
+ // return false;
+ // }
+ // if (!project.isOpen()) {
+ // setErrorMessage(NLS.bind(LauncherMessages.JavaMainTab_21, new String[] { workflow }));
+ // return false;
+ // }
+ // } else {
+ // setErrorMessage(NLS.bind(Messages.error_illegalWorkflow, new String[] { status.getMessage() }));
+ // return false;
+ // }
+ IFile workflowFile = ResourcesPlugin.getWorkspace().getRoot().getFile(workflowPath);
+ if (!workflowFile.exists()) {
+ IPath workflowLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(workflowPath);
+ throw new FileNotFoundException(NLS.bind(Messages.error_workflowFileDoesNotExist, workflowLocation.toOSString()));
+ }
+ return workflowFile;
+ }
+ }
+
+ public String toModelURIString(URI modelURI) {
+ Assert.isNotNull(modelURI);
+
+ return modelURI.toString();
+ }
+
+ public URI toModelURIObject(String modelURIString) throws FileNotFoundException {
+ if (modelURIString == null) {
+ return null;
+ }
+ modelURIString = modelURIString.trim();
+ if (modelURIString.isEmpty()) {
+ return null;
+ }
+
+ URI modelURI = URI.createURI(modelURIString);
+ Path modelFilePath = new Path(modelURI.trimFragment().toString());
+ URI absoluteModelFileURI = EcorePlatformUtil.createURI(modelFilePath.makeAbsolute());
+ if (!EcoreResourceUtil.exists(absoluteModelFileURI)) {
+ throw new FileNotFoundException(NLS.bind(Messages.error_modelResourceDoesNotExist, absoluteModelFileURI.toPlatformString(true)));
+ }
+ return absoluteModelFileURI.appendFragment(modelURI.fragment());
+ }
+
+ public Map<String, Object> toArgumentObjects(Map<String, String> argumentStrings) {
+ Map<String, Object> arguments = new HashMap<String, Object>();
+ if (argumentStrings != null) {
+ for (String key : argumentStrings.keySet()) {
+ String valueString = argumentStrings.get(key);
+ Assert.isNotNull(valueString);
+ valueString = valueString.trim();
+
+ // Detect and convert boolean argument values
+ Object value = null;
+ if (Boolean.TRUE.toString().equalsIgnoreCase(valueString)) {
+ value = Boolean.TRUE;
+ } else if (Boolean.FALSE.toString().equalsIgnoreCase(valueString)) {
+ value = Boolean.FALSE;
+ }
+
+ // Detect and convert URI argument values
+ if (value == null) {
+ URI valueURI = URI.createURI(valueString);
+ if (key != null && key.contains(URI.class.getSimpleName())) {
+ value = valueURI;
+ }
+ if (URIExtensions.isActual(valueURI)) {
+ value = valueURI;
+ }
+ }
+
+ // Take String argument values as is
+ if (value == null) {
+ value = valueString;
+ }
+
+ if (value != null) {
+ arguments.put(key, value);
+ }
+ }
+ }
+ return arguments;
+ }
+}
diff --git a/plugins/org.eclipse.sphinx.emf.workspace.ui/src/org/eclipse/sphinx/emf/workspace/ui/wizards/pages/NewModelProjectCreationPage.java b/plugins/org.eclipse.sphinx.emf.workspace.ui/src/org/eclipse/sphinx/emf/workspace/ui/wizards/pages/NewModelProjectCreationPage.java
index f0fa955..33cee18 100644
--- a/plugins/org.eclipse.sphinx.emf.workspace.ui/src/org/eclipse/sphinx/emf/workspace/ui/wizards/pages/NewModelProjectCreationPage.java
+++ b/plugins/org.eclipse.sphinx.emf.workspace.ui/src/org/eclipse/sphinx/emf/workspace/ui/wizards/pages/NewModelProjectCreationPage.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2013 itemis and others.
+ * Copyright (c) 2013-2016 itemis 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
@@ -15,6 +15,7 @@
* itemis - [405075] Improve type safety of NewModelProjectCreationPage and BasicMetaModelVersionGroup wrt base metamodel descriptor and metamodel version preference
* itemis - [406062] Removal of the required project nature parameter in NewModelFileCreationPage constructor and CreateNewModelProjectJob constructor
* itemis - [406194] Enable title and descriptions of model project and file creation wizards to be calculated automatically
+ * itemis - [503063] Provide launching support for Sphinx Workflows
*
* </copyright>
*/
@@ -56,7 +57,7 @@
/**
* Creates a new instance of the new model project creation wizard page for the specified base metamodel.
- *
+ *
* @param pageName
* the name of this page
* @param baseMetaModelDescriptor
@@ -74,7 +75,7 @@
/**
* Creates a new instance of the new model project creation wizard page for the specified base metamodel.
- *
+ *
* @param pageName
* the name of this page
* @param selection
@@ -102,8 +103,8 @@
this.metaModelVersionPreference = metaModelVersionPreference;
this.metaModelVersionPreferencePageId = metaModelVersionPreferencePageId;
- setTitle(NLS.bind(Messages.page_newModelProjectCreation_title, baseMetaModelDescriptor != null ? baseMetaModelDescriptor.getName()
- : Messages.default_metamodelName_cap));
+ setTitle(NLS.bind(Messages.page_newModelProjectCreation_title,
+ baseMetaModelDescriptor != null ? baseMetaModelDescriptor.getName() : Messages.default_metamodelName_cap));
setDescription(NLS.bind(Messages.page_newModelProjectCreation_description,
baseMetaModelDescriptor != null ? baseMetaModelDescriptor.getName() : Messages.default_metamodelName));
}
@@ -126,7 +127,7 @@
* assigned to the new project.
* </p>
* This method may be overridden by subclasses to provide enhanced or custom implementations.
- *
+ *
* @param parent
* the parent composite
* @see org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl(Composite)
@@ -141,7 +142,7 @@
/**
* Creates a {@link BasicMetaModelVersionGroup metamodel version group} enabling the metamodel version of the model
* {@link IProject project} under creation to be chosen.
- *
+ *
* @param parent
* the parent {@linkplain Composite composite}
*/
@@ -149,7 +150,7 @@
if (baseMetaModelDescriptor != null && metaModelVersionPreference != null) {
metaModelVersionGroup = new BasicMetaModelVersionGroup<T>("BasicMetaModelVersionGroup", baseMetaModelDescriptor, //$NON-NLS-1$
metaModelVersionPreference, metaModelVersionPreferencePageId);
- metaModelVersionGroup.createContent(parent, 3, false);
+ metaModelVersionGroup.createContent(parent, 3);
}
}
diff --git a/plugins/org.eclipse.sphinx.emf/src/org/eclipse/sphinx/emf/util/URIExtensions.xtend b/plugins/org.eclipse.sphinx.emf/src/org/eclipse/sphinx/emf/util/URIExtensions.xtend
index 9bf9dca..1276a23 100644
--- a/plugins/org.eclipse.sphinx.emf/src/org/eclipse/sphinx/emf/util/URIExtensions.xtend
+++ b/plugins/org.eclipse.sphinx.emf/src/org/eclipse/sphinx/emf/util/URIExtensions.xtend
@@ -1,15 +1,16 @@
/**
* <copyright>
- *
+ *
* Copyright (c) 2016 itemis 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:
* itemis - Initial API and implementation
- *
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
* </copyright>
*/
package org.eclipse.sphinx.emf.util
@@ -18,7 +19,7 @@
import org.eclipse.emf.common.util.URI
/**
- * Useful API extensions for {@link URI}.
+ * Useful API extensions for {@link URI}.
*/
class URIExtensions {
@@ -28,9 +29,29 @@
public static final String URI_QUERY_SEPARATOR = "?" // $NON-NLS-1$
public static final String URI_FRAGMENT_SEPARATOR = "#" // $NON-NLS-1$
- /**
+ /**
+ * Indicates whether the given URI is an actual URI. An actual URI is a URI that "looks like" a URI and can be clearly distinguished from a simple string.
+ * This is generally the case for all URIs that have at least one of the following components: a {@link URI#scheme() scheme}, a {@link URI#hasDevice() device},
+ * an {@link URI#hasAuthority() authority}, a {@link URI#hasPath() path} with more than 1 {@link URI#segments() segment},
+ * a {@link URI#hasTrailingPathSeparator() trailing separator}, a {@link URI#hasQuery() query}, or a {@link URI#hasFragment() fragment}.
+ *
+ * @param uri The URI to be examined.
+ * @return <code>true</code> if the given URI is an actual URI, <code>false</code> otherwise.
+ */
+ def static boolean isActual(URI uri) {
+ Assert::isNotNull(uri)
+ return !uri.scheme.nullOrEmpty ||
+ uri.hasDevice ||
+ uri.hasAuthority ||
+ (uri.hasPath && uri.segmentCount > 1) ||
+ uri.hasTrailingPathSeparator ||
+ uri.hasQuery ||
+ uri.hasFragment
+ }
+
+ /**
* Retrieves the {@link URI#fragment() fragment} of the given {@link URI} and converted into a URI of its own.
- *
+ *
* @param uri The URI whose fragment is to be returned as URI.
* @return The given URI's fragment as URI, or <code>null</code> if given URI has no fragment.
*/
@@ -56,14 +77,14 @@
}
/**
- * Returns a copy of the given {@link URI} where the {@link URI#fragment() fragment} has been substituted
- * with the string value of provided fragment URI. The returned URI will have no fragment
- * if the provided fragment URI is <code>null</code>.
- *
+ * Returns a copy of the given {@link URI} where the {@link URI#fragment() fragment} has been substituted
+ * with the string value of provided fragment URI. The returned URI will have no fragment
+ * if the provided fragment URI is <code>null</code>.
+ *
* @param uri The URI to be manipulated.
* @param fragment A URI specifying the fragment that the given URI's fragment is to be substituted with; may be <code>null</code>.
- * @return A URI formed by replacing the fragment of the given URI with the string value of provided fragment URI
- * in case that the latter is not <code>null</code>; a copy of the given URI without its fragment otherwise.
+ * @return A URI formed by replacing the fragment of the given URI with the string value of provided fragment URI
+ * in case that the latter is not <code>null</code>; a copy of the given URI without its fragment otherwise.
*/
def static URI substituteFragment(URI uri, URI fragment) {
Assert::isNotNull(uri)
@@ -75,10 +96,10 @@
return result
}
- /**
- * Returns a copy of the given {@link URI} that has been converted into a {@link URI#isPrefix() prefix}
+ /**
+ * Returns a copy of the given {@link URI} that has been converted into a {@link URI#isPrefix() prefix}
* and can be used in {@link URI#replacePrefix(URI, URI)} operations.
- *
+ *
* @param uri The URI to be returned as prefix URI.
* @return The given URI as prefix URI.
* @see URI#isPrefix()
@@ -97,15 +118,15 @@
}
/**
- * If given old last segment matches the {@link URI#lastSegment() last segment} of given {@link URI},
- * this returns a copy of the given URI where the last segment has been replaced by the provided new last segment.
- *
+ * If given old last segment matches the {@link URI#lastSegment() last segment} of given {@link URI},
+ * this returns a copy of the given URI where the last segment has been replaced by the provided new last segment.
+ *
* @param uri The URI to be manipulated.
* @param oldLastSegment The expected current last segment of the URI's path.
* @param newLastSegment The intended future last segment of the URI's path.
- * @return A URI formed by replacing the last segment of the given URI with the provided new last segment
- * in case that the given URI's existing last segment matches the provided old last segment,
- * or <code>null</code> otherwise.
+ * @return A URI formed by replacing the last segment of the given URI with the provided new last segment
+ * in case that the given URI's existing last segment matches the provided old last segment,
+ * or <code>null</code> otherwise.
*/
def static URI replaceLastSegment(URI uri, String oldLastSegment, String newLastSegment) {
Assert::isNotNull(uri)
@@ -118,16 +139,16 @@
}
/**
- * If given old base URI matches the given {@link URI}, this returns a copy of the given URI
- * where all components included in the old base URI have been replaced by the provided new base URI.
- * The old and new base URI may not only include a {@link URI#path() path} but also
- * a {@link URI#query() query} and/or a {@link URI#fragment() fragment}.
- *
+ * If given old base URI matches the given {@link URI}, this returns a copy of the given URI
+ * where all components included in the old base URI have been replaced by the provided new base URI.
+ * The old and new base URI may not only include a {@link URI#path() path} but also
+ * a {@link URI#query() query} and/or a {@link URI#fragment() fragment}.
+ *
* @param uri The URI to be manipulated.
* @param oldBaseURI The URI's expected current base URI.
* @param newBaseURI The URI's intended future base URI.
* @return A URI formed by replacing the provided old base URI in the given URI with the provided new base URI
- * in case that the old base URI matches the given URI, or <code>null</code> otherwise.
+ * in case that the old base URI matches the given URI, or <code>null</code> otherwise.
*/
def static URI replaceBaseURI(URI uri, URI oldBaseURI, URI newBaseURI) {
Assert::isNotNull(uri)
@@ -149,18 +170,18 @@
}
/**
- * If given {@link URI} has a {@link URI#isHierarchical() hierarchical} {@link URI#fragment() fragment}
- * and given old last fragment segment matches the {@link URI#lastSegment() last segment} of that fragment,
- * this returns a copy of the given URI where the last segment of its fragment
- * has been replaced by the provided new last fragment segment.
- *
+ * If given {@link URI} has a {@link URI#isHierarchical() hierarchical} {@link URI#fragment() fragment}
+ * and given old last fragment segment matches the {@link URI#lastSegment() last segment} of that fragment,
+ * this returns a copy of the given URI where the last segment of its fragment
+ * has been replaced by the provided new last fragment segment.
+ *
* @param uri The URI to be manipulated.
* @param oldLastSegment The expected current last segment of the URI's fragment.
* @param newLastSegment The intended future last segment of the URI's fragment.
- * @return A URI formed by replacing the last segment in the fragment of the given URI
- * with the provided new last fragment segment in case that the existing last segment
- * in the fragment of the given URI matches the provided old last fragment segment,
- * or <code>null</code> otherwise.
+ * @return A URI formed by replacing the last segment in the fragment of the given URI
+ * with the provided new last fragment segment in case that the existing last segment
+ * in the fragment of the given URI matches the provided old last fragment segment,
+ * or <code>null</code> otherwise.
*/
def static URI replaceLastFragmentSegment(URI uri, String oldLastFragmentSegment, String newLastFragmentSegment) {
Assert::isNotNull(uri)
diff --git a/plugins/org.eclipse.sphinx.jdt/src/org/eclipse/sphinx/jdt/util/JavaExtensions.xtend b/plugins/org.eclipse.sphinx.jdt/src/org/eclipse/sphinx/jdt/util/JavaExtensions.xtend
index e6ba015..26f7043 100644
--- a/plugins/org.eclipse.sphinx.jdt/src/org/eclipse/sphinx/jdt/util/JavaExtensions.xtend
+++ b/plugins/org.eclipse.sphinx.jdt/src/org/eclipse/sphinx/jdt/util/JavaExtensions.xtend
@@ -1,190 +1,191 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2014-2015 itemis 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:
- * itemis - Initial API and implementation
- *
- * </copyright>
- */
-package org.eclipse.sphinx.jdt.util
-
-import java.io.File
-import java.io.IOException
-import java.net.URL
-import org.eclipse.core.resources.ResourcesPlugin
-import org.eclipse.core.runtime.Assert
-import org.eclipse.core.runtime.FileLocator
-import org.eclipse.core.runtime.IPath
-import org.eclipse.core.runtime.IStatus
-import org.eclipse.core.runtime.Path
-import org.eclipse.core.runtime.Platform
-import org.eclipse.jdt.core.IClasspathEntry
-import org.eclipse.jdt.core.IJavaProject
-import org.eclipse.jdt.core.JavaCore
-import org.eclipse.jdt.launching.IVMInstall
-import org.eclipse.jdt.launching.IVMInstall2
-import org.eclipse.jdt.launching.JavaRuntime
-import org.eclipse.osgi.util.NLS
-import org.eclipse.sphinx.jdt.internal.Activator
-import org.eclipse.sphinx.jdt.internal.messages.Messages
-import org.eclipse.sphinx.platform.util.ExtendedPlatform
-import org.eclipse.sphinx.platform.util.PlatformLogUtil
-import org.eclipse.sphinx.platform.util.StatusUtil
-import org.osgi.framework.Bundle
-import java.util.regex.Pattern
-
-class JavaExtensions {
-
- // Ensure backward compatibility with Eclipse 4.3.x (Kepler) and earlier
- public static final String VERSION_1_8 = "1.8"; //$NON-NLS-1$
-
- public static final String DEFAULT_OUTPUT_FOLDER_NAME = "bin"
-
- // See http://stackoverflow.com/a/18667639 for details
- public static final Pattern CLASS_NAME_PATTERN = Pattern.compile("([a-z][a-z_0-9]*\\.)*[A-Z_]($[A-Z_]|[\\w_])*");
-
- private static final String PLUGIN_ID_VERSION_SEPARATOR = "_"; //$NON-NLS-1$
-
- static def File getFile(IClasspathEntry entry) {
- if (entry.path.toFile.exists) {
- entry.path.toFile
- } else {
- ResourcesPlugin.getWorkspace.root.location.append(entry.path).toFile
- }
- }
-
- static def IJavaProject getJavaProject(String projectName) {
- JavaCore.create(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName))
- }
-
- /**
- * Returns the absolute path in the local file system corresponding to given workspace-relative path.
- *
- * @param workspacePath the workspace-relative path to some resource in the workspace
- *
- * @return the absolute path in the local file system corresponding to given <code>workspacePath</code>, or null if no path can be determined
- */
- static def IPath getLocation(IPath workspacePath) {
- ResourcesPlugin.getWorkspace().getRoot().findMember(workspacePath)?.getLocation()
- }
-
- /**
- * Returns the plug-in installation location. It is composed of the Platform's installation location
- * followed by the name of the "plugins" folder inside it.
- *
- * @return The plug-in installation location.
- */
- static def IPath getPluginInstallLocation() {
- new Path(Platform.getInstallLocation().getURL().getPath()).append("plugins")
- }
-
- /**
- * Returns the common postfix of the classpath root locations of "dev mode" plug-ins. It is equal to the name
- * of the default output folder ("bin") in Java projects.
- *
- * @return The common classpath root location postfix of "dev" mode plug-ins.
- */
- static def String getDevModePluginClasspathRootLocationPostfix() {
- JavaExtensions.DEFAULT_OUTPUT_FOLDER_NAME
- }
-
- static def boolean isInstalledPluginClasspathRootLocationOf(String pluginId, IPath classpathLocation) {
- Assert.isNotNull(classpathLocation)
-
- pluginInstallLocation.isPrefixOf(classpathLocation) && classpathLocation.lastSegment.split(PLUGIN_ID_VERSION_SEPARATOR).get(0).equals(pluginId)
- }
-
- static def boolean isDevModePluginClasspathLocationOf(String pluginId, IPath classpathLocation) {
- Assert.isNotNull(classpathLocation)
-
- classpathLocation.toString().contains(new Path(pluginId).append(devModePluginClasspathRootLocationPostfix).toString())
- }
-
- static def Bundle getBundle(URL pluginClasspathRootLocationURL) {
- Assert.isNotNull(pluginClasspathRootLocationURL)
-
- var IPath pluginClasspathRootLocation = new Path(pluginClasspathRootLocationURL.path)
-
- // Installed plug-in classpath?
- if (pluginInstallLocation.isPrefixOf(pluginClasspathRootLocation)) {
- // Retrieve corresponding bundle
- return Activator.context.getBundle("reference:" + pluginClasspathRootLocationURL)
- }
-
- // "Dev mode" plug-in classpath?
- if (pluginClasspathRootLocation.lastSegment.equals(devModePluginClasspathRootLocationPostfix)) {
- // Remove "bin" postfix from classpath root location and retrieve corresponding bundle
- return Activator.context.getBundle("reference:" + pluginClasspathRootLocation.removeLastSegments(1).toFile.toURI.toURL)
- }
-
- null;
- }
-
- static def IPath getPluginClasspathRootLocation(String pluginId) {
- // Retrieve bundle behind given plug-in id
- val Bundle bundle = ExtendedPlatform.loadBundle(pluginId);
- if (bundle != null) {
- try {
- // Retrieve and return the bundle's classpath root location
- val URL classpathRootURL = bundle.getResource("/"); //$NON-NLS-1$
- val URL resolvedClasspathRootURL = FileLocator.resolve(classpathRootURL);
- return new Path(resolvedClasspathRootURL.getPath()).removeTrailingSeparator();
- } catch (IOException ex) {
- val IStatus status = StatusUtil.createErrorStatus(Activator.getDefault, ex);
- Activator.getDefault.log.log(status);
- }
- }
- return null;
- }
-
- static def void validateCompilerCompliance(String compliance) {
- val IVMInstall install = JavaRuntime.getDefaultVMInstall()
- if (install instanceof IVMInstall2) {
- val String compilerCompliance = getCompilerCompliance(install, compliance)
-
- // Compliance to set must be equal or less than compliance level from VMInstall.
- if (!compilerCompliance.equals(compliance)) {
- try {
- val float complianceToSet = Float.parseFloat(compliance)
- val float complianceFromVM = Float.parseFloat(compilerCompliance)
- Assert.isLegal(complianceToSet <= complianceFromVM,
- NLS.bind(Messages.error_JRECompliance_NotCompatible, compliance, compilerCompliance))
- } catch (NumberFormatException ex) {
- PlatformLogUtil.logAsWarning(Activator.getDefault(), ex)
- }
- }
- }
- }
-
- private static def String getCompilerCompliance(IVMInstall2 vmInstall, String defaultCompliance) {
- Assert.isNotNull(vmInstall)
-
- val String version = vmInstall.getJavaVersion();
- if (version == null) {
- return defaultCompliance;
- } else if (version.startsWith(VERSION_1_8)) {
- return VERSION_1_8;
- } else if (version.startsWith(JavaCore.VERSION_1_7)) {
- return JavaCore.VERSION_1_7;
- } else if (version.startsWith(JavaCore.VERSION_1_6)) {
- return JavaCore.VERSION_1_6;
- } else if (version.startsWith(JavaCore.VERSION_1_5)) {
- return JavaCore.VERSION_1_5;
- } else if (version.startsWith(JavaCore.VERSION_1_4)) {
- return JavaCore.VERSION_1_4;
- } else if (version.startsWith(JavaCore.VERSION_1_3)) {
- return JavaCore.VERSION_1_3;
- } else if (version.startsWith(JavaCore.VERSION_1_2)) {
- return JavaCore.VERSION_1_3;
- } else if (version.startsWith(JavaCore.VERSION_1_1)) {
- return JavaCore.VERSION_1_3;
- }
- return defaultCompliance;
- }
-}
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2014-2016 itemis 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:
+ * itemis - Initial API and implementation
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.jdt.util
+
+import java.io.File
+import java.io.IOException
+import java.net.URL
+import org.eclipse.core.resources.ResourcesPlugin
+import org.eclipse.core.runtime.Assert
+import org.eclipse.core.runtime.FileLocator
+import org.eclipse.core.runtime.IPath
+import org.eclipse.core.runtime.IStatus
+import org.eclipse.core.runtime.Path
+import org.eclipse.core.runtime.Platform
+import org.eclipse.jdt.core.IClasspathEntry
+import org.eclipse.jdt.core.IJavaProject
+import org.eclipse.jdt.core.JavaCore
+import org.eclipse.jdt.launching.IVMInstall
+import org.eclipse.jdt.launching.IVMInstall2
+import org.eclipse.jdt.launching.JavaRuntime
+import org.eclipse.osgi.util.NLS
+import org.eclipse.sphinx.jdt.internal.Activator
+import org.eclipse.sphinx.jdt.internal.messages.Messages
+import org.eclipse.sphinx.platform.util.ExtendedPlatform
+import org.eclipse.sphinx.platform.util.PlatformLogUtil
+import org.eclipse.sphinx.platform.util.StatusUtil
+import org.osgi.framework.Bundle
+import java.util.regex.Pattern
+
+class JavaExtensions {
+
+ // Ensure backward compatibility with Eclipse 4.3.x (Kepler) and earlier
+ public static final String VERSION_1_8 = "1.8"; //$NON-NLS-1$
+
+ public static final String DEFAULT_OUTPUT_FOLDER_NAME = "bin"
+
+ // See http://stackoverflow.com/a/18667639 for details
+ public static final Pattern CLASS_NAME_PATTERN = Pattern.compile("^([a-z][a-z_0-9]*\\.)*[A-Z_]($[A-Z_]|[\\w_])*$");
+
+ private static final String PLUGIN_ID_VERSION_SEPARATOR = "_"; //$NON-NLS-1$
+
+ static def File getFile(IClasspathEntry entry) {
+ if (entry.path.toFile.exists) {
+ entry.path.toFile
+ } else {
+ ResourcesPlugin.getWorkspace.root.location.append(entry.path).toFile
+ }
+ }
+
+ static def IJavaProject getJavaProject(String projectName) {
+ JavaCore.create(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName))
+ }
+
+ /**
+ * Returns the absolute path in the local file system corresponding to given workspace-relative path.
+ *
+ * @param workspacePath the workspace-relative path to some resource in the workspace
+ *
+ * @return the absolute path in the local file system corresponding to given <code>workspacePath</code>, or null if no path can be determined
+ */
+ static def IPath getLocation(IPath workspacePath) {
+ ResourcesPlugin.getWorkspace().getRoot().findMember(workspacePath)?.getLocation()
+ }
+
+ /**
+ * Returns the plug-in installation location. It is composed of the Platform's installation location
+ * followed by the name of the "plugins" folder inside it.
+ *
+ * @return The plug-in installation location.
+ */
+ static def IPath getPluginInstallLocation() {
+ new Path(Platform.getInstallLocation().getURL().getPath()).append("plugins")
+ }
+
+ /**
+ * Returns the common postfix of the classpath root locations of "dev mode" plug-ins. It is equal to the name
+ * of the default output folder ("bin") in Java projects.
+ *
+ * @return The common classpath root location postfix of "dev" mode plug-ins.
+ */
+ static def String getDevModePluginClasspathRootLocationPostfix() {
+ JavaExtensions.DEFAULT_OUTPUT_FOLDER_NAME
+ }
+
+ static def boolean isInstalledPluginClasspathRootLocationOf(String pluginId, IPath classpathLocation) {
+ Assert.isNotNull(classpathLocation)
+
+ pluginInstallLocation.isPrefixOf(classpathLocation) && classpathLocation.lastSegment.split(PLUGIN_ID_VERSION_SEPARATOR).get(0).equals(pluginId)
+ }
+
+ static def boolean isDevModePluginClasspathLocationOf(String pluginId, IPath classpathLocation) {
+ Assert.isNotNull(classpathLocation)
+
+ classpathLocation.toString().contains(new Path(pluginId).append(devModePluginClasspathRootLocationPostfix).toString())
+ }
+
+ static def Bundle getBundle(URL pluginClasspathRootLocationURL) {
+ Assert.isNotNull(pluginClasspathRootLocationURL)
+
+ var IPath pluginClasspathRootLocation = new Path(pluginClasspathRootLocationURL.path)
+
+ // Installed plug-in classpath?
+ if (pluginInstallLocation.isPrefixOf(pluginClasspathRootLocation)) {
+ // Retrieve corresponding bundle
+ return Activator.context.getBundle("reference:" + pluginClasspathRootLocationURL)
+ }
+
+ // "Dev mode" plug-in classpath?
+ if (pluginClasspathRootLocation.lastSegment.equals(devModePluginClasspathRootLocationPostfix)) {
+ // Remove "bin" postfix from classpath root location and retrieve corresponding bundle
+ return Activator.context.getBundle("reference:" + pluginClasspathRootLocation.removeLastSegments(1).toFile.toURI.toURL)
+ }
+
+ null;
+ }
+
+ static def IPath getPluginClasspathRootLocation(String pluginId) {
+ // Retrieve bundle behind given plug-in id
+ val Bundle bundle = ExtendedPlatform.loadBundle(pluginId);
+ if (bundle != null) {
+ try {
+ // Retrieve and return the bundle's classpath root location
+ val URL classpathRootURL = bundle.getResource("/"); //$NON-NLS-1$
+ val URL resolvedClasspathRootURL = FileLocator.resolve(classpathRootURL);
+ return new Path(resolvedClasspathRootURL.getPath()).removeTrailingSeparator();
+ } catch (IOException ex) {
+ val IStatus status = StatusUtil.createErrorStatus(Activator.getDefault, ex);
+ Activator.getDefault.log.log(status);
+ }
+ }
+ return null;
+ }
+
+ static def void validateCompilerCompliance(String compliance) {
+ val IVMInstall install = JavaRuntime.getDefaultVMInstall()
+ if (install instanceof IVMInstall2) {
+ val String compilerCompliance = getCompilerCompliance(install, compliance)
+
+ // Compliance to set must be equal or less than compliance level from VMInstall.
+ if (!compilerCompliance.equals(compliance)) {
+ try {
+ val float complianceToSet = Float.parseFloat(compliance)
+ val float complianceFromVM = Float.parseFloat(compilerCompliance)
+ Assert.isLegal(complianceToSet <= complianceFromVM,
+ NLS.bind(Messages.error_JRECompliance_NotCompatible, compliance, compilerCompliance))
+ } catch (NumberFormatException ex) {
+ PlatformLogUtil.logAsWarning(Activator.getDefault(), ex)
+ }
+ }
+ }
+ }
+
+ private static def String getCompilerCompliance(IVMInstall2 vmInstall, String defaultCompliance) {
+ Assert.isNotNull(vmInstall)
+
+ val String version = vmInstall.getJavaVersion();
+ if (version == null) {
+ return defaultCompliance;
+ } else if (version.startsWith(VERSION_1_8)) {
+ return VERSION_1_8;
+ } else if (version.startsWith(JavaCore.VERSION_1_7)) {
+ return JavaCore.VERSION_1_7;
+ } else if (version.startsWith(JavaCore.VERSION_1_6)) {
+ return JavaCore.VERSION_1_6;
+ } else if (version.startsWith(JavaCore.VERSION_1_5)) {
+ return JavaCore.VERSION_1_5;
+ } else if (version.startsWith(JavaCore.VERSION_1_4)) {
+ return JavaCore.VERSION_1_4;
+ } else if (version.startsWith(JavaCore.VERSION_1_3)) {
+ return JavaCore.VERSION_1_3;
+ } else if (version.startsWith(JavaCore.VERSION_1_2)) {
+ return JavaCore.VERSION_1_3;
+ } else if (version.startsWith(JavaCore.VERSION_1_1)) {
+ return JavaCore.VERSION_1_3;
+ }
+ return defaultCompliance;
+ }
+}
diff --git a/plugins/org.eclipse.sphinx.platform.launching/.classpath b/plugins/org.eclipse.sphinx.platform.launching/.classpath
new file mode 100644
index 0000000..b862a29
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/.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/plugins/org.eclipse.sphinx.platform.launching/.project b/plugins/org.eclipse.sphinx.platform.launching/.project
new file mode 100644
index 0000000..a9e3315
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.sphinx.platform.launching</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/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..845273e
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//design/default.ecore=UTF-8
+encoding//design/resources.ecore_diagram=UTF-8
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..daca7bb
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,371 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+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.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=150
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..ac920ca
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,119 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=true
+cleanup.correct_indentation=false
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=false
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=false
+cleanup.remove_unused_private_types=false
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_Unmanaged profile 'Sphinx'
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Sphinx
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * <copyright>\r\n * \r\n * Copyright (c) {contributing company name} and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\: \r\n * {contributing company name} - Initial API and implementation\r\n * \r\n * </copyright>\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/*\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=false
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=false
+sp_cleanup.remove_unused_private_types=false
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..acba0c2
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.wst.xml.core.prefs b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.wst.xml.core.prefs
new file mode 100644
index 0000000..bc9f2e3
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/.settings/org.eclipse.wst.xml.core.prefs
@@ -0,0 +1,17 @@
+attributeHasNoValue=2
+eclipse.preferences.version=1
+endTagWithAttributes=2
+honourAllSchemaLocations=true
+indicateNoGrammar=1
+indiciateNoDocumentElement=-1
+markupValidation=true
+missingClosingBracket=2
+missingClosingQuote=2
+missingEndTag=2
+missingQuotes=2
+missingStartTag=2
+missingTagName=2
+namespaceInPITarget=2
+whitespaceAtStart=2
+whitespaceBeforeTagName=2
+xinclude=true
diff --git a/plugins/org.eclipse.sphinx.platform.launching/META-INF/MANIFEST.MF b/plugins/org.eclipse.sphinx.platform.launching/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8937fd8
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.sphinx.platform.launching;singleton:=true
+Bundle-Version: 0.11.0.qualifier
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.debug.core,
+ org.eclipse.sphinx.platform
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Eclipse-BuddyPolicy: global
+Export-Package: org.eclipse.sphinx.platform.launching,
+ org.eclipse.sphinx.platform.launching.internal;x-internal:=true,
+ org.eclipse.sphinx.platform.launching.internal.messages;x-internal:=true
+Bundle-Activator: org.eclipse.sphinx.platform.launching.internal.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.sphinx.platform.launching/about.html b/plugins/org.eclipse.sphinx.platform.launching/about.html
new file mode 100644
index 0000000..f47dbdd
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/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, 2006</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>
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.platform.launching/build.properties b/plugins/org.eclipse.sphinx.platform.launching/build.properties
new file mode 100644
index 0000000..52651fa
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ resources/
+src.includes = about.html
diff --git a/plugins/org.eclipse.sphinx.platform.launching/plugin.properties b/plugins/org.eclipse.sphinx.platform.launching/plugin.properties
new file mode 100644
index 0000000..a78280e
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/plugin.properties
@@ -0,0 +1,27 @@
+# <copyright>
+#
+# Copyright (c) 2016 itemis 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:
+# itemis - Initial API and implementation
+#
+# </copyright>
+
+# ====================================================================
+# To code developer:
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName=Sphinx Platform Launching Plug-in (Incubation)
+providerName=Eclipse Modeling Project
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.platform.launching/plugin.xml b/plugins/org.eclipse.sphinx.platform.launching/plugin.xml
new file mode 100644
index 0000000..882e604
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/plugin.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+
+<!--
+<copyright>
+
+Copyright (c) 2016 itemis 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:
+ itemis - Initial API and implementation
+
+</copyright>
+-->
+
+<plugin>
+ <!-- Command line invocation of (Sphinx workflow and any other) launch configurations -->
+ <extension
+ id="Launcher"
+ point="org.eclipse.core.runtime.applications">
+ <application
+ cardinality="singleton-global"
+ thread="main"
+ visible="true">
+ <run class="org.eclipse.sphinx.platform.launching.BasicLauncherApplication" />
+ </application>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.sphinx.platform.launching/pom.xml b/plugins/org.eclipse.sphinx.platform.launching/pom.xml
new file mode 100644
index 0000000..5ac14fd
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/pom.xml
@@ -0,0 +1,15 @@
+<?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>
+ <parent>
+ <groupId>org.eclipse.sphinx.releng</groupId>
+ <artifactId>org.eclipse.sphinx.releng.parent</artifactId>
+ <version>0.11.0-SNAPSHOT</version>
+ <relativePath>../../releng/org.eclipse.sphinx.releng.builds/parent/pom.xml</relativePath>
+ </parent>
+ <groupId>org.eclipse.sphinx.plugins</groupId>
+ <artifactId>org.eclipse.sphinx.platform.launching</artifactId>
+ <version>0.11.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.sphinx.platform.launching/resources/launch/Launcher.launch b/plugins/org.eclipse.sphinx.platform.launching/resources/launch/Launcher.launch
new file mode 100644
index 0000000..0d71ea0
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/resources/launch/Launcher.launch
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.sphinx.platform.launching.Launcher"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Launcher"/>
+<booleanAttribute key="default" value="true"/>
+<stringAttribute key="deselected_workspace_plugins" value="dev.experimental.sphinx.emf.mwe.dynamic.launching.ui,org.eclipse.emf.examples.library,org.eclipse.emf.examples.library.edit,org.eclipse.emf.examples.library.editor,org.eclipse.sphinx.doc.isv,org.eclipse.sphinx.emf.check,org.eclipse.sphinx.emf.check.catalog,org.eclipse.sphinx.emf.check.catalog.edit,org.eclipse.sphinx.emf.check.catalog.editor,org.eclipse.sphinx.emf.check.ui,org.eclipse.sphinx.emf.compare,org.eclipse.sphinx.emf.compare.ui,org.eclipse.sphinx.emf.editors,org.eclipse.sphinx.emf.editors.forms,org.eclipse.sphinx.emf.editors.forms.nebula,org.eclipse.sphinx.emf.explorer,org.eclipse.sphinx.emf.incquery,org.eclipse.sphinx.emf.metamodelgen,org.eclipse.sphinx.emf.metamodelgen.ui,org.eclipse.sphinx.emf.mwe,org.eclipse.sphinx.emf.mwe.dynamic.headless,org.eclipse.sphinx.emf.mwe.dynamic.launching.ui,org.eclipse.sphinx.emf.mwe.dynamic.ui,org.eclipse.sphinx.emf.search.ui,org.eclipse.sphinx.emf.search.ui.incquery,org.eclipse.sphinx.emf.serialization,org.eclipse.sphinx.emf.serialization.generators,org.eclipse.sphinx.emf.ui,org.eclipse.sphinx.emf.validation,org.eclipse.sphinx.emf.validation.bridge,org.eclipse.sphinx.emf.validation.ui,org.eclipse.sphinx.emf.workspace.incquery,org.eclipse.sphinx.emf.workspace.ui,org.eclipse.sphinx.examples.actions,org.eclipse.sphinx.examples.codegen.xpand.ui,org.eclipse.sphinx.examples.common.ui,org.eclipse.sphinx.examples.emf.compare.reports.csv,org.eclipse.sphinx.examples.emf.compare.reports.html,org.eclipse.sphinx.examples.explorer,org.eclipse.sphinx.examples.hummingbird.ide,org.eclipse.sphinx.examples.hummingbird.ide.ui,org.eclipse.sphinx.examples.hummingbird.metamodelgen,org.eclipse.sphinx.examples.hummingbird.metamodelgen.ui,org.eclipse.sphinx.examples.hummingbird10,org.eclipse.sphinx.examples.hummingbird10.edit,org.eclipse.sphinx.examples.hummingbird10.ide.ui,org.eclipse.sphinx.examples.hummingbird10.incquery,org.eclipse.sphinx.examples.hummingbird20,org.eclipse.sphinx.examples.hummingbird20.check,org.eclipse.sphinx.examples.hummingbird20.codegen.xpand,org.eclipse.sphinx.examples.hummingbird20.diagram.gmf,org.eclipse.sphinx.examples.hummingbird20.edit,org.eclipse.sphinx.examples.hummingbird20.editors.nebula,org.eclipse.sphinx.examples.hummingbird20.emf.compare,org.eclipse.sphinx.examples.hummingbird20.ide,org.eclipse.sphinx.examples.hummingbird20.ide.ui,org.eclipse.sphinx.examples.hummingbird20.incquery,org.eclipse.sphinx.examples.hummingbird20.splitting,org.eclipse.sphinx.examples.hummingbird20.splitting.ui,org.eclipse.sphinx.examples.hummingbird20.transform.xtend,org.eclipse.sphinx.examples.hummingbird20.validation,org.eclipse.sphinx.examples.hummingbird20.workflows,org.eclipse.sphinx.examples.library.ide,org.eclipse.sphinx.examples.library.ide.ui,org.eclipse.sphinx.examples.library.workflows,org.eclipse.sphinx.examples.tests.perf,org.eclipse.sphinx.examples.transform.xtend.ui,org.eclipse.sphinx.examples.uml2.ide,org.eclipse.sphinx.examples.uml2.ide.ui,org.eclipse.sphinx.examples.validation.ui,org.eclipse.sphinx.examples.views.documentation,org.eclipse.sphinx.examples.workflows,org.eclipse.sphinx.examples.workflows.lib,org.eclipse.sphinx.gmf.runtime.ui,org.eclipse.sphinx.gmf.workspace,org.eclipse.sphinx.pde,org.eclipse.sphinx.platform.perfs,org.eclipse.sphinx.platform.ui,org.eclipse.sphinx.templates.project.plugin,org.eclipse.sphinx.templates.project.tests.fragment,org.eclipse.sphinx.templates.project.tests.plugin,org.eclipse.sphinx.tests.emf,org.eclipse.sphinx.tests.emf.check,org.eclipse.sphinx.tests.emf.editors.integration,org.eclipse.sphinx.tests.emf.incquery,org.eclipse.sphinx.tests.emf.integration,org.eclipse.sphinx.tests.emf.mwe.dynamic.integration,org.eclipse.sphinx.tests.emf.serialization,org.eclipse.sphinx.tests.emf.serialization.generators,org.eclipse.sphinx.tests.emf.ui.integration,org.eclipse.sphinx.tests.emf.workspace,org.eclipse.sphinx.tests.emf.workspace.integration,org.eclipse.sphinx.tests.emf.workspace.ui,org.eclipse.sphinx.tests.jdt,org.eclipse.sphinx.tests.jdt.integration,org.eclipse.sphinx.tests.platform,org.eclipse.sphinx.tests.platform.integration,org.eclipse.sphinx.tests.platform.perfs,org.eclipse.sphinx.tests.xtendxpand.integration,org.eclipse.sphinx.testutils,org.eclipse.sphinx.testutils.integration,org.eclipse.sphinx.testutils.integration.referenceworkspace,org.eclipse.sphinx.testutils.integration.referenceworkspace.xtendxpand,org.eclipse.sphinx.xtend.typesystem.emf,org.eclipse.sphinx.xtend.typesystem.emf.ui,org.eclipse.sphinx.xtendxpand,org.eclipse.sphinx.xtendxpand.ui"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-Launcher"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms128m -Xmx512m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.google.inject@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,com.sun.el@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,lpg.runtime.java@default:default,org.antlr.runtime@default:default,org.apache.ant@default:default,org.apache.batik.bridge@default:default,org.apache.batik.css*1.6.0.v201011041432@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.dom.svg@default:default,org.apache.batik.dom@default:default,org.apache.batik.ext.awt@default:default,org.apache.batik.parser@default:default,org.apache.batik.pdf@default:default,org.apache.batik.svggen@default:default,org.apache.batik.transcoder@default:default,org.apache.batik.util*1.6.0.v201011041432@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.6.0.v201011041432@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.batik.xml@default:default,org.apache.commons.cli@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.jxpath@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.httpcomponents.httpclient@default:default,org.apache.httpcomponents.httpcore@default:default,org.apache.jasper.glassfish@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.easymock@default:default,org.eclipse.ant.core@default:default,org.eclipse.ant.launching@default:default,org.eclipse.ant.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare.win32@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.cvs@default:default,org.eclipse.debug.core@default:default,org.eclipse.debug.ui@default:default,org.eclipse.draw2d.doc.isv@default:default,org.eclipse.draw2d@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.emf.xpath@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.dialogs@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient4.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient4@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.emf.ant@default:default,org.eclipse.emf.cheatsheets@default:default,org.eclipse.emf.codegen.ecore.ui@default:default,org.eclipse.emf.codegen.ecore@default:default,org.eclipse.emf.codegen.ui@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.compare.doc@default:default,org.eclipse.emf.compare.edit@default:default,org.eclipse.emf.compare.ide.ui@default:default,org.eclipse.emf.compare.ide@default:default,org.eclipse.emf.compare.rcp.ui@default:default,org.eclipse.emf.compare.rcp@default:default,org.eclipse.emf.compare@default:default,org.eclipse.emf.converter@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.doc@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.emf.ecore.xcore.lib@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.example.installer@default:default,org.eclipse.emf.exporter@default:default,org.eclipse.emf.generic.editor@default:default,org.eclipse.emf.importer.ecore@default:default,org.eclipse.emf.importer.java@default:default,org.eclipse.emf.importer.rose@default:default,org.eclipse.emf.importer@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.emf.mapping.ecore2xml.ui@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.emf.mapping.ecore@default:default,org.eclipse.emf.mapping.ui@default:default,org.eclipse.emf.mapping.xsd2ecore.editor@default:default,org.eclipse.emf.mapping.xsd2ecore@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.emf.mwe.activities@default:default,org.eclipse.emf.mwe.core@default:default,org.eclipse.emf.mwe.doc@default:default,org.eclipse.emf.mwe.ui.simpleEditor@default:default,org.eclipse.emf.mwe.ui@default:default,org.eclipse.emf.mwe.utils@default:default,org.eclipse.emf.mwe2.language.ui@default:default,org.eclipse.emf.mwe2.language@default:default,org.eclipse.emf.mwe2.launch.ui@default:default,org.eclipse.emf.mwe2.launch@default:default,org.eclipse.emf.mwe2.lib@default:default,org.eclipse.emf.mwe2.runtime@default:default,org.eclipse.emf.query.doc@default:default,org.eclipse.emf.query.examples@default:default,org.eclipse.emf.query.ocl@default:default,org.eclipse.emf.query@default:default,org.eclipse.emf.transaction.doc@default:default,org.eclipse.emf.transaction.examples@default:default,org.eclipse.emf.transaction.ui@default:default,org.eclipse.emf.transaction@default:default,org.eclipse.emf.validation.doc@default:default,org.eclipse.emf.validation.examples@default:default,org.eclipse.emf.validation.ocl@default:default,org.eclipse.emf.validation.ui.ide@default:default,org.eclipse.emf.validation.ui@default:default,org.eclipse.emf.validation@default:default,org.eclipse.emf.workspace.doc@default:default,org.eclipse.emf.workspace.ui@default:default,org.eclipse.emf.workspace@default:default,org.eclipse.emf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.transport.ecf@default:default,org.eclipse.equinox.p2.ui.importexport@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.gef.doc.isv@default:default,org.eclipse.gef.examples.ui.pde@default:default,org.eclipse.gef@default:default,org.eclipse.gmf.bridge.trace@default:default,org.eclipse.gmf.bridge.ui.dashboard@default:default,org.eclipse.gmf.bridge.ui@default:default,org.eclipse.gmf.bridge@default:default,org.eclipse.gmf.codegen.edit@default:default,org.eclipse.gmf.codegen.ui@default:default,org.eclipse.gmf.codegen@default:default,org.eclipse.gmf.common@default:default,org.eclipse.gmf.ecore.editor@default:default,org.eclipse.gmf.examples.runtime.diagram.geoshapes@default:default,org.eclipse.gmf.examples.runtime.diagram.logic.model.edit@default:default,org.eclipse.gmf.examples.runtime.diagram.logic.model.editor@default:default,org.eclipse.gmf.examples.runtime.diagram.logic.model@default:default,org.eclipse.gmf.examples.runtime.diagram.logic@default:default,org.eclipse.gmf.examples.runtime.ui.pde@default:default,org.eclipse.gmf.examples.runtime@default:default,org.eclipse.gmf.graphdef.codegen.ui@default:default,org.eclipse.gmf.graphdef.codegen@default:default,org.eclipse.gmf.graphdef.edit@default:default,org.eclipse.gmf.graphdef@default:default,org.eclipse.gmf.map.edit@default:default,org.eclipse.gmf.map@default:default,org.eclipse.gmf.runtime.common.core@default:default,org.eclipse.gmf.runtime.common.ui.action.ide@default:default,org.eclipse.gmf.runtime.common.ui.action@default:default,org.eclipse.gmf.runtime.common.ui.printing.win32@default:false,org.eclipse.gmf.runtime.common.ui.printing@default:default,org.eclipse.gmf.runtime.common.ui.services.action@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd.ide@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd@default:default,org.eclipse.gmf.runtime.common.ui.services.properties@default:default,org.eclipse.gmf.runtime.common.ui.services@default:default,org.eclipse.gmf.runtime.common.ui@default:default,org.eclipse.gmf.runtime.diagram.core@default:default,org.eclipse.gmf.runtime.diagram.ui.actions@default:default,org.eclipse.gmf.runtime.diagram.ui.dnd@default:default,org.eclipse.gmf.runtime.diagram.ui.geoshapes@default:default,org.eclipse.gmf.runtime.diagram.ui.printing.render@default:default,org.eclipse.gmf.runtime.diagram.ui.printing@default:default,org.eclipse.gmf.runtime.diagram.ui.properties@default:default,org.eclipse.gmf.runtime.diagram.ui.providers.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.providers@default:default,org.eclipse.gmf.runtime.diagram.ui.render@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor@default:default,org.eclipse.gmf.runtime.diagram.ui@default:default,org.eclipse.gmf.runtime.draw2d.ui.render.awt@default:default,org.eclipse.gmf.runtime.draw2d.ui.render@default:default,org.eclipse.gmf.runtime.draw2d.ui@default:default,org.eclipse.gmf.runtime.emf.clipboard.core@default:default,org.eclipse.gmf.runtime.emf.commands.core@default:default,org.eclipse.gmf.runtime.emf.core@default:default,org.eclipse.gmf.runtime.emf.type.core@default:default,org.eclipse.gmf.runtime.emf.type.ui@default:default,org.eclipse.gmf.runtime.emf.ui.properties@default:default,org.eclipse.gmf.runtime.emf.ui@default:default,org.eclipse.gmf.runtime.gef.ui@default:default,org.eclipse.gmf.runtime.notation.edit@default:default,org.eclipse.gmf.runtime.notation.providers@default:default,org.eclipse.gmf.runtime.notation.sdk@default:default,org.eclipse.gmf.runtime.notation@default:default,org.eclipse.gmf.runtime.sdk@default:default,org.eclipse.gmf.tooldef.edit@default:default,org.eclipse.gmf.tooldef@default:default,org.eclipse.gmf.tooling@default:default,org.eclipse.gmf.validate@default:default,org.eclipse.gmf.xpand.editor@default:default,org.eclipse.gmf.xpand.qvtlibrary@default:default,org.eclipse.gmf.xpand@default:default,org.eclipse.gmf@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.incquery.runtime.base.itc@default:default,org.eclipse.incquery.runtime.base@default:default,org.eclipse.incquery.runtime.evm@default:default,org.eclipse.incquery.runtime.matchers@default:default,org.eclipse.incquery.runtime.rete.recipes@default:default,org.eclipse.incquery.runtime.rete@default:default,org.eclipse.incquery.runtime@default:default,org.eclipse.jdt.annotation*1.1.100.v20160418-1457@default:default,org.eclipse.jdt.annotation*2.1.0.v20160418-1457@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.doc.isv@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.jem.util@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.jsch.core@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.m2m.qvt.oml.common@default:default,org.eclipse.m2m.qvt.oml.cst.parser@default:default,org.eclipse.m2m.qvt.oml.ecore.imperativeocl@default:default,org.eclipse.m2m.qvt.oml.emf.util@default:default,org.eclipse.m2m.qvt.oml.project@default:default,org.eclipse.m2m.qvt.oml.runtime@default:default,org.eclipse.m2m.qvt.oml@default:default,org.eclipse.mylyn.commons.core@default:default,org.eclipse.mylyn.commons.identity.core@default:default,org.eclipse.mylyn.commons.net@default:default,org.eclipse.mylyn.commons.notifications.core@default:default,org.eclipse.mylyn.commons.notifications.feed@default:default,org.eclipse.mylyn.commons.notifications.ui@default:default,org.eclipse.mylyn.commons.repositories.core@default:default,org.eclipse.mylyn.commons.repositories.ui@default:default,org.eclipse.mylyn.commons.screenshots@default:default,org.eclipse.mylyn.commons.ui@default:default,org.eclipse.mylyn.commons.workbench@default:default,org.eclipse.mylyn.context.core@default:default,org.eclipse.mylyn.context.ui@default:default,org.eclipse.mylyn.discovery.core@default:default,org.eclipse.mylyn.discovery.ui@default:default,org.eclipse.mylyn.monitor.core@default:default,org.eclipse.mylyn.monitor.ui@default:default,org.eclipse.mylyn.tasks.core@default:default,org.eclipse.mylyn.tasks.index.core@default:default,org.eclipse.mylyn.tasks.index.ui@default:default,org.eclipse.mylyn.tasks.search@default:default,org.eclipse.mylyn.tasks.ui@default:default,org.eclipse.mylyn.wikitext.asciidoc.core@default:default,org.eclipse.mylyn.wikitext.asciidoc.ui@default:default,org.eclipse.mylyn.wikitext.confluence.core@default:default,org.eclipse.mylyn.wikitext.confluence.ui@default:default,org.eclipse.mylyn.wikitext.context.ui@default:default,org.eclipse.mylyn.wikitext.core.ant@default:default,org.eclipse.mylyn.wikitext.core.osgi@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.help.ui@default:default,org.eclipse.mylyn.wikitext.html.core@default:default,org.eclipse.mylyn.wikitext.markdown.core@default:default,org.eclipse.mylyn.wikitext.markdown.ui@default:default,org.eclipse.mylyn.wikitext.mediawiki.core.ant@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.ui@default:default,org.eclipse.mylyn.wikitext.tasks.ui@default:default,org.eclipse.mylyn.wikitext.textile.core@default:default,org.eclipse.mylyn.wikitext.textile.ui@default:default,org.eclipse.mylyn.wikitext.tracwiki.core@default:default,org.eclipse.mylyn.wikitext.tracwiki.ui@default:default,org.eclipse.mylyn.wikitext.twiki.core@default:default,org.eclipse.mylyn.wikitext.twiki.ui@default:default,org.eclipse.mylyn.wikitext.ui@default:default,org.eclipse.nebula.cwt@default:default,org.eclipse.nebula.effects.stw.example@default:default,org.eclipse.nebula.effects.stw@default:default,org.eclipse.nebula.examples@default:default,org.eclipse.nebula.jface.cdatetime@default:default,org.eclipse.nebula.paperclips.core@default:default,org.eclipse.nebula.paperclips.widgets@default:default,org.eclipse.nebula.visualization.widgets@default:default,org.eclipse.nebula.visualization.xygraph@default:default,org.eclipse.nebula.widgets.cdatetime.example@default:default,org.eclipse.nebula.widgets.cdatetime@default:default,org.eclipse.nebula.widgets.compositetable@default:default,org.eclipse.nebula.widgets.gallery.example@default:default,org.eclipse.nebula.widgets.gallery@default:default,org.eclipse.nebula.widgets.ganttchart.example@default:default,org.eclipse.nebula.widgets.ganttchart@default:default,org.eclipse.nebula.widgets.geomap.example@default:default,org.eclipse.nebula.widgets.geomap@default:default,org.eclipse.nebula.widgets.grid.example@default:default,org.eclipse.nebula.widgets.grid@default:default,org.eclipse.nebula.widgets.oscilloscope.example@default:default,org.eclipse.nebula.widgets.oscilloscope@default:default,org.eclipse.nebula.widgets.paperclips.example@default:default,org.eclipse.nebula.widgets.pgroup.example@default:default,org.eclipse.nebula.widgets.pgroup@default:default,org.eclipse.nebula.widgets.pshelf.css@default:default,org.eclipse.nebula.widgets.pshelf.example@default:default,org.eclipse.nebula.widgets.pshelf@default:default,org.eclipse.nebula.widgets.richtext@default:default,org.eclipse.nebula.widgets.tablecombo.example@default:default,org.eclipse.nebula.widgets.tablecombo@default:default,org.eclipse.nebula.widgets.xviewer.core@default:default,org.eclipse.nebula.widgets.xviewer.example@default:default,org.eclipse.nebula.widgets.xviewer@default:default,org.eclipse.ocl.common@default:default,org.eclipse.ocl.ecore@default:default,org.eclipse.ocl@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.api.tools.annotations@default:default,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.pde.ds.annotations@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.pde.launching@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.pde.ui@default:default,org.eclipse.pde@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.platform@default:default,org.eclipse.rcp@default:default,org.eclipse.sdk@default:default,org.eclipse.search@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.quicklinks@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.monitoring@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.themes@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.uml2.ant@default:default,org.eclipse.uml2.codegen.ecore.ui@default:default,org.eclipse.uml2.codegen.ecore@default:default,org.eclipse.uml2.common.edit@default:default,org.eclipse.uml2.common@default:default,org.eclipse.uml2.doc@default:default,org.eclipse.uml2.examples.uml.ui@default:default,org.eclipse.uml2.examples@default:default,org.eclipse.uml2.types@default:default,org.eclipse.uml2.uml.ecore.exporter@default:default,org.eclipse.uml2.uml.ecore.importer@default:default,org.eclipse.uml2.uml.edit@default:default,org.eclipse.uml2.uml.editor@default:default,org.eclipse.uml2.uml.profile.standard@default:default,org.eclipse.uml2.uml.resources@default:default,org.eclipse.uml2.uml.validation@default:default,org.eclipse.uml2.uml@default:default,org.eclipse.uml2@default:default,org.eclipse.update.configurator@3:true,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.wst.common.infopop@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.wst.common.snippets@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.wst.dtd.core@default:default,org.eclipse.wst.dtd.ui.infopop@default:default,org.eclipse.wst.dtd.ui@default:default,org.eclipse.wst.dtdeditor.doc.user@default:default,org.eclipse.wst.internet.cache@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.wst.server.discovery@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.sse.doc.user@default:default,org.eclipse.wst.sse.ui.infopop@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.wst.standard.schemas@default:default,org.eclipse.wst.validation.infopop@default:default,org.eclipse.wst.validation.ui@default:default,org.eclipse.wst.validation@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.xml.ui.infopop@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.wst.xmleditor.doc.user@default:default,org.eclipse.wst.xsd.core@default:default,org.eclipse.wst.xsd.ui@default:default,org.eclipse.wst.xsdeditor.doc.user@default:default,org.eclipse.xpand.activities@default:default,org.eclipse.xpand.doc@default:default,org.eclipse.xpand.examples@default:default,org.eclipse.xpand.ui@default:default,org.eclipse.xpand@default:default,org.eclipse.xsd.cheatsheets@default:default,org.eclipse.xsd.doc@default:default,org.eclipse.xsd.ecore.converter@default:default,org.eclipse.xsd.ecore.exporter@default:default,org.eclipse.xsd.ecore.importer@default:default,org.eclipse.xsd.edit@default:default,org.eclipse.xsd.editor@default:default,org.eclipse.xsd.example.installer@default:default,org.eclipse.xsd.mapping.editor@default:default,org.eclipse.xsd.mapping@default:default,org.eclipse.xsd@default:default,org.eclipse.xtend.check.ui@default:default,org.eclipse.xtend.core@default:default,org.eclipse.xtend.doc@default:default,org.eclipse.xtend.examples@default:default,org.eclipse.xtend.ide.common@default:default,org.eclipse.xtend.ide@default:default,org.eclipse.xtend.lib.macro@default:default,org.eclipse.xtend.lib@default:default,org.eclipse.xtend.m2e@default:default,org.eclipse.xtend.profiler@default:default,org.eclipse.xtend.shared.ui@default:default,org.eclipse.xtend.standalone@default:default,org.eclipse.xtend.typesystem.emf.ui@default:default,org.eclipse.xtend.typesystem.emf@default:default,org.eclipse.xtend.typesystem.uml2.ui@default:default,org.eclipse.xtend.typesystem.uml2@default:default,org.eclipse.xtend.typesystem.xsd.ui@default:default,org.eclipse.xtend.typesystem.xsd@default:default,org.eclipse.xtend.ui@default:default,org.eclipse.xtend.util.stdlib@default:default,org.eclipse.xtend2.lib@default:default,org.eclipse.xtend@default:default,org.eclipse.xtext.activities@default:default,org.eclipse.xtext.builder.standalone@default:default,org.eclipse.xtext.builder@default:default,org.eclipse.xtext.common.types.edit@default:default,org.eclipse.xtext.common.types.shared.jdt38@default:false,org.eclipse.xtext.common.types.shared@default:default,org.eclipse.xtext.common.types.ui@default:default,org.eclipse.xtext.common.types@default:default,org.eclipse.xtext.doc@default:default,org.eclipse.xtext.ecore@default:default,org.eclipse.xtext.generator@default:default,org.eclipse.xtext.ide@default:default,org.eclipse.xtext.idea.generator@default:default,org.eclipse.xtext.java@default:default,org.eclipse.xtext.junit4@default:default,org.eclipse.xtext.logging@default:false,org.eclipse.xtext.m2e@default:default,org.eclipse.xtext.purexbase.ui@default:default,org.eclipse.xtext.purexbase@default:default,org.eclipse.xtext.smap@default:default,org.eclipse.xtext.ui.codetemplates.ui@default:default,org.eclipse.xtext.ui.codetemplates@default:default,org.eclipse.xtext.ui.ecore@default:default,org.eclipse.xtext.ui.shared@default:default,org.eclipse.xtext.ui@default:default,org.eclipse.xtext.util@default:default,org.eclipse.xtext.xbase.ide@default:default,org.eclipse.xtext.xbase.junit@default:default,org.eclipse.xtext.xbase.lib@default:default,org.eclipse.xtext.xbase.ui@default:default,org.eclipse.xtext.xbase@default:default,org.eclipse.xtext.xtext.generator@default:default,org.eclipse.xtext.xtext.ui.examples@default:default,org.eclipse.xtext.xtext.ui.graph@default:default,org.eclipse.xtext.xtext.ui@default:default,org.eclipse.xtext.xtext.wizard@default:default,org.eclipse.xtext@default:default,org.hamcrest.core@default:default,org.jdom@default:default,org.jsoup@default:default,org.junit@default:default,org.objectweb.asm.tree@default:default,org.objectweb.asm@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.tukaani.xz@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.sphinx.emf.mwe.dynamic.launching@default:default,org.eclipse.sphinx.emf.mwe.dynamic@default:default,org.eclipse.sphinx.emf.workspace@default:default,org.eclipse.sphinx.emf@default:default,org.eclipse.sphinx.jdt@default:default,org.eclipse.sphinx.platform.launching@default:default,org.eclipse.sphinx.platform@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.sphinx.platform.launching/resources/launch/runEclipseApplication.bat b/plugins/org.eclipse.sphinx.platform.launching/resources/launch/runEclipseApplication.bat
new file mode 100644
index 0000000..0b9ffea
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/resources/launch/runEclipseApplication.bat
@@ -0,0 +1,83 @@
+rem <copyright>
+rem
+rem Copyright (c) 2016 itemis and others.
+rem All rights reserved. This program and the accompanying materials
+rem are made available under the terms of the Eclipse Public License v1.0
+rem which accompanies this distribution, and is available at
+rem http://www.eclipse.org/legal/epl-v10.html
+rem
+rem Contributors:
+rem itemis - Initial API and implementation
+rem
+rem </copyright>
+rem
+rem ====================================================================
+rem Eclipse headless application runner
+rem ====================================================================
+rem
+rem Supports binary applications being part of an Eclipse product as well as
+rem applications under development that are located in a development workspace
+rem and have an associated launch configuration
+rem
+rem Environment variables:
+rem
+rem ECLIPSE_HOME:
+rem the installation location of Eclipse product used to run the headless
+rem application
+rem (required)
+rem
+rem APPLICATION_NAME:
+rem the identifier of the headless application to run
+rem (required)
+rem
+rem APPLICATION_ARGS:
+rem the arguments to be passed to the headless application
+rem (optional)
+rem
+rem PROGRAM_ARGS:
+rem command line arguments processed by various parts of the Eclipse runtime (e.g., -consoleLog)
+rem (optional)
+rem
+rem VM_ARGS:
+rem command line arguments to be passed to the JVM the Eclipse product runs in (e.g., -Xss4m)
+rem (optional)
+rem
+rem WORKSPACE_LOC:
+rem the location of the (runtime) workspace to be used by the headless
+rem application
+rem (optional, defaults to %ECLIPSE_HOME%\workspace)
+rem
+rem DEV_WORKSPACE_URL:
+rem the location of the development workspace that contains the plug-in
+rem project with the headless application under development
+rem (required for headless applications under development)
+rem
+rem DEV_LAUNCH_CONFIG_NAME:
+rem a launch configuration for the headless application under development
+rem in the development workspace
+rem (required for headless applications under development)
+rem
+@echo off
+if "%ECLIPSE_HOME%" == "" (
+ echo ECLIPSE_HOME must be set
+ goto end
+)
+
+if "%APPLICATION_NAME%" == "" (
+ echo APPLICATION_NAME must be set
+ goto end
+)
+
+if "%WORKSPACE_LOC%" == "" goto devModeArgs
+set DATA_ARG=-data %WORKSPACE_LOC%
+
+:devModeArgs
+if "%DEV_WORKSPACE_URL%" == "" goto run
+if "%DEV_LAUNCH_CONFIG_NAME%" == "" goto run
+set CONFIGURATION_ARG=-configuration "%DEV_WORKSPACE_URL%/.metadata/.plugins/org.eclipse.pde.core/%DEV_LAUNCH_CONFIG_NAME%/"
+set DEV_ARG=-dev "%DEV_WORKSPACE_URL%/.metadata/.plugins/org.eclipse.pde.core/%DEV_LAUNCH_CONFIG_NAME%/dev.properties"
+
+:run
+%ECLIPSE_HOME%\eclipsec.exe %VM_ARGS% -noSplash %DATA_ARG% %CONFIGURATION_ARG% %DEV_ARG% %PROGRAM_ARGS% -application %APPLICATION_NAME% %APPLICATION_ARGS%
+
+:end
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/BasicLauncherApplication.java b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/BasicLauncherApplication.java
new file mode 100644
index 0000000..84c7ab7
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/BasicLauncherApplication.java
@@ -0,0 +1,105 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2016 itemis 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:
+ * itemis - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.platform.launching;
+
+import java.io.FileNotFoundException;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.OptionBuilder;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.sphinx.platform.cli.AbstractCLIApplication;
+import org.eclipse.sphinx.platform.cli.ICommonCLIConstants;
+import org.eclipse.sphinx.platform.launching.internal.messages.Messages;
+
+/**
+ * Enables shared launch configurations that are persisted as *.launch files in a Eclipse workspace
+ * to be run from the command line (i.e., without having to start the Eclipse workbench).
+ *
+ * Usage examples:
+ * <ul>
+ * <li>eclipse<br/>
+ * -noSplash<br/>
+ * -data /my/workspace/location<br/>
+ * -application org.eclipse.sphinx.emf.mwe.dynamic.launch.Launcher<br/>
+ * -launch org.example/launch/MyLaunch.launch<br/></li>
+ * </ul>
+ */
+public class BasicLauncherApplication extends AbstractCLIApplication {
+
+ /*
+ * @see org.eclipse.sphinx.platform.cli.AbstractCLIApplication#getCommandLineSyntax()
+ */
+ @Override
+ protected String getCommandLineSyntax() {
+ return String.format(ICommonCLIConstants.COMMAND_LINE_SYNTAX_FORMAT_WITH_WORKSPACE, ILauncherCLIConstants.APPLICATION_NAME);
+ }
+
+ /*
+ * @see org.eclipse.sphinx.platform.cli.AbstractCLIApplication#defineOptions()
+ */
+ @Override
+ protected void defineOptions() {
+ super.defineOptions();
+
+ OptionBuilder.isRequired();
+ OptionBuilder.hasArg();
+ OptionBuilder.withArgName(ILauncherCLIConstants.OPTION_LAUNCH_ARG_NAME);
+ OptionBuilder.withDescription(ILauncherCLIConstants.OPTION_LAUNCH_DESCRIPTION);
+ addOption(OptionBuilder.create(ILauncherCLIConstants.OPTION_LAUNCH));
+ }
+
+ /*
+ * @see org.eclipse.sphinx.platform.cli.AbstractCLIApplication#interrogate()
+ */
+ @Override
+ protected Object interrogate() throws Throwable {
+ super.interrogate();
+
+ // Retrieve options
+ CommandLine commandLine = getCommandLine();
+ String launchOptionValue = commandLine.getOptionValue(ILauncherCLIConstants.OPTION_LAUNCH);
+
+ // Retrieve and invoke specified launch
+ IFile launchFile = getLaunchFile(launchOptionValue);
+ ILaunchConfiguration launchConfiguration = DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(launchFile);
+ launchConfiguration.launch(ILaunchManager.RUN_MODE, createProgressMonitor());
+
+ return ERROR_NO;
+ }
+
+ protected IFile getLaunchFile(String launchOptionValue) throws FileNotFoundException {
+ // Launch is assumed to be a workspace-relative path
+ Path launchPath = new Path(launchOptionValue);
+ IFile launchFile = ResourcesPlugin.getWorkspace().getRoot().getFile(launchPath);
+ if (!launchFile.exists()) {
+ IPath launchLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(launchPath);
+ throw new FileNotFoundException(NLS.bind(Messages.error_launchFileDoesNotExist, launchLocation.toOSString()));
+ }
+ return launchFile;
+ }
+
+ protected IProgressMonitor createProgressMonitor() {
+ return new NullProgressMonitor();
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/ILauncherCLIConstants.java b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/ILauncherCLIConstants.java
new file mode 100644
index 0000000..15fe403
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/ILauncherCLIConstants.java
@@ -0,0 +1,33 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2016 itemis 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:
+ * itemis - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.platform.launching;
+
+import org.eclipse.sphinx.platform.launching.internal.Activator;
+import org.eclipse.sphinx.platform.launching.internal.messages.Messages;
+
+public interface ILauncherCLIConstants {
+
+ /*
+ * Application name.
+ */
+ String APPLICATION_NAME = Activator.PLUGIN_ID + ".Launcher"; //$NON-NLS-1$
+
+ /*
+ * Launch option.
+ */
+ String OPTION_LAUNCH = "launch"; //$NON-NLS-1$
+ String OPTION_LAUNCH_ARG_NAME = Messages.cliOption_launch_argName;
+ String OPTION_LAUNCH_DESCRIPTION = Messages.cliOption_launch_description;
+}
diff --git a/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/Activator.java b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/Activator.java
new file mode 100644
index 0000000..47163ed
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/Activator.java
@@ -0,0 +1,58 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2016 itemis 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:
+ * itemis - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.platform.launching.internal;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.sphinx.platform.launching.internal.Activator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ /** The plug-in ID */
+ public static final String PLUGIN_ID = "org.eclipse.sphinx.platform.launching"; //$NON-NLS-1$
+
+ /** The shared instance */
+ private static Activator plugin;
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /*
+ * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ super.start(bundleContext);
+ plugin = this;
+ }
+
+ /*
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ plugin = null;
+ super.stop(bundleContext);
+ }
+}
diff --git a/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/messages/Messages.java b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/messages/Messages.java
new file mode 100644
index 0000000..4ab598d
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/messages/Messages.java
@@ -0,0 +1,35 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2016 itemis 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:
+ * itemis - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.platform.launching.internal.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.sphinx.platform.launching.internal.messages.messages"; //$NON-NLS-1$
+
+ public static String cliOption_launch_argName;
+ public static String cliOption_launch_description;
+
+ public static String error_launchFileDoesNotExist;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/messages/messages.properties b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/messages/messages.properties
new file mode 100644
index 0000000..226132a
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.launching/src/org/eclipse/sphinx/platform/launching/internal/messages/messages.properties
@@ -0,0 +1,22 @@
+# <copyright>
+#
+# Copyright (c) 2016 itemis 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:
+# itemis - Initial API and implementation
+#
+# </copyright>
+
+
+# --------------------------------------------------- #
+# Internal messages for org.eclipse.sphinx.platform #
+# --------------------------------------------------- #
+
+cliOption_launch_argName=path or name
+cliOption_launch_description=workspace-relative <path> of the launch configuration file (required)
+
+error_launchFileDoesNotExist=Launch file ''{0}'' does not exist
diff --git a/plugins/org.eclipse.sphinx.platform.ui/plugin.xml b/plugins/org.eclipse.sphinx.platform.ui/plugin.xml
index 8fff4d9..535b6d4 100644
--- a/plugins/org.eclipse.sphinx.platform.ui/plugin.xml
+++ b/plugins/org.eclipse.sphinx.platform.ui/plugin.xml
@@ -1,47 +1,65 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.sphinx.platform.ui.handlers.ExtendedNewPropertySheetHandler"
- commandId="org.eclipse.ui.views.properties.NewPropertySheetCommand">
- <activeWhen>
- <or>
- <with
- variable="activePartId">
- <equals
- value="org.eclipse.search.ui.views.SearchView">
- </equals>
- </with>
- <with
- variable="activePartId">
- <equals
- value="org.eclipse.sphinx.emf.check.ui.markersView">
- </equals>
- </with>
- <with
- variable="activePartId">
- <equals
- value="org.eclipse.sphinx.emf.ui.views.references">
- </equals>
- </with>
- </or>
- </activeWhen>
- </handler>
- </extension>
-
- <extension-point id="documentationViewFormatters" name="%documentationViewFormatters.name" schema="schema/documentationViewFormatters.exsd"/>
-
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Documentation"
- icon="icons/sample.gif"
- category="org.eclipse.ui"
- class="org.eclipse.sphinx.platform.ui.views.documentation.DocumentationView"
- id="org.eclipse.sphinx.platform.ui.views.documentation.DocumentationView">
- </view>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+
+<!--
+<copyright>
+
+Copyright (c) 2008-2016 See4sys, BMW Car IT, itemis 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:
+ See4sys - Initial API and implementation
+ BMW Car IT - [374883] Improve handling of out-of-sync workspace files during descriptor initialization
+ itemis - [503063] Provide launching support for Sphinx Workflows
+
+</copyright>
+-->
+
+<plugin>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.sphinx.platform.ui.handlers.ExtendedNewPropertySheetHandler"
+ commandId="org.eclipse.ui.views.properties.NewPropertySheetCommand">
+ <activeWhen>
+ <or>
+ <with
+ variable="activePartId">
+ <equals
+ value="org.eclipse.search.ui.views.SearchView">
+ </equals>
+ </with>
+ <with
+ variable="activePartId">
+ <equals
+ value="org.eclipse.sphinx.emf.check.ui.markersView">
+ </equals>
+ </with>
+ <with
+ variable="activePartId">
+ <equals
+ value="org.eclipse.sphinx.emf.ui.views.references">
+ </equals>
+ </with>
+ </or>
+ </activeWhen>
+ </handler>
+ </extension>
+
+ <extension-point id="documentationViewFormatters" name="%documentationViewFormatters.name" schema="schema/documentationViewFormatters.exsd"/>
+
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ name="Documentation"
+ icon="icons/sample.gif"
+ category="org.eclipse.ui"
+ class="org.eclipse.sphinx.platform.ui.views.documentation.DocumentationView"
+ id="org.eclipse.sphinx.platform.ui.views.documentation.DocumentationView">
+ </view>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/AbstractGroup.java b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/AbstractGroup.java
index e539d9f..d61c13d 100644
--- a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/AbstractGroup.java
+++ b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/AbstractGroup.java
@@ -1,24 +1,25 @@
/**
* <copyright>
- *
- * Copyright (c) 2011 See4sys and others.
+ *
+ * Copyright (c) 2011-2016 See4sys, itemis 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:
+ *
+ * Contributors:
* See4sys - Initial API and implementation
- *
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
* </copyright>
*/
package org.eclipse.sphinx.platform.ui.groups;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.sphinx.platform.ui.fields.IField;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
@@ -39,11 +40,11 @@
* <p>
* Listeners added to this list must be instances of {@link IGroupListener}.
*/
- private ListenerList groupListeners = new ListenerList();
+ private ListenerList<IGroupListener> groupListeners = new ListenerList<IGroupListener>();
/**
* This construct a group with <code>groupName</code> group name.
- *
+ *
* @param groupName
* the name of the group.
*/
@@ -53,7 +54,7 @@
/**
* This construct a group with <code>groupName</code> group name.
- *
+ *
* @param groupName
* the name of the group.
* @param dialogSettings
@@ -66,24 +67,29 @@
@Override
public void createContent(Composite parent, int numColumns) {
- createContent(parent, numColumns, false);
+ createContent(parent, numColumns, false, false);
}
@Override
- public void createContent(Composite parent, int numColumns, boolean suppressGroupFrame) {
- Composite parentComposite;
- if (suppressGroupFrame) {
- parentComposite = new Composite(parent, SWT.SHADOW_NONE);
+ public void createContent(Composite parent, int numColumns, boolean grabExcessVerticalSpace) {
+ createContent(parent, numColumns, grabExcessVerticalSpace, false);
+ }
+
+ @Override
+ public void createContent(Composite parent, int numColumns, boolean grabExcessVerticalSpace, boolean suppressGroupFrame) {
+ Composite group;
+ if (!suppressGroupFrame) {
+ group = new Group(parent, SWT.SHADOW_NONE);
+ ((Group) group).setText(groupName);
} else {
- Group group = new Group(parent, SWT.SHADOW_NONE);
- group.setText(groupName);
- parentComposite = group;
+ group = new Composite(parent, SWT.SHADOW_NONE);
}
+ GridDataFactory.fillDefaults().grab(true, grabExcessVerticalSpace).applyTo(group);
- parentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- doCreateContent(parentComposite, numColumns);
+ // Create group content
+ doCreateContent(group, numColumns);
- // Load the group settings
+ // Load group settings
loadGroupSettings();
}
@@ -120,9 +126,8 @@
}
/*
- * @see
- * org.eclipse.sphinx.platform.ui.groups.IGroup#addGroupListener(org.eclipse.sphinx.platform.ui.groups.IGroupListener
- * )
+ * @see org.eclipse.sphinx.platform.ui.groups.IGroup#addGroupListener(org.eclipse.sphinx.platform.ui.groups.
+ * IGroupListener )
*/
@Override
public final void addGroupListener(IGroupListener listener) {
@@ -130,9 +135,8 @@
}
/*
- * @see
- * org.eclipse.sphinx.platform.ui.groups.IGroup#removeGroupListener(org.eclipse.sphinx.platform.ui.groups.IGroupListener
- * )
+ * @see org.eclipse.sphinx.platform.ui.groups.IGroup#removeGroupListener(org.eclipse.sphinx.platform.ui.groups.
+ * IGroupListener )
*/
@Override
public void removeGroupListener(IGroupListener listener) {
@@ -153,7 +157,7 @@
* The dialog settings is used to record state between group invocations (i.e. template path and the selected define
* block inside this template)
* </p>
- *
+ *
* @param settings
* the dialog settings, or <code>null</code> if none
* @see #getDialogSettings
@@ -164,7 +168,7 @@
/**
* Returns the dialog settings for this group.
- *
+ *
* @return the dialog settings, or <code>null</code> if none
*/
protected IDialogSettings getDialogSettings() {
diff --git a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/FileSelectionGroup.java b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/FileSelectionGroup.java
index 512acef..78f7f23 100644
--- a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/FileSelectionGroup.java
+++ b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/FileSelectionGroup.java
@@ -1,15 +1,16 @@
/**
* <copyright>
- *
- * Copyright (c) 2011 See4sys and others.
+ *
+ * Copyright (c) 2011-2016 See4sys, itemis 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:
+ *
+ * Contributors:
* See4sys - Initial API and implementation
- *
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
* </copyright>
*/
package org.eclipse.sphinx.platform.ui.groups;
@@ -102,7 +103,7 @@
});
}
- fileListField = new ListButtonsField(createListAdapter(parent), new String[] { Messages.label_AddButton, Messages.label_RemoveButton },
+ fileListField = new ListButtonsField(createListAdapter(parent), new String[] { Messages.button_add_label, Messages.button_remove_label },
new LabelProvider()) {
@Override
public int getNumberOfControls() {
diff --git a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/IGroup.java b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/IGroup.java
index ee269cd..7b875d4 100644
--- a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/IGroup.java
+++ b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/IGroup.java
@@ -1,15 +1,16 @@
/**
* <copyright>
- *
- * Copyright (c) 2008-2010 See4sys and others.
+ *
+ * Copyright (c) 2008-2016 See4sys, itemis 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:
+ *
+ * Contributors:
* See4sys - Initial API and implementation
- *
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
* </copyright>
*/
package org.eclipse.sphinx.platform.ui.groups;
@@ -26,7 +27,12 @@
/**
* Creates the content i.e., all necessary fields of the group.
*/
- void createContent(Composite parent, int numColumns, boolean suppressGroupFrame);
+ void createContent(Composite parent, int numColumns, boolean grabExcessVerticalSpace);
+
+ /**
+ * Creates the content i.e., all necessary fields of the group.
+ */
+ void createContent(Composite parent, int numColumns, boolean grabExcessVerticalSpace, boolean suppressGroupFrame);
/**
* Returns true or false if the group is complete or not.
@@ -35,7 +41,7 @@
/**
* Adds the given group listener in the listeners list of this group.
- *
+ *
* @param listener
* The group listener to add.
*/
@@ -43,7 +49,7 @@
/**
* Removes the given group listener from the listeners list of this group.
- *
+ *
* @param listener
* The group listener to remove.
*/
diff --git a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/NameValueTableGroup.java b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/NameValueTableGroup.java
new file mode 100644
index 0000000..3d303ed
--- /dev/null
+++ b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/NameValueTableGroup.java
@@ -0,0 +1,443 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2016 itemis 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:
+ * itemis - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.platform.ui.groups;
+
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.sphinx.platform.ui.groups.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+
+public class NameValueTableGroup extends AbstractGroup {
+
+ protected static final String DEFAULT_NAME = Messages.cell_name_default;
+
+ /**
+ * Content provider for the name/value table
+ */
+ protected static class NameValueViewerContentProvider implements IStructuredContentProvider {
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof Map) {
+ @SuppressWarnings("unchecked")
+ Map<String, String> entries = (Map<String, String>) inputElement;
+ return entries.entrySet().toArray(new Object[entries.size()]);
+ }
+ return new Object[0];
+ }
+
+ @Override
+ public void dispose() {
+ // Do nothing
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (newInput == null) {
+ return;
+ }
+ if (viewer instanceof TableViewer) {
+ TableViewer tableViewer = (TableViewer) viewer;
+ if (tableViewer.getTable().isDisposed()) {
+ return;
+ }
+ tableViewer.setComparator(new ViewerComparator() {
+ @Override
+ @SuppressWarnings("unchecked")
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ if (e1 == null) {
+ return -1;
+ } else if (e2 == null) {
+ return 1;
+ } else {
+ Map.Entry<String, String> entry1 = (Map.Entry<String, String>) e1;
+ Map.Entry<String, String> entry2 = (Map.Entry<String, String>) e2;
+ if (entry1.getKey() == null) {
+ return -1;
+ } else if (entry2.getKey() == null) {
+ return 1;
+ } else {
+ return entry1.getKey().compareToIgnoreCase(entry2.getKey());
+ }
+ }
+ }
+ });
+ }
+ }
+ }
+
+ protected static class NameColumnLabelProvider extends ColumnLabelProvider {
+ @Override
+ public String getText(Object element) {
+ @SuppressWarnings("unchecked")
+ Map.Entry<String, String> entry = (Map.Entry<String, String>) element;
+ return entry.getKey();
+ }
+ }
+
+ protected static class ValueColumnLabelProvider extends ColumnLabelProvider {
+ @Override
+ public String getText(Object element) {
+ @SuppressWarnings("unchecked")
+ Map.Entry<String, String> entry = (Map.Entry<String, String>) element;
+ return entry.getValue();
+ }
+ }
+
+ protected abstract class AbstractTextEditingSupport extends EditingSupport {
+ protected TableViewer viewer;
+ protected CellEditor editor;
+
+ public AbstractTextEditingSupport(TableViewer viewer) {
+ super(viewer);
+ this.viewer = viewer;
+ editor = new TextCellEditor(viewer.getTable());
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ return editor;
+ }
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+
+ @Override
+ protected final void setValue(Object element, Object value) {
+ // Perform value change
+ doSetValue(element, value);
+
+ // Notify listeners to enclosing group
+ notifyGroupChanged(null);
+ }
+
+ protected abstract void doSetValue(Object element, Object value);
+ }
+
+ protected class NameEditingSupport extends AbstractTextEditingSupport {
+
+ public NameEditingSupport(TableViewer viewer) {
+ super(viewer);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected Object getValue(Object element) {
+ Map.Entry<String, String> entry = (Map.Entry<String, String>) element;
+ return entry.getKey();
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void doSetValue(Object element, Object value) {
+ Map.Entry<String, String> oldEntry = (Map.Entry<String, String>) element;
+ final String newName = String.valueOf(value);
+
+ Map<String, String> entries = (Map<String, String>) viewer.getInput();
+ entries.remove(oldEntry.getKey());
+ entries.put(newName, oldEntry.getValue());
+
+ viewer.refresh();
+
+ /*
+ * Usability tweak: Start editing of an entry's value when done with the editing of its name; this avoids
+ * unnecessary mouse clicks in between and facilitates the localization of the entry when it "jumps" at
+ * another table position due to automatic sorting of the entries based on their names
+ */
+ /*
+ * !! Important Note !! Make sure that editing of the entry's value is started after a little delay only so
+ * that the editing of the entry's name can be fully completed before. Otherwise, the editing of the entry's
+ * value would be started anyway but the resulting new value wouldn't be saved and the old value would
+ * remain in place and reappear in the table cell when done with the editing.
+ */
+ viewer.getControl().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (viewer != null && viewer.getControl() != null && !viewer.getControl().isDisposed()) {
+ Entry<String, String> newEntry = findEntry(newName);
+ nameValueViewer.editElement(newEntry, 1);
+ }
+ }
+ });
+ }
+ }
+
+ protected class ValueEditingSupport extends AbstractTextEditingSupport {
+
+ public ValueEditingSupport(TableViewer viewer) {
+ super(viewer);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected Object getValue(Object element) {
+ Map.Entry<String, String> entry = (Map.Entry<String, String>) element;
+ return entry.getValue();
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void doSetValue(Object element, Object value) {
+ String newName = String.valueOf(value);
+
+ Map.Entry<String, String> entry = (Map.Entry<String, String>) element;
+ entry.setValue(newName);
+
+ viewer.update(element, null);
+ }
+ }
+
+ protected TableViewer nameValueViewer;
+ protected Button addButton;
+ protected Button removeButton;
+
+ public NameValueTableGroup(String groupName) {
+ super(groupName);
+ }
+
+ public NameValueTableGroup(String groupName, IDialogSettings dialogSettings) {
+ super(groupName, dialogSettings);
+ }
+
+ @Override
+ protected void doCreateContent(Composite parent, int numColumns) {
+ // Create and parent layout with 2 column
+ // TODO Consider to remove numColumns parameters from createContents()/doCreateContents and make it a
+ // responsibility of the group implementations to determine how many columns they want to provide in their
+ // layout (as it is done right here already)
+ parent.setLayout(new GridLayout(2, false));
+
+ // Create name/value table area
+ createTableArea(parent);
+
+ // Create add/remove button area
+ createButtonArea(parent);
+
+ // Trigger update of add/remove button enablement
+ handleTableSelectionChanged(StructuredSelection.EMPTY);
+ }
+
+ protected void createTableArea(Composite parent) {
+ // Create table composite
+ Composite tableComposite = new Composite(parent, SWT.NONE);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(tableComposite);
+ tableComposite.setFont(parent.getFont());
+
+ // Create table and table viewer
+ nameValueViewer = new TableViewer(tableComposite, getTableStyle());
+ Table nameValueTable = nameValueViewer.getTable();
+ GridDataFactory.fillDefaults().applyTo(nameValueTable);
+ nameValueTable.setFont(parent.getFont());
+ nameValueTable.setHeaderVisible(true);
+ nameValueTable.setLinesVisible(true);
+ nameValueViewer.setContentProvider(new NameValueViewerContentProvider());
+ nameValueViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleTableSelectionChanged(event.getSelection());
+ }
+ });
+
+ // Create table columns
+ TableViewerColumn nameColumn = new TableViewerColumn(nameValueViewer, SWT.NONE);
+ nameColumn.getColumn().setText(Messages.column_name_label);
+ nameColumn.setLabelProvider(new NameColumnLabelProvider());
+ nameColumn.setEditingSupport(new NameEditingSupport(nameValueViewer));
+
+ TableViewerColumn valueColumn = new TableViewerColumn(nameValueViewer, SWT.NONE);
+ valueColumn.getColumn().setText(Messages.column_value_label);
+ valueColumn.setLabelProvider(new ValueColumnLabelProvider());
+ valueColumn.setEditingSupport(new ValueEditingSupport(nameValueViewer));
+
+ // Create table column layout
+ TableColumnLayout tableColumnLayout = new TableColumnLayout(true);
+ PixelConverter pixelConverter = new PixelConverter(parent.getFont());
+ tableColumnLayout.setColumnData(nameColumn.getColumn(), new ColumnWeightData(1, pixelConverter.convertWidthInCharsToPixels(20)));
+ tableColumnLayout.setColumnData(valueColumn.getColumn(), new ColumnWeightData(2, pixelConverter.convertWidthInCharsToPixels(20)));
+ tableComposite.setLayout(tableColumnLayout);
+ }
+
+ protected int getTableStyle() {
+ return SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION;
+ }
+
+ protected void createButtonArea(Composite parent) {
+ // Create button composite
+ Composite buttonComposite = new Composite(parent, SWT.NONE);
+ GridDataFactory.swtDefaults().align(GridData.END, GridData.BEGINNING).applyTo(buttonComposite);
+ buttonComposite.setFont(parent.getFont());
+ buttonComposite.setLayout(new GridLayout(1, false));
+
+ // Create buttons
+ addButton = new Button(buttonComposite, SWT.PUSH);
+ GridDataFactory.swtDefaults().align(GridData.FILL, GridData.BEGINNING).hint(computeButtonHint(addButton)).applyTo(addButton);
+ addButton.setFont(parent.getFont());
+ addButton.setText(Messages.button_add_label);
+ addButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ handleAddButtonSelected();
+ }
+ });
+
+ removeButton = new Button(buttonComposite, SWT.PUSH);
+ GridDataFactory.swtDefaults().align(GridData.FILL, GridData.BEGINNING).hint(computeButtonHint(removeButton)).applyTo(removeButton);
+ removeButton.setFont(parent.getFont());
+ removeButton.setText(Messages.button_remove_label);
+ removeButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ handleRemoveButtonSelected();
+ }
+ });
+ }
+
+ protected Point computeButtonHint(Button button) {
+ PixelConverter converter = new PixelConverter(button);
+ int dialogWidthHint = converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ Point preferredSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ return new Point(Math.max(dialogWidthHint, preferredSize.x), preferredSize.y);
+ }
+
+ /**
+ * Responds to a selection changed event in the name/value table
+ *
+ * @param selection
+ * the selection
+ */
+ protected void handleTableSelectionChanged(ISelection selection) {
+ /*
+ * Usability tweak: Make sure that Remove button gets only enabled when one or multiple name/value entries have
+ * been selected
+ */
+ int size = ((IStructuredSelection) selection).size();
+ removeButton.setEnabled(size > 0);
+
+ /*
+ * Usability tweak: Make sure that Add button remains disabled when a new name/value entry has been added but
+ * its name has not yet been changed away from its default
+ */
+ @SuppressWarnings("unchecked")
+ Map<String, String> entries = (Map<String, String>) nameValueViewer.getInput();
+ addButton.setEnabled(entries != null && !entries.containsKey(DEFAULT_NAME));
+ }
+
+ /**
+ * Adds a new name/value entry to the table.
+ */
+ @SuppressWarnings("unchecked")
+ protected void handleAddButtonSelected() {
+ Assert.isNotNull(nameValueViewer);
+
+ // Add new name/value entry using default values
+ Map<String, String> entries = (Map<String, String>) nameValueViewer.getInput();
+ entries.put(DEFAULT_NAME, Messages.cell_value_default);
+ nameValueViewer.refresh();
+
+ /*
+ * Usability tweak: Select newly added name/value entry
+ */
+ Entry<String, String> entry = findEntry(DEFAULT_NAME);
+ nameValueViewer.setSelection(new StructuredSelection(entry));
+ }
+
+ /**
+ * Removes the selected name/value entry from the table.
+ */
+ @SuppressWarnings("unchecked")
+ protected void handleRemoveButtonSelected() {
+ Assert.isNotNull(nameValueViewer);
+
+ int oldSelectionIdx = nameValueViewer.getTable().getSelectionIndex();
+
+ // Remove selected name/value entries
+ Map<String, String> entries = (Map<String, String>) nameValueViewer.getInput();
+ for (Object selected : ((IStructuredSelection) nameValueViewer.getSelection()).toList()) {
+ Map.Entry<String, String> entry = (Map.Entry<String, String>) selected;
+ entries.remove(entry.getKey());
+ }
+ nameValueViewer.refresh();
+
+ /*
+ * Usability tweak: Select name/value entry next to remove name/value entries
+ */
+ int newSelectionIdx = oldSelectionIdx < entries.size() ? oldSelectionIdx : entries.size() - 1;
+ if (newSelectionIdx != -1) {
+ TableItem newSelected = nameValueViewer.getTable().getItem(newSelectionIdx);
+ nameValueViewer.setSelection(new StructuredSelection(newSelected.getData()));
+ }
+ }
+
+ protected Map.Entry<String, String> findEntry(String name) {
+ @SuppressWarnings("unchecked")
+ Map<String, String> entries = (Map<String, String>) nameValueViewer.getInput();
+ for (Map.Entry<String, String> entry : entries.entrySet()) {
+ if (name.equals(entry.getKey())) {
+ return entry;
+ }
+ }
+ return null;
+ }
+
+ public void setInput(Map<String, String> entries) {
+ Assert.isNotNull(nameValueViewer);
+
+ // Set new name/value entries as viewer input
+ nameValueViewer.setInput(entries);
+
+ // Trigger update of add/remove button enablement
+ handleTableSelectionChanged(StructuredSelection.EMPTY);
+ }
+
+ @SuppressWarnings("unchecked")
+ public Map<String, String> getInput() {
+ Assert.isNotNull(nameValueViewer);
+
+ // Return current name/value entries by retrieving viewer input
+ return (Map<String, String>) nameValueViewer.getInput();
+ }
+}
diff --git a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/messages/Messages.java b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/messages/Messages.java
index adec554..6c80b4e 100644
--- a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/messages/Messages.java
+++ b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/messages/Messages.java
@@ -1,15 +1,16 @@
/**
* <copyright>
- *
- * Copyright (c) 2011 See4sys and others.
+ *
+ * Copyright (c) 2011-2016 See4sys 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:
+ *
+ * Contributors:
* See4sys - Initial API and implementation
- *
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
* </copyright>
*/
package org.eclipse.sphinx.platform.ui.groups.messages;
@@ -20,9 +21,14 @@
private static final String BUNDLE_NAME = "org.eclipse.sphinx.platform.ui.groups.messages.messages"; //$NON-NLS-1$
- public static String label_EnableButton;
- public static String label_AddButton;
- public static String label_RemoveButton;
+ public static String button_add_label;
+ public static String button_remove_label;
+
+ public static String column_name_label;
+ public static String column_value_label;
+
+ public static String cell_name_default;
+ public static String cell_value_default;
public static String msg_fileSelectionError;
public static String desc_fileSelection;
diff --git a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/messages/messages.properties b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/messages/messages.properties
index c46fedb..395262e 100644
--- a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/messages/messages.properties
+++ b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/groups/messages/messages.properties
@@ -1,13 +1,14 @@
# <copyright>
-#
-# Copyright (c) 2011 See4sys and others.
+#
+# Copyright (c) 2011-2016 See4sys, itemis 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:
+#
+# Contributors:
# See4sys - Initial API and implementation
+# itemis - [503063] Provide launching support for Sphinx Workflows
#
# </copyright>
@@ -15,9 +16,14 @@
# Internal messages for org.eclipse.sphinx.xpand.ui #
# --------------------------------------------------- #
-label_EnableButton=Enable {0}
-label_AddButton=Add
-label_RemoveButton=Remove
+button_add_label=Add
+button_remove_label=Remove
+
+column_name_label=Name
+column_value_label=Value
+
+cell_name_default=<new name>
+cell_value_default=<new value>
msg_fileSelectionError= A {0} file should be selected!
desc_fileSelection=Select {0} file(s) to use.
diff --git a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/internal/util/PixelConverter.java b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/internal/util/PixelConverter.java
index d62c307..8498f24 100644
--- a/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/internal/util/PixelConverter.java
+++ b/plugins/org.eclipse.sphinx.platform.ui/src/org/eclipse/sphinx/platform/ui/internal/util/PixelConverter.java
@@ -1,15 +1,16 @@
/**
* <copyright>
- *
- * Copyright (c) 2008-2010 See4sys and others.
+ *
+ * Copyright (c) 2008-2016 See4sys, itemis 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:
+ *
+ * Contributors:
* See4sys - Initial API and implementation
- *
+ * itemis - [503063] Provide launching support for Sphinx Workflows
+ *
* </copyright>
*/
package org.eclipse.sphinx.platform.ui.internal.util;
@@ -20,6 +21,7 @@
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.widgets.Control;
+// TODO Replace with org.eclipse.jface.layout.PixelConverter
public class PixelConverter {
private final FontMetrics fFontMetrics;
diff --git a/releng/org.eclipse.sphinx.releng.builds/pom.xml b/releng/org.eclipse.sphinx.releng.builds/pom.xml
index 5077059..52d4637 100644
--- a/releng/org.eclipse.sphinx.releng.builds/pom.xml
+++ b/releng/org.eclipse.sphinx.releng.builds/pom.xml
@@ -26,6 +26,8 @@
<module>../../plugins/org.eclipse.sphinx.emf.metamodelgen.ui</module>
<module>../../plugins/org.eclipse.sphinx.emf.metamodelgen</module>
<module>../../plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless</module>
+ <module>../../plugins/org.eclipse.sphinx.emf.mwe.dynamic.launching.ui</module>
+ <module>../../plugins/org.eclipse.sphinx.emf.mwe.dynamic.launching</module>
<module>../../plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui</module>
<module>../../plugins/org.eclipse.sphinx.emf.mwe.dynamic</module>
<module>../../plugins/org.eclipse.sphinx.emf.mwe</module>
@@ -45,6 +47,7 @@
<module>../../plugins/org.eclipse.sphinx.gmf.workspace</module>
<module>../../plugins/org.eclipse.sphinx.jdt</module>
<module>../../plugins/org.eclipse.sphinx.pde</module>
+ <module>../../plugins/org.eclipse.sphinx.platform.launching</module>
<module>../../plugins/org.eclipse.sphinx.platform.ui</module>
<module>../../plugins/org.eclipse.sphinx.platform</module>
<module>../../plugins/org.eclipse.sphinx.xtend.typesystem.emf.ui</module>
diff --git a/tools/org.eclipse.sphinx.psf/sphinx-all-git.psf b/tools/org.eclipse.sphinx.psf/sphinx-all-git.psf
index 02732de..f47a901 100644
--- a/tools/org.eclipse.sphinx.psf/sphinx-all-git.psf
+++ b/tools/org.eclipse.sphinx.psf/sphinx-all-git.psf
@@ -102,6 +102,8 @@
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.emf.mwe"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.emf.mwe.dynamic"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.emf.mwe.dynamic.headless"/>
+<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.emf.mwe.dynamic.launching"/>
+<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.emf.mwe.dynamic.launching.ui"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.emf.mwe.dynamic.ui"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.emf.search.ui"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.emf.search.ui.incquery"/>
@@ -119,6 +121,7 @@
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.jdt"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.pde"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.platform"/>
+<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.platform.launching"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.platform.ui"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.xtend.typesystem.emf"/>
<project reference="1.0,ssh://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git,master,plugins/org.eclipse.sphinx.xtend.typesystem.emf.ui"/>
@@ -260,6 +263,8 @@
<item elementID="=org.eclipse.sphinx.emf.mwe" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic.headless" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
+<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic.launching" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
+<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic.launching.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.search.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.search.ui.incquery" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
@@ -277,6 +282,7 @@
<item elementID="=org.eclipse.sphinx.jdt" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.pde" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.platform" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
+<item elementID="=org.eclipse.sphinx.platform.launching" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.platform.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.xtend.typesystem.emf" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.xtend.typesystem.emf.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
diff --git a/tools/org.eclipse.sphinx.psf/sphinx-workingsets.psf b/tools/org.eclipse.sphinx.psf/sphinx-workingsets.psf
index 39d315f..645cacc 100644
--- a/tools/org.eclipse.sphinx.psf/sphinx-workingsets.psf
+++ b/tools/org.eclipse.sphinx.psf/sphinx-workingsets.psf
@@ -108,6 +108,8 @@
<item elementID="=org.eclipse.sphinx.emf.mwe" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic.headless" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
+<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic.launching" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
+<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic.launching.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.mwe.dynamic.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.search.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.emf.search.ui.incquery" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
@@ -125,6 +127,7 @@
<item elementID="=org.eclipse.sphinx.jdt" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.pde" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.platform" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
+<item elementID="=org.eclipse.sphinx.platform.launching" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.platform.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.xtend.typesystem.emf" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.sphinx.xtend.typesystem.emf.ui" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
diff --git a/tools/org.eclipse.sphinx.templates.project.plugin/resources/Sphinx Plug-in & Feature Conventions.txt b/tools/org.eclipse.sphinx.templates.project.plugin/resources/Sphinx Plug-in & Feature Conventions.txt
deleted file mode 100644
index a0f8d7b..0000000
--- a/tools/org.eclipse.sphinx.templates.project.plugin/resources/Sphinx Plug-in & Feature Conventions.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Sphinx Plug-in & Feature Conventions
-====================================
-
-* appropriate copyright headers based on Sphinx copyright headers in Java source files, plugin.properties and plugin.xml
-* no invalid UI dependencies
-* no imported packages
-* Java package name prefix = plug-in name
-* plug-in name/provider and feature name/provider/description exported to plugin.properties/feature.properties
-* plug-in provider and feature provider = Eclipse Modeling Project
-* plugin.properties/feature.properties included in Binary Build (build.properties)
-* appropriate plug-in and feature versions
-* presence of required legal files in plug-ins (about.html) and included in Binary Build and Source Build (build.properties)
-* presence of "Bundle-Localization: plugin" header in MANIFEST.MF
-* presence of reference to license feature
-* Java 7 as minimum Java execution environment
-* update of project settings according to latest changes in org.eclipse.sphinx.templates.project.plugin
-* appropriate EMF/EMF UI activator classes in internal package
-* elimination of compiler warnings as far as possible (e.g., missing @override annotations, etc.)
-* feature project name = feature id plus "-feature" postfix
-* update Team project set (*.psf) files
-* update Sphinx feature map (/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx)
-* update Sphinx architecture on Sphinx wiki (https://wiki.eclipse.org/Sphinx/architecture)
diff --git a/tools/org.eclipse.sphinx.templates.project.tests.fragment/resources/Sphinx Plug-in & Feature Conventions.txt b/tools/org.eclipse.sphinx.templates.project.tests.fragment/resources/Sphinx Plug-in & Feature Conventions.txt
deleted file mode 100644
index a0f8d7b..0000000
--- a/tools/org.eclipse.sphinx.templates.project.tests.fragment/resources/Sphinx Plug-in & Feature Conventions.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Sphinx Plug-in & Feature Conventions
-====================================
-
-* appropriate copyright headers based on Sphinx copyright headers in Java source files, plugin.properties and plugin.xml
-* no invalid UI dependencies
-* no imported packages
-* Java package name prefix = plug-in name
-* plug-in name/provider and feature name/provider/description exported to plugin.properties/feature.properties
-* plug-in provider and feature provider = Eclipse Modeling Project
-* plugin.properties/feature.properties included in Binary Build (build.properties)
-* appropriate plug-in and feature versions
-* presence of required legal files in plug-ins (about.html) and included in Binary Build and Source Build (build.properties)
-* presence of "Bundle-Localization: plugin" header in MANIFEST.MF
-* presence of reference to license feature
-* Java 7 as minimum Java execution environment
-* update of project settings according to latest changes in org.eclipse.sphinx.templates.project.plugin
-* appropriate EMF/EMF UI activator classes in internal package
-* elimination of compiler warnings as far as possible (e.g., missing @override annotations, etc.)
-* feature project name = feature id plus "-feature" postfix
-* update Team project set (*.psf) files
-* update Sphinx feature map (/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx)
-* update Sphinx architecture on Sphinx wiki (https://wiki.eclipse.org/Sphinx/architecture)
diff --git a/tools/org.eclipse.sphinx.templates.project.tests.plugin/resources/Sphinx Plug-in & Feature Conventions.txt b/tools/org.eclipse.sphinx.templates.project.tests.plugin/resources/Sphinx Plug-in & Feature Conventions.txt
deleted file mode 100644
index a0f8d7b..0000000
--- a/tools/org.eclipse.sphinx.templates.project.tests.plugin/resources/Sphinx Plug-in & Feature Conventions.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Sphinx Plug-in & Feature Conventions
-====================================
-
-* appropriate copyright headers based on Sphinx copyright headers in Java source files, plugin.properties and plugin.xml
-* no invalid UI dependencies
-* no imported packages
-* Java package name prefix = plug-in name
-* plug-in name/provider and feature name/provider/description exported to plugin.properties/feature.properties
-* plug-in provider and feature provider = Eclipse Modeling Project
-* plugin.properties/feature.properties included in Binary Build (build.properties)
-* appropriate plug-in and feature versions
-* presence of required legal files in plug-ins (about.html) and included in Binary Build and Source Build (build.properties)
-* presence of "Bundle-Localization: plugin" header in MANIFEST.MF
-* presence of reference to license feature
-* Java 7 as minimum Java execution environment
-* update of project settings according to latest changes in org.eclipse.sphinx.templates.project.plugin
-* appropriate EMF/EMF UI activator classes in internal package
-* elimination of compiler warnings as far as possible (e.g., missing @override annotations, etc.)
-* feature project name = feature id plus "-feature" postfix
-* update Team project set (*.psf) files
-* update Sphinx feature map (/org.eclipse.sphinx.doc.design/excel/SphinxFeatureMap.xlsx)
-* update Sphinx architecture on Sphinx wiki (https://wiki.eclipse.org/Sphinx/architecture)