Java 类org.eclipse.xtext.ui.editor.XtextPresentationReconciler 实例源码

项目:statecharts    文件:XtextStyledTextHighlightingHelper.java   
public void install(StyledTextXtextAdapter styledTextXtextAdapter,
        XtextSourceViewer sourceViewer) {
    this.styledTextXtextAdapter = styledTextXtextAdapter;
    fSourceViewer = sourceViewer;
    if (styledTextXtextAdapter != null) {
        fConfiguration = styledTextXtextAdapter
                .getXtextSourceViewerConfiguration();
        fPresentationReconciler = (XtextPresentationReconciler) fConfiguration
                .getPresentationReconciler(sourceViewer);
    } else {
        fConfiguration = null;
        fPresentationReconciler = null;
    }
    preferenceStore = getPreferenceStoreAccessor().getPreferenceStore();
    preferenceStore.addPropertyChangeListener(this);
    enable();
}
项目:PDFReporter-Studio    文件:XtextStyledTextHighlightingHelper.java   
public void install(StyledTextXtextAdapter styledTextXtextAdapter,
        XtextSourceViewer sourceViewer) {
    this.styledTextXtextAdapter = styledTextXtextAdapter;
    fSourceViewer = sourceViewer;
    if (styledTextXtextAdapter != null) {
        fConfiguration = styledTextXtextAdapter
                .getXtextSourceViewerConfiguration();
        fPresentationReconciler = (XtextPresentationReconciler) fConfiguration
                .getPresentationReconciler(sourceViewer);
    } else {
        fConfiguration = null;
        fPresentationReconciler = null;
    }
    preferenceStore = getPreferenceStoreAccessor().getPreferenceStore();
    preferenceStore.addPropertyChangeListener(this);
    enable();
}
项目:bts    文件:HighlightingHelper.java   
/**
 * @since 2.3
 */
public void install(XtextSourceViewerConfiguration configuration, XtextSourceViewer sourceViewer) {
    fSourceViewer= sourceViewer;
    fConfiguration= configuration;
    if(sourceViewer != null && configuration != null){
        fPresentationReconciler= (XtextPresentationReconciler) fConfiguration.getPresentationReconciler(sourceViewer);
    } else {
        fPresentationReconciler = null;
        fConfiguration = null;
    }
    preferenceStore = getPreferenceStoreAccessor().getPreferenceStore();
    preferenceStore.addPropertyChangeListener(this);
    enable();
}
项目:bts    文件:HighlightingPresenter.java   
/**
 * Install this presenter on the given source viewer and background presentation reconciler.
 * 
 * @param sourceViewer
 *            the source viewer
 * @param backgroundPresentationReconciler
 *            the background presentation reconciler, can be <code>null</code>, in that case
 *            {@link HighlightingPresenter#createPresentation(List, List)} should not be called
 */
public void install(XtextSourceViewer sourceViewer, XtextPresentationReconciler backgroundPresentationReconciler) {
    fSourceViewer = sourceViewer;
    fPresentationReconciler = backgroundPresentationReconciler;

    fSourceViewer.prependTextPresentationListener(this);
    fSourceViewer.addTextPresentationListener(this);
    fSourceViewer.addTextInputListener(this);
    manageDocument(fSourceViewer.getDocument());
}