Search in sources :

Example 1 with JavaDocScanner

use of org.eclipse.jdt.internal.ui.text.javadoc.JavaDocScanner in project xtext-xtend by eclipse.

the class XtendSourceViewerConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    XtextPresentationReconciler reconciler = (XtextPresentationReconciler) super.getPresentationReconciler(sourceViewer);
    IPreferenceStore store = JavaPlugin.getDefault().getCombinedPreferenceStore();
    IColorManager colorManager = JavaPlugin.getDefault().getJavaTextTools().getColorManager();
    JavaDocScanner javaDocScanner = new JavaDocScanner(colorManager, store, null);
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(javaDocScanner);
    reconciler.setRepairer(dr, TokenTypeToPartitionMapper.JAVA_DOC_PARTITION);
    reconciler.setDamager(dr, TokenTypeToPartitionMapper.JAVA_DOC_PARTITION);
    return reconciler;
}
Also used : JavaDocScanner(org.eclipse.jdt.internal.ui.text.javadoc.JavaDocScanner) IColorManager(org.eclipse.jdt.ui.text.IColorManager) DefaultDamagerRepairer(org.eclipse.jface.text.rules.DefaultDamagerRepairer) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) XtextPresentationReconciler(org.eclipse.xtext.ui.editor.XtextPresentationReconciler)

Aggregations

JavaDocScanner (org.eclipse.jdt.internal.ui.text.javadoc.JavaDocScanner)1 IColorManager (org.eclipse.jdt.ui.text.IColorManager)1 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)1 DefaultDamagerRepairer (org.eclipse.jface.text.rules.DefaultDamagerRepairer)1 XtextPresentationReconciler (org.eclipse.xtext.ui.editor.XtextPresentationReconciler)1