I am currently working on a custom editor plugin for Eclipse. I've overwritten getAutoEditStrategies like this:
public IAutoEditStrategy[] getAutoEditStrategies(
ISourceViewer sourceViewer, String contentType) {
return new IAutoEditStrategy[] { new KRLAutoEditStrategy() };
}
and written a minimal Strategy like this:
public class KRLAutoEditStrategy implements IAutoEditStrategy {
public void customizeDocumentCommand(IDocument d, DocumentCommand c) {
System.out.println("Called.");
}
}
Now customizeDocumentCommand is only called when I hit backspace, not for any other character. What am I missing? How else do I implement auto indention?