I am working on an Eclipse plugin that modifies Java code in a custom project.
The main result of this plugin is that Java annotations are added to some methods, therefore
void foo() { ... }
becomes
@MyAnnotation void foo() { ... }
Except that this is not entirely true; the indentation in the recently inserted annotation is inactive (in particular, the new annotation fully fits the left side of the line). I would like to make all my changes to the file, and then programmatically call "Fix Indentation."
Does anyone know how to do this? I can't find the answer here or in the JDT forums, and all classes that look relevant (IndentAction, JavaIndenter) are in internal packages that I shouldn't use ...
Thanks!
java eclipse eclipse-jdt
Nels beckman
source share