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:
public abstract class SubtypesInspection extends BaseJavaLocalInspectionTool {
public static final PsiElementVisitor EMPTY_VISITOR = new PsiElementVisitor() { }; private static final String PARENT_CLASS = "org.apache.camel.builder.RouteBuilder";
@NotNull @Override public final PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) { return isAllowed(holder) ? buildInternalVisitor(holder, isOnTheFly) : EMPTY_VISITOR; }
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".
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.
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.