JBoss Tools SVN: r26436 - trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-11-10 15:33:40 -0500 (Wed, 10 Nov 2010)
New Revision: 26436
Modified:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ExternalizeCommandTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7489 : org.jboss.tools.jst.jsp.test.ca.ExternalizeCommandTest failure
- changed test to fire selection actions
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ExternalizeCommandTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ExternalizeCommandTest.java 2010-11-10 20:06:53 UTC (rev 26435)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ExternalizeCommandTest.java 2010-11-10 20:33:40 UTC (rev 26436)
@@ -18,6 +18,7 @@
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.TestProjectProvider;
@@ -54,22 +55,28 @@
*/
public void testExternalizeCommand(){
IEditorPart editorPart = WorkbenchUtils.openEditor(project.getName()+"/WebContent/pages/extCommandTest.xhtml"); //$NON-NLS-1$
- if(editorPart instanceof JSPMultiPageEditor){
- JSPMultiPageEditor jspMultiPageEditor= (JSPMultiPageEditor) editorPart;
- StyledText textWidget = jspMultiPageEditor.getSourceEditor().getTextViewer().getTextWidget();
- textWidget.setCaretOffset(0);
- assertEquals("Ext command should be disabled with current selection",false,externalizeCommand.isEnabled()); //$NON-NLS-1$
- textWidget.setCaretOffset(2);
- assertEquals("Ext command should be disabled with current selection",false,externalizeCommand.isEnabled()); //$NON-NLS-1$
- textWidget.setCaretOffset(15);
- assertEquals("Ext command should be enabled with current selection",true,externalizeCommand.isEnabled()); //$NON-NLS-1$
- textWidget.setCaretOffset(2);
- assertEquals("Ext command should be disabled with current selection",false,externalizeCommand.isEnabled()); //$NON-NLS-1$
- TestUtil.closeAllEditors();
- assertEquals("Ext command should be disabled without opened editor",false,externalizeCommand.isEnabled()); //$NON-NLS-1$
- }else{
- fail("Should be opened JSPMultiPage Editor"); //$NON-NLS-1$
- }
+ assertTrue("Should be opened JSPMultiPage Editor", editorPart instanceof JSPMultiPageEditor); //$NON-NLS-1$
+
+ JSPMultiPageEditor jspMultiPageEditor= (JSPMultiPageEditor) editorPart;
+ StructuredTextViewer textViewer = jspMultiPageEditor.getSourceEditor().getTextViewer();
+
+ textViewer.setSelectedRange(0, 0);
+ checkExternalizeCommand(false);
+ textViewer.setSelectedRange(2, 0);
+ checkExternalizeCommand(false);
+ textViewer.setSelectedRange(15, 0);
+ checkExternalizeCommand(true);
+ textViewer.setSelectedRange(2, 0);
+ checkExternalizeCommand(false);
+
+ TestUtil.closeAllEditors();
+ checkExternalizeCommand(false);
}
+
+ private void checkExternalizeCommand(boolean requiredState) {
+ TestUtil.waitForIdle(TestUtil.MAX_IDLE * 100);
+ assertEquals("Externalize Command has incorrect enabled state", //$NON-NLS-1$
+ requiredState,externalizeCommand.isEnabled());
+ }
}
15 years, 5 months
JBoss Tools SVN: r26435 - in trunk/bpel/plugins: org.eclipse.bpel.runtimes and 23 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-11-10 15:06:53 -0500 (Wed, 10 Nov 2010)
New Revision: 26435
Added:
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.runtimes/.classpath
trunk/bpel/plugins/org.eclipse.bpel.runtimes/.cvsignore
trunk/bpel/plugins/org.eclipse.bpel.runtimes/.project
trunk/bpel/plugins/org.eclipse.bpel.runtimes/.settings/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs
trunk/bpel/plugins/org.eclipse.bpel.runtimes/META-INF/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.eclipse.bpel.runtimes/build.properties
trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/ctool16/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/ctool16/new_bpelprj.gif
trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/obj16/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/obj16/bpelfacet.gif
trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/obj16/prj_bpel.gif
trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/wizban/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/wizban/newprj_bpel_wiz_banner.gif
trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.properties
trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.xml
trunk/bpel/plugins/org.eclipse.bpel.runtimes/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/
trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELModuleFactoryDelegate.java
Removed:
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/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/utils/
Modified:
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/plugin.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/pom.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
Log:
JBIDE-6588: BPEL deployment to ODE running in Tomcat
https://jira.jboss.org/browse/JBIDE-6588
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-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/plugin.xml 2010-11-10 20:06:53 UTC (rev 26435)
@@ -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.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>
+<?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="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>
Added: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml 2010-11-10 20:06:53 UTC (rev 26435)
@@ -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.apache.ode.runtime</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/.classpath
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/.classpath (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/.classpath 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <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"/>
+</classpath>
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/.classpath
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/.cvsignore
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/.cvsignore (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/.cvsignore 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,4 @@
+target
+bin
+*.class
+
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/.cvsignore
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/.project
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/.project (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/.project 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.runtimes</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/.project
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,7 @@
+#Mon Oct 23 11:56:22 PDT 2006
+eclipse.preferences.version=1
+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
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.bpel.runtimes; singleton:=true
+Bundle-Version: 0.5.0.qualifier
+Bundle-Activator: org.eclipse.bpel.runtimes.RuntimesPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.wst.server.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.wst.web.ui;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.project.facet.ui;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.wst.common.modulecore;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.frameworks;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.wst.common.frameworks.ui;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.jst.server.generic.core;bundle-version="[1.0.305,2.0.0)",
+ org.eclipse.jem.util;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.debug.ui;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.bpel.model;bundle-version="0.5.0",
+ org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)",
+ javax.wsdl;bundle-version="[1.5.0,1.6.0)",
+ org.eclipse.wst.wsdl;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.jst.common.frameworks
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.bpel.runtimes,
+ org.eclipse.bpel.runtimes.facets,
+ org.eclipse.bpel.runtimes.module,
+ org.eclipse.bpel.runtimes.publishers,
+ org.eclipse.bpel.runtimes.ui.wizards
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/build.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/build.properties (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/build.properties 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,16 @@
+bin.includes = plugin.xml,\
+ META-INF/,\
+ icons/,\
+ plugin.properties,\
+ .
+src.includes = META-INF/,\
+ icons/,\
+ plugin.*,\
+ src/,\
+ build.properties,\
+ .,\
+ .project,\
+ .cvsignore,\
+ .classpath
+source.. = src/
+
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/build.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/ctool16/new_bpelprj.gif
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/ctool16/new_bpelprj.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/obj16/bpelfacet.gif
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/obj16/bpelfacet.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/obj16/prj_bpel.gif
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/obj16/prj_bpel.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/wizban/newprj_bpel_wiz_banner.gif
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/icons/wizban/newprj_bpel_wiz_banner.gif
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.properties (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.properties 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,21 @@
+###############################################################################
+# 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
+#
+###############################################################################
+pluginName = Eclipse BPEL Designer Runtimes
+providerName = University College London Software Systems Engineering
+
+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.
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.xml (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.xml 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--=========================================================================-->
+<!-- BPEL Designer Runtime Extension Point -->
+<!-- -->
+<!-- Copyright (c) 2006 University College London. -->
+<!-- All rights reserved. This program and the accompanying materials -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at -->
+<!-- http://www.eclipse.org/legal/epl-v10.html -->
+<!-- -->
+<!--=========================================================================-->
+
+<plugin>
+
+<!--=========================================================================-->
+<!-- New BPEL Project Wizard -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ name="%NEW_BPEL_PROJECT"
+ icon="icons/ctool16/new_bpelprj.gif"
+ category="org.eclipse.bpel.wizards"
+ project="true"
+ class="org.eclipse.bpel.runtimes.ui.wizards.NewBPELProjectWizard"
+ id="org.eclipse.bpel.runtimes.wizards.newBPELProject">
+ <description>%NEW_BPEL_PROJECT_DESCRIPTION</description>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
+ <wizard-pages action="bpel.facet.core.install">
+ <page class="org.eclipse.bpel.runtimes.ui.wizards.BPELFacetInstallPage"/>
+ </wizard-pages>
+ </extension>
+
+
+<!--=========================================================================-->
+<!-- BPEL ModuleType -->
+<!--=========================================================================-->
+
+ <extension
+ id="bpel.module"
+ name="%MODULE_TYPE_NAME"
+ point="org.eclipse.wst.server.core.moduleTypes">
+ </extension>
+
+<!-- The following is needed to make icons for deployable modules occur in -->
+<!-- the Add and Remove Projects wizard -->
+
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.bpel.runtimes.bpel.module"
+ typeIds="bpel.module"
+ icon="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Facet -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.common.project.facet.core.facets">
+
+ <project-facet id="bpel.facet.core">
+ <label>%BPEL_CORE_FACET_LABEL</label>
+ <description>%BPEL_CORE_FACET_DESCRIPTION</description>
+ </project-facet>
+
+ <project-facet-version facet="bpel.facet.core" version="2.0">
+ <group-member id="modules"></group-member>
+ <constraint>
+ <conflicts group="modules">
+ </conflicts>
+ </constraint>
+ </project-facet-version>
+
+
+ <action facet="bpel.facet.core" version="2.0" type="INSTALL" id="bpel.facet.core.install">
+ <delegate class="org.eclipse.bpel.runtimes.facets.BPELCoreFacetInstallDelegate"/>
+ <config-factory class="org.eclipse.bpel.runtimes.facets.BPELFacetInstallDataModelProvider"/>
+ </action>
+
+ <category id="bpel.category">
+ <label>%BPEL_FACET_CATEGORY_LABEL</label>
+ <description>%bpelCoreFacetDescription</description>
+ </category>
+
+ <template id="template.bpel.core">
+ <label>%BPEL_FACET_TEMPLATE_LABEL</label>
+ <fixed facet="bpel.facet.core"/>
+ </template>
+
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Facet Image -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image facet="bpel.facet.core" path="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.common.modulecore.componentimpl">
+ <componentimpl
+ typeID="bpel.facet.core"
+ class="org.eclipse.bpel.runtimes.facets.BPELVirtualComponent">
+ </componentimpl>
+ </extension>
+
+
+<!--=========================================================================-->
+<!-- BPEL Module Factory -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.server.core.moduleFactories">
+ <moduleFactory
+ projects="true"
+ class="org.eclipse.bpel.runtimes.module.BPELModuleFactoryDelegate"
+ id="org.eclipse.bpel.runtimes.module.moduleFactory">
+ <moduleType
+ versions="1.1, 2.0"
+ types="bpel.module">
+ </moduleType>
+ </moduleFactory>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Module ArtifactAdapters -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.server.core.moduleArtifactAdapters">
+ <moduleArtifactAdapter
+ id="org.eclipse.bpel.runtimes.module.artifactAdapter1"
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ <moduleArtifactAdapter
+ id="org.eclipse.bpel.runtimes.module.artifactAdapter2"
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IFile"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Runtime Adapters -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IProject">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ <factory
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IFile">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ </extension>
+
+<!--=========================================================================-->
+<!-- TO MAKE PROCESSES ACTUALLY LAUNCHABLE VIA RUN ON SERVER -->
+<!-- -->
+<!-- Implement org.eclipse.wst.server.core.clients in order to specify the -->
+<!-- the client app to be used for launching. -->
+<!-- -->
+<!-- Implement org.eclipse.wst.server.core.launchableAdapters. Might have to -->
+<!-- do this in server-specific way or maybe can resuse some generic server -->
+<!-- framework stuff or maybe can come up with some interface that would -->
+<!-- allow us to implement in runtimes plug-in. -->
+<!-- -->
+<!-- N.B. Launching here means launching a Web service. Hence, can do this -->
+<!-- via the corresponding WTP feature with no code at all from our end. -->
+<!-- -->
+<!-- -->
+<!-- -->
+<!--=========================================================================-->
+
+
+</plugin>
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/plugin.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/pom.xml (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/pom.xml 2010-11-10 20:06:53 UTC (rev 26435)
@@ -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.runtimes</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.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 BPEL20_MODULE_TYPE = "bpel.module"; //$NON-NLS-1$
+
+ // module type versions
+ public final static String BPEL11_MODULE_VERSION = "1.1"; // $NON-NLS-1$
+ public final static String BPEL20_MODULE_VERSION = "2.0"; // $NON-NLS-1$
+
+ // facet template
+ public final static String BPEL20_FACET_TEMPLATE = "template.bpel.core"; //$NON-NLS-1$
+
+ // facet
+ public final static String BPEL20_PROJECT_FACET = "bpel.facet.core"; //$NON-NLS-1$
+
+ // bpel file extension
+ public final static String BPEL_FILE_EXTENSION = "bpel"; //$NON-NLS-1$
+ public final static String DOT_BPEL_FILE_EXTENSION = "." + BPEL_FILE_EXTENSION; //$NON-NLS-1$
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.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
+ */
+
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RuntimesPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.bpel.runtimes"; //$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);
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.facets;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jst.common.project.facet.WtpUtils;
+import org.eclipse.wst.common.componentcore.internal.util.IComponentImplFactory;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+
+/**
+ * BPEL Facet implementation of <code>IDelegate</code>.
+ * <p>
+ * Note: Must not call IFacetedProject.modify() to install facet as this is
+ * a prohibited operation from a delegate and will throw <code>CoreException</code>.
+ *
+ * @author Bruno Wassermann, written Jun 7, 2006
+ */
+public class BPELCoreFacetInstallDelegate implements IDelegate {
+
+ /**
+ * At the moment, there does not appear to be any opportunity to do some
+ * common setup of stuff here (e.g., set up a WEB-INF folder, etc.).
+ * Maybe some common requirements will become apparent at some later stage.
+ */
+
+ /** (non-Javadoc)
+ * @see org.eclipse.wst.common.project.facet.core.IDelegate#execute(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @SuppressWarnings("nls")
+ public void execute(IProject proj,
+ IProjectFacetVersion ver,
+ Object obj,
+ IProgressMonitor progMon)
+ throws CoreException
+ {
+ progMon.beginTask( "Configuring ...", 300 ); //$NON-NLS-1$
+ IDataModel model = (IDataModel)obj;
+ String contentRoot = (String)model.getProperty(BPELFacetInstallDataModelProvider.BPEL_CONTENT_FOLDER);
+ contentRoot = (contentRoot == null || "".equals(contentRoot)) ? IBPELModuleFacetConstants.BPEL_CONTENT_DEFAULT_FOLDER : contentRoot;
+
+ // add natures
+ WtpUtils.addNatures(proj);
+
+ // Create the content folder
+ IFolder bpelContent = proj.getFolder(contentRoot);
+ if (!bpelContent.exists())
+ bpelContent.create(true,true, null);
+
+ // create the virtual component
+ IComponentImplFactory factory = new BPELVirtualComponent();
+ IVirtualComponent newComponent = factory.createComponent(proj);
+ newComponent.create(0, null);
+ progMon.worked(100);
+
+ // Add the resource mapping to bpelContent
+ newComponent.getRootFolder().createLink(new Path("/" + contentRoot), 0, null);
+
+ // Add builder
+ addBuilder(proj, new SubProgressMonitor(progMon, 100));
+ progMon.done();
+ }
+ protected void addBuilder(IProject proj, IProgressMonitor monitor) throws CoreException {
+ // Add the builder to the project description
+ IProjectDescription description = proj.getDescription();
+
+ // Our builder name
+ String builderName = "org.eclipse.bpel.validator.builder"; //$NON-NLS-1$
+
+ // Install the builder (validator)
+
+ ICommand buildCommand = description.newCommand();
+
+ // We only support 1 argument now, its "debug"
+ Map<String, String> args = new HashMap<String, String>();
+ args.put("debug", "false");
+ buildCommand.setArguments(args);
+
+ buildCommand.setBuilderName(builderName);
+
+ ICommand[] commands = description.getBuildSpec();
+
+ if (commands == null) {
+ description.setBuildSpec(new ICommand[] { buildCommand });
+ proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
+
+ } else {
+
+ boolean bFound = false;
+ for (ICommand c : commands) {
+ if (builderName.equals(c.getBuilderName())) {
+ bFound = true;
+ break;
+ }
+ }
+
+ // not found
+ if (bFound == false) {
+ int i = commands.length;
+ ICommand[] newCommands = new ICommand[i + 1];
+ System.arraycopy(commands, 0, newCommands, 0, i);
+ newCommands[i] = buildCommand;
+ description.setBuildSpec(newCommands);
+ proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
+ }
+ }
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,29 @@
+package org.eclipse.bpel.runtimes.facets;
+
+import java.util.Set;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
+import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
+
+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.BPEL20_PROJECT_FACET;
+ }
+ return super.getDefaultProperty(propertyName);
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,34 @@
+package org.eclipse.bpel.runtimes.facets;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
+import org.eclipse.wst.common.componentcore.internal.resources.VirtualComponent;
+import org.eclipse.wst.common.componentcore.internal.resources.VirtualFolder;
+import org.eclipse.wst.common.componentcore.internal.util.IComponentImplFactory;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+
+public class BPELVirtualComponent extends VirtualComponent implements IComponentImplFactory {
+ public BPELVirtualComponent() {
+ super();
+ }
+
+ public BPELVirtualComponent(IProject aProject, IPath aRuntimePath) {
+ super(aProject, aRuntimePath);
+ }
+
+ public IVirtualComponent createComponent(IProject aProject) {
+ return new BPELVirtualComponent(aProject, new Path("/"));
+ }
+
+ public IVirtualFolder createFolder(IProject aProject, IPath aRuntimePath) {
+ return new VirtualFolder(aProject, aRuntimePath);
+ }
+
+ public IVirtualComponent createArchiveComponent(IProject aProject,
+ String archiveLocation, IPath aRuntimePath) {
+ return new VirtualArchiveComponent(aProject, archiveLocation, aRuntimePath);
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,36 @@
+package org.eclipse.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;
+
+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();
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.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 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};
+ }
+
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+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.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.ServerUtil;
+
+/**
+ * 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 this is not really how you should be using BPELModuleDelegate
+ 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.BPEL20_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.BPEL20_PROJECT_FACET))
+ {
+ IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet(IBPELModuleFacetConstants.BPEL20_PROJECT_FACET);
+
+ return facetedProject.getInstalledVersion(projectFacet).getVersionString();
+ }
+ } catch (Exception e) {
+ Logger.getLogger().write(e);
+ }
+ return "2.0"; //$NON-NLS-1$
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.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 + "]";
+ }
+
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,174 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.bpel.runtimes.RuntimesPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.server.core.internal.ModuleFile;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+import org.eclipse.wst.server.core.util.ProjectModule;
+
+/**
+ * A <code>ModuleDelegate</code> implementation for BPEL modules making use
+ * of <code>ProjectModule</code> in order to link a BPEL module to the project
+ * it is contained in. Nevertheless, at the moment, a BPEL module is considered
+ * to be a single BPEL file and not to consist of other resources in the same
+ * project.
+ *
+ * @author Bruno Wassermann, written 14 Jul 2006
+ */
+public class BPELModuleDelegate extends ProjectModule {
+
+ private IFile file;
+
+ /**
+ * Constructor initialising module delegate with the folder in which the
+ * BPEL module is contained and with the file representing the actual
+ * BPEL process/module.
+ *
+ * @param project <code>IProject</code> containing BPEL module (but is not
+ * the same as BPEL module)
+ * @param file <code>IFile</code> representing the actual BPEL process/module
+ */
+ public BPELModuleDelegate(IProject project, IFile file) {
+ super(project);
+ this.file = file;
+ }
+
+ /**
+ * Overriding implementation in <code>ProjectModule</code> in order to return
+ * actual module type id.
+ *
+ * @see ProjectModule#getId()
+ * @return <code>String</code> representing module type id
+ */
+ @Override
+ public String getId() {
+ return IBPELModuleFacetConstants.BPEL20_MODULE_TYPE;
+ }
+
+ /**
+ * Returns the name of this module; to be precise the name of the file this
+ * module represents.
+ *
+ * @see ProjectModule#getName()
+ * @return <code>String</code>
+ */
+ @Override
+ public String getName() {
+ return file.getName();
+ }
+
+ /**
+ * Returns the file represented by this module.
+ *
+ * @return <code>IFile</code>
+ */
+ public IFile getFile() {
+ return file;
+ }
+
+ /**
+ * Returns whether or not this module exists (may have been removed).
+ *
+ * @see ProjectModule#exists()
+ * @return <code>true</code> if the module exists, <code>false</code> otherwise
+ */
+ @Override
+ public boolean exists() {
+ return file.exists();
+ }
+
+ /**
+ * Returns the module resources that should be published to the server.
+ * The implementation in <code>ProjectModule</code> assumes that the entire
+ * project should be published to the server.
+ * <p>
+ * For now we will restrict this to be just the selected BPEL file itself
+ * that is represented by this module.
+ * <p>
+ * TODO will have to reconsider implementation to allow for all BPEL files
+ * in a project to be published
+ * <p>
+ * TODO would be interesting to consider publishing any Web services present
+ * in the project that BPEL processes may require as part of automated
+ * deployment. For now, will suffice, though, to notify user of missing Web
+ * service and ask user to deploy WS first.
+ *
+ * @see ModuleDelegate#members()
+ * @return <code>IModuleResource</code>[]
+ */
+ @Override
+ public IModuleResource[] members() {
+ IModuleResource[] result = {new ModuleFile(file, file.getName(), Path.EMPTY)};
+
+ return result;
+ }
+
+ /**
+ * Overriding superclass implementation. Checks whether the <code>IFile</code>
+ * representing the BPEL module has a bpel file extension (weak validation).
+ *
+ * @see ModuleDelegate#validate()
+ * <p>
+ * TODO should also allow for BPEL projects being valid modules
+ */
+ @Override
+ public IStatus validate() {
+ super.validate();
+ if (IBPELModuleFacetConstants.DOT_BPEL_FILE_EXTENSION.equalsIgnoreCase(
+ file.getFileExtension()))
+ {
+ return Status.OK_STATUS;
+ }
+ return new Status(
+ IStatus.ERROR,
+ RuntimesPlugin.PLUGIN_ID,
+ 0,
+ Messages.InvalidFileExtension,
+ null);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) return false;
+
+ if (this == obj) return true;
+
+ if (!(obj instanceof BPELModuleDelegate)) return false;
+
+ BPELModuleDelegate bmd = (BPELModuleDelegate) obj;
+
+ if (this.getProject() != null
+ && this.getProject().exists()
+ && !this.getProject().equals(bmd.getProject()))
+ {
+ return false;
+ }
+
+ if (file != null
+ && file.exists()
+ && !(file.getFullPath().equals(bmd.getFile().getFullPath())))
+ {
+ return false;
+ }
+
+ if (getId() != null && !getId().equals(bmd.getId())) return false;
+
+ return true;
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.StructureEdit;
+import org.eclipse.wst.common.componentcore.internal.flat.IChildModuleReference;
+import org.eclipse.wst.common.componentcore.internal.util.FacetedProjectUtilities;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.internal.Module;
+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;
+
+/**
+ * J2EE module factory.
+ */
+public class BPELModuleFactoryDelegate extends ProjectModuleFactoryDelegate implements IResourceChangeListener {
+ protected Map <IModule, FlatComponentDeployable> moduleDelegates = new HashMap<IModule, FlatComponentDeployable>(5);
+
+ public static final String BPEL_FACTORY = "org.eclipse.bpel.runtimes.module.moduleFactory"; //$NON-NLS-1$
+
+ public static BPELModuleFactoryDelegate FACTORY;
+ public static BPELModuleFactoryDelegate factoryInstance() {
+ if( FACTORY == null ) {
+ ensureFactoryLoaded(BPEL_FACTORY);
+ }
+ 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(BPEL_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.BPEL20_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.BPEL20_MODULE_TYPE;
+ String version = IBPELModuleFacetConstants.BPEL20_MODULE_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);
+
+ // Check to add any binary modules
+// if (J2EEProjectUtilities.ENTERPRISE_APPLICATION.equals(type))
+// projectModules.addAll(LEGACY_createBinaryModules(component));
+ } 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);
+ }
+
+// protected FlatComponentDeployable getNestedDelegate(IVirtualComponent component) {
+// return new BPELDeployable(component.getProject(), 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);
+ }
+ }
+ }
+
+// /**
+// * From this point on, when queried, projects will generate their binary
+// * child modules on the fly and they will be small and dumb
+// *
+// * @param parent
+// * @param child
+// * @return
+// */
+// public IModule createChildModule(FlatComponentDeployable parent, IChildModuleReference child) {
+// File file = child.getFile();
+// if( file != null ) {
+// IPath p = new Path(file.getAbsolutePath());
+// JavaEEQuickPeek qp = JavaEEBinaryComponentHelper.getJavaEEQuickPeek(p);
+// IModule module = createModule(qp, BINARY_PREFIX + file.getAbsolutePath(), file.getName(), parent.getProject());
+// FlatComponentDeployable moduleDelegate = getNestedDelegate(child.getComponent());
+// moduleDelegates.put(module, moduleDelegate);
+// return module;
+// }
+// return null;
+// }
+
+// /**
+// * Create a module delegate on the fly for this binary file
+// * @param module
+// * @return
+// */
+// public ModuleDelegate createDelegate(IModule module) {
+// String internalId = ((Module)module).getInternalId();
+// String path = internalId.substring(BINARY_PREFIX.length());
+// File f = new File(path);
+// return new BinaryFileModuleDelegate(f);
+// }
+
+ public void resourceChanged(IResourceChangeEvent event) {
+ cleanAllDelegates();
+ }
+
+ protected void cleanAllDelegates() {
+ Iterator<FlatComponentDeployable> i = moduleDelegates.values().iterator();
+ while(i.hasNext()) {
+ i.next().clearCache();
+ }
+ modulesChanged();
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,381 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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
+ *
+ * THIS CLASS IS AN EXACT CLONE OF
+ * org.eclipse.wst.web.internal.deployables.FlatComponentDeployable
+ *
+ * This class is a candidate for being pushed into COMMON TOOLS
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent;
+import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.FlatComponentTaskModel;
+import org.eclipse.wst.common.componentcore.internal.flat.IChildModuleReference;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlatFile;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlatFolder;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlatResource;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlatVirtualComponent;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant;
+import org.eclipse.wst.common.componentcore.internal.util.VirtualReferenceUtilities;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+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.IModule;
+import org.eclipse.wst.server.core.ServerUtil;
+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.ProjectModule;
+
+public abstract class FlatComponentDeployable extends ProjectModule {
+
+ /*
+ * Register an adapt IModule to IVirtualComponent
+ */
+ static {
+ Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
+ public Class[] getAdapterList() {
+ return new Class[] { IVirtualComponent.class };
+ }
+
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adaptableObject instanceof IModule) {
+ IModule module = (IModule) adaptableObject;
+ FlatComponentDeployable deployable = (FlatComponentDeployable) module.loadAdapter(FlatComponentDeployable.class, null);
+ if(deployable != null){
+ IVirtualComponent virtualComponent = deployable.getComponent();
+ return virtualComponent;
+ }
+ }
+ return null;
+ }
+ }, IModule.class);
+ }
+
+ protected IVirtualComponent component = null;
+ protected List<IModuleResource> members = new ArrayList<IModuleResource>();
+
+ public FlatComponentDeployable(IProject project) {
+ this(project,ComponentCore.createComponent(project));
+ }
+
+ public FlatComponentDeployable(IProject project, IVirtualComponent aComponent) {
+ super(project);
+ this.component = aComponent;
+ }
+
+ public IVirtualComponent getComponent() {
+ return component;
+ }
+
+ /**
+ * We will cache the flattened piece here, and instead redirect
+ * the module factories to recreate the modules *whenever* there is
+ * a workspace change. This will still be much more efficient than
+ * traversing the tree each time a call to getResources() or getChildModules().
+ */
+ private FlatVirtualComponent cacheFlattened = null;
+
+
+ public boolean shouldCache() {
+ return false;
+ }
+
+ public void clearCache() {
+ cacheFlattened = null;
+ }
+
+ /**
+ * The export model is what does the grunt of the work
+ * @return
+ */
+ protected IFlatVirtualComponent getFlatComponent() {
+ if( !shouldCache() || cacheFlattened == null ) {
+ FlatComponentTaskModel options = new FlatComponentTaskModel();
+ options.put(FlatVirtualComponent.PARTICIPANT_LIST, Arrays.asList(getParticipants()));
+ FlatVirtualComponent tmp = new FlatVirtualComponent(component, options);
+ if( shouldCache())
+ cacheFlattened = tmp;
+ return tmp;
+ }
+ return cacheFlattened;
+ }
+
+ /**
+ * Subclasses can provide a list of participants who may
+ * be involved in forming the export model
+ *
+ * A deployable with no participant should still properly
+ * consume consumed references and traverse the model appropriately
+ *
+ * @return
+ */
+ protected IFlattenParticipant[] getParticipants() {
+ return new IFlattenParticipant[]{
+ };
+ }
+
+ public boolean isBinary() {
+ return component == null ? false : component.isBinary();
+ }
+
+ @Override
+ public IModuleResource[] members() throws CoreException {
+ if( component.isBinary() )
+ return LEGACY_binaryMembers();
+
+ IFlatVirtualComponent em = getFlatComponent();
+ IFlatResource[] resources = em.fetchResources();
+ return convert(resources);
+
+ }
+
+ protected IModuleResource[] LEGACY_binaryMembers() {
+ IFile ifile = (IFile)component.getAdapter(IFile.class);
+ File file = (File)component.getAdapter(File.class);
+ ModuleFile mf = ifile != null ? new ModuleFile(ifile, ifile.getName(), new Path("")) //$NON-NLS-1$
+ : new ModuleFile(file, file.getName(), new Path("")); //$NON-NLS-1$
+ return new IModuleResource[]{mf};
+ }
+
+ /**
+ * Returns the child modules of this module.
+ *
+ * @return org.eclipse.wst.server.core.model.IModule[]
+ */
+ @Override
+ public IModule[] getChildModules() {
+ return getModules();
+ }
+
+ public /* non api */ IChildModuleReference[] getExportModelChildren() throws CoreException {
+ IFlatVirtualComponent em = getFlatComponent();
+ IChildModuleReference[] children = em.getChildModules();
+ return children;
+ }
+
+ public IModule[] getModules() {
+ // Legacy, here in case the old modules are used
+ if( component.isBinary() )
+ return new IModule[]{};
+
+ try {
+ List<IModule> modules = new ArrayList<IModule>();
+ IChildModuleReference[] children = getExportModelChildren();
+ for( int i = 0; i < children.length; i++ ) {
+ IModule child = gatherModuleReference(component, children[i]);
+ if( child != null )
+ modules.add(child);
+ }
+ return modules.toArray(new IModule[modules.size()]);
+ } catch( CoreException ce ) {
+ }
+ return new IModule[]{};
+ }
+
+ @Override
+ public String getPath(IModule m) {
+ return getURI(m);
+ }
+
+ /**
+ * Returns the URI of the given contained CHILD module.
+ *
+ * SOFT requirements (NOT API!!) in use by some adopters
+ * If the passed in module is equal to this module, return our own deployed name
+ *
+ * @param module a module
+ * @return the URI of the given module, or <code>null</code> if the URI could
+ * not be found
+ */
+ public String getURI(IModule module) {
+ ProjectModule md = (ProjectModule)module.loadAdapter(ProjectModule.class, new NullProgressMonitor());
+ if( md == this ) {
+ // guess my own name
+ return VirtualReferenceUtilities.INSTANCE.getDefaultProjectArchiveName(this.component);
+ }
+ try {
+ FlatComponentDeployable cd = (FlatComponentDeployable)module.loadAdapter(FlatComponentDeployable.class, new NullProgressMonitor());
+ if( cd != null ) {
+ IFlatVirtualComponent em = getFlatComponent();
+ IChildModuleReference[] children = em.getChildModules();
+ for( int i = 0; i < children.length; i++ ) {
+ IModule child = gatherModuleReference(component, children[i]);
+ if( child != null && child.getId().equals(module.getId()))
+ return children[i].getRelativeURI().toString();
+ }
+ }
+ } catch( CoreException ce ) {
+ }
+ return null;
+ }
+
+ /**
+ * If I know how to find an IModule for this child, do so now
+ *
+ * I would love to see this replaced with some API to locate a
+ * possible child module based on a virtual component.
+ *
+ * @param component
+ * @param targetComponent
+ * @return
+ */
+ protected IModule gatherModuleReference(IVirtualComponent component, IChildModuleReference child) {
+ // Handle workspace project module components
+ // Subclasses should extend
+ IVirtualComponent targetComponent = child.getComponent();
+ if (targetComponent != null && targetComponent.getProject()!= component.getProject()) {
+ if (!targetComponent.isBinary()) {
+ return filterModuleDelegates(ServerUtil.getModules(targetComponent.getProject()));
+ }
+ }
+ return null;
+ }
+
+ /**
+ * An extender may wish to override this method in order to control which
+ * delegate is returned in the scenario where more than one exist. By default
+ * the first one found is returned.
+ *
+ * @param IModule[] modules
+ * @return IModule[]
+ */
+ protected IModule filterModuleDelegates(IModule[] modules) {
+ for (int i = 0; i < modules.length; i++) {
+ ModuleDelegate md = (ModuleDelegate)modules[i].loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ if (md instanceof ProjectModule) {
+ return modules[i];
+ }
+ }
+ return modules.length > 0 ? modules[0] : null;
+ }
+
+ /*
+ * Below are STATIC utility classes and methods
+ */
+ protected static IModuleResource[] convert(IFlatResource[] resources) {
+ ArrayList<IModuleResource> list = new ArrayList<IModuleResource>();
+ for( int i = 0; i < resources.length; i++ ) {
+ if( resources[i] instanceof IFlatFile)
+ list.add(new ComponentModuleFile(resources[i]));
+ else if( resources[i] instanceof IFlatFolder)
+ list.add(new ComponentModuleFolder(resources[i]));
+ }
+ return list.toArray(new IModuleResource[list.size()]);
+ }
+
+ public static class ComponentModuleResource {
+ protected IFlatResource delegate;
+ public ComponentModuleResource(IFlatResource resource) {
+ this.delegate = resource;
+ }
+ public long getModificationStamp() {
+ return ((IFlatFile)delegate).getModificationStamp();
+ }
+
+ public IPath getModuleRelativePath() {
+ return delegate.getModuleRelativePath();
+ }
+ public String getName() {
+ return delegate.getName();
+ }
+ public Object getAdapter(Class adapter) {
+ return delegate.getAdapter(adapter);
+ }
+ public IModuleResource[] members() {
+ IFlatResource[] children = ((IFlatFolder)delegate).members();
+ return convert(children);
+ }
+ }
+
+ public static class ComponentModuleFile extends ComponentModuleResource implements IModuleFile{
+ public ComponentModuleFile(IFlatResource resource) {
+ super(resource);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this)
+ return true;
+
+ if (!(obj instanceof IModuleFile))
+ return false;
+
+ IModuleFile mf = (IModuleFile) obj;
+ if (!getName().equals(mf.getName()))
+ return false;
+ if (!getModuleRelativePath().equals(mf.getModuleRelativePath()))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return getName().hashCode() * 37 + getModuleRelativePath().hashCode();
+ }
+ }
+
+ public static class ComponentModuleFolder extends ComponentModuleResource implements IModuleFolder {
+ public ComponentModuleFolder(IFlatResource resource) {
+ super(resource);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this)
+ return true;
+
+ if (!(obj instanceof IModuleFolder))
+ return false;
+
+ IModuleFolder mf = (IModuleFolder) obj;
+ if (!getName().equals(mf.getName()))
+ return false;
+ if (!getModuleRelativePath().equals(mf.getModuleRelativePath()))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return getName().hashCode() * 37 + getModuleRelativePath().hashCode();
+ }
+
+ }
+
+ protected static boolean isProjectOfType(IProject project, String typeID) {
+ IFacetedProject facetedProject = null;
+ try {
+ facetedProject = ProjectFacetsManager.create(project);
+ } catch (CoreException e) {
+ return false;
+ }
+
+ if (facetedProject !=null && ProjectFacetsManager.isProjectFacetDefined(typeID)) {
+ IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet(typeID);
+ return projectFacet!=null && facetedProject.hasProjectFacet(projectFacet);
+ }
+ return false;
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -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.eclipse.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.eclipse.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;
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1 @@
+InvalidFileExtension=BPEL module file resource must end with bpel file extension.
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -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.runtimes.publishers;
+
+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.
+ */
+
+
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,46 @@
+package org.eclipse.bpel.runtimes.ui.wizards;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetInstallPage;
+
+public class BPELFacetInstallPage extends DataModelFacetInstallPage implements
+ IFacetWizardPage {
+
+ private Label contentDirLabel;
+ private Text contentDir;
+ public BPELFacetInstallPage() {
+ super("Test BPEL");
+ setTitle("BPEL Title");
+ setDescription("BPEL Description");
+ }
+
+ @Override
+ protected String[] getValidationPropertyNames() {
+ return new String[]{IBPELModuleFacetConstants.BPEL_CONTENT_FOLDER};
+ }
+
+ @Override
+ protected Composite createTopLevelComposite(Composite parent) {
+ final Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(2, false));
+ this.contentDirLabel = new Label(composite, SWT.NONE);
+ this.contentDirLabel.setText("Content Folder");
+ this.contentDirLabel.setLayoutData(new GridData());
+
+ this.contentDir = new Text(composite, SWT.BORDER);
+ this.contentDir.setLayoutData(gdhfill());
+ this.contentDir.setData("label", this.contentDirLabel); //$NON-NLS-1$
+ this.synchHelper.synchText(contentDir, IBPELModuleFacetConstants.BPEL_CONTENT_FOLDER, null);
+ this.contentDir.setText(IBPELModuleFacetConstants.BPEL_CONTENT_DEFAULT_FOLDER);
+ new Label(composite, SWT.NONE); // pad
+ return composite;
+ }
+
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.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.eclipse.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);
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.ui.wizards;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
+import org.eclipse.bpel.runtimes.RuntimesPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
+
+/**
+ * <code>INewWizard</code> implementation for new BPEL project wizard
+ * installing the BPEL facet by default.
+ *
+ * @author Bruno Wassermann, written Jun 28, 2006
+ */
+public class NewBPELProjectWizard extends NewProjectDataModelFacetWizard
+ implements INewWizard
+{
+
+ /**
+ * Default constructor.
+ */
+ public NewBPELProjectWizard() {
+ super();
+ setWindowTitle(Messages.NewProjectWizard_1);
+ }
+
+ /**
+ * Constructor settings this wizard's <code>IDataModel</code>.
+ *
+ * @see <code>IDataModel</code>
+ * @param model <code>IDataModel</code>
+ */
+ public NewBPELProjectWizard(IDataModel model) {
+ super(model);
+ setWindowTitle(Messages.NewProjectWizard_1);
+ }
+
+ /**
+ * Creates an instance of the <code>FacetProjectCreationDataModelProvider</code>
+ * for BPEL projects. Used to associate common facet information such as
+ * runtimes with particular a project.
+ *
+ * @see <code>FacetProjectCreationDataModelProvider</code>
+ * @return <code>IDataModel</code>
+ */
+ @Override
+ protected IDataModel createDataModel() {
+
+ /*
+ * There does not seem to be a need for any custom implementation for
+ * BPEL projects at this stage. May have to reconsider at some point and
+ * build a BPELFacetProjectCreationDataModelProvider.
+ */
+ return DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
+ }
+
+ /**
+ * Getting image descriptor to be used as wizard banner.
+ *
+ * @return <code>ImageDescriptor</code>
+ */
+ @Override
+ protected ImageDescriptor getDefaultPageImageDescriptor() {
+ return RuntimesPlugin.getPlugin().getImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER);
+ }
+
+ /**
+ * Getting the <code>IFacetedProjectTemplate</code> for a BPEL project.
+ * Is used to retrieve the set of fixed facets for a particular project
+ * type.
+ *
+ * @see org.eclipse.wst.common.project.core.IFacetedProjectTemplate
+ * @return org.eclipse.wst.common.project.core.IFacetedProjectTemplate
+ *
+ */
+ @Override
+ protected IFacetedProjectTemplate getTemplate() {
+ return ProjectFacetsManager.getTemplate(IBPELModuleFacetConstants.BPEL20_FACET_TEMPLATE);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard#createFirstPage()
+ */
+ @Override
+ protected IWizardPage createFirstPage() {
+ return new NewBPELProjectWizardPage1(model, "newBPELProject"); // $NON-NLS-1$
+ }
+
+
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.ui.wizards;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
+import org.eclipse.bpel.runtimes.RuntimesPlugin;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
+
+/**
+ * <code>DataModelFacetCreationWizardPage</code> for setting up a new BPEL
+ * project.
+ *
+ * @author Bruno Wassermann, written Jun 29, 2006
+ */
+public class NewBPELProjectWizardPage1 extends DataModelFacetCreationWizardPage {
+
+ public NewBPELProjectWizardPage1(IDataModel dataModel, String pageName) {
+ super(dataModel, pageName);
+ //setTitle(org.eclipse.bpel.runtimes.ui.wizards.Messages.NewProjectWizard_1);
+ //setDescription(org.eclipse.bpel.runtimes.ui.wizards.Messages.NewProjectWizardPage1_1);
+ setTitle(org.eclipse.bpel.runtimes.ui.wizards.Messages.NewProjectWizard_1);
+ setDescription(org.eclipse.bpel.runtimes.ui.wizards.Messages.NewProjectWizardPage1_1);
+ setImageDescriptor(RuntimesPlugin.getPlugin().getImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER));
+ }
+
+ protected String getModuleFacetID() {
+ return IBPELModuleFacetConstants.BPEL20_MODULE_TYPE;
+ }
+
+ protected String getModuleTypeID() {
+ return IBPELModuleFacetConstants.BPEL20_PROJECT_FACET;
+ }
+
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,2 @@
+NewProjectWizard_1=New BPEL Project
+NewProjectWizardPage1_1=Create a new BPEL 2.0 project.
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.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;
+ }
+}
Property changes on: trunk/bpel/plugins/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/.classpath
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/.classpath 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/.classpath 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry exported="true" 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"/>
+ <classpathentry 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-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF 2010-11-10 20:06:53 UTC (rev 26435)
@@ -27,14 +27,15 @@
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.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"
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.bpel.runtimes,
- org.jboss.tools.bpel.runtimes.facets,
- org.jboss.tools.bpel.runtimes.module,
- org.jboss.tools.bpel.runtimes.ui.wizards
+ org.jboss.tools.bpel.runtimes.module
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-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml 2010-11-10 20:06:53 UTC (rev 26435)
@@ -13,31 +13,7 @@
<!--=========================================================================-->
<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 -->
<!--=========================================================================-->
@@ -60,67 +36,6 @@
</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 -->
<!--=========================================================================-->
@@ -128,66 +43,21 @@
point="org.eclipse.wst.server.core.moduleFactories">
<moduleFactory
projects="true"
- class="org.jboss.tools.bpel.runtimes.module.BPELModuleFactoryDelegate"
+ class="org.jboss.tools.bpel.runtimes.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>
-<!--=========================================================================-->
-<!-- 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 -->
@@ -263,5 +133,33 @@
</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>
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/pom.xml
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/pom.xml 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/pom.xml 2010-11-10 20:06:53 UTC (rev 26435)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.jboss.tools.bpel.runtimes</artifactId>
- <version>0.4.0-SNAPSHOT</version>
+ <version>0.6.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IBPELModuleFacetConstants.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,43 +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;
-
-/**
- *
- *
- * @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$
-}
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/IRuntimesUIConstants.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,43 +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;
-
-/**
- * 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-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/RuntimesPlugin.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -13,6 +13,7 @@
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;
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployable.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,37 +0,0 @@
-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();
- }
-}
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,60 +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.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};
- }
-
-}
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELDeployableArtifactUtil.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,102 +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.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;
- }
-}
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleArtifact.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,60 +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.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 + "]";
- }
-
-}
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleDelegate.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,58 +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 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;
- }
-}
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/BPELModuleFactoryDelegate.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,173 +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 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
Added: 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 (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELModuleFactoryDelegate.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -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.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
Property changes on: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELModuleFactoryDelegate.java
___________________________________________________________________
Name: svn:executable
+ *
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-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/JBTBPELPublisher.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -20,6 +20,7 @@
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;
@@ -47,7 +48,6 @@
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,9 +70,13 @@
public boolean accepts(String method, IServer server, IModule[] module) {
if( LocalPublishMethod.LOCAL_PUBLISH_METHOD.equals(method)
&& module != null && module.length > 0
- && module[module.length-1] != null
- && module[module.length-1].getModuleType().getId().equals(IBPELModuleFacetConstants.BPEL_MODULE_TYPE))
- return true;
+ && 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;
}
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/Messages.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,34 +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.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;
-}
Deleted: 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 2010-11-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/module/messages.properties 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1 +0,0 @@
-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-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleContentProvider.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -1,12 +1,13 @@
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.IBPELModuleFacetConstants;
+import org.jboss.tools.bpel.runtimes.module.JBTBPELModuleFactoryDelegate;
import org.jboss.tools.bpel.runtimes.module.JBTBPELPublisher;
public class BPELModuleContentProvider implements ITreeContentProvider {
@@ -20,7 +21,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.BPEL_MODULE_TYPE)) {
+ 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);
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-10 20:04:03 UTC (rev 26434)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/view/server/BPELModuleLabelProvider.java 2010-11-10 20:06:53 UTC (rev 26435)
@@ -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;
15 years, 5 months
JBoss Tools SVN: r26434 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-10 15:04:03 -0500 (Wed, 10 Nov 2010)
New Revision: 26434
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
Log:
[JBIDE-7549] removed unneeded, uniinitialized instance variable in column comparator
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-10 19:59:38 UTC (rev 26433)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-10 20:04:03 UTC (rev 26434)
@@ -1,3 +1,8 @@
+2010-11-10 André Dietisheim <adietish(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (ColumnListener):
+ [JBIDE-7549] removed unneeded, uniinitialized instance variable in column listener
+
2010-11-09 André Dietisheim <adietish(a)redhat.com>
* plugin.xml: [JBIDE-7540] removed visibleWhen clauses to have instance commands visible but disabled
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-11-10 19:59:38 UTC (rev 26433)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-11-10 20:04:03 UTC (rev 26434)
@@ -168,11 +168,9 @@
private class ColumnListener extends SelectionAdapter {
private int column;
- private TableViewer viewer;
- public ColumnListener(int column, TableViewer viewer) {
+ public ColumnListener(int column) {
this.column = column;
- this.viewer = viewer;
}
@Override
@@ -291,7 +289,7 @@
}
tc.setText(CVMessages.getString(c.name()));
tableLayout.setColumnData(tc, new ColumnWeightData(c.getWeight(), true));
- tc.addSelectionListener(new ColumnListener(i, viewer));
+ tc.addSelectionListener(new ColumnListener(i));
}
}
15 years, 5 months
JBoss Tools SVN: r26433 - trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-11-10 14:59:38 -0500 (Wed, 10 Nov 2010)
New Revision: 26433
Modified:
trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml
Log:
https://jira.jboss.org/browse/JBIDE-7028
change bpel-deploy.xml to deploy.xml
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-10 19:54:09 UTC (rev 26432)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml 2010-11-10 19:59:38 UTC (rev 26433)
@@ -51,15 +51,15 @@
</description>
</item>
- <item title="Create a bpel-deploy.xml file" skip="true">
+ <item title="Create a deploy.xml file" skip="true">
<description>
- If you want to deploy a BPEL project to JBoss BPEL Runtime, you need to create a bpel-deploy.xml file.
+ If you want to deploy a BPEL project to JBoss BPEL Runtime, you need to create a deploy.xml file.
</description>
- <subitem label="Create a bpel-deploy.xml by selecting "File > New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor" from the menu bar.">
+ <subitem label="Create a 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 "bpel-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 "deploy.xml" in the "File name" field. Click "Finish" button.">
</subitem>
- <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 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>
</item>
15 years, 5 months
JBoss Tools SVN: r26432 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.settings.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-10 14:54:09 -0500 (Wed, 10 Nov 2010)
New Revision: 26432
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.settings/org.eclipse.jdt.core.prefs
Log:
[JBIDE-7537] corrected build.properties
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.settings/org.eclipse.jdt.core.prefs 2010-11-10 19:51:29 UTC (rev 26431)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.settings/org.eclipse.jdt.core.prefs 2010-11-10 19:54:09 UTC (rev 26432)
@@ -1,8 +1,12 @@
-#Tue Jul 20 14:47:06 EDT 2010
+#Wed Nov 10 16:16:08 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
15 years, 5 months
JBoss Tools SVN: r26431 - in trunk/modeshape: plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2010-11-10 14:51:29 -0500 (Wed, 10 Nov 2010)
New Revision: 26431
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/modeshape-client.jar
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/ServerManager.java
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.test/src/org/jboss/tools/modeshape/rest/MockRestClient.java
Log:
JBDS-1343 ModeShape plugin needs to have its modeshape client jar replaced with the SOA-P ER4 build
JBIDE-6984 Upgrade ModeShape Plugin To Use The Latest ModeShape JDBC Jar (Currently 2.2)
ModeShape Tools now uses "modeshape-client.jar" from Nov 8th SOA-P ER4 kit.
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/modeshape-client.jar
===================================================================
(Binary files differ)
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/ServerManager.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/ServerManager.java 2010-11-10 19:49:51 UTC (rev 26430)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/ServerManager.java 2010-11-10 19:51:29 UTC (rev 26431)
@@ -695,12 +695,12 @@
/**
* {@inheritDoc}
- *
+ *
* @throws UnsupportedOperationException if this method is called
- * @see org.modeshape.web.jcr.rest.client.IRestClient#getNodeTypes(org.modeshape.web.jcr.rest.client.domain.Workspace)
+ * @see org.modeshape.web.jcr.rest.client.IRestClient#getNodeTypes(org.modeshape.web.jcr.rest.client.domain.Repository)
*/
@Override
- public Map<String, NodeType> getNodeTypes( Workspace workspace ) throws Exception {
+ public Map<String, NodeType> getNodeTypes( Repository repository ) throws Exception {
throw new UnsupportedOperationException();
}
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.test/src/org/jboss/tools/modeshape/rest/MockRestClient.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.test/src/org/jboss/tools/modeshape/rest/MockRestClient.java 2010-11-10 19:49:51 UTC (rev 26430)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.test/src/org/jboss/tools/modeshape/rest/MockRestClient.java 2010-11-10 19:51:29 UTC (rev 26431)
@@ -31,10 +31,11 @@
/**
* {@inheritDoc}
- *
- * @see org.modeshape.web.jcr.rest.client.IRestClient#getNodeTypes(org.modeshape.web.jcr.rest.client.domain.Workspace)
+ *
+ * @throws UnsupportedOperationException if this method is called
+ * @see org.modeshape.web.jcr.rest.client.IRestClient#getNodeTypes(org.modeshape.web.jcr.rest.client.domain.Repository)
*/
- public Map<String, NodeType> getNodeTypes( Workspace arg0 ) throws Exception {
+ public Map<String, NodeType> getNodeTypes( Repository repository ) throws Exception {
return null;
}
15 years, 5 months
JBoss Tools SVN: r26430 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-10 14:49:51 -0500 (Wed, 10 Nov 2010)
New Revision: 26430
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/build.properties
Log:
[JBIDE-7537] corrected build.properties
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/build.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/build.properties 2010-11-10 19:44:18 UTC (rev 26429)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/build.properties 2010-11-10 19:49:51 UTC (rev 26430)
@@ -3,7 +3,6 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- .classpath,\
lib/apache-mime4j-0.6.jar,\
lib/commons-codec-1.3.jar,\
lib/commons-logging-1.1.1.jar,\
@@ -12,4 +11,11 @@
lib/httpcore-nio-4.0.1.jar,\
lib/httpmime-4.0.1.jar,\
lib/log4j-1.2.14.jar,\
- about.html
+ about.html,\
+ pom.xml,\
+ src/,\
+ .settings/,\
+ .project
+src.includes = bin/,\
+ lib/,\
+ pom.xml
15 years, 5 months
JBoss Tools SVN: r26429 - in trunk/examples/plugins/org.jboss.tools.project.examples: src/org/jboss/tools/project/examples/fixes and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-11-10 14:44:18 -0500 (Wed, 10 Nov 2010)
New Revision: 26429
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
Log:
JBDS-1355 Import ESB examples - JBDS complains about runtime name - even if the name is what the error message specifies
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2010-11-10 19:43:53 UTC (rev 26428)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2010-11-10 19:44:18 UTC (rev 26429)
@@ -30,7 +30,8 @@
org.eclipse.equinox.p2.ui.sdk,
org.eclipse.equinox.p2.metadata,
org.jboss.tools.portlet.core,
- org.eclipse.equinox.p2.operations
+ org.eclipse.equinox.p2.operations,
+ org.eclipse.jst.server.core
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Export-Package: org.jboss.tools.project.examples,
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2010-11-10 19:43:53 UTC (rev 26428)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2010-11-10 19:44:18 UTC (rev 26429)
@@ -11,7 +11,15 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.server.core.internal.JavaServerPlugin;
+import org.eclipse.jst.server.core.internal.RuntimeClasspathContainer;
+import org.eclipse.jst.server.core.internal.RuntimeClasspathProviderWrapper;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
@@ -37,6 +45,7 @@
private static final String ESB = "esb"; //$NON-NLS-1$
private static final String PORTLET = "portlet"; //$NON-NLS-1$
private static final String REQUIRED_COMPONENTS = "required-components"; //$NON-NLS-1$
+ private static final IPath ESB_SERVER_SUPPLIED_CONTAINER_PATH = new Path("org.jboss.esb.runtime.classpath/server.supplied");
public boolean canFix(Project project, ProjectFix fix) {
if (!ProjectFix.WTP_RUNTIME.equals(fix.getType())) {
@@ -69,6 +78,7 @@
wtpRuntime = RuntimeManager.getRuntime(runtime.getId());
facetedProject.addTargetedRuntime(wtpRuntime, monitor);
facetedProject.setPrimaryRuntime(wtpRuntime, monitor);
+ fixEsb(eclipseProject, fix, wtpRuntime);
}
}
}
@@ -80,6 +90,61 @@
return ret;
}
+ private void fixEsb(IProject eclipseProject,
+ ProjectFix fix, org.eclipse.wst.common.project.facet.core.runtime.IRuntime wtpRuntime) throws JavaModelException {
+ String required_components = fix.getProperties().get(REQUIRED_COMPONENTS);
+ if (required_components == null) {
+ return;
+ }
+ List<String> components = tokenize(required_components);
+ if (components == null) {
+ return;
+ }
+ boolean esbRequired = false;
+ for (String component:components) {
+ if (ESB.equals(component)) {
+ esbRequired = true;
+ break;
+ }
+ }
+ if (esbRequired) {
+ IJavaProject javaProject = JavaCore.create(eclipseProject);
+ if (javaProject != null) {
+ if (!javaProject.isOpen()) {
+ javaProject.open(null);
+ }
+ IClasspathEntry[] entries = javaProject.getRawClasspath();
+ IClasspathEntry[] newEntries = new IClasspathEntry[entries.length];
+ boolean changed = false;
+ IRuntime runtime = getRuntime(wtpRuntime);
+ for (int i = 0; i < entries.length; i++) {
+ IClasspathEntry entry = entries[i];
+ if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+ IPath path = entry.getPath();
+ if (new Path(RuntimeClasspathContainer.SERVER_CONTAINER).isPrefixOf(path)) {
+ RuntimeClasspathProviderWrapper rcpw = JavaServerPlugin.findRuntimeClasspathProvider(runtime.getRuntimeType());
+ IPath serverContainerPath = new Path(RuntimeClasspathContainer.SERVER_CONTAINER)
+ .append(rcpw.getId()).append(runtime.getId());
+ newEntries[i] = JavaCore.newContainerEntry(serverContainerPath);
+ changed = true;
+ } else if (ESB_SERVER_SUPPLIED_CONTAINER_PATH.isPrefixOf(path)) {
+ IPath esbContainerPath = ESB_SERVER_SUPPLIED_CONTAINER_PATH.append(runtime.getId());
+ newEntries[i] = JavaCore.newContainerEntry(esbContainerPath);
+ changed = true;
+ } else {
+ newEntries[i] = entry;
+ }
+ } else {
+ newEntries[i] = entry;
+ }
+ }
+ if (changed) {
+ javaProject.setRawClasspath(newEntries, new NullProgressMonitor());
+ }
+ }
+ }
+ }
+
private IRuntime getBestRuntime(Project project, ProjectFix fix) {
String allowedTypes = fix.getProperties().get(
ProjectFix.ALLOWED_TYPES);
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-11-10 19:43:53 UTC (rev 26428)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-11-10 19:44:18 UTC (rev 26429)
@@ -16,15 +16,13 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import java.util.StringTokenizer;
import java.util.TreeSet;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.commands.ToggleState;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Geometry;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -37,7 +35,10 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -45,14 +46,13 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Monitor;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.model.AdaptableList;
import org.eclipse.ui.part.PageBook;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.ServerCore;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.dialog.FixDialog;
@@ -64,9 +64,6 @@
import org.jboss.tools.project.examples.model.ProjectExampleSite;
import org.jboss.tools.project.examples.model.ProjectFix;
import org.jboss.tools.project.examples.model.ProjectUtil;
-import org.jboss.tools.seam.core.project.facet.SeamRuntime;
-import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
-import org.osgi.framework.Bundle;
/**
* @author snjeza
@@ -74,6 +71,7 @@
*/
public class NewProjectExamplesWizardPage extends WizardPage {
+ private static final int DEFAULT_WIDTH = 600;
private IStructuredSelection selection;
private Button showQuickFixButton;
private Combo siteCombo;
@@ -88,14 +86,14 @@
setTitle( Messages.NewProjectExamplesWizardPage_Project_Example );
setDescription( Messages.NewProjectExamplesWizardPage_Import_Project_Example );
setImageDescriptor( ProjectExamplesActivator.imageDescriptorFromPlugin(ProjectExamplesActivator.PLUGIN_ID, "icons/new_wiz.gif")); //$NON-NLS-1$
-
}
public void createControl(Composite parent) {
+
Composite composite = new Composite(parent,SWT.NONE);
composite.setLayout(new GridLayout(1,false));
- GridData gd = new GridData(GridData.FILL_BOTH);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
composite.setLayoutData(gd);
@@ -104,11 +102,11 @@
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
siteComposite.setLayout(gridLayout);
- gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+ gd = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
siteComposite.setLayoutData(gd);
final Button button = new Button(siteComposite,SWT.CHECK);
- gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+ gd = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
gd.horizontalSpan = 2;
button.setLayoutData(gd);
button.setText(Messages.ProjectExamplesPreferencePage_Show_experimental_sites);
@@ -126,14 +124,17 @@
final ProjectExamplesPatternFilter filter = new ProjectExamplesPatternFilter();
- int styleBits = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
+ int styleBits = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.WRAP;
final FilteredTree filteredTree = new FilteredTree(composite, styleBits, filter,true);
filteredTree.setBackground(parent.getDisplay().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
final TreeViewer viewer = filteredTree.getViewer();
Tree tree = viewer.getTree();
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint=75;
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ GC gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), 7);
+ gc.dispose();
tree.setLayoutData(gd);
tree.setFont(parent.getFont());
@@ -144,16 +145,21 @@
final SiteFilter siteFilter = new SiteFilter();
viewer.addFilter(siteFilter);
- Label descriptionLabel = new Label(composite,SWT.NULL);
+ Label descriptionLabel = new Label(composite,SWT.NONE);
descriptionLabel.setText(Messages.NewProjectExamplesWizardPage_Description);
- final Text text = new Text(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
- gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- gd.heightHint=75;
- text.setLayoutData(gd);
+ final Text descriptionText = new Text(composite,SWT.H_SCROLL | SWT.V_SCROLL
+ | SWT.READ_ONLY | SWT.BORDER | SWT.WRAP);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), 4);
+ gc.dispose();
+ descriptionText.setLayoutData(gd);
Composite internal = new Composite(composite, SWT.NULL);
internal.setLayout(new GridLayout(2,false));
- gd = new GridData(GridData.FILL_BOTH);
+ gd = new GridData(GridData.FILL, GridData.FILL, true, false);
+ gd.widthHint = DEFAULT_WIDTH;
internal.setLayoutData(gd);
Label projectNameLabel = new Label(internal,SWT.NULL);
@@ -178,13 +184,13 @@
Object selected = selection.getFirstElement();
if (selected instanceof Project && selection.size() == 1) {
Project selectedProject = (Project) selected;
- text.setText(selectedProject.getDescription());
+ descriptionText.setText(selectedProject.getDescription());
projectName.setText(selectedProject.getName());
projectURL.setText(selectedProject.getUrl());
projectSize.setText(selectedProject.getSizeAsText());
} else {
//Project selectedProject=null;
- text.setText(""); //$NON-NLS-1$
+ descriptionText.setText(""); //$NON-NLS-1$
projectName.setText(""); //$NON-NLS-1$
projectURL.setText(""); //$NON-NLS-1$
projectSize.setText(""); //$NON-NLS-1$
@@ -197,19 +203,23 @@
notesPageBook = new PageBook( internal , SWT.NONE );
notesPageBook.setLayout(new GridLayout(1,false));
- gd=new GridData(GridData.FILL_HORIZONTAL);
+ gd=new GridData(GridData.FILL, GridData.FILL, true, false);
+ gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), 6);
+ gc.dispose();
gd.horizontalSpan=2;
notesPageBook.setLayoutData( gd );
noteEmptyComposite = new Composite( notesPageBook, SWT.NONE );
noteEmptyComposite.setLayout( new GridLayout(1, false));
//notesEmptyComposite.setVisible( false );
- gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false);
noteEmptyComposite.setLayoutData(gd);
noteComposite = new Composite(notesPageBook, SWT.NONE);
noteComposite.setLayout(new GridLayout(2,false));
- gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false);
noteComposite.setLayoutData(gd);
noteComposite.setVisible(false);
@@ -217,8 +227,7 @@
Composite messageComposite = new Composite(noteComposite, SWT.BORDER);
messageComposite.setLayout(new GridLayout(2, false));
- gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
-
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false);
messageComposite.setLayoutData(gd);
Label noteLabel = new Label(messageComposite,SWT.NONE);
@@ -228,16 +237,20 @@
image.setBackground(noteLabel.getBackground());
noteLabel.setImage(image);
- noteText = new Text(messageComposite, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+ noteText = new Text(messageComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
noteText.setText(""); //$NON-NLS-1$
- gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- gd.heightHint=50;
- gd.widthHint = 400;
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+ gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), 3);
+ gc.dispose();
noteText.setLayoutData(gd);
noteText.setText(Messages.NewProjectExamplesWizardPage_Note);
details = new Button(noteComposite, SWT.PUSH);
details.setText(Messages.NewProjectExamplesWizardPage_Details);
+ gd=new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
+ details.setLayoutData(gd);
details.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -246,10 +259,10 @@
}
});
- showQuickFixButton = new Button(internal,SWT.CHECK);
+ showQuickFixButton = new Button(composite,SWT.CHECK);
showQuickFixButton.setText(Messages.NewProjectExamplesWizardPage_Show_the_Quick_Fix_dialog);
showQuickFixButton.setSelection(true);
- gd=new GridData(GridData.FILL_HORIZONTAL);
+ gd=new GridData(SWT.BEGINNING, SWT.BOTTOM, false, false);
gd.horizontalSpan=2;
showQuickFixButton.setLayoutData(gd);
@@ -288,8 +301,93 @@
setPageComplete(false);
setControl(composite);
+
+ configureSizeAndLocation();
}
+ private void configureSizeAndLocation() {
+ Shell shell = getContainer().getShell();
+ Point size = new Point(DEFAULT_WIDTH,shell.getSize().y);
+ shell.setSize(size);
+ Point location = getInitialLocation(size, shell);
+ shell.setBounds(getConstrainedShellBounds(new Rectangle(location.x,
+ location.y, size.x, size.y)));
+ }
+
+ private Rectangle getConstrainedShellBounds(Rectangle preferredSize) {
+ Rectangle result = new Rectangle(preferredSize.x, preferredSize.y,
+ preferredSize.width, preferredSize.height);
+
+ Monitor mon = getClosestMonitor(getShell().getDisplay(), Geometry
+ .centerPoint(result));
+
+ Rectangle bounds = mon.getClientArea();
+
+ if (result.height > bounds.height) {
+ result.height = bounds.height;
+ }
+
+ if (result.width > bounds.width) {
+ result.width = bounds.width;
+ }
+
+ result.x = Math.max(bounds.x, Math.min(result.x, bounds.x
+ + bounds.width - result.width));
+ result.y = Math.max(bounds.y, Math.min(result.y, bounds.y
+ + bounds.height - result.height));
+
+ return result;
+ }
+
+ private static Monitor getClosestMonitor(Display toSearch, Point toFind) {
+ int closest = Integer.MAX_VALUE;
+
+ Monitor[] monitors = toSearch.getMonitors();
+ Monitor result = monitors[0];
+
+ for (int idx = 0; idx < monitors.length; idx++) {
+ Monitor current = monitors[idx];
+
+ Rectangle clientArea = current.getClientArea();
+
+ if (clientArea.contains(toFind)) {
+ return current;
+ }
+
+ int distance = Geometry.distanceSquared(Geometry
+ .centerPoint(clientArea), toFind);
+ if (distance < closest) {
+ closest = distance;
+ result = current;
+ }
+ }
+
+ return result;
+ }
+
+
+ private Point getInitialLocation(Point initialSize, Shell shell) {
+ Composite parent = shell.getParent();
+
+ Monitor monitor = shell.getDisplay().getPrimaryMonitor();
+ if (parent != null) {
+ monitor = parent.getMonitor();
+ }
+
+ Rectangle monitorBounds = monitor.getClientArea();
+ Point centerPoint;
+ if (parent != null) {
+ centerPoint = Geometry.centerPoint(parent.getBounds());
+ } else {
+ centerPoint = Geometry.centerPoint(monitorBounds);
+ }
+
+ return new Point(centerPoint.x - (initialSize.x / 2), Math.max(
+ monitorBounds.y, Math.min(centerPoint.y
+ - (initialSize.y * 2 / 3), monitorBounds.y
+ + monitorBounds.height - initialSize.y)));
+ }
+
private boolean canFix(Project project,ProjectFix fix) {
String type = fix.getType();
if (ProjectFix.PLUGIN_TYPE.equals(type)) {
@@ -416,6 +514,9 @@
public boolean refresh(boolean force) {
boolean canFinish = false;
+ notesPageBook.showPage(noteEmptyComposite);
+ noteComposite.setVisible(false);
+ noteEmptyComposite.setVisible(true);
Iterator iterator = selection.iterator();
while (iterator.hasNext()) {
Object object = iterator.next();
15 years, 5 months
JBoss Tools SVN: r26428 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-10 14:43:53 -0500 (Wed, 10 Nov 2010)
New Revision: 26428
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
Log:
[JBIDE-7537] hide client from public
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2010-11-10 19:21:11 UTC (rev 26427)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2010-11-10 19:43:53 UTC (rev 26428)
@@ -12,7 +12,7 @@
Bundle-ActivationPolicy: lazy
Export-Package: org.apache.http.client.methods;x-friends:="org.jboss.tools.deltacloud.test",
org.jboss.tools.deltacloud.core;x-friends:="org.jboss.tools.deltacloud.ui,org.jboss.tools.deltacloud.test",
- org.jboss.tools.deltacloud.core.client,
+ org.jboss.tools.deltacloud.core.client;x-friends:="org.jboss.tools.deltacloud.test",
org.jboss.tools.deltacloud.core.client.request;x-friends:="org.jboss.tools.deltacloud.test"
Bundle-ClassPath: .,
lib/apache-mime4j-0.6.jar,
15 years, 5 months