camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r546580 [3/3] - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/component/direct/ camel-core/src/main/java/org/apache/camel/co...
Date Tue, 12 Jun 2007 18:20:19 GMT
Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java
Tue Jun 12 11:20:13 2007
@@ -1,104 +1,104 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.spi;
-
-import org.apache.camel.Processor;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.Exchange;
-import org.apache.camel.processor.DelegateProcessor;
-import org.apache.camel.spi.Policy;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.transaction.TransactionDefinition;
-import org.springframework.transaction.TransactionStatus;
-import org.springframework.transaction.support.TransactionCallbackWithoutResult;
-import org.springframework.transaction.support.TransactionTemplate;
-
-/**
- * Wraps the processor in a Spring transaction
- *
- * @version $Revision: 1.1 $
- */
-public class SpringTransactionPolicy<E> implements Policy<E> {
-    private static final transient Log log = LogFactory.getLog(SpringTransactionPolicy.class);
-
-    private TransactionTemplate template;
-
-    public SpringTransactionPolicy() {
-    }
-
-    public SpringTransactionPolicy(TransactionTemplate template) {
-        this.template = template;
-    }
-
-    public Processor wrap(Processor processor) {
-        final TransactionTemplate transactionTemplate = getTemplate();
-        if (transactionTemplate == null) {
-            log.warn("No TransactionTemplate available so transactions will not be enabled!");
-            return processor;
-        }
-
-        return new DelegateProcessor(processor) {
-
-            public void process(final Exchange exchange) {
-                transactionTemplate.execute(new TransactionCallbackWithoutResult() {
-                    protected void doInTransactionWithoutResult(TransactionStatus status)
{
-                        try {
-							processNext(exchange);
-						} catch (Exception e) {
-							throw new RuntimeCamelException(e);
-						}
-                    }
-                });
-            }
-
-            @Override
-            public String toString() {
-                return "SpringTransactionPolicy:"+propagationBehaviorToString(transactionTemplate.getPropagationBehavior())+"["
+ getNext() + "]";
-            }
-
-			private String propagationBehaviorToString(int propagationBehavior) {
-				switch( propagationBehavior ) {
-				case TransactionDefinition.PROPAGATION_MANDATORY:
-					return "PROPAGATION_MANDATORY";
-				case TransactionDefinition.PROPAGATION_NESTED:
-					return "PROPAGATION_NESTED";
-				case TransactionDefinition.PROPAGATION_NEVER:
-					return "PROPAGATION_NEVER";
-				case TransactionDefinition.PROPAGATION_NOT_SUPPORTED:
-					return "PROPAGATION_NOT_SUPPORTED";
-				case TransactionDefinition.PROPAGATION_REQUIRED:
-					return "PROPAGATION_REQUIRED";
-				case TransactionDefinition.PROPAGATION_REQUIRES_NEW:
-					return "PROPAGATION_REQUIRES_NEW";
-				case TransactionDefinition.PROPAGATION_SUPPORTS:
-					return "PROPAGATION_SUPPORTS";
-				}
-				return "UNKOWN";
-			}
-        };
-    }
-
-    public TransactionTemplate getTemplate() {
-        return template;
-    }
-
-    public void setTemplate(TransactionTemplate template) {
-        this.template = template;
-    }
-}
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.spi;
+
+import org.apache.camel.Processor;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.Exchange;
+import org.apache.camel.processor.DelegateProcessor;
+import org.apache.camel.spi.Policy;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.transaction.TransactionDefinition;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.support.TransactionCallbackWithoutResult;
+import org.springframework.transaction.support.TransactionTemplate;
+
+/**
+ * Wraps the processor in a Spring transaction
+ *
+ * @version $Revision: 1.1 $
+ */
+public class SpringTransactionPolicy<E> implements Policy<E> {
+    private static final transient Log log = LogFactory.getLog(SpringTransactionPolicy.class);
+
+    private TransactionTemplate template;
+
+    public SpringTransactionPolicy() {
+    }
+
+    public SpringTransactionPolicy(TransactionTemplate template) {
+        this.template = template;
+    }
+
+    public Processor wrap(Processor processor) {
+        final TransactionTemplate transactionTemplate = getTemplate();
+        if (transactionTemplate == null) {
+            log.warn("No TransactionTemplate available so transactions will not be enabled!");
+            return processor;
+        }
+
+        return new DelegateProcessor(processor) {
+
+            public void process(final Exchange exchange) {
+                transactionTemplate.execute(new TransactionCallbackWithoutResult() {
+                    protected void doInTransactionWithoutResult(TransactionStatus status)
{
+                        try {
+							processNext(exchange);
+						} catch (Exception e) {
+							throw new RuntimeCamelException(e);
+						}
+                    }
+                });
+            }
+
+            @Override
+            public String toString() {
+                return "SpringTransactionPolicy:"+propagationBehaviorToString(transactionTemplate.getPropagationBehavior())+"["
+ getNext() + "]";
+            }
+
+			private String propagationBehaviorToString(int propagationBehavior) {
+				switch( propagationBehavior ) {
+				case TransactionDefinition.PROPAGATION_MANDATORY:
+					return "PROPAGATION_MANDATORY";
+				case TransactionDefinition.PROPAGATION_NESTED:
+					return "PROPAGATION_NESTED";
+				case TransactionDefinition.PROPAGATION_NEVER:
+					return "PROPAGATION_NEVER";
+				case TransactionDefinition.PROPAGATION_NOT_SUPPORTED:
+					return "PROPAGATION_NOT_SUPPORTED";
+				case TransactionDefinition.PROPAGATION_REQUIRED:
+					return "PROPAGATION_REQUIRED";
+				case TransactionDefinition.PROPAGATION_REQUIRES_NEW:
+					return "PROPAGATION_REQUIRES_NEW";
+				case TransactionDefinition.PROPAGATION_SUPPORTS:
+					return "PROPAGATION_SUPPORTS";
+				}
+				return "UNKOWN";
+			}
+        };
+    }
+
+    public TransactionTemplate getTemplate() {
+        return template;
+    }
+
+    public void setTemplate(TransactionTemplate template) {
+        this.template = template;
+    }
+}

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/xml/BuilderAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/xml/BuilderStatement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/xml/CamelBeanDefinitionParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/xml/CamelNamespaceHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/xml/IllegalActionException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/xml/MethodInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/xml/RouteBuilderFactoryBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/InjectedBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/InjectedBeanTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/MyConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/MySender.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/PojoConsumerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/PojoSenderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/remoting/ISay.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/remoting/SayService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/remoting/SpringRemotingRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java
(original)
+++ activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java
Tue Jun 12 11:20:13 2007
@@ -1,101 +1,101 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.itest.jms;
-
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.camel.CamelContext;
-import org.apache.camel.Producer;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.jms.JmsEndpoint;
-import org.apache.camel.component.jms.JmsExchange;
-import org.apache.camel.component.jms.JmsMessage;
-import org.apache.camel.component.pojo.PojoComponent;
-import org.apache.camel.impl.DefaultCamelContext;
-import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
-import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
-
-/**
- * @version $Revision:520964 $
- */
-public class JmsIntegrationTest extends TestCase {
-	
-    protected CamelContext container = new DefaultCamelContext();
-
-    public void testDummy() {
-    }
-    
-    /**
-     * Commented out since this fails due to us not converting the JmsExchange to a PojoExchange
-     * 
-     * @throws Exception
-     */
-	public void xtestOneWayInJmsOutPojo() throws Exception {
-		
-		final CountDownLatch receivedCountDown = new CountDownLatch(1);
-		
-        // Configure the components
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        container.addComponent("activemq", jmsComponentClientAcknowledge(connectionFactory));
-        PojoComponent component = new PojoComponent();
-        component.addService("listener", new MessageListener(){
-			public void onMessage(Message msg) {
-				System.out.println("Received: "+msg);
-				receivedCountDown.countDown();				
-			}
-		});
-        container.addComponent("default", component);
-
-        // lets add a jms -> pojo route
-        container.addRoutes(new RouteBuilder() {
-            public void configure() {
-                from("jms:test").to("pojo:listener");
-            }
-        });
-        
-        container.start();
-        
-        // Send a message to the JMS endpoint
-        JmsEndpoint endpoint = (JmsEndpoint) container.getEndpoint("jms:test");        
-        Producer<JmsExchange> producer = endpoint.createProducer();
-        JmsExchange exchange = producer.createExchange();
-        JmsMessage in = exchange.getIn();
-        in.setBody("Hello");
-        in.setHeader("cheese", 123);
-        producer.process(exchange);
-        
-        // The Activated endpoint should send it to the pojo due to the configured route.
-        assertTrue("The message ware received by the Pojo", receivedCountDown.await(5, TimeUnit.SECONDS));
-        
-
-	}
-
-    @Override
-    protected void tearDown() throws Exception {
-        container.stop();
-
-        super.tearDown();
-    }
-}
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.jms;
+
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+
+import junit.framework.TestCase;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.camel.CamelContext;
+import org.apache.camel.Producer;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jms.JmsEndpoint;
+import org.apache.camel.component.jms.JmsExchange;
+import org.apache.camel.component.jms.JmsMessage;
+import org.apache.camel.component.pojo.PojoComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
+import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
+
+/**
+ * @version $Revision:520964 $
+ */
+public class JmsIntegrationTest extends TestCase {
+	
+    protected CamelContext container = new DefaultCamelContext();
+
+    public void testDummy() {
+    }
+    
+    /**
+     * Commented out since this fails due to us not converting the JmsExchange to a PojoExchange
+     * 
+     * @throws Exception
+     */
+	public void xtestOneWayInJmsOutPojo() throws Exception {
+		
+		final CountDownLatch receivedCountDown = new CountDownLatch(1);
+		
+        // Configure the components
+        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
+        container.addComponent("activemq", jmsComponentClientAcknowledge(connectionFactory));
+        PojoComponent component = new PojoComponent();
+        component.addService("listener", new MessageListener(){
+			public void onMessage(Message msg) {
+				System.out.println("Received: "+msg);
+				receivedCountDown.countDown();				
+			}
+		});
+        container.addComponent("default", component);
+
+        // lets add a jms -> pojo route
+        container.addRoutes(new RouteBuilder() {
+            public void configure() {
+                from("jms:test").to("pojo:listener");
+            }
+        });
+        
+        container.start();
+        
+        // Send a message to the JMS endpoint
+        JmsEndpoint endpoint = (JmsEndpoint) container.getEndpoint("jms:test");        
+        Producer<JmsExchange> producer = endpoint.createProducer();
+        JmsExchange exchange = producer.createExchange();
+        JmsMessage in = exchange.getIn();
+        in.setBody("Hello");
+        in.setHeader("cheese", 123);
+        producer.process(exchange);
+        
+        // The Activated endpoint should send it to the pojo due to the configured route.
+        assertTrue("The message ware received by the Pojo", receivedCountDown.await(5, TimeUnit.SECONDS));
+        
+
+	}
+
+    @Override
+    protected void tearDown() throws Exception {
+        container.stop();
+
+        super.tearDown();
+    }
+}

