[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] getAutoEditStrategies not called when deriving from CEditor
|
Hi Max,
I assume your source viewer configuration gets overridden later on
by the CEditor.
HTH,
Toni
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Maximilian Odendahl
> Sent: Thursday, February 17, 2011 10:58 AM
> To: cdt-dev
> Subject: [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()};
> }
> }
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>