Is it possible to create plugins for certain Java types?
Is it possible to create plugins which provide custom behaviour / indentation for classes which inherit from a special type,
org.apache.camel.builder.RouteBuilder?
Please sign in to leave a comment.
Dunno about indentation, but I have made an inspection for certain subtypes, basically if you can get a PsiFile, then it is no problem:
For you it would look like this:
Replacing the Java formatter for specific types of Java files is currently not supported. Providing "custom behavior" is most likely possible, depending on what exactly you mean by "behavior".
The idea is to make special text strings linkable, e.g. you have something like this
.to("direct:foo")
which points to a direct route named 'foo'
from("direct:foo)
I would like to be able to click on the to - direct route and have the editor scroll to the line with the from - direct route declaration.
Similar with
to("xslt:foo.xsl")
where foo.xsl is a XSLT stylesheet on the classpath.
You need to implement a PsiReferenceContributor and to provide references that resolve to the routes. You can find plenty of examples for this in the IntelliJ IDEA Community Edition code.