Details

    • Type: New Feature
    • Status: Closed
    • Priority: 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
        davsclaus Claus Ibsen added a comment -

        Closing all 1.5.0 issues

        Show
        davsclaus Claus Ibsen added a comment - Closing all 1.5.0 issues
        Hide
        njiang Willem Jiang added a comment -

        These two patches were applied into the svn repository.

        Show
        njiang Willem Jiang added a comment - These two patches were applied into the svn repository.
        Hide
        janstey Jonathan Anstey added a comment -

        Attaching a patch to change the when syntax a bit.

        Show
        janstey Jonathan Anstey added a comment - Attaching a patch to change the when syntax a bit.
        Hide
        janstey 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
        janstey 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
        janstey Jonathan Anstey added a comment - Updated notes here http://cwiki.apache.org/confluence/display/CAMEL/Building
        Hide
        janstey 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
        janstey 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.
        Hide
        jstrachan 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
        jstrachan 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
        njiang Willem Jiang added a comment -

        Applied patch with thanks to Jonathan.

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

        Show
        njiang Willem Jiang added a comment - Applied patch with thanks to Jonathan. Jonathan, Could you also update the wiki page of apache camel ?
        Hide
        janstey Jonathan Anstey added a comment -
        Show
        janstey 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
        janstey Jonathan Anstey added a comment -

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

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

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

        Show
        janstey Jonathan Anstey added a comment - Java templates if you want to try them out without building Camel.
        Hide
        janstey 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
        janstey 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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development