Hi
I can format programmaticaly an already existent java class, but I can“t format a new java class generated by acceleo. Probably I am forgetting some step to refresh the project or some synchronization issue.
CodeFormatter formatter = ToolFactory.createCodeFormatter(null);
ISourceRange range = cu.getSourceRange();
TextEdit indent_edit =
formatter.format(CodeFormatter.K_COMPILATION_UNIT,
cu.getSource(), range.getOffset(), range.getLength(), 0, null);
cu.applyTextEdit(indent_edit, null);
cu.reconcile();
Any help is welcome.
TIA
Leo K.