Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camel Properties #58

Open
ghost opened this issue Sep 2, 2013 · 1 comment
Open

Camel Properties #58

ghost opened this issue Sep 2, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 2, 2013

It would be good if there was intellisense for properties, would also be good if I tried to use a property that doesn't exist it would highlight the error. Would also be good if I used a property in a 'to' that I could ctrl+click it and I would be taken to the route that implements the 'from'

@AlanFoster
Copy link
Owner

Hey @matthewwilson,

Thanks for the feedback. Currently property placeholder references are only provided within blueprint beans.

There are currently two raised issues which have similar requirements to your request

Fulfiing the criteria for these issues and closing them is challenging due to the property interpolation within the URI language. This makes lexing/parsing a lot more involved than the other places you can use a property-placeholder value, for instance inside blueprint beans.

In the best case scenario the language is easy to lex/parse

<to uri="direct:start" />

If the user ctrl+clicks direct they can be taken to the org.apache.camel.component.direct.DirectComponent class, and if they ctrl+click start they can be taken to the target camel route.

However when property-interpolation is involved, it becomes a lot harder. Firstly there is the issue of deciding what reference contributions should be used. For instance consider the following XML

<to uri="direct:{{prop<caret>}}" />

When providing references to the current caret position, what should the plugin resolve to? The property placeholder itself, or the route it may point to? We can infer the user probably wants to have a configuration for a route name, but the user may actually want a reference to the property-placeholder itself. In this example it is still easy to allow reference contribution for the direct component.

Another more complex scenario may be the following;

<cm:property-placeholder name="component" value="direct" />
<cm:property-placeholder name="name" value="start" />
<cm:property-placeholder name="endpoint" value="${component}:${name}" />
...
<to uri="{{endpoint<caret>}}" />

What should the plugin provide a reference to now? From the parsing of the URI attribute it is simply a placeholder reference, which is easy to parse. However if we traverse the properties we can see that the end result may be a camel URI definition. But how do we now handle this?

Potentially a gutter icon could be added to access all of the different possible references of the final resolved interpolated string, but I imagine this wouldn't be a great user experience or intuitive - as no other plugin currently does this.

If there's a good way to deal with these scenarios this is definitely something i'd like to add :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant