JBoss Tools SVN: r26577 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools: internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-15 13:31:16 -0500 (Mon, 15 Nov 2010)
New Revision: 26577
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance2.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java
Log:
[JBIDE-7581] renamed newInstance to newInstanceWizard
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java 2010-11-15 18:30:24 UTC (rev 26576)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java 2010-11-15 18:31:16 UTC (rev 26577)
@@ -24,7 +24,7 @@
import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
-import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstance2;
+import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstanceWizard2;
/**
* @author Jeff Johnston
@@ -42,7 +42,7 @@
if (element != null) {
CVCloudElement cloudElement = (CVCloudElement) element;
DeltaCloud cloud = (DeltaCloud) cloudElement.getElement();
- IWizard wizard = new NewInstance2(cloud);
+ IWizard wizard = new NewInstanceWizard2(cloud);
WizardDialog dialog = new WizardDialog(UIUtils.getActiveWorkbenchWindow().getShell(),
wizard);
dialog.create();
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance2.java 2010-11-15 18:30:24 UTC (rev 26576)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance2.java 2010-11-15 18:31:16 UTC (rev 26577)
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * 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:
- * Red Hat Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.IRSECoreRegistry;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemStartHere;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
-import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
-import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
-import org.osgi.service.prefs.Preferences;
-
-public class NewInstance2 extends Wizard {
-
- private final static String CREATE_INSTANCE_FAILURE_TITLE = "CreateInstanceError.title"; //$NON-NLS-1$
- private final static String CREATE_INSTANCE_FAILURE_MSG = "CreateInstanceError.msg"; //$NON-NLS-1$
- private final static String DEFAULT_REASON = "CreateInstanceErrorReason.msg"; //$NON-NLS-1$
- private final static String CONFIRM_CREATE_TITLE = "ConfirmCreate.title"; //$NON-NLS-1$
- private final static String CONFIRM_CREATE_MSG = "ConfirmCreate.msg"; //$NON-NLS-1$
- private final static String DONT_SHOW_THIS_AGAIN_MSG = "DontShowThisAgain.msg"; //$NON-NLS-1$
- private final static String STARTING_INSTANCE_MSG = "StartingInstance.msg"; //$NON-NLS-1$
- private final static String STARTING_INSTANCE_TITLE = "StartingInstance.title"; //$NON-NLS-1$
- private final static String RSE_CONNECTING_MSG = "ConnectingRSE.msg"; //$NON-NLS-1$
-
-
- private NewInstancePage2 mainPage;
-
- private DeltaCloud cloud;
- private DeltaCloudInstance instance;
-
- public NewInstance2(DeltaCloud cloud) {
- this.cloud = cloud;
- }
-
- @Override
- public void addPages() {
- // TODO Auto-generated method stub
- mainPage = new NewInstancePage2(cloud);
- addPage(mainPage);
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
-
- private class WatchCreateJob extends Job {
-
- private DeltaCloud cloud;
- private String instanceId;
- private String instanceName;
-
- public WatchCreateJob(String title, DeltaCloud cloud,
- String instanceId, String instanceName) {
- super(title);
- this.cloud = cloud;
- this.instanceId = instanceId;
- this.instanceName = instanceName;
- }
-
- public IStatus run(IProgressMonitor pm) {
- if (!pm.isCanceled()){
- DeltaCloudInstance instance = null;
- try {
- pm.beginTask(WizardMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] {instanceName}), IProgressMonitor.UNKNOWN);
- pm.worked(1);
- cloud.registerActionJob(instanceId, this);
- boolean finished = false;
- while (!finished && !pm.isCanceled()) {
- instance = cloud.refreshInstance(instanceId);
- if (instance != null && !instance.getState().equals(DeltaCloudInstance.PENDING))
- break;
- Thread.sleep(400);
- }
-
- } catch (Exception e) {
- // do nothing
- } finally {
- cloud.addReplaceInstance(instance);
- cloud.removeActionJob(instanceId, this);
- String hostname = instance.getHostName();
- Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
- boolean autoConnect = prefs.getBoolean(IDeltaCloudPreferenceConstants.AUTO_CONNECT_INSTANCE, true);
- if (hostname != null && hostname.length() > 0 && autoConnect) {
- ISystemRegistry registry = SystemStartHere.getSystemRegistry();
- RSECorePlugin rsep = RSECorePlugin.getDefault();
- IRSECoreRegistry coreRegistry = rsep.getCoreRegistry();
- IRSESystemType[] sysTypes = coreRegistry.getSystemTypes();
- IRSESystemType sshType = null;
- for (IRSESystemType sysType : sysTypes) {
- if (sysType.getId().equals(IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID))
- sshType = sysType;
- }
- String connectionName = instance.getName() + " [" + instance.getId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- try {
- IHost host = registry.createHost(sshType, connectionName, hostname, null);
- if (host != null) {
- host.setDefaultUserId("root"); //$NON-NLS-1$
- IConnectorService[] services = host.getConnectorServices();
- if (services.length > 0) {
- final IConnectorService service = services[0];
- Job connect = new Job(CVMessages.getFormattedString(RSE_CONNECTING_MSG, connectionName)) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- service.connect(monitor);
- return Status.OK_STATUS;
- } catch(Exception e) {
- return Status.CANCEL_STATUS;
- }
- }
- };
- connect.setUser(true);
- connect.schedule();
- }
- }
- } catch (Exception e) {
- // TODO Auto-generated catch block
- Activator.log(e);
- }
- }
- pm.done();
- }
- return Status.OK_STATUS;
- }
- else {
- pm.done();
- return Status.CANCEL_STATUS;
- }
- };
- };
-
- @Override
- public boolean performFinish() {
- String imageId = mainPage.getImageId();
- String profileId = mainPage.getHardwareProfile();
- String realmId = mainPage.getRealmId();
- String memory = mainPage.getMemoryProperty();
- String storage = mainPage.getStorageProperty();
- String keyname = mainPage.getKeyName();
- String name = null;
-
- // Save persistent settings for this particular cloud
- cloud.setLastImageId(imageId);
- cloud.setLastKeyname(keyname);
- cloud.save();
-
- Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
-
- try {
- name = URLEncoder.encode(mainPage.getInstanceName(), "UTF-8");
- } catch (UnsupportedEncodingException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } //$NON-NLS-1$
-
- boolean result = false;
- String errorMessage = WizardMessages.getString(DEFAULT_REASON);
- try {
- boolean dontShowDialog = prefs.getBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE, false);
- if (!dontShowDialog) {
- MessageDialogWithToggle dialog =
- MessageDialogWithToggle.openOkCancelConfirm(getShell(), WizardMessages.getString(CONFIRM_CREATE_TITLE),
- WizardMessages.getString(CONFIRM_CREATE_MSG),
- WizardMessages.getString(DONT_SHOW_THIS_AGAIN_MSG),
- false, null, null);
- int retCode = dialog.getReturnCode();
- boolean toggleState = dialog.getToggleState();
- if (retCode == Dialog.CANCEL)
- return true;
- // If warning turned off by user, set the preference for future usage
- if (toggleState) {
- prefs.putBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE, true);
- }
- }
- instance = cloud.createInstance(name, imageId, realmId, profileId, keyname, memory, storage);
- if (instance != null)
- result = true;
- if (instance != null && instance.getState().equals(DeltaCloudInstance.PENDING)) {
- final String instanceId = instance.getId();
- final String instanceName = name;
- Job job = new WatchCreateJob(WizardMessages.getString(STARTING_INSTANCE_TITLE),
- cloud, instanceId, instanceName);
- job.setUser(true);
- job.schedule();
- }
- } catch (DeltaCloudException e) {
- errorMessage = e.getLocalizedMessage();
- }
- if (!result) {
- ErrorDialog.openError(this.getShell(),
- WizardMessages.getString(CREATE_INSTANCE_FAILURE_TITLE),
- WizardMessages.getFormattedString(CREATE_INSTANCE_FAILURE_MSG, new String[] {name, imageId, realmId, profileId}),
- new Status(IStatus.ERROR, Activator.PLUGIN_ID, errorMessage));
- }
- return result;
- }
-
-}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java (from rev 26556, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance2.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java 2010-11-15 18:31:16 UTC (rev 26577)
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * 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:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.rse.core.IRSECoreRegistry;
+import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.rse.core.model.SystemStartHere;
+import org.eclipse.rse.core.subsystems.IConnectorService;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.ui.Activator;
+import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.osgi.service.prefs.Preferences;
+
+public class NewInstanceWizard2 extends Wizard {
+
+ private final static String CREATE_INSTANCE_FAILURE_TITLE = "CreateInstanceError.title"; //$NON-NLS-1$
+ private final static String CREATE_INSTANCE_FAILURE_MSG = "CreateInstanceError.msg"; //$NON-NLS-1$
+ private final static String DEFAULT_REASON = "CreateInstanceErrorReason.msg"; //$NON-NLS-1$
+ private final static String CONFIRM_CREATE_TITLE = "ConfirmCreate.title"; //$NON-NLS-1$
+ private final static String CONFIRM_CREATE_MSG = "ConfirmCreate.msg"; //$NON-NLS-1$
+ private final static String DONT_SHOW_THIS_AGAIN_MSG = "DontShowThisAgain.msg"; //$NON-NLS-1$
+ private final static String STARTING_INSTANCE_MSG = "StartingInstance.msg"; //$NON-NLS-1$
+ private final static String STARTING_INSTANCE_TITLE = "StartingInstance.title"; //$NON-NLS-1$
+ private final static String RSE_CONNECTING_MSG = "ConnectingRSE.msg"; //$NON-NLS-1$
+
+
+ private NewInstancePage2 mainPage;
+
+ private DeltaCloud cloud;
+ private DeltaCloudInstance instance;
+
+ public NewInstanceWizard2(DeltaCloud cloud) {
+ this.cloud = cloud;
+ }
+
+ @Override
+ public void addPages() {
+ // TODO Auto-generated method stub
+ mainPage = new NewInstancePage2(cloud);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+
+ private class WatchCreateJob extends Job {
+
+ private DeltaCloud cloud;
+ private String instanceId;
+ private String instanceName;
+
+ public WatchCreateJob(String title, DeltaCloud cloud,
+ String instanceId, String instanceName) {
+ super(title);
+ this.cloud = cloud;
+ this.instanceId = instanceId;
+ this.instanceName = instanceName;
+ }
+
+ public IStatus run(IProgressMonitor pm) {
+ if (!pm.isCanceled()){
+ DeltaCloudInstance instance = null;
+ try {
+ pm.beginTask(WizardMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] {instanceName}), IProgressMonitor.UNKNOWN);
+ pm.worked(1);
+ cloud.registerActionJob(instanceId, this);
+ boolean finished = false;
+ while (!finished && !pm.isCanceled()) {
+ instance = cloud.refreshInstance(instanceId);
+ if (instance != null && !instance.getState().equals(DeltaCloudInstance.PENDING))
+ break;
+ Thread.sleep(400);
+ }
+
+ } catch (Exception e) {
+ // do nothing
+ } finally {
+ cloud.replaceInstance(instance);
+ cloud.removeActionJob(instanceId, this);
+ String hostname = instance.getHostName();
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+ boolean autoConnect = prefs.getBoolean(IDeltaCloudPreferenceConstants.AUTO_CONNECT_INSTANCE, true);
+ if (hostname != null && hostname.length() > 0 && autoConnect) {
+ ISystemRegistry registry = SystemStartHere.getSystemRegistry();
+ RSECorePlugin rsep = RSECorePlugin.getDefault();
+ IRSECoreRegistry coreRegistry = rsep.getCoreRegistry();
+ IRSESystemType[] sysTypes = coreRegistry.getSystemTypes();
+ IRSESystemType sshType = null;
+ for (IRSESystemType sysType : sysTypes) {
+ if (sysType.getId().equals(IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID))
+ sshType = sysType;
+ }
+ String connectionName = instance.getName() + " [" + instance.getId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ IHost host = registry.createHost(sshType, connectionName, hostname, null);
+ if (host != null) {
+ host.setDefaultUserId("root"); //$NON-NLS-1$
+ IConnectorService[] services = host.getConnectorServices();
+ if (services.length > 0) {
+ final IConnectorService service = services[0];
+ Job connect = new Job(CVMessages.getFormattedString(RSE_CONNECTING_MSG, connectionName)) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ service.connect(monitor);
+ return Status.OK_STATUS;
+ } catch(Exception e) {
+ return Status.CANCEL_STATUS;
+ }
+ }
+ };
+ connect.setUser(true);
+ connect.schedule();
+ }
+ }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ Activator.log(e);
+ }
+ }
+ pm.done();
+ }
+ return Status.OK_STATUS;
+ }
+ else {
+ pm.done();
+ return Status.CANCEL_STATUS;
+ }
+ };
+ };
+
+ @Override
+ public boolean performFinish() {
+ String imageId = mainPage.getImageId();
+ String profileId = mainPage.getHardwareProfile();
+ String realmId = mainPage.getRealmId();
+ String memory = mainPage.getMemoryProperty();
+ String storage = mainPage.getStorageProperty();
+ String keyname = mainPage.getKeyName();
+ String name = null;
+
+ // Save persistent settings for this particular cloud
+ cloud.setLastImageId(imageId);
+ cloud.setLastKeyname(keyname);
+ cloud.save();
+
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+
+ try {
+ name = URLEncoder.encode(mainPage.getInstanceName(), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } //$NON-NLS-1$
+
+ boolean result = false;
+ String errorMessage = WizardMessages.getString(DEFAULT_REASON);
+ try {
+ boolean dontShowDialog = prefs.getBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE, false);
+ if (!dontShowDialog) {
+ MessageDialogWithToggle dialog =
+ MessageDialogWithToggle.openOkCancelConfirm(getShell(), WizardMessages.getString(CONFIRM_CREATE_TITLE),
+ WizardMessages.getString(CONFIRM_CREATE_MSG),
+ WizardMessages.getString(DONT_SHOW_THIS_AGAIN_MSG),
+ false, null, null);
+ int retCode = dialog.getReturnCode();
+ boolean toggleState = dialog.getToggleState();
+ if (retCode == Dialog.CANCEL)
+ return true;
+ // If warning turned off by user, set the preference for future usage
+ if (toggleState) {
+ prefs.putBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE, true);
+ }
+ }
+ instance = cloud.createInstance(name, imageId, realmId, profileId, keyname, memory, storage);
+ if (instance != null)
+ result = true;
+ if (instance != null && instance.getState().equals(DeltaCloudInstance.PENDING)) {
+ final String instanceId = instance.getId();
+ final String instanceName = name;
+ Job job = new WatchCreateJob(WizardMessages.getString(STARTING_INSTANCE_TITLE),
+ cloud, instanceId, instanceName);
+ job.setUser(true);
+ job.schedule();
+ }
+ } catch (DeltaCloudException e) {
+ errorMessage = e.getLocalizedMessage();
+ }
+ if (!result) {
+ ErrorDialog.openError(this.getShell(),
+ WizardMessages.getString(CREATE_INSTANCE_FAILURE_TITLE),
+ WizardMessages.getFormattedString(CREATE_INSTANCE_FAILURE_MSG, new String[] {name, imageId, realmId, profileId}),
+ new Status(IStatus.ERROR, Activator.PLUGIN_ID, errorMessage));
+ }
+ return result;
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 5 months
JBoss Tools SVN: r26576 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-15 13:30:24 -0500 (Mon, 15 Nov 2010)
New Revision: 26576
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstancePropertySource.java
Log:
[JBIDE-7581] remove commented code
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstancePropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstancePropertySource.java 2010-11-15 18:29:23 UTC (rev 26575)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstancePropertySource.java 2010-11-15 18:30:24 UTC (rev 26576)
@@ -44,11 +44,6 @@
private DeltaCloudInstance instance;
private DeltaCloud cloud;
public InstancePropertySource(CVInstanceElement element, Object o) {
-// CloudViewElement parent = (CloudViewElement)element.getParent();
-// while (parent != null && !(parent instanceof CVCloudElement)) {
-// parent = (CloudViewElement)parent.getParent();
-// }
-// cloud = (DeltaCloud)parent.getElement();
cloud = CloudViewElementUtils.getCloud(element);
instance = (DeltaCloudInstance)o;
}
@@ -124,7 +119,7 @@
if (instance != null) {
key = instance.getKey();
if (key != null && key.length() > 0)
- cloud.addReplaceInstance(instance);
+ cloud.replaceInstance(instance);
}
}
}
15 years, 5 months
JBoss Tools SVN: r26575 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.test.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-15 13:29:23 -0500 (Mon, 15 Nov 2010)
New Revision: 26575
Added:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i ec2 -p3002.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i mock.launch
Log:
[JBIDE-7581] added launch configs
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i ec2 -p3002.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i ec2 -p3002.launch (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i ec2 -p3002.launch 2010-11-15 18:29:23 UTC (rev 26575)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/deltacloudd"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-i ec2 -p3002"/>
+</launchConfiguration>
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i ec2 -p3002.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i mock.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i mock.launch (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i mock.launch 2010-11-15 18:29:23 UTC (rev 26575)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/deltacloudd"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-i mock"/>
+</launchConfiguration>
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/deltacloudd -i mock.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 5 months
JBoss Tools SVN: r26574 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-15 13:28:58 -0500 (Mon, 15 Nov 2010)
New Revision: 26574
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
Log:
[JBIDE-7581] renamed method
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-11-15 18:04:29 UTC (rev 26573)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-11-15 18:28:58 UTC (rev 26574)
@@ -352,7 +352,7 @@
}
}
- public void addReplaceInstance(DeltaCloudInstance instance) {
+ public void replaceInstance(DeltaCloudInstance instance) {
String instanceId = instance.getId();
if (instance != null) {
boolean found = false;
15 years, 5 months
JBoss Tools SVN: r26573 - in workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime: .settings and 18 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-11-15 13:04:29 -0500 (Mon, 15 Nov 2010)
New Revision: 26573
Added:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.cvsignore
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/bin/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/buildfiles/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/buildfiles/riftsaw2x.xml
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw2x.xml
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/ctool16/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/ctool16/new_bpelprj.gif
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/bpelfacet.gif
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/prj_bpel.gif
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/wizban/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/wizban/newprj_bpel_wiz_banner.gif
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RuntimesPlugin.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELModuleFactoryDelegate.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELPublisher.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleActionProvider.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleContentProvider.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleLabelProvider.java
Log:
OPEN - issue JBIDE-6588: BPEL deployment to ODE running in Tomcat
https://jira.jboss.org/browse/JBIDE-6588
generic server deployment for jboss/riftsaw
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.cvsignore
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.cvsignore (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.cvsignore 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1 @@
+bin
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project 2010-11-15 18:04:29 UTC (rev 26573)
@@ -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>
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,8 @@
+#Tue Oct 20 16:01:25 CST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,45 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.jboss.tools.bpel.runtimes;singleton:=true
+Bundle-Version: 0.4.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.jst.server.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.server.generic.ui;bundle-version="[1.0.305,2.0.0)",
+ org.eclipse.jst.server.ui;bundle-version="[1.0.303,2.0.0)",
+ org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
+ 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.eclipse.wst.server.ui;resolution:=optional,
+ org.eclipse.ui.navigator,
+ org.jboss.ide.eclipse.as.ui;bundle-version="2.2.0",
+ org.jboss.ide.eclipse.as.wtp.ui;bundle-version="2.2.0",
+ org.eclipse.bpel.runtimes;bundle-version="0.5.0",
+ org.jboss.tools.jmx.core;bundle-version="1.2.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.bpel.jboss.riftsaw.runtime,
+ org.eclipse.bpel.jboss.riftsaw.runtime.module
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.*,\
+ icons/
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/buildfiles/riftsaw2x.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/buildfiles/riftsaw2x.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/buildfiles/riftsaw2x.xml 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,22 @@
+<project name="deployextension" default="deploy.bpel" basedir=".">
+ <property name="pause.deploy" value="2"/>
+ <property name="pause.undeploy" value="2"/>
+ <property name="version" value="1" />
+
+ <target name="deploy.bpel">
+ <jar compress="false" destfile="${project.working.dir}/${module.name}.jar">
+ <zipfileset dir="${module.dir}">
+ <include name="**/*.*"/>
+ <exclude name="**/*.java"/>
+ </zipfileset>
+ </jar>
+ <move file="${project.working.dir}/${module.name}-${version}.jar" todir="${server.publish.dir}"/>
+ <sleep seconds="${pause.deploy}"/>
+ </target>
+
+ <target name="undeploy.bpel">
+ <delete file="${server.publish.dir}/${module.name}-${version}.jar" failonerror="false"> </delete>
+ <sleep seconds="${pause.undeploy}"/>
+ </target>
+
+</project>
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw2x.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw2x.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw2x.xml 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:ServerRuntime
+ xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
+ name="JBoss Riftsaw" version="v2.x">
+
+ <property id="serverRootDirectory"
+ label="%jbossHome"
+ type="directory"
+ context="runtime"
+ default="/your_server_root" />
+
+ <property id="serverAddress"
+ label="%serverAddress"
+ type="string"
+ context="runtime"
+ default="127.0.0.1" />
+
+ <property id="port"
+ label="%port"
+ type="string"
+ context="runtime"
+ default="8080" />
+
+ <property id="serverConfig"
+ label="%jbossServerConfig"
+ type="combo"
+ context="runtime"
+ default="default,all,minimal,other - type your own here" />
+
+ <port>
+ <no>${port}</no>
+ <name>Http</name>
+ <protocol>http</protocol>
+ </port>
+
+ <module>
+ <type>bpel.module</type>
+ <publishDir>${jboss.home}/server/${serverConfig}/deploy</publishDir>
+ <publisherReference>org.eclipse.jboss.tools.bpel.runtimes.module</publisherReference>
+ </module>
+
+ <project>
+ <classpathReference>riftsaw.project</classpathReference>
+ </project>
+
+ <start>
+ <mainClass>org.jboss.Main</mainClass>
+ <workingDirectory>${serverRootDirectory}/bin</workingDirectory>
+ <programArguments>-c ${serverConfig}</programArguments>
+ <vmParameters>-Dprogram.name=run.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m</vmParameters>
+ <classpathReference>jboss</classpathReference>
+ </start>
+
+ <stop>
+ <mainClass>org.jboss.Shutdown</mainClass>
+ <workingDirectory>${serverRootDirectory}/bin</workingDirectory>
+ <programArguments>-S</programArguments>
+ <vmParameters>-Djboss.boot.loader.name=shutdown.bat</vmParameters>
+ <classpathReference>jboss.shutdown</classpathReference>
+ </stop>
+
+ <publisher id="org.eclipse.jst.server.generic.antpublisher">
+ <publisherdata>
+ <dataname>build.file</dataname>
+ <datavalue>/buildfiles/riftsaw2x.xml</datavalue>
+ </publisherdata>
+ <publisherdata>
+ <dataname>target.publish.bpel</dataname>
+ <datavalue>deploy.bpel</datavalue>
+ </publisherdata>
+ <publisherdata>
+ <dataname>target.unpublish.bpel</dataname>
+ <datavalue>undeploy.bpel</datavalue>
+ </publisherdata>
+ </publisher>
+
+ <classpath id="jboss" >
+ <archive path="${serverRootDirectory}/bin/run.jar" />
+ </classpath>
+ <classpath id="jboss.shutdown" >
+ <archive path="${serverRootDirectory}/bin/shutdown.jar" />
+ </classpath>
+
+ <classpath id="jboss.project" >
+
+
+ <fileset dir="${serverRootDirectory}">
+ <include name="client/*.jar" />
+ <include name="server/default/lib/*.jar" />
+
+ <include name="server/default/deploy/jbossweb.sar/jsf-libs/*.jar" />
+
+ <!-- This will be ignored if EJB3 is not there 5.0 -->
+ <include name="lib/*.jar" />
+ <include name="server/default/deployers/jbossweb.deployer/*.jar" />
+ <include name="server/default/deployers/jboss-aop-jboss5.deployer/*.jar" />
+ <include name="common/lib/*.jar" />
+ <include name="server/default/deploy/jbossweb.sar/*.jar" />
+
+ <!-- for validation to work this library is defined as an archive -->
+ <exclude name="lib/jboss-kernel.jar" />
+ </fileset>
+
+ <!-- leave one generic jar as an archive so that validation works -->
+ <archive path="${serverRootDirectory}/lib/jboss-kernel.jar" />
+
+ </classpath>
+
+</tns:ServerRuntime>
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/ctool16/new_bpelprj.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/ctool16/new_bpelprj.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/bpelfacet.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/bpelfacet.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/prj_bpel.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/prj_bpel.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/wizban/newprj_bpel_wiz_banner.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/wizban/newprj_bpel_wiz_banner.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,32 @@
+###############################################################################
+# 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:
+# University College London - initial API and implementation
+# JBoss by Red Hat - subsequent contributions and maintenance
+###############################################################################
+pluginName = Eclipse BPEL Designer Runtimes
+providerName = JBoss by Red Hat
+
+MODULE_TYPE_NAME=BPEL 2.0 Process
+MODULE_TYPE_DESCRIPTION=Module representing a BPEL process
+
+BPEL_CORE_FACET_LABEL=BPEL 2.0 Facet
+BPEL_CORE_FACET_DESCRIPTION=Enables modelling and deployment of BPEL processes.
+BPEL_FACET_CATEGORY_LABEL=BPEL 2.0
+BPEL_FACET_TEMPLATE_LABEL=BPEL 2.0 Project
+NEW_BPEL_CATEGORY=BPEL 2.0
+NEW_BPEL_PROJECT=BPEL Project
+NEW_BPEL_PROJECT_DESCRIPTION=Create a new BPEL project.
+
+# used by wizard definitions in definition/riftsaw2x.xml
+pluginName = JBoss Riftsaw Runtime Adapter
+providerName = JBoss by Red Hat
+jbossHome = JBoss App Server home directory:
+jbossServerConfig = Server configuration:
+serverAddress = Server address:
+port = Port:
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,262 @@
+<?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>
+
+<!--=========================================================================-->
+<!-- BPEL ModuleType -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.server.core.moduleTypes">
+ <moduleType
+ id="jbt.bpel.module"
+ name="%MODULE_TYPE_NAME">
+ </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.jboss.tools.bpel.runtimes.jbt.bpel.module"
+ typeIds="jbt.bpel.module"
+ icon="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Module Factory -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.server.core.moduleFactories">
+ <moduleFactory
+ projects="true"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.module.JBTBPELModuleFactoryDelegate"
+ id="org.jboss.tools.bpel.runtimes.module.moduleFactory">
+ <moduleType
+ versions="1.1, 2.0"
+ types="jbt.bpel.module">
+ </moduleType>
+ <moduleType
+ versions="1.1, 2.0"
+ types="bpel.module">
+ </moduleType>
+ </moduleFactory>
+ </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.jboss.tools.bpel.runtimes.ui.view.server.content"
+ activeByDefault="true"
+ contentProvider="org.jboss.tools.bpel.runtimes.ui.view.server.BPELModuleContentProvider"
+ icon="icons/obj16/bpelfacet.gif"
+ labelProvider="org.jboss.tools.bpel.runtimes.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.jboss.tools.bpel.runtimes.ui.view.server.BPELModuleActionProvider"
+ id="org.jboss.tools.bpel.runtimes.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.jboss.tools.bpel.runtimes.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.jboss.tools.bpel.runtimes.ui.view.server.content">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+ <extension
+ point="org.jboss.ide.eclipse.as.core.publishers">
+ <publisher
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.module.JBTBPELPublisher"
+ priority="10"
+ zipDelegate="false">
+ </publisher>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.core.runtimeTypes">
+ <runtimeType
+ id="org.jboss.riftsaw.runtime.rt"
+ name="JBoss Riftsaw 2.x"
+ description="JBoss Riftsaw 2.x WS-BPEL execution engine - Runtime"
+ vendor="JBoss Community"
+ version="2.2"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.RiftsawServerRuntime">
+ <moduleType
+ types="bpel.module"
+ versions="1.1, 2.0"/>
+ </runtimeType>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.core.serverTypes">
+ <serverType
+ runtime="true"
+ class="org.eclipse.jst.server.generic.core.internal.GenericServer"
+ id="org.jboss.riftsaw.runtime.st"
+ initialState="stopped"
+ supportsRemoteHosts="true"
+ runtimeTypeId="org.jboss.riftsaw.runtime.rt"
+ description="JBoss Riftsaw 2.x WS-BPEL execution engine - Server"
+ launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
+ behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
+ name="JBoss Riftsaw 2.x Server"
+ hasConfiguration="false"
+ startTimeout="480000"
+ stopTimeout="60000"
+ launchModes="run, debug"
+ startBeforePublish="true">
+ </serverType>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/riftsaw.gif"
+ typeIds="org.jboss.riftsaw.runtime.rt"/>
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/riftsaw.gif"
+ typeIds="org.jboss.riftsaw.runtime.st"/>
+ </extension>
+
+<!-- -->
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type
+ id="org.jboss.riftsaw.runtime.rt"/>
+
+ <runtime-component-version
+ type="org.jboss.riftsaw.runtime.rt"
+ version="2.0"/>
+
+ <adapter>
+ <runtime-component
+ id="org.jboss.riftsaw.runtime.rt"/>
+ <factory
+ class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory"/>
+ <type
+ class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
+ </adapter>
+
+ <supported>
+ <runtime-component
+ id="org.jboss.riftsaw.runtime.rt"
+ version="2.0"/>
+ <facet
+ id="bpel.facet.core"
+ version="2.0"/>
+ </supported>
+ </extension>
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image
+ runtime-component-type="org.jboss.riftsaw.runtime.rt"
+ path="icons/obj16/riftsaw.gif"/>
+ </extension>
+
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <adapter>
+ <runtime-component id="org.jboss.riftsaw.runtime.rt"/>
+ <factory class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
+ <type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
+ </adapter>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
+ <runtimeFacetMapping
+ runtimeTypeId="org.jboss.riftsaw.runtime.rt"
+ runtime-component="org.jboss.riftsaw.runtime.rt"
+ version="2.0"/>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.generic.core.serverdefinition">
+ <serverdefinition id="org.jboss.riftsaw.runtime.rt" definitionfile="definition/riftsaw2x.xml">
+ </serverdefinition>
+ </extension>
+ <extension point="org.eclipse.wst.server.ui.wizardFragments">
+ <fragment
+ id="org.eclipse.jst.server.generic.runtime"
+ typeIds="org.jboss.riftsaw.runtime.rt"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerRuntimeWizardFragment"/>
+ <fragment
+ id="org.eclipse.jst.server.generic.server"
+ typeIds="org.jboss.riftsaw.runtime.st"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment"/>
+ </extension>
+
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <supported>
+ <runtime-component id="org.jboss.riftsaw.runtime.rt" version="2.2"/>
+ <facet id="bpel.facet.core" version="1.1,2.0"/>
+ </supported>
+ </extension>
+
+</plugin>
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,13 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
+ <artifactId>org.eclipse.bpel.jboss.riftsaw.runtime</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,17 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jst.server.generic.core.internal.GenericServerRuntime;
+import org.eclipse.bpel.runtimes.IBPELRuntimeDelegate;
+// import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
+
+public class RiftsawServerRuntime extends GenericServerRuntime implements IBPELRuntimeDelegate {
+
+ public String getPort()
+ {
+ Map m = getAttribute("generic_server_attributes", new HashMap());
+ return (String)m.get("port");
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RuntimesPlugin.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RuntimesPlugin.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RuntimesPlugin.java 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * 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.bpel.runtimes.IRuntimesUIConstants;
+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);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELModuleFactoryDelegate.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELModuleFactoryDelegate.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELModuleFactoryDelegate.java 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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 org.eclipse.bpel.runtimes.module.BPELModuleFactoryDelegate;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+import org.eclipse.wst.server.core.model.ModuleFactoryDelegate;
+
+/**
+ * The purpose of this class is to redirect requests to locate an
+ * already-migrated project module. For example, if a project
+ * previously was of module-type jbt.bpel.module and has since been
+ * migrated properly, old servers may still search for a jbt.bpel.module
+ * module ID.
+ *
+ * This factory does not create any modules, but rather only returns
+ * new modules from the eclipse bpel factory when the server is requesting
+ * a legacy id.
+ */
+public class JBTBPELModuleFactoryDelegate extends ModuleFactoryDelegate {
+ public static final String FACTORY_ID = "org.eclipse.bpel.jboss.riftsaw.runtime.module.moduleFactory";
+ public static final String LEGACY_MODULE_TYPE = "jbt.bpel.module";
+
+ public JBTBPELModuleFactoryDelegate() {
+ super();
+ }
+
+ @Override
+ public ModuleDelegate getModuleDelegate(IModule module) {
+ return BPELModuleFactoryDelegate.factoryInstance().getModuleDelegate(module);
+ }
+
+ @Override
+ public IModule[] getModules() {
+ return new IModule[]{};
+ }
+
+ @Override
+ public IModule findModule(String id) {
+ return BPELModuleFactoryDelegate.factoryInstance().findModule(id);
+ }
+}
\ No newline at end of file
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELModuleFactoryDelegate.java
___________________________________________________________________
Name: svn:executable
+ *
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELPublisher.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELPublisher.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/module/JBTBPELPublisher.java 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,309 @@
+/*******************************************************************************
+ * 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.runtimes.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.osgi.util.NLS;
+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.Messages;
+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(a)jboss.com
+ *
+ */
+public class JBTBPELPublisher implements IJBossServerPublisher {
+ private IServer server;
+ private int publishState = IServer.PUBLISH_STATE_INCREMENTAL;
+ public JBTBPELPublisher() {
+ }
+
+ 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 ) {
+ String typeId =module[module.length-1].getModuleType().getId();
+ if( typeId.equals(IBPELModuleFacetConstants.BPEL20_MODULE_TYPE))
+ return true;
+ if( typeId.equals(JBTBPELModuleFactoryDelegate.LEGACY_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){
+ 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;
+ }
+ 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);
+ 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(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;
+ }
+ public IPath getOutputFilePath() {
+ return deployPath;
+ }
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleActionProvider.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleActionProvider.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleActionProvider.java 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,103 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.module.JBTBPELPublisher;
+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;
+ JBTBPELPublisher.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();
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleContentProvider.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleContentProvider.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleContentProvider.java 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,78 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.module.JBTBPELModuleFactoryDelegate;
+import org.eclipse.bpel.jboss.riftsaw.runtime.module.JBTBPELPublisher;
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+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.BPEL20_MODULE_TYPE) || typeId.equals(JBTBPELModuleFactoryDelegate.LEGACY_MODULE_TYPE))) {
+ // we have a bpel module deployed to a server. List the children
+ String[] versions = JBTBPELPublisher.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
+
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleLabelProvider.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleLabelProvider.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/ui/view/server/BPELModuleLabelProvider.java 2010-11-15 18:04:29 UTC (rev 26573)
@@ -0,0 +1,22 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server;
+
+import org.eclipse.bpel.jboss.riftsaw.runtime.RuntimesPlugin;
+import org.eclipse.bpel.jboss.riftsaw.runtime.ui.view.server.BPELModuleContentProvider.BPELVersionDeployment;
+import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
+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;
+ }
+}
15 years, 5 months
JBoss Tools SVN: r26572 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-15 12:47:54 -0500 (Mon, 15 Nov 2010)
New Revision: 26572
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
Log:
[JBIDE-7599] corrected refresh handler activation to remove conflicts between the 3 refresh handlers (cloud-, image-, instance-)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-15 17:34:15 UTC (rev 26571)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-15 17:47:54 UTC (rev 26572)
@@ -1,5 +1,8 @@
2010-11-15 André Dietisheim <adietish(a)redhat.com>
+ * plugin.xml:
+ [JBIDE-7599] corrected refresh handler activation to remove conflicts between the 3 refresh handlers
+ (cloud-, image-, instance-)
* src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java (.modifyText):
(validateDirectory):
(createControl):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-11-15 17:34:15 UTC (rev 26571)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-11-15 17:47:54 UTC (rev 26572)
@@ -154,13 +154,22 @@
<activeWhen>
<with
variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
- </instanceof>
- </iterate>
+ <and>
+ <count value="+" />
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </and>
</with>
</activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count value="+" />
+ </with>
+ </enabledWhen>
</handler>
<handler
class="org.jboss.tools.deltacloud.ui.commands.RefreshInstancesHandler"
@@ -168,13 +177,22 @@
<activeWhen>
<with
variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.core.DeltaCloudInstance">
- </instanceof>
- </iterate>
+ <and>
+ <count value="+" />
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.core.DeltaCloudInstance">
+ </instanceof>
+ </iterate>
+ </and>
</with>
</activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count value="+" />
+ </with>
+ </enabledWhen>
</handler>
<handler
class="org.jboss.tools.deltacloud.ui.commands.RefreshImagesHandler"
@@ -182,13 +200,22 @@
<activeWhen>
<with
variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.core.DeltaCloudImage">
- </instanceof>
- </iterate>
+ <and>
+ <count value="+" />
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.core.DeltaCloudImage">
+ </instanceof>
+ </iterate>
+ </and>
</with>
</activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count value="+" />
+ </with>
+ </enabledWhen>
</handler>
</extension>
<extension
15 years, 5 months
JBoss Tools SVN: r26571 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-15 12:34:15 -0500 (Mon, 15 Nov 2010)
New Revision: 26571
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshImagesHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshInstancesHandler.java
Log:
[JBIDE-7599] added background jobs
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java 2010-11-15 17:30:22 UTC (rev 26570)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java 2010-11-15 17:34:15 UTC (rev 26571)
@@ -14,16 +14,15 @@
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
import org.jboss.tools.internal.deltacloud.ui.utils.CloudViewElementUtils;
@@ -39,38 +38,35 @@
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection) {
CloudViewElement cloudViewElement = UIUtils.getFirstAdaptedElement(selection, CloudViewElement.class);
- try {
- refresh(cloudViewElement);
- } catch (Exception e) {
- IStatus status = StatusFactory.getInstance(
- IStatus.ERROR,
- Activator.PLUGIN_ID,
- e.getMessage(),
- e);
- // TODO: internationalize strings
- ErrorDialog.openError(Display.getDefault().getActiveShell(),
- "Error",
- "Cloud not get load children for " + getCloudName(cloudViewElement), status);
- }
+ refresh(cloudViewElement);
}
return Status.OK_STATUS;
}
- private String getCloudName(CloudViewElement cloudViewElement) {
- DeltaCloud cloud = CloudViewElementUtils.getCloud(cloudViewElement);
- if (cloud == null) {
- return "";
- } else {
- return cloud.getName();
- }
- }
-
- private void refresh(CloudViewElement cloudViewElement) throws DeltaCloudException {
+ private void refresh(final CloudViewElement cloudViewElement) {
if (cloudViewElement != null) {
- DeltaCloud cloud = CloudViewElementUtils.getCloud(cloudViewElement);
+ final DeltaCloud cloud = CloudViewElementUtils.getCloud(cloudViewElement);
if (cloud != null) {
- cloud.loadChildren();
+ // TODO: internationalize strings
+ new Job("Refreshing images and instances on " + cloud.getName()) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ cloud.loadChildren();
+ } catch (Exception e) {
+ IStatus status = StatusFactory.getInstance(
+ IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ e.getMessage(),
+ e);
+ // TODO: internationalize strings
+ return status;
+ }
+ return Status.OK_STATUS;
+ }
+ }.schedule();
}
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshImagesHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshImagesHandler.java 2010-11-15 17:30:22 UTC (rev 26570)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshImagesHandler.java 2010-11-15 17:34:15 UTC (rev 26571)
@@ -14,16 +14,15 @@
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
@@ -38,29 +37,36 @@
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection) {
DeltaCloudImage deltaCloudImage = UIUtils.getFirstAdaptedElement(selection, DeltaCloudImage.class);
- try {
- refresh(deltaCloudImage);
- } catch (Exception e) {
- IStatus status = StatusFactory.getInstance(
- IStatus.ERROR,
- Activator.PLUGIN_ID,
- e.getMessage(),
- e);
- // TODO: internationalize strings
- ErrorDialog.openError(Display.getDefault().getActiveShell(),
- "Error",
- "Cloud not get load children for " + deltaCloudImage.getDeltaCloud().getName(), status);
- }
+ refresh(deltaCloudImage);
}
return Status.OK_STATUS;
}
- private void refresh(DeltaCloudImage deltaCloudImage) throws DeltaCloudException {
+ private void refresh(DeltaCloudImage deltaCloudImage) {
if (deltaCloudImage != null) {
- DeltaCloud cloud = deltaCloudImage.getDeltaCloud();
+ final DeltaCloud cloud = deltaCloudImage.getDeltaCloud();
if (cloud != null) {
- cloud.loadChildren();
+ // TODO: internationalize strings
+ new Job("Refreshing images on cloud " + cloud.getName()) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ cloud.loadChildren();
+ return Status.OK_STATUS;
+
+ } catch (Exception e) {
+ IStatus status = StatusFactory.getInstance(
+ IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ e.getMessage(),
+ e);
+ return status;
+ }
+
+ }
+ }.schedule();
}
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshInstancesHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshInstancesHandler.java 2010-11-15 17:30:22 UTC (rev 26570)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshInstancesHandler.java 2010-11-15 17:34:15 UTC (rev 26571)
@@ -14,16 +14,15 @@
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
@@ -38,30 +37,37 @@
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection) {
DeltaCloudInstance deltaCloudInstance = UIUtils.getFirstAdaptedElement(selection, DeltaCloudInstance.class);
- try {
- refresh(deltaCloudInstance);
- } catch (Exception e) {
- IStatus status = StatusFactory.getInstance(
- IStatus.ERROR,
- Activator.PLUGIN_ID,
- e.getMessage(),
- e);
- // TODO: internationalize strings
- ErrorDialog.openError(Display.getDefault().getActiveShell(),
- "Error",
- "Cloud not get load children for " + deltaCloudInstance.getDeltaCloud().getName(), status);
- }
+ refresh(deltaCloudInstance);
}
return Status.OK_STATUS;
}
- private void refresh(DeltaCloudInstance deltaCloudInstance) throws DeltaCloudException {
+ private void refresh(final DeltaCloudInstance deltaCloudInstance) {
+ // TODO: internationalize strings
if (deltaCloudInstance != null) {
- DeltaCloud cloud = deltaCloudInstance.getDeltaCloud();
+ final DeltaCloud cloud = deltaCloudInstance.getDeltaCloud();
if (cloud != null) {
- cloud.loadChildren();
+ new Job("Refreshing instances on cloud " + cloud.getName()) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ cloud.loadChildren();
+ return Status.OK_STATUS;
+ } catch (Exception e) {
+ IStatus status = StatusFactory.getInstance(
+ IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ e.getMessage(),
+ e);
+ return status;
+ }
+ }
+
+ }.schedule();
}
}
+
}
}
15 years, 5 months
JBoss Tools SVN: r26570 - trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-11-15 12:30:22 -0500 (Mon, 15 Nov 2010)
New Revision: 26570
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
Log:
JBIDE-7600
org.jboss.tools.seam.ui.test.ca.SeamELContentAssistTest causes CoreException to be thrown
Issue is fixed
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2010-11-15 17:29:32 UTC (rev 26569)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2010-11-15 17:30:22 UTC (rev 26570)
@@ -37,7 +37,8 @@
org.eclipse.jst.common.project.facet.core;bundle-version="1.4.100",
org.eclipse.jst.jsf.core;bundle-version="1.3.0",
org.eclipse.wst.common.frameworks.ui;bundle-version="1.2.0",
- org.eclipse.jst.standard.schemas
+ org.eclipse.jst.standard.schemas,
+ org.eclipse.jst.jee.ejb;bundle-version="1.0.300"
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.ca,
org.jboss.tools.seam.ui.test.hyperlink,
15 years, 5 months
JBoss Tools SVN: r26569 - in trunk/bpel: plugins and 16 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-11-15 12:29:32 -0500 (Mon, 15 Nov 2010)
New Revision: 26569
Added:
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/GenericBPELPublisher.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IBPELModuleFacetConstants.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IRuntimesUIConstants.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployable.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactUtil.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleArtifact.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleDelegate.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/Messages.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/messages.properties
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java
Removed:
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeServerRuntime.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELModuleFactoryDelegate.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java
Modified:
trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/definition/ode.xml
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/plugin.xml
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java
trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/NewFileWizard.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/WSDLCustomPage.java
trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/.classpath
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/RuntimesPlugin.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELPublisher.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleContentProvider.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleLabelProvider.java
trunk/bpel/plugins/pom.xml
Log:
Reverting changes for JBIDE-6588. I have kept a backup copy of all changes so far (rev 26532) for the entire bpel folder in ~workspace/bbrodt
Modified: trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml
===================================================================
--- trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml 2010-11-15 17:29:32 UTC (rev 26569)
@@ -139,10 +139,4 @@
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.eclipse.bpel.runtimes"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
</feature>
Modified: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF 2010-11-15 17:29:32 UTC (rev 26569)
@@ -14,7 +14,7 @@
org.eclipse.bpel.model;bundle-version="0.5.0",
org.eclipse.jem.util;bundle-version="[2.0.100,3.0.0)",
org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.bpel.runtimes;bundle-version="0.5.0",
+ org.jboss.tools.bpel.runtimes;bundle-version="0.4.0",
org.eclipse.jst.server.generic.ui;bundle-version="[1.0.305,2.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.4.0,3.0.0)",
org.eclipse.bpel.ui;bundle-version="0.5.0",
Modified: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/definition/ode.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/definition/ode.xml 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/definition/ode.xml 2010-11-15 17:29:32 UTC (rev 26569)
@@ -28,7 +28,7 @@
</port>
<module>
- <type>bpel.module</type>
+ <type>jbt.bpel.module</type>
<publishDir>${ode.home}/WEB-INF/processes</publishDir>
<publisherReference>org.eclipse.bpel.apache.ode.runtime.publisher</publisherReference>
</module>
Modified: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/plugin.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/plugin.xml 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/plugin.xml 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,114 +1,114 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension point="org.eclipse.wst.server.core.runtimeTypes">
- <runtimeType
- id="org.eclipse.bpel.apache.ode.runtime.rt"
- name="Apache Ode 1.x Runtime"
- description="Apache's BPEL 2.0 execution engine - Runtime"
- vendor="Apache"
- version="1.0"
- class="org.eclipse.bpel.apache.ode.runtime.OdeServerRuntime">
- <moduleType
- types="bpel.module"
- versions="1.1, 2.0"/>
- </runtimeType>
- </extension>
- <extension point="org.eclipse.wst.server.core.serverTypes">
- <serverType
- runtime="true"
- class="org.eclipse.jst.server.generic.core.internal.GenericServer"
- id="org.eclipse.bpel.apache.ode.runtime.st"
- initialState="stopped"
- supportsRemoteHosts="true"
- runtimeTypeId="org.eclipse.bpel.apache.ode.runtime.rt"
- description="Apache's BPEL 2.0 execution engine - Server"
- launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
- behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
- name="Ode v1.x Server"
- hasConfiguration="false"
- startTimeout="480000"
- stopTimeout="60000"
- launchModes="run, debug"
- startBeforePublish="true">
- </serverType>
- </extension>
- <extension point="org.eclipse.wst.server.ui.serverImages">
- <image
- id="org.eclipse.jst.server.generic.image"
- icon="icons/obj16/ode.gif"
- typeIds="org.eclipse.bpel.apache.ode.runtime.rt"/>
- <image
- id="org.eclipse.jst.server.generic.image"
- icon="icons/obj16/ode.gif"
- typeIds="org.eclipse.bpel.apache.ode.runtime.st"/>
- </extension>
-
- <extension point="org.eclipse.jst.server.generic.core.genericpublisher">
- <genericpublisher
- class="org.eclipse.bpel.apache.ode.runtime.OdeBPELPublisher"
- id="org.eclipse.bpel.apache.ode.runtime.publisher"/>
- </extension>
- <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
- <runtime-component-type
- id="org.eclipse.bpel.apache.ode.runtime.rt"/>
-
- <runtime-component-version
- type="org.eclipse.bpel.apache.ode.runtime.rt"
- version="2.0"/>
-
- <adapter>
- <runtime-component
- id="org.eclipse.bpel.apache.ode.runtime.rt"/>
- <factory
- class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory"/>
- <type
- class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
- </adapter>
-
- <supported>
- <runtime-component
- id="org.eclipse.bpel.apache.ode.runtime.rt"
- version="2.0"/>
- <facet
- id="bpel.facet.core"
- version="2.0"/>
- </supported>
- </extension>
- <extension point="org.eclipse.wst.common.project.facet.ui.images">
- <image
- runtime-component-type="org.eclipse.bpel.apache.ode.runtime.rt"
- path="icons/obj16/ode.gif"/>
- </extension>
-
-
- <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
- <adapter>
- <runtime-component id="org.eclipse.bpel.apache.ode.runtime.rt"/>
- <factory class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
- <type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
- </adapter>
- </extension>
-
- <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
- <runtimeFacetMapping
- runtimeTypeId="org.eclipse.bpel.apache.ode.runtime.rt"
- runtime-component="org.eclipse.bpel.apache.ode.runtime.rt"
- version="2.0"/>
- </extension>
- <extension point="org.eclipse.jst.server.generic.core.serverdefinition">
- <serverdefinition id="org.eclipse.bpel.apache.ode.runtime.rt" definitionfile="definition/ode.xml">
- </serverdefinition>
- </extension>
- <extension point="org.eclipse.wst.server.ui.wizardFragments">
- <fragment
- id="org.eclipse.jst.server.generic.runtime"
- typeIds="org.eclipse.bpel.apache.ode.runtime.rt"
- class="org.eclipse.jst.server.generic.ui.internal.GenericServerRuntimeWizardFragment"/>
- <fragment
- id="org.eclipse.jst.server.generic.server"
- typeIds="org.eclipse.bpel.apache.ode.runtime.st"
- class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment"/>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension point="org.eclipse.wst.server.core.runtimeTypes">
+ <runtimeType
+ id="org.eclipse.bpel.apache.ode.runtime.rt"
+ name="Apache Ode 1.x Runtime"
+ description="Apache's BPEL 2.0 execution engine - Runtime"
+ vendor="Apache"
+ version="1.0"
+ class="org.eclipse.jst.server.generic.core.internal.GenericServerRuntime">
+ <moduleType
+ types="jbt.bpel.module"
+ versions="1.1, 2.0"/>
+ </runtimeType>
+ </extension>
+ <extension point="org.eclipse.wst.server.core.serverTypes">
+ <serverType
+ runtime="true"
+ class="org.eclipse.jst.server.generic.core.internal.GenericServer"
+ id="org.eclipse.bpel.apache.ode.runtime.st"
+ initialState="stopped"
+ supportsRemoteHosts="true"
+ runtimeTypeId="org.eclipse.bpel.apache.ode.runtime.rt"
+ description="Apache's BPEL 2.0 execution engine - Server"
+ launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
+ behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
+ name="Ode v1.x Server"
+ hasConfiguration="false"
+ startTimeout="480000"
+ stopTimeout="60000"
+ launchModes="run, debug"
+ startBeforePublish="true">
+ </serverType>
+ </extension>
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/ode.gif"
+ typeIds="org.eclipse.bpel.apache.ode.runtime.rt"/>
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/ode.gif"
+ typeIds="org.eclipse.bpel.apache.ode.runtime.st"/>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.generic.core.genericpublisher">
+ <genericpublisher
+ class="org.eclipse.bpel.apache.ode.runtime.OdeBPELPublisher"
+ id="org.eclipse.bpel.apache.ode.runtime.publisher"/>
+ </extension>
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type
+ id="org.eclipse.bpel.apache.ode.runtime.rt"/>
+
+ <runtime-component-version
+ type="org.eclipse.bpel.apache.ode.runtime.rt"
+ version="2.0"/>
+
+ <adapter>
+ <runtime-component
+ id="org.eclipse.bpel.apache.ode.runtime.rt"/>
+ <factory
+ class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory"/>
+ <type
+ class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
+ </adapter>
+
+ <supported>
+ <runtime-component
+ id="org.eclipse.bpel.apache.ode.runtime.rt"
+ version="2.0"/>
+ <facet
+ id="jbt.bpel.facet.core"
+ version="2.0"/>
+ </supported>
+ </extension>
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image
+ runtime-component-type="org.eclipse.bpel.apache.ode.runtime.rt"
+ path="icons/obj16/ode.gif"/>
+ </extension>
+
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <adapter>
+ <runtime-component id="org.eclipse.bpel.apache.ode.runtime.rt"/>
+ <factory class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
+ <type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
+ </adapter>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
+ <runtimeFacetMapping
+ runtimeTypeId="org.eclipse.bpel.apache.ode.runtime.rt"
+ runtime-component="org.eclipse.bpel.apache.ode.runtime.rt"
+ version="2.0"/>
+ </extension>
+ <extension point="org.eclipse.jst.server.generic.core.serverdefinition">
+ <serverdefinition id="org.eclipse.bpel.apache.ode.runtime.rt" definitionfile="definition/ode.xml">
+ </serverdefinition>
+ </extension>
+ <extension point="org.eclipse.wst.server.ui.wizardFragments">
+ <fragment
+ id="org.eclipse.jst.server.generic.runtime"
+ typeIds="org.eclipse.bpel.apache.ode.runtime.rt"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerRuntimeWizardFragment"/>
+ <fragment
+ id="org.eclipse.jst.server.generic.server"
+ typeIds="org.eclipse.bpel.apache.ode.runtime.st"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment"/>
+ </extension>
+
+</plugin>
Deleted: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,13 +0,0 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools.bpel.plugins</groupId>
- <artifactId>org.eclipse.bpel.apache.ode.runtime</artifactId>
- <version>0.6.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project>
Copied: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/GenericBPELPublisher.java (from rev 26426, trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/GenericBPELPublisher.java)
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/GenericBPELPublisher.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/GenericBPELPublisher.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * 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.apache.ode.runtime;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.server.generic.core.internal.GenericPublisher;
+import org.eclipse.jst.server.generic.core.internal.GenericServer;
+import org.eclipse.jst.server.generic.servertype.definition.Port;
+import org.eclipse.wst.server.core.IModuleArtifact;
+
+/**
+ * An abstract base class offering some utility methods facilitating the process
+ * of deploying a BPEL process onto a runtime and indicating a publisher of
+ * BPEL processes. This extends the generic server
+ * framework. Implementers of the <code>genericpublishers</code> extension point
+ * wishing to publish BPEL processes onto some runtime, may find it convenient
+ * to sub-class this class.
+ * <p>
+ * The minimum requirement on sub-classes is to provide an implementation of
+ * <code>GenericPublisher{@link #publish(IModuleArtifact[], IProgressMonitor)}</code>,
+ * <code>GenericPublisher{@link #unpublish(IProgressMonitor)}</code> and of
+ * <code></code>
+ * <p>
+ * Clients should not instantiate this class or its sub-classes as they will be
+ * instantiated by the WTP server framework. Clients can make use of any
+ * convenience methods contained in this class (all methods defined directly
+ * on <code>GenericBPELPublisher</code>).
+ *
+ *
+ * @author Bruno Wassermann, written Jun 8, 2006
+ */
+public abstract class GenericBPELPublisher extends GenericPublisher {
+
+// TODO add utility methods that may be useful to concrete implementations
+
+ /**
+ * Displays engine-specific validation warnings and errors in the BPEL
+ * Designer.
+ * <p>
+ * Sub-classes can call this method to provide information
+ * about any problems detected during deployment.
+ */
+ protected final void submitValidationMarkers() {
+ // TODO decide on signature/arguments
+ }
+
+ /**
+ * Provides access to the relevant project in the workspace in order to
+ * store a local copy of a generated deployment archive
+ *
+ * @param deployArchive
+ * @param path should probably be relative from project root and if null
+ * will save archive in project root
+ */
+ protected void storeDeploymentArchive(IFile deployArchive, IPath path) {
+ // TODO figure out whether this is really useful
+ // TODO figure out the signature (should it be a file, what's the best
+ // way to allow specifying an additional path?) - maybe look at some
+ // of the methods in the WTP tutorial.
+ }
+
+ /**
+ * Returns the host part of the server on which module is to be published.
+ * For example, 'localhost'.
+ *
+ * @return <code>String</code> representing host part of server on which
+ * module is to be published. Will return <code>null</code>, if called
+ * before {@link GenericPublisher#initialize()} has been called.
+ */
+ protected String getHost() {
+ return getServer().getServer().getHost();
+ }
+
+ /**
+ * Returns http port defined for the server module is to be published on.
+ * <p>
+ * This replicates {@link GenericServer#getHttpPort()}.
+ *
+ * @return int
+ */
+ protected int getHttpPort() {
+ int port = -1;
+ Iterator pIter = getServer().getServerDefinition().getPort().iterator();
+
+ while (pIter.hasNext()) {
+ Port aPort = (Port) pIter.next();
+
+ if(port == -1) {
+ port = Integer.parseInt(getServer().getServerDefinition().getResolver().resolveProperties(aPort.getNo()));
+ }
+ else if( "http".equals(aPort.getProtocol() ) ) { //$NON-NLS-1$
+ port = Integer.parseInt(aPort.getNo());
+ }
+ }
+ if( port == -1) {
+ port = 8080;
+ }
+ return port;
+ }
+
+ /*
+ * we don't have something like validate in here as we are not the provider
+ * of an extension point, but simply providing some utility methods for
+ * sub-classes to use if they so wish.
+ *
+ * if we had provided our own extension point to do publishing, then
+ * we would probably have specified a validate() method in the abstract base
+ * class so that our framework could call its implementation in extensions.
+ *
+ * If it's just a utility method it should have static methods. Otherwise,
+ * allow it to be sub-classed and declare some methods as abstract to
+ * indicate to sub-classes what they need to implement.
+ *
+ * What is true though is that we cannot call such methods automatically as
+ * we are not really offering an extension point.
+ *
+ * TODO clarify explain this point about usage in the class comment! the methods
+ * will not be called automatically as we are not providing an extension
+ * point as initially expected.
+ */
+
+
+}
Modified: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -13,7 +13,7 @@
import java.io.File;
-import org.eclipse.bpel.runtimes.publishers.GenericBPELPublisher;
+import org.eclipse.bpel.apache.ode.runtime.GenericBPELPublisher;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
Deleted: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeServerRuntime.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeServerRuntime.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeServerRuntime.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,16 +0,0 @@
-package org.eclipse.bpel.apache.ode.runtime;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jst.server.generic.core.internal.GenericServerRuntime;
-import org.eclipse.bpel.runtimes.IBPELRuntimeDelegate;
-
-public class OdeServerRuntime extends GenericServerRuntime implements IBPELRuntimeDelegate {
-
- public String getPort()
- {
- Map m = getAttribute("generic_server_attributes", new HashMap());
- return (String)m.get("port");
- }
-}
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF 2010-11-15 17:29:32 UTC (rev 26569)
@@ -31,9 +31,7 @@
org.eclipse.ui.console;bundle-version="3.5.0",
org.eclipse.wst.common.modulecore,
org.eclipse.wst.common.emfworkbench.integration,
- org.eclipse.jem.util,
- org.eclipse.wst.common.project.facet.core,
- org.eclipse.wst.server.core
+ org.eclipse.jem.util
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.bpel.ui,
org.eclipse.bpel.ui.actions,
@@ -72,7 +70,4 @@
org.eclipse.bpel.ui.util.marker,
org.eclipse.bpel.ui.wizards
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.eclipse.bpel.runtimes,
- org.eclipse.bpel.validator,
- org.eclipse.wst.common.project.facet.core,
- org.eclipse.wst.server.core
+Import-Package: org.eclipse.bpel.validator
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/NewFileWizard.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/NewFileWizard.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/NewFileWizard.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -203,16 +203,6 @@
return true;
}
- public IProject getProject()
- {
- IContainer container = fContainerPage.getResourceContainer();
- if (container == null) {
- container = mContainer;
- }
- if (container!=null)
- return container.getProject();
- return null;
- }
/**
* Return the BPEL files container in which we can generate process from the
* template.
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/WSDLCustomPage.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/WSDLCustomPage.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/WSDLCustomPage.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -3,14 +3,10 @@
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
import org.eclipse.bpel.ui.BPELUIPlugin;
import org.eclipse.bpel.ui.IBPELUIConstants;
import org.eclipse.bpel.ui.Templates;
import org.eclipse.bpel.ui.Templates.Template;
-import org.eclipse.bpel.runtimes.IBPELRuntimeDelegate;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -23,14 +19,6 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
-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.common.project.facet.core.runtime.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
public class WSDLCustomPage extends WizardPage {
@@ -76,34 +64,6 @@
setDescription(Messages.NewFileWizard_WSDLCustomPage_Description);
setImageDescriptor(BPELUIPlugin.INSTANCE
.getImageDescriptor(IBPELUIConstants.ICON_WIZARD_BANNER));
-
-
- // TODO: test code - implement this when we switch over to generic runtime support
- // for deployment to jboss/riftsaw and others...
- try {
- IProject project = ((NewFileWizard)getWizard()).getProject();
- IFacetedProject facetedProject = null;
- facetedProject = ProjectFacetsManager.create(project);
- if (facetedProject != null
- && ProjectFacetsManager.isProjectFacetDefined(IBPELModuleFacetConstants.BPEL20_PROJECT_FACET))
- {
- IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet(IBPELModuleFacetConstants.BPEL20_PROJECT_FACET);
- IRuntime rt = facetedProject.getPrimaryRuntime();
- String id = rt.getProperty("id");
- org.eclipse.wst.server.core.IRuntime rt2 = ServerCore.findRuntime(id);
- IRuntimeType rtt = rt2.getRuntimeType();
- RuntimeDelegate delegate = (RuntimeDelegate) rt2.getAdapter(RuntimeDelegate.class);
- if (delegate instanceof IBPELRuntimeDelegate) {
- // get port, server address and deploy directory
- // to build service name for WSDL
- }
- }
- }
- catch(Exception e)
- {
-
- }
-
}
public void createControl(Composite parent) {
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml 2010-11-15 17:29:32 UTC (rev 26569)
@@ -51,15 +51,15 @@
</description>
</item>
- <item title="Create a deploy.xml file" skip="true">
+ <item title="Create a bpel-deploy.xml file" skip="true">
<description>
- If you want to deploy a BPEL project to JBoss BPEL Runtime, you need to create a deploy.xml file.
+ If you want to deploy a BPEL project to JBoss BPEL Runtime, you need to create a bpel-deploy.xml file.
</description>
- <subitem label="Create a deploy.xml by selecting "File > New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor" from the menu bar.">
+ <subitem label="Create a bpel-deploy.xml by selecting "File > New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor" from the menu bar.">
</subitem>
- <subitem label="On the first page of the "Apache ODE Deployment Descriptor" Wizard choose the "bpelContent" folder of a bpel project in the "BPEL Project" field and enter "deploy.xml" in the "File name" field. Click "Finish" button.">
+ <subitem label="On the first page of the "Apache ODE Deployment Descriptor" Wizard choose the "bpelContent" folder of a bpel project in the "BPEL Project" field and enter "bpel-deploy.xml" in the "File name" field. Click "Finish" button.">
</subitem>
- <subitem label="Double-click the deploy.xml file to open it in ODE Descriptor Deployment Editor. In the "Inbound Interfaces" section, click the "Associated Port" column and in the dropdown box select a BPEL port that is defined in the WSDL file.The Related Service and Binding Used columns should be automatically filled in. Save the deploy.xml file.">
+ <subitem label="Double-click the bpel-deploy.xml file to open it in ODE Descriptor Deployment Editor. In the "Inbound Interfaces" section, click the "Associated Port" column and in the dropdown box select a BPEL port that is defined in the WSDL file.The Related Service and Binding Used columns should be automatically filled in. Save the bpel-deploy.xml file.">
</subitem>
</item>
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/.classpath
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/.classpath 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/.classpath 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF 2010-11-15 17:29:32 UTC (rev 26569)
@@ -27,15 +27,14 @@
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,
- org.jboss.ide.eclipse.as.ui;bundle-version="2.2.0",
- org.jboss.ide.eclipse.as.wtp.ui;bundle-version="2.2.0",
- org.eclipse.bpel.runtimes;bundle-version="0.5.0",
- org.jboss.tools.jmx.core;bundle-version="1.2.0"
+ org.eclipse.ui.navigator
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.bpel.runtimes,
- org.jboss.tools.bpel.runtimes.module
+ org.jboss.tools.bpel.runtimes.facets,
+ org.jboss.tools.bpel.runtimes.module,
+ org.jboss.tools.bpel.runtimes.ui.wizards
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml 2010-11-15 17:29:32 UTC (rev 26569)
@@ -13,7 +13,31 @@
<!--=========================================================================-->
<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.jboss.tools.bpel.runtimes.ui.wizards.NewBPELProjectWizard"
+ id="org.jboss.tools.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.jboss.tools.bpel.runtimes.ui.wizards.BPELFacetInstallPage"/>
+ </wizard-pages>
+ </extension>
+
+
<!--=========================================================================-->
<!-- BPEL ModuleType -->
<!--=========================================================================-->
@@ -36,6 +60,67 @@
</extension>
<!--=========================================================================-->
+<!-- BPEL Facet -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.common.project.facet.core.facets">
+
+ <project-facet id="jbt.bpel.facet.core">
+ <label>%BPEL_CORE_FACET_LABEL</label>
+ <description>%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>
+
+ <action facet="jbt.bpel.facet.core" version="2.0" type="INSTALL" id="bpel.facet.core.install">
+ <delegate class="org.jboss.tools.bpel.runtimes.facets.BPELCoreFacetInstallDelegate"/>
+ <config-factory class="org.jboss.tools.bpel.runtimes.facets.BPELFacetInstallDataModelProvider"/>
+ </action>
+
+
+ <category id="bpel.category">
+ <label>%BPEL_FACET_CATEGORY_LABEL</label>
+ <description>%bpelCoreFacetDescription</description>
+ </category>
+
+ <template id="jbt.template.bpel.core">
+ <label>%BPEL_FACET_TEMPLATE_LABEL</label>
+ <fixed facet="jbt.bpel.facet.core"/>
+ </template>
+
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Virtual Component -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.common.modulecore.componentimpl">
+ <componentimpl
+ typeID="jbt.bpel.facet.core"
+ class="org.jboss.tools.bpel.runtimes.facets.BPELVirtualComponent">
+ </componentimpl>
+ </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 Module Factory -->
<!--=========================================================================-->
@@ -43,21 +128,66 @@
point="org.eclipse.wst.server.core.moduleFactories">
<moduleFactory
projects="true"
- class="org.jboss.tools.bpel.runtimes.module.JBTBPELModuleFactoryDelegate"
+ class="org.jboss.tools.bpel.runtimes.module.BPELModuleFactoryDelegate"
id="org.jboss.tools.bpel.runtimes.module.moduleFactory">
<moduleType
versions="1.1, 2.0"
types="jbt.bpel.module">
</moduleType>
- <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.jboss.tools.bpel.runtimes.module.artifactAdapter1"
+ class="org.jboss.tools.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ <moduleArtifactAdapter
+ id="org.jboss.tools.bpel.runtimes.module.artifactAdapter2"
+ class="org.jboss.tools.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.jboss.tools.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IProject">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ <factory
+ class="org.jboss.tools.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IFile">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ </extension>
+ <extension
+ point="org.jboss.ide.eclipse.as.core.publishers">
+ <publisher
+ class="org.jboss.tools.bpel.runtimes.module.JBTBPELPublisher"
+ 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 -->
@@ -133,33 +263,5 @@
</includes>
</viewerContentBinding>
</extension>
- <extension
- point="org.jboss.ide.eclipse.as.core.publishers">
- <publisher
- class="org.jboss.tools.bpel.runtimes.module.JBTBPELPublisher"
- priority="10"
- zipDelegate="false">
- </publisher>
- </extension>
-
- <extension
- point="org.eclipse.wst.common.project.facet.core.runtimes">
- <supported>
- <runtime-component id="org.jboss.ide.eclipse.as.runtime.component" version="4.2"/>
- <facet id="bpel.facet.core" version="1.1,2.0"/>
- </supported>
- <supported>
- <runtime-component id="org.jboss.ide.eclipse.as.runtime.component" version="5.0"/>
- <facet id="bpel.facet.core" version="1.1,2.0"/>
- </supported>
- <supported>
- <runtime-component id="org.jboss.ide.eclipse.as.runtime.component" version="5.1"/>
- <facet id="bpel.facet.core" version="1.1,2.0"/>
- </supported>
- <supported>
- <runtime-component id="org.jboss.ide.eclipse.as.runtime.component" version="6.0"/>
- <facet id="bpel.facet.core" version="1.1,2.0"/>
- </supported>
- </extension>
-
+
</plugin>
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IBPELModuleFacetConstants.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IBPELModuleFacetConstants.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IBPELModuleFacetConstants.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IBPELModuleFacetConstants.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -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.jboss.tools.bpel.runtimes;
+
+/**
+ *
+ *
+ * @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
+ public final static String BPEL_PROJECT_FACET = "jbt.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$
+}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IRuntimesUIConstants.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IRuntimesUIConstants.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IRuntimesUIConstants.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IRuntimesUIConstants.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -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.jboss.tools.bpel.runtimes;
+
+/**
+ * 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
+ */
+
+}
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/RuntimesPlugin.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/RuntimesPlugin.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/RuntimesPlugin.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -13,7 +13,6 @@
import java.net.MalformedURLException;
import java.net.URL;
-import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets)
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * 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.jboss.tools.bpel.runtimes.facets;
-
-import java.util.HashMap;
-import java.util.Map;
-
-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;
-import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
-
-/**
- * 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
- IFolder bpelContent = proj.getFolder(contentRoot);
- 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);
- }
- }
- }
-
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * 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.jboss.tools.bpel.runtimes.facets;
+
+import java.util.HashMap;
+import java.util.Map;
+
+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;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
+
+/**
+ * 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
+ IFolder bpelContent = proj.getFolder(contentRoot);
+ 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);
+ }
+ }
+ }
+
+}
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,29 +0,0 @@
-package org.jboss.tools.bpel.runtimes.facets;
-
-import java.util.Set;
-
-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;
-import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
-
-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.BPEL_PROJECT_FACET;
- }
- return super.getDefaultProperty(propertyName);
- }
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,29 @@
+package org.jboss.tools.bpel.runtimes.facets;
+
+import java.util.Set;
+
+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;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
+
+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.BPEL_PROJECT_FACET;
+ }
+ return super.getDefaultProperty(propertyName);
+ }
+}
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,7 +0,0 @@
-package org.jboss.tools.bpel.runtimes.facets;
-
-import org.jboss.ide.eclipse.as.wtp.core.vcf.JBTVirtualComponent;
-
-public class BPELVirtualComponent extends JBTVirtualComponent {
-
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/facets/BPELVirtualComponent.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,7 @@
+package org.jboss.tools.bpel.runtimes.facets;
+
+import org.jboss.ide.eclipse.as.wtp.core.vcf.JBTVirtualComponent;
+
+public class BPELVirtualComponent extends JBTVirtualComponent {
+
+}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployable.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployable.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployable.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployable.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,37 @@
+package org.jboss.tools.bpel.runtimes.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();
+ }
+}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -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.jboss.tools.bpel.runtimes.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};
+ }
+
+}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactUtil.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactUtil.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactUtil.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactUtil.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * 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.jboss.tools.bpel.runtimes.module;
+
+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;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
+
+/**
+ * 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);
+ if (facetedProject != null
+ && ProjectFacetsManager.isProjectFacetDefined(IBPELModuleFacetConstants.BPEL_PROJECT_FACET))
+ {
+ IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet(IBPELModuleFacetConstants.BPEL_PROJECT_FACET);
+
+ return facetedProject.getInstalledVersion(projectFacet).getVersionString();
+ }
+ } catch (Exception e) {
+ Logger.getLogger().write(e);
+ }
+ return IBPELModuleFacetConstants.BPEL20_VERSION;
+ }
+}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleArtifact.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleArtifact.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleArtifact.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleArtifact.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -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.jboss.tools.bpel.runtimes.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 + "]";
+ }
+
+}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleDelegate.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleDelegate.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleDelegate.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleDelegate.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -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.jboss.tools.bpel.runtimes.module;
+
+import java.util.ArrayList;
+import java.util.List;
+
+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;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
+import org.jboss.tools.bpel.runtimes.RuntimesPlugin;
+
+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;
+ }
+}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * 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.jboss.tools.bpel.runtimes.module;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+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;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
+
+public class BPELModuleFactoryDelegate extends ProjectModuleFactoryDelegate implements IResourceChangeListener {
+ protected Map <IModule, FlatComponentDeployable> moduleDelegates = new HashMap<IModule, FlatComponentDeployable>(5);
+
+ public static final String FACTORY_ID = "org.jboss.tools.bpel.runtimes.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) {
+ return FacetedProjectUtilities.isProjectOfType(p, IBPELModuleFacetConstants.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
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELModuleFactoryDelegate.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELModuleFactoryDelegate.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELModuleFactoryDelegate.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * 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.jboss.tools.bpel.runtimes.module;
-
-import org.eclipse.bpel.runtimes.module.BPELModuleFactoryDelegate;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.ModuleDelegate;
-import org.eclipse.wst.server.core.model.ModuleFactoryDelegate;
-
-/**
- * The purpose of this class is to redirect requests to locate an
- * already-migrated project module. For example, if a project
- * previously was of module-type jbt.bpel.module and has since been
- * migrated properly, old servers may still search for a jbt.bpel.module
- * module ID.
- *
- * This factory does not create any modules, but rather only returns
- * new modules from the eclipse bpel factory when the server is requesting
- * a legacy id.
- */
-public class JBTBPELModuleFactoryDelegate extends ModuleFactoryDelegate {
- public static final String FACTORY_ID = "org.jboss.tools.bpel.runtimes.module.moduleFactory";
- public static final String LEGACY_MODULE_TYPE = "jbt.bpel.module";
-
- public JBTBPELModuleFactoryDelegate() {
- super();
- }
-
- @Override
- public ModuleDelegate getModuleDelegate(IModule module) {
- return BPELModuleFactoryDelegate.factoryInstance().getModuleDelegate(module);
- }
-
- @Override
- public IModule[] getModules() {
- return new IModule[]{};
- }
-
- @Override
- public IModule findModule(String id) {
- return BPELModuleFactoryDelegate.factoryInstance().findModule(id);
- }
-}
\ No newline at end of file
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELPublisher.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELPublisher.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELPublisher.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -20,7 +20,6 @@
import java.util.Calendar;
import java.util.Iterator;
-import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -48,6 +47,7 @@
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.bpel.runtimes.IBPELModuleFacetConstants;
import org.jboss.tools.jmx.core.IMemento;
import org.jboss.tools.jmx.core.util.XMLMemento;
@@ -70,13 +70,9 @@
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 ) {
- String typeId =module[module.length-1].getModuleType().getId();
- if( typeId.equals(IBPELModuleFacetConstants.BPEL20_MODULE_TYPE))
- return true;
- if( typeId.equals(JBTBPELModuleFactoryDelegate.LEGACY_MODULE_TYPE))
- return true;
- }
+ && module[module.length-1] != null
+ && module[module.length-1].getModuleType().getId().equals(IBPELModuleFacetConstants.BPEL_MODULE_TYPE))
+ return true;
return false;
}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/Messages.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/Messages.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/Messages.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/Messages.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.jboss.tools.bpel.runtimes.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.jboss.tools.bpel.runtimes.module.messages"; //$NON-NLS-1$
+
+ private Messages() {
+ }
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // module validation
+ public static String InvalidFileExtension;
+}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/messages.properties (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/messages.properties)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/messages.properties (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/messages.properties 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1 @@
+InvalidFileExtension=BPEL module file resource must end with bpel file extension.
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleContentProvider.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleContentProvider.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleContentProvider.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,13 +1,12 @@
package org.jboss.tools.bpel.runtimes.ui.view.server;
-import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
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;
-import org.jboss.tools.bpel.runtimes.module.JBTBPELModuleFactoryDelegate;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
import org.jboss.tools.bpel.runtimes.module.JBTBPELPublisher;
public class BPELModuleContentProvider implements ITreeContentProvider {
@@ -21,7 +20,7 @@
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.BPEL20_MODULE_TYPE) || typeId.equals(JBTBPELModuleFactoryDelegate.LEGACY_MODULE_TYPE))) {
+ 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 = JBTBPELPublisher.getDeployedPathsFromDescriptor(s, mod.getProject());
return wrap((ModuleServer)parentElement, versions);
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleLabelProvider.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleLabelProvider.java 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleLabelProvider.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,9 +1,9 @@
package org.jboss.tools.bpel.runtimes.ui.view.server;
-import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.bpel.runtimes.IRuntimesUIConstants;
import org.jboss.tools.bpel.runtimes.RuntimesPlugin;
import org.jboss.tools.bpel.runtimes.ui.view.server.BPELModuleContentProvider.BPELVersionDeployment;
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards)
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,46 +0,0 @@
-package org.jboss.tools.bpel.runtimes.ui.wizards;
-
-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;
-import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
-
-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;
- }
-
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,46 @@
+package org.jboss.tools.bpel.runtimes.ui.wizards;
+
+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;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
+
+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;
+ }
+
+}
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,30 +0,0 @@
-package org.jboss.tools.bpel.runtimes.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");
- }
-
-
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/BPELFacetProjectCreationDataModelProvider.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,30 @@
+package org.jboss.tools.bpel.runtimes.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");
+ }
+
+
+}
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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.jboss.tools.bpel.runtimes.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.jboss.tools.bpel.runtimes.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);
- }
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/Messages.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -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.jboss.tools.bpel.runtimes.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.jboss.tools.bpel.runtimes.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);
+ }
+}
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * 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.jboss.tools.bpel.runtimes.ui.wizards;
-
-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;
-import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
-import org.jboss.tools.bpel.runtimes.IRuntimesUIConstants;
-import org.jboss.tools.bpel.runtimes.RuntimesPlugin;
-
-/**
- * <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$
- }
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * 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.jboss.tools.bpel.runtimes.ui.wizards;
+
+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;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
+import org.jboss.tools.bpel.runtimes.IRuntimesUIConstants;
+import org.jboss.tools.bpel.runtimes.RuntimesPlugin;
+
+/**
+ * <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$
+ }
+}
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * 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.jboss.tools.bpel.runtimes.ui.wizards;
-
-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;
-import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
-import org.jboss.tools.bpel.runtimes.IRuntimesUIConstants;
-import org.jboss.tools.bpel.runtimes.RuntimesPlugin;
-
-/**
- * <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.jboss.tools.bpel.runtimes.ui.wizards.Messages.NewProjectWizard_1);
- setDescription(org.jboss.tools.bpel.runtimes.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.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;
- }
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -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.jboss.tools.bpel.runtimes.ui.wizards;
+
+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;
+import org.jboss.tools.bpel.runtimes.IBPELModuleFacetConstants;
+import org.jboss.tools.bpel.runtimes.IRuntimesUIConstants;
+import org.jboss.tools.bpel.runtimes.RuntimesPlugin;
+
+/**
+ * <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.jboss.tools.bpel.runtimes.ui.wizards.Messages.NewProjectWizard_1);
+ setDescription(org.jboss.tools.bpel.runtimes.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.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;
+ }
+}
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,2 +0,0 @@
-NewProjectWizard_1=New BPEL Project
-NewProjectWizardPage1_1=Create a new BPEL 2.0 project.
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/messages.properties 2010-11-15 17:29:32 UTC (rev 26569)
@@ -0,0 +1,2 @@
+NewProjectWizard_1=New BPEL Project
+NewProjectWizardPage1_1=Create a new BPEL 2.0 project.
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils)
Deleted: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java 2010-11-10 18:59:13 UTC (rev 26426)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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.jboss.tools.bpel.runtimes.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;
- }
-}
Copied: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java (from rev 26426, trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java)
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/utils/BPELModelUtils.java 2010-11-15 17:29:32 UTC (rev 26569)
@@ -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.jboss.tools.bpel.runtimes.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;
+ }
+}
Modified: trunk/bpel/plugins/pom.xml
===================================================================
--- trunk/bpel/plugins/pom.xml 2010-11-15 17:24:28 UTC (rev 26568)
+++ trunk/bpel/plugins/pom.xml 2010-11-15 17:29:32 UTC (rev 26569)
@@ -18,7 +18,6 @@
<module>org.eclipse.bpel.xpath10</module>
<module>org.jboss.tools.bpel.cheatsheet</module>
<module>org.jboss.tools.bpel.runtimes</module>
- <module>org.eclipse.bpel.runtimes</module>
</modules>
</project>
15 years, 5 months
JBoss Tools SVN: r26568 - workspace/bbrodt.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-11-15 12:24:28 -0500 (Mon, 15 Nov 2010)
New Revision: 26568
Added:
workspace/bbrodt/bpel/
Log:
copy of entire bpel folder with current changes for JBIDE-6588
Copied: workspace/bbrodt/bpel (from rev 26567, trunk/bpel)
15 years, 5 months