Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: tooling
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      I did up some Eclipse templates for some of the Camel EIPs (both Java and XML). Let me know what you think.

      1. templatesChange.patch
        1 kB
        Jonathan Anstey
      2. camel_xml_templates.xml
        5 kB
        Jonathan Anstey
      3. camel_java_templates.xml
        4 kB
        Jonathan Anstey
      4. addCamelTemplates.patch
        14 kB
        Jonathan Anstey

        Activity

        Hide
        Jonathan Anstey added a comment -

        Here are the templates added into the build.

        To add them to your workspace, run this:

        mvn -Psetup.eclipse -Declipse.workspace.dir=/path/to/your/workspace
        
        Show
        Jonathan Anstey added a comment - Here are the templates added into the build. To add them to your workspace, run this: mvn -Psetup.eclipse -Declipse.workspace.dir=/path/to/your/workspace
        Hide
        Jonathan Anstey added a comment -

        Java templates if you want to try them out without building Camel.

        Show
        Jonathan Anstey added a comment - Java templates if you want to try them out without building Camel.
        Hide
        Jonathan Anstey added a comment -

        XML templates if you want to try them out without building Camel.

        Show
        Jonathan Anstey added a comment - XML templates if you want to try them out without building Camel.
        Hide
        Jonathan Anstey added a comment -
        Show
        Jonathan Anstey added a comment - Also added a blog post about this here http://janstey.blogspot.com/2008/08/eclipse-templates-for-apache-camel.html
        Hide
        Willem Jiang added a comment -

        Applied patch with thanks to Jonathan.

        Jonathan, Could you also update the wiki page of apache camel ?

        Show
        Willem Jiang added a comment - Applied patch with thanks to Jonathan. Jonathan, Could you also update the wiki page of apache camel ?
        Hide
        james strachan added a comment -

        BTW I wonder if we should encourage the use of

        when().xpath("/foo")
        

        rather than

        when(header....)
        

        as the when(). is typically more feature rich and has better IDE smart completion

        Show
        james strachan added a comment - BTW I wonder if we should encourage the use of when().xpath( "/foo" ) rather than when(header....) as the when(). is typically more feature rich and has better IDE smart completion
        Hide
        Jonathan Anstey added a comment -

        James, agree with your comment. Having when(header(...)) or when(xpath(...)) is more intuitive and IMO would match the XML template more closely.

        Willem, I'll update the build instructions with this info.

        Show
        Jonathan Anstey added a comment - James, agree with your comment. Having when(header(...)) or when(xpath(...)) is more intuitive and IMO would match the XML template more closely. Willem, I'll update the build instructions with this info.
        Show
        Jonathan Anstey added a comment - Updated notes here http://cwiki.apache.org/confluence/display/CAMEL/Building
        Hide
        Jonathan Anstey added a comment -

        I just looked back at my comment here and realized I totally misread James' comment! James mentioned that this

        .when().xpath("$foo = 'bar'").to("mock:x")
        

        would be better than this

        .when(header("foo").isEqualTo("bar")).to("mock:x")
        

        The xpath one IS actually closer to the XML template (unlike I mentioned before...). I'll attach a patch for this shortly.

        Show
        Jonathan Anstey added a comment - I just looked back at my comment here and realized I totally misread James' comment! James mentioned that this .when().xpath( "$foo = 'bar'" ).to( "mock:x" ) would be better than this .when(header( "foo" ).isEqualTo( "bar" )).to( "mock:x" ) The xpath one IS actually closer to the XML template (unlike I mentioned before...). I'll attach a patch for this shortly.
        Hide
        Jonathan Anstey added a comment -

        Attaching a patch to change the when syntax a bit.

        Show
        Jonathan Anstey added a comment - Attaching a patch to change the when syntax a bit.
        Hide
        Willem Jiang added a comment -

        These two patches were applied into the svn repository.

        Show
        Willem Jiang added a comment - These two patches were applied into the svn repository.
        Hide
        Claus Ibsen added a comment -

        Closing all 1.5.0 issues

        Show
        Claus Ibsen added a comment - Closing all 1.5.0 issues

          People

          • Assignee:
            Willem Jiang
            Reporter:
            Jonathan Anstey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development