Merge branch 'master' of ssh://git.eclipse.org/gitroot/bpel/org.eclipse.bpel
diff --git a/build/publish.sh b/build/publish.sh
index 1c4b71a..5bec1b2 100644
--- a/build/publish.sh
+++ b/build/publish.sh
@@ -2,7 +2,7 @@
################# BEGIN CONFIGURATION #################
-DESTINATION=/home/data/httpd/download.eclipse.org/technology/bpel
+DESTINATION=/home/data/httpd/download.eclipse.org/bpel
JOB_NAME=bpel-0.5
JOBDIR=/shared/jobs/${JOB_NAME}
WORKSPACE=${JOBDIR}/workspace/
diff --git a/features/org.eclipse.bpel.feature/feature.xml b/features/org.eclipse.bpel.feature/feature.xml
index cb6fe4c..32b4e06 100644
--- a/features/org.eclipse.bpel.feature/feature.xml
+++ b/features/org.eclipse.bpel.feature/feature.xml
@@ -217,7 +217,7 @@
</license>
<url>
- <update label="Eclipse BPEL Designer" url="http://download.eclipse.org/technology/bpel/update-site/"/>
+ <update label="Eclipse BPEL Designer" url="http://download.eclipse.org/bpel/update-site/"/>
</url>
<requires>
@@ -272,6 +272,12 @@
<import plugin="org.eclipse.emf.compare.match"/>
<import plugin="org.eclipse.emf.compare.diff" version="0.8.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.emf.compare.ui"/>
+
+ <import plugin="org.jboss.ide.eclipse.as.wtp.core"/>
+ <import plugin="org.jboss.ide.eclipse.as.core"/>
+ <import plugin="org.jboss.ide.eclipse.archives.webtools"/>
+ <import plugin="org.jboss.tools.jmx.core"/>
+
<import feature="org.eclipse.jst.common.fproj.enablement.jdt"/>
<import feature="org.eclipse.wst.common.fproj"/>
<import feature="org.eclipse.wst.jsdt.feature"/>
@@ -292,5 +298,6 @@
<plugin id="org.eclipse.bpel.validator" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.eclipse.bpel.wsil.model" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="org.eclipse.bpel.xpath10" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
+ <plugin id="org.eclipse.bpel.jboss.riftsaw.runtime" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<!-- <plugin id="org.eclipse.bpel.compare.ui" download-size="0" install-size="0" version="0.0.0" unpack="false"/> -->
</feature>
diff --git a/features/org.eclipse.bpel.site/index.html b/features/org.eclipse.bpel.site/index.html
index 9b3a60e..bdb9f6c 100644
--- a/features/org.eclipse.bpel.site/index.html
+++ b/features/org.eclipse.bpel.site/index.html
@@ -75,7 +75,7 @@
for your platform and that's it. Then define a new Eclipse update site with the
following location:
<pre class="main">
- <b>http://download.eclipse.org/technology/bpel/update-site/</b>
+ <b>http://download.eclipse.org/bpel/update-site/</b>
</pre>
Please note that the update from this location will include all the necessary
diff --git a/features/org.eclipse.bpel.site/site.xml b/features/org.eclipse.bpel.site/site.xml
index 2650e5d..8163d7b 100644
--- a/features/org.eclipse.bpel.site/site.xml
+++ b/features/org.eclipse.bpel.site/site.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<site
- mirrorsURL="http://www.eclipse.org/downloads/download.php?file=/technology/bpel/update-site/&format=xml">
- <description url="http://download.eclipse.org/technology/bpel/update-site/">
+ mirrorsURL="http://www.eclipse.org/downloads/download.php?file=/bpel/update-site/&format=xml">
+ <description url="http://download.eclipse.org/bpel/update-site/">
BPEL Designer for Eclipse
</description>
<feature url="features/org.eclipse.bpel.feature_0.5.0.jar" id="org.eclipse.bpel.feature" version="0.5.0">
diff --git a/features/org.eclipse.bpel.source.feature/feature.xml b/features/org.eclipse.bpel.source.feature/feature.xml
index d980c24..b5708e2 100644
--- a/features/org.eclipse.bpel.source.feature/feature.xml
+++ b/features/org.eclipse.bpel.source.feature/feature.xml
@@ -213,7 +213,7 @@
</license>
<url>
- <update label="Eclipse BPEL Designer" url="http://download.eclipse.org/technology/bpel/update-site/" />
+ <update label="Eclipse BPEL Designer" url="http://download.eclipse.org/bpel/update-site/" />
</url>
<!-- plugins in the plugins/pom.xml should match those listed here -->
<plugin download-size="0" install-size="0" version="0.0.0" unpack="false" id="org.eclipse.bpel.apache.ode.deploy.model.source" />
diff --git a/parent/pom.xml b/parent/pom.xml
index 84be261..a8f388b 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -422,6 +422,17 @@
<enabled>true</enabled>
</releases>
</repository>
+ <repository>
+ <id>jbosstools-requirements-composite-mirror</id>
+ <url>http://download.jboss.org/jbosstools/updates/stable/helios/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
</repositories>
<pluginRepositories>
diff --git a/plugins/org.eclipse.bpel.apache.ode.deploy.ui/plugin.xml b/plugins/org.eclipse.bpel.apache.ode.deploy.ui/plugin.xml
index a2474f7..6e1766a 100644
--- a/plugins/org.eclipse.bpel.apache.ode.deploy.ui/plugin.xml
+++ b/plugins/org.eclipse.bpel.apache.ode.deploy.ui/plugin.xml
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.bpel.apache.ode.deploy.ui.editors.ODEDeployMultiPageEditor"
- contributorClass="org.eclipse.bpel.apache.ode.deploy.ui.editors.ODEDeployMultiPageEditorContributor"
- filenames="deploy.xml"
- icon="icons/obj16/ode.gif"
- id="org.eclipse.bpel.apache.ode.deploy.ui.editors.ODEDeployMultiPageEditor"
- name="ODE Deployment Descriptor Editor">
- <contentTypeBinding
- contentTypeId="org.eclipse.bpel.apache.ode.deploy.ui.content-type">
- </contentTypeBinding>
- </editor>
- </extension>
-
- <extension
- point="org.eclipse.ui.newWizards">
- <wizard
- name="Apache ODE Deployment Descriptor"
- icon="icons/obj16/ode.gif"
- category="org.eclipse.bpel.wizards"
- class="org.eclipse.bpel.apache.ode.deploy.ui.wizards.NewODEDeployWizard"
- id="org.eclipse.bpel.apache.ode.deploy.ui.wizards.NewODEDeployWizard">
- </wizard>
- </extension>
- <extension
- point="org.eclipse.core.contenttype.contentTypes">
- <content-type
- base-type="org.eclipse.core.runtime.xml"
- default-charset="UTF-8"
- file-names="deploy.xml"
- id="org.eclipse.bpel.apache.ode.deploy.ui.content-type"
- name="ODE BPEL Deployment Descriptor"
- priority="normal">
- </content-type>
- </extension>
- <extension
- point="org.eclipse.ui.decorators">
- <decorator
- adaptable="true"
- icon="icons/obj16/ode.gif"
- id="org.eclipse.bpel.apache.ode.deploy.ui.icondecorator"
- label="ODE DD Resource Decorator"
- lightweight="true"
- location="TOP_LEFT"
- state="true">
- <enablement>
- <and>
- <objectClass
- name="org.eclipse.core.resources.IFile">
- </objectClass>
- <objectState
- name="contentTypeId"
- value="org.eclipse.bpel.apache.ode.deploy.ui.content-type">
- </objectState>
- </and>
- </enablement>
- </decorator>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.bpel.apache.ode.deploy.ui.editors.ODEDeployMultiPageEditor"
+ contributorClass="org.eclipse.bpel.apache.ode.deploy.ui.editors.ODEDeployMultiPageEditorContributor"
+ filenames="deploy.xml"
+ icon="icons/obj16/ode.gif"
+ id="org.eclipse.bpel.apache.ode.deploy.ui.editors.ODEDeployMultiPageEditor"
+ name="ODE Deployment Descriptor Editor">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.bpel.apache.ode.deploy.ui.content-type">
+ </contentTypeBinding>
+ </editor>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ name="BPEL Deployment Descriptor"
+ icon="icons/obj16/ode.gif"
+ category="org.eclipse.bpel.wizards"
+ class="org.eclipse.bpel.apache.ode.deploy.ui.wizards.NewODEDeployWizard"
+ id="org.eclipse.bpel.apache.ode.deploy.ui.wizards.NewODEDeployWizard">
+ </wizard>
+ </extension>
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="org.eclipse.core.runtime.xml"
+ default-charset="UTF-8"
+ file-names="deploy.xml"
+ id="org.eclipse.bpel.apache.ode.deploy.ui.content-type"
+ name="ODE BPEL Deployment Descriptor"
+ priority="normal">
+ </content-type>
+ </extension>
+ <extension
+ point="org.eclipse.ui.decorators">
+ <decorator
+ adaptable="true"
+ icon="icons/obj16/ode.gif"
+ id="org.eclipse.bpel.apache.ode.deploy.ui.icondecorator"
+ label="ODE DD Resource Decorator"
+ lightweight="true"
+ location="TOP_LEFT"
+ state="true">
+ <enablement>
+ <and>
+ <objectClass
+ name="org.eclipse.core.resources.IFile">
+ </objectClass>
+ <objectState
+ name="contentTypeId"
+ value="org.eclipse.bpel.apache.ode.deploy.ui.content-type">
+ </objectState>
+ </and>
+ </enablement>
+ </decorator>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/wizards/ODEDeployWizardPage.java b/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/wizards/ODEDeployWizardPage.java
index 45011ad..0cd1f09 100644
--- a/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/wizards/ODEDeployWizardPage.java
+++ b/plugins/org.eclipse.bpel.apache.ode.deploy.ui/src/org/eclipse/bpel/apache/ode/deploy/ui/wizards/ODEDeployWizardPage.java
@@ -1,186 +1,186 @@
-package org.eclipse.bpel.apache.ode.deploy.ui.wizards;
-
-import org.eclipse.bpel.apache.ode.deploy.ui.util.DeployUtils;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-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.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ContainerSelectionDialog;
-
-/**
- * ODE deployment descriptor wizard page.
- *
- * @author Simon Moser (IBM)
- * @author Tammo van Lessen (IAAS)
- */
-public class ODEDeployWizardPage extends WizardPage {
- private Text containerText;
-
- private Text fileText;
-
- private ISelection selection;
-
- /**
- * Constructor for SampleNewWizardPage.
- *
- * @param pageName
- */
- public ODEDeployWizardPage(ISelection selection) {
- super("ODEDeployDescriptorWizardPage");
- setTitle("Apache ODE Deployment Descriptor");
- setDescription("This wizard creates a new Apache ODE deployment descriptor file (deploy.xml). Note that the file name cannot be changed.");
- this.selection = selection;
- }
-
- /**
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 3;
- layout.verticalSpacing = 9;
- Label label = new Label(container, SWT.NULL);
- label.setText("BPEL &Project:");
-
- containerText = new Text(container, SWT.BORDER | SWT.SINGLE);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- containerText.setLayoutData(gd);
- containerText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- dialogChanged();
- }
- });
-
- Button button = new Button(container, SWT.PUSH);
- button.setText("Browse...");
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleBrowse();
- }
- });
- label = new Label(container, SWT.NULL);
- label.setText("&File name:");
-
- fileText = new Text(container, SWT.BORDER | SWT.SINGLE);
- fileText.setText("deploy.xml");
- fileText.setEditable(false);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- fileText.setLayoutData(gd);
- initialize();
- dialogChanged();
- setControl(container);
- }
-
- /**
- * Tests if the current workbench selection is a suitable container to use.
- */
-
- private void initialize() {
- if (selection != null && selection.isEmpty() == false
- && selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.size() > 1)
- return;
- Object obj = ssel.getFirstElement();
-
- if (obj instanceof IResource) {
- IProject project;
- project = ((IResource) obj).getProject();
- IContainer bpelContent = project.getFolder(DeployUtils.getWebContentRootPath(project));
- if (bpelContent != null) {
- containerText.setText(bpelContent.getFullPath().toString());
- } else {
- containerText.setText(project.getFullPath().toString());
- }
- }
- }
- }
-
- /**
- * Uses the standard container selection dialog to choose the new value for
- * the container field.
- */
-
- private void handleBrowse() {
- ContainerSelectionDialog dialog = new ContainerSelectionDialog(
- getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
- "Select a BPEL Project that hosts the deployment descriptor");
- if (dialog.open() == ContainerSelectionDialog.OK) {
- Object[] result = dialog.getResult();
- if (result.length == 1) {
- containerText.setText(((Path) result[0]).toString());
- }
- }
- }
-
- /**
- * Ensures that both text fields are set.
- */
-
- private void dialogChanged() {
- IResource container = ResourcesPlugin.getWorkspace().getRoot()
- .findMember(new Path(getContainerName()));
- String fileName = getFileName();
-
- if (getContainerName().length() == 0) {
- updateStatus("BPEL Project must be specified");
- return;
- }
- if (container == null
- || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
- updateStatus("BPEL Project must exist");
- return;
- }
- if (!container.isAccessible()) {
- updateStatus("BPEL Project must be writable");
- return;
- }
- if (fileName.length() == 0) {
- updateStatus("File name must be specified");
- return;
- }
- if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
- updateStatus("File name must be valid");
- return;
- }
- int dotLoc = fileName.lastIndexOf('.');
- if (dotLoc != -1) {
- String ext = fileName.substring(dotLoc + 1);
- if (ext.equalsIgnoreCase("xml") == false) {
- updateStatus("File extension must be \"xml\"");
- return;
- }
- }
- updateStatus(null);
- }
-
- private void updateStatus(String message) {
- setErrorMessage(message);
- setPageComplete(message == null);
- }
-
- public String getContainerName() {
- return containerText.getText();
- }
-
- public String getFileName() {
- return fileText.getText();
- }
+package org.eclipse.bpel.apache.ode.deploy.ui.wizards;
+
+import org.eclipse.bpel.apache.ode.deploy.ui.util.DeployUtils;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ContainerSelectionDialog;
+
+/**
+ * ODE deployment descriptor wizard page.
+ *
+ * @author Simon Moser (IBM)
+ * @author Tammo van Lessen (IAAS)
+ */
+public class ODEDeployWizardPage extends WizardPage {
+ private Text containerText;
+
+ private Text fileText;
+
+ private ISelection selection;
+
+ /**
+ * Constructor for SampleNewWizardPage.
+ *
+ * @param pageName
+ */
+ public ODEDeployWizardPage(ISelection selection) {
+ super("ODEDeployDescriptorWizardPage");
+ setTitle("BPEL Deployment Descriptor");
+ setDescription("This wizard creates a new BPEL deployment descriptor file (deploy.xml). Note that the file name cannot be changed.");
+ this.selection = selection;
+ }
+
+ /**
+ * @see IDialogPage#createControl(Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+ layout.numColumns = 3;
+ layout.verticalSpacing = 9;
+ Label label = new Label(container, SWT.NULL);
+ label.setText("BPEL &Project:");
+
+ containerText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ containerText.setLayoutData(gd);
+ containerText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+
+ Button button = new Button(container, SWT.PUSH);
+ button.setText("Browse...");
+ button.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ handleBrowse();
+ }
+ });
+ label = new Label(container, SWT.NULL);
+ label.setText("&File name:");
+
+ fileText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ fileText.setText("deploy.xml");
+ fileText.setEditable(false);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ fileText.setLayoutData(gd);
+ initialize();
+ dialogChanged();
+ setControl(container);
+ }
+
+ /**
+ * Tests if the current workbench selection is a suitable container to use.
+ */
+
+ private void initialize() {
+ if (selection != null && selection.isEmpty() == false
+ && selection instanceof IStructuredSelection) {
+ IStructuredSelection ssel = (IStructuredSelection) selection;
+ if (ssel.size() > 1)
+ return;
+ Object obj = ssel.getFirstElement();
+
+ if (obj instanceof IResource) {
+ IProject project;
+ project = ((IResource) obj).getProject();
+ IContainer bpelContent = project.getFolder(DeployUtils.getWebContentRootPath(project));
+ if (bpelContent != null) {
+ containerText.setText(bpelContent.getFullPath().toString());
+ } else {
+ containerText.setText(project.getFullPath().toString());
+ }
+ }
+ }
+ }
+
+ /**
+ * Uses the standard container selection dialog to choose the new value for
+ * the container field.
+ */
+
+ private void handleBrowse() {
+ ContainerSelectionDialog dialog = new ContainerSelectionDialog(
+ getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
+ "Select a BPEL Project that hosts the deployment descriptor");
+ if (dialog.open() == ContainerSelectionDialog.OK) {
+ Object[] result = dialog.getResult();
+ if (result.length == 1) {
+ containerText.setText(((Path) result[0]).toString());
+ }
+ }
+ }
+
+ /**
+ * Ensures that both text fields are set.
+ */
+
+ private void dialogChanged() {
+ IResource container = ResourcesPlugin.getWorkspace().getRoot()
+ .findMember(new Path(getContainerName()));
+ String fileName = getFileName();
+
+ if (getContainerName().length() == 0) {
+ updateStatus("BPEL Project must be specified");
+ return;
+ }
+ if (container == null
+ || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
+ updateStatus("BPEL Project must exist");
+ return;
+ }
+ if (!container.isAccessible()) {
+ updateStatus("BPEL Project must be writable");
+ return;
+ }
+ if (fileName.length() == 0) {
+ updateStatus("File name must be specified");
+ return;
+ }
+ if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
+ updateStatus("File name must be valid");
+ return;
+ }
+ int dotLoc = fileName.lastIndexOf('.');
+ if (dotLoc != -1) {
+ String ext = fileName.substring(dotLoc + 1);
+ if (ext.equalsIgnoreCase("xml") == false) {
+ updateStatus("File extension must be \"xml\"");
+ return;
+ }
+ }
+ updateStatus(null);
+ }
+
+ private void updateStatus(String message) {
+ setErrorMessage(message);
+ setPageComplete(message == null);
+ }
+
+ public String getContainerName() {
+ return containerText.getText();
+ }
+
+ public String getFileName() {
+ return fileText.getText();
+ }
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
new file mode 100644
index 0000000..a02812f
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry exported="true" 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.bpel.jboss.riftsaw.runtime/.project b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/.project
new file mode 100644
index 0000000..22dd5de
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.jboss.riftsaw.runtime</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..fe6932c
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.bpel.jboss.riftsaw.runtime;singleton:=true
+Bundle-Version: 0.5.0.qualifier
+Bundle-Activator: org.eclipse.bpel.jboss.riftsaw.runtime.RuntimesPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.wst.server.core,
+ org.eclipse.wst.web.ui,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.common.frameworks.ui,
+ org.eclipse.jst.server.generic.core,
+ org.eclipse.jem.util,
+ org.eclipse.debug.ui,
+ org.eclipse.bpel.model,
+ org.eclipse.emf.ecore,
+ org.eclipse.wst.wsdl,
+ javax.wsdl,
+ org.eclipse.jst.common.frameworks,
+ org.jboss.ide.eclipse.as.wtp.core,
+ org.eclipse.wst.web,
+ org.jboss.ide.eclipse.as.core;resolution:=optional,
+ org.jboss.ide.eclipse.archives.webtools;resolution:=optional,
+ org.jboss.tools.jmx.core;resolution:=optional,
+ org.eclipse.wst.server.ui;resolution:=optional,
+ org.eclipse.ui.navigator
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.bpel.jboss.riftsaw.runtime,
+ org.eclipse.bpel.jboss.riftsaw.runtime.facets,
+ org.eclipse.bpel.jboss.riftsaw.runtime.module,
+ org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.bpel.runtimes
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
new file mode 100644
index 0000000..2784719
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.*,\
+ icons/
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/ctool16/new_bpelprj.gif b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/ctool16/new_bpelprj.gif
new file mode 100644
index 0000000..6d137cd
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/ctool16/new_bpelprj.gif
Binary files differ
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/bpelfacet.gif b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/bpelfacet.gif
new file mode 100644
index 0000000..6cd3c8a
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/bpelfacet.gif
Binary files differ
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/prj_bpel.gif b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/prj_bpel.gif
new file mode 100644
index 0000000..a4ea580
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/prj_bpel.gif
Binary files differ
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/wizban/newprj_bpel_wiz_banner.gif b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/wizban/newprj_bpel_wiz_banner.gif
new file mode 100644
index 0000000..33bc201
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/icons/wizban/newprj_bpel_wiz_banner.gif
Binary files differ
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
new file mode 100644
index 0000000..575a948
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
@@ -0,0 +1,33 @@
+###############################################################################
+# Copyright (c) 2010-2011 Red Hat, Inc. 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:
+# University College London - initial API and implementation
+# JBoss by Red Hat - subsequent contributions and maintenance
+###############################################################################
+pluginName = JBoss Riftsaw Runtime for Eclipse BPEL Designer
+providerName = Eclipse.org
+
+NEW_JBT_BPEL_PROJECT=JBoss BPEL Project (SOA-P v5.1 and earlier)
+NEW_JBT_BPEL_PROJECT_DESCRIPTION=Enables modeling and deployment of BPEL processes to JBoss SOA-Platform version 5.1 and earlier.
+
+JBT_BPEL_CORE_FACET_LABEL=JBoss BPEL 2.0 Facet (SOA-P v5.1 and earlier)
+JBT_BPEL_CORE_FACET_DESCRIPTION=Enables modeling and deployment of BPEL processes to JBoss SOA-Platform version 5.1 and earlier.
+
+JBT_BPEL_CORE_FACET_CATEGORY_LABEL=JBoss BPEL 2.0 Facet Category
+JBT_BPEL_CORE_FACET_CATEGORY_DESCRIPTION=JBoss BPEL 2.0 (SOA-P v5.1 and earlier)
+
+JBT_BPEL_FACET_TEMPLATE_LABEL=JBoss BPEL 2.0 Project (SOA-P v5.1 and earlier)
+
+JBT_MODULE_TYPE_NAME=JBoss BPEL 2.0 Process (SOA-P v5.1 and earlier)
+JBT_MODULE_TYPE_DESCRIPTION=Module representing a JBoss BPEL process for SOA-Platform version 5.1 and earlier.
+
+BPEL_CORE_FACET_LABEL=BPEL 2.0 Facet
+BPEL_CORE_FACET_DESCRIPTION=Enables modeling and deployment of BPEL processes.
+BPEL_FACET_CATEGORY_LABEL=BPEL 2.0
+BPEL_FACET_TEMPLATE_LABEL=BPEL 2.0 Project
+
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
new file mode 100644
index 0000000..8865471
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--=========================================================================-->
+<!-- BPEL Designer Runtime Extension Point -->
+<!-- -->
+<!-- Copyright (c) 2006 University College London. -->
+<!-- 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 -->
+<!-- -->
+<!--=========================================================================-->
+
+<plugin>
+
+<!--=========================================================================-->
+<!-- New BPEL Project Wizard -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ name="%NEW_JBT_BPEL_PROJECT"
+ icon="icons/ctool16/new_bpelprj.gif"
+ category="org.eclipse.bpel.wizards"
+ project="true"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards.NewBPELProjectWizard"
+ finalPerspective="org.eclipse.bpel.ui.perspective"
+ preferredPerspectives="org.eclipse.bpel.ui.perspective"
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.wizards.newBPELProject">
+ <description>%NEW_JBT_BPEL_PROJECT_DESCRIPTION</description>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
+ <wizard-pages action="jbt.bpel.facet.core.install">
+ <page class="org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards.BPELFacetInstallPage"/>
+ </wizard-pages>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL ModuleType -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.server.core.moduleTypes">
+ <moduleType
+ id="jbt.bpel.module"
+ name="%JBT_MODULE_TYPE_NAME"
+ description="%JBT_MODULE_TYPE_DESCRIPTION">
+ </moduleType>
+ </extension>
+
+<!-- The following is needed to make icons for deployable modules occur in -->
+<!-- the Add and Remove Projects wizard -->
+
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.jbt.bpel.module"
+ typeIds="jbt.bpel.module,bpel.module"
+ icon="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Facet -->
+<!--=========================================================================-->
+
+ <!--
+ This facet is has been deprecated, but retained for backward compatibility
+ with JBoss 5.1.0 and SOA-P 5.1 and earlier
+ -->
+ <extension point="org.eclipse.wst.common.project.facet.core.facets">
+
+ <project-facet id="jbt.bpel.facet.core">
+ <label>%JBT_BPEL_CORE_FACET_LABEL</label>
+ <description>%JBT_BPEL_CORE_FACET_DESCRIPTION</description>
+ </project-facet>
+
+ <project-facet-version facet="jbt.bpel.facet.core" version="2.0">
+ <group-member
+ id="modules">
+ </group-member>
+ <constraint>
+ <and>
+ <conflicts group="modules"/>
+ </and>
+ </constraint>
+ </project-facet-version>
+
+ <category id="jbt.bpel.category">
+ <label>%JBT_BPEL_CORE_FACET_CATEGORY_LABEL</label>
+ <description>%JBT_BPEL_CORE_FACET_CATEGORY_DESCRIPTION</description>
+ </category>
+
+ <action facet="jbt.bpel.facet.core" version="2.0" type="INSTALL" id="jbt.bpel.facet.core.install">
+ <delegate class="org.eclipse.bpel.jboss.riftsaw.runtime.facets.BPELCoreFacetInstallDelegate"/>
+ <config-factory class="org.eclipse.bpel.jboss.riftsaw.runtime.facets.BPELFacetInstallDataModelProvider"/>
+ </action>
+
+ <action facet="jbt.bpel.facet.core" version="2.0" type="UNINSTALL" id="jbt.bpel.facet.core.uninstall">
+ <delegate class="org.eclipse.bpel.jboss.riftsaw.runtime.facets.BPELCoreFacetUninstallDelegate"/>
+ </action>
+
+ <template id="jbt.template.bpel.core">
+ <label>%JBT_BPEL_FACET_TEMPLATE_LABEL</label>
+ <fixed facet="jbt.bpel.facet.core"/>
+ </template>
+
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Facet Image -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image facet="jbt.bpel.facet.core" path="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Virtual Component -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.common.modulecore.componentimpl">
+ <componentimpl
+ typeID="jbt.bpel.facet.core"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.facets.BPELVirtualComponent">
+ </componentimpl>
+ </extension>
+
+
+<!--=========================================================================-->
+<!-- BPEL Module Factory -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.server.core.moduleFactories">
+ <moduleFactory
+ projects="true"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.module.BPELModuleFactoryDelegate"
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.module.moduleFactory">
+ <moduleType
+ versions="1.1, 2.0"
+ types="jbt.bpel.module">
+ </moduleType>
+ </moduleFactory>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Module ArtifactAdapters -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.server.core.moduleArtifactAdapters">
+ <moduleArtifactAdapter
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.module.artifactAdapter1"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ <moduleArtifactAdapter
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.module.artifactAdapter2"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IFile"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Runtime Adapters -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IProject">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ <factory
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IFile">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ </extension>
+
+<!--=========================================================================-->
+<!-- Runtime Publishers -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.jboss.ide.eclipse.as.core.publishers">
+ <publisher
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.module.JBossBPELPublisher"
+ priority="10"
+ zipDelegate="false">
+ </publisher>
+ </extension>
+
+<!--=========================================================================-->
+<!-- TO MAKE PROCESSES ACTUALLY LAUNCHABLE VIA RUN ON SERVER -->
+<!-- -->
+<!-- Implement org.eclipse.wst.server.core.clients in order to specify the -->
+<!-- the client app to be used for launching. -->
+<!-- -->
+<!-- Implement org.eclipse.wst.server.core.launchableAdapters. Might have to -->
+<!-- do this in server-specific way or maybe can resuse some generic server -->
+<!-- framework stuff or maybe can come up with some interface that would -->
+<!-- allow us to implement in runtimes plug-in. -->
+<!-- -->
+<!-- N.B. Launching here means launching a Web service. Hence, can do this -->
+<!-- via the corresponding WTP feature with no code at all from our end. -->
+<!-- -->
+<!-- -->
+<!-- -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.content"
+ activeByDefault="true"
+ contentProvider="org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.BPELModuleContentProvider"
+ icon="icons/obj16/bpelfacet.gif"
+ labelProvider="org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.BPELModuleLabelProvider"
+ name="BPEL Modules"
+ priority="highest">
+ <triggerPoints>
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </triggerPoints>
+ <possibleChildren>
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </possibleChildren>
+ <actionProvider
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.BPELModuleActionProvider"
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.BPELModuleActionProvider"
+ priority="highest">
+ <enablement>
+ <or>
+ <instanceof
+ value="org.eclipse.wst.server.core.IServer">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.wst.server.ui.internal.view.servers.ModuleServer">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.core.resources.IWorkspaceRoot">
+ </instanceof>
+ <adapt type="java.util.Collection">
+ <count value="0"/>
+ </adapt>
+ <instanceof
+ value="org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.BPELModuleContentProvider$BPELVersionDeployment">
+ </instanceof>
+ </or>
+ </enablement>
+ </actionProvider>
+ </navigatorContent>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.eclipse.wst.server.ui.ServersView">
+ <includes>
+ <contentExtension
+ isRoot="true"
+ pattern="org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.content">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+
+
+
+<!--=========================================================================-->
+<!-- JBoss Runtimes -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type id="org.jboss.ide.eclipse.as.runtime.stripped.component"/>
+ <runtime-component-version
+ type="org.jboss.ide.eclipse.as.runtime.stripped.component"
+ version="1.0"/>
+ <supported>
+ <runtime-component
+ id="org.jboss.ide.eclipse.as.runtime.stripped.component"
+ version="1.0"/>
+ <facet id="jbt.bpel.facet.core" version="1.2,2.0"/>
+ </supported>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type id="org.jboss.ide.eclipse.eap.runtime.component"/>
+ <runtime-component-version
+ type="org.jboss.ide.eclipse.eap.runtime.component"
+ version="5.0"/>
+ <supported>
+ <runtime-component
+ id="org.jboss.ide.eclipse.eap.runtime.component"
+ version="5.0"/>
+ <facet id="jbt.bpel.facet.core" version="1.2,2.0"/>
+ </supported>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type id="org.jboss.ide.eclipse.as.runtime.component"/>
+ <runtime-component-version
+ type="org.jboss.ide.eclipse.as.runtime.component"
+ version="5.1"/>
+ <runtime-component-version
+ type="org.jboss.ide.eclipse.as.runtime.component"
+ version="6.0"/>
+ <runtime-component-version
+ type="org.jboss.ide.eclipse.as.runtime.component"
+ version="7.0"/>
+
+ <supported>
+ <runtime-component version="5.1"
+ id="org.jboss.ide.eclipse.as.runtime.component"/>
+ <facet id="jbt.bpel.facet.core" version="1.2,2.0"/>
+ </supported>
+
+ <supported>
+ <runtime-component version="6.0"
+ id="org.jboss.ide.eclipse.as.runtime.component"/>
+ <facet id="bpel.facet.core" version="1.2,2.0"/>
+ </supported>
+
+ <supported>
+ <runtime-component version="7.0"
+ id="org.jboss.ide.eclipse.as.runtime.component"/>
+ <facet id="bpel.facet.core" version="1.2,2.0"/>
+ </supported>
+
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml
new file mode 100644
index 0000000..2f1b13d
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml
@@ -0,0 +1,14 @@
+<?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.bpel</groupId>
+ <artifactId>org.eclipse.bpel.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+ <groupId>org.eclipse.bpel.plugins</groupId>
+ <artifactId>org.eclipse.bpel.jboss.riftsaw.runtime</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/IBPELModuleFacetConstants.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/IBPELModuleFacetConstants.java
new file mode 100644
index 0000000..4993f97
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/IBPELModuleFacetConstants.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+/**
+ *
+ *
+ * @author Bruno Wassermann, written Jun 29, 2006
+ */
+public interface IBPELModuleFacetConstants {
+
+ public final static String BPEL_CONTENT_FOLDER = "BPELFacetInstallDataModelProvider.contentRoot";
+ public final static String BPEL_CONTENT_DEFAULT_FOLDER = "bpelContent";
+
+
+ // module types
+ public final static String BPEL_MODULE_TYPE = "jbt.bpel.module"; //$NON-NLS-1$
+
+ // module type versions
+ public final static String BPEL11_VERSION = "1.1"; // $NON-NLS-1$
+ public final static String BPEL20_VERSION = "2.0"; // $NON-NLS-1$
+
+ // facet template
+ public final static String BPEL20_FACET_TEMPLATE = "jbt.template.bpel.core"; //$NON-NLS-1$
+
+ // facet
+ // this facet has been deprecated
+ public final static String JBT_BPEL_PROJECT_FACET = "jbt.bpel.facet.core"; //$NON-NLS-1$
+ // and this one is already defined in the common org.eclipse.bpel.runtimes plugin
+// public final static String BPEL_PROJECT_FACET = "bpel.facet.core"; //$NON-NLS-1$
+
+ // bpel file extension
+ public final static String BPEL_FILE_EXTENSION = "bpel"; //$NON-NLS-1$
+ public final static String DOT_BPEL_FILE_EXTENSION = "." + BPEL_FILE_EXTENSION; //$NON-NLS-1$
+
+ // default content folder
+ public final static String BPEL_CONTENT = "bpelContent"; //$NON-NLS-1$
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/IRuntimesUIConstants.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/IRuntimesUIConstants.java
new file mode 100644
index 0000000..26a3846
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/IRuntimesUIConstants.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+/**
+ * A bunch of constants for use by the UI elements of the runtimes plug-in.
+ *
+ * @author Bruno Wassermann, written Jun 30, 2006
+ */
+public interface IRuntimesUIConstants {
+
+ /*
+ * Icons
+ */
+
+ // Icons path
+ public final String ICON_PATH = "icons/"; //$NON-NLS-1$
+
+ // Wizard banner
+ public final String ICON_NEWPRJ_WIZARD_BANNER = "wizban/newprj_bpel_wiz_banner.gif"; //$NON-NLS-1$
+
+ // Facet icons
+ public final String ICON_BPEL_FACET = "obj/bpelfacet.gif"; //$NON-NLS-1$
+
+ // Workbench icons
+ public final String ICON_BPEL_PRJ = "obj16/prj_bpel.gif"; //$NON-NLS-1$
+
+ // New icons
+ public final String ICON_BPEL_NEW_PRJ = "ctool16/new_bpelprj.gif"; //$NON-NLS-1$
+
+ /*
+ * End of icons
+ */
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RuntimesPlugin.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RuntimesPlugin.java
new file mode 100644
index 0000000..948cdef
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RuntimesPlugin.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RuntimesPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.bpel.jboss.riftsaw.runtime"; //$NON-NLS-1$
+
+ //The shared instance.
+ private static RuntimesPlugin plugin;
+
+ private boolean imagesInitialized = false;
+
+ /**
+ * The constructor.
+ */
+ public RuntimesPlugin() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance.
+ */
+ public static RuntimesPlugin getPlugin() {
+ return plugin;
+ }
+
+ @Override
+ public ImageRegistry getImageRegistry() {
+ ImageRegistry result = super.getImageRegistry();
+ initialize();
+ return result;
+ }
+
+ /**
+ * Returns the image descriptor for the given image ID.
+ * Returns null if there is no such image.
+ */
+ public ImageDescriptor getImageDescriptor(String id) {
+ return getImageRegistry().getDescriptor(id);
+ }
+
+ public Image getImage(String id) {
+ return getImageRegistry().get(id);
+ }
+
+ /**
+ * Creates an image descriptor and places it in the image registry.
+ */
+ private void createImageDescriptor(String id, URL baseURL) {
+ URL url = null;
+ try {
+ url = new URL(baseURL, IRuntimesUIConstants.ICON_PATH + id);
+ } catch (MalformedURLException e) {
+ RuntimesPlugin.log(e);
+ }
+ ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+ getImageRegistry().put(id, desc);
+ }
+
+ protected void initialize() {
+ if (!imagesInitialized) {
+ imagesInitialized = true;
+ initializeImages();
+ }
+ }
+
+ /**
+ * Initializes the table of images used in this plugin.
+ */
+ private void initializeImages() {
+ URL baseURL = getBundle().getEntry("/"); //$NON-NLS-1$
+
+ // TODO make sure you initialize all required icons here
+ createImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER, baseURL);
+ createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_NEW_PRJ, baseURL);
+ createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_PRJ, baseURL);
+ }
+
+ /**
+ * Utility methods for logging exceptions.
+ */
+ public static void log(Exception e, int severity) {
+ IStatus status = null;
+ if (e instanceof CoreException) {
+ status = ((CoreException)e).getStatus();
+ } else {
+ String m = e.getMessage();
+ status = new Status(severity, PLUGIN_ID, 0, m==null? "<no message>" : m, e); //$NON-NLS-1$
+ }
+ System.out.println(e.getClass().getName()+": "+status); //$NON-NLS-1$
+ RuntimesPlugin.getPlugin().getLog().log(status);
+ }
+
+ public static void log(Exception e) {
+ log(e, IStatus.ERROR);
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELCoreFacetInstallDelegate.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELCoreFacetInstallDelegate.java
new file mode 100644
index 0000000..1ca16c8
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELCoreFacetInstallDelegate.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.facets;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jst.common.project.facet.WtpUtils;
+import org.eclipse.wst.common.componentcore.internal.util.IComponentImplFactory;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.jboss.ide.eclipse.as.wtp.core.util.VCFUtil;
+import org.jboss.ide.eclipse.as.wtp.core.vcf.OutputFoldersVirtualComponent;
+
+/**
+ * BPEL Facet implementation of <code>IDelegate</code>.
+ * <p>
+ * Note: Must not call IFacetedProject.modify() to install facet as this is a
+ * prohibited operation from a delegate and will throw
+ * <code>CoreException</code>.
+ *
+ * @author Bruno Wassermann, written Jun 7, 2006
+ */
+public class BPELCoreFacetInstallDelegate implements IDelegate {
+
+ /**
+ * At the moment, there does not appear to be any opportunity to do some
+ * common setup of stuff here (e.g., set up a WEB-INF folder, etc.). Maybe
+ * some common requirements will become apparent at some later stage.
+ */
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.wst.common.project.facet.core.IDelegate#execute(org.eclipse.core.resources.IProject,
+ * org.eclipse.wst.common.project.facet.core.IProjectFacetVersion,
+ * java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @SuppressWarnings("nls")
+ public void execute(IProject proj, IProjectFacetVersion ver, Object obj,
+ IProgressMonitor progMon) throws CoreException {
+
+ progMon.beginTask("Configuring ...", 300); //$NON-NLS-1$
+ IDataModel model = (IDataModel)obj;
+ String contentRoot = (String)model.getProperty(IBPELModuleFacetConstants.BPEL_CONTENT_FOLDER);
+ contentRoot = (contentRoot == null || "".equals(contentRoot)) ? IBPELModuleFacetConstants.BPEL_CONTENT_DEFAULT_FOLDER : contentRoot;
+
+ // add natures
+ WtpUtils.addNatures(proj);
+
+ // Create the content folder if it doesn't already exist
+ // https://issues.jboss.org/browse/JBIDE-8508
+ IFolder bpelContent = proj.getFolder(contentRoot);
+ if (!bpelContent.exists())
+ bpelContent.create(true,true, null);
+
+ // create the virtual component
+ IComponentImplFactory factory = new BPELVirtualComponent();
+ IVirtualComponent newComponent = factory.createComponent(proj);
+ newComponent.create(0, null);
+ progMon.worked(100);
+
+ // Add the resource mapping to bpelContent
+ newComponent.getRootFolder().createLink(new Path("/" + contentRoot), 0, null);
+ progMon.worked(100);
+ // Add builder
+ addBuilder(proj, new SubProgressMonitor(progMon, 100));
+ progMon.done();
+ }
+
+ protected void addBuilder(IProject proj, IProgressMonitor monitor) throws CoreException {
+ // Add the builder to the project description
+ IProjectDescription description = proj.getDescription();
+
+ // Our builder name
+ String builderName = "org.eclipse.bpel.validator.builder"; //$NON-NLS-1$
+
+ // Install the builder (validator)
+
+ ICommand buildCommand = description.newCommand();
+
+ // We only support 1 argument now, its "debug"
+ Map<String, String> args = new HashMap<String, String>();
+ args.put("debug", "false");
+ buildCommand.setArguments(args);
+
+ buildCommand.setBuilderName(builderName);
+
+ ICommand[] commands = description.getBuildSpec();
+
+ if (commands == null) {
+ description.setBuildSpec(new ICommand[] { buildCommand });
+ proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
+
+ } else {
+
+ boolean bFound = false;
+ for (ICommand c : commands) {
+ if (builderName.equals(c.getBuilderName())) {
+ bFound = true;
+ break;
+ }
+ }
+
+ // not found
+ if (bFound == false) {
+ int i = commands.length;
+ ICommand[] newCommands = new ICommand[i + 1];
+ System.arraycopy(commands, 0, newCommands, 0, i);
+ newCommands[i] = buildCommand;
+ description.setBuildSpec(newCommands);
+ proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
+ }
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELCoreFacetUninstallDelegate.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELCoreFacetUninstallDelegate.java
new file mode 100644
index 0000000..d52099e
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELCoreFacetUninstallDelegate.java
@@ -0,0 +1,22 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.facets;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.common.project.facet.WtpUtils;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+/*
+ * Added to support deprecated jbt.bpel.facet.core
+ * https://issues.jboss.org/browse/JBIDE-8533
+ */
+public class BPELCoreFacetUninstallDelegate implements IDelegate {
+
+ @Override
+ public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor)
+ throws CoreException {
+ WtpUtils.removeNatures(project);
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELFacetInstallDataModelProvider.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELFacetInstallDataModelProvider.java
new file mode 100644
index 0000000..91402e1
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELFacetInstallDataModelProvider.java
@@ -0,0 +1,34 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.facets;
+
+import java.util.Set;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
+import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
+
+/*
+ * Added to support deprecated jbt.bpel.facet.core
+ * https://issues.jboss.org/browse/JBIDE-8533
+ */
+public class BPELFacetInstallDataModelProvider extends
+ FacetInstallDataModelProvider implements IActionConfigFactory, IFacetDataModelProperties, IBPELModuleFacetConstants {
+
+ @Override
+ public Set getPropertyNames() {
+ Set names = super.getPropertyNames();
+ names.add(FACET_PROJECT_NAME);
+ names.add(FACET_ID);
+ names.add(BPEL_CONTENT_FOLDER);
+ return names;
+ }
+
+ @Override
+ public Object getDefaultProperty(String propertyName) {
+ if (propertyName.equals(FACET_ID)) {
+ return IBPELModuleFacetConstants.JBT_BPEL_PROJECT_FACET;
+ }
+ return super.getDefaultProperty(propertyName);
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELVirtualComponent.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELVirtualComponent.java
new file mode 100644
index 0000000..ea2ba33
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/facets/BPELVirtualComponent.java
@@ -0,0 +1,7 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.facets;
+
+import org.jboss.ide.eclipse.as.wtp.core.vcf.JBTVirtualComponent;
+
+public class BPELVirtualComponent extends JBTVirtualComponent {
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployable.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployable.java
new file mode 100644
index 0000000..143f087
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployable.java
@@ -0,0 +1,37 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.module;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.web.internal.deployables.FlatComponentDeployable;
+
+public class BPELDeployable extends FlatComponentDeployable {
+
+ public BPELDeployable(IProject project) {
+ super(project);
+ }
+
+ public BPELDeployable(IProject project, IVirtualComponent aComponent) {
+ super(project, aComponent);
+ }
+
+ @Override
+ public boolean shouldCache() {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.bpel.runtimes.module.FlatComponentDeployable#getParticipants()
+ */
+ protected IFlattenParticipant[] getParticipants() {
+ /*
+ * No work really needs to be done here. The BPEL project
+ * doesn't need to map source in instead, it doesn't need to
+ * update a manifest file, it doesn't need to add in classpath dependencies, etc etc
+ *
+ * Just standard traversals as of now.
+ */
+ return super.getParticipants();
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployableArtifactAdapterFactory.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployableArtifactAdapterFactory.java
new file mode 100644
index 0000000..6fc764d
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployableArtifactAdapterFactory.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.module;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.ui.actions.ILaunchable;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate;
+
+/**
+ * Preliminary implementation of <code>ModuleArtifactAdapterDelegate</code>
+ * and <code>I</code>for BPEL modules.
+ *
+ * @author Bruno Wassermann, written Aug 14, 2006
+ */
+public class BPELDeployableArtifactAdapterFactory extends
+ ModuleArtifactAdapterDelegate implements IAdapterFactory
+{
+
+ /**
+ *
+ */
+ public BPELDeployableArtifactAdapterFactory() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate#getModuleArtifact(java.lang.Object)
+ */
+ @Override
+ public IModuleArtifact getModuleArtifact(Object obj) {
+ return null; // TODO FIX THIS
+ //return BPELDeployableArtifactUtil.getModuleObject(obj);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ public Class[] getAdapterList() {
+
+ // TODO replace ILaunchable with interface of BPEL module artifacts once available
+ return new Class[]{ILaunchable.class};
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployableArtifactUtil.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployableArtifactUtil.java
new file mode 100644
index 0000000..508eab5
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELDeployableArtifactUtil.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.module;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jem.util.logger.proxy.Logger;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IModuleArtifact;
+
+/**
+ * Utility to adapt an object (in this case an <code>IProject</code< or an
+ * <code>IFile</code>) toa <code>BPELModuleArtifact</code>.
+ *
+ * @author Bruno Wassermann, written Aug 14, 2006
+ */
+public class BPELDeployableArtifactUtil {
+
+ public BPELDeployableArtifactUtil() {
+ super();
+ }
+
+ /**
+ * Adapt an object to an <code>IModuleArtifact</code>
+ *
+ * @param obj
+ * @return <code>IModuleArtifact</code>
+ */
+ public static IModuleArtifact getModuleObject(Object obj) {
+ if (obj instanceof IProject) {
+ return getModuleObject((IProject) obj);
+ }
+
+ if (obj instanceof IFile) {
+ return getModuleObject((IFile) obj);
+ }
+
+ return null;
+ }
+
+ protected static IModuleArtifact getModuleObject(IProject project) {
+ return null;
+ }
+
+ protected static IModuleArtifact getModuleObject(IFile file) {
+ // TODO implement; last impl was totally wrong
+// BPELModuleDelegate moduleDelegate = new BPELModuleDelegate(file.getProject(), file);
+// IStatus fileStatus = moduleDelegate.validate();
+//
+// if (IStatus.OK != fileStatus.getCode()) return null; // not a valid BPEL file
+//
+// IModule[] modules = ServerUtil.getModules(IBPELModuleFacetConstants.BPEL_MODULE_TYPE);
+//
+// for (int i=0; i<modules.length; i++) {
+//
+// if (modules[i].getProject().equals(file.getProject())
+// && modules[i].getName().equals(file.getName()))
+// {
+// return new BPELModuleArtifact(modules[i], file);
+// }
+// }
+ return null;
+ }
+
+ /*
+ * TODO in case fixed BPEL facet is not set anymore, may be able to set
+ * the facet programmatically as a fix for the time being
+ *
+ * TODO figure out new plugin.xml syntax for fixed facet from dynamic web
+ * project
+ *
+ * TODO this is a duplicate method (BPELModuleFactory.getVersion()).
+ * Replace this with a utility method somewhere.
+ */
+ private static String getVersion(IProject project) {
+ IFacetedProject facetedProject = null;
+ try {
+ facetedProject = ProjectFacetsManager.create(project);
+ // https://issues.jboss.org/browse/JBIDE-8533
+ // Added to support deprecated jbt.bpel.facet.core
+ if (facetedProject != null
+ && ProjectFacetsManager.isProjectFacetDefined(IBPELModuleFacetConstants.JBT_BPEL_PROJECT_FACET))
+ {
+ IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet(IBPELModuleFacetConstants.JBT_BPEL_PROJECT_FACET);
+
+ return facetedProject.getInstalledVersion(projectFacet).getVersionString();
+ }
+ } catch (Exception e) {
+ Logger.getLogger().write(e);
+ }
+ return IBPELModuleFacetConstants.BPEL20_VERSION;
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleArtifact.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleArtifact.java
new file mode 100644
index 0000000..97315c0
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleArtifact.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.module;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+
+/**
+ * Representing a simple BPEL module as an <code>IModuleArtifact</code>. Not
+ * sure at this stage what is needed to actually launch deployed BPEL process,
+ * so this implementation is going to change considerably in the near future.
+ *
+ * @author Bruno Wassermann, written Aug 14, 2006
+ */
+public class BPELModuleArtifact implements IModuleArtifact {
+
+ private IModule module;
+ private IFile file;
+
+ /**
+ * Constructor accepting module and corresponding bpel file.
+ *
+ * @param module <code>IModule</code>
+ * @param file <code>IFile</code> the corresponding bpel file
+ */
+ public BPELModuleArtifact(IModule module, IFile file) {
+ super();
+ this.module = module;
+ this.file = file;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.server.core.IModuleArtifact#getModule()
+ */
+ public IModule getModule() {
+ return module;
+ }
+
+ public IFile getFile() {
+ return file;
+ }
+
+ /**
+ * @see Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "BPELModuleArtifact [module=" + module + "]";
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleDelegate.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleDelegate.java
new file mode 100644
index 0000000..17eba07
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleDelegate.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.module;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.bpel.jboss.riftsaw.runtime.RuntimesPlugin;
+import org.eclipse.core.internal.resources.Folder;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.model.IModuleFile;
+import org.eclipse.wst.server.core.model.IModuleFolder;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+import org.eclipse.wst.server.core.util.ModuleFile;
+import org.eclipse.wst.server.core.util.ModuleFolder;
+import org.eclipse.wst.server.core.util.ProjectModule;
+import org.jboss.ide.eclipse.as.wtp.core.modules.JBTProjectModuleDelegate;
+
+public class BPELModuleDelegate extends JBTProjectModuleDelegate {
+
+ public BPELModuleDelegate(IProject project) {
+ super(project);
+ }
+
+ @Override
+ protected String getFactoryId() {
+ return BPELModuleFactoryDelegate.FACTORY_ID;
+ }
+
+ public IModule[] getModules() {
+ return new IModule[]{};
+ }
+
+ public boolean isBinary() {
+ return false;
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleFactoryDelegate.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleFactoryDelegate.java
new file mode 100644
index 0000000..c4f9a28
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/BPELModuleFactoryDelegate.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.module;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.StructureEdit;
+import org.eclipse.wst.common.componentcore.internal.util.FacetedProjectUtilities;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.internal.ModuleFactory;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+import org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate;
+import org.eclipse.wst.web.internal.deployables.FlatComponentDeployable;
+
+public class BPELModuleFactoryDelegate extends ProjectModuleFactoryDelegate implements IResourceChangeListener {
+ protected Map <IModule, FlatComponentDeployable> moduleDelegates = new HashMap<IModule, FlatComponentDeployable>(5);
+
+ public static final String FACTORY_ID = "org.eclipse.bpel.jboss.riftsaw.runtime.module.moduleFactory";
+ public static final String MODULE_TYPE = IBPELModuleFacetConstants.BPEL_MODULE_TYPE;
+ public static BPELModuleFactoryDelegate FACTORY;
+ public static BPELModuleFactoryDelegate factoryInstance() {
+ if( FACTORY == null ) {
+ ensureFactoryLoaded(FACTORY_ID);
+ }
+ return FACTORY;
+ }
+ public static void ensureFactoryLoaded(String factoryId) {
+ ModuleFactory[] factories = ServerPlugin.getModuleFactories();
+ for( int i = 0; i < factories.length; i++ ) {
+ if( factories[i].getId().equals(factoryId)) {
+ factories[i].getDelegate(new NullProgressMonitor());
+ }
+ }
+ }
+
+ public BPELModuleFactoryDelegate() {
+ super();
+ }
+ @Override
+ public void initialize() {
+ super.initialize();
+ if( getId().equals(FACTORY))
+ FACTORY = this;
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
+ }
+
+ @Override
+ protected IModule[] createModules(IProject project) {
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ if(component != null)
+ return createModuleDelegates(component);
+ return null;
+ }
+
+
+ @Override
+ public ModuleDelegate getModuleDelegate(IModule module) {
+ if (module == null)
+ return null;
+
+ ModuleDelegate md = moduleDelegates.get(module);
+// if( md == null && ((Module)module).getInternalId().startsWith(BINARY_PREFIX))
+// return createDelegate(module);
+
+ if (md == null) {
+ createModules(module.getProject());
+ md = moduleDelegates.get(module);
+ }
+ return md;
+ }
+
+ protected boolean canHandleProject(IProject p) {
+ // https://issues.jboss.org/browse/JBIDE-8533
+ // Added support for deprecated jbt.bpel.facet.core
+ return
+ FacetedProjectUtilities.isProjectOfType(p, IBPELModuleFacetConstants.JBT_BPEL_PROJECT_FACET);
+ }
+
+ protected IModule[] createModuleDelegates(IVirtualComponent component) {
+ if(component == null){
+ return null;
+ }
+
+ List<IModule> projectModules = new ArrayList<IModule>();
+ try {
+ if (canHandleProject(component.getProject())) {
+ String type = IBPELModuleFacetConstants.BPEL_MODULE_TYPE;
+ String version = IBPELModuleFacetConstants.BPEL20_VERSION;
+ IModule module = createModule(component.getName(), component.getName(), type, version, component.getProject());
+ FlatComponentDeployable moduleDelegate = createModuleDelegate(component.getProject(), component);
+ moduleDelegates.put(module, moduleDelegate);
+ projectModules.add(module);
+ } else {
+ return null;
+ }
+ } catch (Exception e) {
+// e.printStackTrace();
+// J2EEPlugin.logError(e);
+ }
+ return projectModules.toArray(new IModule[projectModules.size()]);
+ }
+
+ protected FlatComponentDeployable createModuleDelegate(IProject project, IVirtualComponent component) {
+ return new BPELDeployable(project, component);
+ }
+
+ /**
+ * Returns the list of resources that the module should listen to for state
+ * changes. The paths should be project relative paths. Subclasses can
+ * override this method to provide the paths.
+ *
+ * @return a possibly empty array of paths
+ */
+ @Override
+ protected IPath[] getListenerPaths() {
+ return new IPath[] { new Path(".project"), // nature //$NON-NLS-1$
+ new Path(StructureEdit.MODULE_META_FILE_NAME), // component
+ new Path(".settings/org.eclipse.wst.common.project.facet.core.xml") // facets //$NON-NLS-1$
+ };
+ }
+
+ @Override
+ protected void clearCache(IProject project) {
+ super.clearCache(project);
+ List<IModule> modulesToRemove = null;
+ for (Iterator<IModule> iterator = moduleDelegates.keySet().iterator(); iterator.hasNext();) {
+ IModule module = iterator.next();
+ if (module.getProject().equals(project)) {
+ if (modulesToRemove == null) {
+ modulesToRemove = new ArrayList<IModule>();
+ }
+ modulesToRemove.add(module);
+ }
+ }
+ if (modulesToRemove != null) {
+ for (IModule module : modulesToRemove) {
+ moduleDelegates.remove(module);
+ }
+ }
+ }
+
+ public void resourceChanged(IResourceChangeEvent event) {
+ cleanAllDelegates();
+ }
+
+ protected void cleanAllDelegates() {
+ Iterator<FlatComponentDeployable> i = moduleDelegates.values().iterator();
+ while(i.hasNext()) {
+ i.next().clearCache();
+ }
+ modulesChanged();
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBossBPELPublisher.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBossBPELPublisher.java
new file mode 100644
index 0000000..041bd34
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBossBPELPublisher.java
@@ -0,0 +1,350 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.module;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Iterator;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+import org.jboss.ide.eclipse.archives.webtools.modules.LocalZippedPublisherUtil;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
+import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
+import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
+import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil;
+import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.LocalCopyCallback;
+import org.jboss.ide.eclipse.as.core.util.FileUtil;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.jboss.ide.eclipse.as.core.util.IWTPConstants;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.tools.jmx.core.IMemento;
+import org.jboss.tools.jmx.core.util.XMLMemento;
+
+/**
+ * This class allows you to publish a BPEL module specifically
+ * to a JBossTools server entity.
+ * @author rob.stryker@jboss.com
+ *
+ */
+public class JBossBPELPublisher implements IJBossServerPublisher {
+ private IServer server;
+ private int publishState = IServer.PUBLISH_STATE_INCREMENTAL;
+ public JBossBPELPublisher() {
+ }
+
+ public int getPublishState() {
+ return publishState;
+ }
+
+ public boolean accepts(String method, IServer server, IModule[] module) {
+ if( LocalPublishMethod.LOCAL_PUBLISH_METHOD.equals(method)
+ && module != null && module.length > 0
+ && module[module.length-1] != null
+ && module[module.length-1].getModuleType().getId().equals(IBPELModuleFacetConstants.BPEL_MODULE_TYPE))
+ return true;
+ return false;
+ }
+
+ public IStatus publishModule(
+ IJBossServerPublishMethod method,
+ IServer server, IModule[] module,
+ int publishType, IModuleResourceDelta[] delta,
+ IProgressMonitor monitor) throws CoreException {
+
+ this.server = server;
+ IModule last = module[module.length-1];
+ IStatus status = null;
+ if(publishType == REMOVE_PUBLISH){
+ // https://jira.jboss.org/browse/JBIDE-7620
+ if (last.getProject()!=null)
+ removeAll(server, last.getProject());
+ } else if( publishType == FULL_PUBLISH ){
+ // Publish a new version forced
+ status = publish(module, delta, publishType, monitor);
+ publishState = IServer.PUBLISH_STATE_NONE;
+ } else if( publishType == INCREMENTAL_PUBLISH ) {
+ // Do nothing. This is intentional
+ publishState = IServer.PUBLISH_STATE_INCREMENTAL;
+ }
+ // https://issues.jboss.org/browse/JBDS-1573
+ // hack: display a warning dialog.
+ // Deployment validation should really be handled as a WizardFragment invoked from
+ // org.eclipse.wst.server.ui.internal.wizard.ModifyModulesWizard
+ // but there is no WizardFragment extension point for this class...
+ //
+ if (status!=null) {
+ final IStatus s = status;
+ if (!s.isOK()) {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ MessageDialog.openWarning(Display.getDefault()
+ .getActiveShell(), Messages.DeployError, s
+ .getMessage());
+ }
+ });
+ }
+ }
+ return status == null ? Status.OK_STATUS : status;
+ }
+
+
+ protected IStatus publish(IModule[] moduleTree,
+ IModuleResourceDelta[] delta, int publishType, IProgressMonitor monitor) throws CoreException {
+ ArrayList<IStatus> resultList = new ArrayList<IStatus>();
+ IDeployableServer ds = ServerConverter.getDeployableServer(server);
+ IModule last = moduleTree[moduleTree.length -1];
+ IPath deployPath = getDeployPath(moduleTree, ds);
+ IPath tempDeployPath = PublishUtil.getTempDeployFolder(moduleTree, ds);
+ IModuleResource[] members = PublishUtil.getResources(last);
+ // https://issues.jboss.org/browse/JBDS-1573
+ // make sure the project has a deploy.xml (bpel-deploy.xml for backward compatibility).
+ boolean hasDeployXML = false;
+ for (int i=0; i<members.length; ++i) {
+ IModuleResource res = members[i];
+ String name = res.getName();
+ if ("deploy.xml".equals(name) || "bpel-deploy.xml".equals(name)) {
+ hasDeployXML = true;
+ break;
+ }
+ }
+ if (!hasDeployXML) {
+ MultiStatus ms = new MultiStatus(JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FULL_FAIL,
+ NLS.bind(Messages.MissingDeployXML, last.getName()), null);
+ return ms;
+ }
+ if( shouldZip() ) {
+ String deployRoot = PublishUtil.getDeployRootFolder(
+ moduleTree, ds, ds.getDeployFolder(),
+ IJBossToolingConstants.LOCAL_DEPLOYMENT_LOC);
+ BPELZippedPublisherUtil util = new BPELZippedPublisherUtil(deployPath);
+ IStatus ret = util.publishModule(server, deployRoot, moduleTree, publishType, delta, monitor);
+ resultList.add(ret);
+ } else {
+ LocalCopyCallback handler = new LocalCopyCallback(server, deployPath, tempDeployPath);
+ PublishCopyUtil util = new PublishCopyUtil(handler);
+ resultList.addAll(Arrays.asList(util.initFullPublish(members, monitor)));
+ }
+ addDeployedPathToDescriptor(server, last.getProject(), deployPath); // persist it
+ pruneList(resultList);
+ if( resultList.size() > 0 ) {
+ MultiStatus ms = new MultiStatus(JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FULL_FAIL,
+ NLS.bind(org.jboss.ide.eclipse.as.core.Messages.FullPublishFail, last.getName()), null);
+ for( int i = 0; i < resultList.size(); i++ )
+ ms.add(resultList.get(i));
+ return ms;
+ }
+ return Status.OK_STATUS;
+ }
+
+ // Prune out ok status
+ protected void pruneList(ArrayList<IStatus> list) {
+ Iterator<IStatus> i = list.iterator();
+ while(i.hasNext()) {
+ if( i.next().isOK())
+ i.remove();
+ }
+ }
+
+ protected boolean shouldZip() {
+ IDeployableServer ds = ServerConverter.getDeployableServer(server);
+ return ds == null || ds.zipsWTPDeployments();
+ }
+
+ public static IPath getDeployPath(IModule[] moduleTree, IDeployableServer server) {
+ IPath path = PublishUtil.getDeployPath(moduleTree, server);
+ path = path.removeLastSegments(1).append(getNewLastSegment(moduleTree));
+ return path;
+ }
+
+ public static String getNewLastSegment(IModule[] moduleTree) {
+ IModule last = moduleTree[moduleTree.length-1];
+ Calendar cal = Calendar.getInstance();
+ StringBuffer lastSeg = new StringBuffer(formatString(cal.get(Calendar.YEAR)));
+ lastSeg.append(formatString(cal.get(Calendar.MONTH) + 1));
+ lastSeg.append(formatString(cal.get(Calendar.DAY_OF_MONTH)));
+ lastSeg.append(formatString(cal.get(Calendar.HOUR_OF_DAY)));
+ lastSeg.append(formatString(cal.get(Calendar.MINUTE)));
+ lastSeg.append(formatString(cal.get(Calendar.SECOND)));
+
+
+ return last.getName() + "-" + lastSeg.toString() + IWTPConstants.EXT_JAR;
+ }
+
+ private static String formatString(int dateUnit){
+ if(String.valueOf(dateUnit).length() < 2){
+ return "0" + dateUnit;
+ }
+
+ return String.valueOf(dateUnit);
+ }
+
+ private static final String DEPLOYMENTS = "deployments";
+ private static final String PROJECT = "project";
+ private static final String NAME = "name";
+ private static final String VERSION = "version";
+
+ protected static void save(IServer server, XMLMemento memento) {
+ try {
+ memento.save(new FileOutputStream(getDeployDetailsFile(server)));
+ } catch( IOException ioe) {
+ // TODO LOG
+ }
+ }
+
+ public static void removeAll(IServer server, IProject project) {
+ String[] paths = getDeployedPathsFromDescriptor(server, project);
+ for( int i = 0; i < paths.length; i++ ) {
+ // remove them all, with full force!!! >=[
+ FileUtil.safeDelete(new File(paths[i]));
+ }
+ removeProjectFromDescriptor(server, project);
+ }
+
+ public static void removeVersion(IServer server, IProject project, String path) {
+ // delete file
+ FileUtil.safeDelete(new File(path));
+ // remove from descriptor
+ removeVersionFromDescriptor(server, project, path);
+ }
+
+ public static void removeVersionFromDescriptor(IServer server, IProject project, String path) {
+ File f = getDeployDetailsFile(server);
+ XMLMemento memento = null;
+ try {
+ memento = XMLMemento.createReadRoot(new FileInputStream(f));
+ IMemento[] projects = memento.getChildren(PROJECT);//$NON-NLS-1$
+ for( int i = 0; i < projects.length; i++ ) {
+ if( project.getName().equals(projects[i].getString(NAME)) ) {
+ IMemento[] versions = projects[i].getChildren(VERSION);
+ for( int j = 0; j < versions.length; j++ ) {
+ if( ((XMLMemento)versions[j]).getTextData().equals(path)) {
+ ((XMLMemento)projects[i]).removeChild((XMLMemento)versions[j]);
+ }
+ }
+ }
+ }
+ save(server, memento);
+ } catch( FileNotFoundException fnfe) {}
+ }
+
+ public static void removeProjectFromDescriptor(IServer server, IProject project) {
+ File f = getDeployDetailsFile(server);
+ XMLMemento memento = null;
+ try {
+ memento = XMLMemento.createReadRoot(new FileInputStream(f));
+ IMemento[] projects = memento.getChildren(PROJECT);//$NON-NLS-1$
+ for( int i = 0; i < projects.length; i++ ) {
+ if( project.getName().equals(projects[i].getString(NAME)) ) {
+ memento.removeChild((XMLMemento)projects[i]);
+ }
+ }
+ save(server, memento);
+ } catch( FileNotFoundException fnfe) {}
+ }
+
+ public static void addDeployedPathToDescriptor(IServer server, IProject project, IPath path) {
+ File f = getDeployDetailsFile(server);
+ XMLMemento memento = null;
+ try {
+ memento = XMLMemento.createReadRoot(new FileInputStream(f));
+ } catch( FileNotFoundException fnfe) {}
+
+ if( memento == null )
+ memento = XMLMemento.createWriteRoot(DEPLOYMENTS);
+
+ IMemento[] projects = memento.getChildren(PROJECT);//$NON-NLS-1$
+ boolean projectFound = false;
+ for( int i = 0; i < projects.length; i++ ) {
+ if( project.getName().equals(projects[i].getString(NAME))) {
+ projectFound = true;
+ XMLMemento child = (XMLMemento)projects[i].createChild(VERSION);
+ child.putTextData(path.toOSString());
+ }
+ }
+ if( !projectFound ) {
+ XMLMemento proj = (XMLMemento)memento.createChild(PROJECT);
+ proj.putString(NAME, project.getName());
+ XMLMemento child = (XMLMemento)proj.createChild(VERSION);
+ child.putTextData(path.toOSString());
+ }
+ save(server, memento);
+ }
+
+ public static String[] getDeployedPathsFromDescriptor(IServer server, IProject project) {
+ File f = getDeployDetailsFile(server);
+ ArrayList<String> list = new ArrayList<String>();
+ if( f.exists() ) {
+ try {
+ XMLMemento memento = XMLMemento.createReadRoot(new FileInputStream(f));
+ IMemento[] projects = memento.getChildren(PROJECT);//$NON-NLS-1$
+ for( int i = 0; i < projects.length; i++ ) {
+ if( project.getName().equals(projects[i].getString(NAME))) {
+ IMemento[] deployments = projects[i].getChildren(VERSION);
+ for( int j = 0; j < deployments.length; j++ ) {
+ String s = ((XMLMemento)deployments[j]).getTextData();
+ if( s != null && !s.equals(""))
+ list.add(s);
+ }
+ break;
+ }
+ }
+ } catch( FileNotFoundException fnfe) {}
+ }
+ return (String[]) list.toArray(new String[list.size()]);
+ }
+
+ public static File getDeployDetailsFile(IServer server) {
+ return JBossServerCorePlugin.getServerStateLocation(server)
+ .append("bpel.deployment.versions").toFile();
+ }
+
+ public static class BPELZippedPublisherUtil extends LocalZippedPublisherUtil {
+ private IPath deployPath;
+ public BPELZippedPublisherUtil(IPath deployPath) {
+ this.deployPath = deployPath;
+ }
+
+ @Override
+ // https://issues.jboss.org/browse/JBIDE-6617
+ // This was probably a typo - the actual override should have an IModule[] arg
+ public IPath getOutputFilePath(IModule[] module) {
+ return getOutputFilePath();
+ }
+
+ public IPath getOutputFilePath() {
+ return deployPath;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/Messages.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/Messages.java
new file mode 100644
index 0000000..58b15cc
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/Messages.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.module;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Module-related messages.
+ *
+ * @author Bruno Wassermann, written 17 Jul 2006
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.bpel.jboss.riftsaw.runtime.module.messages"; //$NON-NLS-1$
+
+ private Messages() {
+ }
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // module validation
+ public static String InvalidFileExtension;
+ // https://issues.jboss.org/browse/JBDS-1573
+ // added for error dialog
+ public static String MissingDeployXML;
+ public static String DeployError;
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/messages.properties b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/messages.properties
new file mode 100644
index 0000000..21a524f
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/messages.properties
@@ -0,0 +1,3 @@
+InvalidFileExtension=BPEL module file resource must end with bpel file extension.
+MissingDeployXML=The project {0} does not have a BPEL deployment descriptor file (deploy.xml)"
+DeployError=Deployment Error
\ No newline at end of file
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleActionProvider.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleActionProvider.java
new file mode 100644
index 0000000..561f41d
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleActionProvider.java
@@ -0,0 +1,103 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.module.JBossBPELPublisher;
+import org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.BPELModuleContentProvider.BPELVersionDeployment;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
+
+public class BPELModuleActionProvider extends CommonActionProvider {
+
+ private ICommonActionExtensionSite actionSite;
+ private Action undeployVersionAction;
+ private IStructuredSelection lastSelection;
+ public BPELModuleActionProvider() {
+ super();
+ }
+
+ public void dispose() {
+ super.dispose();
+ }
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ this.actionSite = aSite;
+ createActions(aSite);
+ }
+
+ protected void createActions(ICommonActionExtensionSite aSite) {
+ ICommonViewerSite site = aSite.getViewSite();
+ if( site instanceof ICommonViewerWorkbenchSite ) {
+ StructuredViewer v = aSite.getStructuredViewer();
+ if( v instanceof CommonViewer ) {
+ CommonViewer cv = (CommonViewer)v;
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
+ undeployVersionAction = new Action() {
+ public void run() {
+ runUndeployVersion();
+ refreshViewer(getLastServer());
+ }
+ };
+ undeployVersionAction.setText("Undeploy Version");
+ undeployVersionAction.setDescription("Undeploy this version of the module");
+ //undeployVersionAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
+ }
+ }
+ }
+
+ protected void runUndeployVersion() {
+ Object firstSel = lastSelection.getFirstElement();
+ if( firstSel instanceof BPELVersionDeployment ) {
+ BPELVersionDeployment deployment = (BPELVersionDeployment)firstSel;
+ JBossBPELPublisher.removeVersion(deployment.getModuleServer().server,
+ deployment.getProject(), deployment.getPath());
+ }
+ }
+
+ protected IServer getLastServer() {
+ Object firstSel = lastSelection.getFirstElement();
+ if( firstSel instanceof IServer )
+ return (IServer)firstSel;
+ if( firstSel instanceof ModuleServer )
+ return ((ModuleServer)firstSel).getServer();
+ if( firstSel instanceof BPELVersionDeployment )
+ return ((BPELVersionDeployment)firstSel).getModuleServer().getServer();
+ return null;
+ }
+
+ protected void refreshViewer(Object o) {
+ actionSite.getStructuredViewer().refresh(o);
+ }
+
+
+ public void fillContextMenu(IMenuManager menu) {
+ lastSelection = getSelection();
+ if( lastSelection.size() == 1 ) {
+ Object sel = lastSelection.getFirstElement();
+ if( sel instanceof BPELVersionDeployment )
+ menu.add(undeployVersionAction);
+ }
+ }
+
+ public IStructuredSelection getSelection() {
+ ICommonViewerSite site = actionSite.getViewSite();
+ IStructuredSelection selection = null;
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
+ selection = (IStructuredSelection) wsSite.getSelectionProvider()
+ .getSelection();
+ return selection;
+ }
+ return new StructuredSelection();
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleContentProvider.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleContentProvider.java
new file mode 100644
index 0000000..c8793ae
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleContentProvider.java
@@ -0,0 +1,77 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.bpel.jboss.riftsaw.runtime.module.JBossBPELPublisher;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
+
+public class BPELModuleContentProvider implements ITreeContentProvider {
+ public BPELModuleContentProvider() {
+ }
+ public Object[] getChildren(Object parentElement) {
+ if( parentElement instanceof ModuleServer ) {
+ IServer s = ((ModuleServer)parentElement).server;
+ IModule[] module = ((ModuleServer)parentElement).module;
+ IModule mod = module.length > 0 ? module[module.length-1] : null;
+ String typeId = mod.getModuleType().getId();
+ // https://jira.jboss.org/browse/JBIDE-7486
+ // if project was closed or deleted, mod.getProject() is null - ignore
+ if( mod != null && mod.getProject() != null && typeId.equals(IBPELModuleFacetConstants.BPEL_MODULE_TYPE)) {
+ // we have a bpel module deployed to a server. List the children
+ String[] versions = JBossBPELPublisher.getDeployedPathsFromDescriptor(s, mod.getProject());
+ return wrap((ModuleServer)parentElement, versions);
+ }
+ }
+ return new Object[]{};
+ }
+
+ protected BPELVersionDeployment[] wrap(ModuleServer ms, String[] vals) {
+ BPELVersionDeployment[] versions = new BPELVersionDeployment[vals.length];
+ for( int i = 0; i < vals.length; i++ ) {
+ versions[i] = new BPELVersionDeployment(ms, vals[i]);
+ }
+ return versions;
+ }
+
+ public static class BPELVersionDeployment {
+ private String path;
+ private ModuleServer ms;
+ public BPELVersionDeployment(ModuleServer ms, String path) {
+ this.path = path;
+ this.ms = ms;
+ }
+ public String getPath() { return path; }
+ public ModuleServer getModuleServer() { return ms; }
+ public IProject getProject() {
+ if( ms.module != null && ms.module.length > 0 )
+ return ms.module[ms.module.length-1].getProject();
+ return null;
+ }
+ }
+
+ public Object getParent(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleLabelProvider.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleLabelProvider.java
new file mode 100644
index 0000000..b9a57af
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleLabelProvider.java
@@ -0,0 +1,22 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IRuntimesUIConstants;
+import org.eclipse.bpel.jboss.riftsaw.runtime.RuntimesPlugin;
+import org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.BPELModuleContentProvider.BPELVersionDeployment;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class BPELModuleLabelProvider extends LabelProvider {
+ public Image getImage(Object element) {
+
+ return RuntimesPlugin.getPlugin().getImage(IRuntimesUIConstants.ICON_BPEL_FACET);
+ }
+
+ public String getText(Object element) {
+ if( element instanceof BPELVersionDeployment ) {
+ return new Path(((BPELVersionDeployment)element).getPath()).lastSegment();
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/BPELFacetInstallPage.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/BPELFacetInstallPage.java
new file mode 100644
index 0000000..0bc9a10
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/BPELFacetInstallPage.java
@@ -0,0 +1,46 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetInstallPage;
+
+public class BPELFacetInstallPage extends DataModelFacetInstallPage implements
+ IFacetWizardPage {
+
+ private Label contentDirLabel;
+ private Text contentDir;
+ public BPELFacetInstallPage() {
+ super("Test BPEL");
+ setTitle("BPEL Title");
+ setDescription("BPEL Description");
+ }
+
+ @Override
+ protected String[] getValidationPropertyNames() {
+ return new String[]{IBPELModuleFacetConstants.BPEL_CONTENT_FOLDER};
+ }
+
+ @Override
+ protected Composite createTopLevelComposite(Composite parent) {
+ final Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(2, false));
+ this.contentDirLabel = new Label(composite, SWT.NONE);
+ this.contentDirLabel.setText("Content Folder");
+ this.contentDirLabel.setLayoutData(new GridData());
+
+ this.contentDir = new Text(composite, SWT.BORDER);
+ this.contentDir.setLayoutData(gdhfill());
+ this.contentDir.setData("label", this.contentDirLabel); //$NON-NLS-1$
+ this.synchHelper.synchText(contentDir, IBPELModuleFacetConstants.BPEL_CONTENT_FOLDER, null);
+ this.contentDir.setText(IBPELModuleFacetConstants.BPEL_CONTENT_DEFAULT_FOLDER);
+ new Label(composite, SWT.NONE); // pad
+ return composite;
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/BPELFacetProjectCreationDataModelProvider.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/BPELFacetProjectCreationDataModelProvider.java
new file mode 100644
index 0000000..49e4c2f
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/BPELFacetProjectCreationDataModelProvider.java
@@ -0,0 +1,30 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.jst.common.project.facet.IJavaFacetInstallDataModelProperties;
+import org.eclipse.jst.common.project.facet.JavaFacetUtils;
+import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+
+public class BPELFacetProjectCreationDataModelProvider extends
+ FacetProjectCreationDataModelProvider {
+
+ @Override
+ public void init() {
+ super.init();
+
+ Collection<IProjectFacet> requiredFacets = new ArrayList<IProjectFacet>();
+ requiredFacets.add(JavaFacetUtils.JAVA_FACET);
+// requiredFacets.add(IJ2EEFacetConstants.UTILITY_FACET);
+ setProperty(REQUIRED_FACETS_COLLECTION, requiredFacets);
+
+ FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
+ IDataModel javaFacet = map.getFacetDataModel(JavaFacetUtils.JAVA_FACET.getId());
+ javaFacet.setStringProperty(IJavaFacetInstallDataModelProperties.SOURCE_FOLDER_NAME, "bpel");
+ }
+
+
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/Messages.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/Messages.java
new file mode 100644
index 0000000..861016f
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/Messages.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Internationalization, internationalisation...
+ *
+ *
+ * @author Bruno Wassermann, written Jun 30, 2006
+ */
+public final class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards.messages"; //$NON-NLS-1$
+
+ private Messages() {
+ }
+
+ // new project wizard
+ public static String NewProjectWizard_1;
+ public static String NewProjectWizardPage1_1;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/NewBPELProjectWizard.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/NewBPELProjectWizard.java
new file mode 100644
index 0000000..35356ce
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/NewBPELProjectWizard.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.bpel.jboss.riftsaw.runtime.IRuntimesUIConstants;
+import org.eclipse.bpel.jboss.riftsaw.runtime.RuntimesPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
+
+/**
+ * <code>INewWizard</code> implementation for new BPEL project wizard
+ * installing the BPEL facet by default.
+ *
+ * @author Bruno Wassermann, written Jun 28, 2006
+ */
+public class NewBPELProjectWizard extends NewProjectDataModelFacetWizard
+ implements INewWizard
+{
+
+ /**
+ * Default constructor.
+ */
+ public NewBPELProjectWizard() {
+ super();
+ setWindowTitle(Messages.NewProjectWizard_1);
+ }
+
+ /**
+ * Constructor settings this wizard's <code>IDataModel</code>.
+ *
+ * @see <code>IDataModel</code>
+ * @param model <code>IDataModel</code>
+ */
+ public NewBPELProjectWizard(IDataModel model) {
+ super(model);
+ setWindowTitle(Messages.NewProjectWizard_1);
+ }
+
+ /**
+ * Creates an instance of the <code>FacetProjectCreationDataModelProvider</code>
+ * for BPEL projects. Used to associate common facet information such as
+ * runtimes with particular a project.
+ *
+ * @see <code>FacetProjectCreationDataModelProvider</code>
+ * @return <code>IDataModel</code>
+ */
+ @Override
+ protected IDataModel createDataModel() {
+
+ /*
+ * There does not seem to be a need for any custom implementation for
+ * BPEL projects at this stage. May have to reconsider at some point and
+ * build a BPELFacetProjectCreationDataModelProvider.
+ */
+ return DataModelFactory.createDataModel(new BPELFacetProjectCreationDataModelProvider());
+ }
+
+ /**
+ * Getting image descriptor to be used as wizard banner.
+ *
+ * @return <code>ImageDescriptor</code>
+ */
+ @Override
+ protected ImageDescriptor getDefaultPageImageDescriptor() {
+ return RuntimesPlugin.getPlugin().getImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER);
+ }
+
+ /**
+ * Getting the <code>IFacetedProjectTemplate</code> for a BPEL project.
+ * Is used to retrieve the set of fixed facets for a particular project
+ * type.
+ *
+ * @see org.eclipse.wst.common.project.core.IFacetedProjectTemplate
+ * @return org.eclipse.wst.common.project.core.IFacetedProjectTemplate
+ *
+ */
+ @Override
+ protected IFacetedProjectTemplate getTemplate() {
+ return ProjectFacetsManager.getTemplate(IBPELModuleFacetConstants.BPEL20_FACET_TEMPLATE);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard#createFirstPage()
+ */
+ @Override
+ protected IWizardPage createFirstPage() {
+ return new NewBPELProjectWizardPage1(model, "newBPELProject"); // $NON-NLS-1$
+ }
+
+ protected String getFinalPerspectiveID() {
+ return "org.eclipse.bpel.ui.perspective"; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/NewBPELProjectWizardPage1.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/NewBPELProjectWizardPage1.java
new file mode 100644
index 0000000..1435007
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/NewBPELProjectWizardPage1.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.IBPELModuleFacetConstants;
+import org.eclipse.bpel.jboss.riftsaw.runtime.IRuntimesUIConstants;
+import org.eclipse.bpel.jboss.riftsaw.runtime.RuntimesPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
+
+/**
+ * <code>DataModelFacetCreationWizardPage</code> for setting up a new BPEL
+ * project.
+ *
+ * @author Bruno Wassermann, written Jun 29, 2006
+ */
+public class NewBPELProjectWizardPage1 extends DataModelFacetCreationWizardPage {
+
+ public NewBPELProjectWizardPage1(IDataModel dataModel, String pageName) {
+ super(dataModel, pageName);
+ setTitle(org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards.Messages.NewProjectWizard_1);
+ setDescription(org.eclipse.bpel.jboss.riftsaw.runtime.ui.wizards.Messages.NewProjectWizardPage1_1);
+ setImageDescriptor(RuntimesPlugin.getPlugin().getImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER));
+ }
+
+ protected String getModuleFacetID() {
+ return IBPELModuleFacetConstants.BPEL_MODULE_TYPE;
+ }
+
+ protected String getModuleTypeID() {
+ return IBPELModuleFacetConstants.JBT_BPEL_PROJECT_FACET;
+ }
+
+ protected Composite createTopLevelComposite(Composite parent) {
+ Composite top = new Composite(parent, SWT.NONE);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(top, getInfopopID());
+ top.setLayout(new GridLayout());
+ top.setLayoutData(new GridData(GridData.FILL_BOTH));
+ createProjectGroup(top);
+// createServerTargetComposite(top);
+// createPrimaryFacetComposite(top);
+// createPresetPanel(top);
+ return top;
+ }
+}
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/messages.properties b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/messages.properties
new file mode 100644
index 0000000..affeb29
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/wizards/messages.properties
@@ -0,0 +1,2 @@
+NewProjectWizard_1=New BPEL Project
+NewProjectWizardPage1_1=Create a new BPEL 2.0 project.
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/utils/BPELModelUtils.java b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/utils/BPELModelUtils.java
new file mode 100644
index 0000000..d194507
--- /dev/null
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/utils/BPELModelUtils.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime.utils;
+
+import org.eclipse.bpel.model.PartnerLink;
+import org.eclipse.bpel.model.Scope;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * A bunch of helper methods to support runtime providers get data from the
+ * BPEL model.
+ *
+ * @author Bruno Wassermann, written 11 May 2007
+ */
+public class BPELModelUtils {
+
+ /**
+ * Return an <code>EList</code> containing all partnerLink elements defined
+ * on Scopes in this process.
+ *
+ * @param process <code>EObject</code> representing the Process element
+ * @return <code>EList</code> containing all <code>PartnerLink</code>s
+ * defined on any Scopes (or none)
+ */
+ public static EList<PartnerLink> getScopePartnerLinks(final EObject process) {
+ TreeIterator<EObject> contents = process.eAllContents();
+ EList<PartnerLink> results = new BasicEList<PartnerLink>();
+
+ while (contents.hasNext()) {
+ EObject obj = contents.next();
+
+ if (obj instanceof Scope) {
+ results.addAll(((Scope) obj).getPartnerLinks().getChildren());
+ }
+ }
+ return results;
+ }
+}
diff --git a/plugins/org.eclipse.bpel.runtimes/plugin.xml b/plugins/org.eclipse.bpel.runtimes/plugin.xml
index 6361dc5..1ef7c52 100644
--- a/plugins/org.eclipse.bpel.runtimes/plugin.xml
+++ b/plugins/org.eclipse.bpel.runtimes/plugin.xml
@@ -1,193 +1,183 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-
-<!--=========================================================================-->
-<!-- BPEL Designer Runtime Extension Point -->
-<!-- -->
-<!-- Copyright (c) 2006 University College London. -->
-<!-- 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 -->
-<!-- -->
-<!--=========================================================================-->
-
-<plugin>
-
-<!--=========================================================================-->
-<!-- New BPEL Project Wizard -->
-<!--=========================================================================-->
-
- <extension
- point="org.eclipse.ui.newWizards">
- <wizard
- name="%NEW_BPEL_PROJECT"
- icon="icons/ctool16/new_bpelprj.gif"
- category="org.eclipse.bpel.wizards"
- project="true"
- class="org.eclipse.bpel.runtimes.ui.wizards.NewBPELProjectWizard"
- id="org.eclipse.bpel.runtimes.wizards.newBPELProject">
- <description>%NEW_BPEL_PROJECT_DESCRIPTION</description>
- </wizard>
- </extension>
-
- <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
- <wizard-pages action="bpel.facet.core.install">
- <page class="org.eclipse.bpel.runtimes.ui.wizards.BPELFacetInstallPage"/>
- </wizard-pages>
- </extension>
-
-
-<!--=========================================================================-->
-<!-- BPEL ModuleType -->
-<!--=========================================================================-->
-
- <extension
- id="bpel.module"
- name="%MODULE_TYPE_NAME"
- point="org.eclipse.wst.server.core.moduleTypes">
- </extension>
-
-<!-- The following is needed to make icons for deployable modules occur in -->
-<!-- the Add and Remove Projects wizard -->
-
- <extension point="org.eclipse.wst.server.ui.serverImages">
- <image
- id="org.eclipse.bpel.runtimes.bpel.module"
- typeIds="bpel.module"
- icon="icons/obj16/bpelfacet.gif"/>
- </extension>
-
-<!--=========================================================================-->
-<!-- BPEL Facet -->
-<!--=========================================================================-->
-
- <extension point="org.eclipse.wst.common.project.facet.core.facets">
-
- <project-facet id="bpel.facet.core">
- <label>%BPEL_CORE_FACET_LABEL</label>
- <description>%BPEL_CORE_FACET_DESCRIPTION</description>
- </project-facet>
-
- <project-facet-version facet="bpel.facet.core" version="2.0">
- <group-member id="modules"></group-member>
- <constraint>
- <conflicts group="modules">
- </conflicts>
- </constraint>
- </project-facet-version>
-
-
- <action facet="bpel.facet.core" version="2.0" type="INSTALL" id="bpel.facet.core.install">
- <delegate class="org.eclipse.bpel.runtimes.facets.BPELCoreFacetInstallDelegate"/>
- <config-factory class="org.eclipse.bpel.runtimes.facets.BPELFacetInstallDataModelProvider"/>
- </action>
-
- <category id="bpel.category">
- <label>%BPEL_FACET_CATEGORY_LABEL</label>
- <description>%bpelCoreFacetDescription</description>
- </category>
-
- <template id="template.bpel.core">
- <label>%BPEL_FACET_TEMPLATE_LABEL</label>
- <fixed facet="bpel.facet.core"/>
- </template>
-
- </extension>
-
-<!--=========================================================================-->
-<!-- BPEL Facet Image -->
-<!--=========================================================================-->
-
- <extension point="org.eclipse.wst.common.project.facet.ui.images">
- <image facet="bpel.facet.core" path="icons/obj16/bpelfacet.gif"/>
- </extension>
-
- <extension
- point="org.eclipse.wst.common.modulecore.componentimpl">
- <componentimpl
- typeID="bpel.facet.core"
- class="org.eclipse.bpel.runtimes.facets.BPELVirtualComponent">
- </componentimpl>
- </extension>
-
-
-<!--=========================================================================-->
-<!-- BPEL Module Factory -->
-<!--=========================================================================-->
-
- <extension
- point="org.eclipse.wst.server.core.moduleFactories">
- <moduleFactory
- projects="true"
- class="org.eclipse.bpel.runtimes.module.BPELModuleFactoryDelegate"
- id="org.eclipse.bpel.runtimes.module.moduleFactory">
- <moduleType
- versions="1.1, 2.0"
- types="bpel.module">
- </moduleType>
- </moduleFactory>
- </extension>
-
-<!--=========================================================================-->
-<!-- BPEL Module ArtifactAdapters -->
-<!--=========================================================================-->
-
- <extension point="org.eclipse.wst.server.core.moduleArtifactAdapters">
- <moduleArtifactAdapter
- id="org.eclipse.bpel.runtimes.module.artifactAdapter1"
- class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
- <enablement>
- <with variable="selection">
- <adapt type="org.eclipse.core.resources.IProject"/>
- </with>
- </enablement>
- </moduleArtifactAdapter>
- <moduleArtifactAdapter
- id="org.eclipse.bpel.runtimes.module.artifactAdapter2"
- class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
- <enablement>
- <with variable="selection">
- <adapt type="org.eclipse.core.resources.IFile"/>
- </with>
- </enablement>
- </moduleArtifactAdapter>
- </extension>
-
-<!--=========================================================================-->
-<!-- BPEL Runtime Adapters -->
-<!--=========================================================================-->
-
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
- adaptableType="org.eclipse.core.resources.IProject">
- <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
- </factory>
- <factory
- class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
- adaptableType="org.eclipse.core.resources.IFile">
- <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
- </factory>
- </extension>
-
-<!--=========================================================================-->
-<!-- TO MAKE PROCESSES ACTUALLY LAUNCHABLE VIA RUN ON SERVER -->
-<!-- -->
-<!-- Implement org.eclipse.wst.server.core.clients in order to specify the -->
-<!-- the client app to be used for launching. -->
-<!-- -->
-<!-- Implement org.eclipse.wst.server.core.launchableAdapters. Might have to -->
-<!-- do this in server-specific way or maybe can resuse some generic server -->
-<!-- framework stuff or maybe can come up with some interface that would -->
-<!-- allow us to implement in runtimes plug-in. -->
-<!-- -->
-<!-- N.B. Launching here means launching a Web service. Hence, can do this -->
-<!-- via the corresponding WTP feature with no code at all from our end. -->
-<!-- -->
-<!-- -->
-<!-- -->
-<!--=========================================================================-->
-
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--=========================================================================-->
+<!-- BPEL Designer Runtime Extension Point -->
+<!-- -->
+<!-- Copyright (c) 2006 University College London. -->
+<!-- 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 -->
+<!-- -->
+<!--=========================================================================-->
+
+<plugin>
+
+<!--=========================================================================-->
+<!-- New BPEL Project Wizard -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ name="%NEW_BPEL_PROJECT"
+ icon="icons/ctool16/new_bpelprj.gif"
+ category="org.eclipse.bpel.wizards"
+ project="true"
+ class="org.eclipse.bpel.runtimes.ui.wizards.NewBPELProjectWizard"
+ finalPerspective="org.eclipse.bpel.ui.perspective"
+ preferredPerspectives="org.eclipse.bpel.ui.perspective"
+ id="org.eclipse.bpel.runtimes.wizards.newBPELProject">
+ <description>%NEW_BPEL_PROJECT_DESCRIPTION</description>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
+ <wizard-pages action="bpel.facet.core.install">
+ <page class="org.eclipse.bpel.runtimes.ui.wizards.BPELFacetInstallPage"/>
+ </wizard-pages>
+ </extension>
+
+
+<!--=========================================================================-->
+<!-- BPEL ModuleType -->
+<!--=========================================================================-->
+
+ <extension
+ id="bpel.module"
+ name="%MODULE_TYPE_NAME"
+ point="org.eclipse.wst.server.core.moduleTypes">
+ </extension>
+
+<!-- The following is needed to make icons for deployable modules occur in -->
+<!-- the Add and Remove Projects wizard -->
+
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.bpel.runtimes.bpel.module"
+ typeIds="bpel.module"
+ icon="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Facet -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.common.project.facet.core.facets">
+
+ <project-facet id="bpel.facet.core">
+ <label>%BPEL_CORE_FACET_LABEL</label>
+ <description>%BPEL_CORE_FACET_DESCRIPTION</description>
+ </project-facet>
+
+ <project-facet-version facet="bpel.facet.core" version="2.0">
+ <group-member id="modules"></group-member>
+ <constraint>
+ <conflicts group="modules">
+ </conflicts>
+ </constraint>
+ </project-facet-version>
+
+ <action facet="bpel.facet.core" version="2.0" type="INSTALL" id="bpel.facet.core.install">
+ <delegate class="org.eclipse.bpel.runtimes.facets.BPELCoreFacetInstallDelegate"/>
+ <config-factory class="org.eclipse.bpel.runtimes.facets.BPELFacetInstallDataModelProvider"/>
+ </action>
+
+ <action facet="bpel.facet.core" version="2.0" type="UNINSTALL" id="bpel.facet.core.uninstall">
+ <delegate class="org.eclipse.bpel.runtimes.facets.BPELCoreFacetUninstallDelegate"/>
+ </action>
+
+ <category id="bpel.category">
+ <label>%BPEL_FACET_CATEGORY_LABEL</label>
+ <description>%bpelCoreFacetDescription</description>
+ </category>
+
+ <template id="template.bpel.core">
+ <label>%BPEL_FACET_TEMPLATE_LABEL</label>
+ <fixed facet="bpel.facet.core"/>
+ </template>
+
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Facet Image -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image facet="bpel.facet.core" path="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Virtual Component -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.common.modulecore.componentimpl">
+ <componentimpl
+ typeID="bpel.facet.core"
+ class="org.eclipse.bpel.runtimes.facets.BPELVirtualComponent">
+ </componentimpl>
+ </extension>
+
+
+<!--=========================================================================-->
+<!-- BPEL Module Factory -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.server.core.moduleFactories">
+ <moduleFactory
+ projects="true"
+ class="org.eclipse.bpel.runtimes.module.BPELModuleFactoryDelegate"
+ id="org.eclipse.bpel.runtimes.module.moduleFactory">
+ <moduleType
+ versions="1.1, 2.0"
+ types="bpel.module">
+ </moduleType>
+ </moduleFactory>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Module ArtifactAdapters -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.server.core.moduleArtifactAdapters">
+ <moduleArtifactAdapter
+ id="org.eclipse.bpel.runtimes.module.artifactAdapter1"
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ <moduleArtifactAdapter
+ id="org.eclipse.bpel.runtimes.module.artifactAdapter2"
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IFile"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Runtime Adapters -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IProject">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ <factory
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IFile">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java b/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
index 61d9ed0..1ba1e16 100644
--- a/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
+++ b/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
@@ -1,131 +1,131 @@
-/*******************************************************************************
- * Copyright (c) 2006 University College London Software Systems Engineering
- * 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:
- * Bruno Wassermann - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpel.runtimes.facets;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jst.common.project.facet.WtpUtils;
-import org.eclipse.wst.common.componentcore.internal.util.IComponentImplFactory;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-
-/**
- * BPEL Facet implementation of <code>IDelegate</code>.
- * <p>
- * Note: Must not call IFacetedProject.modify() to install facet as this is
- * a prohibited operation from a delegate and will throw <code>CoreException</code>.
- *
- * @author Bruno Wassermann, written Jun 7, 2006
- */
-public class BPELCoreFacetInstallDelegate implements IDelegate {
-
- /**
- * At the moment, there does not appear to be any opportunity to do some
- * common setup of stuff here (e.g., set up a WEB-INF folder, etc.).
- * Maybe some common requirements will become apparent at some later stage.
- */
-
- /** (non-Javadoc)
- * @see org.eclipse.wst.common.project.facet.core.IDelegate#execute(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- @SuppressWarnings("nls")
- public void execute(IProject proj,
- IProjectFacetVersion ver,
- Object obj,
- IProgressMonitor progMon)
- throws CoreException
- {
- progMon.beginTask( "Configuring ...", 300 ); //$NON-NLS-1$
- IDataModel model = (IDataModel)obj;
- String contentRoot = (String)model.getProperty(BPELFacetInstallDataModelProvider.BPEL_CONTENT_FOLDER);
- contentRoot = (contentRoot == null || "".equals(contentRoot)) ? IBPELModuleFacetConstants.BPEL_CONTENT_DEFAULT_FOLDER : contentRoot;
-
- // add natures
- WtpUtils.addNatures(proj);
-
- // Create the content folder
- IFolder bpelContent = proj.getFolder(contentRoot);
- if (!bpelContent.exists())
- bpelContent.create(true,true, null);
-
- // create the virtual component
- IComponentImplFactory factory = new BPELVirtualComponent();
- IVirtualComponent newComponent = factory.createComponent(proj);
- newComponent.create(0, null);
- progMon.worked(100);
-
- // Add the resource mapping to bpelContent
- newComponent.getRootFolder().createLink(new Path("/" + contentRoot), 0, null);
-
- // Add builder
- addBuilder(proj, new SubProgressMonitor(progMon, 100));
- progMon.done();
- }
- protected void addBuilder(IProject proj, IProgressMonitor monitor) throws CoreException {
- // Add the builder to the project description
- IProjectDescription description = proj.getDescription();
-
- // Our builder name
- String builderName = "org.eclipse.bpel.validator.builder"; //$NON-NLS-1$
-
- // Install the builder (validator)
-
- ICommand buildCommand = description.newCommand();
-
- // We only support 1 argument now, its "debug"
- Map<String, String> args = new HashMap<String, String>();
- args.put("debug", "false");
- buildCommand.setArguments(args);
-
- buildCommand.setBuilderName(builderName);
-
- ICommand[] commands = description.getBuildSpec();
-
- if (commands == null) {
- description.setBuildSpec(new ICommand[] { buildCommand });
- proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
-
- } else {
-
- boolean bFound = false;
- for (ICommand c : commands) {
- if (builderName.equals(c.getBuilderName())) {
- bFound = true;
- break;
- }
- }
-
- // not found
- if (bFound == false) {
- int i = commands.length;
- ICommand[] newCommands = new ICommand[i + 1];
- System.arraycopy(commands, 0, newCommands, 0, i);
- newCommands[i] = buildCommand;
- description.setBuildSpec(newCommands);
- proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
- }
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.facets;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jst.common.project.facet.WtpUtils;
+import org.eclipse.wst.common.componentcore.internal.util.IComponentImplFactory;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+
+/**
+ * BPEL Facet implementation of <code>IDelegate</code>.
+ * <p>
+ * Note: Must not call IFacetedProject.modify() to install facet as this is
+ * a prohibited operation from a delegate and will throw <code>CoreException</code>.
+ *
+ * @author Bruno Wassermann, written Jun 7, 2006
+ */
+public class BPELCoreFacetInstallDelegate implements IDelegate {
+
+ /**
+ * At the moment, there does not appear to be any opportunity to do some
+ * common setup of stuff here (e.g., set up a WEB-INF folder, etc.).
+ * Maybe some common requirements will become apparent at some later stage.
+ */
+
+ /** (non-Javadoc)
+ * @see org.eclipse.wst.common.project.facet.core.IDelegate#execute(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @SuppressWarnings("nls")
+ public void execute(IProject proj,
+ IProjectFacetVersion ver,
+ Object obj,
+ IProgressMonitor progMon)
+ throws CoreException
+ {
+ progMon.beginTask( "Configuring ...", 300 ); //$NON-NLS-1$
+ IDataModel model = (IDataModel)obj;
+ String contentRoot = (String)model.getProperty(BPELFacetInstallDataModelProvider.BPEL_CONTENT_FOLDER);
+ contentRoot = (contentRoot == null || "".equals(contentRoot)) ? IBPELModuleFacetConstants.BPEL_CONTENT_DEFAULT_FOLDER : contentRoot;
+
+ // add natures
+ WtpUtils.addNatures(proj);
+
+ // Create the content folder
+ IFolder bpelContent = proj.getFolder(contentRoot);
+ if (!bpelContent.exists())
+ bpelContent.create(true,true, null);
+
+ // create the virtual component
+ IComponentImplFactory factory = new BPELVirtualComponent();
+ IVirtualComponent newComponent = factory.createComponent(proj);
+ newComponent.create(0, null);
+ progMon.worked(100);
+
+ // Add the resource mapping to bpelContent
+ newComponent.getRootFolder().createLink(new Path("/" + contentRoot), 0, null);
+ progMon.worked(100);
+ // Add builder
+ addBuilder(proj, new SubProgressMonitor(progMon, 100));
+ progMon.done();
+ }
+ protected void addBuilder(IProject proj, IProgressMonitor monitor) throws CoreException {
+ // Add the builder to the project description
+ IProjectDescription description = proj.getDescription();
+
+ // Our builder name
+ String builderName = "org.eclipse.bpel.validator.builder"; //$NON-NLS-1$
+
+ // Install the builder (validator)
+
+ ICommand buildCommand = description.newCommand();
+
+ // We only support 1 argument now, its "debug"
+ Map<String, String> args = new HashMap<String, String>();
+ args.put("debug", "false");
+ buildCommand.setArguments(args);
+
+ buildCommand.setBuilderName(builderName);
+
+ ICommand[] commands = description.getBuildSpec();
+
+ if (commands == null) {
+ description.setBuildSpec(new ICommand[] { buildCommand });
+ proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
+
+ } else {
+
+ boolean bFound = false;
+ for (ICommand c : commands) {
+ if (builderName.equals(c.getBuilderName())) {
+ bFound = true;
+ break;
+ }
+ }
+
+ // not found
+ if (bFound == false) {
+ int i = commands.length;
+ ICommand[] newCommands = new ICommand[i + 1];
+ System.arraycopy(commands, 0, newCommands, 0, i);
+ newCommands[i] = buildCommand;
+ description.setBuildSpec(newCommands);
+ proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetUninstallDelegate.java b/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetUninstallDelegate.java
new file mode 100644
index 0000000..aac1618
--- /dev/null
+++ b/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetUninstallDelegate.java
@@ -0,0 +1,22 @@
+package org.eclipse.bpel.runtimes.facets;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.common.project.facet.WtpUtils;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+/*
+ * Added to support deprecated jbt.bpel.facet.core
+ * https://issues.jboss.org/browse/JBIDE-8533
+ */
+public class BPELCoreFacetUninstallDelegate implements IDelegate {
+
+ @Override
+ public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor)
+ throws CoreException {
+ WtpUtils.removeNatures(project);
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java b/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
index 0702993..ca6f09c 100644
--- a/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
+++ b/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
@@ -1,109 +1,111 @@
-/*******************************************************************************
- * Copyright (c) 2006 University College London Software Systems Engineering
- * 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:
- * Bruno Wassermann - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpel.runtimes.ui.wizards;
-
-import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
-import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
-import org.eclipse.bpel.runtimes.RuntimesPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
-
-/**
- * <code>INewWizard</code> implementation for new BPEL project wizard
- * installing the BPEL facet by default.
- *
- * @author Bruno Wassermann, written Jun 28, 2006
- */
-public class NewBPELProjectWizard extends NewProjectDataModelFacetWizard
- implements INewWizard
-{
-
- /**
- * Default constructor.
- */
- public NewBPELProjectWizard() {
- super();
- setWindowTitle(Messages.NewProjectWizard_1);
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * 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:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.ui.wizards;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
+import org.eclipse.bpel.runtimes.RuntimesPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
+
+/**
+ * <code>INewWizard</code> implementation for new BPEL project wizard
+ * installing the BPEL facet by default.
+ *
+ * @author Bruno Wassermann, written Jun 28, 2006
+ */
+public class NewBPELProjectWizard extends NewProjectDataModelFacetWizard
+ implements INewWizard
+{
+
+ /**
+ * Default constructor.
+ */
+ public NewBPELProjectWizard() {
+ super();
+ setWindowTitle(Messages.NewProjectWizard_1);
+ }
+
+ /**
+ * Constructor settings this wizard's <code>IDataModel</code>.
+ *
+ * @see <code>IDataModel</code>
+ * @param model <code>IDataModel</code>
+ */
+ public NewBPELProjectWizard(IDataModel model) {
+ super(model);
+ setWindowTitle(Messages.NewProjectWizard_1);
+ }
+
+ /**
+ * Creates an instance of the <code>FacetProjectCreationDataModelProvider</code>
+ * for BPEL projects. Used to associate common facet information such as
+ * runtimes with particular a project.
+ *
+ * @see <code>FacetProjectCreationDataModelProvider</code>
+ * @return <code>IDataModel</code>
+ */
+ @Override
+ protected IDataModel createDataModel() {
+
+ /*
+ * There does not seem to be a need for any custom implementation for
+ * BPEL projects at this stage. May have to reconsider at some point and
+ * build a BPELFacetProjectCreationDataModelProvider.
+ */
+ return DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
+ }
+
+ /**
+ * Getting image descriptor to be used as wizard banner.
+ *
+ * @return <code>ImageDescriptor</code>
+ */
+ @Override
+ protected ImageDescriptor getDefaultPageImageDescriptor() {
+ return RuntimesPlugin.getPlugin().getImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER);
+ }
+
+ /**
+ * Getting the <code>IFacetedProjectTemplate</code> for a BPEL project.
+ * Is used to retrieve the set of fixed facets for a particular project
+ * type.
+ *
+ * @see org.eclipse.wst.common.project.core.IFacetedProjectTemplate
+ * @return org.eclipse.wst.common.project.core.IFacetedProjectTemplate
+ *
+ */
+ @Override
+ protected IFacetedProjectTemplate getTemplate() {
+ return ProjectFacetsManager.getTemplate(IBPELModuleFacetConstants.BPEL20_FACET_TEMPLATE);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard#createFirstPage()
+ */
+ @Override
+ protected IWizardPage createFirstPage() {
+ return new NewBPELProjectWizardPage1(model, "newBPELProject"); // $NON-NLS-1$
+ }
+
+ protected String getFinalPerspectiveID() {
+ return "org.eclipse.bpel.ui.perspective"; //$NON-NLS-1$
}
-
- /**
- * Constructor settings this wizard's <code>IDataModel</code>.
- *
- * @see <code>IDataModel</code>
- * @param model <code>IDataModel</code>
- */
- public NewBPELProjectWizard(IDataModel model) {
- super(model);
- setWindowTitle(Messages.NewProjectWizard_1);
- }
-
- /**
- * Creates an instance of the <code>FacetProjectCreationDataModelProvider</code>
- * for BPEL projects. Used to associate common facet information such as
- * runtimes with particular a project.
- *
- * @see <code>FacetProjectCreationDataModelProvider</code>
- * @return <code>IDataModel</code>
- */
- @Override
- protected IDataModel createDataModel() {
-
- /*
- * There does not seem to be a need for any custom implementation for
- * BPEL projects at this stage. May have to reconsider at some point and
- * build a BPELFacetProjectCreationDataModelProvider.
- */
- return DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- }
-
- /**
- * Getting image descriptor to be used as wizard banner.
- *
- * @return <code>ImageDescriptor</code>
- */
- @Override
- protected ImageDescriptor getDefaultPageImageDescriptor() {
- return RuntimesPlugin.getPlugin().getImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER);
- }
-
- /**
- * Getting the <code>IFacetedProjectTemplate</code> for a BPEL project.
- * Is used to retrieve the set of fixed facets for a particular project
- * type.
- *
- * @see org.eclipse.wst.common.project.core.IFacetedProjectTemplate
- * @return org.eclipse.wst.common.project.core.IFacetedProjectTemplate
- *
- */
- @Override
- protected IFacetedProjectTemplate getTemplate() {
- return ProjectFacetsManager.getTemplate(IBPELModuleFacetConstants.BPEL20_FACET_TEMPLATE);
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard#createFirstPage()
- */
- @Override
- protected IWizardPage createFirstPage() {
- return new NewBPELProjectWizardPage1(model, "newBPELProject"); // $NON-NLS-1$
- }
-
-
-}
+}
diff --git a/plugins/org.eclipse.bpel.ui/plugin.properties b/plugins/org.eclipse.bpel.ui/plugin.properties
index dc86763..08589b9 100644
--- a/plugins/org.eclipse.bpel.ui/plugin.properties
+++ b/plugins/org.eclipse.bpel.ui/plugin.properties
@@ -1,60 +1,60 @@
-###############################################################################
-# Copyright (c) 2010 JBoss by Red Hat 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:
-# IBM Corporation - initial API and implementation
-# JBoss by Red Hat - subsequent contributions and maintenance
-###############################################################################
-PLUGIN_NAME=BPEL Editor
-BPEL_EDITOR_NAME=Business Process Editor
-HOVERHELP_HELPER_NAME=Hoverhelp Helper
-EXPRESSION_LANGUAGE_EDITORS_NAME=Expression Language Editors
-NEW_BPEL_BUSINESS_PROCESS_NAME=Business Process
-
-DETAILS_PAGES_DESCRIPTION_LABEL=Description
-DETAILS_PAGES_DETAILS_LABEL=Details
-DETAILS_PAGES_COMPENSATION_LABEL=Compensation
-DETAILS_PAGES_REPEAT_LABEL=Repeat
-DETAILS_PAGES_EXPIRATION_LABEL=Expiration
-DETAILS_PAGES_JOIN_BEHAVIOUR_LABEL=Join Behavior
-DETAILS_PAGES_CORRELATION_LABEL=Correlation
-DETAILS_PAGES_EXPRESSIONS_LABEL=Expressions
-DETAILS_PAGES_IMPORTS_LABEL=Imports
-DETAILS_PAGES_COUNTER_VALUES_LABEL=Counter Values
-DETAILS_PAGES_COMPLETION_LABEL=Completion
-DETAILS_PAGES_INITIALIZATION_LABEL=Initialization
-DETAILS_PAGES_DOCUMENTATION_LABEL=Documentation
-DETAILS_PAGES_MESSAGE_EXCHANGE_LABEL=Message Exchange
-# Bugzilla 324162
-DETAILS_PAGES_NAMESPACEPREFIXES_LABEL=Namespaces
-
-XPATH_LABEL=XPath 1.0
-XPATH_LABEL20 = XPath 1.0 in BPEL 2.0
-#
-UI_MARKER_LABEL=UI Marker
-PREFERENCE_PAGE_HOME=BPEL
-PREFERENCE_PAGE_EDITOR=Editor
-PREFERENCE_PAGE_WSIL=WSIL Browser
-PREFERENCE_PAGE_EXPRESSION_EDITOR=Expression Editors
-PREFERENCE_PAGE_XPATH_EDITOR_TEMPLATES=Templates
-
-
-CREATE_A_NEW_PROCESS=Create a new Business Process
-BASIC_ACTIONS=Basic Actions
-
-COMPONENT_NAME=Process
-COMPONENT_DESCRIPTION=Business Process
-
-NEW_BPEL_CATEGORY=BPEL 2.0
-NEW_BPEL_FILE=New BPEL Process File
-EXPORT_AS_IMAGE_TOOLTIP=Export BPEL as image...
-EXPORT_AS_IMAGE_LABEL=Export as Image...
-
-# ====================================================================
-
-pluginName = BPEL Editor (Incubation)
-providerName = Eclipse.org
+###############################################################################
+# Copyright (c) 2010 JBoss by Red Hat 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:
+# IBM Corporation - initial API and implementation
+# JBoss by Red Hat - subsequent contributions and maintenance
+###############################################################################
+PLUGIN_NAME=BPEL Editor
+BPEL_EDITOR_NAME=Business Process Editor
+HOVERHELP_HELPER_NAME=Hoverhelp Helper
+EXPRESSION_LANGUAGE_EDITORS_NAME=Expression Language Editors
+NEW_BPEL_BUSINESS_PROCESS_NAME=Business Process
+
+DETAILS_PAGES_DESCRIPTION_LABEL=Description
+DETAILS_PAGES_DETAILS_LABEL=Details
+DETAILS_PAGES_COMPENSATION_LABEL=Compensation
+DETAILS_PAGES_REPEAT_LABEL=Repeat
+DETAILS_PAGES_EXPIRATION_LABEL=Expiration
+DETAILS_PAGES_JOIN_BEHAVIOUR_LABEL=Join Behavior
+DETAILS_PAGES_CORRELATION_LABEL=Correlation
+DETAILS_PAGES_EXPRESSIONS_LABEL=Expressions
+DETAILS_PAGES_IMPORTS_LABEL=Imports
+DETAILS_PAGES_COUNTER_VALUES_LABEL=Counter Values
+DETAILS_PAGES_COMPLETION_LABEL=Completion
+DETAILS_PAGES_INITIALIZATION_LABEL=Initialization
+DETAILS_PAGES_DOCUMENTATION_LABEL=Documentation
+DETAILS_PAGES_MESSAGE_EXCHANGE_LABEL=Message Exchange
+# Bugzilla 324162
+DETAILS_PAGES_NAMESPACEPREFIXES_LABEL=Namespaces
+
+XPATH_LABEL=XPath 1.0
+XPATH_LABEL20 = XPath 1.0 in BPEL 2.0
+#
+UI_MARKER_LABEL=UI Marker
+PREFERENCE_PAGE_HOME=BPEL
+PREFERENCE_PAGE_EDITOR=Editor
+PREFERENCE_PAGE_WSIL=WSIL Browser
+PREFERENCE_PAGE_EXPRESSION_EDITOR=Expression Editors
+PREFERENCE_PAGE_XPATH_EDITOR_TEMPLATES=Templates
+
+
+CREATE_A_NEW_PROCESS=Create a new Business Process
+BASIC_ACTIONS=Basic Actions
+
+COMPONENT_NAME=Process
+COMPONENT_DESCRIPTION=Business Process
+
+NEW_BPEL_CATEGORY=BPEL 2.0
+NEW_BPEL_FILE=BPEL Process File
+EXPORT_AS_IMAGE_TOOLTIP=Export BPEL as image...
+EXPORT_AS_IMAGE_LABEL=Export as Image...
+
+# ====================================================================
+
+pluginName = BPEL Editor (Incubation)
+providerName = Eclipse.org
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 5595972..6a6309a 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -25,6 +25,7 @@
<module>org.eclipse.bpel.validator</module>
<module>org.eclipse.bpel.wsil.model</module>
<module>org.eclipse.bpel.xpath10</module>
+ <module>org.eclipse.bpel.jboss.riftsaw.runtime</module>
</modules>
</project>