JBoss Tools SVN: r29234 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-18 03:23:53 -0500 (Fri, 18 Feb 2011)
New Revision: 29234
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WorkbenchUtils.java
Log:
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WorkbenchUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WorkbenchUtils.java 2011-02-18 01:55:47 UTC (rev 29233)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WorkbenchUtils.java 2011-02-18 08:23:53 UTC (rev 29234)
@@ -93,10 +93,10 @@
* @return the first element
*/
public static <T> T getFirstAdaptedElement(final ISelection selection, final Class<T> expectedClass) {
- if (selection == null) {
+ if (selection == null
+ || !(selection instanceof IStructuredSelection)) {
return null;
} else {
- Assert.isTrue(selection instanceof IStructuredSelection);
Object firstElement = ((IStructuredSelection) selection).getFirstElement();
if (firstElement == null) {
return null;
15 years, 1 month
JBoss Tools SVN: r29231 - workspace/bbrodt/org.eclipse.bpel.apache.ode.deploy.model.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-17 18:32:10 -0500 (Thu, 17 Feb 2011)
New Revision: 29231
Modified:
workspace/bbrodt/org.eclipse.bpel.apache.ode.deploy.model/
Log:
Property changes on: workspace/bbrodt/org.eclipse.bpel.apache.ode.deploy.model
___________________________________________________________________
Added: svn:ignore
+ bin
pom.xml
15 years, 1 month
JBoss Tools SVN: r29230 - in workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime: .settings and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-17 18:28:03 -0500 (Thu, 17 Feb 2011)
New Revision: 29230
Added:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw.xml
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawBPELPublisher.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawPlugin.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java
Modified:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/
Log:
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime
___________________________________________________________________
Added: svn:ignore
+ bin
pom.xml
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.jboss.riftsaw.runtime</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,8 @@
+#Tue Oct 20 16:01:25 CST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,40 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.bpel.jboss.riftsaw.runtime;singleton:=true
+Bundle-Version: 0.5.0.qualifier
+Bundle-Activator: org.eclipse.bpel.jboss.riftsaw.runtime.RiftsawPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.wst.server.core,
+ org.eclipse.wst.web.ui,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.common.frameworks.ui,
+ org.eclipse.jst.server.generic.core,
+ org.eclipse.jst.server.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.server.generic.ui;bundle-version="[1.0.305,2.0.0)",
+ org.eclipse.jst.server.ui;bundle-version="[1.0.303,2.0.0)",
+ org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.jem.util,
+ org.eclipse.debug.ui,
+ org.eclipse.bpel.model,
+ org.eclipse.emf.ecore,
+ org.eclipse.wst.wsdl,
+ javax.wsdl,
+ org.eclipse.jst.common.frameworks,
+ org.eclipse.wst.web,
+ org.jboss.ide.eclipse.as.core;resolution:=optional,
+ org.jboss.ide.eclipse.archives.webtools;resolution:=optional,
+ org.eclipse.wst.server.ui;resolution:=optional,
+ org.eclipse.ui.navigator,
+ org.eclipse.bpel.runtimes;bundle-version="0.5.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.bpel.jboss.riftsaw.runtime
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.*,\
+ icons/
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw.xml 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:ServerRuntime
+ xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
+ name="JBoss Riftsaw" version="v2.x">
+
+ <property id="jbossHome"
+ label="%jbossHome"
+ type="directory"
+ context="runtime"
+ default="/your_server_root" />
+
+ <property id="serverAddress"
+ label="%serverAddress"
+ type="string"
+ context="runtime"
+ default="localhost" />
+
+ <property id="port"
+ label="%port"
+ type="string"
+ context="runtime"
+ default="8080" />
+
+ <property id="serverConfig"
+ label="%jbossServerConfig"
+ type="combo"
+ context="runtime"
+ default="default,all,minimal,other - type your own here" />
+
+ <property id="vmArguments"
+ label="%vmArguments"
+ type="string"
+ context="runtime"
+ default="-Xms128m -Xmx512m -XX:MaxPermSize=256m" />
+
+ <port>
+ <no>${port}</no>
+ <name>Http</name>
+ <protocol>http</protocol>
+ </port>
+
+ <module>
+ <type>bpel.module</type>
+ <publishDir>${jbossHome}/server/${serverConfig}/deploy</publishDir>
+ <publisherReference>org.eclipse.bpel.jboss.riftsaw.runtime.publisher</publisherReference>
+ </module>
+
+ <project>
+ <classpathReference>riftsaw.project</classpathReference>
+ </project>
+
+ <start>
+ <mainClass>org.jboss.Main</mainClass>
+ <workingDirectory>${jbossHome}/bin</workingDirectory>
+ <programArguments>-c ${serverConfig}</programArguments>
+ <vmParameters>-Dprogram.name=run.bat -Djava.endorsed.dirs=${jbossHome}/lib/endorsed ${vmArguments}</vmParameters>
+ <classpathReference>jboss.run</classpathReference>
+ </start>
+
+ <stop>
+ <mainClass>org.jboss.Shutdown</mainClass>
+ <workingDirectory>${jbossHome}/bin</workingDirectory>
+ <programArguments>-S</programArguments>
+ <vmParameters>-Djboss.boot.loader.name=shutdown.bat</vmParameters>
+ <classpathReference>jboss.shutdown</classpathReference>
+ </stop>
+
+ <classpath id="jboss.run" >
+ <archive path="${jbossHome}/bin/run.jar" />
+ </classpath>
+
+ <classpath id="jboss.shutdown" >
+ <archive path="${jbossHome}/bin/shutdown.jar" />
+ </classpath>
+
+ <classpath id="jboss.project" >
+
+
+ <fileset dir="${jbossHome}">
+ <include name="client/*.jar" />
+ <include name="server/default/lib/*.jar" />
+
+ <include name="server/default/deploy/jbossweb.sar/jsf-libs/*.jar" />
+
+ <!-- This will be ignored if EJB3 is not there 5.0 -->
+ <include name="lib/*.jar" />
+ <include name="server/default/deployers/jbossweb.deployer/*.jar" />
+ <include name="server/default/deployers/jboss-aop-jboss5.deployer/*.jar" />
+ <include name="common/lib/*.jar" />
+ <include name="server/default/deploy/jbossweb.sar/*.jar" />
+
+ <!-- for validation to work this library is defined as an archive -->
+ <exclude name="lib/jboss-kernel.jar" />
+ </fileset>
+
+ <!-- leave one generic jar as an archive so that validation works -->
+ <archive path="${jbossHome}/lib/jboss-kernel.jar" />
+
+ </classpath>
+
+</tns:ServerRuntime>
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,33 @@
+###############################################################################
+# Copyright (c) 2010 JBoss by Red Hat and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# University College London - initial API and implementation
+# JBoss by Red Hat - subsequent contributions and maintenance
+###############################################################################
+pluginName = Eclipse BPEL Designer Runtimes
+providerName = JBoss by Red Hat
+
+MODULE_TYPE_NAME=BPEL 2.0 Process
+MODULE_TYPE_DESCRIPTION=Module representing a BPEL process
+
+BPEL_CORE_FACET_LABEL=BPEL 2.0 Facet
+BPEL_CORE_FACET_DESCRIPTION=Enables modelling and deployment of BPEL processes.
+BPEL_FACET_CATEGORY_LABEL=BPEL 2.0
+BPEL_FACET_TEMPLATE_LABEL=BPEL 2.0 Project
+NEW_BPEL_CATEGORY=BPEL 2.0
+NEW_BPEL_PROJECT=BPEL Project
+NEW_BPEL_PROJECT_DESCRIPTION=Create a new BPEL project.
+
+# used by wizard definitions in definition/riftsaw.xml
+pluginName = JBoss Riftsaw Runtime Adapter
+providerName = JBoss by Red Hat
+jbossHome = JBoss App Server home directory:
+jbossServerConfig = Server configuration:
+serverAddress = Server address:
+port = Port:
+vmArguments = VM Arguments:
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension point="org.eclipse.jst.server.generic.core.genericpublisher">
+ <genericpublisher
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.RiftsawBPELPublisher"
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.publisher" />
+ </extension>
+
+ <extension point="org.eclipse.wst.server.core.runtimeTypes">
+ <runtimeType
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ name="JBoss Riftsaw 2.x"
+ description="JBoss Riftsaw 2.x WS-BPEL execution engine - Runtime"
+ vendor="JBoss Community"
+ version="2.2"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.RiftsawServerRuntime">
+ <moduleType
+ types="bpel.module"
+ versions="1.1, 2.0"/>
+ </runtimeType>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.core.serverTypes">
+ <serverType
+ runtime="true"
+ class="org.eclipse.jst.server.generic.core.internal.GenericServer"
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.st"
+ initialState="stopped"
+ supportsRemoteHosts="true"
+ runtimeTypeId="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ description="JBoss Riftsaw 2.x WS-BPEL execution engine - Server"
+ launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
+ behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
+ name="JBoss Riftsaw 2.x Server"
+ hasConfiguration="false"
+ startTimeout="480000"
+ stopTimeout="60000"
+ launchModes="run, debug"
+ startBeforePublish="true">
+ </serverType>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/riftsaw.gif"
+ typeIds="org.eclipse.bpel.jboss.riftsaw.runtime.rt"/>
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/riftsaw.gif"
+ typeIds="org.eclipse.bpel.jboss.riftsaw.runtime.st" />
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"/>
+
+ <runtime-component-version
+ type="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ version="2.0" />
+
+ <adapter>
+ <runtime-component
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"/>
+ <factory
+ class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory" />
+ <type
+ class="org.eclipse.jst.common.project.facet.core.IClasspathProvider" />
+ </adapter>
+
+ <supported>
+ <runtime-component
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ version="2.0" />
+ <facet
+ id="bpel.facet.core"
+ version="2.0"/>
+ </supported>
+ </extension>
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image
+ runtime-component-type="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ path="icons/obj16/riftsaw.gif"/>
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <adapter>
+ <runtime-component
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt" />
+ <factory
+ class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory" />
+ <type
+ class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider" />
+ </adapter>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
+ <runtimeFacetMapping
+ runtimeTypeId="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ runtime-component="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ version="2.0"/>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.generic.core.serverdefinition">
+ <serverdefinition
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ definitionfile="definition/riftsaw.xml">
+ </serverdefinition>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.ui.wizardFragments">
+ <fragment
+ id="org.eclipse.jst.server.generic.runtime"
+ typeIds="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerRuntimeWizardFragment" />
+ <fragment
+ id="org.eclipse.jst.server.generic.server"
+ typeIds="org.eclipse.bpel.jboss.riftsaw.runtime.st"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment" />
+ </extension>
+
+</plugin>
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawBPELPublisher.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawBPELPublisher.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawBPELPublisher.java 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,82 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.bpel.runtimes.publishers.GenericBPELPublisher;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.server.core.PublishUtil;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+
+public class RiftsawBPELPublisher extends GenericBPELPublisher {
+
+ public RiftsawBPELPublisher() {
+ super();
+ }
+
+ @Override
+ public IStatus[] publish(IModuleArtifact[] artifacts, IProgressMonitor monitor) {
+ // resources will always be null for some weird reason :(
+ // therefore we generate a BPELModuleArtifact
+ // the module id value enables us to get BPEL file path relative to its project
+ IModule[] modules = super.getModule();
+
+ try {
+ IModule last = modules[modules.length-1];
+ IPath root = createDeploymentDestination(last);
+ ModuleDelegate delegate = (ModuleDelegate)last.loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ IModuleResource[] resources = delegate.members();
+ PublishUtil.publishFull(resources, root, monitor);
+ } catch( CoreException ce ) {
+ // TODO return bad status
+ }
+ return new IStatus[]{Status.OK_STATUS};
+
+ }
+
+ @Override
+ public IStatus[] unpublish(IProgressMonitor monitor) {
+ IModule[] modules = super.getModule();
+ IModule last = modules[modules.length - 1];
+ IStatus[] result = new Status[modules.length];
+ IPath root = createDeploymentDestination(last);
+ PublishUtil.deleteDirectory(root.toFile(), monitor);
+ return result;
+ }
+
+ /**
+ * This method will create a folder inside the WEB-INF\processes subfolder
+ * of the ODE installation
+ */
+ protected IPath createDeploymentDestination(IModule module) {
+ String moduleName = module.getName();
+ String deployAppName = moduleName;
+
+ // get RIFTSAW_HOME
+ IRuntime serverDef = getServerRuntime().getRuntime();
+ IPath jbossHome = serverDef.getLocation();
+ Map m = getServerRuntime().getServerInstanceProperties();
+ String config = (String)m.get("serverConfig");
+ String home = (String)m.get("jboss.home");
+
+ // append Process name
+ IPath deployTarget = jbossHome.removeLastSegments(1).append("server").append(config).append("deploy").append(deployAppName);
+
+ File f = deployTarget.toFile();
+ if (!f.exists()) {
+ f.mkdir();
+ }
+
+ return deployTarget;
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawPlugin.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawPlugin.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawPlugin.java 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RiftsawPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.bpel.jboss.riftsaw.runtime"; //$NON-NLS-1$
+
+ //The shared instance.
+ private static RiftsawPlugin plugin;
+
+ private boolean imagesInitialized = false;
+
+ /**
+ * The constructor.
+ */
+ public RiftsawPlugin() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance.
+ */
+ public static RiftsawPlugin getPlugin() {
+ return plugin;
+ }
+
+ @Override
+ public ImageRegistry getImageRegistry() {
+ ImageRegistry result = super.getImageRegistry();
+ initialize();
+ return result;
+ }
+
+ /**
+ * Returns the image descriptor for the given image ID.
+ * Returns null if there is no such image.
+ */
+ public ImageDescriptor getImageDescriptor(String id) {
+ return getImageRegistry().getDescriptor(id);
+ }
+
+ public Image getImage(String id) {
+ return getImageRegistry().get(id);
+ }
+
+ /**
+ * Creates an image descriptor and places it in the image registry.
+ */
+ private void createImageDescriptor(String id, URL baseURL) {
+ URL url = null;
+ try {
+ url = new URL(baseURL, IRuntimesUIConstants.ICON_PATH + id);
+ } catch (MalformedURLException e) {
+ RiftsawPlugin.log(e);
+ }
+ ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+ getImageRegistry().put(id, desc);
+ }
+
+ protected void initialize() {
+ if (!imagesInitialized) {
+ imagesInitialized = true;
+ initializeImages();
+ }
+ }
+
+ /**
+ * Initializes the table of images used in this plugin.
+ */
+ private void initializeImages() {
+ URL baseURL = getBundle().getEntry("/"); //$NON-NLS-1$
+
+ // TODO make sure you initialize all required icons here
+ createImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER, baseURL);
+ createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_NEW_PRJ, baseURL);
+ createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_PRJ, baseURL);
+ }
+
+ /**
+ * Utility methods for logging exceptions.
+ */
+ public static void log(Exception e, int severity) {
+ IStatus status = null;
+ if (e instanceof CoreException) {
+ status = ((CoreException)e).getStatus();
+ } else {
+ String m = e.getMessage();
+ status = new Status(severity, PLUGIN_ID, 0, m==null? "<no message>" : m, e); //$NON-NLS-1$
+ }
+ System.out.println(e.getClass().getName()+": "+status); //$NON-NLS-1$
+ RiftsawPlugin.getPlugin().getLog().log(status);
+ }
+
+ public static void log(Exception e) {
+ log(e, IStatus.ERROR);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java 2011-02-17 23:28:03 UTC (rev 29230)
@@ -0,0 +1,26 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jst.server.generic.core.internal.GenericServerRuntime;
+import org.eclipse.bpel.runtimes.IBPELRuntimeDelegate;
+
+public class RiftsawServerRuntime extends GenericServerRuntime implements IBPELRuntimeDelegate {
+
+ public String getServerAddress()
+ {
+ return "localhost";
+ }
+
+ public String getPort()
+ {
+ Map m = getAttribute("generic_server_attributes", new HashMap());
+ return (String)m.get("port");
+ }
+
+ public String getDeployDir()
+ {
+ return "";
+ }
+}
15 years, 1 month
JBoss Tools SVN: r29228 - in workspace/bbrodt/org.eclipse.bpel.runtimes: .settings and 16 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-17 18:25:16 -0500 (Thu, 17 Feb 2011)
New Revision: 29228
Added:
workspace/bbrodt/org.eclipse.bpel.runtimes/.classpath
workspace/bbrodt/org.eclipse.bpel.runtimes/.cvsignore
workspace/bbrodt/org.eclipse.bpel.runtimes/.project
workspace/bbrodt/org.eclipse.bpel.runtimes/.settings/
workspace/bbrodt/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs
workspace/bbrodt/org.eclipse.bpel.runtimes/META-INF/
workspace/bbrodt/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF
workspace/bbrodt/org.eclipse.bpel.runtimes/build.properties
workspace/bbrodt/org.eclipse.bpel.runtimes/icons/
workspace/bbrodt/org.eclipse.bpel.runtimes/icons/ctool16/
workspace/bbrodt/org.eclipse.bpel.runtimes/icons/ctool16/new_bpelprj.gif
workspace/bbrodt/org.eclipse.bpel.runtimes/icons/obj16/
workspace/bbrodt/org.eclipse.bpel.runtimes/icons/obj16/bpelfacet.gif
workspace/bbrodt/org.eclipse.bpel.runtimes/icons/obj16/prj_bpel.gif
workspace/bbrodt/org.eclipse.bpel.runtimes/icons/wizban/
workspace/bbrodt/org.eclipse.bpel.runtimes/icons/wizban/newprj_bpel_wiz_banner.gif
workspace/bbrodt/org.eclipse.bpel.runtimes/plugin.properties
workspace/bbrodt/org.eclipse.bpel.runtimes/plugin.xml
workspace/bbrodt/org.eclipse.bpel.runtimes/src/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELRuntimeDelegate.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/
workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java
Modified:
workspace/bbrodt/org.eclipse.bpel.runtimes/
Log:
Property changes on: workspace/bbrodt/org.eclipse.bpel.runtimes
___________________________________________________________________
Added: svn:ignore
+ pom.xml
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/.classpath
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/.classpath (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/.classpath 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+</classpath>
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/.cvsignore
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/.cvsignore (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/.cvsignore 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,4 @@
+target
+bin
+*.class
+
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/.project
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/.project (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/.project 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.runtimes</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/.settings/org.eclipse.jdt.core.prefs 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,7 @@
+#Mon Oct 23 11:56:22 PDT 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.bpel.runtimes; singleton:=true
+Bundle-Version: 0.5.0.qualifier
+Bundle-Activator: org.eclipse.bpel.runtimes.RuntimesPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.wst.server.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.wst.web.ui;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.project.facet.ui;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.wst.common.modulecore;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.frameworks;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.wst.common.frameworks.ui;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.jst.server.generic.core;bundle-version="[1.0.305,2.0.0)",
+ org.eclipse.jem.util;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.debug.ui;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.bpel.model;bundle-version="0.5.0",
+ org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)",
+ javax.wsdl;bundle-version="[1.5.0,1.6.0)",
+ org.eclipse.wst.wsdl;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.jst.common.frameworks
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.bpel.runtimes,
+ org.eclipse.bpel.runtimes.facets,
+ org.eclipse.bpel.runtimes.module,
+ org.eclipse.bpel.runtimes.publishers,
+ org.eclipse.bpel.runtimes.ui.wizards
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/build.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/build.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/build.properties 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,16 @@
+bin.includes = plugin.xml,\
+ META-INF/,\
+ icons/,\
+ plugin.properties,\
+ .
+src.includes = META-INF/,\
+ icons/,\
+ plugin.*,\
+ src/,\
+ build.properties,\
+ .,\
+ .project,\
+ .cvsignore,\
+ .classpath
+source.. = src/
+
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/icons/ctool16/new_bpelprj.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.runtimes/icons/ctool16/new_bpelprj.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/icons/obj16/bpelfacet.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.runtimes/icons/obj16/bpelfacet.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/icons/obj16/prj_bpel.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.runtimes/icons/obj16/prj_bpel.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/icons/wizban/newprj_bpel_wiz_banner.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.runtimes/icons/wizban/newprj_bpel_wiz_banner.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/plugin.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/plugin.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/plugin.properties 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2006 University College London.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+###############################################################################
+pluginName = Eclipse BPEL Designer Runtimes
+providerName = University College London Software Systems Engineering
+
+MODULE_TYPE_NAME=BPEL 2.0 Process
+MODULE_TYPE_DESCRIPTION=Module representing a BPEL process
+
+BPEL_CORE_FACET_LABEL=BPEL 2.0 Facet
+BPEL_CORE_FACET_DESCRIPTION=Enables modelling and deployment of BPEL processes.
+BPEL_FACET_CATEGORY_LABEL=BPEL 2.0
+BPEL_FACET_TEMPLATE_LABEL=BPEL 2.0 Project
+NEW_BPEL_CATEGORY=BPEL 2.0
+NEW_BPEL_PROJECT=BPEL Project
+NEW_BPEL_PROJECT_DESCRIPTION=Create a new BPEL project.
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/plugin.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/plugin.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/plugin.xml 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--=========================================================================-->
+<!-- BPEL Designer Runtime Extension Point -->
+<!-- -->
+<!-- Copyright (c) 2006 University College London. -->
+<!-- All rights reserved. This program and the accompanying materials -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at -->
+<!-- http://www.eclipse.org/legal/epl-v10.html -->
+<!-- -->
+<!--=========================================================================-->
+
+<plugin>
+
+<!--=========================================================================-->
+<!-- New BPEL Project Wizard -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ name="%NEW_BPEL_PROJECT"
+ icon="icons/ctool16/new_bpelprj.gif"
+ category="org.eclipse.bpel.wizards"
+ project="true"
+ class="org.eclipse.bpel.runtimes.ui.wizards.NewBPELProjectWizard"
+ id="org.eclipse.bpel.runtimes.wizards.newBPELProject">
+ <description>%NEW_BPEL_PROJECT_DESCRIPTION</description>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
+ <wizard-pages action="bpel.facet.core.install">
+ <page class="org.eclipse.bpel.runtimes.ui.wizards.BPELFacetInstallPage"/>
+ </wizard-pages>
+ </extension>
+
+
+<!--=========================================================================-->
+<!-- BPEL ModuleType -->
+<!--=========================================================================-->
+
+ <extension
+ id="bpel.module"
+ name="%MODULE_TYPE_NAME"
+ point="org.eclipse.wst.server.core.moduleTypes">
+ </extension>
+
+<!-- The following is needed to make icons for deployable modules occur in -->
+<!-- the Add and Remove Projects wizard -->
+
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.bpel.runtimes.bpel.module"
+ typeIds="bpel.module"
+ icon="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Facet -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.common.project.facet.core.facets">
+
+ <project-facet id="bpel.facet.core">
+ <label>%BPEL_CORE_FACET_LABEL</label>
+ <description>%BPEL_CORE_FACET_DESCRIPTION</description>
+ </project-facet>
+
+ <project-facet-version facet="bpel.facet.core" version="2.0">
+ <group-member id="modules"></group-member>
+ <constraint>
+ <conflicts group="modules">
+ </conflicts>
+ </constraint>
+ </project-facet-version>
+
+
+ <action facet="bpel.facet.core" version="2.0" type="INSTALL" id="bpel.facet.core.install">
+ <delegate class="org.eclipse.bpel.runtimes.facets.BPELCoreFacetInstallDelegate"/>
+ <config-factory class="org.eclipse.bpel.runtimes.facets.BPELFacetInstallDataModelProvider"/>
+ </action>
+
+ <category id="bpel.category">
+ <label>%BPEL_FACET_CATEGORY_LABEL</label>
+ <description>%bpelCoreFacetDescription</description>
+ </category>
+
+ <template id="template.bpel.core">
+ <label>%BPEL_FACET_TEMPLATE_LABEL</label>
+ <fixed facet="bpel.facet.core"/>
+ </template>
+
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Facet Image -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image facet="bpel.facet.core" path="icons/obj16/bpelfacet.gif"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.common.modulecore.componentimpl">
+ <componentimpl
+ typeID="bpel.facet.core"
+ class="org.eclipse.bpel.runtimes.facets.BPELVirtualComponent">
+ </componentimpl>
+ </extension>
+
+
+<!--=========================================================================-->
+<!-- BPEL Module Factory -->
+<!--=========================================================================-->
+
+ <extension
+ point="org.eclipse.wst.server.core.moduleFactories">
+ <moduleFactory
+ projects="true"
+ class="org.eclipse.bpel.runtimes.module.BPELModuleFactoryDelegate"
+ id="org.eclipse.bpel.runtimes.module.moduleFactory">
+ <moduleType
+ versions="1.1, 2.0"
+ types="bpel.module">
+ </moduleType>
+ </moduleFactory>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Module ArtifactAdapters -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.wst.server.core.moduleArtifactAdapters">
+ <moduleArtifactAdapter
+ id="org.eclipse.bpel.runtimes.module.artifactAdapter1"
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ <moduleArtifactAdapter
+ id="org.eclipse.bpel.runtimes.module.artifactAdapter2"
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory">
+ <enablement>
+ <with variable="selection">
+ <adapt type="org.eclipse.core.resources.IFile"/>
+ </with>
+ </enablement>
+ </moduleArtifactAdapter>
+ </extension>
+
+<!--=========================================================================-->
+<!-- BPEL Runtime Adapters -->
+<!--=========================================================================-->
+
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IProject">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ <factory
+ class="org.eclipse.bpel.runtimes.module.BPELDeployableArtifactAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IFile">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ </extension>
+
+<!--=========================================================================-->
+<!-- TO MAKE PROCESSES ACTUALLY LAUNCHABLE VIA RUN ON SERVER -->
+<!-- -->
+<!-- Implement org.eclipse.wst.server.core.clients in order to specify the -->
+<!-- the client app to be used for launching. -->
+<!-- -->
+<!-- Implement org.eclipse.wst.server.core.launchableAdapters. Might have to -->
+<!-- do this in server-specific way or maybe can resuse some generic server -->
+<!-- framework stuff or maybe can come up with some interface that would -->
+<!-- allow us to implement in runtimes plug-in. -->
+<!-- -->
+<!-- N.B. Launching here means launching a Web service. Hence, can do this -->
+<!-- via the corresponding WTP feature with no code at all from our end. -->
+<!-- -->
+<!-- -->
+<!-- -->
+<!--=========================================================================-->
+
+
+</plugin>
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELModuleFacetConstants.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes;
+
+/**
+ *
+ *
+ * @author Bruno Wassermann, written Jun 29, 2006
+ */
+public interface IBPELModuleFacetConstants {
+ public final static String BPEL_CONTENT_FOLDER = "BPELFacetInstallDataModelProvider.contentRoot";
+ public final static String BPEL_CONTENT_DEFAULT_FOLDER = "bpelContent";
+
+ // module types
+ public final static String BPEL20_MODULE_TYPE = "bpel.module"; //$NON-NLS-1$
+
+ // module type versions
+ public final static String BPEL11_MODULE_VERSION = "1.1"; // $NON-NLS-1$
+ public final static String BPEL20_MODULE_VERSION = "2.0"; // $NON-NLS-1$
+
+ // facet template
+ public final static String BPEL20_FACET_TEMPLATE = "template.bpel.core"; //$NON-NLS-1$
+
+ // facet
+ public final static String BPEL20_PROJECT_FACET = "bpel.facet.core"; //$NON-NLS-1$
+
+ // bpel file extension
+ public final static String BPEL_FILE_EXTENSION = "bpel"; //$NON-NLS-1$
+ public final static String DOT_BPEL_FILE_EXTENSION = "." + BPEL_FILE_EXTENSION; //$NON-NLS-1$
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELRuntimeDelegate.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELRuntimeDelegate.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IBPELRuntimeDelegate.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,9 @@
+package org.eclipse.bpel.runtimes;
+
+public interface IBPELRuntimeDelegate {
+
+ public String getServerAddress();
+ public String getPort();
+ public String getDeployDir();
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/IRuntimesUIConstants.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes;
+
+/**
+ * A bunch of constants for use by the UI elements of the runtimes plug-in.
+ *
+ * @author Bruno Wassermann, written Jun 30, 2006
+ */
+public interface IRuntimesUIConstants {
+
+ /*
+ * Icons
+ */
+
+ // Icons path
+ public final String ICON_PATH = "icons/"; //$NON-NLS-1$
+
+ // Wizard banner
+ public final String ICON_NEWPRJ_WIZARD_BANNER = "wizban/newprj_bpel_wiz_banner.gif"; //$NON-NLS-1$
+
+ // Facet icons
+ public final String ICON_BPEL_FACET = "obj/bpelfacet.gif"; //$NON-NLS-1$
+
+ // Workbench icons
+ public final String ICON_BPEL_PRJ = "obj16/prj_bpel.gif"; //$NON-NLS-1$
+
+ // New icons
+ public final String ICON_BPEL_NEW_PRJ = "ctool16/new_bpelprj.gif"; //$NON-NLS-1$
+
+ /*
+ * End of icons
+ */
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/RuntimesPlugin.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RuntimesPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.bpel.runtimes"; //$NON-NLS-1$
+
+ //The shared instance.
+ private static RuntimesPlugin plugin;
+
+ private boolean imagesInitialized = false;
+
+ /**
+ * The constructor.
+ */
+ public RuntimesPlugin() {
+ super();
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance.
+ */
+ public static RuntimesPlugin getPlugin() {
+ return plugin;
+ }
+
+ @Override
+ public ImageRegistry getImageRegistry() {
+ ImageRegistry result = super.getImageRegistry();
+ initialize();
+ return result;
+ }
+
+ /**
+ * Returns the image descriptor for the given image ID.
+ * Returns null if there is no such image.
+ */
+ public ImageDescriptor getImageDescriptor(String id) {
+ return getImageRegistry().getDescriptor(id);
+ }
+
+ public Image getImage(String id) {
+ return getImageRegistry().get(id);
+ }
+
+ /**
+ * Creates an image descriptor and places it in the image registry.
+ */
+ private void createImageDescriptor(String id, URL baseURL) {
+ URL url = null;
+ try {
+ url = new URL(baseURL, IRuntimesUIConstants.ICON_PATH + id);
+ } catch (MalformedURLException e) {
+ RuntimesPlugin.log(e);
+ }
+ ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+ getImageRegistry().put(id, desc);
+ }
+
+ protected void initialize() {
+ if (!imagesInitialized) {
+ imagesInitialized = true;
+ initializeImages();
+ }
+ }
+
+ /**
+ * Initializes the table of images used in this plugin.
+ */
+ private void initializeImages() {
+ URL baseURL = getBundle().getEntry("/"); //$NON-NLS-1$
+
+ // TODO make sure you initialize all required icons here
+ createImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER, baseURL);
+ createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_NEW_PRJ, baseURL);
+ createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_PRJ, baseURL);
+ }
+
+ /**
+ * Utility methods for logging exceptions.
+ */
+ public static void log(Exception e, int severity) {
+ IStatus status = null;
+ if (e instanceof CoreException) {
+ status = ((CoreException)e).getStatus();
+ } else {
+ String m = e.getMessage();
+ status = new Status(severity, PLUGIN_ID, 0, m==null? "<no message>" : m, e); //$NON-NLS-1$
+ }
+ System.out.println(e.getClass().getName()+": "+status); //$NON-NLS-1$
+ RuntimesPlugin.getPlugin().getLog().log(status);
+ }
+
+ public static void log(Exception e) {
+ log(e, IStatus.ERROR);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELCoreFacetInstallDelegate.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.facets;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jst.common.project.facet.WtpUtils;
+import org.eclipse.wst.common.componentcore.internal.util.IComponentImplFactory;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+
+/**
+ * BPEL Facet implementation of <code>IDelegate</code>.
+ * <p>
+ * Note: Must not call IFacetedProject.modify() to install facet as this is
+ * a prohibited operation from a delegate and will throw <code>CoreException</code>.
+ *
+ * @author Bruno Wassermann, written Jun 7, 2006
+ */
+public class BPELCoreFacetInstallDelegate implements IDelegate {
+
+ /**
+ * At the moment, there does not appear to be any opportunity to do some
+ * common setup of stuff here (e.g., set up a WEB-INF folder, etc.).
+ * Maybe some common requirements will become apparent at some later stage.
+ */
+
+ /** (non-Javadoc)
+ * @see org.eclipse.wst.common.project.facet.core.IDelegate#execute(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @SuppressWarnings("nls")
+ public void execute(IProject proj,
+ IProjectFacetVersion ver,
+ Object obj,
+ IProgressMonitor progMon)
+ throws CoreException
+ {
+ progMon.beginTask( "Configuring ...", 300 ); //$NON-NLS-1$
+ IDataModel model = (IDataModel)obj;
+ String contentRoot = (String)model.getProperty(BPELFacetInstallDataModelProvider.BPEL_CONTENT_FOLDER);
+ contentRoot = (contentRoot == null || "".equals(contentRoot)) ? IBPELModuleFacetConstants.BPEL_CONTENT_DEFAULT_FOLDER : contentRoot;
+
+ // add natures
+ WtpUtils.addNatures(proj);
+
+ // Create the content folder
+ IFolder bpelContent = proj.getFolder(contentRoot);
+ if (!bpelContent.exists())
+ bpelContent.create(true,true, null);
+
+ // create the virtual component
+ IComponentImplFactory factory = new BPELVirtualComponent();
+ IVirtualComponent newComponent = factory.createComponent(proj);
+ newComponent.create(0, null);
+ progMon.worked(100);
+
+ // Add the resource mapping to bpelContent
+ newComponent.getRootFolder().createLink(new Path("/" + contentRoot), 0, null);
+
+ // Add builder
+ addBuilder(proj, new SubProgressMonitor(progMon, 100));
+ progMon.done();
+ }
+ protected void addBuilder(IProject proj, IProgressMonitor monitor) throws CoreException {
+ // Add the builder to the project description
+ IProjectDescription description = proj.getDescription();
+
+ // Our builder name
+ String builderName = "org.eclipse.bpel.validator.builder"; //$NON-NLS-1$
+
+ // Install the builder (validator)
+
+ ICommand buildCommand = description.newCommand();
+
+ // We only support 1 argument now, its "debug"
+ Map<String, String> args = new HashMap<String, String>();
+ args.put("debug", "false");
+ buildCommand.setArguments(args);
+
+ buildCommand.setBuilderName(builderName);
+
+ ICommand[] commands = description.getBuildSpec();
+
+ if (commands == null) {
+ description.setBuildSpec(new ICommand[] { buildCommand });
+ proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
+
+ } else {
+
+ boolean bFound = false;
+ for (ICommand c : commands) {
+ if (builderName.equals(c.getBuilderName())) {
+ bFound = true;
+ break;
+ }
+ }
+
+ // not found
+ if (bFound == false) {
+ int i = commands.length;
+ ICommand[] newCommands = new ICommand[i + 1];
+ System.arraycopy(commands, 0, newCommands, 0, i);
+ newCommands[i] = buildCommand;
+ description.setBuildSpec(newCommands);
+ proj.setDescription(description, IResource.KEEP_HISTORY, monitor);
+ }
+ }
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELFacetInstallDataModelProvider.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,29 @@
+package org.eclipse.bpel.runtimes.facets;
+
+import java.util.Set;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
+import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
+
+public class BPELFacetInstallDataModelProvider extends
+ FacetInstallDataModelProvider implements IActionConfigFactory, IFacetDataModelProperties, IBPELModuleFacetConstants {
+
+ @Override
+ public Set getPropertyNames() {
+ Set names = super.getPropertyNames();
+ names.add(FACET_PROJECT_NAME);
+ names.add(FACET_ID);
+ names.add(BPEL_CONTENT_FOLDER);
+ return names;
+ }
+
+ @Override
+ public Object getDefaultProperty(String propertyName) {
+ if (propertyName.equals(FACET_ID)) {
+ return IBPELModuleFacetConstants.BPEL20_PROJECT_FACET;
+ }
+ return super.getDefaultProperty(propertyName);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/facets/BPELVirtualComponent.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,34 @@
+package org.eclipse.bpel.runtimes.facets;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
+import org.eclipse.wst.common.componentcore.internal.resources.VirtualComponent;
+import org.eclipse.wst.common.componentcore.internal.resources.VirtualFolder;
+import org.eclipse.wst.common.componentcore.internal.util.IComponentImplFactory;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+
+public class BPELVirtualComponent extends VirtualComponent implements IComponentImplFactory {
+ public BPELVirtualComponent() {
+ super();
+ }
+
+ public BPELVirtualComponent(IProject aProject, IPath aRuntimePath) {
+ super(aProject, aRuntimePath);
+ }
+
+ public IVirtualComponent createComponent(IProject aProject) {
+ return new BPELVirtualComponent(aProject, new Path("/"));
+ }
+
+ public IVirtualFolder createFolder(IProject aProject, IPath aRuntimePath) {
+ return new VirtualFolder(aProject, aRuntimePath);
+ }
+
+ public IVirtualComponent createArchiveComponent(IProject aProject,
+ String archiveLocation, IPath aRuntimePath) {
+ return new VirtualArchiveComponent(aProject, archiveLocation, aRuntimePath);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployable.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,36 @@
+package org.eclipse.bpel.runtimes.module;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+
+public class BPELDeployable extends FlatComponentDeployable {
+
+ public BPELDeployable(IProject project) {
+ super(project);
+ }
+
+ public BPELDeployable(IProject project, IVirtualComponent aComponent) {
+ super(project, aComponent);
+ }
+
+ @Override
+ public boolean shouldCache() {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.bpel.runtimes.module.FlatComponentDeployable#getParticipants()
+ */
+ protected IFlattenParticipant[] getParticipants() {
+ /*
+ * No work really needs to be done here. The BPEL project
+ * doesn't need to map source in instead, it doesn't need to
+ * update a manifest file, it doesn't need to add in classpath dependencies, etc etc
+ *
+ * Just standard traversals as of now.
+ */
+ return super.getParticipants();
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactAdapterFactory.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.ui.actions.ILaunchable;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate;
+
+/**
+ * Preliminary implementation of <code>ModuleArtifactAdapterDelegate</code>
+ * and <code>I</code>for BPEL modules.
+ *
+ * @author Bruno Wassermann, written Aug 14, 2006
+ */
+public class BPELDeployableArtifactAdapterFactory extends
+ ModuleArtifactAdapterDelegate implements IAdapterFactory
+{
+
+ /**
+ *
+ */
+ public BPELDeployableArtifactAdapterFactory() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate#getModuleArtifact(java.lang.Object)
+ */
+ @Override
+ public IModuleArtifact getModuleArtifact(Object obj) {
+ return BPELDeployableArtifactUtil.getModuleObject(obj);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ public Class[] getAdapterList() {
+
+ // TODO replace ILaunchable with interface of BPEL module artifacts once available
+ return new Class[]{ILaunchable.class};
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELDeployableArtifactUtil.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jem.util.logger.proxy.Logger;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.ServerUtil;
+
+/**
+ * Utility to adapt an object (in this case an <code>IProject</code< or an
+ * <code>IFile</code>) toa <code>BPELModuleArtifact</code>.
+ *
+ * @author Bruno Wassermann, written Aug 14, 2006
+ */
+public class BPELDeployableArtifactUtil {
+
+ public BPELDeployableArtifactUtil() {
+ super();
+ }
+
+ /**
+ * Adapt an object to an <code>IModuleArtifact</code>
+ *
+ * @param obj
+ * @return <code>IModuleArtifact</code>
+ */
+ public static IModuleArtifact getModuleObject(Object obj) {
+ if (obj instanceof IProject) {
+ return getModuleObject((IProject) obj);
+ }
+
+ if (obj instanceof IFile) {
+ return getModuleObject((IFile) obj);
+ }
+
+ return null;
+ }
+
+ protected static IModuleArtifact getModuleObject(IProject project) {
+ return null;
+ }
+
+ protected static IModuleArtifact getModuleObject(IFile file) {
+ // TODO this is not really how you should be using BPELModuleDelegate
+ BPELModuleDelegate moduleDelegate = new BPELModuleDelegate(file.getProject(), file);
+ IStatus fileStatus = moduleDelegate.validate();
+
+ if (IStatus.OK != fileStatus.getCode()) return null; // not a valid BPEL file
+
+ IModule[] modules = ServerUtil.getModules(IBPELModuleFacetConstants.BPEL20_MODULE_TYPE);
+
+ for (int i=0; i<modules.length; i++) {
+
+ if (modules[i].getProject().equals(file.getProject())
+ && modules[i].getName().equals(file.getName()))
+ {
+ return new BPELModuleArtifact(modules[i], file);
+ }
+ }
+ return null;
+ }
+
+ /*
+ * TODO in case fixed BPEL facet is not set anymore, may be able to set
+ * the facet programmatically as a fix for the time being
+ *
+ * TODO figure out new plugin.xml syntax for fixed facet from dynamic web
+ * project
+ *
+ * TODO this is a duplicate method (BPELModuleFactory.getVersion()).
+ * Replace this with a utility method somewhere.
+ */
+ private static String getVersion(IProject project) {
+ IFacetedProject facetedProject = null;
+ try {
+ facetedProject = ProjectFacetsManager.create(project);
+ if (facetedProject != null
+ && ProjectFacetsManager.isProjectFacetDefined(IBPELModuleFacetConstants.BPEL20_PROJECT_FACET))
+ {
+ IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet(IBPELModuleFacetConstants.BPEL20_PROJECT_FACET);
+
+ return facetedProject.getInstalledVersion(projectFacet).getVersionString();
+ }
+ } catch (Exception e) {
+ Logger.getLogger().write(e);
+ }
+ return "2.0"; //$NON-NLS-1$
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleArtifact.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+
+/**
+ * Representing a simple BPEL module as an <code>IModuleArtifact</code>. Not
+ * sure at this stage what is needed to actually launch deployed BPEL process,
+ * so this implementation is going to change considerably in the near future.
+ *
+ * @author Bruno Wassermann, written Aug 14, 2006
+ */
+public class BPELModuleArtifact implements IModuleArtifact {
+
+ private IModule module;
+ private IFile file;
+
+ /**
+ * Constructor accepting module and corresponding bpel file.
+ *
+ * @param module <code>IModule</code>
+ * @param file <code>IFile</code> the corresponding bpel file
+ */
+ public BPELModuleArtifact(IModule module, IFile file) {
+ super();
+ this.module = module;
+ this.file = file;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.server.core.IModuleArtifact#getModule()
+ */
+ public IModule getModule() {
+ return module;
+ }
+
+ public IFile getFile() {
+ return file;
+ }
+
+ /**
+ * @see Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "BPELModuleArtifact [module=" + module + "]";
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleDelegate.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.bpel.runtimes.RuntimesPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.server.core.internal.ModuleFile;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+import org.eclipse.wst.server.core.util.ProjectModule;
+
+/**
+ * A <code>ModuleDelegate</code> implementation for BPEL modules making use
+ * of <code>ProjectModule</code> in order to link a BPEL module to the project
+ * it is contained in. Nevertheless, at the moment, a BPEL module is considered
+ * to be a single BPEL file and not to consist of other resources in the same
+ * project.
+ *
+ * @author Bruno Wassermann, written 14 Jul 2006
+ */
+public class BPELModuleDelegate extends ProjectModule {
+
+ private IFile file;
+
+ /**
+ * Constructor initialising module delegate with the folder in which the
+ * BPEL module is contained and with the file representing the actual
+ * BPEL process/module.
+ *
+ * @param project <code>IProject</code> containing BPEL module (but is not
+ * the same as BPEL module)
+ * @param file <code>IFile</code> representing the actual BPEL process/module
+ */
+ public BPELModuleDelegate(IProject project, IFile file) {
+ super(project);
+ this.file = file;
+ }
+
+ /**
+ * Overriding implementation in <code>ProjectModule</code> in order to return
+ * actual module type id.
+ *
+ * @see ProjectModule#getId()
+ * @return <code>String</code> representing module type id
+ */
+ @Override
+ public String getId() {
+ return IBPELModuleFacetConstants.BPEL20_MODULE_TYPE;
+ }
+
+ /**
+ * Returns the name of this module; to be precise the name of the file this
+ * module represents.
+ *
+ * @see ProjectModule#getName()
+ * @return <code>String</code>
+ */
+ @Override
+ public String getName() {
+ return file.getName();
+ }
+
+ /**
+ * Returns the file represented by this module.
+ *
+ * @return <code>IFile</code>
+ */
+ public IFile getFile() {
+ return file;
+ }
+
+ /**
+ * Returns whether or not this module exists (may have been removed).
+ *
+ * @see ProjectModule#exists()
+ * @return <code>true</code> if the module exists, <code>false</code> otherwise
+ */
+ @Override
+ public boolean exists() {
+ return file.exists();
+ }
+
+ /**
+ * Returns the module resources that should be published to the server.
+ * The implementation in <code>ProjectModule</code> assumes that the entire
+ * project should be published to the server.
+ * <p>
+ * For now we will restrict this to be just the selected BPEL file itself
+ * that is represented by this module.
+ * <p>
+ * TODO will have to reconsider implementation to allow for all BPEL files
+ * in a project to be published
+ * <p>
+ * TODO would be interesting to consider publishing any Web services present
+ * in the project that BPEL processes may require as part of automated
+ * deployment. For now, will suffice, though, to notify user of missing Web
+ * service and ask user to deploy WS first.
+ *
+ * @see ModuleDelegate#members()
+ * @return <code>IModuleResource</code>[]
+ */
+ @Override
+ public IModuleResource[] members() {
+ IModuleResource[] result = {new ModuleFile(file, file.getName(), Path.EMPTY)};
+
+ return result;
+ }
+
+ /**
+ * Overriding superclass implementation. Checks whether the <code>IFile</code>
+ * representing the BPEL module has a bpel file extension (weak validation).
+ *
+ * @see ModuleDelegate#validate()
+ * <p>
+ * TODO should also allow for BPEL projects being valid modules
+ */
+ @Override
+ public IStatus validate() {
+ super.validate();
+ if (IBPELModuleFacetConstants.DOT_BPEL_FILE_EXTENSION.equalsIgnoreCase(
+ file.getFileExtension()))
+ {
+ return Status.OK_STATUS;
+ }
+ return new Status(
+ IStatus.ERROR,
+ RuntimesPlugin.PLUGIN_ID,
+ 0,
+ Messages.InvalidFileExtension,
+ null);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) return false;
+
+ if (this == obj) return true;
+
+ if (!(obj instanceof BPELModuleDelegate)) return false;
+
+ BPELModuleDelegate bmd = (BPELModuleDelegate) obj;
+
+ if (this.getProject() != null
+ && this.getProject().exists()
+ && !this.getProject().equals(bmd.getProject()))
+ {
+ return false;
+ }
+
+ if (file != null
+ && file.exists()
+ && !(file.getFullPath().equals(bmd.getFile().getFullPath())))
+ {
+ return false;
+ }
+
+ if (getId() != null && !getId().equals(bmd.getId())) return false;
+
+ return true;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return file == null ? 0 : file.getFullPath().toOSString().length();
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/BPELModuleFactoryDelegate.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.StructureEdit;
+import org.eclipse.wst.common.componentcore.internal.flat.IChildModuleReference;
+import org.eclipse.wst.common.componentcore.internal.util.FacetedProjectUtilities;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.internal.Module;
+import org.eclipse.wst.server.core.internal.ModuleFactory;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+import org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate;
+
+/**
+ * J2EE module factory.
+ */
+public class BPELModuleFactoryDelegate extends ProjectModuleFactoryDelegate implements IResourceChangeListener {
+ protected Map <IModule, FlatComponentDeployable> moduleDelegates = new HashMap<IModule, FlatComponentDeployable>(5);
+
+ public static final String BPEL_FACTORY = "org.eclipse.bpel.runtimes.module.moduleFactory"; //$NON-NLS-1$
+
+ public static BPELModuleFactoryDelegate FACTORY;
+ public static BPELModuleFactoryDelegate factoryInstance() {
+ if( FACTORY == null ) {
+ ensureFactoryLoaded(BPEL_FACTORY);
+ }
+ return FACTORY;
+ }
+
+ public static void ensureFactoryLoaded(String factoryId) {
+ ModuleFactory[] factories = ServerPlugin.getModuleFactories();
+ for( int i = 0; i < factories.length; i++ ) {
+ if( factories[i].getId().equals(factoryId)) {
+ factories[i].getDelegate(new NullProgressMonitor());
+ }
+ }
+ }
+
+ public BPELModuleFactoryDelegate() {
+ super();
+ }
+
+ @Override
+ public void initialize() {
+ super.initialize();
+ if( getId().equals(BPEL_FACTORY))
+ FACTORY = this;
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
+ }
+
+ @Override
+ protected IModule[] createModules(IProject project) {
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ if(component != null)
+ return createModuleDelegates(component);
+ return null;
+ }
+
+
+ @Override
+ public ModuleDelegate getModuleDelegate(IModule module) {
+ if (module == null)
+ return null;
+
+ ModuleDelegate md = moduleDelegates.get(module);
+// if( md == null && ((Module)module).getInternalId().startsWith(BINARY_PREFIX))
+// return createDelegate(module);
+
+ if (md == null) {
+ createModules(module.getProject());
+ md = moduleDelegates.get(module);
+ }
+ return md;
+ }
+
+ protected boolean canHandleProject(IProject p) {
+ return FacetedProjectUtilities.isProjectOfType(p, IBPELModuleFacetConstants.BPEL20_PROJECT_FACET);
+ }
+
+ protected IModule[] createModuleDelegates(IVirtualComponent component) {
+ if(component == null){
+ return null;
+ }
+
+ List<IModule> projectModules = new ArrayList<IModule>();
+ try {
+ if (canHandleProject(component.getProject())) {
+ String type = IBPELModuleFacetConstants.BPEL20_MODULE_TYPE;
+ String version = IBPELModuleFacetConstants.BPEL20_MODULE_VERSION;
+ IModule module = createModule(component.getName(), component.getName(), type, version, component.getProject());
+ FlatComponentDeployable moduleDelegate = createModuleDelegate(component.getProject(), component);
+ moduleDelegates.put(module, moduleDelegate);
+ projectModules.add(module);
+
+ // Check to add any binary modules
+// if (J2EEProjectUtilities.ENTERPRISE_APPLICATION.equals(type))
+// projectModules.addAll(LEGACY_createBinaryModules(component));
+ } else {
+ return null;
+ }
+ } catch (Exception e) {
+// e.printStackTrace();
+// J2EEPlugin.logError(e);
+ }
+ return projectModules.toArray(new IModule[projectModules.size()]);
+ }
+
+ protected FlatComponentDeployable createModuleDelegate(IProject project, IVirtualComponent component) {
+ return new BPELDeployable(project, component);
+ }
+
+// protected FlatComponentDeployable getNestedDelegate(IVirtualComponent component) {
+// return new BPELDeployable(component.getProject(), component);
+// }
+
+ /**
+ * Returns the list of resources that the module should listen to for state
+ * changes. The paths should be project relative paths. Subclasses can
+ * override this method to provide the paths.
+ *
+ * @return a possibly empty array of paths
+ */
+ @Override
+ protected IPath[] getListenerPaths() {
+ return new IPath[] { new Path(".project"), // nature //$NON-NLS-1$
+ new Path(StructureEdit.MODULE_META_FILE_NAME), // component
+ new Path(".settings/org.eclipse.wst.common.project.facet.core.xml") // facets //$NON-NLS-1$
+ };
+ }
+
+ @Override
+ protected void clearCache(IProject project) {
+ super.clearCache(project);
+ List<IModule> modulesToRemove = null;
+ for (Iterator<IModule> iterator = moduleDelegates.keySet().iterator(); iterator.hasNext();) {
+ IModule module = iterator.next();
+ if (module.getProject().equals(project)) {
+ if (modulesToRemove == null) {
+ modulesToRemove = new ArrayList<IModule>();
+ }
+ modulesToRemove.add(module);
+ }
+ }
+ if (modulesToRemove != null) {
+ for (IModule module : modulesToRemove) {
+ moduleDelegates.remove(module);
+ }
+ }
+ }
+
+// /**
+// * From this point on, when queried, projects will generate their binary
+// * child modules on the fly and they will be small and dumb
+// *
+// * @param parent
+// * @param child
+// * @return
+// */
+// public IModule createChildModule(FlatComponentDeployable parent, IChildModuleReference child) {
+// File file = child.getFile();
+// if( file != null ) {
+// IPath p = new Path(file.getAbsolutePath());
+// JavaEEQuickPeek qp = JavaEEBinaryComponentHelper.getJavaEEQuickPeek(p);
+// IModule module = createModule(qp, BINARY_PREFIX + file.getAbsolutePath(), file.getName(), parent.getProject());
+// FlatComponentDeployable moduleDelegate = getNestedDelegate(child.getComponent());
+// moduleDelegates.put(module, moduleDelegate);
+// return module;
+// }
+// return null;
+// }
+
+// /**
+// * Create a module delegate on the fly for this binary file
+// * @param module
+// * @return
+// */
+// public ModuleDelegate createDelegate(IModule module) {
+// String internalId = ((Module)module).getInternalId();
+// String path = internalId.substring(BINARY_PREFIX.length());
+// File f = new File(path);
+// return new BinaryFileModuleDelegate(f);
+// }
+
+ public void resourceChanged(IResourceChangeEvent event) {
+ cleanAllDelegates();
+ }
+
+ protected void cleanAllDelegates() {
+ Iterator<FlatComponentDeployable> i = moduleDelegates.values().iterator();
+ while(i.hasNext()) {
+ i.next().clearCache();
+ }
+ modulesChanged();
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/FlatComponentDeployable.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,381 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * THIS CLASS IS AN EXACT CLONE OF
+ * org.eclipse.wst.web.internal.deployables.FlatComponentDeployable
+ *
+ * This class is a candidate for being pushed into COMMON TOOLS
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent;
+import org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.FlatComponentTaskModel;
+import org.eclipse.wst.common.componentcore.internal.flat.IChildModuleReference;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlatFile;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlatFolder;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlatResource;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlatVirtualComponent;
+import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant;
+import org.eclipse.wst.common.componentcore.internal.util.VirtualReferenceUtilities;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.model.IModuleFile;
+import org.eclipse.wst.server.core.model.IModuleFolder;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+import org.eclipse.wst.server.core.util.ModuleFile;
+import org.eclipse.wst.server.core.util.ProjectModule;
+
+public abstract class FlatComponentDeployable extends ProjectModule {
+
+ /*
+ * Register an adapt IModule to IVirtualComponent
+ */
+ static {
+ Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
+ public Class[] getAdapterList() {
+ return new Class[] { IVirtualComponent.class };
+ }
+
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adaptableObject instanceof IModule) {
+ IModule module = (IModule) adaptableObject;
+ FlatComponentDeployable deployable = (FlatComponentDeployable) module.loadAdapter(FlatComponentDeployable.class, null);
+ if(deployable != null){
+ IVirtualComponent virtualComponent = deployable.getComponent();
+ return virtualComponent;
+ }
+ }
+ return null;
+ }
+ }, IModule.class);
+ }
+
+ protected IVirtualComponent component = null;
+ protected List<IModuleResource> members = new ArrayList<IModuleResource>();
+
+ public FlatComponentDeployable(IProject project) {
+ this(project,ComponentCore.createComponent(project));
+ }
+
+ public FlatComponentDeployable(IProject project, IVirtualComponent aComponent) {
+ super(project);
+ this.component = aComponent;
+ }
+
+ public IVirtualComponent getComponent() {
+ return component;
+ }
+
+ /**
+ * We will cache the flattened piece here, and instead redirect
+ * the module factories to recreate the modules *whenever* there is
+ * a workspace change. This will still be much more efficient than
+ * traversing the tree each time a call to getResources() or getChildModules().
+ */
+ private FlatVirtualComponent cacheFlattened = null;
+
+
+ public boolean shouldCache() {
+ return false;
+ }
+
+ public void clearCache() {
+ cacheFlattened = null;
+ }
+
+ /**
+ * The export model is what does the grunt of the work
+ * @return
+ */
+ protected IFlatVirtualComponent getFlatComponent() {
+ if( !shouldCache() || cacheFlattened == null ) {
+ FlatComponentTaskModel options = new FlatComponentTaskModel();
+ options.put(FlatVirtualComponent.PARTICIPANT_LIST, Arrays.asList(getParticipants()));
+ FlatVirtualComponent tmp = new FlatVirtualComponent(component, options);
+ if( shouldCache())
+ cacheFlattened = tmp;
+ return tmp;
+ }
+ return cacheFlattened;
+ }
+
+ /**
+ * Subclasses can provide a list of participants who may
+ * be involved in forming the export model
+ *
+ * A deployable with no participant should still properly
+ * consume consumed references and traverse the model appropriately
+ *
+ * @return
+ */
+ protected IFlattenParticipant[] getParticipants() {
+ return new IFlattenParticipant[]{
+ };
+ }
+
+ public boolean isBinary() {
+ return component == null ? false : component.isBinary();
+ }
+
+ @Override
+ public IModuleResource[] members() throws CoreException {
+ if( component.isBinary() )
+ return LEGACY_binaryMembers();
+
+ IFlatVirtualComponent em = getFlatComponent();
+ IFlatResource[] resources = em.fetchResources();
+ return convert(resources);
+
+ }
+
+ protected IModuleResource[] LEGACY_binaryMembers() {
+ IFile ifile = (IFile)component.getAdapter(IFile.class);
+ File file = (File)component.getAdapter(File.class);
+ ModuleFile mf = ifile != null ? new ModuleFile(ifile, ifile.getName(), new Path("")) //$NON-NLS-1$
+ : new ModuleFile(file, file.getName(), new Path("")); //$NON-NLS-1$
+ return new IModuleResource[]{mf};
+ }
+
+ /**
+ * Returns the child modules of this module.
+ *
+ * @return org.eclipse.wst.server.core.model.IModule[]
+ */
+ @Override
+ public IModule[] getChildModules() {
+ return getModules();
+ }
+
+ public /* non api */ IChildModuleReference[] getExportModelChildren() throws CoreException {
+ IFlatVirtualComponent em = getFlatComponent();
+ IChildModuleReference[] children = em.getChildModules();
+ return children;
+ }
+
+ public IModule[] getModules() {
+ // Legacy, here in case the old modules are used
+ if( component.isBinary() )
+ return new IModule[]{};
+
+ try {
+ List<IModule> modules = new ArrayList<IModule>();
+ IChildModuleReference[] children = getExportModelChildren();
+ for( int i = 0; i < children.length; i++ ) {
+ IModule child = gatherModuleReference(component, children[i]);
+ if( child != null )
+ modules.add(child);
+ }
+ return modules.toArray(new IModule[modules.size()]);
+ } catch( CoreException ce ) {
+ }
+ return new IModule[]{};
+ }
+
+ @Override
+ public String getPath(IModule m) {
+ return getURI(m);
+ }
+
+ /**
+ * Returns the URI of the given contained CHILD module.
+ *
+ * SOFT requirements (NOT API!!) in use by some adopters
+ * If the passed in module is equal to this module, return our own deployed name
+ *
+ * @param module a module
+ * @return the URI of the given module, or <code>null</code> if the URI could
+ * not be found
+ */
+ public String getURI(IModule module) {
+ ProjectModule md = (ProjectModule)module.loadAdapter(ProjectModule.class, new NullProgressMonitor());
+ if( md == this ) {
+ // guess my own name
+ return VirtualReferenceUtilities.INSTANCE.getDefaultProjectArchiveName(this.component);
+ }
+ try {
+ FlatComponentDeployable cd = (FlatComponentDeployable)module.loadAdapter(FlatComponentDeployable.class, new NullProgressMonitor());
+ if( cd != null ) {
+ IFlatVirtualComponent em = getFlatComponent();
+ IChildModuleReference[] children = em.getChildModules();
+ for( int i = 0; i < children.length; i++ ) {
+ IModule child = gatherModuleReference(component, children[i]);
+ if( child != null && child.getId().equals(module.getId()))
+ return children[i].getRelativeURI().toString();
+ }
+ }
+ } catch( CoreException ce ) {
+ }
+ return null;
+ }
+
+ /**
+ * If I know how to find an IModule for this child, do so now
+ *
+ * I would love to see this replaced with some API to locate a
+ * possible child module based on a virtual component.
+ *
+ * @param component
+ * @param targetComponent
+ * @return
+ */
+ protected IModule gatherModuleReference(IVirtualComponent component, IChildModuleReference child) {
+ // Handle workspace project module components
+ // Subclasses should extend
+ IVirtualComponent targetComponent = child.getComponent();
+ if (targetComponent != null && targetComponent.getProject()!= component.getProject()) {
+ if (!targetComponent.isBinary()) {
+ return filterModuleDelegates(ServerUtil.getModules(targetComponent.getProject()));
+ }
+ }
+ return null;
+ }
+
+ /**
+ * An extender may wish to override this method in order to control which
+ * delegate is returned in the scenario where more than one exist. By default
+ * the first one found is returned.
+ *
+ * @param IModule[] modules
+ * @return IModule[]
+ */
+ protected IModule filterModuleDelegates(IModule[] modules) {
+ for (int i = 0; i < modules.length; i++) {
+ ModuleDelegate md = (ModuleDelegate)modules[i].loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ if (md instanceof ProjectModule) {
+ return modules[i];
+ }
+ }
+ return modules.length > 0 ? modules[0] : null;
+ }
+
+ /*
+ * Below are STATIC utility classes and methods
+ */
+ protected static IModuleResource[] convert(IFlatResource[] resources) {
+ ArrayList<IModuleResource> list = new ArrayList<IModuleResource>();
+ for( int i = 0; i < resources.length; i++ ) {
+ if( resources[i] instanceof IFlatFile)
+ list.add(new ComponentModuleFile(resources[i]));
+ else if( resources[i] instanceof IFlatFolder)
+ list.add(new ComponentModuleFolder(resources[i]));
+ }
+ return list.toArray(new IModuleResource[list.size()]);
+ }
+
+ public static class ComponentModuleResource {
+ protected IFlatResource delegate;
+ public ComponentModuleResource(IFlatResource resource) {
+ this.delegate = resource;
+ }
+ public long getModificationStamp() {
+ return ((IFlatFile)delegate).getModificationStamp();
+ }
+
+ public IPath getModuleRelativePath() {
+ return delegate.getModuleRelativePath();
+ }
+ public String getName() {
+ return delegate.getName();
+ }
+ public Object getAdapter(Class adapter) {
+ return delegate.getAdapter(adapter);
+ }
+ public IModuleResource[] members() {
+ IFlatResource[] children = ((IFlatFolder)delegate).members();
+ return convert(children);
+ }
+ }
+
+ public static class ComponentModuleFile extends ComponentModuleResource implements IModuleFile{
+ public ComponentModuleFile(IFlatResource resource) {
+ super(resource);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this)
+ return true;
+
+ if (!(obj instanceof IModuleFile))
+ return false;
+
+ IModuleFile mf = (IModuleFile) obj;
+ if (!getName().equals(mf.getName()))
+ return false;
+ if (!getModuleRelativePath().equals(mf.getModuleRelativePath()))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return getName().hashCode() * 37 + getModuleRelativePath().hashCode();
+ }
+ }
+
+ public static class ComponentModuleFolder extends ComponentModuleResource implements IModuleFolder {
+ public ComponentModuleFolder(IFlatResource resource) {
+ super(resource);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this)
+ return true;
+
+ if (!(obj instanceof IModuleFolder))
+ return false;
+
+ IModuleFolder mf = (IModuleFolder) obj;
+ if (!getName().equals(mf.getName()))
+ return false;
+ if (!getModuleRelativePath().equals(mf.getModuleRelativePath()))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return getName().hashCode() * 37 + getModuleRelativePath().hashCode();
+ }
+
+ }
+
+ protected static boolean isProjectOfType(IProject project, String typeID) {
+ IFacetedProject facetedProject = null;
+ try {
+ facetedProject = ProjectFacetsManager.create(project);
+ } catch (CoreException e) {
+ return false;
+ }
+
+ if (facetedProject !=null && ProjectFacetsManager.isProjectFacetDefined(typeID)) {
+ IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet(typeID);
+ return projectFacet!=null && facetedProject.hasProjectFacet(projectFacet);
+ }
+ return false;
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/Messages.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.module;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Module-related messages.
+ *
+ * @author Bruno Wassermann, written 17 Jul 2006
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.bpel.runtimes.module.messages"; //$NON-NLS-1$
+
+ private Messages() {
+ }
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // module validation
+ public static String InvalidFileExtension;
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/module/messages.properties 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1 @@
+InvalidFileExtension=BPEL module file resource must end with bpel file extension.
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/publishers/GenericBPELPublisher.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.publishers;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.server.generic.core.internal.GenericPublisher;
+import org.eclipse.jst.server.generic.core.internal.GenericServer;
+import org.eclipse.jst.server.generic.servertype.definition.Port;
+import org.eclipse.wst.server.core.IModuleArtifact;
+
+/**
+ * An abstract base class offering some utility methods facilitating the process
+ * of deploying a BPEL process onto a runtime and indicating a publisher of
+ * BPEL processes. This extends the generic server
+ * framework. Implementers of the <code>genericpublishers</code> extension point
+ * wishing to publish BPEL processes onto some runtime, may find it convenient
+ * to sub-class this class.
+ * <p>
+ * The minimum requirement on sub-classes is to provide an implementation of
+ * <code>GenericPublisher{@link #publish(IModuleArtifact[], IProgressMonitor)}</code>,
+ * <code>GenericPublisher{@link #unpublish(IProgressMonitor)}</code> and of
+ * <code></code>
+ * <p>
+ * Clients should not instantiate this class or its sub-classes as they will be
+ * instantiated by the WTP server framework. Clients can make use of any
+ * convenience methods contained in this class (all methods defined directly
+ * on <code>GenericBPELPublisher</code>).
+ *
+ *
+ * @author Bruno Wassermann, written Jun 8, 2006
+ */
+public abstract class GenericBPELPublisher extends GenericPublisher {
+
+// TODO add utility methods that may be useful to concrete implementations
+
+ /**
+ * Displays engine-specific validation warnings and errors in the BPEL
+ * Designer.
+ * <p>
+ * Sub-classes can call this method to provide information
+ * about any problems detected during deployment.
+ */
+ protected final void submitValidationMarkers() {
+ // TODO decide on signature/arguments
+ }
+
+ /**
+ * Provides access to the relevant project in the workspace in order to
+ * store a local copy of a generated deployment archive
+ *
+ * @param deployArchive
+ * @param path should probably be relative from project root and if null
+ * will save archive in project root
+ */
+ protected void storeDeploymentArchive(IFile deployArchive, IPath path) {
+ // TODO figure out whether this is really useful
+ // TODO figure out the signature (should it be a file, what's the best
+ // way to allow specifying an additional path?) - maybe look at some
+ // of the methods in the WTP tutorial.
+ }
+
+ /**
+ * Returns the host part of the server on which module is to be published.
+ * For example, 'localhost'.
+ *
+ * @return <code>String</code> representing host part of server on which
+ * module is to be published. Will return <code>null</code>, if called
+ * before {@link GenericPublisher#initialize()} has been called.
+ */
+ protected String getHost() {
+ return getServer().getServer().getHost();
+ }
+
+ /**
+ * Returns http port defined for the server module is to be published on.
+ * <p>
+ * This replicates {@link GenericServer#getHttpPort()}.
+ *
+ * @return int
+ */
+ protected int getHttpPort() {
+ int port = -1;
+ Iterator pIter = getServer().getServerDefinition().getPort().iterator();
+
+ while (pIter.hasNext()) {
+ Port aPort = (Port) pIter.next();
+
+ if(port == -1) {
+ port = Integer.parseInt(getServer().getServerDefinition().getResolver().resolveProperties(aPort.getNo()));
+ }
+ else if( "http".equals(aPort.getProtocol() ) ) { //$NON-NLS-1$
+ port = Integer.parseInt(aPort.getNo());
+ }
+ }
+ if( port == -1) {
+ port = 8080;
+ }
+ return port;
+ }
+
+ /*
+ * we don't have something like validate in here as we are not the provider
+ * of an extension point, but simply providing some utility methods for
+ * sub-classes to use if they so wish.
+ *
+ * if we had provided our own extension point to do publishing, then
+ * we would probably have specified a validate() method in the abstract base
+ * class so that our framework could call its implementation in extensions.
+ *
+ * If it's just a utility method it should have static methods. Otherwise,
+ * allow it to be sub-classed and declare some methods as abstract to
+ * indicate to sub-classes what they need to implement.
+ *
+ * What is true though is that we cannot call such methods automatically as
+ * we are not really offering an extension point.
+ *
+ * TODO clarify explain this point about usage in the class comment! the methods
+ * will not be called automatically as we are not providing an extension
+ * point as initially expected.
+ */
+
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/BPELFacetInstallPage.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,46 @@
+package org.eclipse.bpel.runtimes.ui.wizards;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetInstallPage;
+
+public class BPELFacetInstallPage extends DataModelFacetInstallPage implements
+ IFacetWizardPage {
+
+ private Label contentDirLabel;
+ private Text contentDir;
+ public BPELFacetInstallPage() {
+ super("Test BPEL");
+ setTitle("BPEL Title");
+ setDescription("BPEL Description");
+ }
+
+ @Override
+ protected String[] getValidationPropertyNames() {
+ return new String[]{IBPELModuleFacetConstants.BPEL_CONTENT_FOLDER};
+ }
+
+ @Override
+ protected Composite createTopLevelComposite(Composite parent) {
+ final Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(2, false));
+ this.contentDirLabel = new Label(composite, SWT.NONE);
+ this.contentDirLabel.setText("Content Folder");
+ this.contentDirLabel.setLayoutData(new GridData());
+
+ this.contentDir = new Text(composite, SWT.BORDER);
+ this.contentDir.setLayoutData(gdhfill());
+ this.contentDir.setData("label", this.contentDirLabel); //$NON-NLS-1$
+ this.synchHelper.synchText(contentDir, IBPELModuleFacetConstants.BPEL_CONTENT_FOLDER, null);
+ this.contentDir.setText(IBPELModuleFacetConstants.BPEL_CONTENT_DEFAULT_FOLDER);
+ new Label(composite, SWT.NONE); // pad
+ return composite;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/Messages.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.ui.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Internationalization, internationalisation...
+ *
+ *
+ * @author Bruno Wassermann, written Jun 30, 2006
+ */
+public final class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.bpel.runtimes.ui.wizards.messages"; //$NON-NLS-1$
+
+ private Messages() {
+ }
+
+ // new project wizard
+ public static String NewProjectWizard_1;
+ public static String NewProjectWizardPage1_1;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.ui.wizards;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
+import org.eclipse.bpel.runtimes.RuntimesPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
+
+/**
+ * <code>INewWizard</code> implementation for new BPEL project wizard
+ * installing the BPEL facet by default.
+ *
+ * @author Bruno Wassermann, written Jun 28, 2006
+ */
+public class NewBPELProjectWizard extends NewProjectDataModelFacetWizard
+ implements INewWizard
+{
+
+ /**
+ * Default constructor.
+ */
+ public NewBPELProjectWizard() {
+ super();
+ setWindowTitle(Messages.NewProjectWizard_1);
+ }
+
+ /**
+ * Constructor settings this wizard's <code>IDataModel</code>.
+ *
+ * @see <code>IDataModel</code>
+ * @param model <code>IDataModel</code>
+ */
+ public NewBPELProjectWizard(IDataModel model) {
+ super(model);
+ setWindowTitle(Messages.NewProjectWizard_1);
+ }
+
+ /**
+ * Creates an instance of the <code>FacetProjectCreationDataModelProvider</code>
+ * for BPEL projects. Used to associate common facet information such as
+ * runtimes with particular a project.
+ *
+ * @see <code>FacetProjectCreationDataModelProvider</code>
+ * @return <code>IDataModel</code>
+ */
+ @Override
+ protected IDataModel createDataModel() {
+
+ /*
+ * There does not seem to be a need for any custom implementation for
+ * BPEL projects at this stage. May have to reconsider at some point and
+ * build a BPELFacetProjectCreationDataModelProvider.
+ */
+ return DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
+ }
+
+ /**
+ * Getting image descriptor to be used as wizard banner.
+ *
+ * @return <code>ImageDescriptor</code>
+ */
+ @Override
+ protected ImageDescriptor getDefaultPageImageDescriptor() {
+ return RuntimesPlugin.getPlugin().getImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER);
+ }
+
+ /**
+ * Getting the <code>IFacetedProjectTemplate</code> for a BPEL project.
+ * Is used to retrieve the set of fixed facets for a particular project
+ * type.
+ *
+ * @see org.eclipse.wst.common.project.core.IFacetedProjectTemplate
+ * @return org.eclipse.wst.common.project.core.IFacetedProjectTemplate
+ *
+ */
+ @Override
+ protected IFacetedProjectTemplate getTemplate() {
+ return ProjectFacetsManager.getTemplate(IBPELModuleFacetConstants.BPEL20_FACET_TEMPLATE);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard#createFirstPage()
+ */
+ @Override
+ protected IWizardPage createFirstPage() {
+ return new NewBPELProjectWizardPage1(model, "newBPELProject"); // $NON-NLS-1$
+ }
+
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/NewBPELProjectWizardPage1.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.ui.wizards;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
+import org.eclipse.bpel.runtimes.RuntimesPlugin;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
+
+/**
+ * <code>DataModelFacetCreationWizardPage</code> for setting up a new BPEL
+ * project.
+ *
+ * @author Bruno Wassermann, written Jun 29, 2006
+ */
+public class NewBPELProjectWizardPage1 extends DataModelFacetCreationWizardPage {
+
+ public NewBPELProjectWizardPage1(IDataModel dataModel, String pageName) {
+ super(dataModel, pageName);
+ //setTitle(org.eclipse.bpel.runtimes.ui.wizards.Messages.NewProjectWizard_1);
+ //setDescription(org.eclipse.bpel.runtimes.ui.wizards.Messages.NewProjectWizardPage1_1);
+ setTitle(org.eclipse.bpel.runtimes.ui.wizards.Messages.NewProjectWizard_1);
+ setDescription(org.eclipse.bpel.runtimes.ui.wizards.Messages.NewProjectWizardPage1_1);
+ setImageDescriptor(RuntimesPlugin.getPlugin().getImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER));
+ }
+
+ protected String getModuleFacetID() {
+ return IBPELModuleFacetConstants.BPEL20_MODULE_TYPE;
+ }
+
+ protected String getModuleTypeID() {
+ return IBPELModuleFacetConstants.BPEL20_PROJECT_FACET;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/ui/wizards/messages.properties 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,2 @@
+NewProjectWizard_1=New BPEL Project
+NewProjectWizardPage1_1=Create a new BPEL 2.0 project.
Added: workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.runtimes/src/org/eclipse/bpel/runtimes/utils/BPELModelUtils.java 2011-02-17 23:25:16 UTC (rev 29228)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.runtimes.utils;
+
+import org.eclipse.bpel.model.PartnerLink;
+import org.eclipse.bpel.model.Scope;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * A bunch of helper methods to support runtime providers get data from the
+ * BPEL model.
+ *
+ * @author Bruno Wassermann, written 11 May 2007
+ */
+public class BPELModelUtils {
+
+ /**
+ * Return an <code>EList</code> containing all partnerLink elements defined
+ * on Scopes in this process.
+ *
+ * @param process <code>EObject</code> representing the Process element
+ * @return <code>EList</code> containing all <code>PartnerLink</code>s
+ * defined on any Scopes (or none)
+ */
+ public static EList<PartnerLink> getScopePartnerLinks(final EObject process) {
+ TreeIterator<EObject> contents = process.eAllContents();
+ EList<PartnerLink> results = new BasicEList<PartnerLink>();
+
+ while (contents.hasNext()) {
+ EObject obj = contents.next();
+
+ if (obj instanceof Scope) {
+ results.addAll(((Scope) obj).getPartnerLinks().getChildren());
+ }
+ }
+ return results;
+ }
+}
15 years, 1 month
JBoss Tools SVN: r29226 - in workspace/bbrodt/org.eclipse.bpel.xpath10: META-INF and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-17 18:16:35 -0500 (Thu, 17 Feb 2011)
New Revision: 29226
Added:
workspace/bbrodt/org.eclipse.bpel.xpath10/.classpath
workspace/bbrodt/org.eclipse.bpel.xpath10/.project
workspace/bbrodt/org.eclipse.bpel.xpath10/META-INF/
workspace/bbrodt/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF
workspace/bbrodt/org.eclipse.bpel.xpath10/build.properties
workspace/bbrodt/org.eclipse.bpel.xpath10/lib/
workspace/bbrodt/org.eclipse.bpel.xpath10/lib/antlr-runtime-3.0.1.jar
workspace/bbrodt/org.eclipse.bpel.xpath10/plugin.properties
workspace/bbrodt/org.eclipse.bpel.xpath10/pom.xml
workspace/bbrodt/org.eclipse.bpel.xpath10/src/
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AdditiveExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AllNodeStep.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Axis.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/BinaryExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/CommentNodeStep.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/EqualityExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Expr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FilterExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FunctionCallExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LiteralExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LocationPath.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LogicalExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/MultiplicativeExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NameStep.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NumberExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/PathExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Predicate.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/ProcessingInstructionNodeStep.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/RelationalExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Step.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/TextNodeStep.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnaryExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnionExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/VariableReferenceExpr.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Visitor.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Exception.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Factory.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Lexer.java
workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Parser.java
Modified:
workspace/bbrodt/org.eclipse.bpel.xpath10/
Log:
Property changes on: workspace/bbrodt/org.eclipse.bpel.xpath10
___________________________________________________________________
Added: svn:ignore
+ bin
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/.classpath
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/.classpath (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/.classpath 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib" path="lib/antlr-runtime-3.0.1.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/.project
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/.project (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/.project 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.xpath10</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.dltk.core.scriptbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.deved.antlride.core.nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.bpel.xpath10
+Bundle-Version: 0.5.0.qualifier
+Bundle-Localization: plugin
+Bundle-ClassPath: .,
+ lib/antlr-runtime-3.0.1.jar
+Export-Package: org.antlr.runtime;uses:="org.antlr.runtime.tree",
+ org.antlr.runtime.debug;uses:="org.antlr.runtime.tree,org.antlr.runtime",
+ org.antlr.runtime.misc,
+ org.antlr.runtime.tree;uses:="org.antlr.runtime,org.antlr.stringtemplate",
+ org.eclipse.bpel.xpath10,
+ org.eclipse.bpel.xpath10.parser;uses:="org.antlr.runtime.tree,org.antlr.runtime,org.eclipse.bpel.xpath10"
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/build.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/build.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/build.properties 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,12 @@
+bin.includes = META-INF/,\
+ lib/,\
+ .,\
+ plugin.properties
+src.includes = .classpath,\
+ .project,\
+ META-INF/,\
+ build.properties,\
+ lib/,\
+ src/,\
+ plugin.properties
+source.. = src/
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/lib/antlr-runtime-3.0.1.jar
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.xpath10/lib/antlr-runtime-3.0.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/plugin.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/plugin.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/plugin.properties 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,32 @@
+###############################################################################
+# Copyright (c) 2010 JBoss by Red Hat and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# JBoss by Red Hat - subsequent contributions and maintenance
+###############################################################################
+# <copyright>
+# </copyright>
+#
+# $Id: plugin.properties,v 1.1 2005/11/29 18:50:28 james Exp $
+
+# ====================================================================
+# To code developer:
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+
+pluginName = XPath Parser 1.0 (Incubation)
+providerName = JBoss by Red Hat
+
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/pom.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/pom.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/pom.xml 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.bpel</groupId>
+ <artifactId>org.eclipse.bpel.xpath10</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AdditiveExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AdditiveExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AdditiveExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * Additive Expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+public class AdditiveExpr extends BinaryExpr {
+
+ /**
+ * Brand new additive expression.
+ * @param op either + or - (additive)
+ * @param left
+ * @param right
+ */
+ public AdditiveExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AllNodeStep.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AllNodeStep.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/AllNodeStep.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * All note step.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class AllNodeStep extends Step {
+
+ /**
+ * Brand new shiny all node step.
+ *
+ * @param axis
+ */
+
+ public AllNodeStep (int axis) {
+ super(axis);
+ }
+
+ @Override
+ protected String asString () {
+ return "node()";
+ }
+
+ @Override
+ protected String asText () {
+ return asString();
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Axis.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Axis.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Axis.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+@SuppressWarnings("nls")
+
+public class Axis {
+
+ /** */
+ static final public int INVALID_AXIS = 0;
+
+ /** Child axis */
+ static final public int CHILD = 1;
+
+ /** Descendant axis */
+ static final public int DESCENDANT = 2;
+
+ /** Parent axis */
+ static final public int PARENT = 3;
+
+ /** Ancestor axis */
+ static final public int ANCESTOR = 4;
+
+ /** Following sibling axis */
+ static final public int FOLLOWING_SIBLING = 5;
+
+ /** Proceeding sibling axis */
+ static final public int PRECEDING_SIBLING = 6;
+
+ /** Following axis */
+ static final public int FOLLOWING = 7;
+
+ /** Preceeding sibling axis */
+ static final public int PRECEDING = 8;
+
+ /** Attribute axis */
+ static final public int ATTRIBUTE = 9;
+
+ /** Namespace axis */
+ static final public int NAMESPACE = 10;
+
+ /** Self axis */
+ static final public int SELF = 11;
+
+ /** Descendant or self axis */
+ static final public int DESCENDANT_OR_SELF = 12;
+
+ /** Ancestor or self [ lucky 13 ] */
+ static final public int ANCESTOR_OR_SELF = 13;
+
+
+ static final private String [] NAMES = {
+
+ "unknown-axis-name", /** at [0] we have null */
+
+ "child",
+ "descendant",
+ "parent",
+ "ancestor",
+ "following-sibling",
+ "preceding-sibling",
+ "following",
+ "preceding",
+ "attribute",
+ "namespace",
+ "self",
+ "descendant-or-self",
+ "ancestor-or-self"
+ };
+
+ /**
+ * Get the name of the axis given it's index (retrieved via {{@link #getAxis(String)} below.
+ *
+ * @param axis
+ * @return the axis name
+ */
+ static public String getName (int axis) {
+ if (axis < 1 || axis >= NAMES.length) {
+ return NAMES[0];
+ }
+ return NAMES[axis];
+ }
+
+ /**
+ *
+ * @param axisName the axis name
+ * @return the axis id given its name
+ */
+
+ static public int getAxis ( String axisName ) {
+ for(int i=1; i<NAMES.length; i++) {
+ if (NAMES[i].equals(axisName)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/BinaryExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/BinaryExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/BinaryExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ *
+ * A binary expression. Something with left and right side and an operator in the middle.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+@SuppressWarnings("nls")
+
+public class BinaryExpr extends Expr {
+
+ String fOperator;
+ Expr fLHS;
+ Expr fRHS;
+
+ /**
+ * Brand new shiny binary expression.
+ *
+ * @param op
+ * @param lhs
+ * @param rhs
+ */
+ public BinaryExpr (String op, Expr lhs, Expr rhs) {
+ super("");
+ fOperator = op;
+ fLHS = lhs;
+ fRHS = rhs;
+ }
+
+ /**
+ * @return the operator of the binary expression.
+ */
+
+ public String getOperator() {
+ return fOperator;
+ }
+ /**
+ *
+ * @return the left hand side of the expression.
+ */
+
+ public Expr getLHS() {
+ return fLHS;
+ }
+
+ /**
+ *
+ * @return the right hand side of the expression.
+ */
+
+ public Expr getRHS() {
+ return fRHS;
+ }
+
+
+ @Override
+ protected String asText() {
+ StringBuilder sb = new StringBuilder();
+ if (isWrapParen()) {
+ sb.append("(");
+ }
+ sb.append( fLHS != null ? fLHS.getText() : "?" );
+ sb.append(" ");
+ sb.append(getOperator());
+ sb.append(" ");
+ sb.append( fRHS != null ? fRHS.getText() : "?" );
+ if (isWrapParen()) {
+ sb.append(")");
+ }
+ return sb.toString();
+ }
+
+
+ @Override
+ protected String asString () {
+ StringBuilder sb = new StringBuilder();
+ if (isWrapParen()) {
+ sb.append("(");
+ }
+ sb.append(getLHS()).append(" ").append(getOperator()).append(" ").append(getRHS());
+ if (isWrapParen()) {
+ sb.append(")");
+ }
+ return sb.toString();
+ }
+
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition () {
+ return getLHS().getPosition();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+
+ @Override
+ public int getEndPosition () {
+ return getRHS().getEndPosition();
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/CommentNodeStep.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/CommentNodeStep.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/CommentNodeStep.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * The comment() element of the XPath location path.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class CommentNodeStep extends Step {
+
+ /**
+ * Bran new shiny comment node step.
+ * @param axis
+ */
+ public CommentNodeStep (int axis) {
+ super(axis);
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Step#getText()
+ */
+ @Override
+ public String getText() {
+ return asString();
+ }
+
+
+ @Override
+ protected String asString () {
+ return "comment()";
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/EqualityExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/EqualityExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/EqualityExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * An equality XPath expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class EqualityExpr extends BinaryExpr {
+
+ /**
+ * Brand new shiny EqualityExpr ...
+ * @param op
+ * @param left
+ * @param right
+ */
+
+ public EqualityExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Expr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Expr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Expr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * The base expression class for XPath semantic tree hierarchy.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class Expr {
+
+ String fText ;
+ int fStartPosition = -1;
+ int fEndPosition = -1;
+
+ boolean fWrapWithParenthesis = false;
+
+ /**
+ * Brand new shiny Expr object.
+ * @param text
+ */
+ public Expr (String text) {
+ fText = text;
+ }
+
+
+ /**
+ * @return the expression as a text
+ */
+ public final String getText() {
+ StringBuilder sb = new StringBuilder();
+ if (fWrapWithParenthesis) {
+ sb.append("(");
+ }
+ sb.append(asText());
+ if (fWrapWithParenthesis) {
+ sb.append(")");
+ }
+ return sb.toString();
+ };
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{").append(getClass().getSimpleName()).append(",").append(asString()).append("}") ;
+ return sb.toString();
+ }
+
+ protected String asString () {
+ return getText();
+ }
+
+ protected String asText () {
+ return fText;
+ }
+
+ /**
+ * @return whether the expression is wrapped in parenthesis.
+ */
+ public boolean isWrapParen () {
+ return fWrapWithParenthesis;
+ }
+
+ /**
+ * @param wrap
+ */
+ public void setWrapParen ( boolean wrap ) {
+ fWrapWithParenthesis = wrap;
+ }
+
+ /**
+ * This is useful for error reporting :-)
+ *
+ * @return the end position of the expression in the "stream" that it was parsed from
+ */
+ public int getEndPosition() {
+ return fEndPosition;
+ }
+
+ /**
+ * This is useful for error reporting :-)
+ *
+ * @return the start position of the expression in the "stream" that it was parsed from
+ */
+
+ public int getPosition() {
+ return fStartPosition;
+ }
+
+ /**
+ * Set the start and end position of the expression in the input "stream" it was parsed from.
+ * The parser uses this to provide location information to the semantic tree model.
+ *
+ * @param start
+ * @param end
+ */
+ public void setPosition (int start, int end) {
+ fStartPosition = start;
+ fEndPosition = end;
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FilterExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FilterExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FilterExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A filter expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class FilterExpr extends Expr {
+
+ List<Predicate> fList = new ArrayList<Predicate>();
+ Expr fExpr;
+
+
+ /**
+ * Brand new shiny filter expression.
+ *
+ * @param expr the expression to which the filter (predicates) are to be applied.
+ */
+ public FilterExpr (Expr expr) {
+ super(expr.toString());
+ fExpr = expr;
+ }
+
+ /**
+ * @return the expression that is to be predicated.
+ */
+ public Expr getExpr () {
+ return fExpr;
+ }
+
+ /**
+ * @return a list of predicates for this filter.
+ */
+ public List<Predicate> getPredicates() {
+ return fList;
+ }
+
+ /**
+ * Add a predicate to the filter list.
+ * @param p the predicate to add.
+ */
+ public void addPredicate (Predicate p) {
+ fList.add(p);
+ }
+
+ /**
+ * @return true if yes, false if no.
+ */
+
+ public boolean hasPredicates ()
+ {
+ return fList.size() > 0;
+ }
+
+ @Override
+ protected String asText()
+ {
+ StringBuilder sb = new StringBuilder();
+ if ( fExpr != null ) {
+ sb.append(fExpr.getText());
+ }
+ for(Predicate p : fList) {
+ sb.append(p.getText());
+ }
+ return sb.toString();
+ }
+
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition () {
+ return fExpr != null ? fExpr.getPosition() : -1;
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+ @Override
+ public int getEndPosition () {
+ return fExpr != null ? fExpr.getEndPosition() : -1;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FunctionCallExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FunctionCallExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/FunctionCallExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A function all expression in XPath.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class FunctionCallExpr extends Expr {
+
+ final List<Expr> fParams = new ArrayList<Expr>();
+ String fName;
+ String fPrefix;
+
+ /**
+ * Brand new shiny XPath expression.
+ *
+ * @param pfx the prefix
+ * @param name the function name.
+ */
+ public FunctionCallExpr (String pfx, String name) {
+ super(null);
+ fName = name;
+ fPrefix = pfx;
+ }
+
+ /**
+ * @return the function prefix (if defined).
+ */
+ public String getPrefix() {
+ return fPrefix;
+ }
+
+ /**
+ * @return the function name
+ */
+ public String getFunctionName() {
+ return fName;
+ }
+
+ /**
+ * @return the parameter list for this function.
+ */
+ public List<Expr> getParameters() {
+ return fParams;
+ }
+
+ /**
+ * Add a parameter to the parameter list. The parser
+ * call this method.
+ *
+ * @param p the parameter
+ */
+ public void addParameter (Expr p) {
+ fParams.add(p);
+ }
+
+ @Override
+ protected String asText() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(fnName()).append(argsToString(false));
+ return sb.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#toString()
+ */
+
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{FunctionCall,").append(getFunctionName()).append(",").append( argsToString(true) ).append("}");
+ return sb.toString();
+ }
+
+
+ String fnName () {
+ if ("".equals(fPrefix) || fPrefix == null) {
+ return fName;
+ }
+ return fPrefix + ":" + fName;
+ }
+
+ String argsToString (boolean asString ) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("(");
+ int count = 0;
+ for(Expr n : fParams) {
+ if (count > 0) {
+ sb.append(", ");
+ }
+ if (asString) {
+ sb.append(n);
+ } else {
+ sb.append(n.getText());
+ }
+ count ++;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LiteralExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LiteralExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LiteralExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A literal expression (string literal).
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class LiteralExpr extends Expr {
+
+ String fLiteral;
+
+ /**
+ * Brand new shiny string literal expression.
+ *
+ * @param text
+ */
+ public LiteralExpr (String text) {
+ super(text);
+ fLiteral = parseLiteral( text);
+ }
+
+ /**
+ * @return the literal
+ */
+ public String getLiteral() {
+ return fLiteral;
+ }
+
+
+ protected String parseLiteral (String string) {
+ if (string.length() < 2) {
+ return "";
+ }
+ char ch1 = string.charAt(0);
+ char ch2 = string.charAt(string.length()-1);
+ if ( (ch1 == '"' || ch1 == '\'') && ch1 == ch2 ) {
+ return string.substring(1, string.length()-1);
+ }
+ return string;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LocationPath.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LocationPath.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LocationPath.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Location path expression in XPath.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class LocationPath extends Expr {
+
+ List<Step> fSteps = new ArrayList<Step>();
+ boolean fAbsolute = false;
+
+ /**
+ * A brand new shiny LocationPath expression.
+ *
+ * @param abs is it an absolute path ? true/false
+ * @param steps the steps in the path.
+ */
+ public LocationPath ( boolean abs, Step ... steps) {
+ super(null);
+ fAbsolute = abs;
+ for(Step s : steps) {
+ addStep(s);
+ }
+ }
+
+ /**
+ * Add a step to this path expression.
+ *
+ * @param s step
+ */
+ public void addStep (Step s) {
+ if (s != null) {
+ fSteps.add(s);
+ }
+ }
+
+ /**
+ * Add as the first step of the path (from the beginning).
+ *
+ * @param s
+ */
+ public void addFirstStep (Step s) {
+ if (s != null) {
+ fSteps.add(0, s);
+ }
+ }
+
+ /**
+ * @return the steps in the location path expression.
+ */
+ public List<Step> getSteps () {
+ return fSteps;
+ }
+
+ /**
+ * @return is it an absolute path expression ?
+ */
+ public boolean isAbsolute() {
+ return fAbsolute;
+ }
+
+ /**
+ * Set if expression is absolute (from parser).
+ * @param v true/false
+ */
+ public void setIsAbsolute (boolean v) {
+ fAbsolute = v;
+ }
+
+
+ @Override
+ protected String asText()
+ {
+ StringBuilder buf = new StringBuilder();
+ if (isAbsolute()) {
+ buf.append("/");
+ }
+ Iterator<Step> stepIter = getSteps().iterator();
+ while (stepIter.hasNext())
+ {
+ buf.append(stepIter.next().getText());
+ if (stepIter.hasNext())
+ {
+ buf.append("/");
+ }
+ }
+ return buf.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#toString()
+ */
+
+ @Override
+ public String toString()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.append("{");
+ buf.append(getClass().getSimpleName());
+ buf.append(",").append(isAbsolute()).append(",");
+
+ Iterator<Step> stepIter = getSteps().iterator();
+ while (stepIter.hasNext())
+ {
+ buf.append( stepIter.next() );
+ if (stepIter.hasNext())
+ {
+ buf.append("/");
+ }
+ }
+ buf.append("}");
+ return buf.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition ()
+ {
+ return fSteps.size() > 0 ? fSteps.get(0).getPosition() : -1;
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+ @Override
+ public int getEndPosition () {
+ int size = fSteps.size();
+ return size > 0 ? fSteps.get(size-1).getEndPosition() : -1;
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LogicalExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LogicalExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/LogicalExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * Logical Expression (and,or)
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+
+ */
+public class LogicalExpr extends BinaryExpr {
+
+ /**
+ * Brand new shiny LogicalExpr.
+ * @param op
+ * @param left
+ * @param right
+ */
+ public LogicalExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/MultiplicativeExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/MultiplicativeExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/MultiplicativeExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * Multiplicative expression ... ( *,/,mod,div)
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class MultiplicativeExpr extends BinaryExpr {
+
+ /**
+ * Brand new shiny multiplicative expression.
+ * @param op
+ * @param left
+ * @param right
+ */
+
+ public MultiplicativeExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NameStep.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NameStep.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NameStep.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * Name step in a location path.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+public class NameStep extends Step {
+
+ String fPrefix ;
+ String fLocalName;
+ boolean matchesAnyName = false;
+
+ /**
+ * Brand new shiny NameStep ...
+ *
+ * @param axis
+ * @param prefix
+ * @param name
+ */
+
+ public NameStep ( int axis, String prefix, String name ) {
+ super(axis);
+ fPrefix = prefix;
+ fLocalName = name;
+ matchesAnyName = "*".equals(fLocalName);
+ }
+
+ /**
+ * @return the prefix in the name step.
+ */
+
+ public String getPrefix () {
+ return fPrefix;
+ }
+ /**
+ * @return the local name of the name step.
+ */
+
+ public String getLocalName() {
+ return fLocalName;
+ }
+
+ /**
+ *
+ * @return is this a * ?
+ */
+ public boolean isMatchesAnyName() {
+ return matchesAnyName;
+ }
+
+
+ @Override
+ protected String asString () {
+ return asText();
+ }
+
+ @Override
+ protected String asText() {
+ StringBuilder buf = new StringBuilder(64);
+
+ if (getPrefix() != null && getPrefix().length() > 0) {
+ buf.append(getPrefix()).append(':');
+ }
+ buf.append(getLocalName());
+ return buf.toString();
+ }
+}
+
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NumberExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NumberExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/NumberExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A number expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class NumberExpr extends Expr {
+
+ Number fNumber = new Integer(0);
+
+ /**
+ * Brand new shiny number expression.
+ * @param number
+ */
+ public NumberExpr (String number) {
+ super( number );
+ fNumber = extractNumber(number);
+ }
+
+ /**
+ * Brand new shiny number expression.
+ * @param num
+ */
+ public NumberExpr (Number num) {
+ super(num.toString());
+ fNumber = num;
+ }
+
+ /**
+ * @return the number.
+ */
+ public Number getNumber() {
+ return fNumber;
+ }
+
+ Number extractNumber(String numberBody) {
+ boolean isReal = numberBody.indexOf('.') >= 0;
+ if (!isReal) {
+ return new Integer(numberBody);
+ }
+ double result = Double.parseDouble(numberBody);
+ return new Double(result);
+ }
+
+
+ /**
+ * negate the number expression.
+ */
+ public void negate () {
+
+ if (fNumber instanceof Float) {
+ fNumber = new Float(-1 * fNumber.floatValue());
+ } else if (fNumber instanceof Short) {
+ fNumber = new Short((short) (-1 * fNumber.shortValue()));
+ } else if (fNumber instanceof Integer) {
+ fNumber = new Integer(-1*fNumber.intValue());
+ } else if (fNumber instanceof Long) {
+ fNumber = new Long( -1*fNumber.longValue());
+ } else {
+ fNumber = new Double(-1.0 * fNumber.doubleValue());
+ }
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/PathExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/PathExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/PathExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A path expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+public class PathExpr extends Expr {
+
+ Expr fFilterExpr;
+ LocationPath fLocationPath;
+
+ /**
+ * Brand new shiny PathExpr ...
+ *
+ * @param filter
+ * @param locationPath
+ */
+
+ public PathExpr ( Expr filter, LocationPath locationPath) {
+ super(null);
+ fFilterExpr = filter;
+ fLocationPath = locationPath;
+ }
+
+ /**
+ * @return return the filter expression.
+ */
+ public Expr getFilterExpr() {
+ return fFilterExpr;
+ }
+
+ /**
+ * @return the location path.
+ */
+ public LocationPath getLocationPath() {
+ return fLocationPath;
+ }
+
+ @Override
+ protected String asText() {
+ StringBuilder buf = new StringBuilder();
+
+ if (getFilterExpr() != null) {
+ buf.append(getFilterExpr().getText());
+ }
+
+ if (getLocationPath() != null) {
+ if (!getLocationPath().getSteps().isEmpty()) buf.append("/");
+ buf.append(getLocationPath().getText());
+ }
+
+ return buf.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#toString()
+ */
+
+ @Override
+ public String toString() {
+ StringBuilder buf = new StringBuilder();
+ buf.append("{");
+ buf.append(getClass().getSimpleName());
+ buf.append(",");
+ if (getFilterExpr() != null) {
+ buf.append(getFilterExpr() );
+ }
+
+ if (getLocationPath() != null) {
+ if (!getLocationPath().getSteps().isEmpty()) buf.append("/");
+ buf.append(getLocationPath() );
+ }
+ buf.append("}");
+
+ return buf.toString();
+ }
+
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition () {
+ return fFilterExpr.getPosition();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+ @Override
+ public int getEndPosition () {
+ if (fLocationPath != null) {
+ return fLocationPath.getEndPosition();
+ }
+ return fFilterExpr.getEndPosition();
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Predicate.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Predicate.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Predicate.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A predicate.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+public class Predicate {
+
+ Expr fExpr ;
+
+ /**
+ * Brand new predicate on an expression.
+ * @param expr
+ */
+
+ public Predicate (Expr expr) {
+ fExpr = expr;
+ }
+
+ /**
+ * @return the predicate (boolean) expression.
+ */
+ public Expr getExpr () {
+ return fExpr;
+ }
+
+ /**
+ * @return return it as text.
+ */
+
+ public String getText() {
+ return "[" + fExpr.getText() + "]";
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{").append(getClass().getName()).append(",");
+ sb.append("[").append(fExpr).append("]");
+ return sb.toString();
+ }
+
+ /**
+ * @return the position of the predicate in the input "stream"
+ */
+ public int getPosition ()
+ {
+ return fExpr != null ? fExpr.getPosition() : -1;
+ }
+
+ /**
+ * @return the end position of the predicate in the input "stream"
+ */
+ public int getEndPosition ()
+ {
+ return fExpr != null ? fExpr.getEndPosition() : -1;
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/ProcessingInstructionNodeStep.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/ProcessingInstructionNodeStep.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/ProcessingInstructionNodeStep.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * ProcessingIntstruction node step in an XPath path.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+
+public class ProcessingInstructionNodeStep extends Step {
+
+ String fName;
+ /**
+ * Brand new processing-instruction-node-step ...
+ * @param axis
+ * @param name
+ */
+ public ProcessingInstructionNodeStep (int axis, String name) {
+ super(axis);
+ fName = name;
+
+ }
+
+ /**
+ * @return name of the processing instruction.
+ */
+ public String getName () {
+ return fName;
+ }
+
+
+ @Override
+ protected String asString () {
+ StringBuilder sb = new StringBuilder ();
+ sb.append("processing-instruction(");
+ if (fName != null) {
+ sb.append(fName);
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ @Override
+ protected String asText() {
+ return asString();
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/RelationalExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/RelationalExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/RelationalExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A relational expression ( >,<, etc.)
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class RelationalExpr extends BinaryExpr {
+
+ /**
+ * A brand new shiny relational expression.
+ *
+ * @param op
+ * @param left
+ * @param right
+ */
+
+ public RelationalExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Step.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Step.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Step.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A step in the location path ...
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+
+@SuppressWarnings("nls")
+public class Step {
+
+ int fAxis = 0;
+ List<Predicate> fList = new ArrayList<Predicate>();
+
+ int fStartPosition = -1;
+ int fEndPosition = -1;
+
+ /**
+ * Bran new step ... on the axis specified.
+ *
+ * @param axis
+ */
+ public Step (int axis) {
+ fAxis = axis;
+ }
+
+
+ /**
+ * @return return the text of this step.
+ */
+
+ public String getText()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.append(getAxisName());
+ buf.append("::");
+ buf.append(asText());
+
+ for(Predicate p : fList) {
+ buf.append(p.getText());
+ }
+ return buf.toString();
+ }
+
+ protected String asText () {
+ return "?";
+ }
+
+ /**
+ * @return the axis of this step.
+ */
+ public int getAxis () {
+ return fAxis;
+ }
+
+ /**
+ * Set the axis of this step (from parser).
+ *
+ * @param axis the axis of this step.
+ */
+ public void setAxis (int axis) {
+ fAxis = axis;
+ }
+
+ /**
+ * Add a predicate to this step.
+ *
+ * @param predicate
+ */
+ public void addPredicate(Predicate predicate)
+ {
+ if (predicate != null) {
+ fList.add(predicate);
+ }
+ }
+
+ /**
+ * @return all predicates of this step.
+ */
+ public List<Predicate> getPredicates() {
+ return fList;
+ }
+
+ /**
+ * @return the axis name.
+ */
+ public String getAxisName ()
+ {
+ return Axis.getName(fAxis);
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{").append(getClass().getSimpleName()).append(",").append(getAxisName()).append(",");
+ sb.append(asString());
+ sb.append(",[");
+ for(Predicate p : fList) {
+ sb.append(p);
+ sb.append(",");
+ }
+ sb.append("]");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ protected String asString () {
+ return null;
+ }
+
+
+ /**
+ * @return the end position of this step in the input "stream"
+ */
+ public int getEndPosition() {
+ return fEndPosition;
+ }
+
+ /**
+ * @return the start position of this step in the input "stream"
+ */
+
+ public int getPosition() {
+ return fStartPosition;
+ }
+
+ /**
+ * Set the position of this step in the input stream.
+ * This is called by the parser ...
+ *
+ * @param start
+ * @param end
+ */
+ public void setPosition (int start, int end) {
+ fStartPosition = start;
+ fEndPosition = end;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/TextNodeStep.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/TextNodeStep.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/TextNodeStep.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * TextNodeStep are text() nodes in any XPath path.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class TextNodeStep extends Step {
+
+ /**
+ * Brand new shiny TextNodeStep
+ * @param axis
+ */
+ public TextNodeStep (int axis) {
+ super(axis);
+ }
+
+ @Override
+ @SuppressWarnings("nls")
+ protected String asText()
+ {
+ return "text()";
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnaryExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnaryExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnaryExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+
+
+/**
+ * A unary expression.
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+@SuppressWarnings("nls")
+
+public class UnaryExpr extends Expr {
+
+ Expr fExpr;
+ String fOparand;
+
+ /**
+ * Brand new shiny unary expression
+ * @param expr
+ */
+ public UnaryExpr (Expr expr) {
+ super(expr.toString());
+ fExpr = expr;
+ }
+
+ /**
+ * @return the RHS of the unary expression.
+ */
+
+ public Expr getExpr () {
+ return fExpr;
+ }
+
+ /**
+ * Set the operand of the unary expression.
+ *
+ * @param operand the operand
+ */
+
+ public void setOperand (String operand)
+ {
+ fOparand = operand;
+ }
+
+ @Override
+ protected String asText()
+ {
+ StringBuilder sb = new StringBuilder();
+ if (fOparand != null) {
+ sb.append(fOparand);
+ }
+ if (fExpr != null) {
+ sb.append(fExpr.asText());
+ }
+ return sb.toString();
+ }
+
+
+ @Override
+ protected String asString () {
+ StringBuilder sb = new StringBuilder();
+ if (fOparand != null) {
+ sb.append(fOparand);
+ sb.append(",");
+ }
+ if (fExpr != null) {
+ sb.append(fExpr);
+ }
+ return sb.toString();
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#isWrapParen()
+ */
+ @Override
+ public boolean isWrapParen () {
+ return fExpr != null ? fExpr.isWrapParen() : false;
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getPosition()
+ */
+ @Override
+ public int getPosition () {
+ return fExpr != null ? fExpr.getPosition() : -1;
+ }
+
+ /**
+ * @see org.eclipse.bpel.xpath10.Expr#getEndPosition()
+ */
+ @Override
+ public int getEndPosition () {
+ return fExpr != null ? fExpr.getEndPosition() : -1;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnionExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnionExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/UnionExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ * A union expression in XPath.
+ * Basically
+ * <pre>path | path</pre>
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+public class UnionExpr extends BinaryExpr {
+
+ /**
+ * A Brand new shiny union expression.
+ *
+ * @param op should only be |
+ * @param left
+ * @param right
+ */
+
+ public UnionExpr (String op, Expr left, Expr right) {
+ super (op,left,right);
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/VariableReferenceExpr.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/VariableReferenceExpr.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/VariableReferenceExpr.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10;
+
+/**
+ *
+ * Variable Reference Expression. $variable bit of XPath
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ *
+ */
+@SuppressWarnings("nls")
+
+public class VariableReferenceExpr extends Expr {
+ String fName;
+ String fPrefix;
+
+ /**
+ * Brand new shiny VariableRefExpr.
+ * @param prefix prefix of the variable (may be null or "")
+ * @param name the name of the variable
+ */
+
+ public VariableReferenceExpr (String prefix, String name) {
+ super(null);
+ fPrefix = prefix;
+ fName = name;
+ fText = getText();
+ }
+
+ /**
+ *
+ * @return the prefix
+ */
+
+ public String getPrefix() {
+ return fPrefix;
+ }
+
+ /**
+ * @return The variable name (sans prefix)
+ */
+ public String getVariableName() {
+ return fName;
+ }
+
+ /**
+ * Return the QName that represents this variable name.
+ * The QName is returned as a string, with the original prefix used to specify the namespace.
+ *
+ * @return the QName of this variable
+ */
+
+ public String getQName() {
+ if ("".equals(fPrefix) || fPrefix == null) {
+ return fName;
+ }
+ return fPrefix + ":" + fName;
+ }
+
+
+ @Override
+ protected String asText() {
+ return "$" + getQName();
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Visitor.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Visitor.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/Visitor.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10 ;
+
+/**
+ * Java JDK dependencies ...
+ */
+import java.util.List;
+
+
+/**
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Aug 26, 2008
+ */
+
+public class Visitor {
+
+ protected void visit ( PathExpr expr ) {
+ visit ( expr.getFilterExpr() );
+ visit ( expr.getLocationPath() );
+ }
+
+
+ protected void visit (LocationPath expr ) {
+ visitList( expr.getSteps() );
+ }
+
+
+
+ protected void visit (FilterExpr expr) {
+ visit(expr.getExpr());
+ visitList( expr.getPredicates() );
+ }
+
+ protected void visit (BinaryExpr expr) {
+
+ visit(expr.getLHS());
+ visit(expr.getRHS());
+ }
+
+
+ protected void visit(UnaryExpr expr) {
+ visit( expr.getExpr() );
+ }
+
+
+ protected void visit(UnionExpr expr) {
+ visit(expr.getLHS());
+ visit(expr.getRHS());
+
+ }
+
+ protected void visit (NumberExpr expr) {
+
+ }
+
+
+ protected void visit (LiteralExpr expr) {
+
+ }
+
+
+ protected void visit (VariableReferenceExpr expr) {
+
+ }
+
+
+ protected void visit (FunctionCallExpr expr) {
+ visitList( expr.getParameters() );
+ }
+
+ protected void visit (NameStep step) {
+ visitList(step.getPredicates());
+ }
+
+ protected void visit(ProcessingInstructionNodeStep step) {
+ visitList(step.getPredicates());
+ }
+
+ protected void visit(AllNodeStep step) {
+ visitList(step.getPredicates());
+ }
+
+
+ protected void visit (TextNodeStep step) {
+ visitList(step.getPredicates());
+ }
+
+ protected void visit (CommentNodeStep step) {
+ visitList(step.getPredicates());
+ }
+
+ protected void visit (Predicate predicate) {
+ visit(predicate.getExpr());
+ }
+
+
+ void visitList ( List<?> list) {
+ for(Object next: list) {
+ visit(next);
+ }
+ }
+
+
+ /**
+ * @param obj
+ */
+ public void visit ( Object obj ) {
+
+ if (obj instanceof PathExpr) {
+ visit((PathExpr) obj);
+ } else if (obj instanceof LocationPath) {
+ visit((LocationPath) obj);
+ } else if (obj instanceof BinaryExpr) {
+ visit((BinaryExpr) obj);
+ } else if (obj instanceof FilterExpr) {
+ visit((FilterExpr)obj);
+ } else if (obj instanceof UnaryExpr) {
+ visit((UnaryExpr)obj);
+ } else if (obj instanceof NumberExpr) {
+ visit((NumberExpr)obj);
+ } else if (obj instanceof LiteralExpr) {
+ visit((LiteralExpr)obj);
+ } else if (obj instanceof VariableReferenceExpr) {
+ visit((VariableReferenceExpr)obj);
+ } else if (obj instanceof FunctionCallExpr) {
+ visit((FunctionCallExpr) obj);
+ } else if (obj instanceof List) {
+ visitList((List<?>) obj);
+ } else if (obj instanceof NameStep) {
+ visit((NameStep)obj);
+ } else if (obj instanceof ProcessingInstructionNodeStep) {
+ visit((ProcessingInstructionNodeStep) obj);
+ } else if (obj instanceof AllNodeStep) {
+ visit((AllNodeStep)obj);
+ } else if (obj instanceof TextNodeStep) {
+ visit((TextNodeStep)obj);
+ } else if (obj instanceof CommentNodeStep) {
+ visit((CommentNodeStep)obj);
+ } else if (obj instanceof Predicate) {
+ visit((Predicate)obj);
+ } else {
+ // ignore or throw error ... ?
+ }
+ }
+
+}
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,512 @@
+grammar XPath10;
+
+options
+{
+ k=4;
+ output=AST;
+}
+
+tokens {
+ OR = 'or' ;
+ AND = 'and' ;
+ MOD = 'mod' ;
+ DIV = 'div' ;
+
+ LPAREN = '(' ;
+ RPAREN = ')' ;
+ LBRACKET = '[' ;
+ RBRACKET = ']' ;
+ PIPE = '|' ;
+ DOT = '.' ;
+ DOT2 = '..' ;
+ AT = '@' ;
+ COMMA = ',' ;
+ COLON2 = '::' ;
+ COLON = ':' ;
+ SLASH = '/' ;
+ SLASH2 = '//' ;
+ DOLLAR = '$' ;
+ PLUS = '+' ;
+ MINUS = '-' ;
+
+ EQ = '=' ;
+ NE = '!=' ;
+ LT = '<' ;
+ LTE = '<=' ;
+ GT = '>' ;
+ GTE = '>=' ;
+ STAR = '*' ;
+
+ // Pseudo Tokens.
+ Args;
+}
+
+
+@header {
+ package org.eclipse.bpel.xpath10.parser;
+ import org.eclipse.bpel.xpath10.*;
+
+}
+
+@lexer::header {
+ package org.eclipse.bpel.xpath10.parser;
+}
+
+@members {
+
+ boolean isNodeNodeName (String node) {
+ return "node".equals(node);
+ }
+ boolean isTextNodeName (String node) {
+ return "text".equals(node);
+ }
+ boolean isCommentNodeName (String node) {
+ return "comment".equals(node);
+ }
+ boolean isProcessingInstructionNodeName (String node) {
+ return "processing-instruction".equals(node);
+ }
+
+ static int positionOf (Token token, boolean start) {
+ if (token instanceof CommonToken) {
+ CommonToken t = (CommonToken)token;
+ if (start) {
+ return t.getStartIndex();
+ }
+ return t.getStopIndex();
+ }
+ return -1;
+ }
+
+ static int positionOfIfUnset (Token token, boolean start, int currentValue) {
+ if (currentValue < 0) {
+ return positionOf(token,start);
+ }
+ return currentValue;
+ }
+
+ public void displayRecognitionError(String[] tokenNames, RecognitionException re)
+ {
+ String msg = getErrorMessage(re, tokenNames);
+ // we don't recover
+ throw new XPath10Exception(msg,re.getCause(),re.index);
+ }
+
+}
+
+@lexer::members {
+ public void displayRecognitionError(String[] tokenNames, RecognitionException re)
+ {
+ String msg = getErrorMessage(re, tokenNames);
+ // we don't recover
+ throw new XPath10Exception(msg,re.getCause(),re.index);
+ }
+}
+//
+// XPath 1.0 Grammer rules.
+//
+
+xpath returns [Expr result]
+ : e=unionExpr
+ { $result = e.result; }
+ ;
+
+locationPath returns [LocationPath result]:
+ aloc=absoluteLocationPath
+ { $result=aloc.result; }
+ | rloc=relativeLocationPath
+ { $result=rloc.result; }
+ ;
+
+absoluteLocationPath returns [LocationPath result]
+@init {
+ Step ans = null;
+} :
+ (op=SLASH2^ {
+ ans=new AllNodeStep(Axis.DESCENDANT_OR_SELF);
+ ans.setPosition(positionOf($op,true),positionOf($op,false)); } | op=SLASH^ )
+
+ ( (AT|STAR|IDENTIFIER)=> loc=i_relativeLocationPath { $result = loc.result; } | { $result = new LocationPath(true); } )
+ { if ($result != null) {
+ if (ans != null) { $result.addFirstStep(ans); }
+ $result.setIsAbsolute(true);
+ }
+ }
+ ;
+
+relativeLocationPath returns [LocationPath result]:
+ e=i_relativeLocationPath
+ { $result = e.result; }
+ ;
+
+i_relativeLocationPath returns [LocationPath result]:
+ s1=step { $result=new LocationPath(false, s1.result); }
+ ( (op=SLASH2 { $result.addStep(new AllNodeStep(Axis.DESCENDANT_OR_SELF));
+ $result.setPosition(positionOf($op,true),positionOf($op,false));
+ } |SLASH ) s2=step {$result.addStep(s2.result);} )*
+ ;
+
+
+// Step is:
+// NameStep
+// Special Step
+// Abbr Step
+step returns [Step result]
+@init {
+ // default axis, per XPath spec.
+ int anAxis = Axis.CHILD;
+ int posStart = -1;
+ String aNs = null;
+
+} :
+ (
+ // If it has an axis
+ ( (IDENTIFIER COLON2 | AT) => axis { anAxis=$axis.axis; posStart = $axis.posStart;} | /* Empty, no axis (default) */ )
+
+ (
+ ( (ns=IDENTIFIER COLON { aNs=$ns.text; posStart=positionOfIfUnset($ns,true,posStart); } )? ( id=IDENTIFIER|id=STAR ) {
+ $result = new NameStep(anAxis,aNs,$id.text);
+ $result.setPosition(positionOfIfUnset($id,true,posStart), positionOf($id,false));
+ } )
+ |
+
+ ss=specialStep {$result = ss.result; $result.setAxis(anAxis); }
+
+ ) ( p=predicate {$result.addPredicate(p.result);} )*
+ )
+
+ | as=abbrStep {
+ $result=as.result;
+ $result.setPosition(as.posStart,as.posEnd);
+ } ( p=predicate {$result.addPredicate(p.result);} )*
+ ;
+
+
+// special step copies the position in the token stream into the semantic tree
+//
+specialStep returns [Step result]
+@init {
+ String piID = null;
+} :
+ { isProcessingInstructionNodeName( input.LT(1).getText() ) }?
+ id=IDENTIFIER^ LPAREN! ( pi=IDENTIFIER {piID=$pi.text; } )? rp=RPAREN!
+ { $result = new ProcessingInstructionNodeStep(0, piID );
+ $result.setPosition(positionOf($id,true),positionOf($rp,false));
+ }
+
+ | { isCommentNodeName(input.LT(1).getText()) }? id=IDENTIFIER^ LPAREN! rp=RPAREN!
+ { $result = new CommentNodeStep(Axis.CHILD);
+ $result.setPosition(positionOf($id,true),positionOf($rp,false));
+ }
+
+ | { isTextNodeName(input.LT(1).getText()) }? id=IDENTIFIER^ LPAREN! rp=RPAREN!
+ { $result = new TextNodeStep(Axis.CHILD);
+ $result.setPosition(positionOf($id,true),positionOf($rp,false));
+ }
+
+ | { isNodeNodeName(input.LT(1).getText()) }? id=IDENTIFIER^ LPAREN! rp=RPAREN!
+ { $result = new AllNodeStep(Axis.CHILD);
+ $result.setPosition(positionOf($id,true),positionOf($rp,false));
+ }
+
+ ;
+
+axis returns [int axis, int posStart, int posEnd ]:
+ id=IDENTIFIER COLON2^
+ { $axis = Axis.getAxis( $id.text);
+ $posStart = positionOf($id,true);
+ $posEnd = positionOf($id,false);
+ }
+ | at=AT
+ { $axis = Axis.ATTRIBUTE;
+ $posStart = positionOf($at,true);
+ $posEnd = positionOf($at,false);
+ }
+ ;
+
+
+// ----------------------------------------
+// Section 2.4
+// Predicates
+// ----------------------------------------
+
+// .... production [8] ....
+//
+predicate returns [Predicate result]:
+ LBRACKET^ e=predicateExpr RBRACKET!
+ { $result = e.result ; }
+ ;
+
+// .... production [9] ....
+//
+predicateExpr returns [Predicate result]
+ : e=expr
+ { $result = new Predicate(e.result) ; }
+ ;
+
+// .... production [12] ....
+// A location step of . is short for self::node().
+// Similarly, a location step of .. is short for parent::node()
+//
+abbrStep returns [Step result, int posStart, int posEnd ]:
+ d=DOT { $result = new AllNodeStep(Axis.SELF); $posStart = positionOf($d,true); $posEnd = $posStart+1; }
+ | d=DOT2 { $result = new AllNodeStep(Axis.PARENT); $posStart = positionOf($d,true); $posEnd = $posStart+2; }
+
+;
+
+// .... production [13] ....
+//
+abbrAxisSpecifier : ( AT )? ;
+
+
+// ----------------------------------------
+// Section 3
+// Expressions
+// ----------------------------------------
+
+// ----------------------------------------
+// Section 3.1
+// Basics
+// ----------------------------------------
+
+// .... production [14] ....
+//
+expr returns [Expr result]
+ : e=orExpr
+ { $result = $e.result ; }
+ ;
+
+// .... production [15] ....
+//
+primaryExpr returns [Expr result]:
+ varRef=variableReference { $result = varRef.result ; }
+ | LPAREN! exp=expr RPAREN! { $result = exp.result; $result.setWrapParen(true); }
+ | lit=literal { $result = lit.result ;}
+ | num=number { $result = num.result ; }
+ | fn=functionCall { $result = fn.result ; }
+ ;
+
+
+literal returns [Expr result]
+ : lit=LITERAL^
+ { $result = new LiteralExpr($lit.text) ;
+ $result.setPosition (positionOf($lit,true),positionOf($lit,false) );
+ }
+ ;
+
+number returns [Expr result]
+ : num=NUMBER^
+ { $result = new NumberExpr($num.text);
+ $result.setPosition(positionOf($num,true),positionOf($num,false));
+ }
+ ;
+
+variableReference returns [Expr result]
+ : DOLLAR^ var=qName
+ { $result = new VariableReferenceExpr($var.prefix, $var.localName);
+ $result.setPosition( $var.startOffset, $var.endOffset );
+ }
+ ;
+
+// ----------------------------------------
+// Section 3.2
+// Function Calls
+// ----------------------------------------
+
+// .... production [16] ....
+//
+functionCall returns [FunctionCallExpr result ]
+ : qn=qName
+ { $result = new FunctionCallExpr($qn.prefix,$qn.localName);
+ $result.setPosition ($qn.startOffset,$qn.endOffset);
+ }
+ LPAREN! ( list=argList { $result.getParameters().addAll(list.result); } )? RPAREN!
+ ;
+
+// .... production [16.1] ....
+//
+argList returns [ List<Expr> result ]
+@init {
+ $result = new ArrayList<Expr>();
+}
+ : a=argument { $result.add(a.result); }
+ ( COMMA b=argument { $result.add(b.result); } )*
+ -> ^(Args argument+) ;
+
+// .... production [17] ....
+//
+argument returns [Expr result]
+ : e=expr
+ { $result = e.result ; }
+ ;
+
+// ----------------------------------------
+// Section 3.3
+// Node-sets
+// ----------------------------------------
+
+// .... production [18] ....
+//
+unionExpr returns [Expr result]
+ : (a=pathExpr)
+ { $result = a.result; }
+ ((op=PIPE^) b=pathExpr
+ {$result = new UnionExpr($op.text,$unionExpr.result,b.result); }
+ )*
+ ;
+// .... production [19] ....
+// TODO: Fix Slash2 //
+
+pathExpr returns [Expr result]
+@init {
+ Step ans = null;
+}:
+ loc=locationPath
+ { $result = $loc.result; }
+ | e=filterExpr { $result = e.result; }
+ ( (SLASH|SLASH2 { ans=new AllNodeStep(Axis.DESCENDANT_OR_SELF);}) path=relativeLocationPath {
+ $result = new PathExpr(e.result,path.result);
+ if (ans != null) { path.result.addFirstStep(ans); }
+ } )?
+ ;
+
+// .... production [20] ....
+//
+filterExpr returns [Expr result]
+@init {
+ FilterExpr filter = null;
+}
+ : e=primaryExpr { filter = new FilterExpr(e.result) ; }
+ ( p=predicate {filter.addPredicate(p.result); } )*
+ { $result = filter.hasPredicates() ? filter : filter.getExpr(); }
+ ;
+
+
+// ----------------------------------------
+// Section 3.4
+// Booleans
+// ----------------------------------------
+
+// .... production [21] ....
+// orExpr: andExpr ( OR^ andExpr )* ;
+
+orExpr returns [Expr result]
+ : (a=andExpr)
+ { $result = $a.result; }
+ ((op=OR^) b=andExpr
+ { $result = new LogicalExpr($op.text, $orExpr.result, b.result); }
+ )*
+ ;
+
+// .... production [22] ....
+// andExpr : equalityExpr ( AND^ equalityExpr )? ;
+
+andExpr returns [Expr result]
+ : (a=equalityExpr)
+ { $result = a.result; }
+ ((op=AND^) b=equalityExpr
+ { $result = new LogicalExpr($op.text,$andExpr.result,b.result); }
+ )*
+ ;
+
+// .... production [23] ....
+// equalityExpr : relationalExpr ((EQ|NE)^ relationalExpr )? ;
+equalityExpr returns [Expr result]
+ : (a=relationalExpr)
+ { $result = a.result; }
+ ((op=EQ^|op=NE^) b=relationalExpr
+ { $result = new EqualityExpr($op.text, $equalityExpr.result, b.result ); }
+ )*
+ ;
+
+// .... production [24] ....
+// relationalExpr : additiveExpr ((LT|GT|LTE|GTE)^ additiveExpr )? ;
+relationalExpr returns [Expr result]
+ : (a=additiveExpr) // set result
+ { $result = a.result; }
+ ((op=LT^|op=GT^|op=LTE^|op=GTE^) b=additiveExpr
+ { $result = new RelationalExpr($op.text, $relationalExpr.result, b.result); }
+ )*
+ ;
+// ----------------------------------------
+// Section 3.5
+// Numbers
+// ----------------------------------------
+
+// .... production [25] ....
+//
+// additiveExpr : multExpr ((PLUS^|MINUS^) multExpr )? ;
+
+additiveExpr returns [Expr result]
+ : (a=multExpr)
+ { $result = a.result; } // set result
+ ((op=PLUS^|op=MINUS^) b=multExpr
+ { $result = new AdditiveExpr($op.text,$additiveExpr.result, b.result); }
+ )*
+ ;
+
+// .... production [26] ....
+// multExpr : unaryExpr ( (STAR^| DIV^| MOD^) unaryExpr )? ;
+multExpr returns [Expr result]
+ : (a=unaryExpr)
+ { $result = a.result; } // set result
+ ((op=STAR^|op=DIV^|op=MOD^) b=unaryExpr
+ { $result = new MultiplicativeExpr($op.text, $multExpr.result, b.result); }
+ )*
+ ;
+
+// .... production [27] ....
+//
+unaryExpr returns [UnaryExpr result]
+ : u=unionExpr
+ { $result = new UnaryExpr(u.result); }
+
+ | op=MINUS n=unaryExpr
+ {
+ $result = n.result;
+ $result.setOperand($op.text);
+ $result.setPosition(positionOf($op,true),-1);
+ }
+ ;
+
+
+// QName
+// When no namespace is present, the default prefix is "", not null
+
+qName returns [String prefix, String localName , int startOffset, int endOffset ]
+@init {
+ $prefix = "";
+ $startOffset = -1;
+ $startOffset = -1;
+} :
+ (p=IDENTIFIER COLON^ { $prefix=$p.text ; $startOffset = positionOf($p,true); })?
+ n=IDENTIFIER { $localName=$n.text;
+ if ($startOffset < 0) {
+ $startOffset = positionOf($n,true);
+ }
+ $endOffset = positionOf($n,false);
+ }
+ ;
+
+
+// Lexer section. Convention is that rules which start with an uppercase letter are lexer rules.
+WS : ('\n' | ' ' | '\t' | '\r')+ { $channel=HIDDEN;}
+ ;
+
+fragment
+DIGITS : '0'..'9'+;
+
+fragment
+SINGLE_QUOTE_STRING : '\''! (~('\''))* '\''! ;
+
+fragment
+DOUBLE_QUOTE_STRING : '"'! (~('"'))* '"'! ;
+
+LITERAL : SINGLE_QUOTE_STRING | DOUBLE_QUOTE_STRING ;
+
+NUMBER : (DIGITS) ('.'DIGITS)? | '.' DIGITS ;
+
+IDENTIFIER :
+ ('\u0241'..'\u0377'|'a'..'z'|'A'..'Z'|'_') ('\u0241'..'\u0377'|'a'..'z'|'A'..'Z'|'-'|'_'|'0'..'9'|'.')*
+ ;
+
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Exception.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Exception.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Exception.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10.parser;
+
+/**
+ *
+ *
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Jun 23, 2008
+ *
+ */
+public class XPath10Exception extends Error {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7269923697850123266L;
+
+ int fPosition = 0;
+ /**
+ * @param message
+ * @param cause
+ * @param position
+ */
+
+ public XPath10Exception(String message, Throwable cause, int position ) {
+ super(message, cause);
+ fPosition = position;
+ }
+
+ /**
+ * @return the position within the input stream where the exception has occurred.
+ */
+ public int getPosition () {
+ return fPosition;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Factory.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Factory.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Factory.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.bpel.xpath10.parser;
+
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.RecognitionException;
+
+import org.antlr.runtime.CommonTokenStream;
+import org.eclipse.bpel.xpath10.Expr;
+
+/**
+ * @author Michal Chmielewski (michal.chmielewski(a)oracle.com)
+ * @date Jun 23, 2008
+ *
+ */
+public class XPath10Factory {
+
+ /**
+ * @param source
+ * @return a brand new shiny xpath expr [ whatever it may be ]
+ * @throws XPath10Exception
+ */
+ static public Expr create (String source) throws XPath10Exception
+ {
+ XPath10Parser parser = createParser(source);
+ try {
+ return parser.expr().result;
+ } catch (RecognitionException re) {
+ throw new XPath10Exception(re.getLocalizedMessage(),re.getCause(),re.index);
+ } catch (XPath10Exception ex) {
+ throw ex;
+ } catch (Throwable t) {
+ throw new XPath10Exception(t.getLocalizedMessage(),t.getCause(),-1);
+ }
+ }
+
+
+ static protected XPath10Parser createParser(String source) {
+ return new XPath10Parser(new CommonTokenStream(createLexer(source)));
+ }
+
+ static XPath10Lexer createLexer(String testString) {
+ return new XPath10Lexer(new ANTLRStringStream(testString));
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Lexer.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Lexer.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Lexer.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,1365 @@
+// $ANTLR 3.0.1 XPath10__.g 2008-06-23 18:23:27
+
+ package org.eclipse.bpel.xpath10.parser;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class XPath10Lexer extends Lexer {
+ public static final int DOLLAR=21;
+ public static final int LT=26;
+ public static final int SLASH2=20;
+ public static final int STAR=30;
+ public static final int MOD=6;
+ public static final int DIGITS=36;
+ public static final int GTE=29;
+ public static final int NUMBER=34;
+ public static final int Args=31;
+ public static final int LITERAL=33;
+ public static final int MINUS=23;
+ public static final int AND=5;
+ public static final int Tokens=39;
+ public static final int EOF=-1;
+ public static final int LTE=27;
+ public static final int LPAREN=8;
+ public static final int COLON=18;
+ public static final int LBRACKET=10;
+ public static final int AT=15;
+ public static final int RPAREN=9;
+ public static final int SINGLE_QUOTE_STRING=37;
+ public static final int SLASH=19;
+ public static final int WS=35;
+ public static final int COMMA=16;
+ public static final int DOUBLE_QUOTE_STRING=38;
+ public static final int IDENTIFIER=32;
+ public static final int OR=4;
+ public static final int GT=28;
+ public static final int PIPE=12;
+ public static final int PLUS=22;
+ public static final int DOT2=14;
+ public static final int RBRACKET=11;
+ public static final int DIV=7;
+ public static final int EQ=24;
+ public static final int DOT=13;
+ public static final int COLON2=17;
+ public static final int NE=25;
+
+ public void displayRecognitionError(String[] tokenNames, RecognitionException re)
+ {
+ String msg = getErrorMessage(re, tokenNames);
+ // we don't recover
+ throw new XPath10Exception(msg,re.getCause(),re.index);
+ }
+
+ public XPath10Lexer() {;}
+ public XPath10Lexer(CharStream input) {
+ super(input);
+ }
+ public String getGrammarFileName() { return "XPath10__.g"; }
+
+ // $ANTLR start OR
+ public final void mOR() throws RecognitionException {
+ try {
+ int _type = OR;
+ // XPath10__.g:14:4: ( 'or' )
+ // XPath10__.g:14:6: 'or'
+ {
+ match("or");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end OR
+
+ // $ANTLR start AND
+ public final void mAND() throws RecognitionException {
+ try {
+ int _type = AND;
+ // XPath10__.g:15:5: ( 'and' )
+ // XPath10__.g:15:7: 'and'
+ {
+ match("and");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end AND
+
+ // $ANTLR start MOD
+ public final void mMOD() throws RecognitionException {
+ try {
+ int _type = MOD;
+ // XPath10__.g:16:5: ( 'mod' )
+ // XPath10__.g:16:7: 'mod'
+ {
+ match("mod");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end MOD
+
+ // $ANTLR start DIV
+ public final void mDIV() throws RecognitionException {
+ try {
+ int _type = DIV;
+ // XPath10__.g:17:5: ( 'div' )
+ // XPath10__.g:17:7: 'div'
+ {
+ match("div");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DIV
+
+ // $ANTLR start LPAREN
+ public final void mLPAREN() throws RecognitionException {
+ try {
+ int _type = LPAREN;
+ // XPath10__.g:18:8: ( '(' )
+ // XPath10__.g:18:10: '('
+ {
+ match('(');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LPAREN
+
+ // $ANTLR start RPAREN
+ public final void mRPAREN() throws RecognitionException {
+ try {
+ int _type = RPAREN;
+ // XPath10__.g:19:8: ( ')' )
+ // XPath10__.g:19:10: ')'
+ {
+ match(')');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RPAREN
+
+ // $ANTLR start LBRACKET
+ public final void mLBRACKET() throws RecognitionException {
+ try {
+ int _type = LBRACKET;
+ // XPath10__.g:20:10: ( '[' )
+ // XPath10__.g:20:12: '['
+ {
+ match('[');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LBRACKET
+
+ // $ANTLR start RBRACKET
+ public final void mRBRACKET() throws RecognitionException {
+ try {
+ int _type = RBRACKET;
+ // XPath10__.g:21:10: ( ']' )
+ // XPath10__.g:21:12: ']'
+ {
+ match(']');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RBRACKET
+
+ // $ANTLR start PIPE
+ public final void mPIPE() throws RecognitionException {
+ try {
+ int _type = PIPE;
+ // XPath10__.g:22:6: ( '|' )
+ // XPath10__.g:22:8: '|'
+ {
+ match('|');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end PIPE
+
+ // $ANTLR start DOT
+ public final void mDOT() throws RecognitionException {
+ try {
+ int _type = DOT;
+ // XPath10__.g:23:5: ( '.' )
+ // XPath10__.g:23:7: '.'
+ {
+ match('.');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DOT
+
+ // $ANTLR start DOT2
+ public final void mDOT2() throws RecognitionException {
+ try {
+ int _type = DOT2;
+ // XPath10__.g:24:6: ( '..' )
+ // XPath10__.g:24:8: '..'
+ {
+ match("..");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DOT2
+
+ // $ANTLR start AT
+ public final void mAT() throws RecognitionException {
+ try {
+ int _type = AT;
+ // XPath10__.g:25:4: ( '@' )
+ // XPath10__.g:25:6: '@'
+ {
+ match('@');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end AT
+
+ // $ANTLR start COMMA
+ public final void mCOMMA() throws RecognitionException {
+ try {
+ int _type = COMMA;
+ // XPath10__.g:26:7: ( ',' )
+ // XPath10__.g:26:9: ','
+ {
+ match(',');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end COMMA
+
+ // $ANTLR start COLON2
+ public final void mCOLON2() throws RecognitionException {
+ try {
+ int _type = COLON2;
+ // XPath10__.g:27:8: ( '::' )
+ // XPath10__.g:27:10: '::'
+ {
+ match("::");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end COLON2
+
+ // $ANTLR start COLON
+ public final void mCOLON() throws RecognitionException {
+ try {
+ int _type = COLON;
+ // XPath10__.g:28:7: ( ':' )
+ // XPath10__.g:28:9: ':'
+ {
+ match(':');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end COLON
+
+ // $ANTLR start SLASH
+ public final void mSLASH() throws RecognitionException {
+ try {
+ int _type = SLASH;
+ // XPath10__.g:29:7: ( '/' )
+ // XPath10__.g:29:9: '/'
+ {
+ match('/');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end SLASH
+
+ // $ANTLR start SLASH2
+ public final void mSLASH2() throws RecognitionException {
+ try {
+ int _type = SLASH2;
+ // XPath10__.g:30:8: ( '//' )
+ // XPath10__.g:30:10: '//'
+ {
+ match("//");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end SLASH2
+
+ // $ANTLR start DOLLAR
+ public final void mDOLLAR() throws RecognitionException {
+ try {
+ int _type = DOLLAR;
+ // XPath10__.g:31:8: ( '$' )
+ // XPath10__.g:31:10: '$'
+ {
+ match('$');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DOLLAR
+
+ // $ANTLR start PLUS
+ public final void mPLUS() throws RecognitionException {
+ try {
+ int _type = PLUS;
+ // XPath10__.g:32:6: ( '+' )
+ // XPath10__.g:32:8: '+'
+ {
+ match('+');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end PLUS
+
+ // $ANTLR start MINUS
+ public final void mMINUS() throws RecognitionException {
+ try {
+ int _type = MINUS;
+ // XPath10__.g:33:7: ( '-' )
+ // XPath10__.g:33:9: '-'
+ {
+ match('-');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end MINUS
+
+ // $ANTLR start EQ
+ public final void mEQ() throws RecognitionException {
+ try {
+ int _type = EQ;
+ // XPath10__.g:34:4: ( '=' )
+ // XPath10__.g:34:6: '='
+ {
+ match('=');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end EQ
+
+ // $ANTLR start NE
+ public final void mNE() throws RecognitionException {
+ try {
+ int _type = NE;
+ // XPath10__.g:35:4: ( '!=' )
+ // XPath10__.g:35:6: '!='
+ {
+ match("!=");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end NE
+
+ // $ANTLR start LT
+ public final void mLT() throws RecognitionException {
+ try {
+ int _type = LT;
+ // XPath10__.g:36:4: ( '<' )
+ // XPath10__.g:36:6: '<'
+ {
+ match('<');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LT
+
+ // $ANTLR start LTE
+ public final void mLTE() throws RecognitionException {
+ try {
+ int _type = LTE;
+ // XPath10__.g:37:5: ( '<=' )
+ // XPath10__.g:37:7: '<='
+ {
+ match("<=");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LTE
+
+ // $ANTLR start GT
+ public final void mGT() throws RecognitionException {
+ try {
+ int _type = GT;
+ // XPath10__.g:38:4: ( '>' )
+ // XPath10__.g:38:6: '>'
+ {
+ match('>');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end GT
+
+ // $ANTLR start GTE
+ public final void mGTE() throws RecognitionException {
+ try {
+ int _type = GTE;
+ // XPath10__.g:39:5: ( '>=' )
+ // XPath10__.g:39:7: '>='
+ {
+ match(">=");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end GTE
+
+ // $ANTLR start STAR
+ public final void mSTAR() throws RecognitionException {
+ try {
+ int _type = STAR;
+ // XPath10__.g:40:6: ( '*' )
+ // XPath10__.g:40:8: '*'
+ {
+ match('*');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end STAR
+
+ // $ANTLR start WS
+ public final void mWS() throws RecognitionException {
+ try {
+ int _type = WS;
+ // XPath10__.g:493:4: ( ( '\\n' | ' ' | '\\t' | '\\r' )+ )
+ // XPath10__.g:493:6: ( '\\n' | ' ' | '\\t' | '\\r' )+
+ {
+ // XPath10__.g:493:6: ( '\\n' | ' ' | '\\t' | '\\r' )+
+ int cnt1=0;
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>='\t' && LA1_0<='\n')||LA1_0=='\r'||LA1_0==' ') ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // XPath10__.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ if ( cnt1 >= 1 ) break loop1;
+ EarlyExitException eee =
+ new EarlyExitException(1, input);
+ throw eee;
+ }
+ cnt1++;
+ } while (true);
+
+ channel=HIDDEN;
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end WS
+
+ // $ANTLR start DIGITS
+ public final void mDIGITS() throws RecognitionException {
+ try {
+ // XPath10__.g:497:8: ( ( '0' .. '9' )+ )
+ // XPath10__.g:497:10: ( '0' .. '9' )+
+ {
+ // XPath10__.g:497:10: ( '0' .. '9' )+
+ int cnt2=0;
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // XPath10__.g:497:10: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt2 >= 1 ) break loop2;
+ EarlyExitException eee =
+ new EarlyExitException(2, input);
+ throw eee;
+ }
+ cnt2++;
+ } while (true);
+
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DIGITS
+
+ // $ANTLR start SINGLE_QUOTE_STRING
+ public final void mSINGLE_QUOTE_STRING() throws RecognitionException {
+ try {
+ // XPath10__.g:500:21: ( '\\'' (~ ( '\\'' ) )* '\\'' )
+ // XPath10__.g:500:23: '\\'' (~ ( '\\'' ) )* '\\''
+ {
+ match('\'');
+ // XPath10__.g:500:29: (~ ( '\\'' ) )*
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='\u0000' && LA3_0<='&')||(LA3_0>='(' && LA3_0<='\uFFFE')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // XPath10__.g:500:30: ~ ( '\\'' )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop3;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end SINGLE_QUOTE_STRING
+
+ // $ANTLR start DOUBLE_QUOTE_STRING
+ public final void mDOUBLE_QUOTE_STRING() throws RecognitionException {
+ try {
+ // XPath10__.g:503:21: ( '\"' (~ ( '\"' ) )* '\"' )
+ // XPath10__.g:503:23: '\"' (~ ( '\"' ) )* '\"'
+ {
+ match('\"');
+ // XPath10__.g:503:28: (~ ( '\"' ) )*
+ loop4:
+ do {
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='\uFFFE')) ) {
+ alt4=1;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // XPath10__.g:503:29: ~ ( '\"' )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end DOUBLE_QUOTE_STRING
+
+ // $ANTLR start LITERAL
+ public final void mLITERAL() throws RecognitionException {
+ try {
+ int _type = LITERAL;
+ // XPath10__.g:505:9: ( SINGLE_QUOTE_STRING | DOUBLE_QUOTE_STRING )
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\'') ) {
+ alt5=1;
+ }
+ else if ( (LA5_0=='\"') ) {
+ alt5=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("505:1: LITERAL : ( SINGLE_QUOTE_STRING | DOUBLE_QUOTE_STRING );", 5, 0, input);
+
+ throw nvae;
+ }
+ switch (alt5) {
+ case 1 :
+ // XPath10__.g:505:11: SINGLE_QUOTE_STRING
+ {
+ mSINGLE_QUOTE_STRING();
+
+ }
+ break;
+ case 2 :
+ // XPath10__.g:505:33: DOUBLE_QUOTE_STRING
+ {
+ mDOUBLE_QUOTE_STRING();
+
+ }
+ break;
+
+ }
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end LITERAL
+
+ // $ANTLR start NUMBER
+ public final void mNUMBER() throws RecognitionException {
+ try {
+ int _type = NUMBER;
+ // XPath10__.g:507:8: ( ( DIGITS ) ( '.' DIGITS )? | '.' DIGITS )
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( ((LA7_0>='0' && LA7_0<='9')) ) {
+ alt7=1;
+ }
+ else if ( (LA7_0=='.') ) {
+ alt7=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("507:1: NUMBER : ( ( DIGITS ) ( '.' DIGITS )? | '.' DIGITS );", 7, 0, input);
+
+ throw nvae;
+ }
+ switch (alt7) {
+ case 1 :
+ // XPath10__.g:507:10: ( DIGITS ) ( '.' DIGITS )?
+ {
+ // XPath10__.g:507:10: ( DIGITS )
+ // XPath10__.g:507:11: DIGITS
+ {
+ mDIGITS();
+
+ }
+
+ // XPath10__.g:507:19: ( '.' DIGITS )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='.') ) {
+ alt6=1;
+ }
+ switch (alt6) {
+ case 1 :
+ // XPath10__.g:507:20: '.' DIGITS
+ {
+ match('.');
+ mDIGITS();
+
+ }
+ break;
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // XPath10__.g:507:34: '.' DIGITS
+ {
+ match('.');
+ mDIGITS();
+
+ }
+ break;
+
+ }
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end NUMBER
+
+ // $ANTLR start IDENTIFIER
+ public final void mIDENTIFIER() throws RecognitionException {
+ try {
+ int _type = IDENTIFIER;
+ // XPath10__.g:509:12: ( ( '\\u0241' .. '\\u0377' | 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( '\\u0241' .. '\\u0377' | 'a' .. 'z' | 'A' .. 'Z' | '-' | '_' | '0' .. '9' | '.' )* )
+ // XPath10__.g:510:3: ( '\\u0241' .. '\\u0377' | 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( '\\u0241' .. '\\u0377' | 'a' .. 'z' | 'A' .. 'Z' | '-' | '_' | '0' .. '9' | '.' )*
+ {
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u0241' && input.LA(1)<='\u0377') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+ // XPath10__.g:510:46: ( '\\u0241' .. '\\u0377' | 'a' .. 'z' | 'A' .. 'Z' | '-' | '_' | '0' .. '9' | '.' )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>='-' && LA8_0<='.')||(LA8_0>='0' && LA8_0<='9')||(LA8_0>='A' && LA8_0<='Z')||LA8_0=='_'||(LA8_0>='a' && LA8_0<='z')||(LA8_0>='\u0241' && LA8_0<='\u0377')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // XPath10__.g:
+ {
+ if ( (input.LA(1)>='-' && input.LA(1)<='.')||(input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u0241' && input.LA(1)<='\u0377') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end IDENTIFIER
+
+ public void mTokens() throws RecognitionException {
+ // XPath10__.g:1:8: ( OR | AND | MOD | DIV | LPAREN | RPAREN | LBRACKET | RBRACKET | PIPE | DOT | DOT2 | AT | COMMA | COLON2 | COLON | SLASH | SLASH2 | DOLLAR | PLUS | MINUS | EQ | NE | LT | LTE | GT | GTE | STAR | WS | LITERAL | NUMBER | IDENTIFIER )
+ int alt9=31;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='o') ) {
+ int LA9_1 = input.LA(2);
+
+ if ( (LA9_1=='r') ) {
+ int LA9_27 = input.LA(3);
+
+ if ( ((LA9_27>='-' && LA9_27<='.')||(LA9_27>='0' && LA9_27<='9')||(LA9_27>='A' && LA9_27<='Z')||LA9_27=='_'||(LA9_27>='a' && LA9_27<='z')||(LA9_27>='\u0241' && LA9_27<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ alt9=1;}
+ }
+ else {
+ alt9=31;}
+ }
+ else if ( (LA9_0=='a') ) {
+ int LA9_2 = input.LA(2);
+
+ if ( (LA9_2=='n') ) {
+ int LA9_28 = input.LA(3);
+
+ if ( (LA9_28=='d') ) {
+ int LA9_42 = input.LA(4);
+
+ if ( ((LA9_42>='-' && LA9_42<='.')||(LA9_42>='0' && LA9_42<='9')||(LA9_42>='A' && LA9_42<='Z')||LA9_42=='_'||(LA9_42>='a' && LA9_42<='z')||(LA9_42>='\u0241' && LA9_42<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ alt9=2;}
+ }
+ else {
+ alt9=31;}
+ }
+ else {
+ alt9=31;}
+ }
+ else if ( (LA9_0=='m') ) {
+ int LA9_3 = input.LA(2);
+
+ if ( (LA9_3=='o') ) {
+ int LA9_29 = input.LA(3);
+
+ if ( (LA9_29=='d') ) {
+ int LA9_43 = input.LA(4);
+
+ if ( ((LA9_43>='-' && LA9_43<='.')||(LA9_43>='0' && LA9_43<='9')||(LA9_43>='A' && LA9_43<='Z')||LA9_43=='_'||(LA9_43>='a' && LA9_43<='z')||(LA9_43>='\u0241' && LA9_43<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ alt9=3;}
+ }
+ else {
+ alt9=31;}
+ }
+ else {
+ alt9=31;}
+ }
+ else if ( (LA9_0=='d') ) {
+ int LA9_4 = input.LA(2);
+
+ if ( (LA9_4=='i') ) {
+ int LA9_30 = input.LA(3);
+
+ if ( (LA9_30=='v') ) {
+ int LA9_44 = input.LA(4);
+
+ if ( ((LA9_44>='-' && LA9_44<='.')||(LA9_44>='0' && LA9_44<='9')||(LA9_44>='A' && LA9_44<='Z')||LA9_44=='_'||(LA9_44>='a' && LA9_44<='z')||(LA9_44>='\u0241' && LA9_44<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ alt9=4;}
+ }
+ else {
+ alt9=31;}
+ }
+ else {
+ alt9=31;}
+ }
+ else if ( (LA9_0=='(') ) {
+ alt9=5;
+ }
+ else if ( (LA9_0==')') ) {
+ alt9=6;
+ }
+ else if ( (LA9_0=='[') ) {
+ alt9=7;
+ }
+ else if ( (LA9_0==']') ) {
+ alt9=8;
+ }
+ else if ( (LA9_0=='|') ) {
+ alt9=9;
+ }
+ else if ( (LA9_0=='.') ) {
+ switch ( input.LA(2) ) {
+ case '.':
+ {
+ alt9=11;
+ }
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ {
+ alt9=30;
+ }
+ break;
+ default:
+ alt9=10;}
+
+ }
+ else if ( (LA9_0=='@') ) {
+ alt9=12;
+ }
+ else if ( (LA9_0==',') ) {
+ alt9=13;
+ }
+ else if ( (LA9_0==':') ) {
+ int LA9_13 = input.LA(2);
+
+ if ( (LA9_13==':') ) {
+ alt9=14;
+ }
+ else {
+ alt9=15;}
+ }
+ else if ( (LA9_0=='/') ) {
+ int LA9_14 = input.LA(2);
+
+ if ( (LA9_14=='/') ) {
+ alt9=17;
+ }
+ else {
+ alt9=16;}
+ }
+ else if ( (LA9_0=='$') ) {
+ alt9=18;
+ }
+ else if ( (LA9_0=='+') ) {
+ alt9=19;
+ }
+ else if ( (LA9_0=='-') ) {
+ alt9=20;
+ }
+ else if ( (LA9_0=='=') ) {
+ alt9=21;
+ }
+ else if ( (LA9_0=='!') ) {
+ alt9=22;
+ }
+ else if ( (LA9_0=='<') ) {
+ int LA9_20 = input.LA(2);
+
+ if ( (LA9_20=='=') ) {
+ alt9=24;
+ }
+ else {
+ alt9=23;}
+ }
+ else if ( (LA9_0=='>') ) {
+ int LA9_21 = input.LA(2);
+
+ if ( (LA9_21=='=') ) {
+ alt9=26;
+ }
+ else {
+ alt9=25;}
+ }
+ else if ( (LA9_0=='*') ) {
+ alt9=27;
+ }
+ else if ( ((LA9_0>='\t' && LA9_0<='\n')||LA9_0=='\r'||LA9_0==' ') ) {
+ alt9=28;
+ }
+ else if ( (LA9_0=='\"'||LA9_0=='\'') ) {
+ alt9=29;
+ }
+ else if ( ((LA9_0>='0' && LA9_0<='9')) ) {
+ alt9=30;
+ }
+ else if ( ((LA9_0>='A' && LA9_0<='Z')||LA9_0=='_'||(LA9_0>='b' && LA9_0<='c')||(LA9_0>='e' && LA9_0<='l')||LA9_0=='n'||(LA9_0>='p' && LA9_0<='z')||(LA9_0>='\u0241' && LA9_0<='\u0377')) ) {
+ alt9=31;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( OR | AND | MOD | DIV | LPAREN | RPAREN | LBRACKET | RBRACKET | PIPE | DOT | DOT2 | AT | COMMA | COLON2 | COLON | SLASH | SLASH2 | DOLLAR | PLUS | MINUS | EQ | NE | LT | LTE | GT | GTE | STAR | WS | LITERAL | NUMBER | IDENTIFIER );", 9, 0, input);
+
+ throw nvae;
+ }
+ switch (alt9) {
+ case 1 :
+ // XPath10__.g:1:10: OR
+ {
+ mOR();
+
+ }
+ break;
+ case 2 :
+ // XPath10__.g:1:13: AND
+ {
+ mAND();
+
+ }
+ break;
+ case 3 :
+ // XPath10__.g:1:17: MOD
+ {
+ mMOD();
+
+ }
+ break;
+ case 4 :
+ // XPath10__.g:1:21: DIV
+ {
+ mDIV();
+
+ }
+ break;
+ case 5 :
+ // XPath10__.g:1:25: LPAREN
+ {
+ mLPAREN();
+
+ }
+ break;
+ case 6 :
+ // XPath10__.g:1:32: RPAREN
+ {
+ mRPAREN();
+
+ }
+ break;
+ case 7 :
+ // XPath10__.g:1:39: LBRACKET
+ {
+ mLBRACKET();
+
+ }
+ break;
+ case 8 :
+ // XPath10__.g:1:48: RBRACKET
+ {
+ mRBRACKET();
+
+ }
+ break;
+ case 9 :
+ // XPath10__.g:1:57: PIPE
+ {
+ mPIPE();
+
+ }
+ break;
+ case 10 :
+ // XPath10__.g:1:62: DOT
+ {
+ mDOT();
+
+ }
+ break;
+ case 11 :
+ // XPath10__.g:1:66: DOT2
+ {
+ mDOT2();
+
+ }
+ break;
+ case 12 :
+ // XPath10__.g:1:71: AT
+ {
+ mAT();
+
+ }
+ break;
+ case 13 :
+ // XPath10__.g:1:74: COMMA
+ {
+ mCOMMA();
+
+ }
+ break;
+ case 14 :
+ // XPath10__.g:1:80: COLON2
+ {
+ mCOLON2();
+
+ }
+ break;
+ case 15 :
+ // XPath10__.g:1:87: COLON
+ {
+ mCOLON();
+
+ }
+ break;
+ case 16 :
+ // XPath10__.g:1:93: SLASH
+ {
+ mSLASH();
+
+ }
+ break;
+ case 17 :
+ // XPath10__.g:1:99: SLASH2
+ {
+ mSLASH2();
+
+ }
+ break;
+ case 18 :
+ // XPath10__.g:1:106: DOLLAR
+ {
+ mDOLLAR();
+
+ }
+ break;
+ case 19 :
+ // XPath10__.g:1:113: PLUS
+ {
+ mPLUS();
+
+ }
+ break;
+ case 20 :
+ // XPath10__.g:1:118: MINUS
+ {
+ mMINUS();
+
+ }
+ break;
+ case 21 :
+ // XPath10__.g:1:124: EQ
+ {
+ mEQ();
+
+ }
+ break;
+ case 22 :
+ // XPath10__.g:1:127: NE
+ {
+ mNE();
+
+ }
+ break;
+ case 23 :
+ // XPath10__.g:1:130: LT
+ {
+ mLT();
+
+ }
+ break;
+ case 24 :
+ // XPath10__.g:1:133: LTE
+ {
+ mLTE();
+
+ }
+ break;
+ case 25 :
+ // XPath10__.g:1:137: GT
+ {
+ mGT();
+
+ }
+ break;
+ case 26 :
+ // XPath10__.g:1:140: GTE
+ {
+ mGTE();
+
+ }
+ break;
+ case 27 :
+ // XPath10__.g:1:144: STAR
+ {
+ mSTAR();
+
+ }
+ break;
+ case 28 :
+ // XPath10__.g:1:149: WS
+ {
+ mWS();
+
+ }
+ break;
+ case 29 :
+ // XPath10__.g:1:152: LITERAL
+ {
+ mLITERAL();
+
+ }
+ break;
+ case 30 :
+ // XPath10__.g:1:160: NUMBER
+ {
+ mNUMBER();
+
+ }
+ break;
+ case 31 :
+ // XPath10__.g:1:167: IDENTIFIER
+ {
+ mIDENTIFIER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+
+
+}
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Parser.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Parser.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10Parser.java 2011-02-17 23:16:35 UTC (rev 29226)
@@ -0,0 +1,5843 @@
+// $ANTLR 3.0.1 /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g 2008-06-23 18:23:26
+
+ package org.eclipse.bpel.xpath10.parser;
+ import org.eclipse.bpel.xpath10.*;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+
+import org.antlr.runtime.tree.*;
+
+public class XPath10Parser extends Parser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "OR", "AND", "MOD", "DIV", "LPAREN", "RPAREN", "LBRACKET", "RBRACKET", "PIPE", "DOT", "DOT2", "AT", "COMMA", "COLON2", "COLON", "SLASH", "SLASH2", "DOLLAR", "PLUS", "MINUS", "EQ", "NE", "LT", "LTE", "GT", "GTE", "STAR", "Args", "IDENTIFIER", "LITERAL", "NUMBER", "WS", "DIGITS", "SINGLE_QUOTE_STRING", "DOUBLE_QUOTE_STRING"
+ };
+ public static final int DOLLAR=21;
+ public static final int LT=26;
+ public static final int STAR=30;
+ public static final int SLASH2=20;
+ public static final int MOD=6;
+ public static final int DIGITS=36;
+ public static final int GTE=29;
+ public static final int NUMBER=34;
+ public static final int Args=31;
+ public static final int LITERAL=33;
+ public static final int MINUS=23;
+ public static final int AND=5;
+ public static final int EOF=-1;
+ public static final int LTE=27;
+ public static final int LPAREN=8;
+ public static final int LBRACKET=10;
+ public static final int AT=15;
+ public static final int COLON=18;
+ public static final int RPAREN=9;
+ public static final int SINGLE_QUOTE_STRING=37;
+ public static final int WS=35;
+ public static final int SLASH=19;
+ public static final int DOUBLE_QUOTE_STRING=38;
+ public static final int COMMA=16;
+ public static final int IDENTIFIER=32;
+ public static final int OR=4;
+ public static final int GT=28;
+ public static final int PLUS=22;
+ public static final int PIPE=12;
+ public static final int DOT2=14;
+ public static final int EQ=24;
+ public static final int DIV=7;
+ public static final int RBRACKET=11;
+ public static final int DOT=13;
+ public static final int COLON2=17;
+ public static final int NE=25;
+
+ public XPath10Parser(TokenStream input) {
+ super(input);
+ ruleMemo = new HashMap[33+1];
+ }
+
+ protected TreeAdaptor adaptor = new CommonTreeAdaptor();
+
+ public void setTreeAdaptor(TreeAdaptor adaptor) {
+ this.adaptor = adaptor;
+ }
+ public TreeAdaptor getTreeAdaptor() {
+ return adaptor;
+ }
+
+ public String[] getTokenNames() { return tokenNames; }
+ public String getGrammarFileName() { return "/org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g"; }
+
+
+
+ boolean isNodeNodeName (String node) {
+ return "node".equals(node);
+ }
+ boolean isTextNodeName (String node) {
+ return "text".equals(node);
+ }
+ boolean isCommentNodeName (String node) {
+ return "comment".equals(node);
+ }
+ boolean isProcessingInstructionNodeName (String node) {
+ return "processing-instruction".equals(node);
+ }
+
+ static int positionOf (Token token, boolean start) {
+ if (token instanceof CommonToken) {
+ CommonToken t = (CommonToken)token;
+ if (start) {
+ return t.getStartIndex();
+ }
+ return t.getStopIndex();
+ }
+ return -1;
+ }
+
+ static int positionOfIfUnset (Token token, boolean start, int currentValue) {
+ if (currentValue < 0) {
+ return positionOf(token,start);
+ }
+ return currentValue;
+ }
+
+ public void displayRecognitionError(String[] tokenNames, RecognitionException re)
+ {
+ String msg = getErrorMessage(re, tokenNames);
+ // we don't recover
+ throw new XPath10Exception(msg,re.getCause(),re.index);
+ }
+
+
+
+ public static class xpath_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start xpath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:109:0: xpath returns [Expr result] : e= unionExpr ;
+ public final xpath_return xpath() throws RecognitionException {
+ xpath_return retval = new xpath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ unionExpr_return e = null;
+
+
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:110:3: (e= unionExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:110:5: e= unionExpr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_unionExpr_in_xpath742);
+ e=unionExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end xpath
+
+ public static class locationPath_return extends ParserRuleReturnScope {
+ public LocationPath result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start locationPath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:114:0: locationPath returns [LocationPath result] : (aloc= absoluteLocationPath | rloc= relativeLocationPath );
+ public final locationPath_return locationPath() throws RecognitionException {
+ locationPath_return retval = new locationPath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ absoluteLocationPath_return aloc = null;
+
+ relativeLocationPath_return rloc = null;
+
+
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:114:43: (aloc= absoluteLocationPath | rloc= relativeLocationPath )
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>=SLASH && LA1_0<=SLASH2)) ) {
+ alt1=1;
+ }
+ else if ( ((LA1_0>=DOT && LA1_0<=AT)||LA1_0==STAR||LA1_0==IDENTIFIER) ) {
+ alt1=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("114:0: locationPath returns [LocationPath result] : (aloc= absoluteLocationPath | rloc= relativeLocationPath );", 1, 0, input);
+
+ throw nvae;
+ }
+ switch (alt1) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:115:2: aloc= absoluteLocationPath
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_absoluteLocationPath_in_locationPath769);
+ aloc=absoluteLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, aloc.getTree());
+ if ( backtracking==0 ) {
+ retval.result =aloc.result;
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:117:4: rloc= relativeLocationPath
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_relativeLocationPath_in_locationPath781);
+ rloc=relativeLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, rloc.getTree());
+ if ( backtracking==0 ) {
+ retval.result =rloc.result;
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end locationPath
+
+ public static class absoluteLocationPath_return extends ParserRuleReturnScope {
+ public LocationPath result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start absoluteLocationPath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:121:0: absoluteLocationPath returns [LocationPath result] : (op= SLASH2 | op= SLASH ) ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | ) ;
+ public final absoluteLocationPath_return absoluteLocationPath() throws RecognitionException {
+ absoluteLocationPath_return retval = new absoluteLocationPath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ i_relativeLocationPath_return loc = null;
+
+
+ Object op_tree=null;
+
+
+ Step ans = null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:124:3: ( (op= SLASH2 | op= SLASH ) ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | ) )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:125:3: (op= SLASH2 | op= SLASH ) ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:125:3: (op= SLASH2 | op= SLASH )
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==SLASH2) ) {
+ alt2=1;
+ }
+ else if ( (LA2_0==SLASH) ) {
+ alt2=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("125:3: (op= SLASH2 | op= SLASH )", 2, 0, input);
+
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:125:4: op= SLASH2
+ {
+ op=(Token)input.LT(1);
+ match(input,SLASH2,FOLLOW_SLASH2_in_absoluteLocationPath811); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+
+ ans=new AllNodeStep(Axis.DESCENDANT_OR_SELF);
+ ans.setPosition(positionOf(op,true),positionOf(op,false));
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:127:73: op= SLASH
+ {
+ op=(Token)input.LT(1);
+ match(input,SLASH,FOLLOW_SLASH_in_absoluteLocationPath820); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==IDENTIFIER) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_0==AT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_0==STAR) ) {
+ int LA3_3 = input.LA(2);
+
+ if ( (LA3_3==LBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==SLASH2) ) {
+ switch ( input.LA(3) ) {
+ case IDENTIFIER:
+ {
+ int LA3_52 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 52, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_53 = input.LA(4);
+
+ if ( (LA3_53==IDENTIFIER) ) {
+ int LA3_158 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 158, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_53==STAR) ) {
+ int LA3_159 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 159, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 53, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_54 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 54, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_55 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 55, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_56 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 56, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case OR:
+ case AND:
+ case MOD:
+ case DIV:
+ case RPAREN:
+ case RBRACKET:
+ case PIPE:
+ case COMMA:
+ case PLUS:
+ case MINUS:
+ case EQ:
+ case NE:
+ case LT:
+ case LTE:
+ case GT:
+ case GTE:
+ {
+ alt3=2;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 24, input);
+
+ throw nvae;
+ }
+
+ }
+ else if ( (LA3_3==SLASH) ) {
+ switch ( input.LA(3) ) {
+ case IDENTIFIER:
+ {
+ int LA3_73 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 73, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_74 = input.LA(4);
+
+ if ( (LA3_74==IDENTIFIER) ) {
+ int LA3_255 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 255, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_74==STAR) ) {
+ int LA3_256 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 256, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 74, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_75 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 75, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_76 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 76, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_77 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 77, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case OR:
+ case AND:
+ case MOD:
+ case DIV:
+ case RPAREN:
+ case RBRACKET:
+ case PIPE:
+ case COMMA:
+ case PLUS:
+ case MINUS:
+ case EQ:
+ case NE:
+ case LT:
+ case LTE:
+ case GT:
+ case GTE:
+ {
+ alt3=2;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 25, input);
+
+ throw nvae;
+ }
+
+ }
+ else if ( (LA3_3==PIPE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==EOF) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==STAR) ) {
+ int LA3_28 = input.LA(3);
+
+ if ( ((LA3_28>=OR && LA3_28<=DIV)||(LA3_28>=RPAREN && LA3_28<=PIPE)||LA3_28==COMMA||LA3_28==PLUS||(LA3_28>=EQ && LA3_28<=GTE)) ) {
+ alt3=2;
+ }
+ else if ( (LA3_28==SLASH2) ) {
+ int LA3_95 = input.LA(4);
+
+ if ( (LA3_95==IDENTIFIER) ) {
+ int LA3_328 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 328, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==AT) ) {
+ int LA3_329 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 329, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==STAR) ) {
+ int LA3_330 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 330, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==DOT) ) {
+ int LA3_331 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 331, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==DOT2) ) {
+ int LA3_332 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 332, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_95==PIPE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==PLUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==MINUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==LT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==GT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==LTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==GTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==EQ) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==NE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==AND) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==OR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==RBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==RPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==COMMA) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==DIV) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_95==MOD) && (synpred1())) {
+ alt3=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 95, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_28==SLASH) ) {
+ int LA3_96 = input.LA(4);
+
+ if ( (LA3_96==IDENTIFIER) ) {
+ int LA3_349 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 349, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==AT) ) {
+ int LA3_350 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 350, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==STAR) ) {
+ int LA3_351 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 351, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==DOT) ) {
+ int LA3_352 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 352, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==DOT2) ) {
+ int LA3_353 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 353, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_96==PIPE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==PLUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==MINUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==LT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==GT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==LTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==GTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==EQ) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==NE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==AND) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==OR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==RBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==RPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==COMMA) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==DIV) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_96==MOD) && (synpred1())) {
+ alt3=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 96, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_28==MINUS) ) {
+ switch ( input.LA(4) ) {
+ case SLASH2:
+ {
+ int LA3_370 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 370, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case SLASH:
+ {
+ int LA3_371 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 371, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA3_372 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 372, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_373 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 373, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_374 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 374, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_375 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 375, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_376 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 376, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOLLAR:
+ {
+ int LA3_377 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 377, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ int LA3_378 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 378, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LITERAL:
+ {
+ int LA3_379 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 379, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case NUMBER:
+ {
+ int LA3_380 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 380, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case MINUS:
+ {
+ int LA3_381 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 381, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 99, input);
+
+ throw nvae;
+ }
+
+ }
+ else if ( (LA3_28==STAR) ) {
+ int LA3_111 = input.LA(4);
+
+ if ( (LA3_111==LBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==SLASH2) ) {
+ int LA3_383 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 383, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_111==SLASH) ) {
+ int LA3_384 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 384, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_111==PIPE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==PLUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==MINUS) ) {
+ int LA3_387 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 387, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_111==LT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==GT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==LTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==GTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==EQ) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==NE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==AND) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==OR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==RBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==RPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==COMMA) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==STAR) ) {
+ int LA3_399 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 399, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_111==DIV) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==MOD) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_111==LPAREN||(LA3_111>=DOT && LA3_111<=AT)||LA3_111==DOLLAR||(LA3_111>=IDENTIFIER && LA3_111<=NUMBER)) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 111, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_28==IDENTIFIER) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==AT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==DOT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==DOT2) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==DOLLAR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==LPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==LITERAL) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_28==NUMBER) && (synpred1())) {
+ alt3=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 28, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_3==DIV) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==MOD) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==PLUS) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==MINUS) ) {
+ switch ( input.LA(3) ) {
+ case SLASH2:
+ {
+ int LA3_122 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 122, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case SLASH:
+ {
+ int LA3_123 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 123, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA3_124 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 124, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_125 = input.LA(4);
+
+ if ( (LA3_125==IDENTIFIER) ) {
+ int LA3_475 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 475, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_125==STAR) ) {
+ int LA3_476 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 476, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 125, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_126 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 126, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_127 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 127, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_128 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 128, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOLLAR:
+ {
+ int LA3_129 = input.LA(4);
+
+ if ( (LA3_129==IDENTIFIER) ) {
+ int LA3_537 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 537, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 129, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ switch ( input.LA(4) ) {
+ case SLASH2:
+ {
+ int LA3_538 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 538, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case SLASH:
+ {
+ int LA3_539 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 539, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA3_540 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 540, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_541 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 541, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_542 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 542, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_543 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 543, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_544 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 544, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOLLAR:
+ {
+ int LA3_545 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 545, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ int LA3_546 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 546, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LITERAL:
+ {
+ int LA3_547 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 547, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case NUMBER:
+ {
+ int LA3_548 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 548, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case MINUS:
+ {
+ int LA3_549 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 549, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 130, input);
+
+ throw nvae;
+ }
+
+ }
+ break;
+ case LITERAL:
+ {
+ int LA3_131 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 131, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case NUMBER:
+ {
+ int LA3_132 = input.LA(4);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 132, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case MINUS:
+ {
+ switch ( input.LA(4) ) {
+ case SLASH2:
+ {
+ int LA3_590 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 590, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case SLASH:
+ {
+ int LA3_591 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 591, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA3_592 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 592, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case AT:
+ {
+ int LA3_593 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 593, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case STAR:
+ {
+ int LA3_594 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 594, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT:
+ {
+ int LA3_595 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 595, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOT2:
+ {
+ int LA3_596 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 596, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case DOLLAR:
+ {
+ int LA3_597 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 597, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ int LA3_598 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 598, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LITERAL:
+ {
+ int LA3_599 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 599, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case NUMBER:
+ {
+ int LA3_600 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 600, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case MINUS:
+ {
+ int LA3_601 = input.LA(5);
+
+ if ( (synpred1()) ) {
+ alt3=1;
+ }
+ else if ( (true) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 601, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 133, input);
+
+ throw nvae;
+ }
+
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 32, input);
+
+ throw nvae;
+ }
+
+ }
+ else if ( (LA3_3==LT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==GT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==LTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==GTE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==EQ) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==NE) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==AND) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==OR) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==RBRACKET) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==RPAREN) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==COMMA) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_3==LPAREN||(LA3_3>=DOT && LA3_3<=AT)||LA3_3==DOLLAR||(LA3_3>=IDENTIFIER && LA3_3<=NUMBER)) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 3, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA3_0==DOT) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_0==DOT2) && (synpred1())) {
+ alt3=1;
+ }
+ else if ( (LA3_0==EOF||(LA3_0>=OR && LA3_0<=DIV)||LA3_0==RPAREN||(LA3_0>=RBRACKET && LA3_0<=PIPE)||LA3_0==COMMA||(LA3_0>=PLUS && LA3_0<=GTE)) ) {
+ alt3=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("129:7: ( ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath | )", 3, 0, input);
+
+ throw nvae;
+ }
+ switch (alt3) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:129:9: ( AT | STAR | IDENTIFIER )=>loc= i_relativeLocationPath
+ {
+ pushFollow(FOLLOW_i_relativeLocationPath_in_absoluteLocationPath853);
+ loc=i_relativeLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, loc.getTree());
+ if ( backtracking==0 ) {
+ retval.result = loc.result;
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:129:88:
+ {
+ if ( backtracking==0 ) {
+ retval.result = new LocationPath(true);
+ }
+
+ }
+ break;
+
+ }
+
+ if ( backtracking==0 ) {
+ if (retval.result != null) {
+ if (ans != null) { retval.result.addFirstStep(ans); }
+ retval.result.setIsAbsolute(true);
+ }
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end absoluteLocationPath
+
+ public static class relativeLocationPath_return extends ParserRuleReturnScope {
+ public LocationPath result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start relativeLocationPath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:137:0: relativeLocationPath returns [LocationPath result] : e= i_relativeLocationPath ;
+ public final relativeLocationPath_return relativeLocationPath() throws RecognitionException {
+ relativeLocationPath_return retval = new relativeLocationPath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ i_relativeLocationPath_return e = null;
+
+
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:137:51: (e= i_relativeLocationPath )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:138:3: e= i_relativeLocationPath
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_i_relativeLocationPath_in_relativeLocationPath898);
+ e=i_relativeLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end relativeLocationPath
+
+ public static class i_relativeLocationPath_return extends ParserRuleReturnScope {
+ public LocationPath result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start i_relativeLocationPath
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:142:0: i_relativeLocationPath returns [LocationPath result] : s1= step ( (op= SLASH2 | SLASH ) s2= step )* ;
+ public final i_relativeLocationPath_return i_relativeLocationPath() throws RecognitionException {
+ i_relativeLocationPath_return retval = new i_relativeLocationPath_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ Token SLASH1=null;
+ step_return s1 = null;
+
+ step_return s2 = null;
+
+
+ Object op_tree=null;
+ Object SLASH1_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:142:53: (s1= step ( (op= SLASH2 | SLASH ) s2= step )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:143:4: s1= step ( (op= SLASH2 | SLASH ) s2= step )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_step_in_i_relativeLocationPath926);
+ s1=step();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, s1.getTree());
+ if ( backtracking==0 ) {
+ retval.result =new LocationPath(false, s1.result);
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:144:7: ( (op= SLASH2 | SLASH ) s2= step )*
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( ((LA5_0>=SLASH && LA5_0<=SLASH2)) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:144:9: (op= SLASH2 | SLASH ) s2= step
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:144:9: (op= SLASH2 | SLASH )
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==SLASH2) ) {
+ alt4=1;
+ }
+ else if ( (LA4_0==SLASH) ) {
+ alt4=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("144:9: (op= SLASH2 | SLASH )", 4, 0, input);
+
+ throw nvae;
+ }
+ switch (alt4) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:144:10: op= SLASH2
+ {
+ op=(Token)input.LT(1);
+ match(input,SLASH2,FOLLOW_SLASH2_in_i_relativeLocationPath941); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ adaptor.addChild(root_0, op_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.result.addStep(new AllNodeStep(Axis.DESCENDANT_OR_SELF));
+ retval.result.setPosition(positionOf(op,true),positionOf(op,false));
+
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:146:23: SLASH
+ {
+ SLASH1=(Token)input.LT(1);
+ match(input,SLASH,FOLLOW_SLASH_in_i_relativeLocationPath946); if (failed) return retval;
+ if ( backtracking==0 ) {
+ SLASH1_tree = (Object)adaptor.create(SLASH1);
+ adaptor.addChild(root_0, SLASH1_tree);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_step_in_i_relativeLocationPath952);
+ s2=step();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, s2.getTree());
+ if ( backtracking==0 ) {
+ retval.result.addStep(s2.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end i_relativeLocationPath
+
+ public static class step_return extends ParserRuleReturnScope {
+ public Step result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start step
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:154:0: step returns [Step result] : ( ( ( ( IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep ) (p= predicate )* ) | as= abbrStep (p= predicate )* );
+ public final step_return step() throws RecognitionException {
+ step_return retval = new step_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token ns=null;
+ Token id=null;
+ Token COLON3=null;
+ specialStep_return ss = null;
+
+ predicate_return p = null;
+
+ abbrStep_return as = null;
+
+ axis_return axis2 = null;
+
+
+ Object ns_tree=null;
+ Object id_tree=null;
+ Object COLON3_tree=null;
+
+
+ // default axis, per XPath spec.
+ int anAxis = Axis.CHILD;
+ int posStart = -1;
+ String aNs = null;
+
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:161:4: ( ( ( ( IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep ) (p= predicate )* ) | as= abbrStep (p= predicate )* )
+ int alt12=2;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0==AT||LA12_0==STAR||LA12_0==IDENTIFIER) ) {
+ alt12=1;
+ }
+ else if ( ((LA12_0>=DOT && LA12_0<=DOT2)) ) {
+ alt12=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("154:0: step returns [Step result] : ( ( ( ( IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep ) (p= predicate )* ) | as= abbrStep (p= predicate )* );", 12, 0, input);
+
+ throw nvae;
+ }
+ switch (alt12) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:162:3: ( ( ( IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep ) (p= predicate )* )
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:162:3: ( ( ( IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep ) (p= predicate )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:4: ( ( IDENTIFIER COLON2 | AT )=> axis | ) ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep ) (p= predicate )*
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:4: ( ( IDENTIFIER COLON2 | AT )=> axis | )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==IDENTIFIER) ) {
+ int LA6_1 = input.LA(2);
+
+ if ( (LA6_1==EOF||(LA6_1>=OR && LA6_1<=PIPE)||LA6_1==COMMA||(LA6_1>=COLON && LA6_1<=SLASH2)||(LA6_1>=PLUS && LA6_1<=STAR)) ) {
+ alt6=2;
+ }
+ else if ( (LA6_1==COLON2) && (synpred2())) {
+ alt6=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("164:4: ( ( IDENTIFIER COLON2 | AT )=> axis | )", 6, 1, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA6_0==AT) && (synpred2())) {
+ alt6=1;
+ }
+ else if ( (LA6_0==STAR) ) {
+ alt6=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("164:4: ( ( IDENTIFIER COLON2 | AT )=> axis | )", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:6: ( IDENTIFIER COLON2 | AT )=> axis
+ {
+ pushFollow(FOLLOW_axis_in_step1015);
+ axis2=axis();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, axis2.getTree());
+ if ( backtracking==0 ) {
+ anAxis=axis2.axis; posStart = axis2.posStart;
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:124:
+ {
+ }
+ break;
+
+ }
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:166:4: ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep )
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==IDENTIFIER) ) {
+ int LA9_1 = input.LA(2);
+
+ if ( (LA9_1==LPAREN) ) {
+ alt9=2;
+ }
+ else if ( (LA9_1==EOF||(LA9_1>=OR && LA9_1<=DIV)||(LA9_1>=RPAREN && LA9_1<=PIPE)||LA9_1==COMMA||(LA9_1>=COLON && LA9_1<=SLASH2)||(LA9_1>=PLUS && LA9_1<=STAR)) ) {
+ alt9=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("166:4: ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep )", 9, 1, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA9_0==STAR) ) {
+ alt9=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("166:4: ( ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) ) | ss= specialStep )", 9, 0, input);
+
+ throw nvae;
+ }
+ switch (alt9) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:5: ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) )
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:5: ( (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR ) )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:7: (ns= IDENTIFIER COLON )? (id= IDENTIFIER | id= STAR )
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:7: (ns= IDENTIFIER COLON )?
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==IDENTIFIER) ) {
+ int LA7_1 = input.LA(2);
+
+ if ( (LA7_1==COLON) ) {
+ alt7=1;
+ }
+ }
+ switch (alt7) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:8: ns= IDENTIFIER COLON
+ {
+ ns=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_step1042); if (failed) return retval;
+ if ( backtracking==0 ) {
+ ns_tree = (Object)adaptor.create(ns);
+ adaptor.addChild(root_0, ns_tree);
+ }
+ COLON3=(Token)input.LT(1);
+ match(input,COLON,FOLLOW_COLON_in_step1044); if (failed) return retval;
+ if ( backtracking==0 ) {
+ COLON3_tree = (Object)adaptor.create(COLON3);
+ adaptor.addChild(root_0, COLON3_tree);
+ }
+ if ( backtracking==0 ) {
+ aNs=ns.getText(); posStart=positionOfIfUnset(ns,true,posStart);
+ }
+
+ }
+ break;
+
+ }
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:97: (id= IDENTIFIER | id= STAR )
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==IDENTIFIER) ) {
+ alt8=1;
+ }
+ else if ( (LA8_0==STAR) ) {
+ alt8=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("167:97: (id= IDENTIFIER | id= STAR )", 8, 0, input);
+
+ throw nvae;
+ }
+ switch (alt8) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:99: id= IDENTIFIER
+ {
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_step1056); if (failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ adaptor.addChild(root_0, id_tree);
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:167:113: id= STAR
+ {
+ id=(Token)input.LT(1);
+ match(input,STAR,FOLLOW_STAR_in_step1060); if (failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ adaptor.addChild(root_0, id_tree);
+ }
+
+ }
+ break;
+
+ }
+
+ if ( backtracking==0 ) {
+
+ retval.result = new NameStep(anAxis,aNs,id.getText());
+ retval.result.setPosition(positionOfIfUnset(id,true,posStart), positionOf(id,false));
+
+ }
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:173:5: ss= specialStep
+ {
+ pushFollow(FOLLOW_specialStep_in_step1081);
+ ss=specialStep();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, ss.getTree());
+ if ( backtracking==0 ) {
+ retval.result = ss.result; retval.result.setAxis(anAxis);
+ }
+
+ }
+ break;
+
+ }
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:175:6: (p= predicate )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0==LBRACKET) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:175:8: p= predicate
+ {
+ pushFollow(FOLLOW_predicate_in_step1099);
+ p=predicate();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, p.getTree());
+ if ( backtracking==0 ) {
+ retval.result.addPredicate(p.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:178:5: as= abbrStep (p= predicate )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_abbrStep_in_step1121);
+ as=abbrStep();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, as.getTree());
+ if ( backtracking==0 ) {
+
+ retval.result =as.result;
+ retval.result.setPosition(as.posStart,as.posEnd);
+
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:181:19: (p= predicate )*
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0==LBRACKET) ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:181:21: p= predicate
+ {
+ pushFollow(FOLLOW_predicate_in_step1130);
+ p=predicate();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, p.getTree());
+ if ( backtracking==0 ) {
+ retval.result.addPredicate(p.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop11;
+ }
+ } while (true);
+
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end step
+
+ public static class specialStep_return extends ParserRuleReturnScope {
+ public Step result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start specialStep
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:187:0: specialStep returns [Step result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN );
+ public final specialStep_return specialStep() throws RecognitionException {
+ specialStep_return retval = new specialStep_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token id=null;
+ Token pi=null;
+ Token rp=null;
+ Token LPAREN4=null;
+ Token LPAREN5=null;
+ Token LPAREN6=null;
+ Token LPAREN7=null;
+
+ Object id_tree=null;
+ Object pi_tree=null;
+ Object rp_tree=null;
+ Object LPAREN4_tree=null;
+ Object LPAREN5_tree=null;
+ Object LPAREN6_tree=null;
+ Object LPAREN7_tree=null;
+
+
+ String piID = null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:190:3: ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN )
+ int alt14=4;
+ int LA14_0 = input.LA(1);
+
+ if ( (LA14_0==IDENTIFIER) ) {
+ int LA14_1 = input.LA(2);
+
+ if ( (LA14_1==LPAREN) ) {
+ int LA14_2 = input.LA(3);
+
+ if ( (LA14_2==RPAREN) ) {
+ int LA14_3 = input.LA(4);
+
+ if ( ( isProcessingInstructionNodeName( input.LT(1).getText() ) ) ) {
+ alt14=1;
+ }
+ else if ( ( isCommentNodeName(input.LT(1).getText()) ) ) {
+ alt14=2;
+ }
+ else if ( ( isTextNodeName(input.LT(1).getText()) ) ) {
+ alt14=3;
+ }
+ else if ( ( isNodeNodeName(input.LT(1).getText()) ) ) {
+ alt14=4;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("187:0: specialStep returns [Step result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN );", 14, 3, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA14_2==IDENTIFIER) ) {
+ alt14=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("187:0: specialStep returns [Step result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN );", 14, 2, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("187:0: specialStep returns [Step result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN );", 14, 1, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("187:0: specialStep returns [Step result] : ({...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN | {...}?id= IDENTIFIER LPAREN rp= RPAREN );", 14, 0, input);
+
+ throw nvae;
+ }
+ switch (alt14) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:191:2: {...}?id= IDENTIFIER LPAREN (pi= IDENTIFIER )? rp= RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ if ( !( isProcessingInstructionNodeName( input.LT(1).getText() ) ) ) {
+ if (backtracking>0) {failed=true; return retval;}
+ throw new FailedPredicateException(input, "specialStep", "\tisProcessingInstructionNodeName( input.LT(1).getText() ) ");
+ }
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1167); if (failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ root_0 = (Object)adaptor.becomeRoot(id_tree, root_0);
+ }
+ LPAREN4=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_specialStep1170); if (failed) return retval;
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:192:27: (pi= IDENTIFIER )?
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( (LA13_0==IDENTIFIER) ) {
+ alt13=1;
+ }
+ switch (alt13) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:192:29: pi= IDENTIFIER
+ {
+ pi=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1177); if (failed) return retval;
+ if ( backtracking==0 ) {
+ pi_tree = (Object)adaptor.create(pi);
+ adaptor.addChild(root_0, pi_tree);
+ }
+ if ( backtracking==0 ) {
+ piID=pi.getText();
+ }
+
+ }
+ break;
+
+ }
+
+ rp=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_specialStep1186); if (failed) return retval;
+ if ( backtracking==0 ) {
+ retval.result = new ProcessingInstructionNodeStep(0, piID );
+ retval.result.setPosition(positionOf(id,true),positionOf(rp,false));
+
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:197:4: {...}?id= IDENTIFIER LPAREN rp= RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ if ( !( isCommentNodeName(input.LT(1).getText()) ) ) {
+ if (backtracking>0) {failed=true; return retval;}
+ throw new FailedPredicateException(input, "specialStep", " isCommentNodeName(input.LT(1).getText()) ");
+ }
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1215); if (failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ root_0 = (Object)adaptor.becomeRoot(id_tree, root_0);
+ }
+ LPAREN5=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_specialStep1218); if (failed) return retval;
+ rp=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_specialStep1223); if (failed) return retval;
+ if ( backtracking==0 ) {
+ retval.result = new CommentNodeStep(Axis.CHILD);
+ retval.result.setPosition(positionOf(id,true),positionOf(rp,false));
+
+ }
+
+ }
+ break;
+ case 3 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:202:4: {...}?id= IDENTIFIER LPAREN rp= RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ if ( !( isTextNodeName(input.LT(1).getText()) ) ) {
+ if (backtracking>0) {failed=true; return retval;}
+ throw new FailedPredicateException(input, "specialStep", " isTextNodeName(input.LT(1).getText()) ");
+ }
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1262); if (failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ root_0 = (Object)adaptor.becomeRoot(id_tree, root_0);
+ }
+ LPAREN6=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_specialStep1265); if (failed) return retval;
+ rp=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_specialStep1270); if (failed) return retval;
+ if ( backtracking==0 ) {
+ retval.result = new TextNodeStep(Axis.CHILD);
+ retval.result.setPosition(positionOf(id,true),positionOf(rp,false));
+
+ }
+
+ }
+ break;
+ case 4 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:207:4: {...}?id= IDENTIFIER LPAREN rp= RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ if ( !( isNodeNodeName(input.LT(1).getText()) ) ) {
+ if (backtracking>0) {failed=true; return retval;}
+ throw new FailedPredicateException(input, "specialStep", " isNodeNodeName(input.LT(1).getText()) ");
+ }
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_specialStep1302); if (failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ root_0 = (Object)adaptor.becomeRoot(id_tree, root_0);
+ }
+ LPAREN7=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_specialStep1305); if (failed) return retval;
+ rp=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_specialStep1310); if (failed) return retval;
+ if ( backtracking==0 ) {
+ retval.result = new AllNodeStep(Axis.CHILD);
+ retval.result.setPosition(positionOf(id,true),positionOf(rp,false));
+
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end specialStep
+
+ public static class axis_return extends ParserRuleReturnScope {
+ public int axis;
+ public int posStart;
+ public int posEnd;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start axis
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:214:0: axis returns [int axis, int posStart, int posEnd ] : (id= IDENTIFIER COLON2 | at= AT );
+ public final axis_return axis() throws RecognitionException {
+ axis_return retval = new axis_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token id=null;
+ Token at=null;
+ Token COLON28=null;
+
+ Object id_tree=null;
+ Object at_tree=null;
+ Object COLON28_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:214:51: (id= IDENTIFIER COLON2 | at= AT )
+ int alt15=2;
+ int LA15_0 = input.LA(1);
+
+ if ( (LA15_0==IDENTIFIER) ) {
+ alt15=1;
+ }
+ else if ( (LA15_0==AT) ) {
+ alt15=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("214:0: axis returns [int axis, int posStart, int posEnd ] : (id= IDENTIFIER COLON2 | at= AT );", 15, 0, input);
+
+ throw nvae;
+ }
+ switch (alt15) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:215:4: id= IDENTIFIER COLON2
+ {
+ root_0 = (Object)adaptor.nil();
+
+ id=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_axis1366); if (failed) return retval;
+ if ( backtracking==0 ) {
+ id_tree = (Object)adaptor.create(id);
+ adaptor.addChild(root_0, id_tree);
+ }
+ COLON28=(Token)input.LT(1);
+ match(input,COLON2,FOLLOW_COLON2_in_axis1368); if (failed) return retval;
+ if ( backtracking==0 ) {
+ COLON28_tree = (Object)adaptor.create(COLON28);
+ root_0 = (Object)adaptor.becomeRoot(COLON28_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+ retval.axis = Axis.getAxis( id.getText());
+ retval.posStart = positionOf(id,true);
+ retval.posEnd = positionOf(id,false);
+
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:220:6: at= AT
+ {
+ root_0 = (Object)adaptor.nil();
+
+ at=(Token)input.LT(1);
+ match(input,AT,FOLLOW_AT_in_axis1388); if (failed) return retval;
+ if ( backtracking==0 ) {
+ at_tree = (Object)adaptor.create(at);
+ adaptor.addChild(root_0, at_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.axis = Axis.ATTRIBUTE;
+ retval.posStart = positionOf(at,true);
+ retval.posEnd = positionOf(at,false);
+
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end axis
+
+ public static class predicate_return extends ParserRuleReturnScope {
+ public Predicate result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start predicate
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:235:0: predicate returns [Predicate result] : LBRACKET e= predicateExpr RBRACKET ;
+ public final predicate_return predicate() throws RecognitionException {
+ predicate_return retval = new predicate_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LBRACKET9=null;
+ Token RBRACKET10=null;
+ predicateExpr_return e = null;
+
+
+ Object LBRACKET9_tree=null;
+ Object RBRACKET10_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:235:37: ( LBRACKET e= predicateExpr RBRACKET )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:236:3: LBRACKET e= predicateExpr RBRACKET
+ {
+ root_0 = (Object)adaptor.nil();
+
+ LBRACKET9=(Token)input.LT(1);
+ match(input,LBRACKET,FOLLOW_LBRACKET_in_predicate1430); if (failed) return retval;
+ if ( backtracking==0 ) {
+ LBRACKET9_tree = (Object)adaptor.create(LBRACKET9);
+ root_0 = (Object)adaptor.becomeRoot(LBRACKET9_tree, root_0);
+ }
+ pushFollow(FOLLOW_predicateExpr_in_predicate1435);
+ e=predicateExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ RBRACKET10=(Token)input.LT(1);
+ match(input,RBRACKET,FOLLOW_RBRACKET_in_predicate1437); if (failed) return retval;
+ if ( backtracking==0 ) {
+ retval.result = e.result ;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end predicate
+
+ public static class predicateExpr_return extends ParserRuleReturnScope {
+ public Predicate result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start predicateExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:242:0: predicateExpr returns [Predicate result] : e= expr ;
+ public final predicateExpr_return predicateExpr() throws RecognitionException {
+ predicateExpr_return retval = new predicateExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ expr_return e = null;
+
+
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:243:3: (e= expr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:243:5: e= expr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_expr_in_predicateExpr1468);
+ e=expr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new Predicate(e.result) ;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end predicateExpr
+
+ public static class abbrStep_return extends ParserRuleReturnScope {
+ public Step result;
+ public int posStart;
+ public int posEnd;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start abbrStep
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:251:0: abbrStep returns [Step result, int posStart, int posEnd ] : (d= DOT | d= DOT2 );
+ public final abbrStep_return abbrStep() throws RecognitionException {
+ abbrStep_return retval = new abbrStep_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token d=null;
+
+ Object d_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:251:58: (d= DOT | d= DOT2 )
+ int alt16=2;
+ int LA16_0 = input.LA(1);
+
+ if ( (LA16_0==DOT) ) {
+ alt16=1;
+ }
+ else if ( (LA16_0==DOT2) ) {
+ alt16=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("251:0: abbrStep returns [Step result, int posStart, int posEnd ] : (d= DOT | d= DOT2 );", 16, 0, input);
+
+ throw nvae;
+ }
+ switch (alt16) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:252:4: d= DOT
+ {
+ root_0 = (Object)adaptor.nil();
+
+ d=(Token)input.LT(1);
+ match(input,DOT,FOLLOW_DOT_in_abbrStep1500); if (failed) return retval;
+ if ( backtracking==0 ) {
+ d_tree = (Object)adaptor.create(d);
+ adaptor.addChild(root_0, d_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.result = new AllNodeStep(Axis.SELF); retval.posStart = positionOf(d,true); retval.posEnd = retval.posStart+1;
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:253:4: d= DOT2
+ {
+ root_0 = (Object)adaptor.nil();
+
+ d=(Token)input.LT(1);
+ match(input,DOT2,FOLLOW_DOT2_in_abbrStep1513); if (failed) return retval;
+ if ( backtracking==0 ) {
+ d_tree = (Object)adaptor.create(d);
+ adaptor.addChild(root_0, d_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.result = new AllNodeStep(Axis.PARENT); retval.posStart = positionOf(d,true); retval.posEnd = retval.posStart+2;
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end abbrStep
+
+ public static class abbrAxisSpecifier_return extends ParserRuleReturnScope {
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start abbrAxisSpecifier
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:0: abbrAxisSpecifier : ( AT )? ;
+ public final abbrAxisSpecifier_return abbrAxisSpecifier() throws RecognitionException {
+ abbrAxisSpecifier_return retval = new abbrAxisSpecifier_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token AT11=null;
+
+ Object AT11_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:19: ( ( AT )? )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:21: ( AT )?
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:21: ( AT )?
+ int alt17=2;
+ int LA17_0 = input.LA(1);
+
+ if ( (LA17_0==AT) ) {
+ alt17=1;
+ }
+ switch (alt17) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:259:23: AT
+ {
+ AT11=(Token)input.LT(1);
+ match(input,AT,FOLLOW_AT_in_abbrAxisSpecifier1531); if (failed) return retval;
+ if ( backtracking==0 ) {
+ AT11_tree = (Object)adaptor.create(AT11);
+ adaptor.addChild(root_0, AT11_tree);
+ }
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end abbrAxisSpecifier
+
+ public static class expr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start expr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:274:0: expr returns [Expr result] : e= orExpr ;
+ public final expr_return expr() throws RecognitionException {
+ expr_return retval = new expr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ orExpr_return e = null;
+
+
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:275:3: (e= orExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:275:5: e= orExpr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_orExpr_in_expr1565);
+ e=orExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result ;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end expr
+
+ public static class primaryExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start primaryExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:281:0: primaryExpr returns [Expr result] : (varRef= variableReference | LPAREN exp= expr RPAREN | lit= literal | num= number | fn= functionCall );
+ public final primaryExpr_return primaryExpr() throws RecognitionException {
+ primaryExpr_return retval = new primaryExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LPAREN12=null;
+ Token RPAREN13=null;
+ variableReference_return varRef = null;
+
+ expr_return exp = null;
+
+ literal_return lit = null;
+
+ number_return num = null;
+
+ functionCall_return fn = null;
+
+
+ Object LPAREN12_tree=null;
+ Object RPAREN13_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:281:34: (varRef= variableReference | LPAREN exp= expr RPAREN | lit= literal | num= number | fn= functionCall )
+ int alt18=5;
+ switch ( input.LA(1) ) {
+ case DOLLAR:
+ {
+ alt18=1;
+ }
+ break;
+ case LPAREN:
+ {
+ alt18=2;
+ }
+ break;
+ case LITERAL:
+ {
+ alt18=3;
+ }
+ break;
+ case NUMBER:
+ {
+ alt18=4;
+ }
+ break;
+ case IDENTIFIER:
+ {
+ alt18=5;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("281:0: primaryExpr returns [Expr result] : (varRef= variableReference | LPAREN exp= expr RPAREN | lit= literal | num= number | fn= functionCall );", 18, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt18) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:282:4: varRef= variableReference
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_variableReference_in_primaryExpr1594);
+ varRef=variableReference();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, varRef.getTree());
+ if ( backtracking==0 ) {
+ retval.result = varRef.result ;
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:283:5: LPAREN exp= expr RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ LPAREN12=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_primaryExpr1611); if (failed) return retval;
+ pushFollow(FOLLOW_expr_in_primaryExpr1616);
+ exp=expr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, exp.getTree());
+ RPAREN13=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_primaryExpr1618); if (failed) return retval;
+ if ( backtracking==0 ) {
+ retval.result = exp.result; retval.result.setWrapParen(true);
+ }
+
+ }
+ break;
+ case 3 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:284:5: lit= literal
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_literal_in_primaryExpr1638);
+ lit=literal();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, lit.getTree());
+ if ( backtracking==0 ) {
+ retval.result = lit.result ;
+ }
+
+ }
+ break;
+ case 4 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:285:5: num= number
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_number_in_primaryExpr1670);
+ num=number();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, num.getTree());
+ if ( backtracking==0 ) {
+ retval.result = num.result ;
+ }
+
+ }
+ break;
+ case 5 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:286:5: fn= functionCall
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_functionCall_in_primaryExpr1703);
+ fn=functionCall();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, fn.getTree());
+ if ( backtracking==0 ) {
+ retval.result = fn.result ;
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end primaryExpr
+
+ public static class literal_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start literal
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:290:0: literal returns [Expr result] : lit= LITERAL ;
+ public final literal_return literal() throws RecognitionException {
+ literal_return retval = new literal_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token lit=null;
+
+ Object lit_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:291:2: (lit= LITERAL )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:291:4: lit= LITERAL
+ {
+ root_0 = (Object)adaptor.nil();
+
+ lit=(Token)input.LT(1);
+ match(input,LITERAL,FOLLOW_LITERAL_in_literal1741); if (failed) return retval;
+ if ( backtracking==0 ) {
+ lit_tree = (Object)adaptor.create(lit);
+ root_0 = (Object)adaptor.becomeRoot(lit_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+ retval.result = new LiteralExpr(lit.getText()) ;
+ retval.result.setPosition (positionOf(lit,true),positionOf(lit,false) );
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end literal
+
+ public static class number_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start number
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:297:0: number returns [Expr result] : num= NUMBER ;
+ public final number_return number() throws RecognitionException {
+ number_return retval = new number_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token num=null;
+
+ Object num_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:298:4: (num= NUMBER )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:298:6: num= NUMBER
+ {
+ root_0 = (Object)adaptor.nil();
+
+ num=(Token)input.LT(1);
+ match(input,NUMBER,FOLLOW_NUMBER_in_number1767); if (failed) return retval;
+ if ( backtracking==0 ) {
+ num_tree = (Object)adaptor.create(num);
+ root_0 = (Object)adaptor.becomeRoot(num_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+ retval.result = new NumberExpr(num.getText());
+ retval.result.setPosition(positionOf(num,true),positionOf(num,false));
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end number
+
+ public static class variableReference_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start variableReference
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:304:0: variableReference returns [Expr result] : DOLLAR var= qName ;
+ public final variableReference_return variableReference() throws RecognitionException {
+ variableReference_return retval = new variableReference_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token DOLLAR14=null;
+ qName_return var = null;
+
+
+ Object DOLLAR14_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:305:3: ( DOLLAR var= qName )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:305:5: DOLLAR var= qName
+ {
+ root_0 = (Object)adaptor.nil();
+
+ DOLLAR14=(Token)input.LT(1);
+ match(input,DOLLAR,FOLLOW_DOLLAR_in_variableReference1798); if (failed) return retval;
+ if ( backtracking==0 ) {
+ DOLLAR14_tree = (Object)adaptor.create(DOLLAR14);
+ root_0 = (Object)adaptor.becomeRoot(DOLLAR14_tree, root_0);
+ }
+ pushFollow(FOLLOW_qName_in_variableReference1803);
+ var=qName();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, var.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new VariableReferenceExpr(var.prefix, var.localName);
+ retval.result.setPosition( var.startOffset, var.endOffset );
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end variableReference
+
+ public static class functionCall_return extends ParserRuleReturnScope {
+ public FunctionCallExpr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start functionCall
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:318:0: functionCall returns [FunctionCallExpr result ] : qn= qName LPAREN (list= argList )? RPAREN ;
+ public final functionCall_return functionCall() throws RecognitionException {
+ functionCall_return retval = new functionCall_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token LPAREN15=null;
+ Token RPAREN16=null;
+ qName_return qn = null;
+
+ argList_return list = null;
+
+
+ Object LPAREN15_tree=null;
+ Object RPAREN16_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:319:5: (qn= qName LPAREN (list= argList )? RPAREN )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:319:7: qn= qName LPAREN (list= argList )? RPAREN
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_qName_in_functionCall1838);
+ qn=qName();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, qn.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new FunctionCallExpr(qn.prefix,qn.localName);
+ retval.result.setPosition (qn.startOffset,qn.endOffset);
+
+ }
+ LPAREN15=(Token)input.LT(1);
+ match(input,LPAREN,FOLLOW_LPAREN_in_functionCall1863); if (failed) return retval;
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:323:18: (list= argList )?
+ int alt19=2;
+ int LA19_0 = input.LA(1);
+
+ if ( (LA19_0==LPAREN||(LA19_0>=DOT && LA19_0<=AT)||(LA19_0>=SLASH && LA19_0<=DOLLAR)||LA19_0==MINUS||LA19_0==STAR||(LA19_0>=IDENTIFIER && LA19_0<=NUMBER)) ) {
+ alt19=1;
+ }
+ switch (alt19) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:323:20: list= argList
+ {
+ pushFollow(FOLLOW_argList_in_functionCall1870);
+ list=argList();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, list.getTree());
+ if ( backtracking==0 ) {
+ retval.result.getParameters().addAll(list.result);
+ }
+
+ }
+ break;
+
+ }
+
+ RPAREN16=(Token)input.LT(1);
+ match(input,RPAREN,FOLLOW_RPAREN_in_functionCall1877); if (failed) return retval;
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end functionCall
+
+ public static class argList_return extends ParserRuleReturnScope {
+ public List<Expr> result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start argList
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:328:0: argList returns [ List<Expr> result ] : a= argument ( COMMA b= argument )* -> ^( Args ( argument )+ ) ;
+ public final argList_return argList() throws RecognitionException {
+ argList_return retval = new argList_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token COMMA17=null;
+ argument_return a = null;
+
+ argument_return b = null;
+
+
+ Object COMMA17_tree=null;
+ RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
+ RewriteRuleSubtreeStream stream_argument=new RewriteRuleSubtreeStream(adaptor,"rule argument");
+
+ retval.result = new ArrayList<Expr>();
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:332:3: (a= argument ( COMMA b= argument )* -> ^( Args ( argument )+ ) )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:332:5: a= argument ( COMMA b= argument )*
+ {
+ pushFollow(FOLLOW_argument_in_argList1914);
+ a=argument();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) stream_argument.add(a.getTree());
+ if ( backtracking==0 ) {
+ retval.result.add(a.result);
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:333:5: ( COMMA b= argument )*
+ loop20:
+ do {
+ int alt20=2;
+ int LA20_0 = input.LA(1);
+
+ if ( (LA20_0==COMMA) ) {
+ alt20=1;
+ }
+
+
+ switch (alt20) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:333:7: COMMA b= argument
+ {
+ COMMA17=(Token)input.LT(1);
+ match(input,COMMA,FOLLOW_COMMA_in_argList1925); if (failed) return retval;
+ if ( backtracking==0 ) stream_COMMA.add(COMMA17);
+
+ pushFollow(FOLLOW_argument_in_argList1929);
+ b=argument();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) stream_argument.add(b.getTree());
+ if ( backtracking==0 ) {
+ retval.result.add(b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop20;
+ }
+ } while (true);
+
+
+ // AST REWRITE
+ // elements: argument
+ // token labels:
+ // rule labels: retval
+ // token list labels:
+ // rule list labels:
+ if ( backtracking==0 ) {
+ retval.tree = root_0;
+ RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
+
+ root_0 = (Object)adaptor.nil();
+ // 334:8: -> ^( Args ( argument )+ )
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:334:11: ^( Args ( argument )+ )
+ {
+ Object root_1 = (Object)adaptor.nil();
+ root_1 = (Object)adaptor.becomeRoot(adaptor.create(Args, "Args"), root_1);
+
+ if ( !(stream_argument.hasNext()) ) {
+ throw new RewriteEarlyExitException();
+ }
+ while ( stream_argument.hasNext() ) {
+ adaptor.addChild(root_1, stream_argument.next());
+
+ }
+ stream_argument.reset();
+
+ adaptor.addChild(root_0, root_1);
+ }
+
+ }
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end argList
+
+ public static class argument_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start argument
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:338:0: argument returns [Expr result] : e= expr ;
+ public final argument_return argument() throws RecognitionException {
+ argument_return retval = new argument_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ expr_return e = null;
+
+
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:339:4: (e= expr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:339:6: e= expr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_expr_in_argument1980);
+ e=expr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result ;
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end argument
+
+ public static class unionExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start unionExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:350:0: unionExpr returns [Expr result] : (a= pathExpr ) ( (op= PIPE ) b= pathExpr )* ;
+ public final unionExpr_return unionExpr() throws RecognitionException {
+ unionExpr_return retval = new unionExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ pathExpr_return a = null;
+
+ pathExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:351:3: ( (a= pathExpr ) ( (op= PIPE ) b= pathExpr )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:351:5: (a= pathExpr ) ( (op= PIPE ) b= pathExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:351:5: (a= pathExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:351:6: a= pathExpr
+ {
+ pushFollow(FOLLOW_pathExpr_in_unionExpr2015);
+ a=pathExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:353:5: ( (op= PIPE ) b= pathExpr )*
+ loop21:
+ do {
+ int alt21=2;
+ int LA21_0 = input.LA(1);
+
+ if ( (LA21_0==PIPE) ) {
+ alt21=1;
+ }
+
+
+ switch (alt21) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:353:6: (op= PIPE ) b= pathExpr
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:353:6: (op= PIPE )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:353:7: op= PIPE
+ {
+ op=(Token)input.LT(1);
+ match(input,PIPE,FOLLOW_PIPE_in_unionExpr2036); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+
+ pushFollow(FOLLOW_pathExpr_in_unionExpr2042);
+ b=pathExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new UnionExpr(op.getText(),retval.result,b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop21;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end unionExpr
+
+ public static class pathExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start pathExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );
+ public final pathExpr_return pathExpr() throws RecognitionException {
+ pathExpr_return retval = new pathExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token SLASH18=null;
+ Token SLASH219=null;
+ locationPath_return loc = null;
+
+ filterExpr_return e = null;
+
+ relativeLocationPath_return path = null;
+
+
+ Object SLASH18_tree=null;
+ Object SLASH219_tree=null;
+
+
+ Step ans = null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:363:2: (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? )
+ int alt24=2;
+ switch ( input.LA(1) ) {
+ case DOT:
+ case DOT2:
+ case AT:
+ case SLASH:
+ case SLASH2:
+ case STAR:
+ {
+ alt24=1;
+ }
+ break;
+ case IDENTIFIER:
+ {
+ switch ( input.LA(2) ) {
+ case COLON:
+ {
+ int LA24_12 = input.LA(3);
+
+ if ( (LA24_12==IDENTIFIER) ) {
+ int LA24_36 = input.LA(4);
+
+ if ( (LA24_36==LPAREN) ) {
+ alt24=2;
+ }
+ else if ( (LA24_36==EOF||(LA24_36>=OR && LA24_36<=DIV)||(LA24_36>=RPAREN && LA24_36<=PIPE)||LA24_36==COMMA||(LA24_36>=SLASH && LA24_36<=SLASH2)||(LA24_36>=PLUS && LA24_36<=STAR)) ) {
+ alt24=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );", 24, 36, input);
+
+ throw nvae;
+ }
+ }
+ else if ( (LA24_12==STAR) ) {
+ alt24=1;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );", 24, 12, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ {
+ switch ( input.LA(3) ) {
+ case RPAREN:
+ {
+ int LA24_38 = input.LA(4);
+
+ if ( (( isCommentNodeName(input.LT(1).getText()) || isNodeNodeName(input.LT(1).getText()) || isTextNodeName(input.LT(1).getText()) || isProcessingInstructionNodeName( input.LT(1).getText() ) )) ) {
+ alt24=1;
+ }
+ else if ( (true) ) {
+ alt24=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );", 24, 38, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case IDENTIFIER:
+ {
+ int LA24_39 = input.LA(4);
+
+ if ( ((LA24_39>=OR && LA24_39<=LPAREN)||LA24_39==LBRACKET||LA24_39==PIPE||(LA24_39>=COMMA && LA24_39<=SLASH2)||(LA24_39>=PLUS && LA24_39<=STAR)) ) {
+ alt24=2;
+ }
+ else if ( (LA24_39==RPAREN) ) {
+ int LA24_97 = input.LA(5);
+
+ if ( ( isProcessingInstructionNodeName( input.LT(1).getText() ) ) ) {
+ alt24=1;
+ }
+ else if ( (true) ) {
+ alt24=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );", 24, 97, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );", 24, 39, input);
+
+ throw nvae;
+ }
+ }
+ break;
+ case LPAREN:
+ case DOT:
+ case DOT2:
+ case AT:
+ case SLASH:
+ case SLASH2:
+ case DOLLAR:
+ case MINUS:
+ case STAR:
+ case LITERAL:
+ case NUMBER:
+ {
+ alt24=2;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );", 24, 13, input);
+
+ throw nvae;
+ }
+
+ }
+ break;
+ case EOF:
+ case OR:
+ case AND:
+ case MOD:
+ case DIV:
+ case RPAREN:
+ case LBRACKET:
+ case RBRACKET:
+ case PIPE:
+ case COMMA:
+ case COLON2:
+ case SLASH:
+ case SLASH2:
+ case PLUS:
+ case MINUS:
+ case EQ:
+ case NE:
+ case LT:
+ case LTE:
+ case GT:
+ case GTE:
+ case STAR:
+ {
+ alt24=1;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );", 24, 3, input);
+
+ throw nvae;
+ }
+
+ }
+ break;
+ case LPAREN:
+ case DOLLAR:
+ case LITERAL:
+ case NUMBER:
+ {
+ alt24=2;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("360:0: pathExpr returns [Expr result] : (loc= locationPath | e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )? );", 24, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt24) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:364:3: loc= locationPath
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_locationPath_in_pathExpr2092);
+ loc=locationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, loc.getTree());
+ if ( backtracking==0 ) {
+ retval.result = loc.result;
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:366:5: e= filterExpr ( ( SLASH | SLASH2 ) path= relativeLocationPath )?
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_filterExpr_in_pathExpr2109);
+ e=filterExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ retval.result = e.result;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:8: ( ( SLASH | SLASH2 ) path= relativeLocationPath )?
+ int alt23=2;
+ int LA23_0 = input.LA(1);
+
+ if ( ((LA23_0>=SLASH && LA23_0<=SLASH2)) ) {
+ alt23=1;
+ }
+ switch (alt23) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:10: ( SLASH | SLASH2 ) path= relativeLocationPath
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:10: ( SLASH | SLASH2 )
+ int alt22=2;
+ int LA22_0 = input.LA(1);
+
+ if ( (LA22_0==SLASH) ) {
+ alt22=1;
+ }
+ else if ( (LA22_0==SLASH2) ) {
+ alt22=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("367:10: ( SLASH | SLASH2 )", 22, 0, input);
+
+ throw nvae;
+ }
+ switch (alt22) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:11: SLASH
+ {
+ SLASH18=(Token)input.LT(1);
+ match(input,SLASH,FOLLOW_SLASH_in_pathExpr2124); if (failed) return retval;
+ if ( backtracking==0 ) {
+ SLASH18_tree = (Object)adaptor.create(SLASH18);
+ adaptor.addChild(root_0, SLASH18_tree);
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:367:17: SLASH2
+ {
+ SLASH219=(Token)input.LT(1);
+ match(input,SLASH2,FOLLOW_SLASH2_in_pathExpr2126); if (failed) return retval;
+ if ( backtracking==0 ) {
+ SLASH219_tree = (Object)adaptor.create(SLASH219);
+ adaptor.addChild(root_0, SLASH219_tree);
+ }
+ if ( backtracking==0 ) {
+ ans=new AllNodeStep(Axis.DESCENDANT_OR_SELF);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_relativeLocationPath_in_pathExpr2133);
+ path=relativeLocationPath();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, path.getTree());
+ if ( backtracking==0 ) {
+
+ retval.result = new PathExpr(e.result,path.result);
+ if (ans != null) { path.result.addFirstStep(ans); }
+
+ }
+
+ }
+ break;
+
+ }
+
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end pathExpr
+
+ public static class filterExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start filterExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:375:0: filterExpr returns [Expr result] : e= primaryExpr (p= predicate )* ;
+ public final filterExpr_return filterExpr() throws RecognitionException {
+ filterExpr_return retval = new filterExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ primaryExpr_return e = null;
+
+ predicate_return p = null;
+
+
+
+
+ FilterExpr filter = null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:379:3: (e= primaryExpr (p= predicate )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:379:5: e= primaryExpr (p= predicate )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_primaryExpr_in_filterExpr2172);
+ e=primaryExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, e.getTree());
+ if ( backtracking==0 ) {
+ filter = new FilterExpr(e.result) ;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:380:9: (p= predicate )*
+ loop25:
+ do {
+ int alt25=2;
+ int LA25_0 = input.LA(1);
+
+ if ( (LA25_0==LBRACKET) ) {
+ alt25=1;
+ }
+
+
+ switch (alt25) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:380:11: p= predicate
+ {
+ pushFollow(FOLLOW_predicate_in_filterExpr2189);
+ p=predicate();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, p.getTree());
+ if ( backtracking==0 ) {
+ filter.addPredicate(p.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop25;
+ }
+ } while (true);
+
+ if ( backtracking==0 ) {
+ retval.result = filter.hasPredicates() ? filter : filter.getExpr();
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end filterExpr
+
+ public static class orExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start orExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:393:0: orExpr returns [Expr result] : (a= andExpr ) ( (op= OR ) b= andExpr )* ;
+ public final orExpr_return orExpr() throws RecognitionException {
+ orExpr_return retval = new orExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ andExpr_return a = null;
+
+ andExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:394:3: ( (a= andExpr ) ( (op= OR ) b= andExpr )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:394:5: (a= andExpr ) ( (op= OR ) b= andExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:394:5: (a= andExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:394:6: a= andExpr
+ {
+ pushFollow(FOLLOW_andExpr_in_orExpr2234);
+ a=andExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:396:9: ( (op= OR ) b= andExpr )*
+ loop26:
+ do {
+ int alt26=2;
+ int LA26_0 = input.LA(1);
+
+ if ( (LA26_0==OR) ) {
+ alt26=1;
+ }
+
+
+ switch (alt26) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:396:10: (op= OR ) b= andExpr
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:396:10: (op= OR )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:396:11: op= OR
+ {
+ op=(Token)input.LT(1);
+ match(input,OR,FOLLOW_OR_in_orExpr2266); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+
+ pushFollow(FOLLOW_andExpr_in_orExpr2272);
+ b=andExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new LogicalExpr(op.getText(), retval.result, b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop26;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end orExpr
+
+ public static class andExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start andExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:404:0: andExpr returns [Expr result] : (a= equalityExpr ) ( (op= AND ) b= equalityExpr )* ;
+ public final andExpr_return andExpr() throws RecognitionException {
+ andExpr_return retval = new andExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ equalityExpr_return a = null;
+
+ equalityExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:405:3: ( (a= equalityExpr ) ( (op= AND ) b= equalityExpr )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:405:6: (a= equalityExpr ) ( (op= AND ) b= equalityExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:405:6: (a= equalityExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:405:7: a= equalityExpr
+ {
+ pushFollow(FOLLOW_equalityExpr_in_andExpr2332);
+ a=equalityExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:407:12: ( (op= AND ) b= equalityExpr )*
+ loop27:
+ do {
+ int alt27=2;
+ int LA27_0 = input.LA(1);
+
+ if ( (LA27_0==AND) ) {
+ alt27=1;
+ }
+
+
+ switch (alt27) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:407:13: (op= AND ) b= equalityExpr
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:407:13: (op= AND )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:407:14: op= AND
+ {
+ op=(Token)input.LT(1);
+ match(input,AND,FOLLOW_AND_in_andExpr2377); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+
+ pushFollow(FOLLOW_equalityExpr_in_andExpr2383);
+ b=equalityExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new LogicalExpr(op.getText(),retval.result,b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop27;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end andExpr
+
+ public static class equalityExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start equalityExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:414:0: equalityExpr returns [Expr result] : (a= relationalExpr ) ( (op= EQ | op= NE ) b= relationalExpr )* ;
+ public final equalityExpr_return equalityExpr() throws RecognitionException {
+ equalityExpr_return retval = new equalityExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ relationalExpr_return a = null;
+
+ relationalExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:415:3: ( (a= relationalExpr ) ( (op= EQ | op= NE ) b= relationalExpr )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:415:5: (a= relationalExpr ) ( (op= EQ | op= NE ) b= relationalExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:415:5: (a= relationalExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:415:6: a= relationalExpr
+ {
+ pushFollow(FOLLOW_relationalExpr_in_equalityExpr2452);
+ a=relationalExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:12: ( (op= EQ | op= NE ) b= relationalExpr )*
+ loop29:
+ do {
+ int alt29=2;
+ int LA29_0 = input.LA(1);
+
+ if ( ((LA29_0>=EQ && LA29_0<=NE)) ) {
+ alt29=1;
+ }
+
+
+ switch (alt29) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:13: (op= EQ | op= NE ) b= relationalExpr
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:13: (op= EQ | op= NE )
+ int alt28=2;
+ int LA28_0 = input.LA(1);
+
+ if ( (LA28_0==EQ) ) {
+ alt28=1;
+ }
+ else if ( (LA28_0==NE) ) {
+ alt28=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("417:13: (op= EQ | op= NE )", 28, 0, input);
+
+ throw nvae;
+ }
+ switch (alt28) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:14: op= EQ
+ {
+ op=(Token)input.LT(1);
+ match(input,EQ,FOLLOW_EQ_in_equalityExpr2484); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:417:21: op= NE
+ {
+ op=(Token)input.LT(1);
+ match(input,NE,FOLLOW_NE_in_equalityExpr2489); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_relationalExpr_in_equalityExpr2495);
+ b=relationalExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new EqualityExpr(op.getText(), retval.result, b.result );
+ }
+
+ }
+ break;
+
+ default :
+ break loop29;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end equalityExpr
+
+ public static class relationalExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start relationalExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:424:0: relationalExpr returns [Expr result] : (a= additiveExpr ) ( (op= LT | op= GT | op= LTE | op= GTE ) b= additiveExpr )* ;
+ public final relationalExpr_return relationalExpr() throws RecognitionException {
+ relationalExpr_return retval = new relationalExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ additiveExpr_return a = null;
+
+ additiveExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:425:3: ( (a= additiveExpr ) ( (op= LT | op= GT | op= LTE | op= GTE ) b= additiveExpr )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:425:5: (a= additiveExpr ) ( (op= LT | op= GT | op= LTE | op= GTE ) b= additiveExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:425:5: (a= additiveExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:425:6: a= additiveExpr
+ {
+ pushFollow(FOLLOW_additiveExpr_in_relationalExpr2565);
+ a=additiveExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:13: ( (op= LT | op= GT | op= LTE | op= GTE ) b= additiveExpr )*
+ loop31:
+ do {
+ int alt31=2;
+ int LA31_0 = input.LA(1);
+
+ if ( ((LA31_0>=LT && LA31_0<=GTE)) ) {
+ alt31=1;
+ }
+
+
+ switch (alt31) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:14: (op= LT | op= GT | op= LTE | op= GTE ) b= additiveExpr
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:14: (op= LT | op= GT | op= LTE | op= GTE )
+ int alt30=4;
+ switch ( input.LA(1) ) {
+ case LT:
+ {
+ alt30=1;
+ }
+ break;
+ case GT:
+ {
+ alt30=2;
+ }
+ break;
+ case LTE:
+ {
+ alt30=3;
+ }
+ break;
+ case GTE:
+ {
+ alt30=4;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("427:14: (op= LT | op= GT | op= LTE | op= GTE )", 30, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt30) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:15: op= LT
+ {
+ op=(Token)input.LT(1);
+ match(input,LT,FOLLOW_LT_in_relationalExpr2595); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:22: op= GT
+ {
+ op=(Token)input.LT(1);
+ match(input,GT,FOLLOW_GT_in_relationalExpr2600); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 3 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:29: op= LTE
+ {
+ op=(Token)input.LT(1);
+ match(input,LTE,FOLLOW_LTE_in_relationalExpr2605); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 4 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:427:37: op= GTE
+ {
+ op=(Token)input.LT(1);
+ match(input,GTE,FOLLOW_GTE_in_relationalExpr2610); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_additiveExpr_in_relationalExpr2616);
+ b=additiveExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new RelationalExpr(op.getText(), retval.result, b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop31;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end relationalExpr
+
+ public static class additiveExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start additiveExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:440:0: additiveExpr returns [Expr result] : (a= multExpr ) ( (op= PLUS | op= MINUS ) b= multExpr )* ;
+ public final additiveExpr_return additiveExpr() throws RecognitionException {
+ additiveExpr_return retval = new additiveExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ multExpr_return a = null;
+
+ multExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:441:2: ( (a= multExpr ) ( (op= PLUS | op= MINUS ) b= multExpr )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:441:5: (a= multExpr ) ( (op= PLUS | op= MINUS ) b= multExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:441:5: (a= multExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:441:6: a= multExpr
+ {
+ pushFollow(FOLLOW_multExpr_in_additiveExpr2677);
+ a=multExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:12: ( (op= PLUS | op= MINUS ) b= multExpr )*
+ loop33:
+ do {
+ int alt33=2;
+ int LA33_0 = input.LA(1);
+
+ if ( ((LA33_0>=PLUS && LA33_0<=MINUS)) ) {
+ alt33=1;
+ }
+
+
+ switch (alt33) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:13: (op= PLUS | op= MINUS ) b= multExpr
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:13: (op= PLUS | op= MINUS )
+ int alt32=2;
+ int LA32_0 = input.LA(1);
+
+ if ( (LA32_0==PLUS) ) {
+ alt32=1;
+ }
+ else if ( (LA32_0==MINUS) ) {
+ alt32=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("443:13: (op= PLUS | op= MINUS )", 32, 0, input);
+
+ throw nvae;
+ }
+ switch (alt32) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:14: op= PLUS
+ {
+ op=(Token)input.LT(1);
+ match(input,PLUS,FOLLOW_PLUS_in_additiveExpr2709); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:443:23: op= MINUS
+ {
+ op=(Token)input.LT(1);
+ match(input,MINUS,FOLLOW_MINUS_in_additiveExpr2714); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_multExpr_in_additiveExpr2720);
+ b=multExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new AdditiveExpr(op.getText(),retval.result, b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop33;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end additiveExpr
+
+ public static class multExpr_return extends ParserRuleReturnScope {
+ public Expr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start multExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:450:0: multExpr returns [Expr result] : (a= unaryExpr ) ( (op= STAR | op= DIV | op= MOD ) b= unaryExpr )* ;
+ public final multExpr_return multExpr() throws RecognitionException {
+ multExpr_return retval = new multExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ unaryExpr_return a = null;
+
+ unaryExpr_return b = null;
+
+
+ Object op_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:451:3: ( (a= unaryExpr ) ( (op= STAR | op= DIV | op= MOD ) b= unaryExpr )* )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:451:5: (a= unaryExpr ) ( (op= STAR | op= DIV | op= MOD ) b= unaryExpr )*
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:451:5: (a= unaryExpr )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:451:6: a= unaryExpr
+ {
+ pushFollow(FOLLOW_unaryExpr_in_multExpr2799);
+ a=unaryExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, a.getTree());
+
+ }
+
+ if ( backtracking==0 ) {
+ retval.result = a.result;
+ }
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:10: ( (op= STAR | op= DIV | op= MOD ) b= unaryExpr )*
+ loop35:
+ do {
+ int alt35=2;
+ int LA35_0 = input.LA(1);
+
+ if ( ((LA35_0>=MOD && LA35_0<=DIV)||LA35_0==STAR) ) {
+ alt35=1;
+ }
+
+
+ switch (alt35) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:11: (op= STAR | op= DIV | op= MOD ) b= unaryExpr
+ {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:11: (op= STAR | op= DIV | op= MOD )
+ int alt34=3;
+ switch ( input.LA(1) ) {
+ case STAR:
+ {
+ alt34=1;
+ }
+ break;
+ case DIV:
+ {
+ alt34=2;
+ }
+ break;
+ case MOD:
+ {
+ alt34=3;
+ }
+ break;
+ default:
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("453:11: (op= STAR | op= DIV | op= MOD )", 34, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt34) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:12: op= STAR
+ {
+ op=(Token)input.LT(1);
+ match(input,STAR,FOLLOW_STAR_in_multExpr2827); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:21: op= DIV
+ {
+ op=(Token)input.LT(1);
+ match(input,DIV,FOLLOW_DIV_in_multExpr2832); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+ case 3 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:453:29: op= MOD
+ {
+ op=(Token)input.LT(1);
+ match(input,MOD,FOLLOW_MOD_in_multExpr2837); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ root_0 = (Object)adaptor.becomeRoot(op_tree, root_0);
+ }
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_unaryExpr_in_multExpr2843);
+ b=unaryExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, b.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new MultiplicativeExpr(op.getText(), retval.result, b.result);
+ }
+
+ }
+ break;
+
+ default :
+ break loop35;
+ }
+ } while (true);
+
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end multExpr
+
+ public static class unaryExpr_return extends ParserRuleReturnScope {
+ public UnaryExpr result;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start unaryExpr
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:460:0: unaryExpr returns [UnaryExpr result] : (u= unionExpr | op= MINUS n= unaryExpr );
+ public final unaryExpr_return unaryExpr() throws RecognitionException {
+ unaryExpr_return retval = new unaryExpr_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token op=null;
+ unionExpr_return u = null;
+
+ unaryExpr_return n = null;
+
+
+ Object op_tree=null;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:461:3: (u= unionExpr | op= MINUS n= unaryExpr )
+ int alt36=2;
+ int LA36_0 = input.LA(1);
+
+ if ( (LA36_0==LPAREN||(LA36_0>=DOT && LA36_0<=AT)||(LA36_0>=SLASH && LA36_0<=DOLLAR)||LA36_0==STAR||(LA36_0>=IDENTIFIER && LA36_0<=NUMBER)) ) {
+ alt36=1;
+ }
+ else if ( (LA36_0==MINUS) ) {
+ alt36=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return retval;}
+ NoViableAltException nvae =
+ new NoViableAltException("460:0: unaryExpr returns [UnaryExpr result] : (u= unionExpr | op= MINUS n= unaryExpr );", 36, 0, input);
+
+ throw nvae;
+ }
+ switch (alt36) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:461:5: u= unionExpr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ pushFollow(FOLLOW_unionExpr_in_unaryExpr2907);
+ u=unionExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, u.getTree());
+ if ( backtracking==0 ) {
+ retval.result = new UnaryExpr(u.result);
+ }
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:464:5: op= MINUS n= unaryExpr
+ {
+ root_0 = (Object)adaptor.nil();
+
+ op=(Token)input.LT(1);
+ match(input,MINUS,FOLLOW_MINUS_in_unaryExpr2929); if (failed) return retval;
+ if ( backtracking==0 ) {
+ op_tree = (Object)adaptor.create(op);
+ adaptor.addChild(root_0, op_tree);
+ }
+ pushFollow(FOLLOW_unaryExpr_in_unaryExpr2933);
+ n=unaryExpr();
+ _fsp--;
+ if (failed) return retval;
+ if ( backtracking==0 ) adaptor.addChild(root_0, n.getTree());
+ if ( backtracking==0 ) {
+
+ retval.result = n.result;
+ retval.result.setOperand(op.getText());
+ retval.result.setPosition(positionOf(op,true),-1);
+
+ }
+
+ }
+ break;
+
+ }
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end unaryExpr
+
+ public static class qName_return extends ParserRuleReturnScope {
+ public String prefix;
+ public String localName;
+ public int startOffset;
+ public int endOffset;
+ Object tree;
+ public Object getTree() { return tree; }
+ };
+
+ // $ANTLR start qName
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:476:0: qName returns [String prefix, String localName , int startOffset, int endOffset ] : (p= IDENTIFIER COLON )? n= IDENTIFIER ;
+ public final qName_return qName() throws RecognitionException {
+ qName_return retval = new qName_return();
+ retval.start = input.LT(1);
+
+ Object root_0 = null;
+
+ Token p=null;
+ Token n=null;
+ Token COLON20=null;
+
+ Object p_tree=null;
+ Object n_tree=null;
+ Object COLON20_tree=null;
+
+
+ retval.prefix = "";
+ retval.startOffset = -1;
+ retval.startOffset = -1;
+
+ try {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:481:3: ( (p= IDENTIFIER COLON )? n= IDENTIFIER )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:482:6: (p= IDENTIFIER COLON )? n= IDENTIFIER
+ {
+ root_0 = (Object)adaptor.nil();
+
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:482:6: (p= IDENTIFIER COLON )?
+ int alt37=2;
+ int LA37_0 = input.LA(1);
+
+ if ( (LA37_0==IDENTIFIER) ) {
+ int LA37_1 = input.LA(2);
+
+ if ( (LA37_1==COLON) ) {
+ alt37=1;
+ }
+ }
+ switch (alt37) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:482:7: p= IDENTIFIER COLON
+ {
+ p=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qName2972); if (failed) return retval;
+ if ( backtracking==0 ) {
+ p_tree = (Object)adaptor.create(p);
+ adaptor.addChild(root_0, p_tree);
+ }
+ COLON20=(Token)input.LT(1);
+ match(input,COLON,FOLLOW_COLON_in_qName2974); if (failed) return retval;
+ if ( backtracking==0 ) {
+ COLON20_tree = (Object)adaptor.create(COLON20);
+ root_0 = (Object)adaptor.becomeRoot(COLON20_tree, root_0);
+ }
+ if ( backtracking==0 ) {
+ retval.prefix =p.getText() ; retval.startOffset = positionOf(p,true);
+ }
+
+ }
+ break;
+
+ }
+
+ n=(Token)input.LT(1);
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qName2992); if (failed) return retval;
+ if ( backtracking==0 ) {
+ n_tree = (Object)adaptor.create(n);
+ adaptor.addChild(root_0, n_tree);
+ }
+ if ( backtracking==0 ) {
+ retval.localName =n.getText();
+ if (retval.startOffset < 0) {
+ retval.startOffset = positionOf(n,true);
+ }
+ retval.endOffset = positionOf(n,false);
+
+ }
+
+ }
+
+ retval.stop = input.LT(-1);
+
+ if ( backtracking==0 ) {
+ retval.tree = (Object)adaptor.rulePostProcessing(root_0);
+ adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return retval;
+ }
+ // $ANTLR end qName
+
+ // $ANTLR start synpred1
+ public final void synpred1_fragment() throws RecognitionException {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:129:9: ( AT | STAR | IDENTIFIER )
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:
+ {
+ if ( input.LA(1)==AT||input.LA(1)==STAR||input.LA(1)==IDENTIFIER ) {
+ input.consume();
+ errorRecovery=false;failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recoverFromMismatchedSet(input,mse,FOLLOW_set_in_synpred1842); throw mse;
+ }
+
+
+ }
+ }
+ // $ANTLR end synpred1
+
+ // $ANTLR start synpred2
+ public final void synpred2_fragment() throws RecognitionException {
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:6: ( IDENTIFIER COLON2 | AT )
+ int alt38=2;
+ int LA38_0 = input.LA(1);
+
+ if ( (LA38_0==IDENTIFIER) ) {
+ alt38=1;
+ }
+ else if ( (LA38_0==AT) ) {
+ alt38=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("164:6: synpred2 : ( IDENTIFIER COLON2 | AT );", 38, 0, input);
+
+ throw nvae;
+ }
+ switch (alt38) {
+ case 1 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:7: IDENTIFIER COLON2
+ {
+ match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred21003); if (failed) return ;
+ match(input,COLON2,FOLLOW_COLON2_in_synpred21005); if (failed) return ;
+
+ }
+ break;
+ case 2 :
+ // /org.eclipse.bpel.xpath10/src/org/eclipse/bpel/xpath10/parser/XPath10.g:164:27: AT
+ {
+ match(input,AT,FOLLOW_AT_in_synpred21009); if (failed) return ;
+
+ }
+ break;
+
+ }}
+ // $ANTLR end synpred2
+
+ public final boolean synpred1() {
+ backtracking++;
+ int start = input.mark();
+ try {
+ synpred1_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !failed;
+ input.rewind(start);
+ backtracking--;
+ failed=false;
+ return success;
+ }
+ public final boolean synpred2() {
+ backtracking++;
+ int start = input.mark();
+ try {
+ synpred2_fragment(); // can never throw exception
+ } catch (RecognitionException re) {
+ System.err.println("impossible: "+re);
+ }
+ boolean success = !failed;
+ input.rewind(start);
+ backtracking--;
+ failed=false;
+ return success;
+ }
+
+
+
+
+ public static final BitSet FOLLOW_unionExpr_in_xpath742 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_absoluteLocationPath_in_locationPath769 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_relativeLocationPath_in_locationPath781 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_SLASH2_in_absoluteLocationPath811 = new BitSet(new long[]{0x000000014000E002L});
+ public static final BitSet FOLLOW_SLASH_in_absoluteLocationPath820 = new BitSet(new long[]{0x000000014000E002L});
+ public static final BitSet FOLLOW_i_relativeLocationPath_in_absoluteLocationPath853 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_i_relativeLocationPath_in_relativeLocationPath898 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_step_in_i_relativeLocationPath926 = new BitSet(new long[]{0x0000000000180002L});
+ public static final BitSet FOLLOW_SLASH2_in_i_relativeLocationPath941 = new BitSet(new long[]{0x000000014000E000L});
+ public static final BitSet FOLLOW_SLASH_in_i_relativeLocationPath946 = new BitSet(new long[]{0x000000014000E000L});
+ public static final BitSet FOLLOW_step_in_i_relativeLocationPath952 = new BitSet(new long[]{0x0000000000180002L});
+ public static final BitSet FOLLOW_axis_in_step1015 = new BitSet(new long[]{0x0000000140000000L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_step1042 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_COLON_in_step1044 = new BitSet(new long[]{0x0000000140000000L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_step1056 = new BitSet(new long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_STAR_in_step1060 = new BitSet(new long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_specialStep_in_step1081 = new BitSet(new long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_predicate_in_step1099 = new BitSet(new long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_abbrStep_in_step1121 = new BitSet(new long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_predicate_in_step1130 = new BitSet(new long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1167 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_specialStep1170 = new BitSet(new long[]{0x0000000100000200L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1177 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_specialStep1186 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1215 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_specialStep1218 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_specialStep1223 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1262 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_specialStep1265 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_specialStep1270 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_specialStep1302 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_specialStep1305 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_specialStep1310 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_axis1366 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_COLON2_in_axis1368 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_AT_in_axis1388 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LBRACKET_in_predicate1430 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_predicateExpr_in_predicate1435 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_RBRACKET_in_predicate1437 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_expr_in_predicateExpr1468 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_DOT_in_abbrStep1500 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_DOT2_in_abbrStep1513 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_AT_in_abbrAxisSpecifier1531 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_orExpr_in_expr1565 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_variableReference_in_primaryExpr1594 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LPAREN_in_primaryExpr1611 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_expr_in_primaryExpr1616 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_primaryExpr1618 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_primaryExpr1638 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_number_in_primaryExpr1670 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_functionCall_in_primaryExpr1703 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LITERAL_in_literal1741 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NUMBER_in_number1767 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_DOLLAR_in_variableReference1798 = new BitSet(new long[]{0x0000000100000000L});
+ public static final BitSet FOLLOW_qName_in_variableReference1803 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_qName_in_functionCall1838 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_LPAREN_in_functionCall1863 = new BitSet(new long[]{0x0000000740B8E300L});
+ public static final BitSet FOLLOW_argList_in_functionCall1870 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_RPAREN_in_functionCall1877 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_argument_in_argList1914 = new BitSet(new long[]{0x0000000000010002L});
+ public static final BitSet FOLLOW_COMMA_in_argList1925 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_argument_in_argList1929 = new BitSet(new long[]{0x0000000000010002L});
+ public static final BitSet FOLLOW_expr_in_argument1980 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_pathExpr_in_unionExpr2015 = new BitSet(new long[]{0x0000000000001002L});
+ public static final BitSet FOLLOW_PIPE_in_unionExpr2036 = new BitSet(new long[]{0x000000074038E100L});
+ public static final BitSet FOLLOW_pathExpr_in_unionExpr2042 = new BitSet(new long[]{0x0000000000001002L});
+ public static final BitSet FOLLOW_locationPath_in_pathExpr2092 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_filterExpr_in_pathExpr2109 = new BitSet(new long[]{0x0000000000180002L});
+ public static final BitSet FOLLOW_SLASH_in_pathExpr2124 = new BitSet(new long[]{0x000000014000E000L});
+ public static final BitSet FOLLOW_SLASH2_in_pathExpr2126 = new BitSet(new long[]{0x000000014000E000L});
+ public static final BitSet FOLLOW_relativeLocationPath_in_pathExpr2133 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_primaryExpr_in_filterExpr2172 = new BitSet(new long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_predicate_in_filterExpr2189 = new BitSet(new long[]{0x0000000000000402L});
+ public static final BitSet FOLLOW_andExpr_in_orExpr2234 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_OR_in_orExpr2266 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_andExpr_in_orExpr2272 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_equalityExpr_in_andExpr2332 = new BitSet(new long[]{0x0000000000000022L});
+ public static final BitSet FOLLOW_AND_in_andExpr2377 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_equalityExpr_in_andExpr2383 = new BitSet(new long[]{0x0000000000000022L});
+ public static final BitSet FOLLOW_relationalExpr_in_equalityExpr2452 = new BitSet(new long[]{0x0000000003000002L});
+ public static final BitSet FOLLOW_EQ_in_equalityExpr2484 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_NE_in_equalityExpr2489 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_relationalExpr_in_equalityExpr2495 = new BitSet(new long[]{0x0000000003000002L});
+ public static final BitSet FOLLOW_additiveExpr_in_relationalExpr2565 = new BitSet(new long[]{0x000000003C000002L});
+ public static final BitSet FOLLOW_LT_in_relationalExpr2595 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_GT_in_relationalExpr2600 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_LTE_in_relationalExpr2605 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_GTE_in_relationalExpr2610 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_additiveExpr_in_relationalExpr2616 = new BitSet(new long[]{0x000000003C000002L});
+ public static final BitSet FOLLOW_multExpr_in_additiveExpr2677 = new BitSet(new long[]{0x0000000000C00002L});
+ public static final BitSet FOLLOW_PLUS_in_additiveExpr2709 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_MINUS_in_additiveExpr2714 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_multExpr_in_additiveExpr2720 = new BitSet(new long[]{0x0000000000C00002L});
+ public static final BitSet FOLLOW_unaryExpr_in_multExpr2799 = new BitSet(new long[]{0x00000000400000C2L});
+ public static final BitSet FOLLOW_STAR_in_multExpr2827 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_DIV_in_multExpr2832 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_MOD_in_multExpr2837 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_unaryExpr_in_multExpr2843 = new BitSet(new long[]{0x00000000400000C2L});
+ public static final BitSet FOLLOW_unionExpr_in_unaryExpr2907 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_MINUS_in_unaryExpr2929 = new BitSet(new long[]{0x0000000740B8E100L});
+ public static final BitSet FOLLOW_unaryExpr_in_unaryExpr2933 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_qName2972 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_COLON_in_qName2974 = new BitSet(new long[]{0x0000000100000000L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_qName2992 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_set_in_synpred1842 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IDENTIFIER_in_synpred21003 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_COLON2_in_synpred21005 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_AT_in_synpred21009 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
15 years, 1 month
JBoss Tools SVN: r29224 - in trunk/as/plugins: org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/archives and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-02-17 18:05:58 -0500 (Thu, 17 Feb 2011)
New Revision: 29224
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/archives/RSEZippedJSTPublisher.java
Log:
JBIDE-8450 committed to trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2011-02-17 22:57:56 UTC (rev 29223)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2011-02-17 23:05:58 UTC (rev 29224)
@@ -24,6 +24,7 @@
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.internal.Server;
@@ -34,6 +35,7 @@
import org.jboss.ide.eclipse.archives.core.util.internal.TrueZipUtil;
import org.jboss.ide.eclipse.archives.webtools.IntegrationPlugin;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.Messages;
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
@@ -52,6 +54,9 @@
public IStatus publishModule(IServer server, String deployRoot, IModule[] module,
int publishType, IModuleResourceDelta[] delta,
IProgressMonitor monitor) throws CoreException {
+ String name = "Compressing " + module[0].getName(); //$NON-NLS-1$
+ monitor.beginTask(name, 200);
+ monitor.setTaskName(name);
this.deployRoot = deployRoot;
IStatus[] returnStatus;
@@ -87,16 +92,20 @@
}
TrueZipUtil.umount();
- IStatus finalStatus;
+ IStatus finalStatus = null;
if( returnStatus.length > 0 ) {
MultiStatus ms = new MultiStatus(JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_INC_FAIL,
"Publish Failed for module " + module[0].getName(), null); //$NON-NLS-1$
for( int i = 0; i < returnStatus.length; i++ )
ms.add(returnStatus[i]);
finalStatus = ms;
- } else
- finalStatus = Status.OK_STATUS;
+ } else {
+ finalStatus = new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID,
+ IEventCodes.JST_PUB_FULL_SUCCESS,
+ NLS.bind(Messages.ModulePublished, module[0].getName()), null);
+ }
+ monitor.done();
return finalStatus;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-02-17 22:57:56 UTC (rev 29223)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-02-17 23:05:58 UTC (rev 29224)
@@ -15,7 +15,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
@@ -62,12 +61,14 @@
IProgressMonitor monitor) throws CoreException {
// Build all parts together at once.
// When a call for [ear, childWar] comes in, ignore it.
- if( module.length > 1 ) {
- return Status.OK_STATUS;
- }
+ if( module.length > 1 )
+ return null;
+
IDeployableServer ds = ServerConverter.getDeployableServer(server);
String deployRoot = getDeployRoot(module, ds);
LocalZippedPublisherUtil util = new LocalZippedPublisherUtil();
- return util.publishModule(server, deployRoot, module, publishType, delta, monitor);
+ IStatus s = util.publishModule(server, deployRoot, module, publishType, delta, monitor);
+ monitor.done();
+ return s;
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/archives/RSEZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/archives/RSEZippedJSTPublisher.java 2011-02-17 22:57:56 UTC (rev 29223)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/archives/RSEZippedJSTPublisher.java 2011-02-17 23:05:58 UTC (rev 29224)
@@ -12,20 +12,28 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.rse.core.archives;
+import java.util.ArrayList;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
+import org.eclipse.wst.common.project.facet.core.util.internal.ProgressMonitorUtil;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
import org.jboss.ide.eclipse.archives.webtools.modules.WTPZippedPublisher;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
+import org.jboss.ide.eclipse.as.core.publishers.AbstractServerToolsPublisher;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
@@ -62,12 +70,24 @@
int publishType, IModuleResourceDelta[] delta,
IProgressMonitor monitor) throws CoreException {
- if( module.length > 1 )
- return Status.OK_STATUS;
+ String taskName = "Publishing " + module[0].getName();
+ monitor.beginTask(taskName, 200); //$NON-NLS-1$
+ monitor.setTaskName(taskName);
+ if( module.length > 1 ) {
+ monitor.done();
+ return null;
+ }
// Locally zip it up into the remote tmp folder
- IStatus sup = super.publishModule(method, server, module, publishType, delta, monitor);
+ IStatus sup = super.publishModule(method, server, module, publishType, delta,
+ AbstractServerToolsPublisher.getSubMon(monitor, 50));
+ if( !sup.isOK() ) {
+ monitor.done();
+ return sup;
+ }
+ monitor.setTaskName("Publishing to remote server (dummy)");
+
// set up needed vars
IDeployableServer server2 = ServerConverter.getDeployableServer(server);
String remoteTempDeployRoot = getDeployRoot(module, ServerConverter.getDeployableServer(server));
@@ -81,14 +101,28 @@
// Now transfer the file to RSE
IFileService fs = method2.getFileService();
IFileServiceSubSystem system = method2.getFileServiceSubSystem();
+ ArrayList<IStatus> results = new ArrayList<IStatus>();
+ if( !sup.isOK())
+ results.add(sup);
+
try {
- method2.getFileService().upload(sourcePath.toFile(), destFolder.toString(), name, true, null, null, new NullProgressMonitor());
- //method2.getFileService().move(tempDestFolder.toString(), name, destFolder.toString(), name, new NullProgressMonitor());
+ method2.getFileService().upload(sourcePath.toFile(), destFolder.toString(), name, true, null, null,
+ AbstractServerToolsPublisher.getSubMon(monitor, 150));
} catch( SystemMessageException sme ) {
- // TODO fix or return error
- sme.printStackTrace();
+ IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, sme.getMessage(), sme);
+ results.add(s);
}
+ monitor.done();
+ if( results != null && results.size() > 0 ) {
+ MultiStatus ms = new MultiStatus(JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_INC_FAIL,
+ NLS.bind(Messages.IncrementalPublishFail, module[0].getName()), null);
+ IStatus[] results2 = results.toArray(new IStatus[results.size()]);
+ for( int i = 0; i < results.size(); i++ )
+ ms.add(results2[i]);
+ return ms;
+ }
+
return sup;
}
}
15 years, 1 month
JBoss Tools SVN: r29223 - in workspace/bbrodt: org.eclipse.bpel.apache.ode.runtime/META-INF and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-17 17:57:56 -0500 (Thu, 17 Feb 2011)
New Revision: 29223
Added:
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.classpath
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.cvsignore
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.project
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/META-INF/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/build.properties
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/definition/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/definition/ode.xml
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/icons/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/icons/obj16/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/icons/obj16/ode.gif
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/plugin.properties
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/plugin.xml
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdePlugin.java
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeServerRuntime.java
Modified:
workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/
workspace/bbrodt/org.eclipse.bpel.cheatsheet/
workspace/bbrodt/org.eclipse.bpel.common.model/
workspace/bbrodt/org.eclipse.bpel.common.ui/
Log:
Property changes on: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime
___________________________________________________________________
Added: svn:ignore
+ pom.xml
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.classpath
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.classpath (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.classpath 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.cvsignore
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.cvsignore (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.cvsignore 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,4 @@
+target
+bin
+*.class
+
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.project
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.project (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/.project 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.apache.ode.runtime</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: new.org.eclipse.bpel.apache.ode.runtime;singleton:=true
+Bundle-Version: 0.6.0.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.wst.server.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.jst.server.generic.core;bundle-version="[1.0.305,2.0.0)",
+ org.eclipse.wst.wsdl;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.bpel.model;bundle-version="0.5.0",
+ org.eclipse.jem.util;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.bpel.runtimes;bundle-version="0.5.0",
+ org.eclipse.jst.server.generic.ui;bundle-version="[1.0.305,2.0.0)",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.bpel.ui;bundle-version="0.5.0",
+ org.apache.xerces;bundle-version="[2.9.0,3.0.0)",
+ org.eclipse.xsd;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.jst.server.ui;bundle-version="[1.0.303,2.0.0)",
+ org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.jst.server.core;bundle-version="[1.1.0,2.0.0)",
+ javax.wsdl;bundle-version="[1.5.0,1.6.0)",
+ org.eclipse.bpel.apache.ode.deploy.model;bundle-version="0.5.0"
+Bundle-Activator: org.eclipse.bpel.apache.ode.runtime.OdePlugin
+Export-Package: org.eclipse.bpel.apache.ode.runtime
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.bpel.runtimes
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/build.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/build.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/build.properties 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ bin/,\
+ definition/,\
+ icons/,\
+ plugin.properties
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/definition/ode.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/definition/ode.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/definition/ode.xml 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:ServerRuntime
+ xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
+ name="Apache ODE" version="v1.x">
+ <property id="ode.home"
+ label="%odeHome"
+ type="directory"
+ context="runtime"
+ default="/your_ode_root/" />
+
+ <property id="tomcat.home"
+ label="%tomcatHome"
+ type="directory"
+ context="runtime"
+ default="/your_tomcat_root/" />
+
+ <property id="serverAddress"
+ label="%serverAddress"
+ type="string"
+ context="runtime"
+ default="localhost" />
+
+ <property id="port"
+ label="%port"
+ type="string"
+ context="runtime"
+ default="8080" />
+
+ <property id="vmArguments"
+ label="%vmArguments"
+ type="string"
+ context="runtime"
+ default="-Xms128m -Xmx512m -XX:MaxPermSize=256m" />
+
+ <port>
+ <no>${port}</no>
+ <name>Http</name>
+ <protocol>http</protocol>
+ </port>
+
+ <module>
+ <type>bpel.module</type>
+ <publishDir>${ode.home}/WEB-INF/processes</publishDir>
+ <publisherReference>org.eclipse.bpel.apache.ode.runtime.publisher</publisherReference>
+ </module>
+
+ <project>
+ <classpathReference>ode.project</classpathReference>
+ </project>
+
+ <start>
+ <mainClass>org.apache.catalina.startup.Bootstrap</mainClass>
+ <workingDirectory>${tomcat.home}</workingDirectory>
+ <programArguments>start</programArguments>
+ <vmParameters>-Dcatalina.home="${tomcat.home}" -Djava.endorsed.dirs="${tomcat.home}/common/endorsed" ${vmArguments}</vmParameters>
+ <classpathReference>tomcat</classpathReference>
+ </start>
+
+ <stop>
+ <mainClass>org.apache.catalina.startup.Bootstrap</mainClass>
+ <workingDirectory>${tomcat.home}</workingDirectory>
+ <programArguments>stop</programArguments>
+ <vmParameters>-Dcatalina.home="${tomcat.home}" -Djava.endorsed.dirs="${tomcat.home}/common/endorsed"</vmParameters>
+ <classpathReference>tomcat</classpathReference>
+ </stop>
+
+ <classpath id="ode">
+ <archive path="${ode.home}/WEB-INF/lib" />
+ </classpath>
+
+ <classpath id="tomcat">
+ <archive path="${tomcat.home}/bin/bootstrap.jar" />
+ </classpath>
+
+</tns:ServerRuntime>
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/icons/obj16/ode.gif
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/icons/obj16/ode.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/plugin.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/plugin.properties (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/plugin.properties 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,7 @@
+pluginName = Apache ODE Runtime Adapter
+providerName = Apache Software Foundation
+odeHome = ODE's home directory:
+tomcatHome = Tomcat's home directory:
+serverAddress = Server address:
+port = Port:
+vmArguments = VM Arguments:
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/plugin.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/plugin.xml (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/plugin.xml 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension point="org.eclipse.wst.server.core.runtimeTypes">
+ <runtimeType
+ id="org.eclipse.bpel.apache.ode.runtime.rt"
+ name="Apache Ode 1.x Runtime"
+ description="Apache's BPEL 2.0 execution engine - Runtime"
+ vendor="Apache"
+ version="1.0"
+ class="org.eclipse.bpel.apache.ode.runtime.OdeServerRuntime">
+ <moduleType
+ types="bpel.module"
+ versions="1.1, 2.0"/>
+ </runtimeType>
+ </extension>
+ <extension point="org.eclipse.wst.server.core.serverTypes">
+ <serverType
+ runtime="true"
+ class="org.eclipse.jst.server.generic.core.internal.GenericServer"
+ id="org.eclipse.bpel.apache.ode.runtime.st"
+ initialState="stopped"
+ supportsRemoteHosts="true"
+ runtimeTypeId="org.eclipse.bpel.apache.ode.runtime.rt"
+ description="Apache's BPEL 2.0 execution engine - Server"
+ launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
+ behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
+ name="Ode v1.x Server"
+ hasConfiguration="false"
+ startTimeout="480000"
+ stopTimeout="60000"
+ launchModes="run, debug"
+ startBeforePublish="true">
+ </serverType>
+ </extension>
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/ode.gif"
+ typeIds="org.eclipse.bpel.apache.ode.runtime.rt"/>
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/ode.gif"
+ typeIds="org.eclipse.bpel.apache.ode.runtime.st"/>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.generic.core.genericpublisher">
+ <genericpublisher
+ class="org.eclipse.bpel.apache.ode.runtime.OdeBPELPublisher"
+ id="org.eclipse.bpel.apache.ode.runtime.publisher"/>
+ </extension>
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type
+ id="org.eclipse.bpel.apache.ode.runtime.rt"/>
+
+ <runtime-component-version
+ type="org.eclipse.bpel.apache.ode.runtime.rt"
+ version="2.0"/>
+
+ <adapter>
+ <runtime-component
+ id="org.eclipse.bpel.apache.ode.runtime.rt"/>
+ <factory
+ class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory"/>
+ <type
+ class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
+ </adapter>
+
+ <supported>
+ <runtime-component
+ id="org.eclipse.bpel.apache.ode.runtime.rt"
+ version="2.0"/>
+ <facet
+ id="bpel.facet.core"
+ version="2.0"/>
+ </supported>
+ </extension>
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image
+ runtime-component-type="org.eclipse.bpel.apache.ode.runtime.rt"
+ path="icons/obj16/ode.gif"/>
+ </extension>
+
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <adapter>
+ <runtime-component id="org.eclipse.bpel.apache.ode.runtime.rt"/>
+ <factory class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
+ <type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
+ </adapter>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
+ <runtimeFacetMapping
+ runtimeTypeId="org.eclipse.bpel.apache.ode.runtime.rt"
+ runtime-component="org.eclipse.bpel.apache.ode.runtime.rt"
+ version="2.0"/>
+ </extension>
+ <extension point="org.eclipse.jst.server.generic.core.serverdefinition">
+ <serverdefinition id="org.eclipse.bpel.apache.ode.runtime.rt" definitionfile="definition/ode.xml">
+ </serverdefinition>
+ </extension>
+ <extension point="org.eclipse.wst.server.ui.wizardFragments">
+ <fragment
+ id="org.eclipse.jst.server.generic.runtime"
+ typeIds="org.eclipse.bpel.apache.ode.runtime.rt"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerRuntimeWizardFragment"/>
+ <fragment
+ id="org.eclipse.jst.server.generic.server"
+ typeIds="org.eclipse.bpel.apache.ode.runtime.st"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment"/>
+ </extension>
+
+</plugin>
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,95 @@
+package org.eclipse.bpel.apache.ode.runtime;
+
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation, University of Stuttgart (IAAS) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation, University of Stuttgart (IAAS) - initial API and implementation
+ *******************************************************************************/
+
+import java.io.File;
+
+import org.eclipse.bpel.runtimes.publishers.GenericBPELPublisher;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jst.server.core.PublishUtil;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+
+/**
+ * BPEL publisher for Apache ODE.
+ *
+ * @author Tammo van Lessen (IAAS)
+ * @author Simon Moser (IBM)
+ */
+public class OdeBPELPublisher extends GenericBPELPublisher {
+
+ public OdeBPELPublisher() {
+ super();
+ }
+
+ @Override
+ public IStatus[] publish(IModuleArtifact[] artifacts, IProgressMonitor monitor) {
+ // resources will always be null for some weird reason :(
+ // therefore we generate a BPELModuleArtifact
+ // the module id value enables us to get BPEL file path relative to its project
+ IModule[] modules = super.getModule();
+
+ try {
+ IModule last = modules[modules.length-1];
+ IPath root = createDeploymentDestination(last);
+ ModuleDelegate delegate = (ModuleDelegate)last.loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ IModuleResource[] resources = delegate.members();
+ PublishUtil.publishFull(resources, root, monitor);
+ } catch( CoreException ce ) {
+ // TODO return bad status
+ }
+ return new IStatus[]{Status.OK_STATUS};
+
+ }
+
+ @Override
+ public IStatus[] unpublish(IProgressMonitor monitor) {
+ IModule[] modules = super.getModule();
+ IModule last = modules[modules.length - 1];
+ IStatus[] result = new Status[modules.length];
+ IPath root = createDeploymentDestination(last);
+ PublishUtil.deleteDirectory(root.toFile(), monitor);
+ return result;
+ }
+
+ /**
+ * This method will create a folder inside the WEB-INF\processes subfolder
+ * of the ODE installation
+ */
+ protected IPath createDeploymentDestination(IModule module) {
+ String moduleName = module.getName();
+ String deployAppName = moduleName;
+
+ // get TOMCAT_HOME
+ IRuntime serverDef = getServerRuntime().getRuntime();
+ IPath tomcatHome = serverDef.getLocation();
+
+ // append ODE's Process target Dir tomcatHome
+ IPath deployTarget = tomcatHome.append("webapps").append("ode")
+ .append("WEB-INF").append("processes").append(deployAppName);
+
+ File f = deployTarget.toFile();
+ if (!f.exists()) {
+ f.mkdir();
+ }
+
+ return deployTarget;
+ }
+}
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdePlugin.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdePlugin.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdePlugin.java 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,41 @@
+package org.eclipse.bpel.apache.ode.runtime;
+
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation, University of Stuttgart (IAAS) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation, University of Stuttgart (IAAS) - initial API and implementation
+ *******************************************************************************/
+
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Runtime contributor for Apache ODE.
+ *
+ * @author Tammo van Lessen (IAAS)
+ * @author Simon Moser (IBM)
+ */
+public class OdePlugin extends AbstractUIPlugin {
+ public static final String PLUGIN_ID = "org.eclipse.bpel.apache.ode.runtime";
+ private static OdePlugin plugin;
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ public static OdePlugin getDefault() {
+ return plugin;
+ }
+
+}
Added: workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeServerRuntime.java
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeServerRuntime.java (rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeServerRuntime.java 2011-02-17 22:57:56 UTC (rev 29223)
@@ -0,0 +1,26 @@
+package org.eclipse.bpel.apache.ode.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jst.server.generic.core.internal.GenericServerRuntime;
+import org.eclipse.bpel.runtimes.IBPELRuntimeDelegate;
+
+public class OdeServerRuntime extends GenericServerRuntime implements IBPELRuntimeDelegate {
+
+ public String getServerAddress()
+ {
+ return "localhost";
+ }
+
+ public String getPort()
+ {
+ Map m = getAttribute("generic_server_attributes", new HashMap());
+ return (String)m.get("port");
+ }
+
+ public String getDeployDir()
+ {
+ return "";
+ }
+}
Property changes on: workspace/bbrodt/org.eclipse.bpel.cheatsheet
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
pom.xml
Property changes on: workspace/bbrodt/org.eclipse.bpel.common.model
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
pom.xml
Property changes on: workspace/bbrodt/org.eclipse.bpel.common.ui
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
pom.xml
15 years, 1 month
JBoss Tools SVN: r29222 - workspace/bbrodt/org.eclipse.bpel.apache.ode.deploy.ui.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-02-17 17:57:28 -0500 (Thu, 17 Feb 2011)
New Revision: 29222
Modified:
workspace/bbrodt/org.eclipse.bpel.apache.ode.deploy.ui/
Log:
Property changes on: workspace/bbrodt/org.eclipse.bpel.apache.ode.deploy.ui
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
pom.xml
15 years, 1 month
JBoss Tools SVN: r29221 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-02-17 17:57:24 -0500 (Thu, 17 Feb 2011)
New Revision: 29221
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
Log:
General Documentation Updates
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-02-17 22:49:33 UTC (rev 29220)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-02-17 22:57:24 UTC (rev 29221)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.0</productnumber>
<edition>4.0.0</edition>
- <pubsnumber>11</pubsnumber>
+ <pubsnumber>12</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
@@ -25,13 +25,13 @@
<!-- The following code is used to build an installation guide, which includes only the installation.xml file. To build the Installation Guide simply uncomment the following <bookinfo> tag and comment out the <bookinfo> tag above -->
-<!--<bookinfo>
+<!--bookinfo>
<title>Installation Guide</title>
<subtitle>Provides information on how to install JBoss Developer Studio.</subtitle>
<productname>JBoss Developer Studio</productname>
<productnumber>4.0</productnumber>
<edition>4.0.0</edition>
- <pubsnumber>11</pubsnumber>
+ <pubsnumber>12</pubsnumber>
<abstract>
<para>JBoss Developer Studio Installation Guide.</para>
</abstract>
@@ -44,4 +44,4 @@
</corpauthor>
<xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
-</bookinfo>-->
+</bookinfo-->
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2011-02-17 22:49:33 UTC (rev 29220)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2011-02-17 22:57:24 UTC (rev 29221)
@@ -14,17 +14,24 @@
<?dbhtml filename="ConfigJavaEnvironment.html"?>
<title>Configuring Your Java Environment</title>
<para>
- You must have a working installation of JDK before you install <property>JBoss Developer Studio</property>. Thus in this guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft Windows Platform.
+ You must have a working installation of JDK before you install <property>JBoss Developer Studio</property>. Thus in this guide we will show you how to install a 32-bit Sun JDK 6 on a Linux Platform and Microsoft Windows Platform.
</para>
- <section id="InstallJDK50onLinux">
- <title>Installing and Configuring 32-bit Sun JDK 5.0 on Linux</title>
- <para>To install 32-bit Sun JDK 5.0 on Linux and configure it, you should follow the next steps:</para>
+ <section id="InstallJDK60onLinux">
+ <title>Installing and Configuring 32-bit Sun JDK 6 on Linux</title>
+ <para>To install 32-bit Sun JDK 6 on Linux and configure it, you should follow the next steps:</para>
<itemizedlist>
<listitem>
<para>
- Download the <ulink url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0 (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK 5.0 Update <x>" (where "x" is the latest update number) for download and then select "Red Hat Package Manager in self-extracting" file for Linux. Read the instructions on Sun's website for installing the JDK.
+ Download the <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Sun JDK 6</ulink> from Sun's website. Click the <guibutton>Download JDK</guibutton> button for the "JDK SE 6 Update <x>" (where "x" is the latest update number) option, select the Linux platform, agree to license agreement, anc click the <guibutton>Continue</guibutton> button. You can then download the JDK installation package.
</para>
+ <para>
+ You may need to set the executable flag on the downloaded file before it can be launched by running the <code>chmod +x</code> command, like so:
+ <screen>chmod +x jdk-6u24-linux-i586-rpm.bin</screen>
+ </para>
+ <para>
+ Launch the installation package, and follow the prompts to install Java JDK 6.
+ </para>
</listitem>
<listitem>
<para>
@@ -34,14 +41,14 @@
<listitem>
<para>
Download and install the appropriate -compat RPM from JPackage <ulink url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/">here</ulink>. Please ensure you choose a matching version of the -compat package to the JDK you've installed.
- </para>
+ </para>
</listitem>
<listitem>
<para>
Create an environment variable that points to the JDK installation directory and call it JAVA_HOME. Add <emphasis><property>$JAVA_HOME/bin</property></emphasis> to the system path to be able to run java from the command line. You can do this by adding the following lines to the .bashrc file in your home directory.
</para>
- <programlisting><![CDATA[#In this example /usr/java/jdk1.5.0_11 is the JDK installation directory.
-export JAVA_HOME=/usr/java/jdk1.5.0_11
+ <programlisting><![CDATA[#In this example /usr/java/jdk1.6.0_24 is the JDK installation directory.
+export JAVA_HOME=/usr/java/jdk1.6.0_24
export PATH=$PATH:$JAVA_HOME/bin]]></programlisting>
</listitem>
</itemizedlist>
@@ -58,46 +65,67 @@
<itemizedlist>
<listitem>
<para>
- If you have more than one version of JVM installed on your machine, make sure you are using the JDK 1.5 installation as the default java and javac. You can do this using the alternatives system. The alternatives system allows different versions of Java from different sources to co-exist on your system.
+ If you have more than one version of JVM installed on your machine, make sure you are using the JDK 1.6 installation as the default java and javac. You can do this using the alternatives system. The alternatives system allows different versions of Java from different sources to co-exist on your system.
</para>
+ <note>
+ <title>Note</title>
+ <para>
+ If the JDK is not listed by the alternatives command, you can manually add it with the following commands (substitute the location of your JDK for <filename>/usr/java/jdk1.6.0_24</filename> where appropriate):
+ <screen>sudo /usr/sbin/alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.6.0_24/bin/java" 1
+sudo /usr/sbin/alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk1.6.0_24/bin/javac" 1
+sudo /usr/sbin/alternatives --install "/usr/lib/jvm/java-1.6.0" "java_sdk_1.6.0" "/usr/java/jdk1.6.0_24" 1</screen>
+ </para>
+ </note>
</listitem>
</itemizedlist>
<section id="SelectAlternativesforJava">
- <title>Select alternatives for java, javac and java_sdk_1.5.0</title>
+ <title>Select alternatives for java, javac and java_sdk_1.6.0</title>
<itemizedlist>
<listitem>
<para>As a root user, type the following command at the shell prompt and you should see something like this:</para>
</listitem>
</itemizedlist>
- <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config java
-There are 2 programs that provide 'java'.
-Selection Command
+ <programlisting><![CDATA[sudo /usr/sbin/alternatives --config java
+
+There are 3 programs which provide 'java'.
+
+ Selection Command
-----------------------------------------------
- 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
-*+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java
-Enter to keep the current selection[+], or type selection number:]]></programlisting>
+ 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
+* 2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
+ + 3 /usr/java/jdk1.6.0_24/bin/java
+
+Enter to keep the current selection[+], or type selection number: ]]></programlisting>
<para>
- Make sure the Sun version [jre-1.5.0-sun in this case] is selected (marked with a '+' in the output), or select it by entering its number as prompted.
+ Make sure the Sun version [/usr/java/jdk1.6.0_24/bin/java in this case] is selected (marked with a '+' in the output), or select it by entering its number as prompted.
</para>
<itemizedlist>
<listitem>
- <para>Repeat the same for javac and java_sdk_1.5.0.</para>
+ <para>Repeat the same for javac and java_sdk_1.6.0.</para>
</listitem>
</itemizedlist>
- <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config javac
-There is 1 program that provides 'javac'.
- Selection Command
+ <programlisting><![CDATA[sudo /usr/sbin/alternatives --config javac
+
+There are 2 programs which provide 'javac'.
+
+ Selection Command
-----------------------------------------------
-*+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
-Enter to keep the current selection[+], or type selection number:
+* 1 /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/javac
+ + 2 /usr/java/jdk1.6.0_24/bin/javac
-[root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
-There is 1 program that provide 'java_sdk_1.5.0'.
- Selection Command
+Enter to keep the current selection[+], or type selection number:
+
+sudo /usr/sbin/alternatives --config java_sdk_1.6.0
+
+There are 2 programs which provide 'java_sdk_1.6.0'.
+
+ Selection Command
-----------------------------------------------
-*+ 1 /usr/lib/jvm/java-1.5.0-sun
-Enter to keep the current selection[+], or type selection number:]]></programlisting>
- <para>You should verify that java, javac and java_sdk_1.5.0 all point to the same manufacturer and version.</para>
+* 1 /usr/lib/jvm/java-1.6.0-openjdk.x86_64
+ + 2 /usr/java/jdk1.6.0_24
+
+Enter to keep the current selection[+], or type selection number: ]]></programlisting>
+ <para>You should verify that java, javac and java_sdk_1.6.0 all point to the same manufacturer and version.</para>
<note>
<title>Note:</title>
<para>You can always override this step by setting the JAVA_HOME environment variable as explained in the previous step.</para>
@@ -109,26 +137,26 @@
</para>
</listitem>
</itemizedlist>
- <programlisting><![CDATA[[root@vsr ~]$ java -version
-java version "1.5.0_11"
-Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
-Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)]]></programlisting>
+ <programlisting><![CDATA[java -version
+java version "1.6.0_24"
+Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
+Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)]]></programlisting>
</section>
</section>
- <section id="InstallJDK50onWindows">
- <title>Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft Windows</title>
+ <section id="InstallJDK60onWindows">
+ <title>Installing and Configuring 32-bit Sun JDK 6 on Microsoft Windows</title>
- <para>To install and configure 32-bit Sun JDK 5.0 on Microsoft Windows, follow these steps:</para>
+ <para>To install and configure 32-bit Sun JDK 6 on Microsoft Windows, follow these steps:</para>
<itemizedlist>
<listitem>
<para>
- Download the <ulink url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0 (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK 5.0 Update <x>" (where "x" is the latest update number) for download and then select your Windows Platform options to perform the installation.
+ Download the <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Sun JDK 6</ulink> from Oracle's website. Choose "JDK 6 Update <x>" (where "x" is the latest update number) for download and then select your Windows Platform options to perform the installation.
</para>
</listitem>
<listitem>
<para>
- Create an environment variable called JAVA_HOME that points to the JDK installation directory, for example: <emphasis>C:\Program Files\Java\jdk1.5.0_11\</emphasis>
+ Create an environment variable called JAVA_HOME that points to the JDK installation directory, for example: <emphasis>C:\Program Files\Java\jdk1.6.0_24\</emphasis>
</para>
</listitem>
</itemizedlist>
@@ -136,7 +164,7 @@
<para>In order to run java from the command line, add the <emphasis>jre\bin</emphasis> directory
to your path, for example:</para>
<para>
- <emphasis>C:\Program Files\Java\jdk1.5.0_11\jre\bin</emphasis>
+ <emphasis>C:\Program Files\Java\jdk1.6.0_24\jre\bin</emphasis>
</para>
<para>To do this, open the <emphasis>
<property>Control Panel</property>
@@ -149,7 +177,7 @@
</emphasis> Tab, and click on the <emphasis>
<property>Environment Variables</property>
</emphasis> button.</para>
- <para>Now, when 32-bit Sun JDK 5.0 has been successfully installed, we can pass on to the next
+ <para>Now, when 32-bit Sun JDK 6 has been successfully installed, we can pass on to the next
step.</para>
</section>
@@ -363,6 +391,13 @@
</note>
</section>
+
+ <section>
+ <title>Updating JBoss Developer Studio</title>
+ <para>
+ Updates to JBDS can be installed by selecting <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Check For Updates</guimenuitem></menuchoice> from withing Eclipse. You may be prompted for a username and password. These are the same credentials that are required to access the Tech Preview update site (see <xref linkend="tech_previews"/>).
+ </para>
+ </section>
<!--section id="jbds_jbosstools">
15 years, 1 month