Propchange: activemq/camel/trunk/tests/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java
(original)
+++ activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java
Tue Jun 12 11:20:13 2007
@@ -1,34 +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;
-	}
-
-}
-
+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;
+	}
+
+}
+

Propchange: activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/GeneratedPartitionScanner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java
(original)
+++ activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java
Tue Jun 12 11:20:13 2007
@@ -1,81 +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();
-	}
-}
+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();
+	}
+}

Propchange: activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src-gen/org/apache/camel/eclipse/camelUtilities.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java
(original)
+++ activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java
Tue Jun 12 11:20:13 2007
@@ -1,26 +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;
-   }
-}
+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;
+   }
+}

Propchange: activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/camelEditorPlugin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java
(original)
+++ activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java
Tue Jun 12 11:20:13 2007
@@ -1,13 +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();
-   }
-}
+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();
+   }
+}

Propchange: activemq/camel/trunk/tooling/camel-eclipse/camel.routing.editor/src/org/apache/camel/eclipse/editor/camelEditor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java
(original)
+++ activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java
Tue Jun 12 11:20:13 2007
@@ -1,25 +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());
-   }
-
-}
+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());
+   }
+
+}

Propchange: activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/ParserComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java
(original)
+++ activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java
Tue Jun 12 11:20:13 2007
@@ -1,6 +1,5 @@
 // $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; 
+package org.apache.camel.eclipse.parser;
 
 
 import org.antlr.runtime.*;
@@ -927,4 +926,4 @@
 
  
 
-}
\ No newline at end of file
+}

Propchange: activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelLexer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelParser.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelParser.java?view=diff&rev=546580&r1=546579&r2=546580
==============================================================================
--- activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelParser.java
(original)
+++ activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelParser.java
Tue Jun 12 11:20:13 2007
@@ -1,14 +1,14 @@
 // $ANTLR 3.0b6 ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g 2007-04-05
12:20:02
-
-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.*;
+
+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.*;
 
 
 import org.antlr.runtime.*;
@@ -36,61 +36,61 @@
     public String[] getTokenNames() { return tokenNames; }
     public String getGrammarFileName() { return "..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g";
}
 
-    
-    	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); 
-    	} 
+    
+    	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); 
+    	} 
 
 
 
@@ -139,7 +139,7 @@
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:82:6: (
(a_routes= ruleRoute )* )
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:82:6: (a_routes=
ruleRoute )*
             {
-             List routesList = new ArrayList(); 
+             List routesList = new ArrayList(); 
             	      Token start = input.LT(1);
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:84:3: (a_routes=
ruleRoute )*
             loop1:
@@ -169,7 +169,7 @@
                 }
             } while (true);
 
