Search code examples
javaeclipseeclipse-pde

Eclipse Missing SingleTokenScanner from Documentation


Im building a custom Editor as an Eclipse Plugin and I want to do syntax highlighting in it. Im following the eclipse Platform Plug-in Developer Guide.

My Problem is: In the Documentation for the PresentationReconciler there is the following line

dr= new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(provider.getColor(JavaColorProvider.JAVADOC_DEFAULT))));

When i try to use the same logic for my own language, im missing the class SingleTokenScanner.

I tried googling for a while and only found this plugin which is not native eclipse and doesn't help me.

Is it just an error in the documentation or am i overlooking something ?


Solution

  • The text on that help page says:

    Recall that the Java editor example implements a JavaPartitionScanner which partitions the document into content types representing javadoc, multi line comments, and everything else.

    This is telling you the code comes from the example Java editor code which needs to be installed. See the 'Examples Guide' in the 'Program Plug-in Developer Guide'