Author: ningjiang
Date: Thu Aug 28 00:25:29 2008
New Revision: 689744
URL: http://svn.apache.org/viewvc?rev=689744&view=rev
Log:
CAMEL-855 applied patch with thanks to Jonathan
Added:
activemq/camel/trunk/etc/eclipse/camel_java_templates.xml (with props)
activemq/camel/trunk/etc/eclipse/camel_xml_templates.xml (with props)
Modified:
activemq/camel/trunk/pom.xml
Added: activemq/camel/trunk/etc/eclipse/camel_java_templates.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/etc/eclipse/camel_java_templates.xml?rev=689744&view=auto
==============================================================================
--- activemq/camel/trunk/etc/eclipse/camel_java_templates.xml (added)
+++ activemq/camel/trunk/etc/eclipse/camel_java_templates.xml Thu Aug 28
00:25:29 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<templates><template autoinsert="true" context="java" deleted="false"
description="Creates an Aggregator" enabled="true"
name="camel_aggregator">from(${from_uri:var(String)}).aggregator(header("cheese")).to(${to_uri:var(String)});
+</template><template autoinsert="true" context="java" deleted="false"
description="Creates a Content Based Router" enabled="true"
name="camel_cbr">from(${from_uri:var(String)}).choice()
+.when(header("foo").isEqualTo("bar")).to(${when_uri:var(String)})
+.when(header("foo").isEqualTo("cheese")).to(${when2_uri:var(String)})
+.otherwise().to(${otherwise_uri:var(String)});
+</template><template autoinsert="true" context="java" deleted="false"
description="Creates a Delayer" enabled="true"
name="camel_delayer">from(${from_uri:var(String)}).delayer(${milliseconds:var(Integer)}).to(${to_uri:var(String)});</template><template
autoinsert="true" context="java" deleted="false" description="Creates a
Message Filter allows you to filter messages. " enabled="true"
name="camel_filter">from(${from_uri:var(String)}).
+ filter().xpath("/[EMAIL PROTECTED]'${user}']").
+ to(${result_uri:var(String)});</template><template autoinsert="true"
context="java" deleted="false" description="Creates a Load Balancer with a
round robin strategy" enabled="true"
name="camel_loadbalancer_roundrobin">from(${from_uri:var(String)}).loadBalance().
+roundRobin().to(${to_uri:var(String)}, ${2nd_to_uri:var(String)},
${3rd_to_uri:var(String)});</template><template autoinsert="true"
context="java" deleted="false" description="Creates a Multicast" enabled="true"
name="camel_multicast">from(${from_uri:var(String)}).multicast().to(${to_uri:var(String)},
${2nd_to_uri:var(String)}, ${3rd_to_uri:var(String)});</template><template
autoinsert="true" context="java" deleted="false" description="Creates a
Pipeline whereby a message will be routed through a series of endpoints."
enabled="true"
name="camel_pipeline">from(${from_uri:var(String)}).pipeline(${to_uri:var(String)},
${2nd_to_uri:var(String)}, ${3rd_to_uri:var(String)});</template><template
autoinsert="true" context="java" deleted="false" description="Creates an inline
Processor so you can do custom operations on the exchange" enabled="true"
name="camel_processor_inline">new Processor() {
+ public void process(Exchange exchange) {
+ // do stuff to the exchange
+ }
+}</template><template autoinsert="true" context="java" deleted="false"
description="Creates a Dynamic Recipient List" enabled="true"
name="camel_recipientlist">from(${from_uri:var(String)}).recipientList(header("foo"));</template><template
autoinsert="true" context="java" deleted="false" description="Creates a
Resequencer" enabled="true"
name="camel_resequencer">from(${from_uri:var(String)}).resequencer(body()).to(${to_uri:var(String)});</template><template
autoinsert="true" context="java" deleted="false" description="Creates a
Routing Slip with the specified header containing the list of URIs."
enabled="true"
name="camel_routingslip">from(${from_uri:var(String)}).routingSlip(${slip_header_name:var(String)},
${uri_delimiter:var(String)});</template><template autoinsert="true"
context="java" deleted="false" description="Creates a Splitter" enabled="true"
name="camel_splitter">from(${from_uri:var(String)}).splitter(xpath("//foo/bar")).to(${to_uri:var(String)})</template><templ
ate autoinsert="true" context="java" deleted="false" description="Creates a
Throttler" enabled="true"
name="camel_throttler">from(${from_uri:var(String)}).throttler(${number_of_messages:var(Integer)}).timePeriodMillis(${milliseconds:var(Integer)}).to(${to_uri:var(String)});</template></templates>
Propchange: activemq/camel/trunk/etc/eclipse/camel_java_templates.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: activemq/camel/trunk/etc/eclipse/camel_java_templates.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: activemq/camel/trunk/etc/eclipse/camel_java_templates.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: activemq/camel/trunk/etc/eclipse/camel_xml_templates.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/etc/eclipse/camel_xml_templates.xml?rev=689744&view=auto
==============================================================================
--- activemq/camel/trunk/etc/eclipse/camel_xml_templates.xml (added)
+++ activemq/camel/trunk/etc/eclipse/camel_xml_templates.xml Thu Aug 28
00:25:29 2008
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<templates><template autoinsert="true" context="xml_all" deleted="false"
description="Creates an Aggregator" enabled="true"
name="camel_aggregator"><route>
+ <from uri="from_uri"/>
+ <aggregator>
+ <header>cheese</header>
+ <to uri="to_uri"/>
+ </aggregator>
+</route>
+</template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Content Based Router" enabled="true"
name="camel_cbr"><route>
+ <from uri="from_uri"/>
+ <choice>
+ <when>
+ <xpath>$$foo = 'bar'</xpath>
+ <to uri="when_uri"/>
+ </when>
+ <when>
+ <xpath>$$foo = 'cheese'</xpath>
+ <to uri="when2_uri"/>
+ </when>
+ <otherwise>
+ <to uri="otherwise_uri"/>
+ </otherwise>
+ </choice>
+</route></template><template autoinsert="true" context="xml_all"
deleted="false" description="Creates a Delayer" enabled="true"
name="camel_delayer"><route>
+ <from uri="from_uri"/>
+ <delayer>
+ <expression/>
+ <delay>delay_in_milliseconds</delay>
+ <to uri="to_uri"/>
+ </delayer>
+</route>
+</template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Message Filter allows you to filter messages."
enabled="true" name="camel_filter"><route>
+ <from uri="from_uri"/>
+ <filter>
+ <xpath>/[EMAIL PROTECTED]'${user}']</xpath>
+ <to uri="to_uri"/>
+ </filter>
+</route>
+ </template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Load Balancer with a round robin strategy"
enabled="true" name="camel_loadbalancer_roundrobin"><route>
+ <from uri="from_uri"/>
+ <loadBalance>
+ <roundRobin/>
+ <to uri="to_uri"/>
+ <to uri="2nd_to_uri"/>
+ <to uri="3rd_to_uri"/>
+ </loadBalance>
+</route>
+</template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Multicast" enabled="true"
name="camel_multicast"><route>
+ <from uri="from_uri"/>
+ <multicast>
+ <to uri="to_uri"/>
+ <to uri="2nd_to_uri"/>
+ <to uri="3rd_to_uri"/>
+ </multicast>
+</route>
+</template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Pipeline whereby a message will be routed through a
series of endpoints." enabled="true" name="camel_pipeline"><route>
+ <from uri="from_uri"/>
+ <to uri="to_uri"/>
+ <to uri="2nd_to_uri"/>
+ <to uri="3rd_to_uri"/>
+</route>
+</template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Dynamic Recipient List" enabled="true"
name="camel_recipientlist"><route>
+ <from uri="from_uri"/>
+ <recipientList>
+ <header>foo</header>
+ </recipientList>
+</route>
+</template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Resequencer" enabled="true"
name="camel_resequencer"><route>
+ <from uri="from_uri" />
+ <resequencer>
+ <simple>body</simple>
+ <to uri="to_uri" />
+ </resequencer>
+</route>
+</template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Routing Slip with the specified header containing the
list of URIs." enabled="true" name="camel_routingslip"><route>
+ <from uri="from_uri"/>
+ <routingSlip headerName="slip_header_name"
uriDelimiter="uri_delimiter"/>
+</route>
+ </template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Splitter" enabled="true"
name="camel_splitter"><route>
+ <from uri="from_uri"/>
+ <splitter>
+ <xpath>//foo/bar</xpath>
+ <to uri="to_uri"/>
+ </splitter>
+</route>
+</template><template autoinsert="true" context="xml_all" deleted="false"
description="Creates a Throttler" enabled="true"
name="camel_throttler"><route>
+ <from uri="from_uri" />
+ <throttler maximumRequestsPerPeriod="number_of_messages"
timePeriodMillis="milliseconds">
+ <to uri="to_uri" />
+ </throttler>
+</route>
+</template></templates>
Propchange: activemq/camel/trunk/etc/eclipse/camel_xml_templates.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: activemq/camel/trunk/etc/eclipse/camel_xml_templates.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: activemq/camel/trunk/etc/eclipse/camel_xml_templates.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: activemq/camel/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/pom.xml?rev=689744&r1=689743&r2=689744&view=diff
==============================================================================
--- activemq/camel/trunk/pom.xml (original)
+++ activemq/camel/trunk/pom.xml Thu Aug 28 00:25:29 2008
@@ -927,6 +927,8 @@
<version>2.5.1</version>
<configuration>
<outputDirectory>${basedir}/eclipse-classes</outputDirectory>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>true</downloadJavadocs>
<!-- Eclipse update site for the Checkstyle plugin is
http://eclipse-cs.sourceforge.net/update -->
<!-- Eclipse update site for the PMD plugin is
http://pmd.sf.net/eclipse -->
@@ -1218,7 +1220,6 @@
<entry
key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore"/>
</propertyfile>
-
<!-- Add code format rules -->
<concat
destfile="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs"
append="true" fixlastline="true">
@@ -1227,11 +1228,16 @@
<loadfile property="eclipse.code.format"
srcFile="${basedir}/etc/eclipse/ActiveMQCodeFormatter.xml"/>
<loadfile property="eclipse.code.templates"
srcFile="${basedir}/etc/eclipse/codetemplates.xml"/>
- <propertyfile
+ <loadfile property="eclipse.camel.java.code.templates"
srcFile="${basedir}/etc/eclipse/camel_java_templates.xml"/>
+ <loadfile property="eclipse.camel.xml.code.templates"
srcFile="${basedir}/etc/eclipse/camel_xml_templates.xml"/>
+ <propertyfile
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs">
<entry key="formatter_profile" value="_ActiveMQ Java
Conventions"/>
<entry key="org.eclipse.jdt.ui.formatterprofiles"
value="${eclipse.code.format}"/>
<entry
key="org.eclipse.jdt.ui.text.custom_code_templates"
value="${eclipse.code.templates}"/>
+
+ <!-- Add Camel templates for Java DSL -->
+ <entry key="org.eclipse.jdt.ui.text.custom_templates"
value="${eclipse.camel.java.code.templates}"/>
<!-- Add import order -->
<entry key="org.eclipse.jdt.ui.importorder"
value="java;javax;org.w3c;org.xml;w3c;"/>
@@ -1239,6 +1245,12 @@
<entry key="org.eclipse.jdt.ui.visibility.order"
value="B,R,D,V,"/>
<entry key="outlinesortoption"
value="T,SF,F,SI,I,C,SM,M,"/>
<entry key="org.eclipse.jdt.ui.enable.visibility.order"
value="true"/>
+ </propertyfile>
+ <propertyfile
+
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.ui.prefs">
+ <entry key="eclipse.preferences.version" value="1"/>
+ <!-- Add Camel templates for Spring DSL -->
+ <entry key="org.eclipse.wst.sse.ui.custom_templates"
value="${eclipse.camel.xml.code.templates}"/>
</propertyfile>
</tasks>
</configuration>