-             result = factory.create("new Routes", "routes.addAll(arg1)",routesList);
+             result = factory.create("new Routes", "routes.addAll(arg1)",routesList);
             		loc(start, input.LT(0)==null?input.LT(-1):input.LT(0), result); 
 
             }
@@ -199,7 +199,7 @@
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:90:6: (
'from' a_from_0_0_1= ID (a_processors= ruleProcessor )* ';' )
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:90:6: 'from'
a_from_0_0_1= ID (a_processors= ruleProcessor )* ';'
             {
-             List processorsList = new ArrayList(); 
+             List processorsList = new ArrayList(); 
             	      Token start = input.LT(1);
             match(input,10,FOLLOW_10_in_ruleRoute110); 
             a_from_0_0_1=(Token)input.LT(1);
@@ -233,7 +233,7 @@
             } while (true);
 
             match(input,11,FOLLOW_11_in_ruleRoute124); 
-             result = factory.create("new Route", "setFrom(arg1)->processors.addAll(arg2)",value(a_from_0_0_1),processorsList);
+             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); 
 
             }
@@ -324,12 +324,12 @@
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:105:6:
( 'to' a_uri_0_0_1= ID )
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:105:6:
'to' a_uri_0_0_1= ID
             {
-              
+              
             	      Token start = input.LT(1);
             match(input,12,FOLLOW_12_in_ruleSend200); 
             a_uri_0_0_1=(Token)input.LT(1);
             match(input,ID,FOLLOW_ID_in_ruleSend204); 
-             result = factory.create("new Send", "setUri(arg1)",value(a_uri_0_0_1));
+             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); 
 
             }
@@ -357,12 +357,12 @@
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:113:6:
( 'process' a_type_0_0_1= ID )
             // ..//camel.routing/src-gen//org/apache/camel/eclipse/parser/camel.g:113:6:
'process' a_type_0_0_1= ID
             {
-              
+              
             	      Token start = input.LT(1);
             match(input,13,FOLLOW_13_in_ruleProcess231); 
             a_type_0_0_1=(Token)input.LT(1);
             match(input,ID,FOLLOW_ID_in_ruleProcess235); 
-             result = factory.create("new Process", "setType(arg1)",value(a_type_0_0_1));
+             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); 
 
             }
@@ -395,4 +395,4 @@
     public static final BitSet FOLLOW_13_in_ruleProcess231 = new BitSet(new long[]{0x0000000000000010L});
     public static final BitSet FOLLOW_ID_in_ruleProcess235 = new BitSet(new long[]{0x0000000000000002L});
 
-}
\ No newline at end of file
+}

Propchange: activemq/camel/trunk/tooling/camel-eclipse/camel.routing/src-gen/org/apache/camel/eclipse/parser/camelParser.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message