camel-idea-plugin icon indicating copy to clipboard operation
camel-idea-plugin copied to clipboard

Plugin does not recognize @Consume endpoints

Open duydao opened this issue 1 year ago • 3 comments

IntelliJ keeps telling me that my direct endpoint does not exist when using the .to() component.

This will show an error marker "Cannot find endpoint declaration":

@Consume("direct:target")
public void doSomething() {}

public void test() {
  from("direct:source").to("direct:target")
}

Do we have a workaround for this or is it the expected behaviour?

duydao avatar Oct 03 '23 21:10 duydao

Using a variable instead of a string literal removes the error marker.

duydao avatar Oct 03 '23 21:10 duydao

Ah thanks for reporting - yeah it would be better if the plugin could detect the uri in @Consume also. The plugin mainly detects in RouteBuilders and the other DSLs. But for Java code then URIs can be specified in annotations such as @Consume and @Produce.

davsclaus avatar Oct 04 '23 14:10 davsclaus

@ammachado you are welcome to look at this too

davsclaus avatar Oct 22 '23 12:10 davsclaus