Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] getAutoEditStrategies not called when deriving from CEditor

Hi,

I am trying to add my own IAutoEditStrategy to my custom editor, which is derived from CEditor, see below for the simple code.

But getAutoEditStrategies is never called, probably swallowed somehow by CEditor itself? By simply changing my editor to derive from TextEditor, everything just works fine.

Any idea? Thanks for your help.

Best regards,
Max





public class CPNEditor extends CEditor {
    public CPNEditor(){
        super();
        setSourceViewerConfiguration(new CPNEditorConfig());
    }

public class CPNEditorConfig extends SourceViewerConfiguration {
    @Override
    public IAutoEditStrategy[] getAutoEditStrategies(
            ISourceViewer sourceViewer, String contentType) {
            return new IAutoEditStrategy[] {new CPNAutoEditStrategy()};
        }
}


Back to the top