Search in sources :

Example 1 with IAnnotationAccessExtension2

use of org.eclipse.jface.text.source.IAnnotationAccessExtension2 in project eclipse.platform.text by eclipse.

the class AbstractDecoratedTextEditor method createPartControl.

/*
	 * @see org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(Composite)
	 */
@Override
public void createPartControl(Composite parent) {
    super.createPartControl(parent);
    if (fSourceViewerDecorationSupport != null)
        fSourceViewerDecorationSupport.install(getPreferenceStore());
    IColumnSupport columnSupport = getAdapter(IColumnSupport.class);
    if (isLineNumberRulerVisible()) {
        RulerColumnDescriptor lineNumberColumnDescriptor = RulerColumnRegistry.getDefault().getColumnDescriptor(LineNumberColumn.ID);
        if (lineNumberColumnDescriptor != null)
            columnSupport.setColumnVisible(lineNumberColumnDescriptor, true);
    }
    if (isPrefQuickDiffAlwaysOn())
        showChangeInformation(true);
    if (fOverviewRuler instanceof IOverviewRulerExtension)
        ((IOverviewRulerExtension) fOverviewRuler).setUseSaturatedColors(isPrefUseSaturatedColorsOn());
    if (!isOverwriteModeEnabled())
        enableOverwriteMode(false);
    if (!isRangeIndicatorEnabled()) {
        getSourceViewer().removeRangeIndication();
        getSourceViewer().setRangeIndicator(null);
    }
    // Assign the quick assist assistant to the annotation access.
    ISourceViewer viewer = getSourceViewer();
    if (fAnnotationAccess instanceof IAnnotationAccessExtension2 && viewer instanceof ISourceViewerExtension3)
        ((IAnnotationAccessExtension2) fAnnotationAccess).setQuickAssistAssistant(((ISourceViewerExtension3) viewer).getQuickAssistAssistant());
    createOverviewRulerContextMenu();
}
Also used : RulerColumnDescriptor(org.eclipse.ui.texteditor.rulers.RulerColumnDescriptor) IAnnotationAccessExtension2(org.eclipse.jface.text.source.IAnnotationAccessExtension2) IColumnSupport(org.eclipse.ui.texteditor.rulers.IColumnSupport) ISourceViewer(org.eclipse.jface.text.source.ISourceViewer) ISourceViewerExtension3(org.eclipse.jface.text.source.ISourceViewerExtension3) IOverviewRulerExtension(org.eclipse.jface.text.source.IOverviewRulerExtension)

Aggregations

IAnnotationAccessExtension2 (org.eclipse.jface.text.source.IAnnotationAccessExtension2)1 IOverviewRulerExtension (org.eclipse.jface.text.source.IOverviewRulerExtension)1 ISourceViewer (org.eclipse.jface.text.source.ISourceViewer)1 ISourceViewerExtension3 (org.eclipse.jface.text.source.ISourceViewerExtension3)1 IColumnSupport (org.eclipse.ui.texteditor.rulers.IColumnSupport)1 RulerColumnDescriptor (org.eclipse.ui.texteditor.rulers.RulerColumnDescriptor)1