JBoss Tools SVN: r29469 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-03-03 15:37:19 -0500 (Thu, 03 Mar 2011)
New Revision: 29469
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java
Log:
https://issues.jboss.org/browse/JBIDE-8281
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java 2011-03-03 16:34:09 UTC (rev 29468)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java 2011-03-03 20:37:19 UTC (rev 29469)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.core.resolver;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
@@ -32,6 +33,9 @@
private static final ELResolverFactoryManager INSTANCE = new ELResolverFactoryManager();
+ private static HashMap<String, Set<ELResolver>> resolversByNature;
+ private static Set<ELResolverFactory> resolverFactories;
+
private ELResolverFactoryManager() {
}
@@ -43,6 +47,55 @@
return INSTANCE;
}
+ private void init() {
+ if(resolversByNature==null) {
+ resolversByNature = new HashMap<String, Set<ELResolver>>();
+ resolverFactories = new HashSet<ELResolverFactory>();
+
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry.getExtensionPoint("org.jboss.tools.common.el.core.elResolver"); //$NON-NLS-1$
+ IExtension[] extensions = extensionPoint.getExtensions();
+ for (int i=0; i<extensions.length; i++) {
+ IExtension extension = extensions[i];
+ IConfigurationElement[] elements = extension.getConfigurationElements();
+ for(int j=0; j<elements.length; j++) {
+ IConfigurationElement[] natures = elements[j].getChildren("project-nature"); //$NON-NLS-1$
+ for (int k = 0; k < natures.length; k++) {
+ String natureId = natures[k].getAttribute("id"); //$NON-NLS-1$
+ try {
+ Object resolver = natures[k].createExecutableExtension("resolver-class"); //$NON-NLS-1$
+ if(resolver instanceof ELResolver) {
+ Set<ELResolver> resolverSet = resolversByNature.get(natureId);
+ if(resolverSet==null) {
+ resolverSet = new HashSet<ELResolver>();
+ resolversByNature.put(natureId, resolverSet);
+ }
+ resolverSet.add((ELResolver)resolver);
+ } else {
+ ELCorePlugin.getPluginLog().logError(resolver.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolver"); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {
+ ELCorePlugin.getPluginLog().logError(e);
+ }
+ }
+ IConfigurationElement[] factories = elements[j].getChildren("factory"); //$NON-NLS-1$
+ for (int k = 0; k < factories.length; k++) {
+ try {
+ Object factory = factories[k].createExecutableExtension("class"); //$NON-NLS-1$
+ if(factory instanceof ELResolverFactory) {
+ resolverFactories.add((ELResolverFactory)factory);
+ } else if(!(factory instanceof TestELResolverFactory)) {
+ ELCorePlugin.getPluginLog().logError(factory.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolverFactory"); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {
+ ELCorePlugin.getPluginLog().logError(e);
+ }
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns all EL resolvers for the resource
* @param resource
@@ -53,51 +106,29 @@
return new ELResolver[0];
}
IProject project = resource.getProject();
- if (project == null || !project.isAccessible())
+ if (project == null || !project.isAccessible()) {
return new ELResolver[0];
+ }
+ init();
+
Set<ELResolver> resolverSet = new HashSet<ELResolver>();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint extensionPoint = registry.getExtensionPoint("org.jboss.tools.common.el.core.elResolver"); //$NON-NLS-1$
- IExtension[] extensions = extensionPoint.getExtensions();
- for (int i=0; i<extensions.length; i++) {
- IExtension extension = extensions[i];
- IConfigurationElement[] elements = extension.getConfigurationElements();
- for(int j=0; j<elements.length; j++) {
- IConfigurationElement[] natures = elements[j].getChildren("project-nature"); //$NON-NLS-1$
- for (int k = 0; k < natures.length; k++) {
- String natureId = natures[k].getAttribute("id"); //$NON-NLS-1$
- try {
- if(project.hasNature(natureId)) {
- Object resolver = natures[k].createExecutableExtension("resolver-class"); //$NON-NLS-1$
- if(resolver instanceof ELResolver) {
- resolverSet.add((ELResolver)resolver);
- } else {
- ELCorePlugin.getPluginLog().logError(resolver.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolver"); //$NON-NLS-1$
- }
- }
- } catch (CoreException e) {
- ELCorePlugin.getPluginLog().logError(e);
- }
+ Set<String> ids = resolversByNature.keySet();
+ for (String natureId : ids) {
+ try {
+ if(project.hasNature(natureId)) {
+ resolverSet.addAll(resolversByNature.get(natureId));
}
- IConfigurationElement[] factories = elements[j].getChildren("factory"); //$NON-NLS-1$
- for (int k = 0; k < factories.length; k++) {
- try {
- Object factory = factories[k].createExecutableExtension("class"); //$NON-NLS-1$
- if(factory instanceof ELResolverFactory) {
- ELResolver resolver = ((ELResolverFactory)factory).createResolver(resource);
- if(resolver!=null) {
- resolverSet.add(resolver);
- }
- } else if(!(factory instanceof TestELResolverFactory)) {
- ELCorePlugin.getPluginLog().logError(factory.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolverFactory"); //$NON-NLS-1$
- }
- } catch (CoreException e) {
- ELCorePlugin.getPluginLog().logError(e);
- }
- }
+ } catch (CoreException e) {
+ ELCorePlugin.getPluginLog().logError(e);
}
}
+ for (ELResolverFactory factory : resolverFactories) {
+ ELResolver resolver = factory.createResolver(resource);
+ if(resolver!=null) {
+ resolverSet.add(resolver);
+ }
+ }
return resolverSet.toArray(new ELResolver[resolverSet.size()]);
}
}
\ No newline at end of file
13 years, 10 months
JBoss Tools SVN: r29468 - in trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test: META-INF and 23 other directories.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-03-03 11:34:09 -0500 (Thu, 03 Mar 2011)
New Revision: 29468
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/org.jboss.tools.bpel.ui.bot.test.properties
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.project
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.component
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpel
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpelex
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcessArtifacts.wsdl
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/deploy.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.project
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.component
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpel
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpelex
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/DiscriminantArtifacts.wsdl
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/MathArtifacts.wsdl
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/bpel-deploy.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.project
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.component
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/bpel-deploy.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpel
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpelex
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.wsdl
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/build.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/compensate.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/fail.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/ok.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/readme.txt
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/.project
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/deploy.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpel
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpelex
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.wsdl
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/build.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/messages/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/messages/hello.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/test_project.zip
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartEvent.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartListener.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BotBpelEditor.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/EditPartEventLogger.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotBPELEditor.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotPropertiesView.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/ActivityModelingTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/AssignActivityTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/BPELConstants.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/FaultModelingTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/SimpleModelingTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/assertion/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/assertion/BPELValidator.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/util/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/util/ResourceHelper.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/util/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/util/SendSoapMessage.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/test_project.zip
Modified:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/META-INF/MANIFEST.MF
Log:
* New BPEL SWTBot tests
Modified: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/META-INF/MANIFEST.MF 2011-03-03 16:13:40 UTC (rev 29467)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/META-INF/MANIFEST.MF 2011-03-03 16:34:09 UTC (rev 29468)
@@ -10,7 +10,14 @@
org.eclipse.swtbot.eclipse.finder,
org.eclipse.swtbot.swt.finder,
org.junit,
- org.eclipse.core.resources
+ org.eclipse.core.resources,
+ org.apache.log4j;bundle-version="1.2.15",
+ org.eclipse.bpel.model;bundle-version="0.6.0",
+ org.eclipse.gef;bundle-version="3.6.2",
+ org.eclipse.wst.wsdl;bundle-version="1.2.103",
+ org.eclipse.emf.ecore;bundle-version="2.6.1",
+ org.jboss.tools.ui.bot.ext;bundle-version="3.2.0",
+ org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.0.3"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss by Red Hat
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/org.jboss.tools.bpel.ui.bot.test.properties
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/org.jboss.tools.bpel.ui.bot.test.properties (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/org.jboss.tools.bpel.ui.bot.test.properties 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,12 @@
+# SWTBotTest properties
+# all properties are optional, all defined paths should exist
+# <java version>,<jre/jdk home>
+JAVA=1.6,/usr/lib/jvm/java-6-sun/jre
+#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>
+# note : when server is type of SOA, version is version of SOA (not the bundled EAP)
+#SERVER=JBOSS_AS,5.0,1.6,/home/psrna/data/jboss/jboss/jboss-as
+SERVER=SOA,5.1,1.6,/home/psrna/data/jboss/soa-5.1.0/jboss-as
+#<seam version>,<seam runtime home>
+#SEAM=2.2,/home/psrna/data/jboss/soa-5.1.0.ER6-eds/seam
+#<esb versoin>,<esb runtime home>
+#ESB=4.7,/home/psrna/data/jboss/jbossesb-4.7
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/org.jboss.tools.bpel.ui.bot.test.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.project
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.project (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.project 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>AssignerProject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.bpel.validator.builder</name>
+ <arguments>
+ <dictionary>
+ <key>debug</key>
+ <value>false</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.project
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.component 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="AssignerProject">
+ <wb-resource deploy-path="/" source-path="/bpelContent"/>
+ </wb-module>
+</project-modules>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.component
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jbt.bpel.facet.core"/>
+ <installed facet="jbt.bpel.facet.core" version="2.0"/>
+</faceted-project>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpel
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpel (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpel 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,32 @@
+<bpel:process name="AssignTestProcess"
+ targetNamespace="http://sample.bpel.org/bpel/sample"
+ xmlns:tns="http://sample.bpel.org/bpel/sample"
+ xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <bpel:import namespace="http://sample.bpel.org/bpel/sample"
+ location="AssignTestProcessArtifacts.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <bpel:partnerLinks>
+ <bpel:partnerLink name="client"
+ partnerLinkType="tns:AssignTestProcess"
+ myRole="AssignTestProcessProvider"/>
+ </bpel:partnerLinks>
+
+ <bpel:variables>
+ <bpel:variable name="simpleIn" messageType="tns:simpleRequestMessage"/>
+ <bpel:variable name="simpleOut" messageType="tns:simpleResponseMessage"/>
+ <bpel:variable name="moderateIn" messageType="tns:moderateRequestMessage"/>
+ <bpel:variable name="moderateOut" messageType="tns:moderateResponseMessage"/>
+ <bpel:variable name="complexIn" messageType="tns:complexRequestMessage"/>
+ <bpel:variable name="complexOut" messageType="tns:complexResponseMessage"/>
+
+ <bpel:variable name="processVar" type="xsd:string"/>
+ </bpel:variables>
+
+ <bpel:sequence name="main">
+ </bpel:sequence>
+
+</bpel:process>
+
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpel
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpelex
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpelex (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpelex 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extensionmodel:ExtensionMap xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:extensionmodel="http:///extensionmodel.ecore" xmlns:org.eclipse.bpel.ui.uiextensionmodel="http:///org/eclipse/bpel/ui/uiextensionmodel.ecore" namespace="http://org.eclipse.bpel.ui/">
+ <extensions>
+ <extendedObject href="AssignTestProcess.bpel#//@activity"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="AssignTestProcess.bpel#/"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ProcessExtension" modificationStamp="1294327130000"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="AssignTestProcess.bpel#//@variables/(a)children.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="AssignTestProcess.bpel#//@variables/(a)children.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="AssignTestProcess.bpel#//@variables/(a)children.2"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="AssignTestProcess.bpel#//@variables/(a)children.3"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="AssignTestProcess.bpel#//@variables/(a)children.4"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="AssignTestProcess.bpel#//@variables/(a)children.5"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+</extensionmodel:ExtensionMap>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcess.bpelex
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcessArtifacts.wsdl
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcessArtifacts.wsdl (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcessArtifacts.wsdl 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<definitions name="AssignTestProcess"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://sample.bpel.org/bpel/sample"
+ xmlns:tns="http://sample.bpel.org/bpel/sample"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <types>
+ <!-- xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" -->
+ <xsd:schema targetNamespace="http://sample.bpel.org/bpel/sample">
+
+ <xsd:element name="complex" type="tns:complexType"/>
+ <xsd:element name="complexResponse" type="tns:complexResponseType"/>
+
+ <xsd:complexType name="complexType">
+ <xsd:sequence>
+ <xsd:element name="input" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="complexResponseType">
+ <xsd:sequence>
+ <xsd:element name="result" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+
+ <message name="simpleRequestMessage">
+ <part name="payload" type="xsd:string"/>
+ </message>
+ <message name="simpleResponseMessage">
+ <part name="payload" type="xsd:string"/>
+ </message>
+
+ <message name="moderateRequestMessage">
+ <part name="moderateRequest" type="tns:complexType"/>
+ </message>
+ <message name="moderateResponseMessage">
+ <part name="moderateResponse" type="tns:complexResponseType"/>
+ </message>
+
+ <message name="complexRequestMessage">
+ <part name="complexRequest" element="tns:complex"/>
+ </message>
+ <message name="complexResponseMessage">
+ <part name="complexResponse" element="tns:complexResponse"/>
+ </message>
+
+ <portType name="AssignTestProcess">
+ <operation name="simple">
+ <input message="tns:simpleRequestMessage" />
+ <output message="tns:simpleResponseMessage"/>
+ </operation>
+ <operation name="moderate">
+ <input message="tns:moderateRequestMessage"/>
+ <output message="tns:moderateResponseMessage"/>
+ </operation>
+ <operation name="complex">
+ <input message="tns:complexRequestMessage"/>
+ <output message="tns:complexResponseMessage"/>
+ </operation>
+ </portType>
+
+ <binding name="AssignTestProcessBinding" type="tns:AssignTestProcess">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="simple">
+ <soap:operation soapAction="http://sample.bpel.org/bpel/sample/simple" />
+ <input>
+ <soap:body use="literal" namespace="http://sample.bpel.org/bpel/sample" />
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://sample.bpel.org/bpel/sample" />
+ </output>
+ </operation>
+ <operation name="moderate">
+ <soap:operation soapAction="http://sample.bpel.org/bpel/sample/moderate" />
+ <input>
+ <soap:body use="literal" namespace="http://sample.bpel.org/bpel/sample" />
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://sample.bpel.org/bpel/sample" />
+ </output>
+ </operation>
+ <operation name="complex">
+ <soap:operation soapAction="http://sample.bpel.org/bpel/sample/complex" />
+ <input>
+ <soap:body use="literal" namespace="http://sample.bpel.org/bpel/sample" />
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://sample.bpel.org/bpel/sample" />
+ </output>
+ </operation>
+ </binding>
+
+ <service name="AssignTestProcess">
+ <port name="AssignTestProcessPort" binding="tns:AssignTestProcessBinding">
+ <soap:address location="http://localhost:8080/AssignTestProcess" />
+ </port>
+ </service>
+
+ <plnk:partnerLinkType name="AssignTestProcess">
+ <plnk:role name="AssignTestProcessProvider" portType="tns:AssignTestProcess"/>
+ </plnk:partnerLinkType>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/AssignTestProcessArtifacts.wsdl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/deploy.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/deploy.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/deploy.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" xmlns:examples="http://www.jboss.org/bpel/examples" xmlns:sample="http://sample.bpel.org/bpel/sample">
+ <process name="sample:AssignTestProcess">
+ <active>true</active>
+ <retired>false</retired>
+ <process-events generate="all"/>
+ <provide partnerLink="client">
+ <service name="sample:AssignTestProcess" port="AssignTestProcessPort"/>
+ </provide>
+ </process>
+ <process name="examples:TripleHello"/>
+ <process name="examples:scope"/>
+ <process name="examples:Discriminant"/>
+</deploy>
\ No newline at end of file
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/AssignerProject/bpelContent/deploy.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.project
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.project (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.project 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>DiscriminantProcess</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.bpel.validator.builder</name>
+ <arguments>
+ <dictionary>
+ <key>debug</key>
+ <value>false</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.project
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.component 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="DiscriminantProcess">
+ <wb-resource deploy-path="/" source-path="/bpelContent"/>
+ </wb-module>
+</project-modules>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.component
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jbt.bpel.facet.core"/>
+ <installed facet="jbt.bpel.facet.core" version="2.0"/>
+</faceted-project>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpel
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpel (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpel 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,55 @@
+<bpel:process name="Discriminant"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ suppressJoinFailure="yes"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+
+ <bpel:import location="DiscriminantArtifacts.wsdl"
+ namespace="http://www.jboss.org/bpel/examples"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+ <bpel:import location="MathArtifacts.wsdl"
+ namespace="http://www.jboss.org/bpel/examples"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <bpel:partnerLinks>
+ <bpel:partnerLink name="client"
+ partnerLinkType="tns:Discriminant"
+ myRole="DiscriminantProvider"/>
+ <bpel:partnerLink name="math"
+ partnerLinkType="tns:Math"
+ partnerRole="MathProvider"/>
+ </bpel:partnerLinks>
+
+ <bpel:variables>
+ <bpel:variable name="DiscriminantRequest" messageType="tns:DiscriminantRequestMessage"/>
+ <bpel:variable name="DiscriminantResponse" messageType="tns:DiscriminantResponseMessage"/>
+
+ <bpel:variable name="MathRequest1" messageType="tns:MathRequestMessage"/>
+ <bpel:variable name="MathResponse1" messageType="tns:MathResponseMessage"/>
+ <bpel:variable name="MathRequest2" messageType="tns:MathRequestMessage"/>
+ <bpel:variable name="MathResponse2" messageType="tns:MathResponseMessage"/>
+
+ <bpel:variable name="right" type="xsd:int"/>
+ <bpel:variable name="left" type="xsd:int"/>
+ </bpel:variables>
+
+ <bpel:sequence name="Main">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </bpel:sequence>
+</bpel:process>
+
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpel
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpelex
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpelex (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpelex 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extensionmodel:ExtensionMap xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:extensionmodel="http:///extensionmodel.ecore" xmlns:org.eclipse.bpel.ui.uiextensionmodel="http:///org/eclipse/bpel/ui/uiextensionmodel.ecore" namespace="http://org.eclipse.bpel.ui/">
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@variables/(a)children.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@variables/(a)children.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@activity"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#/"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ProcessExtension" modificationStamp="1291905246000"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@variables/(a)children.3"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@variables/(a)children.6"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@variables/(a)children.7"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@variables/(a)children.2"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@variables/(a)children.4"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="Discriminant.bpel#//@variables/(a)children.5"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+</extensionmodel:ExtensionMap>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/Discriminant.bpelex
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/DiscriminantArtifacts.wsdl
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/DiscriminantArtifacts.wsdl (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/DiscriminantArtifacts.wsdl 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<definitions name="Discriminant"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <types>
+ <schema attributeFormDefault="unqualified"
+ elementFormDefault="qualified"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="DiscriminantRequest">
+ <complexType>
+ <sequence>
+ <element name="a" type="decimal"/>
+ <element name="b" type="decimal"/>
+ <element name="c" type="decimal"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="DiscriminantResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="int"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </types>
+
+ <message name="DiscriminantRequestMessage">
+ <part name="parameters" element="tns:DiscriminantRequest"/>
+ </message>
+ <message name="DiscriminantResponseMessage">
+ <part name="parameters" element="tns:DiscriminantResponse"/>
+ </message>
+
+ <portType name="Discriminant">
+ <operation name="calculateDiscriminant">
+ <input message="tns:DiscriminantRequestMessage" />
+ <output message="tns:DiscriminantResponseMessage"/>
+ </operation>
+ </portType>
+
+ <plnk:partnerLinkType name="Discriminant">
+ <plnk:role name="DiscriminantProvider" portType="tns:Discriminant"/>
+ </plnk:partnerLinkType>
+
+ <binding name="DiscriminantBinding" type="tns:Discriminant">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="calculateDiscriminant">
+ <soap:operation soapAction="http://www.jboss.org/bpel/examples/process" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+
+ <service name="DiscriminantService">
+ <port name="DiscriminantPort" binding="tns:DiscriminantBinding">
+ <soap:address location="http://localhost:8080/DiscriminantProcess" />
+ </port>
+ </service>
+</definitions>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/DiscriminantArtifacts.wsdl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/MathArtifacts.wsdl
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/MathArtifacts.wsdl (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/MathArtifacts.wsdl 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<definitions name="Math"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:p="http://www.w3.org/2001/XMLSchema">
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ TYPE DEFINITION - List of types participating in this BPEL process
+ The BPEL Designer will generate default request and response types
+ but you can define or import any XML Schema type and use them as part
+ of the message types.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <types>
+ <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="MathRequest">
+ <complexType>
+ <sequence>
+ <element name="a" type="decimal" />
+ <element name="b" type="decimal"></element>
+ <element name="operator" type="string"></element>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="MathResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="decimal"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="CalculateFault">
+ <complexType>
+ <sequence>
+ <element name="errorText" type="string"></element>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </types>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ MESSAGE TYPE DEFINITION - Definition of the message types used as
+ part of the port type definitions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <message name="MathRequestMessage">
+ <part name="parameters" element="tns:MathRequest"/>
+ </message>
+ <message name="MathResponseMessage">
+ <part name="parameters" element="tns:MathResponse"/>
+ </message>
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PORT TYPE DEFINITION - A port type groups a set of operations into
+ a logical service unit.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+
+ <!-- portType implemented by the Math BPEL process -->
+ <portType name="Math">
+ <operation name="calculate">
+ <input message="tns:MathRequestMessage" />
+ <output message="tns:MathResponseMessage"/>
+ </operation>
+ </portType>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="Math">
+ <plnk:role name="MathProvider" portType="tns:Math"/>
+ </plnk:partnerLinkType>
+
+ <binding name="MathBinding" type="tns:Math">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="calculate">
+ <soap:operation soapAction="http://www.jboss.org/bpel/examples/calculate" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="MathService">
+ <port name="MathPort" binding="tns:MathBinding">
+ <soap:address location="http://localhost:8080/MathProcess" />
+ </port>
+ </service>
+</definitions>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/MathArtifacts.wsdl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/bpel-deploy.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/bpel-deploy.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/bpel-deploy.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" xmlns:examples="http://www.jboss.org/bpel/examples">
+ <process name="examples:Discriminant">
+ <active>true</active>
+ <retired>false</retired>
+ <process-events generate="all"/>
+ <provide partnerLink="client">
+ <service name="examples:DiscriminantService" port="DiscriminantPort"/>
+ </provide>
+ <invoke partnerLink="math">
+ <service name="examples:MathService" port="MathPort"/>
+ </invoke>
+ </process>
+</deploy>
\ No newline at end of file
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/DiscriminantProcess/bpelContent/bpel-deploy.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.project
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.project (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.project 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>bpel_scope</name>
+ <comment></comment>
+ <projects>
+ <project>bpel_scope</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.bpel.validator.builder</name>
+ <arguments>
+ <dictionary>
+ <key>debug</key>
+ <value>false</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.project
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.component 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="bpel_scope">
+ <wb-resource deploy-path="/" source-path="/bpelContent"/>
+ <dependent-module deploy-path="/" handle="module:/org.jboss.ide.eclipse.as.wtp.core.vcf.outputFolders/">
+ <dependency-type>consumes</dependency-type>
+ </dependent-module>
+ </wb-module>
+</project-modules>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.component
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jbt.bpel.facet.core"/>
+ <installed facet="jbt.bpel.facet.core" version="2.0"/>
+</faceted-project>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/bpel-deploy.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/bpel-deploy.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/bpel-deploy.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" xmlns:examples="http://www.jboss.org/bpel/examples">
+ <process name="examples:scope">
+ <active>true</active>
+ <retired>false</retired>
+ <process-events generate="all"/>
+ <provide partnerLink="scopeProcess">
+ <service name="examples:scopeService" port="scopeServicePort"/>
+ </provide>
+ </process>
+</deploy>
\ No newline at end of file
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/bpel-deploy.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpel
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpel (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpel 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,35 @@
+<process name="scope"
+ suppressJoinFailure="yes"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns="http://www.jboss.org/bpel/examples"
+ xmlns:types="http://www.jboss.org/bpel/examples/types" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+
+ <import importType="http://schemas.xmlsoap.org/wsdl/"
+ location="scope.wsdl"
+ namespace="http://www.jboss.org/bpel/examples" />
+
+
+
+ <partnerLinks>
+ <partnerLink name="scopeProcess" myRole="scopeProcess" partnerLinkType="ns:scopeProcess" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="inputMessage" messageType="ns:scopeRequestMessage" />
+ <variable name="outputMessage" messageType="ns:scopeResponseMessage" />
+ <bpel:variable name="exceptionMessage" messageType="ns:Exception" />
+ <!-- TODO: move this variable to the outerScope -->
+ <variable name="localVariable" type="xsd:string" />
+ </variables>
+
+ <sequence>
+
+
+
+
+
+
+ </sequence>
+</process>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpel
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpelex
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpelex (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpelex 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extensionmodel:ExtensionMap xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:extensionmodel="http:///extensionmodel.ecore" xmlns:org.eclipse.bpel.ui.uiextensionmodel="http:///org/eclipse/bpel/ui/uiextensionmodel.ecore" namespace="http://org.eclipse.bpel.ui/">
+ <extensions>
+ <extendedObject href="scope.bpel#/"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ProcessExtension" modificationStamp="1294070930000"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="scope.bpel#//@activity"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="scope.bpel#//@variables/(a)children.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="scope.bpel#//@variables/(a)children.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="scope.bpel#//@variables/(a)children.2"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+</extensionmodel:ExtensionMap>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.bpelex
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.wsdl
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.wsdl (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.wsdl 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <wsdl:types>
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.jboss.org/bpel/examples">
+
+ <xsd:complexType name="scopeFault">
+ <xsd:sequence>
+ <xsd:element name="faultMessage" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="scopeReqest">
+ <xsd:sequence>
+ <xsd:element name="simulateException" type="xsd:boolean"/>
+ <xsd:element name="compensate" type="xsd:boolean"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="scopeRequestMessage">
+ <wsdl:part name="payload" type="tns:scopeReqest" />
+ </wsdl:message>
+ <wsdl:message name="scopeResponseMessage">
+ <wsdl:part name="result" type="xsd:string" />
+ </wsdl:message>
+ <wsdl:message name="Exception">
+ <wsdl:part name="message" type="tns:scopeFault"/>
+ </wsdl:message>
+
+ <wsdl:portType name="scopePT">
+ <wsdl:operation name="processRequest">
+ <wsdl:input message="tns:scopeRequestMessage" />
+ <wsdl:output message="tns:scopeResponseMessage" />
+ <wsdl:fault message="tns:Exception" name="Exception" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="scopeServiceBinding" type="tns:scopePT">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="processRequest">
+ <soap:operation soapAction="http://www.jboss.org/bpel/examples/receiveOrder" />
+ <wsdl:input>
+ <soap:body use="literal" namespace="http://www.jboss.org/bpel/examples" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" namespace="http://www.jboss.org/bpel/examples" />
+ </wsdl:output>
+ <wsdl:fault name="Exception">
+ <soap:fault use="literal" name="Exception" namespace="http://www.jboss.org/bpel/examples" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="scopeService">
+ <wsdl:port name="scopeServicePort" binding="tns:scopeServiceBinding">
+ <soap:address location="http://localhost:8080/Quickstart_bpel_scopeWS" />
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="scopeProcess">
+ <plnk:role name="scopeProcess" portType="tns:scopePT"/>
+ </plnk:partnerLinkType>
+
+</wsdl:definitions>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/bpelContent/scope.wsdl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/build.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/build.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/build.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,60 @@
+<project name="Quickstart_bpel_scope" default="deploy" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <macrodef name="soap">
+ <attribute name="url"/>
+ <attribute name="message"/>
+ <sequential>
+ <echo>Send test message to: ${ant.project.name}</echo>
+ <java classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
+ <arg value="@{url}"/>
+ <arg value="@{message}"/>
+ <classpath>
+ <fileset dir="../../common/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ <pathelement path="${java.class.path}"/>
+ </classpath>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <!-- Import the base Ant build script... -->
+ <property file="../../../install/deployment.properties" />
+
+ <property name="version" value="1" />
+
+ <property name="server.dir" value="${org.jboss.as.home}/server/${org.jboss.as.config}"/>
+ <property name="conf.dir" value="${server.dir}/conf"/>
+ <property name="deploy.dir" value="${server.dir}/deploy"/>
+ <property name="server.lib.dir" value="${server.dir}/lib"/>
+
+ <property name="sample.jar.name" value="${ant.project.name}-${version}.jar" />
+
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <jar basedir="bpelContent" destfile="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+ <target name="sendok">
+ <soap url="http://localhost:8080/Quickstart_bpel_scopeWS" message="messages/ok.xml"/>
+ </target>
+
+ <target name="sendfail">
+ <soap url="http://localhost:8080/Quickstart_bpel_scopeWS" message="messages/fail.xml"/>
+ </target>
+
+ <target name="sendcompensate">
+ <soap url="http://localhost:8080/Quickstart_bpel_scopeWS" message="messages/compensate.xml"/>
+ </target>
+
+</project>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/build.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/compensate.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/compensate.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/compensate.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exam="http://www.jboss.org/bpel/examples">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <exam:processRequest>
+ <payload>
+ <simulateException>true</simulateException>
+ <compensate>true</compensate>
+ </payload>
+ </exam:processRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/compensate.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/fail.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/fail.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/fail.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exam="http://www.jboss.org/bpel/examples">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <exam:processRequest>
+ <payload>
+ <simulateException>true</simulateException>
+ <compensate>false</compensate>
+ </payload>
+ </exam:processRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/fail.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/ok.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/ok.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/ok.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exam="http://www.jboss.org/bpel/examples">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <exam:processRequest>
+ <payload>
+ <simulateException>false</simulateException>
+ <compensate>false</compensate>
+ </payload>
+ </exam:processRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/messages/ok.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/readme.txt
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/readme.txt (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/readme.txt 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,32 @@
+Quickstart Examples - Scope
+===========================
+
+This example focuses on the Scope activity: its uses, parts and syntax. Scopes
+provide a way to organize the activities within a BPEL process. They also
+provide context for variables, fault handling, compensation, event handling
+and correlation sets.
+
+Three possible messages can be used to trigger the process. These are:
+ - ok.xml - demonstrates a standard process execution path
+ - fail.xml - demonstrates throw and rethrow activities and a fault handler
+ - compensate.xml - demonstrates scope compensation.
+
+To deploy the example, open a command line window in the example's folder,
+and simply type 'ant deploy'. To undeploy, use the command 'ant undeploy'.
+
+To test the example, for example using the SOAPUI client, an example 'ok',
+'fail' and 'compensate' message can be found in the messages sub-folder, with the
+relevant WSDL being located in the bpel sub-folder.
+
+Alternatively, use the 'ant sendok', 'ant sendfail' or 'ant sendcompensate' commands
+(from a command line window) to send either message.
+
+NOTE: The "ant deploy" command will by default deploy version 1 of the
+example to the server. If you wish to change the example, and redeploy,
+then you will need to update the version number in the build.xml, or
+override the version property, e.g. "ant -Dversion=2 deploy" (and similarly
+when undeploying "ant -Dversion=2 undeploy").
+
+Some handy URLs:
+http://localhost:8080/bpel-console is the BPEL console
+http://localhost:8080/Quickstart_bpel_scope_pickWS?wsdl is the URL to the BPEL process' WSDL
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/ScopeProcess/readme.txt
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/.project
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/.project (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/.project 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>bpel_triple_hello</name>
+ <comment></comment>
+ <projects>
+ <project>bpel_process_versioning</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.bpel.validator.builder</name>
+ <arguments>
+ <dictionary>
+ <key>debug</key>
+ <value>false</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/.project
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/deploy.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/deploy.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/deploy.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,29 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+ xmlns:bpl="http://www.jboss.org/bpel/examples"
+ xmlns:intf="http://www.jboss.org/bpel/examples/wsdl">
+
+ <process name="bpl:TripleHello">
+ <active>true</active>
+ <provide partnerLink="tripleHelloPartnerLink">
+ <service name="intf:TripleHelloService" port="TripleHelloPort"/>
+ </provide>
+ </process>
+</deploy>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/deploy.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpel
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpel (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpel 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,33 @@
+<process name="TripleHello"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:ns="http://www.jboss.org/bpel/examplesArtifacts">
+
+ <import location="triple_hello.wsdl"
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="tripleHelloPartnerLink"
+ partnerLinkType="intf:TripleHelloPartnerLinkType"
+ myRole="me" />
+ </partnerLinks>
+
+ <!--correlationSets xmlns:cor="http://example.com/supplyCorrelation">
+ <correlationSet name="Session" />
+ </correlationSets-->
+
+ <variables>
+ <variable name="myHelloVar" messageType="intf:HelloMessage" />
+ <variable name="mesgVar" type="xsd:string" />
+ </variables>
+
+ <sequence>
+
+ </sequence>
+</process>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpel
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpelex
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpelex (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpelex 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extensionmodel:ExtensionMap xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:extensionmodel="http:///extensionmodel.ecore" xmlns:org.eclipse.bpel.ui.uiextensionmodel="http:///org/eclipse/bpel/ui/uiextensionmodel.ecore" namespace="http://org.eclipse.bpel.ui/">
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@variables/(a)children.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@variables/(a)children.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/@activities.1/(a)copy.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/@activities.1/(a)copy.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.2"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.3"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.4"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/@activities.4/(a)copy.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/@activities.4/(a)copy.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.5"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.6"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.7"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/@activities.7/(a)copy.0"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/@activities.7/(a)copy.1"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#//@activity/(a)activities.8"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="triple_hello.bpel#/"/>
+ <extensionObject xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ProcessExtension" modificationStamp="1294649189000"/>
+ </extensions>
+</extensionmodel:ExtensionMap>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.bpelex
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.wsdl
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.wsdl (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.wsdl 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<wsdl:definitions
+ targetNamespace="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns:types="http://www.jboss.org/bpel/examples/xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:types>
+ </wsdl:types>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="ID" type="xsd:int"/>
+ <wsdl:part name="Name" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="TripleHelloPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage"/>
+ <wsdl:output message="tns:HelloMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="TripleHelloSoapBinding" type="tns:TripleHelloPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="TripleHelloService">
+ <wsdl:port name="TripleHelloPort" binding="tns:TripleHelloSoapBinding">
+ <soap:address location="http://localhost:8080/Quickstart_bpel_triple_hello"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="TripleHelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:TripleHelloPortType"/>
+ <plnk:role name="you" portType="tns:TripleHelloPortType"/>
+ </plnk:partnerLinkType>
+
+</wsdl:definitions>
+
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/bpelContent/triple_hello.wsdl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/build.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/build.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/build.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,36 @@
+<project name="Quickstart_bpel_triple_hello" default="deploy" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property file="../../../install/deployment.properties" />
+
+ <property name="version" value="1" />
+
+ <property name="server.dir" value="${org.jboss.as.home}/server/${org.jboss.as.config}"/>
+ <property name="conf.dir" value="${server.dir}/conf"/>
+ <property name="deploy.dir" value="${server.dir}/deploy"/>
+ <property name="server.lib.dir" value="${server.dir}/lib"/>
+
+ <property name="sample.jar.name" value="${ant.project.name}-1.jar" />
+
+ <macrodef name="deploy">
+ <attribute name="app"/>
+ <sequential>
+ <echo message="Deploying application @{app}"/>
+ <mkdir dir="build"/>
+ <copy file="@{app}" todir="${deploy.dir}" />
+ </sequential>
+ </macrodef>
+
+ <target name="deploy">
+ <jar basedir="bpelContent" destfile="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+ <target name="undeploy">
+ <delete file="${deploy.dir}/${sample.jar.name}"/>
+ </target>
+
+</project>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/build.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/messages/hello.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/messages/hello.xml (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/messages/hello.xml 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,9 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:hello>
+ <ID>10</ID>
+ <Name>BPEL</Name>
+ </wsdl:hello>
+ </soapenv:Body>
+</soapenv:Envelope>
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/TrippleHello/messages/hello.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/test_project.zip
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/test_project.zip
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartEvent.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartEvent.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartEvent.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,40 @@
+package org.jboss.tools.bpel.ui.bot.ext.widgets;
+
+import java.util.Properties;
+
+import org.eclipse.gef.EditPart;
+
+public class BPELEditPartEvent {
+
+ EditPart editpart;
+
+ Properties properties;
+
+
+ public BPELEditPartEvent(EditPart editpart) {
+ this(editpart, new Properties());
+ }
+
+ public BPELEditPartEvent(EditPart editpart, String[] attribs, String[] vals) {
+ this.editpart = editpart;
+ this.properties = new Properties();
+ for(int i=0; i<attribs.length; i++) {
+ properties.put(attribs[i], vals[i]);
+ }
+ }
+
+ public BPELEditPartEvent(EditPart editpart, Properties changedProperties) {
+ this.editpart = editpart;
+ this.properties = changedProperties;
+ }
+
+ public Properties getChangedProperties() {
+ return properties;
+ }
+
+ public EditPart getEditPart() {
+ return editpart;
+ }
+
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartEvent.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartListener.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartListener.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartListener.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,44 @@
+package org.jboss.tools.bpel.ui.bot.ext.widgets;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+import org.eclipse.bpel.model.impl.ExtensibleElementImpl;
+import org.jboss.tools.bpel.ui.bot.test.assertion.BPELValidator;
+import org.junit.Assert;
+
+public class BPELEditPartListener {
+
+ Logger log = Logger.getLogger(BPELEditPartListener.class);
+
+ BPELValidator validator = new BPELValidator();
+
+ public void editFinished(BPELEditPartEvent event) {
+ log.info("Edited part: " + event.getEditPart());
+ ExtensibleElementImpl impl = null;
+ try {
+ impl = (ExtensibleElementImpl) event.getEditPart().getModel();
+ Class<?> clazz = impl.getClass();
+ Method m = validator.getClass().getMethod("validate", clazz, Properties.class);
+ m.invoke(validator, clazz.cast(impl), event.getChangedProperties());
+ } catch (NoSuchMethodException e) {
+ throw new RuntimeException(e);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ // rethrow exception if it's an AssertionError coming from jUnit
+ if(e.getCause() instanceof AssertionError) {
+ log.error(e.getMessage(), e.getCause());
+ throw ((AssertionError) e.getCause());
+ }
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void childRemoved(BPELEditPartEvent event) {
+ log.info("Removed part: " + event.getEditPart());
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BPELEditPartListener.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BotBpelEditor.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BotBpelEditor.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BotBpelEditor.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,987 @@
+package org.jboss.tools.bpel.ui.bot.ext.widgets;
+
+import java.io.IOError;
+import java.util.List;
+
+import javax.swing.KeyStroke;
+
+import org.eclipse.bpel.model.Else;
+import org.eclipse.bpel.model.If;
+import org.eclipse.bpel.model.OnAlarm;
+import org.eclipse.bpel.model.Pick;
+import org.eclipse.bpel.model.impl.ActivityImpl;
+import org.eclipse.bpel.model.impl.CatchImpl;
+import org.eclipse.bpel.model.impl.CompensationHandlerImpl;
+import org.eclipse.bpel.model.impl.FaultHandlerImpl;
+import org.eclipse.bpel.model.impl.OnMessageImpl;
+import org.eclipse.bpel.model.impl.ScopeImpl;
+import org.eclipse.bpel.model.impl.SequenceImpl;
+
+import org.eclipse.gef.EditPart;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.AssertionFailedException;
+import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+
+import org.jboss.tools.ui.bot.ext.widgets.SWTBotMultiPageEditor;
+import org.junit.Assert;
+
+/**
+ * TODO: - add support for catchAll to fault handlers
+ *
+ * @author mbaluch
+ *
+ */
+public class BotBpelEditor extends SWTBotMultiPageEditor {
+
+ SWTBotGefEditor gefEditor;
+
+ SWTBotPropertiesView propertiesView;
+
+ SWTBotGefEditPart selectedPart;
+
+ BPELEditPartListener listener;
+
+ /**
+ * Creates a new instance of SWTBotBPELEditor
+ *
+ * @param gefEditor
+ * @param bot
+ */
+ public BotBpelEditor(SWTBotGefEditor gefEditor, SWTWorkbenchBot bot) {
+ super(gefEditor.getReference(), bot);
+
+ this.gefEditor = gefEditor;
+ this.propertiesView = new SWTBotPropertiesView(bot);
+ this.listener = new BPELEditPartListener();
+
+ EditPartEventLogger eventLogger = new EditPartEventLogger();
+ SWTBotGefEditPart mainSequencePart = gefEditor
+ .mainEditPart().children().get(1);
+ mainSequencePart.part().addEditPartListener(eventLogger);
+ select(mainSequencePart);
+ }
+
+ /**
+ * TODO: the line on which the variable is declared needs to be selected (caret needs to present) otherwise
+ * propertries will not change and type selection will not work
+ * @param name
+ * @param type
+ */
+ public void addVariable(String name, String type) {
+// activatePage("Source");
+// SWTBotEclipseEditor textEditor = gefEditor.toTextEditor();
+// int line = getLine("(.)*<variables>(.)*");
+// textEditor.insertText(line, textEditor.getLines().get(line).length(), "\n");
+// line++;
+// textEditor.insertText(line, 0, "\t\t<variable name=\"" + name + "\"/>");
+// textEditor.setFocus();
+// textEditor.navigateTo(line, 0);
+// textEditor.selectLine(line);
+// textEditor.contextMenu(text);
+// propertiesView.selectTab(1);
+// SWTBot propsBot = propertiesView.bot();
+// propsBot.button("Browse...");
+//
+// SWTBot viewBot = bot.shell("Choose type of variable").bot();
+// try {
+// viewBot.radio("From Imports").click();
+// viewBot.table().select(type);
+// } catch (Exception e) {
+// e.printStackTrace();
+// viewBot.radio("From Project").click();
+// viewBot.table().select(type);
+// }
+// activatePage("Design");
+ throw new UnsupportedOperationException();
+ }
+
+ public void addCorrelationSet(String name) {
+ SWTBotEclipseEditor textEditor = gefEditor.toTextEditor();
+ int correlationSetsLine = getLine("(.)*<correlationSets(.)*");
+ if(correlationSetsLine == -1) {
+ int pl = getLine("(.)*</partnerLinks>(.)*");
+ textEditor.insertText(pl + 1, 0, "\t<correlationSets>\n\n\t</correlationSets>");
+ correlationSetsLine = pl + 2;
+ } else {
+ textEditor.insertText(correlationSetsLine, textEditor.getLines().get(correlationSetsLine).length(), "\n");
+ correlationSetsLine++;
+ }
+ textEditor.insertText(correlationSetsLine, 0, "\t\t<correlationSet name=\"" + name + "\"></bpel:correlationSet>");
+ textEditor.selectLine(correlationSetsLine);
+ }
+
+ public void addCorrelationProperty(String correlationSet, String name) {
+// activatePage("Source");
+// SWTBotEclipseEditor textEditor = gefEditor.toTextEditor();
+// // select correlation set
+// int line = -1;
+// List<String> lines = textEditor.getLines();
+// for(int i=0; i<lines.size(); i++) {
+// if(lines.get(i).matches("(.)*correlationSet(.)*name=\"" + correlationSet + "\"(.)*")) {
+// line = i;
+// }
+// System.out.println(i + ") '" + lines.get(i) + "'");
+// }
+// System.out.println("Selecting line=" + line);
+// textEditor.selectLine(line);
+// activatePage("Design");
+//
+// // setup properties
+// propertiesView.selectTab(1);
+// SWTBot propsBot = propertiesView.bot();
+// propsBot.button("Add...").click();
+//
+// SWTBot propsViewBot = bot.shell("Select a Property").bot();
+// propsViewBot.button("New...").click();
+//
+// SWTBot newPropViewBot = bot.shell("Create Message Property").bot();
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Generate code:
+ *
+ * {@code
+ * <bpel:assign name="${label}">
+ * </bpel:assign>
+ * }
+ *
+ * @param name
+ * @return
+ */
+ protected BotBpelEditor addAssign(String name) {
+ appendActivity("Assign", name);
+ propertiesView.selectTab(1);
+ SWTBot propertiesBot = propertiesView.bot();
+ try {
+ propertiesBot.list().select("? to ?");
+ propertiesBot.button("Delete").click();
+ } catch (AssertionFailedException e) {
+ log.info(e.getMessage());
+ }
+ save();
+ return this;
+ }
+
+// public SWTBotGefEditPart addCopyVarToVar(SWTBotGefEditPart assignPart, String[] from, String[] to) {
+// setFocus(assignPart);
+// propsView.selectTab(1);
+// SWTBot propsBot = propsView.bot();
+// propsBot.button("New").click();
+// propsBot.tree(0).expandNode(from).select();
+// propsBot.tree(1).expandNode(to).select();
+// save();
+// // Initializer
+// try {
+// log.info("Initializer view was opened ... clicking YES.");
+// bot.shell("Initializer").bot().button("Yes").click();
+// } catch (Exception e) {
+// log.warn(e.getMessage());
+// log.info("Initializer view was not opened.");
+// }
+// return assignPart;
+// }
+//
+// // TODO - return just the new <copy></copy> element
+// public SWTBotGefEditPart addCopyVarToExpresion(SWTBotGefEditPart assignPart, String[] from, String exp) {
+// setFocus(assignPart);
+// propsView.selectTab(1);
+// SWTBot propsBot = propsView.bot();
+// propsBot.button("New").click();
+// propsBot.comboBox(1).setSelection("Expression");
+// propsBot.tree().expandNode(from).select();
+// propsBot.styledText().setText(exp);
+// save();
+//
+// return assignPart;
+// }
+//
+// public SWTBotGefEditPart addCopyExpressionToExpression(SWTBotGefEditPart assignPart, String from, String to) {
+// setFocus(assignPart);
+// propsView.selectTab(1);
+// SWTBot propsBot = propsView.bot();
+// propsBot.button("New").click();
+// propsBot.comboBox(0).setSelection("Expression");
+// propsBot.styledText(0).setText(from);
+//
+// propsBot.comboBox(2).setSelection("Expression");
+// propsBot.styledText(1).setText(to);
+// save();
+//
+// return assignPart;
+// }
+//
+//
+// public SWTBotGefEditPart addCopyFixedToExpression(SWTBotGefEditPart assignPart, String from, String to) {
+// setFocus(assignPart);
+// propsView.selectTab(1);
+// SWTBot propsBot = propsView.bot();
+// propsBot.button("New").click();
+// propsBot.comboBox(0).setSelection("Fixed Value");
+// propsBot.comboBox(1).setSelection("Expression");
+//
+// propsBot.text().setText(from);
+// propsBot.styledText().setText(to);
+// save();
+//
+// return assignPart;
+// }
+//
+// public SWTBotGefEditPart addCopyFixedToVar(SWTBotGefEditPart assignPart, String exp, String[] to) {
+// setFocus(assignPart);
+// propsView.selectTab(1);
+// SWTBot propsBot = propsView.bot();
+// propsBot.button("New").click();
+// propsBot.comboBox(0).setSelection("Fixed Value");
+// propsBot.text().setText(exp);
+// propsBot.tree().expandNode(to).select();
+// save();
+// // Initializer
+// try {
+// log.info("Initializer view was opened ... clicking YES.");
+// bot.shell("Initializer").bot().button("Yes").click();
+// } catch (Exception e) {
+// log.warn(e.getMessage());
+// log.info("Initializer view was not opened.");
+// }
+// return assignPart;
+// }
+
+ public BotBpelEditor addAssignVarToVar(String label, String[] from, String[] to) {
+ addAssign(label);
+ propertiesView.selectTab(1);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.button("New").click();
+ propertiesBot.tree(0).expandNode(from).select();
+ propertiesBot.tree(1).expandNode(to).select();
+ save();
+ // Initializer
+ try {
+ log.info("Initializer view was opened ... choosing Yes.");
+ bot.shell("Initializer").bot().button("Yes").click();
+ } catch (Exception e) {
+ log.warn(e.getMessage());
+ log.info("Initializer view was not opened.");
+ }
+
+ fireEditFinished(selectedPart.part(), new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addAssignVarToExpression(String label, String[] from, String exp) {
+ addAssign(label);
+ propertiesView.selectTab(1);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.button("New").click();
+ propertiesBot.comboBox(1).setSelection("Expression");
+ propertiesBot.tree().expandNode(from).select();
+ propertiesBot.styledText().setText(exp);
+ save();
+
+ fireEditFinished(selectedPart.part(), new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addAssignExpressionToExpression(String label, String from, String to) {
+ addAssign(label);
+ propertiesView.selectTab(1);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.button("New").click();
+ propertiesBot.comboBox(0).setSelection("Expression");
+ propertiesBot.styledText(0).setText(from);
+
+ propertiesBot.comboBox(2).setSelection("Expression");
+ propertiesBot.styledText(1).setText(to);
+ save();
+
+ fireEditFinished(selectedPart.part(), new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addAssignFixedToExpression(String label, String fixed, String expression) {
+ addAssign(label);
+ propertiesView.selectTab(1);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.button("New").click();
+ propertiesBot.comboBox(0).setSelection("Fixed Value");
+ propertiesBot.comboBox(1).setSelection("Expression");
+
+ propertiesBot.text().setText(fixed);
+ propertiesBot.styledText().setText(expression);
+
+ fireEditFinished(selectedPart.part(), new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ save();
+ return this;
+ }
+
+ // TODO - Test me!
+ public BotBpelEditor addAssignFixedToVar(String label, String exp, String[] to) {
+ addAssign(label);
+ propertiesView.selectTab(1);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.button("New").click();
+ propertiesBot.comboBox(0).setSelection("Fixed Value");
+ propertiesBot.text().setText(exp);
+ propertiesBot.tree().expandNode(to).select();
+ save();
+ // Initializer
+ try {
+ log.info("Initializer view was opened ... clicking YES.");
+ bot.shell("Initializer").bot().button("Yes").click();
+ } catch (Exception e) {
+ log.warn(e.getMessage());
+ log.info("Initializer view was not opened.");
+ }
+
+ fireEditFinished(selectedPart.part(), new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addInvoke(String label, String in, String out, String partnerLink, String operation) {
+ appendActivity("Invoke", label);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propertiesBot.text(0).setText(partnerLink).pressShortcut(Keystrokes.LF);
+ propertiesBot.text(1).setText(operation).pressShortcut(Keystrokes.LF);
+ propertiesBot.text(2).setText(in);
+ propertiesBot.text(3).setText(out);
+ // Save changes to update process model
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name", "partnerLink", "operation", "inputVariable", "outputVariable"},
+ new String[] {label, partnerLink, operation, in, out});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addInvoke(String label, String in, String out, String[] operationInfo) {
+ appendActivity("Invoke", label);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propertiesBot.tree().expandNode(operationInfo).select();
+ propertiesBot.text(2).setText(in);
+ propertiesBot.text(3).setText(out);
+ // Save changes to update process model
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name", "partnerLink", "operation", "inputVariable", "outputVariable"},
+ new String[] {label, operationInfo[0], operationInfo[2], in, out});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addReceive(String label, String var, String partnerLink, String operation, boolean createInstance) {
+ appendActivity("Receive", label);
+ propertiesView.selectTab(1);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.text(0).setText(partnerLink).pressShortcut(Keystrokes.LF);
+ propertiesBot.text(1).setText(operation).pressShortcut(Keystrokes.LF);
+ if(createInstance) {
+ propertiesBot.checkBox(1).select();
+ }
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name", "partnerLink", "operation", "variable", "createInstance"},
+ new String[] {label, partnerLink, operation, var, Boolean.toString(createInstance)});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addReceive(String label, String var, String[] operationInfo, boolean createInstance) {
+ appendActivity("Receive", label);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propertiesBot.tree().expandNode(operationInfo).select();
+ propertiesBot.text(2).setText(var);
+ if(createInstance) {
+// propertiesBot.checkBox("Create a new Process instance if one does not already exist").select();
+ propertiesBot.checkBox(1).select();
+ }
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name", "partnerLink", "operation", "variable", "createInstance"},
+ new String[] {label, operationInfo[0], operationInfo[2], var, Boolean.toString(createInstance)});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addReply(String label, String var, String partnerLink, String operation, String fault) {
+ appendActivity("Reply", label);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propertiesBot.text(0).setText(partnerLink).pressShortcut(Keystrokes.LF);
+ propertiesBot.text(1).setText(operation).pressShortcut(Keystrokes.LF);
+ propertiesBot.text(2).setText(fault != null ? fault : "");
+ propertiesBot.text(3).setText(var);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ // TODO add fault
+ fireEditFinished(part.part(), new String[] {"name", "partnerLink", "operation", "variable"},
+ new String[] {label, partnerLink, operation, var});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addReply(String label, String var, String fault, String[] operationInfo) {
+ appendActivity("Reply", label);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propertiesBot.tree().expandNode(operationInfo).select();
+ propertiesBot.text(2).setText(fault != null ? fault : "");
+ propertiesBot.text(3).setText(var);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ // TODO add createInstance, fault
+ fireEditFinished(part.part(), new String[] {"name", "partnerLink", "operation", "variable"},
+ new String[] {label, operationInfo[0], operationInfo[2], var});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ /**
+ * Generate code:
+ *
+ * {@code
+ * <bpel:if name="${label}">
+ * <bpel:condition><![CDATA[${expression}]]></bpel:condition>
+ * </bpel:if>
+ * }
+ *
+ * @param label name of the activity
+ * @param expression condition expression
+ * @return
+ */
+ public BotBpelEditor addIf(String label, String condition) {
+ appendActivity("If", label);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propertiesBot.button("Create a New Condition").click();
+ propertiesBot.styledText().setText(condition);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name", "condition"}, new String[] {label, condition});
+ select(part);
+ return this;
+ }
+
+ public BotBpelEditor addElseIf(String ifLabel, String condition) {
+ SWTBotGefEditPart ifPart = getEditPart(selectedPart, ifLabel);
+ if(ifPart == null || !(ifPart.part().getModel() instanceof If)) {
+ throw new RuntimeException("Pick not found: " + ifLabel);
+ }
+ select(ifPart);
+ gefEditor.clickContextMenu("Add ElseIf");
+ // get elseIf container
+ SWTBotGefEditPart elseIf = null;
+ List<SWTBotGefEditPart> children = ifPart.children();
+ elseIf = children.get(children.size() - 1);
+ if(elseIf.part().getModel() instanceof Else) {
+ elseIf = children.get(children.size() - 2);
+ }
+ select(elseIf);
+ // setup properties
+ propertiesView.selectTab(0);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.button("Create a New Condition").click();
+ propertiesBot.styledText().setText(condition);
+ save();
+ fireEditFinished(elseIf.part(), new String[] {"condition"}, new String[] {condition});
+ return this;
+ }
+
+ public BotBpelEditor addElse(String ifLabel) {
+ SWTBotGefEditPart ifPart = getEditPart(selectedPart, ifLabel);
+ if(ifPart == null || !(ifPart.part().getModel() instanceof If)) {
+ throw new RuntimeException("Pick not found: " + ifLabel);
+ }
+ select(ifPart);
+ gefEditor.clickContextMenu("Add Else");
+ // get elseIf container
+ SWTBotGefEditPart elsePart = null;
+ List<SWTBotGefEditPart> children = ifPart.children();
+ elsePart = children.get(children.size() - 1);
+ select(elsePart);
+ save();
+ fireEditFinished(elsePart.part(), new String[] {}, new String[] {});
+ return this;
+ }
+
+ public BotBpelEditor addValidate(String label, String ... variables) {
+ appendActivity("Validate", label);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propertiesBot.button("Add").click();
+
+ SWTBotShell shell = bot.shell("Select Variable").activate();
+ SWTBot viewBot = shell.bot();
+ SWTBotTable table = viewBot.table();
+ table.select(variables);
+ viewBot.button("OK").click();
+ save();
+
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ StringBuilder varsb = new StringBuilder();
+ for(String s : variables) {
+ varsb.append(s + " ");
+ }
+ fireEditFinished(part.part(), new String[] {"name", "variables"}, new String[] {label, varsb.toString().trim()});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addEmpty(String label) {
+ appendActivity("Empty", label);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ /**
+ * Generate code:
+ *
+ * {@code
+ * <bpel:pick name="${label}" createInstance="${createInstance}">
+ * <bpel:onMessage partnerLink="client" operation="calculateDiscriminant" variable="DiscriminantRequest"></bpel:onMessage>
+ * </bpel:pick>
+ * }
+ * @param label
+ * @param createInstance
+ * @param in
+ * @param operationInfo
+ * @return
+ */
+ public BotBpelEditor addPick(String label, boolean createInstance, String in, String[] operationInfo) {
+ appendActivity("Pick", label);
+ // setup pick properties
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ if(createInstance) {
+ propertiesBot.checkBox().select();
+ }
+
+ SWTBotGefEditPart pickPart = selectedPart;
+ SWTBotGefEditPart onMessagePart = getEditPartByClass(pickPart, OnMessageImpl.class);
+ save();
+ // TODO add "createInstance" = "yes" if createInstance is true
+ fireEditFinished(pickPart.part(), new String[] {"name"}, new String[] {label});
+ // setup onMessage properties
+ select(onMessagePart);
+ propertiesBot = propertiesView.bot();
+ propertiesBot.tree().expandNode(operationInfo).select();
+ propertiesBot.text(2).setText(in);
+ save();
+ fireEditFinished(onMessagePart.part(), new String[] {"variable", "partnerLink", "operation"},
+ new String[] {in, operationInfo[0], operationInfo[2]});
+ return this;
+ }
+
+ public BotBpelEditor addOnMessage(String pickLabel, String in, String[] operationInfo) {
+ SWTBotGefEditPart pick = getEditPart(selectedPart, pickLabel);
+ if(pick == null || !(pick.part().getModel() instanceof Pick)) {
+ throw new RuntimeException("Pick not found: " + pickLabel);
+ }
+ select(pick);
+ gefEditor.clickContextMenu("Add OnMessage");
+
+ // get onMessage container
+ SWTBotGefEditPart onMessage = null;
+ List<SWTBotGefEditPart> children = pick.children();
+ onMessage = children.get(children.size() - 1);
+ if(onMessage.part().getModel() instanceof OnAlarm) {
+ onMessage = children.get(children.size() - 2);
+ }
+ select(onMessage);
+ // setup properties
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.tree().expandNode(operationInfo).select();
+ propertiesBot.text(2).setText(in);
+ save();
+ fireEditFinished(onMessage.part(), new String[] {"variable", "partnerLink", "operation"}, new String[] {in, operationInfo[0], operationInfo[2]});
+ return this;
+ }
+
+ public BotBpelEditor addOnAlarm(String pickLabel, String condition) {
+ SWTBotGefEditPart pick = getEditPart(selectedPart, pickLabel);
+ if(pick == null || !(pick.part().getModel() instanceof Pick)) {
+ throw new RuntimeException("Pick not found: " + pickLabel);
+ }
+ select(pick);
+ gefEditor.clickContextMenu("Add OnAlarm");
+
+ // get onAlarm container
+ List<SWTBotGefEditPart> children = pick.children();
+ SWTBotGefEditPart onAlarm = children.get(children.size() - 1);
+ select(onAlarm);
+ // setup properties
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.button("Create a New Condition").click();
+ propertiesBot.comboBox(1).setSelection("Text");
+ propertiesBot.styledText().setText(condition);
+ save();
+ fireEditFinished(onAlarm.part(), new String[] {"for"}, new String[] {condition});
+ // TODO: select scope -- required if we wan't to add a compensation handler
+ return this;
+ }
+
+ public BotBpelEditor addWhile(String label, String condition) {
+ appendActivity("While", label);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propertiesBot.button("Create a New Condition").click();
+ propertiesBot.styledText().setText(condition);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name", "condition"}, new String[] {label, condition});
+ select(part);
+ return this;
+ }
+
+ public BotBpelEditor addForEach(String label, String startExpression, String finalExpression) throws Exception {
+ appendActivity("ForEach", label);
+ SWTBot propsBot = propertiesView.bot();
+ propertiesView.selectTab(2);
+
+ SWTBotButton leftButton = propsBot.button(0);
+ SWTBotButton rightButton = propsBot.button(1);
+
+ leftButton.click();
+ rightButton.click();
+ propsBot.styledText(0).setText(startExpression);
+ // Previous change must be saved otherwise we will see an ugly NPE.
+ // This issue seems to be caused by SWTBot since the exception cannot
+ // be seen by clicking the steps manually.
+ save();
+ propsBot.styledText(1).setText(finalExpression);
+ save();
+ // validate
+ fireEditFinished(selectedPart.part(),
+ new String[] {"name", "startCounterValue", "finalCounterValue"}, new String[] {label, startExpression, finalExpression});
+ // select scope which is a child activity of forEach (that one will be probably modeled next)
+ select(getEditPartByClass(selectedPart, ScopeImpl.class));
+ return this;
+ }
+
+ public BotBpelEditor addRepeatUntil(String label, String condition) {
+ appendActivity("RepeatUntil", label);
+ SWTBot propsBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propsBot.button("Create a New Condition").click();
+ propsBot.styledText().setText(condition);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name", "condition"}, new String[] {label, condition});
+ return this;
+ }
+
+ public BotBpelEditor addWait(String label, String condition) {
+ appendActivity("Wait", label);
+ SWTBot propsBot = propertiesView.bot();
+ propertiesView.selectTab(1);
+ propsBot.button("Create a New Condition").click();
+ propsBot.comboBox(1).setSelection("Text");
+ propsBot.styledText().setText(condition);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name", "for"}, new String[] {label, condition});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addSequence(String label) {
+ appendActivity("Sequence", label);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name"}, new String[] {label});
+ select(getEditPart(selectedPart, label));
+ return this;
+ }
+
+ public BotBpelEditor addFlow(String label) {
+ appendActivity("Flow", label);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name"}, new String[] {label});
+ select(part);
+ return this;
+ }
+
+ public BotBpelEditor addScope(String label, boolean isoalated) {
+ appendActivity("Scope", label);
+ propertiesView.selectTab(1);
+ if(isoalated) {
+ propertiesView.bot().checkBox().select();
+ }
+ save();
+ // TODO add isolated=yes if isolated==true
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name"}, new String[] {label});
+ select(part);
+ return this;
+ }
+
+ public BotBpelEditor addCompensationHandler() {
+ // add the fault handler to selectedPart
+ gefEditor.clickContextMenu("Add Compensation Handler");
+ save();
+
+ SWTBotGefEditPart handlerPart = getEditPartByClass(selectedPart, CompensationHandlerImpl.class);
+ select(handlerPart);
+ SWTBotGefEditPart sequencePart = getEditPartByClass(selectedPart, SequenceImpl.class);
+ select(sequencePart);
+ // Delete sequence (We need to allow to add other activities ... e.g. flow)
+ gefEditor.clickContextMenu("Delete");
+
+ save();
+ select(handlerPart);
+ fireEditFinished(handlerPart.part(), new String[] {}, new String[] {});
+ return this;
+ }
+
+ /**
+ * TODO: there may be the need to set also the faultMessageType field.
+ * NOTE: faultMessageType attribute is not mandatory according to BPEL 2.0 specs.
+ *
+ * @param faultName
+ * @param var
+ * @return
+ */
+ public BotBpelEditor addFaultHandler(String faultName, String var) {
+ // add the fult handler to selectedPart
+ gefEditor.clickContextMenu("Add Fault Handler");
+ save();
+ // setup properties
+ SWTBotGefEditPart handlerPart = getEditPartByClass(selectedPart, FaultHandlerImpl.class);
+ select(handlerPart);
+ SWTBotGefEditPart catchPart = getEditPartByClass(selectedPart, CatchImpl.class);
+ select(catchPart);
+ propertiesView.selectTab(0);
+
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.radio("User-defined").click();
+ propertiesBot.ccomboBox(0).setSelection(faultName);
+ propertiesBot.text().setText(var);
+ save();
+
+ // Delete default activities
+ SWTBotGefEditPart sequencePart = getEditPartByClass(selectedPart, SequenceImpl.class);
+ select(sequencePart);
+ gefEditor.clickContextMenu("Delete");
+
+ // Select catch
+ select(catchPart);
+ fireEditFinished(handlerPart.part(), new String[] {"faultName", "faultVariable"},
+ new String[] {faultName, var});
+
+ return this;
+ }
+
+ public BotBpelEditor addExit(String label) {
+ appendActivity("Exit", label);
+ save();
+ SWTBotGefEditPart part = getEditPart(selectedPart, label);
+ fireEditFinished(part.part(), new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addThrow(String label, String faultName) {
+ appendActivity("Throw", label);
+ propertiesView.selectTab(1);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.radio("User-defined").click();
+ propertiesBot.text().setText(faultName);
+ save();
+ fireEditFinished(getEditPart(selectedPart, label).part(),
+ new String[] {"name", "faultName"}, new String[] {label, faultName});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addRethrow(String label) {
+ appendActivity("Rethrow", label);
+ save();
+ fireEditFinished(getEditPart(selectedPart, label).part(),
+ new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addCompensate(String label) {
+ appendActivity("Compensate", label);
+ save();
+ fireEditFinished(selectedPart.part(), new String[] {"name"}, new String[] {label});
+ select(selectedPart.parent());
+ return this;
+ }
+
+ public BotBpelEditor addCompensateScope(String label, String target) {
+ appendActivity("CompensateScope", label);
+ propertiesView.selectTab(1);
+ SWTBot bot = propertiesView.bot();
+ bot.ccomboBox().setSelection(target);
+ save();
+ fireEditFinished(selectedPart.part(), new String[] {"name", "target"}, new String[] {label, target});
+ select(selectedPart.parent());
+ return this;
+
+ }
+
+ /**
+ * Create a new activity as child of part returned by {@link #getSelectedPart()} and select it.
+ *
+ * @param activity activity type
+ * @param label activity name
+ * @return
+ */
+ public SWTBotGefEditPart appendActivity(String activity, String label) {
+ // make sure to focus the right part
+ select(selectedPart);
+ gefEditor.clickContextMenu("Add").clickContextMenu(activity);
+ propertiesView.selectTab(0);
+ SWTBot propertiesBot = propertiesView.bot();
+ propertiesBot.text(0).setText(label);
+ save();
+ // newly added activity is selected by default
+ selectedPart = getEditPart(selectedPart, label);
+ return selectedPart;
+ }
+
+ /**
+ * Select the first non-leaf activity in the parent activity
+ *
+ * @param parentPart non-leaf parent part
+ * @param branch the number of the branch. this is most usefull when dealing with pick and if activities
+ * @return container part like sequence, scope, for, while ...
+ */
+ public SWTBotGefEditPart getContainerChildPart(SWTBotGefEditPart parentPart, int branch) {
+ throw new UnsupportedOperationException();
+ }
+
+ public SWTBotGefEditPart getSelectedPart() {
+ return selectedPart;
+ }
+
+ public void selectChildPart(SWTBotGefEditPart parentPart, int position) {
+ select(getEditPart(parentPart, position));
+ }
+
+ public void select(SWTBotGefEditPart part) {
+ gefEditor.setFocus();
+ part.select();
+ selectedPart = part;
+ }
+
+ public SWTBotGefEditPart getEditPart(SWTBotGefEditPart fromPart, int index) {
+ List<SWTBotGefEditPart> children = fromPart.children();
+ if(children.size() <= index) {
+ throw new IndexOutOfBoundsException("The part has only " + children.size() + " children.");
+ }
+ return fromPart.children().get(index);
+ }
+
+ public SWTBotGefEditPart getEditPart(SWTBotGefEditPart fromPart, String label) {
+ Object model = fromPart.part().getModel();
+ if(model instanceof ActivityImpl) {
+ ActivityImpl activity = (ActivityImpl) model;
+ if(fromPart.children().isEmpty() && label.equals(activity.getName())) {
+ return fromPart;
+ }
+ }
+ List<SWTBotGefEditPart> allEditParts = fromPart.children();
+ allEditParts.addAll(fromPart.sourceConnections());
+ return getEditPart(allEditParts, label);
+ }
+
+ protected SWTBotGefEditPart getEditPart(List<SWTBotGefEditPart> allEditParts, String label) {
+ for (SWTBotGefEditPart child : allEditParts) {
+ Object model = child.part().getModel();
+ if(model instanceof ActivityImpl) {
+ ActivityImpl activity = (ActivityImpl) child.part().getModel();
+ if (label.equals(activity.getName())) {
+ return child;
+ }
+
+ SWTBotGefEditPart childEditPart = getEditPart(child, label);
+ if (childEditPart != null) {
+ return childEditPart;
+ }
+ }
+ }
+ return null;
+ }
+
+ protected void fireEditFinished(EditPart editpart, String[] attributes, String[] values) {
+ listener.editFinished(new BPELEditPartEvent(editpart, attributes, values));
+ }
+
+ private SWTBotGefEditPart getEditPartByClass(final SWTBotGefEditPart parent, Class<?> modelClass) {
+ for(SWTBotGefEditPart part : parent.children()) {
+ if(modelClass.isInstance(part.part().getModel())) {
+ return part;
+ }
+
+ if(part.children().size() > 0) {
+ SWTBotGefEditPart found = getEditPartByClass(part, modelClass);
+ if(found != null) {
+ return found;
+ }
+ }
+ }
+ return null;
+ }
+
+ private boolean editPartInstanceOf(final SWTBotGefEditPart part, Class<?> modelClass) {
+ return modelClass.isInstance(part.part().getModel());
+ }
+
+ private void printControls(Composite composite) {
+ printControls("", composite);
+ }
+
+ private void printControls(String prefix, Composite composite) {
+ Control[] children = composite.getChildren();
+ for(Control ctrl : children) {
+ if(ctrl instanceof Composite) {
+ Composite c = (Composite) ctrl;
+ if(c.getChildren().length > 0) {
+ printControls(prefix + "\t", c);
+ }
+ }
+ }
+ }
+
+ private int getLine(String regex) {
+// if(!getActivePage().equals("Source")) {
+// activatePage("Source");
+// }
+ SWTBotEclipseEditor textEditor = toTextEditor();
+ int line = -1;
+ List<String> lines = textEditor.getLines();
+ for(int i=0; i<lines.size(); i++) {
+ if(lines.get(i).matches(regex)) {
+ line = i;
+ }
+ }
+ return line;
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/BotBpelEditor.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/EditPartEventLogger.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/EditPartEventLogger.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/EditPartEventLogger.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,45 @@
+package org.jboss.tools.bpel.ui.bot.ext.widgets;
+
+
+import org.apache.log4j.Logger;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartListener;
+
+/**
+ *
+ * @author mbaluch
+ */
+public class EditPartEventLogger implements EditPartListener {
+
+ protected Logger log = Logger.getLogger(EditPartEventLogger.class);
+
+
+ public void editFinished(EditPart editpart) {
+ log.info("Changed part: " + editpart);
+ }
+
+ public void childRemoved(EditPart child) {
+ log.info("Removed part: " + child);
+ }
+
+ //@Override
+ public void removingChild(EditPart child, int index) {
+ log.info("Removing part: " + child);
+ }
+
+ //@Override
+ public void childAdded(EditPart child, int index) {
+ log.info("Added part: " + child);
+ }
+
+ //@Override
+ public void partActivated(EditPart editpart) {}
+
+ //@Override
+ public void partDeactivated(EditPart editpart) {}
+
+ //@Override
+ public void selectedStateChanged(EditPart editpart) {}
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/EditPartEventLogger.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotBPELEditor.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotBPELEditor.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotBPELEditor.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,582 @@
+package org.jboss.tools.bpel.ui.bot.ext.widgets;
+
+import java.util.List;
+
+import org.eclipse.bpel.model.FromPart;
+import org.eclipse.bpel.model.OnAlarm;
+import org.eclipse.bpel.model.OnMessage;
+import org.eclipse.bpel.model.impl.ActivityImpl;
+import org.eclipse.bpel.model.impl.ElseImpl;
+import org.eclipse.bpel.model.impl.IfImpl;
+import org.eclipse.bpel.model.impl.OnAlarmImpl;
+import org.eclipse.bpel.model.impl.OnMessageImpl;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.text.TextFlow;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartListener;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefViewer;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.AssertionFailedException;
+import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+import org.jboss.tools.ui.bot.ext.widgets.SWTBotMultiPageEditor;
+
+
+public class SWTBotBPELEditor extends SWTBotMultiPageEditor {
+
+ private SWTBotGefEditor gEditor;
+
+ private SWTBotPropertiesView propsView;
+
+
+ public SWTBotBPELEditor(SWTBotGefEditor editor, SWTWorkbenchBot bot) {
+ super(editor.getReference(), bot);
+ gEditor = editor;
+ propsView = new SWTBotPropertiesView(bot);
+ propsView.show();
+ }
+
+ public void showPropertiesView() {
+ propsView.show();
+ }
+
+ /** TODO: replace with simple parameters "partnerLink", "operation" when JBIDE-7861 is fixed. */
+ // DONE !
+ public SWTBotGefEditPart addInvoke(SWTBotGefEditPart toPart, String name, String in, String out, String[] operationInfo) {
+ appendActivity(toPart, "Invoke", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ propsBot.tree().expandNode(operationInfo).select();
+ propsBot.text(2).setText(in);
+ propsBot.text(3).setText(out);
+ // Save changes to update process model
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+// log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ /** TODO: see {@link #addInvoke(SWTBotGefEditPart, String, String, String, String...)} */
+ // DONE !
+ public SWTBotGefEditPart addReceive(SWTBotGefEditPart toPart, String name, String var, String[] operationInfo) {
+ appendActivity(toPart, "Receive", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ propsBot.tree().expandNode(operationInfo).select();
+ propsBot.text(2).setText(var);
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+// log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ /**
+ * TODO: see {@link #addInvoke(SWTBotGefEditPart, String, String, String, String...)}
+ * - add faultName
+ *
+ */
+ // DONE !
+ public SWTBotGefEditPart addReply(SWTBotGefEditPart toPart, String name, String var, String[] operationInfo) {
+ appendActivity(toPart, "Reply", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ propsBot.tree().expandNode(operationInfo).select();
+// propsBot.text(2).setText("FaultName");
+ propsBot.text(3).setText(var);
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+// log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ // DONE!
+ public SWTBotGefEditPart addEmpty(SWTBotGefEditPart toPart, String name) {
+ appendActivity(toPart, "Empty", name);
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+ log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+
+ // DONE!
+ public SWTBotGefEditPart addValidate(SWTBotGefEditPart toPart, String name, String ... variables) {
+ appendActivity(toPart, "Validate", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ propsBot.button("Add").click();
+
+ SWTBotShell shell = bot.shell("Select Variable").activate();
+ SWTBot viewBot = shell.bot();
+ SWTBotTable table = viewBot.table();
+ table.select(variables);
+ viewBot.button("OK").click();
+
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+// log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+
+ // DONE!
+ public SWTBotGefEditPart addIf(SWTBotGefEditPart toPart, String name, String condition) {
+ appendActivity(toPart, "If", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ propsBot.button("Create a New Condition").click();
+ propsBot.styledText().setText(condition);
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+ log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ /**
+ * TODO: Change the implementation of this method. At the moment
+ * this method expects a concrete order of child elements !!!
+ * @param ifPart
+ * @return
+ */
+ public SWTBotGefEditPart addElse(SWTBotGefEditPart ifPart) {
+ setFocus(ifPart);
+ gEditor.clickContextMenu("Add Else");
+ save();
+ // get ElsePart
+ List<SWTBotGefEditPart> children = ifPart.children();
+ SWTBotGefEditPart added = children.get(children.size() - 1);
+ log.info("Added [part=" + added + ", name=Unnamed]");
+ return added;
+ }
+
+ /**
+ * TODO: See {@link #addElse(SWTBotGefEditPart)}
+ * @param ifPart
+ * @param condition
+ * @return
+ * @throws Exception
+ */
+ public SWTBotGefEditPart addElseIf(SWTBotGefEditPart ifPart, String condition) throws Exception {
+ setFocus(ifPart);
+ gEditor.clickContextMenu("Add ElseIf");
+
+ // get the new ElseIfPart
+ List<SWTBotGefEditPart> children = ifPart.children();
+ SWTBotGefEditPart elseIfPart = children.get(children.size() - 1);
+ // test the part
+ if(elseIfPart.part().getModel() instanceof ElseImpl) {
+ elseIfPart = children.get(children.size() - 2);
+ }
+ setFocus(elseIfPart);
+ // setup properties
+ propsView.selectTab(0);
+ SWTBot propsBot = propsView.bot();
+ propsBot.button("Create a New Condition").click();
+ propsBot.styledText().setText(condition);
+ save();
+ log.info("Added [part=" + elseIfPart + ", name=Unnamed]");
+ return elseIfPart;
+ }
+
+ // DONE !
+ public SWTBotGefEditPart addPick(SWTBotGefEditPart toPart, String name, boolean createInstance) {
+ appendActivity(toPart, "Pick", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ if(createInstance) {
+ propsBot.checkBox().select();
+ }
+
+ SWTBotGefEditPart pickPart = getEditPart(toPart, name);
+ SWTBotGefEditPart onMessagePart = pickPart.children().get(0);
+ setFocus(onMessagePart);
+ // remove OnMessage branch to make the methods coherent
+ gEditor.clickContextMenu("Delete");
+ setFocus(pickPart);
+ save();
+
+ log.info("Added [part=" + pickPart + ", name=" + pickPart + "]");
+ return pickPart;
+ }
+
+ public SWTBotGefEditPart addPickOnMessage(SWTBotGefEditPart pickPart, String in, String[] operationInfo) {
+ setFocus(pickPart);
+ gEditor.clickContextMenu("Add OnMessage");
+ save();
+
+ // get the new ElseIfPart
+ List<SWTBotGefEditPart> children = pickPart.children();
+ SWTBotGefEditPart onMessagePart = children.get(children.size() - 1);
+ // test the part
+ if(!(onMessagePart.part().getModel() instanceof OnMessage)) {
+ onMessagePart = children.get(children.size() - 2);
+ }
+
+ setFocus(onMessagePart);
+ propsView.selectTab(0);
+ SWTBot propsBot = propsView.bot();
+ propsBot.tree().expandNode(operationInfo).select();
+ propsBot.text(2).setText(in);
+ save();
+
+ log.info("Added [part=" + onMessagePart + ", name=Unnamed]");
+
+ return onMessagePart;
+ }
+
+ public SWTBotGefEditPart addPickOnAlarm(SWTBotGefEditPart pickPart, String expression) {
+ setFocus(pickPart);
+ gEditor.clickContextMenu("Add OnAlarm");
+ save();
+
+ // get the new ElseIfPart
+ List<SWTBotGefEditPart> children = pickPart.children();
+ SWTBotGefEditPart onAlaramPart = children.get(children.size() - 1);
+ // test the part
+ if(!(onAlaramPart.part().getModel() instanceof OnAlarm)) {
+ onAlaramPart = children.get(children.size() - 2);
+ }
+ setFocus(onAlaramPart);
+ SWTBot propsBot = propsView.bot();
+ propsBot.button("Create a New Condition").click();
+ propsBot.comboBox(1).setSelection("Text");
+ propsBot.styledText().setText(expression);
+ save();
+
+ log.info("Added [part=" + onAlaramPart + ", name=Unnamed]");
+
+ // if onAlarm contains scope then return the scope. onAlarm otherwise
+ return (onAlaramPart.children().size() == 1) ?
+ onAlaramPart.children().get(0): onAlaramPart;
+
+ }
+
+ public SWTBotGefEditPart addAssign(SWTBotGefEditPart toPart, String name) {
+ appendActivity(toPart, "Assign", name);
+ propsView.selectTab(1);
+ SWTBot propsBot = propsView.bot();
+ try {
+ propsBot.list().select("? to ?");
+ propsBot.button("Delete").click();
+ } catch (AssertionFailedException e) {
+ log.info(e.getMessage());
+ }
+ save();
+ SWTBotGefEditPart assign = getEditPart(toPart, name);
+ log.info("Added [part=" + assign + ", name=" + name + "]");
+ return assign;
+ }
+
+ public SWTBotGefEditPart copyVarToVar(SWTBotGefEditPart assignPart, String[] from, String[] to) {
+ setFocus(assignPart);
+ propsView.selectTab(1);
+ SWTBot propsBot = propsView.bot();
+ propsBot.button("New").click();
+ propsBot.tree(0).expandNode(from).select();
+ propsBot.tree(1).expandNode(to).select();
+ save();
+ // Initializer
+ try {
+ log.info("Initializer view was opend ... clicking YES.");
+ bot.shell("Initializer").bot().button("Yes").click();
+ } catch (Exception e) {
+ log.warn(e.getMessage());
+ log.info("Initializer view was not opened.");
+ }
+ return assignPart;
+ }
+
+ // TODO - return just the new <copy></copy> element
+ public SWTBotGefEditPart copyVarToExpresion(SWTBotGefEditPart assignPart, String[] from, String exp) {
+ setFocus(assignPart);
+ propsView.selectTab(1);
+ SWTBot propsBot = propsView.bot();
+ propsBot.button("New").click();
+ propsBot.comboBox(1).setSelection("Expression");
+ propsBot.tree().expandNode(from).select();
+ propsBot.styledText().setText(exp);
+ save();
+
+ return assignPart;
+ }
+
+ public SWTBotGefEditPart copyExpressionToExpression(SWTBotGefEditPart assignPart, String from, String to) {
+ setFocus(assignPart);
+ propsView.selectTab(1);
+ SWTBot propsBot = propsView.bot();
+ propsBot.button("New").click();
+ propsBot.comboBox(0).setSelection("Expression");
+ propsBot.styledText(0).setText(from);
+
+ propsBot.comboBox(2).setSelection("Expression");
+ propsBot.styledText(1).setText(to);
+ save();
+
+ return assignPart;
+ }
+
+
+ public SWTBotGefEditPart copyFixedToExpression(SWTBotGefEditPart assignPart, String from, String to) {
+ setFocus(assignPart);
+ propsView.selectTab(1);
+ SWTBot propsBot = propsView.bot();
+ propsBot.button("New").click();
+ propsBot.comboBox(0).setSelection("Fixed Value");
+ propsBot.comboBox(1).setSelection("Expression");
+
+ propsBot.text().setText(from);
+ propsBot.styledText().setText(to);
+ save();
+
+ return assignPart;
+ }
+
+ public SWTBotGefEditPart copyFixedToVar(SWTBotGefEditPart assignPart, String exp, String[] to) {
+ setFocus(assignPart);
+ propsView.selectTab(1);
+ SWTBot propsBot = propsView.bot();
+ propsBot.button("New").click();
+ propsBot.comboBox(0).setSelection("Fixed Value");
+ propsBot.text().setText(exp);
+ propsBot.tree().expandNode(to).select();
+ save();
+ // Initializer
+ try {
+ log.info("Initializer view was opend ... clicking YES.");
+ bot.shell("Initializer").bot().button("Yes").click();
+ } catch (Exception e) {
+ log.warn(e.getMessage());
+ log.info("Initializer view was not opened.");
+ }
+ return assignPart;
+ }
+
+ // DONE !
+ public SWTBotGefEditPart addWhile(SWTBotGefEditPart toPart, String name, String condition) {
+ appendActivity(toPart, "While", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ propsBot.button("Create a New Condition").click();
+ propsBot.styledText().setText(condition);
+
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+ log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ public SWTBotGefEditPart addForEach(SWTBotGefEditPart toPart, String name, String startExpression, String finalExpression) throws Exception {
+ appendActivity(toPart, "ForEach", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(2);
+
+ SWTBotButton leftButton = propsBot.button(0);
+ SWTBotButton rightButton = propsBot.button(1);
+
+ leftButton.click();
+ rightButton.click();
+ propsBot.styledText(0).setText(startExpression);
+ // Previous change must be saved otherwise we will see an ugly NPE.
+ // This issue seems to be caused by SWTBot since the exception cannot
+ // be seen by clicking the steps manually.
+ save();
+ propsBot.styledText(1).setText(finalExpression);
+ save();
+
+ // TODO: maybe delete the scope element
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+ log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ public SWTBotGefEditPart addRepeatUntil(SWTBotGefEditPart toPart, String name, String condition) {
+ appendActivity(toPart, "RepeatUntil", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ propsBot.button("Create a New Condition").click();
+ propsBot.styledText().setText(condition);
+
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+ log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ public SWTBotGefEditPart addWait(SWTBotGefEditPart toPart, String name, String expression) {
+ appendActivity(toPart, "Wait", name);
+ SWTBot propsBot = propsView.bot();
+ propsView.selectTab(1);
+ propsBot.button("Create a New Condition").click();
+ propsBot.comboBox(1).setSelection("Text");
+ propsBot.styledText().setText(expression);
+
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+ log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ public SWTBotGefEditPart addSequence(SWTBotGefEditPart toPart, String name) {
+ appendActivity(toPart, "Sequence", name);
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+ log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ public SWTBotGefEditPart addFlow(SWTBotGefEditPart toPart, String name) {
+ appendActivity(toPart, "Flow", name);
+ save();
+ SWTBotGefEditPart added = getEditPart(toPart, name);
+ log.info("Added [part=" + added + ", name=" + name + "]");
+ return added;
+ }
+
+ public SWTBotGefEditPart addScope(SWTBotGefEditPart toPart, String name, boolean isoalated) {
+ appendActivity(toPart, "Scope", name);
+ propsView.selectTab(1);
+ if(isoalated) {
+ propsView.bot().checkBox().select();
+ }
+ SWTBotGefEditPart scope = getEditPart(toPart, name);
+ log.info("Added [part=" + scope + ", name=" + name + "]");
+ return scope;
+ }
+
+ // TODO: add properties and test
+ public SWTBotGefEditPart addFaultHandler(SWTBotGefEditPart part) {
+ setFocus(part);
+ gEditor.clickContextMenu("Add Fault Handler");
+ save();
+
+ printChildren(part);
+
+ return null;
+ }
+
+ // test me!!!
+ public SWTBotGefEditPart addExit(SWTBotGefEditPart toPart, String name) {
+ appendActivity(toPart, "Exit", name);
+ SWTBotGefEditPart exit = getEditPart(toPart, name);
+ log.info("Added [part=" + exit + ", name=" + name + "]");
+ return exit;
+ }
+
+ public SWTBotGefEditPart addThrow() { throw new UnsupportedOperationException(); }
+
+ public SWTBotGefEditPart addRethrow() { throw new UnsupportedOperationException(); }
+
+ public SWTBotGefEditPart addCompensate() { throw new UnsupportedOperationException(); }
+
+ public SWTBotGefEditPart addCompensateScope() { throw new UnsupportedOperationException(); }
+
+ public void appendActivity(SWTBotGefEditPart toPart, String activity, String name) {
+ setFocus(toPart);
+ gEditor.clickContextMenu("Add").clickContextMenu(activity);
+ propsView.selectTab(0);
+ SWTBot propsBot = propsView.bot();
+ propsBot.text(0).setText(name);
+ }
+
+ // TODO: - test me
+ // - How to validate this???
+ public void delete(SWTBotGefEditPart part) {
+ gEditor.setFocus();
+ part.select();
+ gEditor.clickContextMenu("Delete");
+ }
+
+ public void save() {
+ gEditor.save();
+ }
+
+ public SWTBotGefEditPart getEditPart(SWTBotGefEditPart fromPart, String label) {
+ Object model = fromPart.part().getModel();
+// System.out.println("PART: " + fromPart.part());
+ if(model instanceof ActivityImpl) {
+ ActivityImpl activity = (ActivityImpl) model;
+// System.out.println("ACTIVITY NAME: " + activity.getName() + ", " + activity);
+ if(fromPart.children().isEmpty() && label.equals(activity.getName())) {
+ return fromPart;
+ }
+ }
+ List<SWTBotGefEditPart> allEditParts = fromPart.children();
+ allEditParts.addAll(fromPart.sourceConnections());
+ // ElseIf and Else must use element name !!!
+ // ElseIf must use also coordinates to verify that it's the last one.
+ return getEditPart(allEditParts, label);
+ }
+
+ protected SWTBotGefEditPart getEditPart(List<SWTBotGefEditPart> allEditParts, String label) {
+ for (SWTBotGefEditPart child : allEditParts) {
+ Object model = child.part().getModel();
+ if(model instanceof ActivityImpl) {
+// System.out.println("PART: " + child.part());
+ ActivityImpl activity = (ActivityImpl) child.part().getModel();
+// System.out.println("ACTIVITY NAME: " + activity.getName() + ", " + activity);
+ if (label.equals(activity.getName())) {
+ return child;
+ }
+
+ SWTBotGefEditPart childEditPart = getEditPart(child, label);
+ if (childEditPart != null) {
+ return childEditPart;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setFocus(SWTBotGefEditPart part) {
+ gEditor.setFocus();
+ part.select();
+ }
+
+ public void printControls(Composite composite) {
+ printControls("", composite);
+ }
+
+ private void printControls(String prefix, Composite composite) {
+ Control[] children = composite.getChildren();
+ for(Control ctrl : children) {
+ System.out.println(prefix + " " + ctrl.getClass().getName());
+ if(ctrl instanceof Composite) {
+ Composite c = (Composite) ctrl;
+ if(c.getChildren().length > 0) {
+ printControls(prefix + "\t", c);
+ }
+ }
+ }
+ }
+
+ public void printChildren(SWTBotGefEditPart part) {
+ printChildren("", part);
+ }
+
+ private void printChildren(String prefix, SWTBotGefEditPart part) {
+ List<SWTBotGefEditPart> children = part.children();
+ for(SWTBotGefEditPart c : children) {
+ System.out.println(prefix + " " + c.part());
+ if(c.children().size() > 0) {
+ printChildren(prefix + "\t", c);
+ }
+ }
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotBPELEditor.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotPropertiesView.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotPropertiesView.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotPropertiesView.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,154 @@
+package org.jboss.tools.bpel.ui.bot.ext.widgets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.eclipse.gef.finder.matchers.IsInstanceOf;
+
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.ControlFinder;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.Result;
+import org.eclipse.swtbot.swt.finder.utils.MessageFormat;
+import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
+import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
+
+import org.hamcrest.Matcher;
+import org.hamcrest.SelfDescribing;
+
+/**
+ *
+ * @author mbaluch
+ */
+public class SWTBotPropertiesView extends SWTBotView {
+
+ Matcher<Composite> matcher = new IsInstanceOf<Composite>(
+ Composite.class);
+
+ /**
+ * Creates a new instance of SWTBotPropertiesView
+ *
+ * @param bot
+ */
+ public SWTBotPropertiesView(SWTWorkbenchBot bot) {
+ super(bot.viewByTitle("Properties").getReference(), bot);
+ show();
+ }
+
+ /**
+ * Select a tab in the view located on index
+ *
+ * @param index index of tab to select
+ */
+ public void selectTab(int index) {
+ List<Composite> found = UIThreadRunnable.syncExec(new FindTabsResult());
+ Composite foundTab = found.get(index);
+ CompositeControl mw = new CompositeControl(foundTab, matcher);
+ mw.click();
+ }
+
+ /**
+ * Select a tab in the view with the given mnemonic text
+ *
+ * @param mnemonicText
+ */
+ public void selectTab(String mnemonicText) {
+ }
+
+
+ /**
+ * Help class
+ */
+ private class FindTabsResult implements Result<List<Composite>> {
+
+ public List<Composite> run() {
+ Composite parent = (Composite) getWidget();
+ ControlFinder cf = new ControlFinder();
+
+ List<Composite> findControls = cf.findControls(parent, matcher, true);
+ List<Composite> tabs = new ArrayList<Composite>();
+ for (int i = 0; i < findControls.size(); i++) {
+ Composite c = findControls.get(i);
+ String className = SWTUtils.toString(c);
+ if (className.startsWith("TabbedPropertyList$ListElement")) {
+ tabs.add(c);
+ }
+ }
+
+ return tabs;
+ }
+
+ }
+
+ /**
+ * Help class
+ */
+ private static class CompositeControl extends AbstractSWTBotControl<Composite> {
+
+ public CompositeControl(Composite w, SelfDescribing description) throws WidgetNotFoundException {
+ super(w);
+ }
+
+ public CompositeControl click() {
+ log.debug(MessageFormat.format("Clicking on {0}", SWTUtils.getText(widget)));
+ waitForEnabled();
+ notify(SWT.MouseEnter);
+ notify(SWT.MouseMove);
+ notify(SWT.Activate);
+ notify(SWT.FocusIn);
+ notify(SWT.MouseDown);
+ notify(SWT.MouseUp);
+ notify(SWT.Selection);
+ notify(SWT.MouseHover);
+ notify(SWT.MouseMove);
+ notify(SWT.MouseExit);
+ notify(SWT.Deactivate);
+ notify(SWT.FocusOut);
+ log.debug(MessageFormat.format("Clicked on {0}", SWTUtils.getText(widget)));
+ return this;
+ }
+ }
+
+
+// /**
+// * Help class
+// */
+// private class SelectTabResult implements VoidResult {
+//
+// int tab;
+//
+// public SelectTabResult(int tab) {
+// this.tab = tab;
+// }
+//
+// public void run() {
+// Composite parent = (Composite) getWidget();
+// ControlFinder cf = new ControlFinder();
+//
+// Matcher<Composite> matcher = new IsInstanceOf<Composite>(
+// Composite.class);
+//
+// List<Composite> findControls = cf.findControls(parent, matcher, true);
+// List<Composite> tabs = new ArrayList<Composite>();
+// for (int i = 0; i < findControls.size(); i++) {
+// Composite c = findControls.get(i);
+// String className = SWTUtils.toString(c);
+// if (className.startsWith("TabbedPropertyList$ListElement")) {
+// tabs.add(c);
+// }
+// }
+//
+// Composite foundTab = tabs.get(tab);
+// CompositeControl mw = new CompositeControl(foundTab, matcher);
+// mw.click();
+// }
+//
+// }
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/ext/widgets/SWTBotPropertiesView.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/ActivityModelingTest.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/ActivityModelingTest.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/ActivityModelingTest.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,114 @@
+package org.jboss.tools.bpel.ui.bot.test;
+
+import org.eclipse.core.resources.IProject;
+
+import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+
+import org.jboss.tools.bpel.ui.bot.ext.widgets.BotBpelEditor;
+import org.jboss.tools.bpel.ui.bot.test.suite.BPELTest;
+import org.jboss.tools.bpel.ui.bot.test.util.ResourceHelper;
+
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+@SWTBotTestRequires(clearProjects = true, /*server = @Server(type = ServerType.SOA, state = ServerState.Present),*/ perspective="BPEL Perspective")
+public class ActivityModelingTest extends BPELTest {
+
+ static final String BUNDLE = "org.jboss.tools.bpel.ui.bot.test";
+
+ IProject project;
+ ServersView sView = new ServersView();
+ PackageExplorer pExplorer = new PackageExplorer();
+
+ @Before
+ public void setupWorkspace() throws Exception {
+ System.err.println("setup start!");
+
+ pExplorer.deleteAllProjects();
+
+ ResourceHelper.importProject(BUNDLE, "/projects/DiscriminantProcess", "DiscriminantProcess");
+
+ //ResourcesUtils.importProject(BUNDLE, "/projects/DiscriminantProcess",
+ // "DiscriminantProcess", null);
+
+ bot.viewByTitle("Package Explorer").setFocus();
+ pExplorer.selectProject("DiscriminantProcess");
+
+ System.err.println("setup complete!");
+
+ }
+
+ @After
+ public void cleanupWorkspace() throws Exception {
+// pExplorer.deleteAllProjects();
+ }
+
+ /**
+ * - if
+ * - pick
+ * - while
+ * - forEach
+ * - repeatUntil
+ * - wait
+ * - empty
+ * - exit
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testModeling() throws Exception {
+
+ openFile("DiscriminantProcess", "bpelContent", "Discriminant.bpel");
+
+ SWTGefBot gefBot = new SWTGefBot();
+ final SWTBotGefEditor editor = gefBot.gefEditor("Discriminant.bpel");
+ final BotBpelEditor bpel = new BotBpelEditor(editor, gefBot);
+ bpel.activatePage("Design");
+
+ bpel.addReceive("receive", "DiscriminantRequest", new String[] {"client", "Discriminant", "calculateDiscriminant"}, true);
+ bpel.addPick("receiveOnPick", true, "DiscriminantRequest", new String[] {"client", "Discriminant", "calculateDiscriminant"})
+ // model pick onMessage
+ .addIf("if1", "true() AND true()")
+ // model if branch
+ .addExit("Quit");
+ // model else
+ bpel.select(bpel.getSelectedPart().parent());
+ bpel.addElse("if1")
+ .addInvoke("invokePartner1", "MathRequest1", "MathResponse1", new String[] {"math", "Math", "calculate"});
+
+ bpel.select(editor.mainEditPart());
+ // model pick onAlarm
+ bpel.addOnAlarm("receiveOnPick", "'PT10M'")
+ // model while
+ .addWhile("while1", "false()")
+ // model ForEach
+ .addForEach("forEach1", "10", "20")
+ .addInvoke("invokePartner2", "MathRequest1", "MathResponse1", new String[] {"math", "Math", "calculate"})
+ .addWait("wait", "'PT1S'");
+
+ bpel.select(editor.mainEditPart());
+ bpel.addRepeatUntil("repeatUntil", "false()")
+ // model repeatUntil
+ .addEmpty("empty");
+
+ bpel.select(editor.mainEditPart());
+ bpel.addReply("reply", "DiscriminantResponse", "", new String[] {"client", "Discriminant", "calculateDiscriminant"});
+
+ }
+
+ void openFile(String projectName, String... path) throws Exception {
+ log.info("Opening file: " + path[path.length - 1] + " ...");
+ pExplorer.openFile(projectName, path);
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/ActivityModelingTest.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/AssignActivityTest.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/AssignActivityTest.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/AssignActivityTest.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,162 @@
+package org.jboss.tools.bpel.ui.bot.test;
+
+import org.eclipse.core.resources.IProject;
+
+import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+
+import org.jboss.tools.bpel.ui.bot.ext.widgets.BotBpelEditor;
+import org.jboss.tools.bpel.ui.bot.test.suite.BPELTest;
+import org.jboss.tools.bpel.ui.bot.test.util.ResourceHelper;
+import org.jboss.tools.bpel.util.SendSoapMessage;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.types.ViewType;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+@SWTBotTestRequires(clearProjects = true, server = @Server(type = ServerType.SOA, state = ServerState.Running), perspective="BPEL Perspective")
+public class AssignActivityTest extends BPELTest {
+
+ static String BUNDLE = "org.jboss.tools.bpel.ui.bot.test";
+ static String ENDPOINT = "http://localhost:8080/AssignTestProcess";
+ static String MESSAGE =
+ "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
+ " <soapenv:Header/>" +
+ " <soapenv:Body>" +
+ " <payload>Initial value</payload>" +
+ " </soapenv:Body>" +
+ "</soapenv:Envelope>";
+
+ IProject project;
+ ServersView sView = new ServersView();
+ PackageExplorer pExplorer = new PackageExplorer() {
+
+ @Override
+ public void runOnServer(String projectName) {
+ String serverName = AssignActivityTest.configuredState.getServer().name;
+ serverName = "SOA-5.1"; // remove me !!!
+
+ bot.viewByTitle("Servers").show();
+ bot.viewByTitle("Servers").setFocus();
+
+ SWTBotTree tree = bot.viewByTitle("Servers").bot().tree();
+ SWTBotTreeItem server = tree.getTreeItem(serverName + " [Started, Synchronized]").select();
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.ADD_AND_REMOVE, false)).click();
+
+ SWTBotShell shell = AssignActivityTest.bot.shell("Add and Remove...");
+ shell.activate();
+
+ SWTBot viewBot = shell.bot();
+ // The list in the "Add and Remove..." dialog is a Tree !!! see EclipseSpy ...
+ viewBot.tree().setFocus();
+ viewBot.tree().select(projectName);
+ viewBot.button("Add >").click();
+ viewBot.button("Finish").click();
+ }
+
+ };
+
+ @Before
+ public void setupWorkspace() throws Exception {
+ pExplorer.deleteAllProjects();
+ // Need to use own importer. ResourceUtils does not import the project correctly when server
+ // is running. TODO: Why?
+ ResourceHelper.importProject(BUNDLE, "/projects/AssignerProject", "AssignerProject");
+ bot.viewByTitle("Package Explorer").setFocus();
+ pExplorer.selectProject("AssignerProject");
+ }
+
+ @After
+ public void cleanupWorkspace() throws Exception {
+ pExplorer.deleteAllProjects();
+ }
+
+
+// /**
+// * TODO: assert that the Variable Initializer dialog will not be shown
+// * @throws Exception
+// */
+// @Test
+// public void testLocalVarAssignment() throws Exception {
+// // Create the process
+// openFile("AssignerProject", "bpelContent", "AssignTestProcess.bpel");
+//
+// SWTGefBot gefBot = new SWTGefBot();
+// final SWTBotGefEditor editor = gefBot.gefEditor("AssignTestProcess.bpel");
+// final BotBpelEditor bpel = new BotBpelEditor(editor, gefBot);
+//
+// bpel.addReceive("receiveSimple", "simpleIn", new String[] {"client", "AssignTestProcess", "simple"}, true);
+// bpel.addAssignVarToVar("assignToLocal", new String[] {"simpleIn : simpleRequestMessage", "payload : string"}, new String[] {"processVar : string"});
+//// Assert.assertFalse(console.getConsoleText().contains("Failed to execute runnable (java.lang.NullPointerException)"));
+// }
+
+
+ @Test
+ public void testAssignment() throws Exception {
+ // Create the process
+ openFile("AssignerProject", "bpelContent", "AssignTestProcess.bpel");
+
+ SWTGefBot gefBot = new SWTGefBot();
+ final SWTBotGefEditor editor = gefBot.gefEditor("AssignTestProcess.bpel");
+ final BotBpelEditor bpel = new BotBpelEditor(editor, gefBot);
+ bpel.activatePage("Design");
+
+ bpel.addReceive("receiveSimple", "simpleIn", new String[] {"client", "AssignTestProcess", "simple"}, true);
+ bpel.addAssignVarToVar("assignSimpleToSimple",
+ new String[] {"simpleIn : simpleRequestMessage", "payload : string"},
+ new String[] {"simpleOut : simpleResponseMessage", "payload : string"}
+ );
+
+ bpel.addAssignVarToVar("assignSimpleToComplex",
+ new String[] {"simpleIn : simpleRequestMessage", "payload : string"},
+ new String[] {"complexOut : complexResponseMessage", "complexResponse : complexResponse", "result : string"}
+ );
+
+ bpel.addAssignVarToVar("assignSimpleToModerate",
+ new String[] {"simpleIn : simpleRequestMessage", "payload : string"},
+ new String[] {"moderateOut : moderateResponseMessage", "moderateResponse : complexResponseType", "result : string"}
+ );
+
+ bpel.addAssignExpressionToExpression("assignExpressionToExpression", "$simpleIn.payload", "$moderateOut.moderateResponse/result");
+ bpel.addAssignFixedToExpression("assignFixedToExpression", "Fixed Expression", "$simpleOut.payload");
+
+ bpel.addReply("replySimple", "simpleOut", "", new String[] {"client", "AssignTestProcess", "simple"});
+
+ // Publish the process
+ pExplorer.runOnServer("AssignerProject");
+ Thread.sleep(TIME_5S);
+ Assert.assertFalse(console.getConsoleText().contains("DEPLOYMENTS IN ERROR:"));
+
+ // Test the process
+ String response = SendSoapMessage.sendMessage(ENDPOINT, MESSAGE, "simple");
+ log.info("Got response from process: " + response);
+ Thread.sleep(TIME_5S);
+ Assert.assertFalse(console.getConsoleText().contains("[ASSIGN] Assignment Fault:"));
+ Assert.assertEquals("Fixed Expression", response);
+ }
+
+ void openFile(String projectName, String... path) throws Exception {
+ log.info("Opening file: " + path[path.length - 1] + " ...");
+ pExplorer.openFile(projectName, path);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/AssignActivityTest.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/BPELConstants.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/BPELConstants.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/BPELConstants.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,11 @@
+package org.jboss.tools.bpel.ui.bot.test;
+
+public interface BPELConstants {
+
+ final static String ASYNC_PROCESS_LABEL = "Asynchronous";
+
+ final static String SYNC_PROCESS_LABEL = "Synchronous";
+
+ final static String EMPTY_PROCESS_LABEL = "Empty";
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/BPELConstants.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/FaultModelingTest.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/FaultModelingTest.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/FaultModelingTest.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,115 @@
+package org.jboss.tools.bpel.ui.bot.test;
+
+import org.eclipse.core.resources.IProject;
+
+import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+
+import org.jboss.tools.bpel.ui.bot.ext.widgets.BotBpelEditor;
+import org.jboss.tools.bpel.ui.bot.test.suite.BPELTest;
+import org.jboss.tools.bpel.ui.bot.test.util.ResourceHelper;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * TODO: finish fault modeling
+ *
+ * @author mbaluch
+ */
+@SWTBotTestRequires(clearProjects = true, server = @Server(type = ServerType.SOA, state = ServerState.Disabled))
+public class FaultModelingTest extends BPELTest {
+
+ static String BUNDLE = "org.jboss.tools.bpel.ui.bot.test";
+
+ IProject project;
+ ServersView sView = new ServersView();
+ PackageExplorer pExplorer = new PackageExplorer();
+
+ @Before
+ public void setupWorkspace() throws Exception {
+ pExplorer.deleteAllProjects();
+ ResourceHelper.importProject(BUNDLE, "/projects/ScopeProcess",
+ "bpel_scope");
+
+ bot.viewByTitle("Package Explorer").setFocus();
+ pExplorer.selectProject("bpel_scope");
+ }
+
+ @After
+ public void cleanupWorkspace() throws Exception {
+// pExplorer.deleteAllProjects();
+ }
+
+
+ /**
+ * - sequence
+ * - scope
+ * - flow
+ * - throw
+ * - rethrow
+ * - compensate
+ * - compensateScope
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testScopes() throws Exception {
+ openFile("bpel_scope", "bpelContent", "scope.bpel");
+
+ SWTGefBot gefBot = new SWTGefBot();
+ SWTBotGefEditor editor = gefBot.gefEditor("scope.bpel");
+ BotBpelEditor bpel = new BotBpelEditor(editor, gefBot);
+ bpel.activatePage("Design");
+
+ bpel.addReceive("receive", "inputMessage", new String[] {"scopeProcess", "scopePT", "processRequest"}, true);
+ bpel.addScope("outerScope", false)
+ // model scope
+ .addAssignFixedToVar("AssignInitialValue", "Initial variable value", new String[] {"localVariable : string"})
+ .addScope("innerScope", false)
+ // model inner scope
+ .addAssignFixedToVar("AssignInnerScopeValue", "Inner scope value", new String[] {"localVariable : string"})
+ // model compensation handler
+ .addCompensationHandler()
+ .addFlow("Flow")
+ .addSequence("Sequence")
+ .addAssignFixedToVar("AssignCompensatedValue", "Compensated value", new String[] {"localVariable : string"})
+ .addAssignVarToExpression("CopyLocalVarToOutputMessage", new String[] {"localVariable : string"}, "$outputMessage.result");
+
+ bpel.select(bpel.getEditPart(editor.mainEditPart(), "outerScope"));
+
+ // add FaultHandler
+ bpel.addFaultHandler("Exception", "exceptionMessage")
+ .addIf("If", "$inputMessage.payload/compensate = 'false'")
+ .addRethrow("Rethrow");
+ // select faultHandlerPart
+ bpel.select(bpel.getSelectedPart().parent());
+ bpel.addCompensateScope("CompensateScope", "innerScope");
+
+ bpel.select(bpel.getEditPart(editor.mainEditPart(), "outerScope"));
+ bpel.addEmpty("DoSomethingInteresting");
+ bpel.addIf("if", "$inputMessage.payload/simulateException = 'true'")
+ .addThrow("Throw", "propegatedFault");
+
+ bpel.select(bpel.getSelectedPart().parent());
+ bpel.addAssignVarToExpression("CopyLocalVarToOutputMessage", new String[] {"localVariable : string"}, "$outputMessage.result");
+
+ bpel.select(editor.mainEditPart());
+ bpel.addReply("Reply", "outputMessage", "", new String[] {"scopeProcess", "scopePT", "processRequest"});
+ }
+
+
+ void openFile(String projectName, String... path) throws Exception {
+ log.info("Opening file: " + path[path.length - 1] + " ...");
+ pExplorer.openFile(projectName, path);
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/FaultModelingTest.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/SimpleModelingTest.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/SimpleModelingTest.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/SimpleModelingTest.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,107 @@
+package org.jboss.tools.bpel.ui.bot.test;
+
+import org.eclipse.core.resources.IProject;
+
+import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+
+import org.jboss.tools.bpel.ui.bot.ext.widgets.BotBpelEditor;
+import org.jboss.tools.bpel.ui.bot.test.suite.BPELTest;
+import org.jboss.tools.bpel.ui.bot.test.util.ResourceHelper;
+
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+@SWTBotTestRequires(clearProjects = true, server = @Server(type = ServerType.SOA, state = ServerState.Present))
+public class SimpleModelingTest extends BPELTest {
+
+ static String BUNDLE = "org.jboss.tools.bpel.ui.bot.test";
+
+ IProject project;
+ ServersView sView = new ServersView();
+ PackageExplorer pExplorer = new PackageExplorer();
+
+ @Before
+ public void setupWorkspace() throws Exception {
+ pExplorer.deleteAllProjects();
+ ResourceHelper.importProject(BUNDLE, "/projects/DiscriminantProcess",
+ "DiscriminantProcess");
+
+ bot.viewByTitle("Package Explorer").setFocus();
+ pExplorer.selectProject("DiscriminantProcess");
+ }
+
+ @After
+ public void cleanupWorkspace() throws Exception {
+// pExplorer.deleteAllProjects();
+ }
+
+ @Test
+ public void testActions() throws Exception {
+ openFile("DiscriminantProcess", "bpelContent", "Discriminant.bpel");
+
+ SWTGefBot gefBot = new SWTGefBot();
+ final SWTBotGefEditor editor = gefBot.gefEditor("Discriminant.bpel");
+ final BotBpelEditor bpel = new BotBpelEditor(editor, gefBot);
+ bpel.activatePage("Design");
+
+ bpel.addReceive("receive", "DiscriminantRequest", new String[] {"client", "Discriminant", "calculateDiscriminant"}, true);
+ bpel.addAssignVarToVar("assignRequest",
+ new String[] {
+ "DiscriminantRequest : DiscriminantRequestMessage",
+ "parameters : DiscriminantRequest",
+ "a : decimal"},
+ new String[] {
+ "MathRequest1 : MathRequestMessage",
+ "parameters : MathRequest",
+ "a : decimal"}
+ );
+ bpel.addAssignVarToVar("assignRequest",
+ new String[] {
+ "DiscriminantRequest : DiscriminantRequestMessage",
+ "parameters : DiscriminantRequest",
+ "b : decimal"},
+ new String[] {
+ "MathRequest1 : MathRequestMessage",
+ "parameters : MathRequest",
+ "b : decimal"}
+ );
+ bpel.addAssignFixedToVar("assignRequest", "*",
+ new String[] {
+ "MathRequest1 : MathRequestMessage",
+ "parameters : MathRequest",
+ "operator : string"}
+ );
+ bpel.addValidate("validateInput", "DiscriminantRequest");
+ bpel.addInvoke("invokePartner", "MathRequest1", "MathResponse1", new String[] {"math", "Math", "calculate"});
+ bpel.addAssignVarToVar("assignResponse",
+ new String[] {
+ "MathResponse1 : MathResponseMessage",
+ "parameters : MathResponse",
+ "result : decimal"},
+ new String[] {
+ "DiscriminantResponse : DiscriminantResponseMessage",
+ "parameters : DiscriminantResponse",
+ "result : int"}
+ );
+ bpel.addReply("reply", "DiscriminantResponse", "", new String[] {"client", "Discriminant", "calculateDiscriminant"});
+
+ bpel.save();
+ }
+
+
+ void openFile(String projectName, String... path) throws Exception {
+ log.info("Opening file: " + path[path.length - 1] + " ...");
+ pExplorer.openFile(projectName, path);
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/SimpleModelingTest.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,138 @@
+package org.jboss.tools.bpel.ui.bot.test;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+
+import org.jboss.tools.bpel.ui.bot.test.suite.BPELTest;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+@SWTBotTestRequires(clearProjects = true, server = @Server(type = ServerType.SOA, state = ServerState.Present), perspective="BPEL Perspective")
+public class WizardTest extends BPELTest {
+
+
+ @Test
+ public void createNewSyncProcess() throws Exception {
+ IProject project = createNewProject("SyncProcessProject");
+ IFile process = createNewProcess("SyncProcessProject", "SyncProcess", BPELConstants.SYNC_PROCESS_LABEL, false);
+
+ process.getFileExtension();
+ String processContent = loadFile(process);
+
+ Assert.assertTrue(processContent != null);
+ Assert.assertTrue(processContent.contains("http://docs.oasis-open.org/wsbpel/2.0/process/executable"));
+ Assert.assertTrue(processContent.contains("<bpel:import location=\"SyncProcessArtifacts.wsdl\""));
+ Assert.assertTrue(processContent.contains("<bpel:receive name=\"receiveInput\""));
+ Assert.assertTrue(processContent.contains("<bpel:reply name=\"replyOutput\""));
+ Assert.assertTrue(isRuntimeSet("SyncProcessProject"));
+ }
+
+ @Test
+ public void createNewAsyncProcess() throws Exception {
+ IProject project = createNewProject("AsyncProcessProject");
+ IFile process = createNewProcess("AsyncProcessProject", "AsyncProcess", BPELConstants.ASYNC_PROCESS_LABEL, false);
+
+ process.getFileExtension();
+ String processContent = loadFile(process);
+
+ Assert.assertTrue(processContent != null);
+ Assert.assertTrue(processContent.contains("http://docs.oasis-open.org/wsbpel/2.0/process/executable"));
+ Assert.assertTrue(processContent.contains("<bpel:import location=\"AsyncProcessArtifacts.wsdl\""));
+ Assert.assertTrue(processContent.contains("<bpel:receive name=\"receiveInput\""));
+ Assert.assertTrue(processContent.contains("<bpel:invoke name=\"callbackClient\""));
+ Assert.assertTrue(isRuntimeSet("AsyncProcessProject"));
+ }
+
+ @Test
+ public void createNewEmptyProcess() throws Exception {
+ IProject project = createNewProject("EmptyProcessProject");
+ IFile process = createNewProcess("EmptyProcessProject", "EmptyProcess", BPELConstants.EMPTY_PROCESS_LABEL, false);
+
+ process.getFileExtension();
+ String processContent = loadFile(process);
+
+ Assert.assertTrue(processContent != null);
+ Assert.assertTrue(processContent.contains("http://docs.oasis-open.org/wsbpel/2.0/process/executable"));
+ Assert.assertTrue(processContent.contains("<bpel:import location=\"EmptyProcessArtifacts.wsdl\""));
+ Assert.assertTrue(processContent.contains("<bpel:sequence name=\"main\">"));
+ Assert.assertTrue(processContent.contains("<bpel:empty name=\"Empty\"></bpel:empty>"));
+
+ Assert.assertFalse(processContent.contains("<bpel:receive name=\"receiveInput\""));
+
+ Assert.assertTrue(isRuntimeSet("EmptyProcessProject"));
+ }
+
+ @Test
+ public void createNewAbstractSyncProcess() throws Exception {
+ IProject project = createNewProject("AbstractProcessProject");
+ IFile process = createNewProcess("AbstractProcessProject", "AbstractProcess", BPELConstants.SYNC_PROCESS_LABEL, true);
+
+ process.getFileExtension();
+ String processContent = loadFile(process);
+
+ Assert.assertTrue(processContent != null);
+ Assert.assertTrue(processContent.contains("http://docs.oasis-open.org/wsbpel/2.0/process/abstract"));
+ Assert.assertTrue(processContent.contains("<bpel:import location=\"AbstractProcessArtifacts.wsdl\""));
+ Assert.assertTrue(processContent.contains("<bpel:receive name=\"receiveInput\""));
+ Assert.assertTrue(processContent.contains("<bpel:reply name=\"replyOutput\""));
+ Assert.assertTrue(isRuntimeSet("AbstractProcessProject"));
+ }
+
+ boolean isRuntimeSet(String projectName) throws Exception {
+ SWTBotView projectExplorer = bot.viewByTitle("Project Explorer");
+ projectExplorer.setFocus();
+
+ // diaplay Project Properties
+ SWTBotTree tree = projectExplorer.bot().tree().select(projectName);
+ tree.getTreeItem(projectName).contextMenu("Properties").click();
+
+ SWTBotShell shell = bot.shell("Properties for " + projectName).activate();
+
+ bot.tree().select("Targeted Runtimes");
+ boolean hasRuntime = bot.table().containsItem(configuredState.getServer().name);
+ shell.close();
+
+ return hasRuntime;
+ }
+
+ String loadFile(IFile file) throws Exception {
+ if(file.getType() != IFile.FILE) {
+ throw new IllegalArgumentException("File: " + file.getFullPath().toString() + " is a directory!");
+ }
+
+ InputStream in = null;
+ StringBuffer out;
+ try {
+ in = file.getContents();
+ out = new StringBuffer();
+ byte[] buffer = new byte[4 * 1024];
+ int c = 0;
+ while((c = in.read(buffer)) > -1) {
+ out.append(new String(buffer, 0, c));
+ }
+ } finally {
+ if(in != null) {
+ try {
+ in.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ return out.length() == 0 ? null : out.toString();
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/assertion/BPELValidator.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/assertion/BPELValidator.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/assertion/BPELValidator.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,306 @@
+package org.jboss.tools.bpel.ui.bot.test.assertion;
+
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+
+import org.eclipse.bpel.model.impl.AssignImpl;
+import org.eclipse.bpel.model.impl.CompensateImpl;
+import org.eclipse.bpel.model.impl.CompensateScopeImpl;
+import org.eclipse.bpel.model.impl.CompensationHandlerImpl;
+import org.eclipse.bpel.model.impl.ElseIfImpl;
+import org.eclipse.bpel.model.impl.ElseImpl;
+import org.eclipse.bpel.model.impl.EmptyImpl;
+import org.eclipse.bpel.model.impl.ExitImpl;
+import org.eclipse.bpel.model.impl.ExtensibleElementImpl;
+import org.eclipse.bpel.model.impl.FaultHandlerImpl;
+import org.eclipse.bpel.model.impl.FlowImpl;
+import org.eclipse.bpel.model.impl.ForEachImpl;
+import org.eclipse.bpel.model.impl.IfImpl;
+import org.eclipse.bpel.model.impl.InvokeImpl;
+import org.eclipse.bpel.model.impl.OnAlarmImpl;
+import org.eclipse.bpel.model.impl.OnMessageImpl;
+import org.eclipse.bpel.model.impl.PickImpl;
+import org.eclipse.bpel.model.impl.ReceiveImpl;
+import org.eclipse.bpel.model.impl.RepeatUntilImpl;
+import org.eclipse.bpel.model.impl.ReplyImpl;
+import org.eclipse.bpel.model.impl.RethrowImpl;
+import org.eclipse.bpel.model.impl.ScopeImpl;
+import org.eclipse.bpel.model.impl.SequenceImpl;
+import org.eclipse.bpel.model.impl.ThrowImpl;
+import org.eclipse.bpel.model.impl.ValidateImpl;
+import org.eclipse.bpel.model.impl.WaitImpl;
+import org.eclipse.bpel.model.impl.WhileImpl;
+
+import org.junit.Assert;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ *
+ * @author mbaluch
+ */
+public class BPELValidator {
+
+ Logger log = Logger.getLogger(BPELValidator.class);
+
+
+ /** Creates a new instanceof BPELValidator */
+ public BPELValidator() {
+ }
+
+ // TODO: test me
+ public void validate(AssignImpl mAssign, Properties expected) {
+ log(mAssign);
+ validateElementName(mAssign.getElement(), "bpel:assign");
+ validateElementAttribute(mAssign.getElement(), "name", expected.getProperty("name"));
+ NodeList copyNodes = mAssign.getElement().getElementsByTagName("bpel:copy");
+ Assert.assertTrue(copyNodes.getLength() > 0);
+ for(int i=0; i<copyNodes.getLength(); i++) {
+ Element copy = (Element) mAssign.getElement().getElementsByTagName("bpel:copy").item(i);
+ Assert.assertNotNull(copy);
+ Assert.assertTrue(copy.getElementsByTagName("bpel:from").getLength() == 1);
+ Assert.assertTrue(copy.getElementsByTagName("bpel:to").getLength() == 1);
+ }
+ }
+
+ public void validate(InvokeImpl mInvoke, Properties expected) {
+ log(mInvoke);
+ validateElementName(mInvoke.getElement(), "bpel:invoke");
+ validateElementAttribute(mInvoke.getElement(), "name", expected.getProperty("name"));
+ validateElementAttribute(mInvoke.getElement(), "operation", expected.getProperty("operation"));
+ validateElementAttribute(mInvoke.getElement(), "partnerLink", expected.getProperty("partnerLink"));
+ validateElementAttribute(mInvoke.getElement(), "inputVariable", expected.getProperty("inputVariable"));
+ validateElementAttribute(mInvoke.getElement(), "outputVariable", expected.getProperty("outputVariable"));
+ }
+
+ public void validate(ReceiveImpl mReceive, Properties expected) {
+ log(mReceive);
+ validateElementName(mReceive.getElement(), "bpel:receive");
+ validateElementAttribute(mReceive.getElement(), "name", expected.getProperty("name"));
+ validateElementAttribute(mReceive.getElement(), "operation", expected.getProperty("operation"));
+ validateElementAttribute(mReceive.getElement(), "partnerLink", expected.getProperty("partnerLink"));
+ validateElementAttribute(mReceive.getElement(), "variable", expected.getProperty("variable"));
+ if(expected.getProperty("createInstance") != null) {
+ validateElementAttribute(mReceive.getElement(), "createInstance", "yes");
+ }
+ }
+
+ public void validate(ReplyImpl mReply, Properties expected) {
+ log(mReply);
+ validateElementName(mReply.getElement(), "bpel:reply");
+ validateElementAttribute(mReply.getElement(), "name", expected.getProperty("name"));
+ validateElementAttribute(mReply.getElement(), "operation", expected.getProperty("operation"));
+ validateElementAttribute(mReply.getElement(), "partnerLink", expected.getProperty("partnerLink"));
+ validateElementAttribute(mReply.getElement(), "variable", expected.getProperty("variable"));
+ }
+
+ public void validate(IfImpl mIf, Properties expected) {
+ log(mIf);
+ validateElementName(mIf.getElement(), "bpel:if");
+ validateElementAttribute(mIf.getElement(), "name", expected.getProperty("name"));
+ Element condition = (Element) mIf.getElement().getElementsByTagName("bpel:condition").item(0);
+ validateElementValue(condition, expected.getProperty("condition"));
+ }
+
+ public void validate(ElseIfImpl mElseIf, Properties expected) {
+ log(mElseIf);
+ validateElementName(mElseIf.getElement(), "bpel:elseif");
+ Element condition = (Element) mElseIf.getElement().getElementsByTagName("bpel:condition").item(0);
+ validateElementValue(condition, expected.getProperty("condition"));
+ }
+
+ public void validate(ElseImpl mElse, Properties expected) {
+ log(mElse);
+ validateElementName(mElse.getElement(), "bpel:else");
+ }
+
+ public void validate(ValidateImpl mValidate, Properties expected) {
+ log(mValidate);
+ validateElementName(mValidate.getElement(), "bpel:validate");
+ validateElementAttribute(mValidate.getElement(), "name", expected.getProperty("name"));
+
+ // validate content
+ String actual = mValidate.getElement().getAttribute("variables");
+ String[] expectedVars = expected.getProperty("variables").split(" ");
+ for(String var : expectedVars) {
+ Assert.assertTrue(actual.contains(var));
+ // remove ${var} from the string. At the end we should have only an empty string
+ actual = actual.replace(var, "");
+ }
+ Assert.assertEquals(actual.trim(), "");
+ }
+
+ public void validate(EmptyImpl mEmpty, Properties expected) {
+ log(mEmpty);
+ validateElementName(mEmpty.getElement(), "bpel:empty");
+ validateElementAttribute(mEmpty.getElement(), "name", expected.getProperty("name"));
+ }
+
+ public void validate(PickImpl mPick, Properties expected) {
+ log(mPick);
+ validateElementName(mPick.getElement(), "bpel:pick");
+ validateElementAttribute(mPick.getElement(), "name", expected.getProperty("name"));
+ }
+
+ public void validate(OnMessageImpl mOnMessage, Properties expected) {
+ log(mOnMessage);
+ validateElementName(mOnMessage.getElement(), "bpel:onMessage");
+ validateElementAttribute(mOnMessage.getElement(), "operation", expected.getProperty("operation"));
+ validateElementAttribute(mOnMessage.getElement(), "partnerLink", expected.getProperty("partnerLink"));
+ validateElementAttribute(mOnMessage.getElement(), "variable", expected.getProperty("variable"));
+ }
+
+ public void validate(OnAlarmImpl mOnAlarm, Properties expected) {
+ log(mOnAlarm);
+ validateElementName(mOnAlarm.getElement(), "bpel:onAlarm");
+ Element scope = (Element) mOnAlarm.getElement().getElementsByTagName("bpel:scope").item(0);
+ Assert.assertNotNull(scope);
+ Element condition = (Element) mOnAlarm.getElement().getElementsByTagName("bpel:for").item(0);
+ Assert.assertNotNull(condition);
+ validateElementValue(condition, expected.getProperty("for"));
+ }
+
+ public void validate(WhileImpl mWhile, Properties expected) {
+ log(mWhile);
+ validateElementName(mWhile.getElement(), "bpel:while");
+ validateElementAttribute(mWhile.getElement(), "name", expected.getProperty("name"));
+ // validate condition
+ Element condition = (Element) mWhile.getElement().getElementsByTagName("bpel:condition").item(0);
+ Assert.assertNotNull(condition);
+ validateElementValue(condition, expected.getProperty("condition"));
+ }
+
+ public void validate(ForEachImpl mForEach, Properties expected) {
+ log(mForEach);
+ validateElementName(mForEach.getElement(), "bpel:forEach");
+ validateElementAttribute(mForEach.getElement(), "name", expected.getProperty("name"));
+ validateElementAttribute(mForEach.getElement(), "counterName", "Counter");
+
+ Element start = (Element) mForEach.getElement().getElementsByTagName("bpel:startCounterValue").item(0);
+ Assert.assertNotNull(start);
+ validateElementValue(start, expected.getProperty("startCounterValue"));
+
+ Element stop = (Element) mForEach.getElement().getElementsByTagName("bpel:finalCounterValue").item(0);
+ Assert.assertNotNull(stop);
+ validateElementValue(stop, expected.getProperty("finalCounterValue"));
+ }
+
+ public void validate(RepeatUntilImpl mRepeatUntil, Properties expected) {
+ log(mRepeatUntil);
+ validateElementName(mRepeatUntil.getElement(), "bpel:repeatUntil");
+ validateElementAttribute(mRepeatUntil.getElement(), "name", expected.getProperty("name"));
+
+ Element condition = (Element) mRepeatUntil.getElement().getElementsByTagName("bpel:condition").item(0);
+ Assert.assertNotNull(condition);
+ validateElementValue(condition, expected.getProperty("condition"));
+ }
+
+ public void validate(WaitImpl mWait, Properties expected) {
+ log(mWait);
+ validateElementName(mWait.getElement(), "bpel:wait");
+ validateElementAttribute(mWait.getElement(), "name", expected.getProperty("name"));
+
+ Element time = (Element) mWait.getElement().getElementsByTagName("bpel:for").item(0);
+ Assert.assertNotNull(time);
+ validateElementValue(time, expected.getProperty("for"));
+ }
+
+ public void validate(SequenceImpl mSequence, Properties expected) {
+ log(mSequence);
+ validateElementName(mSequence.getElement(), "bpel:sequence");
+ validateElementAttribute(mSequence.getElement(), "name", expected.getProperty("name"));
+ }
+
+ public void validate(FlowImpl mFlow, Properties expected) {
+ log(mFlow);
+ validateElementName(mFlow.getElement(), "bpel:flow");
+ validateElementAttribute(mFlow.getElement(), "name", expected.getProperty("name"));
+ }
+
+ public void validate(ScopeImpl mScope, Properties expected) {
+ log(mScope);
+ validateElementName(mScope.getElement(), "bpel:scope");
+ validateElementAttribute(mScope.getElement(), "name", expected.getProperty("name"));
+ }
+
+ public void validate(CompensationHandlerImpl mHandler, Properties expected) {
+ log(mHandler);
+ validateElementName(mHandler.getElement(), "bpel:compensationHandler");
+ }
+
+ public void validate(FaultHandlerImpl mHandler, Properties expected) {
+ log(mHandler);
+ validateElementName(mHandler.getElement(), "bpel:faultHandlers");
+ Element catchElem = (Element) mHandler.getElement().getElementsByTagName("bpel:catch").item(0);
+ Assert.assertNotNull(catchElem);
+ }
+
+ public void validate(ExitImpl mExit, Properties expected) {
+ log(mExit);
+ validateElementName(mExit.getElement(), "bpel:exit");
+ validateElementAttribute(mExit.getElement(), "name", expected.getProperty("name"));
+ }
+
+ public void validate(ThrowImpl mThrow, Properties expected) {
+ log(mThrow);
+ validateElementName(mThrow.getElement(), "bpel:throw");
+ validateElementAttribute(mThrow.getElement(), "name", expected.getProperty("name"));
+ // TODO: add this when this gets fixed !!!
+// validateElementAttribute(mThrow.getElement(), "faultVariable", expected.getProperty("faultVariable"));
+
+ // validate faultName which is in form ns:fault
+ String actual = mThrow.getElement().getAttribute("faultName");
+ Assert.assertTrue(actual.matches("(.)+:" + expected.getProperty("faultName")));
+ }
+
+ public void validate(RethrowImpl mRethrow, Properties expected) {
+ log(mRethrow);
+ validateElementName(mRethrow.getElement(), "bpel:rethrow");
+ validateElementAttribute(mRethrow.getElement(), "name", expected.getProperty("name"));
+ }
+
+ public void validate(CompensateImpl mCompensate, Properties expected) {
+ log(mCompensate);
+ validateElementName(mCompensate.getElement(), "bpel:compensate");
+ validateElementAttribute(mCompensate.getElement(), "name", expected.getProperty("name"));
+ }
+
+ public void validate(CompensateScopeImpl mCompensateScope, Properties expected) {
+ log(mCompensateScope);
+ validateElementName(mCompensateScope.getElement(), "bpel:compensateScope");
+ validateElementAttribute(mCompensateScope.getElement(), "name", expected.getProperty("name"));
+ validateElementAttribute(mCompensateScope.getElement(), "target", expected.getProperty("target"));
+ }
+
+
+ void validateElementName(Element elem, String expectedName) {
+ Assert.assertEquals(expectedName, elem.getNodeName());
+ }
+
+ void validateElementAttributes(Element elem, String[] expectedNames, String[] expectedValues) {
+ Assert.assertTrue(expectedNames.length == expectedValues.length);
+ Assert.assertTrue(elem.getAttributes().getLength() == expectedNames.length);
+ for(int i=0; i<expectedNames.length; i++) {
+ validateElementAttribute(elem, expectedNames[i], expectedValues[i]);
+ }
+ }
+
+ void validateElementAttribute(Element elem, String expectedAttribute, String expectedValue) {
+ String val = elem.getAttribute(expectedAttribute);
+ Assert.assertNotSame("", val);
+ Assert.assertEquals(expectedValue, val);
+ }
+
+ void validateElementValue(Element elem, String expectedVal) {
+ Node node = elem.getChildNodes().item(0);
+ String actual = node.getNodeValue();
+ Assert.assertEquals(expectedVal, actual);
+ }
+
+ private void log(ExtensibleElementImpl elem) {
+ log.info("Validating element: " + elem.getElement());
+ }
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/assertion/BPELValidator.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,31 @@
+package org.jboss.tools.bpel.ui.bot.test.suite;
+
+import junit.framework.TestSuite;
+
+import org.jboss.tools.bpel.ui.bot.test.ActivityModelingTest;
+import org.jboss.tools.bpel.ui.bot.test.AssignActivityTest;
+import org.jboss.tools.bpel.ui.bot.test.FaultModelingTest;
+import org.jboss.tools.bpel.ui.bot.test.SimpleModelingTest;
+import org.jboss.tools.bpel.ui.bot.test.WizardTest;
+
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+@SuiteClasses({ WizardTest.class, ActivityModelingTest.class,/* AssignActivityTest.class,*/ SimpleModelingTest.class, FaultModelingTest.class })
+(a)RunWith(RequirementAwareSuite.class)
+public class BPELAllTest extends TestSuite {
+
+ @BeforeClass
+ public static void setUpSuite() {
+ BPELTest.prepare();
+ }
+
+ @AfterClass
+ public static void tearDownSuite() {
+ BPELTest.clean();
+ }
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,118 @@
+package org.jboss.tools.bpel.ui.bot.test.suite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+public class BPELTest extends SWTTestExt {
+
+ public static void prepare() {
+ log.info("BPEL All Test started...");
+
+// jbt.closeReportUsageWindowIfOpened(true);
+// eclipse.maximizeActiveShell();
+// eclipse.closeView(IDELabel.View.WELCOME);
+// bot.closeAllEditors();
+ }
+
+ public static void clean() {
+ util.waitForNonIgnoredJobs();
+ bot.sleep(TIME_5S, "BPEL All Tests Finished!");
+ }
+
+ /**
+ * Creates a new process in a project identified by it's name.
+ *
+ * TODO: extend WSDL validation
+ *
+ * @param project project name in which to create the new process
+ * @param name process name
+ * @param type process type (sync, async, empty)
+ * @param isAbstract is the process supposed to be abstract?
+ *
+ * @return process file
+ */
+ protected IFile createNewProcess(String project, String name, String type, boolean isAbstract) {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.show();
+ view.setFocus();
+
+ SWTBot viewBot = view.bot();
+ SWTBotTreeItem item = viewBot.tree().expandNode(project).expandNode("bpelContent");
+ item.select();
+
+ bot.menu("File").menu("New").menu("Other...").click();
+ bot.shell("New").activate();
+
+ SWTBotTree tree = bot.tree();
+ tree.expandNode("BPEL 2.0").expandNode("New BPEL Process File").select();
+ assertTrue(bot.button("Next >").isEnabled());
+
+ bot.button("Next >").click();
+ assertFalse(bot.button("Next >").isEnabled());
+
+ bot.textWithLabel("BPEL Process Name:").setText(name);
+ bot.comboBoxWithLabel("Namespace:").setText("http://eclipse.org/bpel/sample");
+ bot.comboBoxWithLabel("Template:").setSelection(type + " BPEL Process");
+ if(isAbstract) {
+ bot.checkBox().select();
+ } else {
+ bot.checkBox().deselect();
+ assertTrue(bot.button("Next >").isEnabled());
+
+ bot.button("Next >").click();
+ assertEquals(name, bot.textWithLabel("Service Name").getText());
+ }
+
+ bot.button("Finish").click();
+ bot.sleep(5000);
+
+ IProject iproject = ResourcesPlugin.getWorkspace().getRoot().getProject(project);
+ IFile bpelFile = iproject.getFile(new Path("bpelContent/" + name + ".bpel"));
+ assertNotNull(bpelFile);
+ assertNotNull(iproject.getFile(new Path("bpelContent/" + name + ".bpelex")));
+ assertNotNull(iproject.getFile(new Path("bpelContent/" + name + "Artifacts.wsdl")));
+
+ return bpelFile;
+ }
+
+ /**
+ * Create a new BPEL project
+ * @param name project name
+ * @return project reference
+ */
+ protected IProject createNewProject(String name) {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.show();
+ view.setFocus();
+
+ bot.menu("File").menu("New").menu("Project...").click();
+ bot.shell("New Project").activate();
+
+ SWTBotTree tree = bot.tree();
+ tree.expandNode("BPEL 2.0").expandNode("BPEL Project").select();
+ assertTrue(bot.button("Next >").isEnabled());
+
+ bot.button("Next >").click();
+ bot.shell("New BPEL Project").activate();
+ assertFalse(bot.button("Finish").isEnabled());
+
+ bot.textWithLabel("Project name:").setText(name);
+ assertTrue(bot.button("Finish").isEnabled());
+
+ bot.button("Finish").click();
+ bot.sleep(3000);
+
+ IProject iproject = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ assertNotNull(iproject);
+
+ return iproject;
+ }
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/util/ResourceHelper.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/util/ResourceHelper.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/util/ResourceHelper.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,39 @@
+package org.jboss.tools.bpel.ui.bot.test.util;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.junit.Assert;
+import org.osgi.framework.Bundle;
+
+public class ResourceHelper {
+
+ public static void importProject(String bundleName, String templatePath, String projectName) throws Exception {
+ try {
+ SWTBotExt bot = new SWTBotExt();
+
+ Bundle bundle = Platform.getBundle(bundleName);
+ URL url = bundle.getEntry(templatePath);
+ String path = FileLocator.resolve(url).getFile();
+
+ bot.menu("File").menu("Import...").click();
+ SWTBot viewBot = bot.shell("Import").bot();
+ viewBot.tree().expandNode("General", "Existing Projects into Workspace").select();
+ viewBot.button("Next >").click();
+
+ viewBot.text().setText(path.toString());
+ viewBot.tree().select(projectName + " (" + path.substring(0, path.length() - 1) + ")");
+ viewBot.checkBox("Copy projects into workspace").select();
+ assert(viewBot.button("Finish").isEnabled());
+ viewBot.button("Finish").click();
+
+ Thread.sleep(3000);
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to import project: " + projectName, e.getCause());
+ }
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/util/ResourceHelper.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/util/SendSoapMessage.java
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/util/SendSoapMessage.java (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/util/SendSoapMessage.java 2011-03-03 16:34:09 UTC (rev 29468)
@@ -0,0 +1,64 @@
+package org.jboss.tools.bpel.util;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+/**
+ * Temporary class.
+ *
+ * @author mbaluch
+ *
+ */
+public class SendSoapMessage {
+
+ /**
+ *
+ * @param url URL string
+ * @param message SOAP message
+ * @param soapAction SOAP action name. This may be {@code null}. For more info see
+ * {@link http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#Toc478383528}
+ *
+ * @return response
+ * @throws IOException in case of an I/O error;
+ */
+ public static String sendMessage(String url, String message, String soapAction) throws IOException {
+ // setup connection
+ URL endpoint = new URL(url);
+ HttpURLConnection httpConnection = (HttpURLConnection) endpoint.openConnection();
+ httpConnection.setDoInput(true);
+ httpConnection.setDoOutput(true);
+ httpConnection.setUseCaches(false);
+ httpConnection.setRequestMethod("POST");
+ httpConnection.setRequestProperty("Content-Type", "text/xml");
+ httpConnection.setRequestProperty("SOAPAction", soapAction);
+ httpConnection.connect();
+
+ // send the SOAP message
+ PrintWriter pw = new PrintWriter(httpConnection.getOutputStream());
+ pw.write(message);
+ pw.flush();
+ pw.close();
+
+ // get the response
+ Writer w = new StringWriter();
+ Reader r = new BufferedReader(new InputStreamReader(
+ httpConnection.getInputStream()));
+
+ char[] b = new char[4096];
+ int size;
+ while ((size = r.read(b)) != -1) {
+ w.write(b, 0, size);
+ }
+
+ // return responses
+ return w.toString();
+ }
+
+}
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/util/SendSoapMessage.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/test_project.zip
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/test_project.zip
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
13 years, 10 months
JBoss Tools SVN: r29467 - branches/jbosstools-3.2.x/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-03-03 11:13:40 -0500 (Thu, 03 Mar 2011)
New Revision: 29467
Modified:
branches/jbosstools-3.2.x/build/target-platform/multiple.target
branches/jbosstools-3.2.x/build/target-platform/multiple.target.p2mirror.xml
branches/jbosstools-3.2.x/build/target-platform/unified.target
branches/jbosstools-3.2.x/build/target-platform/unified.target.p2mirror.xml
Log:
switch to using oro, wsdl, jdom PLUGINS instead of wrapping w/ custom-built features. fingers crossed.
Modified: branches/jbosstools-3.2.x/build/target-platform/multiple.target
===================================================================
--- branches/jbosstools-3.2.x/build/target-platform/multiple.target 2011-03-03 16:13:39 UTC (rev 29466)
+++ branches/jbosstools-3.2.x/build/target-platform/multiple.target 2011-03-03 16:13:40 UTC (rev 29467)
@@ -32,9 +32,9 @@
<repository location="http://download.eclipse.org/technology/subversive/0.7/weekly-site/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
- <unit id="javax.wsdl.feature.feature.group" version="1.6.2.v201005080631"/>
- <unit id="org.apache.oro.feature.feature.group" version="2.0.8.v201005080400"/>
- <unit id="org.jdom.feature.feature.group" version="1.0.0.v201005080400"/>
+ <unit id="javax.wsdl" version="1.6.2.v201005080631"/>
+ <unit id="org.apache.oro" version="2.0.8.v201005080400"/>
+ <unit id="org.jdom" version="1.0.0.v201005080400"/>
<repository location="http://download.jboss.org/jbosstools/updates/requirements/orbit/R20100519..."/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
Modified: branches/jbosstools-3.2.x/build/target-platform/multiple.target.p2mirror.xml
===================================================================
--- branches/jbosstools-3.2.x/build/target-platform/multiple.target.p2mirror.xml 2011-03-03 16:13:39 UTC (rev 29466)
+++ branches/jbosstools-3.2.x/build/target-platform/multiple.target.p2mirror.xml 2011-03-03 16:13:40 UTC (rev 29467)
@@ -51,9 +51,9 @@
</source>
<iu id="org.maven.ide.eclipse.feature.feature.group" version=""/>
<iu id="org.maven.ide.eclipse.wtp.feature.feature.group" version=""/>
-<iu id="javax.wsdl.feature.feature.group" version=""/>
-<iu id="org.apache.oro.feature.feature.group" version=""/>
-<iu id="org.jdom.feature.feature.group" version=""/>
+<iu id="javax.wsdl" version=""/>
+<iu id="org.apache.oro" version=""/>
+<iu id="org.jdom" version=""/>
<iu id="org.mozilla.xulrunner.feature.feature.group" version=""/>
<iu id="org.mozilla.xpcom.feature.feature.group" version=""/>
<iu id="org.eclipse.tptp.platform.profile.server.feature.group" version=""/>
Modified: branches/jbosstools-3.2.x/build/target-platform/unified.target
===================================================================
--- branches/jbosstools-3.2.x/build/target-platform/unified.target 2011-03-03 16:13:39 UTC (rev 29466)
+++ branches/jbosstools-3.2.x/build/target-platform/unified.target 2011-03-03 16:13:40 UTC (rev 29467)
@@ -35,9 +35,9 @@
<repository location="http://download.jboss.org/jbosstools/updates/target-platform/latest/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
- <unit id="javax.wsdl.feature.feature.group" version="1.6.2.v201005080631"/>
- <unit id="org.apache.oro.feature.feature.group" version="2.0.8.v201005080400"/>
- <unit id="org.jdom.feature.feature.group" version="1.0.0.v201005080400"/>
+ <unit id="javax.wsdl" version="1.6.2.v201005080631"/>
+ <unit id="org.apache.oro" version="2.0.8.v201005080400"/>
+ <unit id="org.jdom" version="1.0.0.v201005080400"/>
<repository location="http://download.jboss.org/jbosstools/updates/target-platform/latest/"/>
</location>
<!-- <location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
Modified: branches/jbosstools-3.2.x/build/target-platform/unified.target.p2mirror.xml
===================================================================
--- branches/jbosstools-3.2.x/build/target-platform/unified.target.p2mirror.xml 2011-03-03 16:13:39 UTC (rev 29466)
+++ branches/jbosstools-3.2.x/build/target-platform/unified.target.p2mirror.xml 2011-03-03 16:13:40 UTC (rev 29467)
@@ -52,9 +52,9 @@
</source>
<iu id="org.maven.ide.eclipse.feature.feature.group" version=""/>
<iu id="org.maven.ide.eclipse.wtp.feature.feature.group" version=""/>
-<iu id="javax.wsdl.feature.feature.group" version=""/>
-<iu id="org.apache.oro.feature.feature.group" version=""/>
-<iu id="org.jdom.feature.feature.group" version=""/>
+<iu id="javax.wsdl" version=""/>
+<iu id="org.apache.oro" version=""/>
+<iu id="org.jdom" version=""/>
<iu id="org.mozilla.xulrunner.feature.feature.group" version=""/>
<iu id="org.mozilla.xpcom.feature.feature.group" version=""/>
<iu id="org.eclipse.tptp.platform.profile.server.feature.group" version=""/>
13 years, 10 months
JBoss Tools SVN: r29466 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-03-03 11:13:39 -0500 (Thu, 03 Mar 2011)
New Revision: 29466
Modified:
trunk/build/target-platform/multiple.target
trunk/build/target-platform/multiple.target.p2mirror.xml
trunk/build/target-platform/unified.target
trunk/build/target-platform/unified.target.p2mirror.xml
Log:
switch to using oro, wsdl, jdom PLUGINS instead of wrapping w/ custom-built features. fingers crossed.
Modified: trunk/build/target-platform/multiple.target
===================================================================
--- trunk/build/target-platform/multiple.target 2011-03-03 14:01:58 UTC (rev 29465)
+++ trunk/build/target-platform/multiple.target 2011-03-03 16:13:39 UTC (rev 29466)
@@ -32,9 +32,9 @@
<repository location="http://download.eclipse.org/technology/subversive/0.7/weekly-site/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
- <unit id="javax.wsdl.feature.feature.group" version="1.6.2.v201005080631"/>
- <unit id="org.apache.oro.feature.feature.group" version="2.0.8.v201005080400"/>
- <unit id="org.jdom.feature.feature.group" version="1.0.0.v201005080400"/>
+ <unit id="javax.wsdl" version="1.6.2.v201005080631"/>
+ <unit id="org.apache.oro" version="2.0.8.v201005080400"/>
+ <unit id="org.jdom" version="1.0.0.v201005080400"/>
<repository location="http://download.jboss.org/jbosstools/updates/requirements/orbit/R20100519..."/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
@@ -225,4 +225,4 @@
<feature id="org.mozilla.xpcom.feature"/>
</includeBundles>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-</target>
\ No newline at end of file
+</target>
Modified: trunk/build/target-platform/multiple.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/multiple.target.p2mirror.xml 2011-03-03 14:01:58 UTC (rev 29465)
+++ trunk/build/target-platform/multiple.target.p2mirror.xml 2011-03-03 16:13:39 UTC (rev 29466)
@@ -51,9 +51,9 @@
</source>
<iu id="org.maven.ide.eclipse.feature.feature.group" version=""/>
<iu id="org.maven.ide.eclipse.wtp.feature.feature.group" version=""/>
-<iu id="javax.wsdl.feature.feature.group" version=""/>
-<iu id="org.apache.oro.feature.feature.group" version=""/>
-<iu id="org.jdom.feature.feature.group" version=""/>
+<iu id="javax.wsdl" version=""/>
+<iu id="org.apache.oro" version=""/>
+<iu id="org.jdom" version=""/>
<iu id="org.mozilla.xulrunner.feature.feature.group" version=""/>
<iu id="org.mozilla.xpcom.feature.feature.group" version=""/>
<iu id="org.eclipse.tptp.platform.profile.server.feature.group" version=""/>
Modified: trunk/build/target-platform/unified.target
===================================================================
--- trunk/build/target-platform/unified.target 2011-03-03 14:01:58 UTC (rev 29465)
+++ trunk/build/target-platform/unified.target 2011-03-03 16:13:39 UTC (rev 29466)
@@ -35,9 +35,9 @@
<repository location="http://download.jboss.org/jbosstools/updates/target-platform/latest/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
- <unit id="javax.wsdl.feature.feature.group" version="1.6.2.v201005080631"/>
- <unit id="org.apache.oro.feature.feature.group" version="2.0.8.v201005080400"/>
- <unit id="org.jdom.feature.feature.group" version="1.0.0.v201005080400"/>
+ <unit id="javax.wsdl" version="1.6.2.v201005080631"/>
+ <unit id="org.apache.oro" version="2.0.8.v201005080400"/>
+ <unit id="org.jdom" version="1.0.0.v201005080400"/>
<repository location="http://download.jboss.org/jbosstools/updates/target-platform/latest/"/>
</location>
<!-- <location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
@@ -244,4 +244,4 @@
<feature id="org.mozilla.xpcom.feature"/>
</includeBundles>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-</target>
\ No newline at end of file
+</target>
Modified: trunk/build/target-platform/unified.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/unified.target.p2mirror.xml 2011-03-03 14:01:58 UTC (rev 29465)
+++ trunk/build/target-platform/unified.target.p2mirror.xml 2011-03-03 16:13:39 UTC (rev 29466)
@@ -52,9 +52,9 @@
</source>
<iu id="org.maven.ide.eclipse.feature.feature.group" version=""/>
<iu id="org.maven.ide.eclipse.wtp.feature.feature.group" version=""/>
-<iu id="javax.wsdl.feature.feature.group" version=""/>
-<iu id="org.apache.oro.feature.feature.group" version=""/>
-<iu id="org.jdom.feature.feature.group" version=""/>
+<iu id="javax.wsdl" version=""/>
+<iu id="org.apache.oro" version=""/>
+<iu id="org.jdom" version=""/>
<iu id="org.mozilla.xulrunner.feature.feature.group" version=""/>
<iu id="org.mozilla.xpcom.feature.feature.group" version=""/>
<iu id="org.eclipse.tptp.platform.profile.server.feature.group" version=""/>
13 years, 10 months
JBoss Tools SVN: r29465 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-03-03 09:01:58 -0500 (Thu, 03 Mar 2011)
New Revision: 29465
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-8470
Strategy Completion Proposals
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2011-03-03 12:17:28 UTC (rev 29464)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2011-03-03 14:01:58 UTC (rev 29465)
@@ -11,6 +11,7 @@
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
@@ -21,7 +22,10 @@
import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.core.internal.context.java.AbstractJavaGenerator;
import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -74,6 +78,7 @@
this.parameters = new ArrayList<JavaParameter>();
}
+ @Override
protected GenericGeneratorAnnotation getResourceGenerator() {
return this.generatorResource;
}
@@ -93,6 +98,7 @@
this.getPersistenceUnit().addGenerator(this);
}
+ @Override
public void setName(String name) {
String old = this.name;
this.name = name;
@@ -100,10 +106,12 @@
this.firePropertyChanged(Generator.NAME_PROPERTY, old, name);
}
+ @Override
public TextRange getSelectionTextRange(CompilationUnit astRoot) {
return this.generatorResource.getTextRange(astRoot);
}
+ @Override
public TextRange getNameTextRange(CompilationUnit astRoot) {
return this.generatorResource.getNameTextRange(astRoot);
}
@@ -129,10 +137,12 @@
return this.generatorResource.getStrategyTextRange(astRoot);
}
+ @Override
protected String getCatalog() {
return null;
}
+ @Override
protected String getSchema() {
return null;
}
@@ -271,5 +281,30 @@
public int getDefaultInitialValue() {
return GenericGenerator.DEFAULT_INITIAL_VALUE;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode#javaCompletionProposals(int, org.eclipse.jpt.utility.Filter, org.eclipse.jdt.core.dom.CompilationUnit)
+ */
+ @Override
+ public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+ Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+ if (result != null) {
+ return result;
+ }
+ TextRange strategyRange = getStrategyTextRange(astRoot);
+ if (strategyRange != null && strategyRange.touches(pos)) {
+ return getJavaCandidateNames(filter).iterator();
+ }
+ return null;
+ }
+ private Iterable<String> getJavaCandidateNames(Filter<String> filter) {
+ return StringTools.convertToJavaStringLiterals(this
+ .getCandidateNames(filter));
+ }
+
+ private Iterable<String> getCandidateNames(Filter<String> filter) {
+ return new FilteringIterable<String>(generatorClasses, filter);
+ }
+
}
13 years, 10 months
JBoss Tools SVN: r29464 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-03-03 07:17:28 -0500 (Thu, 03 Mar 2011)
New Revision: 29464
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/Flasher.java
Log:
https://issues.jboss.org/browse/JBIDE-8115, fix NPE
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/Flasher.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/Flasher.java 2011-03-03 10:17:09 UTC (rev 29463)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/Flasher.java 2011-03-03 12:17:28 UTC (rev 29464)
@@ -63,6 +63,7 @@
private void saveOldStyle(List<FlasherData> flasherData){
for (FlasherData flasherData2 : flasherData) {
nsIDOMElement domElement = flasherData2.getElement();
+ if(domElement==null) continue;
String oldstyle = domElement.getAttribute(XulRunnerEditor.STYLE_ATTR);
domElement.setAttribute(XulRunnerEditor.STYLE_ATTR,
domElement.getAttribute(XulRunnerEditor.STYLE_ATTR) + ';'
13 years, 10 months
JBoss Tools SVN: r29463 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-03-03 05:17:09 -0500 (Thu, 03 Mar 2011)
New Revision: 29463
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
Log:
https://issues.jboss.org/browse/JBIDE-8115, DnD has been disabled when selected more than one node.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2011-03-03 09:42:26 UTC (rev 29462)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2011-03-03 10:17:09 UTC (rev 29463)
@@ -134,6 +134,7 @@
}
private nsIDOMElement getSelectedElement() {
+ if(vpeController.getXulRunnerEditor().getLastSelectedNodes().size()!=1) return null;
return vpeController.getXulRunnerEditor().getSelectedElement();
}
13 years, 10 months
JBoss Tools SVN: r29462 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-03-03 04:42:26 -0500 (Thu, 03 Mar 2011)
New Revision: 29462
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
https://issues.jboss.org/browse/JBIDE-8115, fix NPE
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-03-03 04:06:42 UTC (rev 29461)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-03-03 09:42:26 UTC (rev 29462)
@@ -1089,7 +1089,7 @@
public void setSelectionRectangle(/* nsIDOMElement */List<nsIDOMNode> visualNodes) {
int resizerConstrains = VpeTagDescription.RESIZE_CONSTRAINS_NONE;
- if(visualNodes.size()==1){
+ if(visualNodes!=null&&visualNodes.size()==1){
resizerConstrains = getResizerConstrains(visualNodes.get(0));
}
visualEditor.setSelectionRectangle(visualNodes, resizerConstrains);
13 years, 10 months
JBoss Tools SVN: r29461 - trunk/hibernatetools/docs/reference/en-US/images/plugins.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-02 23:06:42 -0500 (Wed, 02 Mar 2011)
New Revision: 29461
Modified:
trunk/hibernatetools/docs/reference/en-US/images/plugins/map_diagram1.png
trunk/hibernatetools/docs/reference/en-US/images/plugins/map_diagram2.png
trunk/hibernatetools/docs/reference/en-US/images/plugins/map_diagram3.png
trunk/hibernatetools/docs/reference/en-US/images/plugins/plugins_17_a.png
trunk/hibernatetools/docs/reference/en-US/images/plugins/plugins_18.png
Log:
"General editing and updates"
Modified: trunk/hibernatetools/docs/reference/en-US/images/plugins/map_diagram1.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en-US/images/plugins/map_diagram2.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en-US/images/plugins/map_diagram3.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en-US/images/plugins/plugins_17_a.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en-US/images/plugins/plugins_18.png
===================================================================
(Binary files differ)
13 years, 10 months
JBoss Tools SVN: r29460 - in trunk/hibernatetools/docs/reference/en-US: images/plugins and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-02 23:00:59 -0500 (Wed, 02 Mar 2011)
New Revision: 29460
Modified:
trunk/hibernatetools/docs/reference/en-US/images/plugins/plugins_17.png
trunk/hibernatetools/docs/reference/en-US/plugins.xml
Log:
"General editing and updates"
Modified: trunk/hibernatetools/docs/reference/en-US/images/plugins/plugins_17.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en-US/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/plugins.xml 2011-03-03 03:48:09 UTC (rev 29459)
+++ trunk/hibernatetools/docs/reference/en-US/plugins.xml 2011-03-03 04:00:59 UTC (rev 29460)
@@ -1353,7 +1353,7 @@
</mediaobject>
</figure>
<para>
- The <guilabel>Table and Columns</guilabel> page allows you to explicit set which details (e.g. which hibernatetype and propertyname) should be used in the reverse engineered model. For more details on how to configure the tables while reverse engineering read <xref linkend="tab_and_col"/>.
+ The <guilabel>Table and Columns</guilabel> page allows you to explicitly set which details (e.g. which hibernatetype and propertyname) should be used in the reverse engineered model. For more details on how to configure the tables while reverse engineering read <xref linkend="tab_and_col"/>.
</para>
<figure>
<title>Table and Columns Page</title>
@@ -1366,12 +1366,11 @@
</imageobject>
</mediaobject>
</figure>
- <para>Now that you have configured all the necessary settings, you can learn how to work with the <property>Hibernate Console Perspective</property>.</para>
</section>
<section id="hib_console">
<title>Hibernate Console Perspective</title>
<para>
- The <guilabel>Hibernate Console Perspective</guilabel> combines a set of views which allow you to see the structure of your mapped entities and classes, edit HQL queries, execute the queries, and see the results. To use this perspective you need to create a <guilabel>Hibernate Console Configuration</guilabel> (see <xref linkend="console_conf"/>).
+ The <guilabel>Hibernate Console Perspective</guilabel> combines a set of views which allow you to see the structure of your mapped entities and classes, edit HQL queries, execute the queries, and view the results. To use this perspective you need to create a <guilabel>Hibernate Console Configuration</guilabel> (see <xref linkend="console_conf"/> for more information).
</para>
<section>
<title>Viewing the entity structure</title>
13 years, 10 months