Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: ECLIPSE-625
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Lars Heinemann
Reporter: Claus Ibsen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Fuse IDE

Fuse IDE should be out of the box have XML content assistance

Created: 01/Apr/12 06:52 AM   Updated: 25/May/12 08:40 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1.0

File Attachments: None
Image Attachments:

1. Screen Shot 2012-04-01 at 8.50.05 AM.png
(103 kB)


 Description  « Hide
I think we have attempted to fix this previously and got it working.

I am trying the latest RCP build and in the XML editor the ctrl + space no longer have content assistance so I can see the list of EIPs to select among.
See screenshot.

I created a new Fuse project and selected the camel-archetype-activemq. And I then opened the camel-context.xml file. And chose the source tab.
And started editing the XML directly.

In the otherwise block I want to add a <log> EIP. But pressing ctrl + space does not show me the EIPs to select. And if I have a EIP selected I cannot see which attributes I can use.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Lars Heinemann added a comment - 02/Apr/12 06:04 PM - edited
There is one thing which controls if the completion works or not. If you have the namespace definition for camel inside your top xml element then completion works, if not then it won't work.

With this the camel code completion works...

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" ...>

Currently the Fuse Project wizard for archetype

  • camel-archetype-activemq
    does not add the camel spring xmlns so you have no code completion there.

Also if you create a new Camel Context XML file inside a project you also don't have code completion as the xmlns entry is missing.

If the xmlns entry is there you have code completion but with the prefix you defined...most of the time

<camel:xxxx>

James Strachan added a comment - 02/Apr/12 06:07 PM
I wonder if we should always shove an xmlns:camel attribute on the root element just in case?

James Strachan added a comment - 02/Apr/12 06:08 PM
BTW does the completion work even if the element doesn't start with "camel:". e.g. inside a <route> does typing "<f" complete to <from>?

Lars Heinemann added a comment - 02/Apr/12 06:21 PM
Yes, that works.

James Strachan added a comment - 02/Apr/12 06:26 PM
awesome! I can hack it so that on load we force the creation of the xmlns:camel attribute if you like?

Lars Heinemann added a comment - 02/Apr/12 06:29 PM
Currently modifying the CreateContextWizard to add the correct namespace definition. (branding module)

Lars Heinemann added a comment - 02/Apr/12 06:39 PM
Pushed a change which fixes the "New Camel XML File" wizard to create working XML files for Spring and Blueprint. Will leave the remaining stuff to you. With the Blueprint one I found out that you need both the xmlns and the appropriate entry under xmlns:xsi.

James Strachan added a comment - 03/Apr/12 03:34 PM
Hmm - I wonder can we figure out what XML files don't work in smart completion?

Just tried the AMQ archetype in 2.1.379 and it worked fine - there's no camel namespace URI in the root element though there is an XSD though (xmlns:xsi stuff & the XSD etc)


Lars Heinemann added a comment - 11/Apr/12 12:30 PM
The only one I found so far is the activemq xml file created by the wizard. But you can get it working by adding the xsi entry.

Lars Heinemann added a comment - 11/Apr/12 12:31 PM
closed unless someone has a problem with this