You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2007/04/05 19:32:37 UTC
svn commit: r525908 [1/2] - in /activemq/camel/trunk/camel-eclipse: ./
camel-gmf/ camel-gmf/META-INF/ camel-gmf/model/ camel-gmf/src/
camel.routing.editor/ camel.routing.editor/META-INF/
camel.routing.editor/icons/ camel.routing.editor/src-gen/ camel.r...
Author: jstrachan
Date: Thu Apr 5 10:32:34 2007
New Revision: 525908
URL: http://svn.apache.org/viewvc?view=rev&rev=525908
Log:
Added experimental eclipse DSL editor
Added:
activemq/camel/trunk/camel-eclipse/
activemq/camel/trunk/camel-eclipse/camel-gmf/
activemq/camel/trunk/camel-eclipse/camel-gmf/.classpath
activemq/camel/trunk/camel-eclipse/camel-gmf/.project
activemq/camel/trunk/camel-eclipse/camel-gmf/META-INF/
activemq/camel/trunk/camel-eclipse/camel-gmf/META-INF/MANIFEST.MF
activemq/camel/trunk/camel-eclipse/camel-gmf/model/
activemq/camel/trunk/camel-eclipse/camel-gmf/src/
activemq/camel/trunk/camel-eclipse/camel.routing/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/.classpath
activemq/camel/trunk/camel-eclipse/camel.routing.editor/.project
activemq/camel/trunk/camel-eclipse/camel.routing.editor/META-INF/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/META-INF/MANIFEST.MF
activemq/camel/trunk/camel-eclipse/camel.routing.editor/build.properties
activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/default.gif (with props)
activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/generate_class.gif (with props)
activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/process.gif (with props)
activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/process2.gif (with props)
activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/route.gif (with props)
activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/send.gif (with props)
activemq/camel/trunk/camel-eclipse/camel.routing.editor/plugin.xml
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorExtensions.ext
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/
activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java
activemq/camel/trunk/camel-eclipse/camel.routing.generator/
activemq/camel/trunk/camel-eclipse/camel.routing.generator/.classpath
activemq/camel/trunk/camel-eclipse/camel.routing.generator/.project
activemq/camel/trunk/camel-eclipse/camel.routing.generator/META-INF/
activemq/camel/trunk/camel-eclipse/camel.routing.generator/META-INF/MANIFEST.MF
activemq/camel/trunk/camel-eclipse/camel.routing.generator/build.properties
activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/
activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/
activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/
activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/
activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/
activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/Main.xpt
activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/generator.oaw
activemq/camel/trunk/camel-eclipse/camel.routing/.classpath
activemq/camel/trunk/camel-eclipse/camel.routing/.project
activemq/camel/trunk/camel-eclipse/camel.routing/META-INF/
activemq/camel/trunk/camel-eclipse/camel.routing/META-INF/MANIFEST.MF
activemq/camel/trunk/camel-eclipse/camel.routing/build.properties (with props)
activemq/camel/trunk/camel-eclipse/camel.routing/src/
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/debugMeWithAntlrWorks.g
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/Metamodel.oaw
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/camel.ecore
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/Parser.oaw
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.g
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.tokens
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java (with props)
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelParser.java
activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel__.gl
activemq/camel/trunk/camel-eclipse/camel.routing/src/camel.xtxt
activemq/camel/trunk/camel-eclipse/camel.routing/src/generate.oaw
activemq/camel/trunk/camel-eclipse/camel.routing/src/generate.properties (with props)
activemq/camel/trunk/camel-eclipse/camel.routing/src/org/
activemq/camel/trunk/camel-eclipse/camel.routing/src/org/apache/
activemq/camel/trunk/camel-eclipse/camel.routing/src/org/apache/camel/
activemq/camel/trunk/camel-eclipse/camel.routing/src/org/apache/camel/eclipse/
activemq/camel/trunk/camel-eclipse/camel.routing/src/org/apache/camel/eclipse/camelChecks.chk
Added: activemq/camel/trunk/camel-eclipse/camel-gmf/.classpath
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel-gmf/.classpath?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel-gmf/.classpath (added)
+++ activemq/camel/trunk/camel-eclipse/camel-gmf/.classpath Thu Apr 5 10:32:34 2007
@@ -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: activemq/camel/trunk/camel-eclipse/camel-gmf/.project
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel-gmf/.project?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel-gmf/.project (added)
+++ activemq/camel/trunk/camel-eclipse/camel-gmf/.project Thu Apr 5 10:32:34 2007
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>camel-gmf</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.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Added: activemq/camel/trunk/camel-eclipse/camel-gmf/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel-gmf/META-INF/MANIFEST.MF?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel-gmf/META-INF/MANIFEST.MF (added)
+++ activemq/camel/trunk/camel-eclipse/camel-gmf/META-INF/MANIFEST.MF Thu Apr 5 10:32:34 2007
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: camel-gmf Plug-in
+Bundle-SymbolicName: camel-gmf
+Bundle-Version: 0.1.0
+Require-Bundle: org.eclipse.emf.ecore
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/.classpath
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/.classpath?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/.classpath (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/.classpath Thu Apr 5 10:32:34 2007
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="src" path="src-gen/"/>
+ <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: activemq/camel/trunk/camel-eclipse/camel.routing.editor/.project
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/.project?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/.project (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/.project Thu Apr 5 10:32:34 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>camel.routing.editor</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.openarchitectureware.base.oawBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.openarchitectureware.base.oawNature</nature>
+ </natures>
+</projectDescription>
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/META-INF/MANIFEST.MF?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/META-INF/MANIFEST.MF (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/META-INF/MANIFEST.MF Thu Apr 5 10:32:34 2007
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: camel Editor Plug-in
+Bundle-SymbolicName: camel.routing.editor; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.apache.camel.eclipse.camelEditorPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.ui.views,
+ org.eclipse.core.resources,
+ org.eclipse.ui.ide,
+ org.openarchitectureware.xtext.editor.base,
+ org.openarchitectureware.xtext.core,
+ camel.routing
+Eclipse-LazyStart: true
+Export-Package: org.apache.camel.eclipse,
+ org.apache.camel.eclipse.editor
+Bundle-ClassPath: .
+
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/build.properties
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/build.properties?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/build.properties (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/build.properties Thu Apr 5 10:32:34 2007
@@ -0,0 +1,6 @@
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/default.gif
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/default.gif?view=auto&rev=525908
==============================================================================
Binary file - no diff available.
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/default.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/generate_class.gif
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/generate_class.gif?view=auto&rev=525908
==============================================================================
Binary file - no diff available.
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/generate_class.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/process.gif
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/process.gif?view=auto&rev=525908
==============================================================================
Binary file - no diff available.
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/process.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/process2.gif
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/process2.gif?view=auto&rev=525908
==============================================================================
Binary file - no diff available.
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/process2.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/route.gif
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/route.gif?view=auto&rev=525908
==============================================================================
Binary file - no diff available.
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/route.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/send.gif
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/send.gif?view=auto&rev=525908
==============================================================================
Binary file - no diff available.
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing.editor/icons/send.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/plugin.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/plugin.xml?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/plugin.xml (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/plugin.xml Thu Apr 5 10:32:34 2007
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.apache.camel.eclipse.editor.camelEditor"
+ contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
+ extensions="camel"
+ icon="icons/default.gif"
+ id="camel.routing.editor.camelEditor"
+ name="camel Editor">
+ </editor>
+ </extension>
+
+</plugin>
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java Thu Apr 5 10:32:34 2007
@@ -0,0 +1,34 @@
+package org.apache.camel.eclipse;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.openarchitectureware.xtext.editor.scanning.AbstractPartitionScanner;
+
+public class GeneratedPartitionScanner extends AbstractPartitionScanner {
+
+ @Override
+ public List<IPredicateRule> getRules() {
+ List<IPredicateRule> rules = new ArrayList<IPredicateRule>();
+
+ rules.add(new MultiLineRule("/*","*/", comment));
+ rules.add(new SingleLineRule("//", "", comment));
+ rules.add(new MultiLineRule("\"","\"", string));
+ rules.add(new MultiLineRule("'","'", string));
+ return rules;
+ }
+
+ protected IToken getSingleLineCommentToken(String string) {
+ return comment;
+ }
+
+ protected IToken getStringToken(String start, String end) {
+ return string;
+ }
+
+}
+
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java Thu Apr 5 10:32:34 2007
@@ -0,0 +1,81 @@
+package org.apache.camel.eclipse;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.antlr.runtime.ANTLRInputStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.TokenStream;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
+import org.openarchitectureware.xtext.AbstractLanguageUtilities;
+import org.openarchitectureware.type.MetaModel;
+import org.openarchitectureware.type.emf.EmfMetaModel;
+import org.openarchitectureware.xtext.parser.EcoreModelFactory;
+import org.openarchitectureware.xtext.parser.ParseResult;
+import org.apache.camel.eclipse.parser.camelLexer;
+import org.apache.camel.eclipse.parser.camelParser;
+import org.osgi.framework.Bundle;
+
+public class camelUtilities extends AbstractLanguageUtilities {
+
+ public TokenStream getScanner(InputStream reader) throws IOException {
+ ANTLRInputStream input = new ANTLRInputStream(reader);
+ camelLexer lexer = new camelLexer(input);
+ return new CommonTokenStream(lexer);
+ }
+
+ public ParseResult internalParse(TokenStream scanner, EcoreModelFactory f)
+ throws RecognitionException {
+ camelParser p = new camelParser(scanner, f);
+ return new ParseResult(p.parse(), p.getErrors());
+ }
+
+ public String getCheckFileName() {
+ return "org::apache::camel::eclipse::camelChecks";
+ }
+
+ public String getFileExtension() {
+ return "camel";
+ }
+
+ private List<MetaModel> mms = null;
+ @Override
+ public List<MetaModel> getMetaModels() {
+ if (mms==null) {
+ mms = new ArrayList<MetaModel>();
+ EmfMetaModel mm = new EmfMetaModel();
+ mm.setMetaModelFile("org/apache/camel/eclipse/camel.ecore");
+ mms.add(mm);
+ }
+ return mms;
+ }
+
+ public String getLabelExtensionsFileName() {
+ return "org::apache::camel::eclipse::camelEditorExtensions";
+ }
+
+ public String getImageExtensionsFileName() {
+ return "org::apache::camel::eclipse::camelEditorExtensions";
+ }
+
+ public String[] allKeywords() {
+ return new String[] { "process","to","from" };
+ }
+
+ public ClassLoader getClassLoader() {
+ return this.getClass().getClassLoader();
+ }
+
+ public IPartitionTokenScanner getPartitionScanner() {
+ return new GeneratedPartitionScanner();
+ }
+
+ @Override
+ public Bundle getPluginBundle() {
+ return camelEditorPlugin.getDefault().getBundle();
+ }
+}
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorExtensions.ext
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorExtensions.ext?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorExtensions.ext (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorExtensions.ext Thu Apr 5 10:32:34 2007
@@ -0,0 +1,28 @@
+import camel;
+
+/*
+ * the label extension is used to determine the name of an
+ * AST element. The name is shown in the outline view.
+ * if returns null, the element (and it's chidlren) is not shown
+ * in the outline view
+ */
+label(Object this) : metaType.getProperty("name")!=null ? metaType.getProperty("name").get(this) : null;
+
+label(Route this) : from;
+label(Send this) : uri;
+label(Process this) : type;
+
+/*
+ * the image extension is used to determine the name of an
+ * image (relative to the icons folder) for the given AST element.
+ * The image is displayed in the outline view.
+ */
+image(Object this) : "default.gif";
+image(Route this) : "route.gif";
+image(Send this) : "send.gif";
+image(Process this) : "process.gif";
+
+/*
+ * return a list of strings to be proposed.
+ */
+List[String] proposals(Object this) : {};
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java Thu Apr 5 10:32:34 2007
@@ -0,0 +1,26 @@
+package org.apache.camel.eclipse;
+
+import org.openarchitectureware.xtext.AbstractXtextEditorPlugin;
+import org.openarchitectureware.xtext.LanguageUtilities;
+import org.osgi.framework.BundleContext;
+
+public class camelEditorPlugin extends AbstractXtextEditorPlugin {
+ private static camelEditorPlugin plugin;
+ public static camelEditorPlugin getDefault() {
+ return plugin;
+ }
+
+ private camelUtilities utilities = new camelUtilities();
+ public LanguageUtilities getUtilities() {
+ return utilities;
+ }
+
+ public camelEditorPlugin() {
+ plugin = this;
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+}
Added: activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java Thu Apr 5 10:32:34 2007
@@ -0,0 +1,13 @@
+package org.apache.camel.eclipse.editor;
+
+import org.openarchitectureware.xtext.AbstractXtextEditorPlugin;
+import org.openarchitectureware.xtext.editor.AbstractXtextEditor;
+
+import org.apache.camel.eclipse.camelEditorPlugin;
+
+public class camelEditor extends AbstractXtextEditor {
+
+ protected AbstractXtextEditorPlugin getPlugin() {
+ return camelEditorPlugin.getDefault();
+ }
+}
Added: activemq/camel/trunk/camel-eclipse/camel.routing.generator/.classpath
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.generator/.classpath?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.generator/.classpath (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.generator/.classpath Thu Apr 5 10:32:34 2007
@@ -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: activemq/camel/trunk/camel-eclipse/camel.routing.generator/.project
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.generator/.project?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.generator/.project (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.generator/.project Thu Apr 5 10:32:34 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>camel.routing.generator</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.openarchitectureware.base.oawBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.openarchitectureware.base.oawNature</nature>
+ </natures>
+</projectDescription>
Added: activemq/camel/trunk/camel-eclipse/camel.routing.generator/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.generator/META-INF/MANIFEST.MF?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.generator/META-INF/MANIFEST.MF (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.generator/META-INF/MANIFEST.MF Thu Apr 5 10:32:34 2007
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: camel.routing.generator
+Bundle-SymbolicName: camel.routing.generator; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Require-Bundle: org.openarchitectureware.core.check,
+ org.openarchitectureware.core.emftools,
+ org.openarchitectureware.xtext.editor.base,
+ camel.routing,
+ org.openarchitectureware.xtext.core,
+ org.openarchitectureware.core.xpand2
Added: activemq/camel/trunk/camel-eclipse/camel.routing.generator/build.properties
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.generator/build.properties?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.generator/build.properties (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.generator/build.properties Thu Apr 5 10:32:34 2007
@@ -0,0 +1,2 @@
+source.. = src/
+bin.includes = META-INF/,\n .
Added: activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/Main.xpt
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/Main.xpt?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/Main.xpt (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/Main.xpt Thu Apr 5 10:32:34 2007
@@ -0,0 +1,9 @@
+ÇIMPORT camelÈ
+
+ÇREMÈ
+ This is the 'main' template.
+ You should replace the type 'Object' with your respective meta type.
+ÇENDREMÈ
+ÇDEFINE main FOR ObjectÈ
+
+ÇENDDEFINEÈ
\ No newline at end of file
Added: activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/generator.oaw
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/generator.oaw?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/generator.oaw (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing.generator/src/org/apache/camel/eclipse/generator.oaw Thu Apr 5 10:32:34 2007
@@ -0,0 +1,16 @@
+<workflow>
+<property name='targetDir' value='src-gen/'/>
+ <bean id='mm' file='org/apache/camel/eclipse/Metamodel.oaw'/>
+ <component file='org/apache/camel/eclipse/parser/Parser.oaw'>
+ <metaModel idRef='mm'/>
+ <modelFile value='${modelFile}'/>
+ <outputSlot value='theModel'/>
+ </component>
+ <component class='oaw.workflow.common.DirectoryCleaner' directories='${targetDir}'/>
+ <component class='oaw.xpand2.Generator'>
+ <metaModel idRef='mm'/>
+ <expand value='org::apache::camel::eclipse::Main::main FOR theModel'/>
+ <genPath value='${targetDir}'/>
+ <fileEncoding value='iso-8859-1'/>
+ </component>
+s</workflow>
\ No newline at end of file
Added: activemq/camel/trunk/camel-eclipse/camel.routing/.classpath
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/.classpath?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/.classpath (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/.classpath Thu Apr 5 10:32:34 2007
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="src" path="src-gen/"/>
+ <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: activemq/camel/trunk/camel-eclipse/camel.routing/.project
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/.project?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/.project (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/.project Thu Apr 5 10:32:34 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>camel.routing</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.openarchitectureware.base.oawBuilder</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.jdt.core.javanature</nature>
+ <nature>org.openarchitectureware.base.oawNature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Added: activemq/camel/trunk/camel-eclipse/camel.routing/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/META-INF/MANIFEST.MF?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/META-INF/MANIFEST.MF (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/META-INF/MANIFEST.MF Thu Apr 5 10:32:34 2007
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: camel Plug-in
+Bundle-SymbolicName: camel.routing
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.openarchitectureware.xtext.core,
+ org.openarchitectureware.core.workflow;visibility:=reexport,
+ org.openarchitectureware.core.check;visibility:=reexport,
+ org.openarchitectureware.core.emftools;visibility:=reexport,
+ org.openarchitectureware.core.libraries;visibility:=reexport,
+ org.openarchitectureware.core.xpand2;visibility:=reexport,
+ org.openarchitectureware.core.expressions;visibility:=reexport
+Eclipse-LazyStart: true
+Export-Package: org.apache.camel.eclipse,
+ org.apache.camel.eclipse.parser
+
Added: activemq/camel/trunk/camel-eclipse/camel.routing/build.properties
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/build.properties?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/build.properties (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/build.properties Thu Apr 5 10:32:34 2007
@@ -0,0 +1,5 @@
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing/build.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing/build.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing/build.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/debugMeWithAntlrWorks.g
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/debugMeWithAntlrWorks.g?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/debugMeWithAntlrWorks.g (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/debugMeWithAntlrWorks.g Thu Apr 5 10:32:34 2007
@@ -0,0 +1,65 @@
+grammar debugMeWithAntlrWorks;
+
+
+
+parse :
+ result=ruleRoutes EOF ;
+
+
+ruleRoutes :
+ (ruleRoute)*
+;
+
+ruleRoute :
+ 'from' ID (ruleProcessor)* ';'
+;
+
+ruleProcessor :
+
+ ruleSend
+ |
+ ruleProcess
+;
+
+ruleSend :
+ 'to' ID
+;
+
+ruleProcess :
+ 'process' ID
+;
+
+
+
+STRING :
+ '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' |
+ '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
+
+
+
+ID :
+ ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
+;
+
+
+
+INT :
+ ('0'..'9')+
+;
+
+
+
+ML_COMMENT
+ : '/*' ( options {greedy=false;} : . )* '*/' {skip();}
+ ;
+
+
+
+SL_COMMENT
+ : '//' ~('\n'|'\r')* '\r'? '\n' {skip();}
+ ;
+
+
+
+WS : (' '|'\t'|'\r'|'\n')+ {skip();} ;
+
Added: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/Metamodel.oaw
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/Metamodel.oaw?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/Metamodel.oaw (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/Metamodel.oaw Thu Apr 5 10:32:34 2007
@@ -0,0 +1,2 @@
+<metamodel class="oaw.type.emf.EmfMetaModel"
+ metaModelFile="org/apache/camel/eclipse/camel.ecore"/>
Added: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/camel.ecore
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/camel.ecore?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/camel.ecore (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/camel.ecore Thu Apr 5 10:32:34 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ASCII"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="camel"
+ nsURI="http://camel.apache.org/routing/1.0" nsPrefix="camel">
+ <eClassifiers xsi:type="ecore:EClass" name="Routes">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="routes" upperBound="-1"
+ eType="#//Route" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Route">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="from" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="processors" upperBound="-1"
+ eType="#//Processor" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Processor"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Send" eSuperTypes="#//Processor">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="uri" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Process" eSuperTypes="#//Processor">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
Added: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/Parser.oaw
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/Parser.oaw?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/Parser.oaw (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/Parser.oaw Thu Apr 5 10:32:34 2007
@@ -0,0 +1,13 @@
+<workflow>
+ <component class="org.apache.camel.eclipse.parser.ParserComponent">
+ <metaModel idRef="metaModel"/>
+ <modelFile value="${modelFile}"/>
+ <outputSlot value="${outputSlot}"/>
+ </component>
+
+ <component class="oaw.check.CheckComponent">
+ <metaModel idRef="metaModel"/>
+ <expression value="${outputSlot}.eAllContents.union({${outputSlot}})"/>
+ <checkFile value="org::apache::camel::eclipse::camelChecks"/>
+ </component>
+</workflow>
Added: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java Thu Apr 5 10:32:34 2007
@@ -0,0 +1,25 @@
+package org.apache.camel.eclipse.parser;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import org.antlr.runtime.ANTLRReaderStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.RecognitionException;
+
+import org.openarchitectureware.xtext.parser.AbstractParserComponent;
+import org.openarchitectureware.xtext.parser.EcoreModelFactory;
+import org.openarchitectureware.xtext.parser.ParseResult;
+
+public class ParserComponent extends AbstractParserComponent {
+
+ @Override
+ protected ParseResult internalParse(Reader reader, EcoreModelFactory factory) throws IOException, RecognitionException {
+ ANTLRReaderStream input = new ANTLRReaderStream(reader);
+ camelLexer lexer = new camelLexer(input);
+ CommonTokenStream tokens = new CommonTokenStream(lexer);
+ camelParser p = new camelParser(tokens, factory);
+ return new ParseResult(p.parse(),p.getErrors());
+ }
+
+}
Added: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.g
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.g?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.g (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.g Thu Apr 5 10:32:34 2007
@@ -0,0 +1,153 @@
+grammar camel;
+
+@lexer::header {
+package org.apache.camel.eclipse.parser;
+}
+
+@parser::header {
+package org.apache.camel.eclipse.parser;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Collections;
+
+import org.eclipse.emf.ecore.EObject;
+import org.openarchitectureware.xtext.loc.LocationTool;
+import org.openarchitectureware.xtext.parser.*;
+}
+
+@parser::members {
+ private Object value(Object obj) {
+ if (obj == null)
+ return null;
+ if (obj instanceof Token) {
+ Token t = (Token) obj;
+ if (t.getType() == camelLexer.INT)
+ return Integer.valueOf(t.getText());
+ if (t.getType() == camelLexer.STRING)
+ return t.getText().substring(1, t.getText().length() - 1);
+ if (t.getText().startsWith("^"))
+ return t.getText().substring(1, t.getText().length());
+ return t.getText();
+ }
+ return obj;
+ }
+
+ private Object value(Object a, Object... b) {
+ if (a!=null)
+ return value(a);
+ for (int i = 0; i < b.length; i++) {
+ Object object = b[i];
+ if (object!=null)
+ return value(object);
+ }
+ return null;
+ }
+
+ private void loc(Token start,Token end,Object ele) {
+ int s = start.getTokenIndex();
+ if (start instanceof CommonToken) {
+ s = ((CommonToken)start).getStartIndex();
+ }
+ int l = start.getLine();
+ int e = end.getTokenIndex();
+ if (end instanceof CommonToken) {
+ e = ((CommonToken)end).getStopIndex()+1;
+ }
+ LocationTool.setLocation(ele,s,e,l);
+ }
+ private EcoreModelFactory factory;
+ public camelParser(TokenStream stream, EcoreModelFactory factory) {
+ this(stream);
+ this.factory = factory;
+ }
+
+ private List<ErrorMsg> errors = new ArrayList<ErrorMsg>();
+ public List<ErrorMsg> getErrors() {
+ return errors;
+ }
+
+ public String getErrorMessage(RecognitionException e, String[] tokenNames) {
+ errors.add(ErrorMsg.create(e,tokenNames));
+ return super.getErrorMessage(e,tokenNames);
+ }
+}
+
+
+parse returns [Object o] :
+ result=ruleRoutes EOF {$o=result;};
+
+
+ruleRoutes returns [Object result] :
+ { List routesList = new ArrayList();
+ Token start = input.LT(1);}
+ (a_routes=ruleRoute{routesList.add(a_routes);})*
+ { result = factory.create("new Routes", "routes.addAll(arg1)",routesList);
+ loc(start, input.LT(0)==null?input.LT(-1):input.LT(0), result); }
+;
+
+ruleRoute returns [Object result] :
+ { List processorsList = new ArrayList();
+ Token start = input.LT(1);}
+ 'from' a_from_0_0_1=ID (a_processors=ruleProcessor{processorsList.add(a_processors);})* ';'
+ { result = factory.create("new Route", "setFrom(arg1)->processors.addAll(arg2)",value(a_from_0_0_1),processorsList);
+ loc(start, input.LT(0)==null?input.LT(-1):input.LT(0), result); }
+;
+
+ruleProcessor returns [Object result] :
+
+ a0=ruleSend{$result=a0;}
+ |
+ a1=ruleProcess{$result=a1;}
+;
+
+ruleSend returns [Object result] :
+ {
+ Token start = input.LT(1);}
+ 'to' a_uri_0_0_1=ID
+ { result = factory.create("new Send", "setUri(arg1)",value(a_uri_0_0_1));
+ loc(start, input.LT(0)==null?input.LT(-1):input.LT(0), result); }
+;
+
+ruleProcess returns [Object result] :
+ {
+ Token start = input.LT(1);}
+ 'process' a_type_0_0_1=ID
+ { result = factory.create("new Process", "setType(arg1)",value(a_type_0_0_1));
+ loc(start, input.LT(0)==null?input.LT(-1):input.LT(0), result); }
+;
+
+
+
+STRING :
+ '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' |
+ '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
+
+
+
+ID :
+ ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
+;
+
+
+
+INT :
+ ('0'..'9')+
+;
+
+
+
+ML_COMMENT
+ : '/*' ( options {greedy=false;} : . )* '*/' {skip();}
+ ;
+
+
+
+SL_COMMENT
+ : '//' ~('\n'|'\r')* '\r'? '\n' {skip();}
+ ;
+
+
+
+WS : (' '|'\t'|'\r'|'\n')+ {skip();} ;
+
Added: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.tokens
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.tokens?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.tokens (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camel.tokens Thu Apr 5 10:32:34 2007
@@ -0,0 +1,10 @@
+INT=6
+WS=9
+STRING=5
+ML_COMMENT=7
+SL_COMMENT=8
+ID=4
+'to'=12
+'from'=10
+'process'=13
+';'=11
Added: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java?view=auto&rev=525908
==============================================================================
--- activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java (added)
+++ activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java Thu Apr 5 10:32:34 2007
@@ -0,0 +1,930 @@
+// $ANTLR 3.0b6 ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g 2007-04-05 12:20:03
+
+package org.apache.camel.eclipse.parser;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class camelLexer extends Lexer {
+ public static final int T10=10;
+ public static final int T11=11;
+ public static final int INT=6;
+ public static final int EOF=-1;
+ public static final int WS=9;
+ public static final int STRING=5;
+ public static final int T12=12;
+ public static final int Tokens=14;
+ public static final int ML_COMMENT=7;
+ public static final int T13=13;
+ public static final int SL_COMMENT=8;
+ public static final int ID=4;
+ public camelLexer() {;}
+ public camelLexer(CharStream input) {
+ super(input);
+ }
+ public String getGrammarFileName() { return "..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g"; }
+
+ // $ANTLR start T10
+ public void mT10() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T10;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:6:7: ( 'from' )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:6:7: 'from'
+ {
+ match("from");
+
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T10
+
+ // $ANTLR start T11
+ public void mT11() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T11;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:7:7: ( ';' )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:7:7: ';'
+ {
+ match(';');
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T11
+
+ // $ANTLR start T12
+ public void mT12() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T12;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:8:7: ( 'to' )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:8:7: 'to'
+ {
+ match("to");
+
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T12
+
+ // $ANTLR start T13
+ public void mT13() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T13;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:9:7: ( 'process' )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:9:7: 'process'
+ {
+ match("process");
+
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T13
+
+ // $ANTLR start STRING
+ public void mSTRING() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = STRING;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:123:5: ( '\"' ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | ~ ('\\\\'|'\"'))* '\"' | '\\'' ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | ~ ('\\\\'|'\\''))* '\\'' )
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+ if ( (LA3_0=='\"') ) {
+ alt3=1;
+ }
+ else if ( (LA3_0=='\'') ) {
+ alt3=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("122:1: STRING : ( '\"' ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | ~ ('\\\\'|'\"'))* '\"' | '\\'' ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | ~ ('\\\\'|'\\''))* '\\'' );", 3, 0, input);
+
+ throw nvae;
+ }
+ switch (alt3) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:123:5: '\"' ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | ~ ('\\\\'|'\"'))* '\"'
+ {
+ match('\"');
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:123:9: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | ~ ('\\\\'|'\"'))*
+ loop1:
+ do {
+ int alt1=3;
+ int LA1_0 = input.LA(1);
+ if ( (LA1_0=='\\') ) {
+ alt1=1;
+ }
+ else if ( ((LA1_0>='\u0000' && LA1_0<='!')||(LA1_0>='#' && LA1_0<='[')||(LA1_0>=']' && LA1_0<='\uFFFE')) ) {
+ alt1=2;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:123:11: '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\')
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:123:55: ~ ('\\\\'|'\"')
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && 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 loop1;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:124:5: '\\'' ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | ~ ('\\\\'|'\\''))* '\\''
+ {
+ match('\'');
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:124:10: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | ~ ('\\\\'|'\\''))*
+ loop2:
+ do {
+ int alt2=3;
+ int LA2_0 = input.LA(1);
+ if ( (LA2_0=='\\') ) {
+ alt2=1;
+ }
+ else if ( ((LA2_0>='\u0000' && LA2_0<='&')||(LA2_0>='(' && LA2_0<='[')||(LA2_0>=']' && LA2_0<='\uFFFE')) ) {
+ alt2=2;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:124:12: '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\')
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:124:56: ~ ('\\\\'|'\\'')
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && 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 loop2;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end STRING
+
+ // $ANTLR start ID
+ public void mID() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = ID;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:129:2: ( ( '^' )? ('a'..'z'|'A'..'Z'|'_') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'))* )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:129:2: ( '^' )? ('a'..'z'|'A'..'Z'|'_') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'))*
+ {
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:129:2: ( '^' )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+ if ( (LA4_0=='^') ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:129:3: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:129:32: ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'))*
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+ if ( ((LA5_0>='0' && LA5_0<='9')||(LA5_0>='A' && LA5_0<='Z')||LA5_0=='_'||(LA5_0>='a' && LA5_0<='z')) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:129:33: ('a'..'z'|'A'..'Z'|'_'|'0'..'9')
+ {
+ if ( (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.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end ID
+
+ // $ANTLR start INT
+ public void mINT() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = INT;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:135:2: ( ( '0' .. '9' )+ )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:135:2: ( '0' .. '9' )+
+ {
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:135:2: ( '0' .. '9' )+
+ int cnt6=0;
+ loop6:
+ do {
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+ if ( ((LA6_0>='0' && LA6_0<='9')) ) {
+ alt6=1;
+ }
+
+
+ switch (alt6) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:135:3: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt6 >= 1 ) break loop6;
+ EarlyExitException eee =
+ new EarlyExitException(6, input);
+ throw eee;
+ }
+ cnt6++;
+ } while (true);
+
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end INT
+
+ // $ANTLR start ML_COMMENT
+ public void mML_COMMENT() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = ML_COMMENT;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:141:9: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:141:9: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:141:14: ( options {greedy=false; } : . )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+ if ( (LA7_0=='*') ) {
+ int LA7_1 = input.LA(2);
+ if ( (LA7_1=='/') ) {
+ alt7=2;
+ }
+ else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFE')) ) {
+ alt7=1;
+ }
+
+
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFE')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:141:42: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+ skip();
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end ML_COMMENT
+
+ // $ANTLR start SL_COMMENT
+ public void mSL_COMMENT() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = SL_COMMENT;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:147:7: ( '//' (~ ('\\n'|'\\r'))* ( '\\r' )? '\\n' )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:147:7: '//' (~ ('\\n'|'\\r'))* ( '\\r' )? '\\n'
+ {
+ match("//");
+
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:147:12: (~ ('\\n'|'\\r'))*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+ if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFE')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:147:12: ~ ('\\n'|'\\r')
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:147:26: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:147:26: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+ skip();
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end SL_COMMENT
+
+ // $ANTLR start WS
+ public void mWS() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = WS;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:152:6: ( ( (' '|'\\t'|'\\r'|'\\n'))+ )
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:152:6: ( (' '|'\\t'|'\\r'|'\\n'))+
+ {
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:152:6: ( (' '|'\\t'|'\\r'|'\\n'))+
+ int cnt10=0;
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+ if ( ((LA10_0>='\t' && LA10_0<='\n')||LA10_0=='\r'||LA10_0==' ') ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:152:7: (' '|'\\t'|'\\r'|'\\n')
+ {
+ 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 ( cnt10 >= 1 ) break loop10;
+ EarlyExitException eee =
+ new EarlyExitException(10, input);
+ throw eee;
+ }
+ cnt10++;
+ } while (true);
+
+ skip();
+
+ }
+
+
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end WS
+
+ public void mTokens() throws RecognitionException {
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:10: ( T10 | T11 | T12 | T13 | STRING | ID | INT | ML_COMMENT | SL_COMMENT | WS )
+ int alt11=10;
+ switch ( input.LA(1) ) {
+ case 'f':
+ int LA11_1 = input.LA(2);
+ if ( (LA11_1=='r') ) {
+ int LA11_10 = input.LA(3);
+ if ( (LA11_10=='o') ) {
+ int LA11_15 = input.LA(4);
+ if ( (LA11_15=='m') ) {
+ int LA11_18 = input.LA(5);
+ if ( ((LA11_18>='0' && LA11_18<='9')||(LA11_18>='A' && LA11_18<='Z')||LA11_18=='_'||(LA11_18>='a' && LA11_18<='z')) ) {
+ alt11=6;
+ }
+ else {
+ alt11=1;}
+ }
+ else {
+ alt11=6;}
+ }
+ else {
+ alt11=6;}
+ }
+ else {
+ alt11=6;}
+ break;
+ case ';':
+ alt11=2;
+ break;
+ case 't':
+ int LA11_3 = input.LA(2);
+ if ( (LA11_3=='o') ) {
+ int LA11_11 = input.LA(3);
+ if ( ((LA11_11>='0' && LA11_11<='9')||(LA11_11>='A' && LA11_11<='Z')||LA11_11=='_'||(LA11_11>='a' && LA11_11<='z')) ) {
+ alt11=6;
+ }
+ else {
+ alt11=3;}
+ }
+ else {
+ alt11=6;}
+ break;
+ case 'p':
+ int LA11_4 = input.LA(2);
+ if ( (LA11_4=='r') ) {
+ int LA11_12 = input.LA(3);
+ if ( (LA11_12=='o') ) {
+ int LA11_17 = input.LA(4);
+ if ( (LA11_17=='c') ) {
+ int LA11_19 = input.LA(5);
+ if ( (LA11_19=='e') ) {
+ int LA11_21 = input.LA(6);
+ if ( (LA11_21=='s') ) {
+ int LA11_22 = input.LA(7);
+ if ( (LA11_22=='s') ) {
+ int LA11_23 = input.LA(8);
+ if ( ((LA11_23>='0' && LA11_23<='9')||(LA11_23>='A' && LA11_23<='Z')||LA11_23=='_'||(LA11_23>='a' && LA11_23<='z')) ) {
+ alt11=6;
+ }
+ else {
+ alt11=4;}
+ }
+ else {
+ alt11=6;}
+ }
+ else {
+ alt11=6;}
+ }
+ else {
+ alt11=6;}
+ }
+ else {
+ alt11=6;}
+ }
+ else {
+ alt11=6;}
+ }
+ else {
+ alt11=6;}
+ break;
+ case '\"':
+ case '\'':
+ alt11=5;
+ break;
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '^':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 's':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z':
+ alt11=6;
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ alt11=7;
+ break;
+ case '/':
+ int LA11_8 = input.LA(2);
+ if ( (LA11_8=='/') ) {
+ alt11=9;
+ }
+ else if ( (LA11_8=='*') ) {
+ alt11=8;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( T10 | T11 | T12 | T13 | STRING | ID | INT | ML_COMMENT | SL_COMMENT | WS );", 11, 8, input);
+
+ throw nvae;
+ }
+ break;
+ case '\t':
+ case '\n':
+ case '\r':
+ case ' ':
+ alt11=10;
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( T10 | T11 | T12 | T13 | STRING | ID | INT | ML_COMMENT | SL_COMMENT | WS );", 11, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt11) {
+ case 1 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:10: T10
+ {
+ mT10();
+
+ }
+ break;
+ case 2 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:14: T11
+ {
+ mT11();
+
+ }
+ break;
+ case 3 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:18: T12
+ {
+ mT12();
+
+ }
+ break;
+ case 4 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:22: T13
+ {
+ mT13();
+
+ }
+ break;
+ case 5 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:26: STRING
+ {
+ mSTRING();
+
+ }
+ break;
+ case 6 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:33: ID
+ {
+ mID();
+
+ }
+ break;
+ case 7 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:36: INT
+ {
+ mINT();
+
+ }
+ break;
+ case 8 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:40: ML_COMMENT
+ {
+ mML_COMMENT();
+
+ }
+ break;
+ case 9 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:51: SL_COMMENT
+ {
+ mSL_COMMENT();
+
+ }
+ break;
+ case 10 :
+ // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:1:62: WS
+ {
+ mWS();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+
+
+}
\ No newline at end of file
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: activemq/camel/trunk/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java
------------------------------------------------------------------------------
svn:mime-type = text/plain