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">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;aggregator&gt;
+    &lt;header&gt;cheese&lt;/header&gt;
+    &lt;to uri="to_uri"/&gt;
+  &lt;/aggregator&gt;
+&lt;/route&gt;
+</template><template autoinsert="true" context="xml_all" deleted="false" 
description="Creates a Content Based Router" enabled="true" 
name="camel_cbr">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;choice&gt;
+    &lt;when&gt;
+      &lt;xpath&gt;$$foo = 'bar'&lt;/xpath&gt;
+      &lt;to uri="when_uri"/&gt;
+    &lt;/when&gt;
+    &lt;when&gt;
+      &lt;xpath&gt;$$foo = 'cheese'&lt;/xpath&gt;
+      &lt;to uri="when2_uri"/&gt;
+    &lt;/when&gt;
+    &lt;otherwise&gt;
+      &lt;to uri="otherwise_uri"/&gt;
+    &lt;/otherwise&gt;
+  &lt;/choice&gt;
+&lt;/route&gt;</template><template autoinsert="true" context="xml_all" 
deleted="false" description="Creates a Delayer" enabled="true" 
name="camel_delayer">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;delayer&gt;
+    &lt;expression/&gt;
+    &lt;delay&gt;delay_in_milliseconds&lt;/delay&gt;
+    &lt;to uri="to_uri"/&gt;
+  &lt;/delayer&gt;
+&lt;/route&gt;
+</template><template autoinsert="true" context="xml_all" deleted="false" 
description="Creates a Message Filter allows you to filter messages." 
enabled="true" name="camel_filter">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;filter&gt;
+    &lt;xpath&gt;/[EMAIL PROTECTED]'${user}']&lt;/xpath&gt;
+    &lt;to uri="to_uri"/&gt;
+  &lt;/filter&gt;
+&lt;/route&gt;
+    </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">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;loadBalance&gt;        
+      &lt;roundRobin/&gt;  
+      &lt;to uri="to_uri"/&gt;        
+      &lt;to uri="2nd_to_uri"/&gt;       
+      &lt;to uri="3rd_to_uri"/&gt;                 
+  &lt;/loadBalance&gt;
+&lt;/route&gt;
+</template><template autoinsert="true" context="xml_all" deleted="false" 
description="Creates a Multicast" enabled="true" 
name="camel_multicast">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;multicast&gt;
+    &lt;to uri="to_uri"/&gt;
+    &lt;to uri="2nd_to_uri"/&gt;
+    &lt;to uri="3rd_to_uri"/&gt;
+  &lt;/multicast&gt;
+&lt;/route&gt;
+</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">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;to uri="to_uri"/&gt;
+  &lt;to uri="2nd_to_uri"/&gt;
+  &lt;to uri="3rd_to_uri"/&gt;
+&lt;/route&gt;
+</template><template autoinsert="true" context="xml_all" deleted="false" 
description="Creates a Dynamic Recipient List" enabled="true" 
name="camel_recipientlist">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;recipientList&gt;
+    &lt;header&gt;foo&lt;/header&gt;
+  &lt;/recipientList&gt;
+&lt;/route&gt;
+</template><template autoinsert="true" context="xml_all" deleted="false" 
description="Creates a Resequencer" enabled="true" 
name="camel_resequencer">&lt;route&gt;
+  &lt;from uri="from_uri" /&gt;
+  &lt;resequencer&gt;
+    &lt;simple&gt;body&lt;/simple&gt;
+    &lt;to uri="to_uri" /&gt;
+  &lt;/resequencer&gt;
+&lt;/route&gt;
+</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">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;routingSlip headerName="slip_header_name" 
uriDelimiter="uri_delimiter"/&gt;
+&lt;/route&gt;
+    </template><template autoinsert="true" context="xml_all" deleted="false" 
description="Creates a Splitter" enabled="true" 
name="camel_splitter">&lt;route&gt;
+  &lt;from uri="from_uri"/&gt;
+  &lt;splitter&gt;
+    &lt;xpath&gt;//foo/bar&lt;/xpath&gt;
+    &lt;to uri="to_uri"/&gt;
+  &lt;/splitter&gt;
+&lt;/route&gt;
+</template><template autoinsert="true" context="xml_all" deleted="false" 
description="Creates a Throttler" enabled="true" 
name="camel_throttler">&lt;route&gt;
+  &lt;from uri="from_uri" /&gt;
+  &lt;throttler maximumRequestsPerPeriod="number_of_messages" 
timePeriodMillis="milliseconds"&gt;
+    &lt;to uri="to_uri" /&gt;
+  &lt;/throttler&gt;
+&lt;/route&gt;
+</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>


Reply via email to