Java 类org.eclipse.jface.text.source.IOverviewRuler 实例源码

项目:typescript.java    文件:TypeScriptMergeViewer.java   
@Override
protected ISourceViewer createTypeScriptSourceViewer(Composite parent, IVerticalRuler verticalRuler,
        IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
    return new AdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles,
            store) {
        @Override
        protected void handleDispose() {
            super.handleDispose();

            // dispose the compilation unit adapter
            dispose();

            fEditor.remove(this);
            if (fEditor.isEmpty()) {
                fEditor = null;
                fSite = null;
            }

            fSourceViewer.remove(this);
            if (fSourceViewer.isEmpty())
                fSourceViewer = null;

        }
    };
}
项目:Pydev    文件:BaseEditor.java   
@Override
protected IOverviewRuler createOverviewRuler(ISharedTextColors sharedColors) {
    // Note: create the minimap overview ruler regardless of whether it should be shown or not
    // (the setting to show it will control what's drawn).
    if (MinimapOverviewRulerPreferencesPage.useMinimap()) {
        IOutlineModel outlineModel = (IOutlineModel) this.getAdapter(IOutlineModel.class);
        IOverviewRuler ruler = new MinimapOverviewRuler(getAnnotationAccess(), sharedColors, outlineModel);

        Iterator e = getAnnotationPreferences().getAnnotationPreferences().iterator();
        while (e.hasNext()) {
            AnnotationPreference preference = (AnnotationPreference) e.next();
            if (preference.contributesToHeader()) {
                ruler.addHeaderAnnotationType(preference.getAnnotationType());
            }
        }
        return ruler;
    } else {
        return super.createOverviewRuler(sharedColors);
    }
}
项目:ftc    文件:FtcSourceViewer.java   
public FtcSourceViewer(IResource resource, Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean overviewRulerVisible, int styles) {

    super(parent, ruler, overviewRuler, overviewRulerVisible, styles);
    this.resource = resource;
    this.syntaxColoring = new SyntaxColoring(this);
}
项目:eclipse-gn    文件:GnEditorColoringConfigurationBlock.java   
@Override
protected ProjectionViewer createPreviewViewer(Composite parent, IVerticalRuler verticalRuler,
    IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles,
    IPreferenceStore store) {
  return new ScriptSourceViewer(
      parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
项目:Pydev    文件:BaseSourceViewer.java   
public BaseSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
        boolean showAnnotationsOverview, int styles, IVerticalIndentGuidePreferencesProvider verticalIndentPrefs) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);

    verticalLinesPainter = new VerticalIndentGuidesPainter(
            getIndentGuide(verticalIndentPrefs));
    StyledText styledText = this.getTextWidget();
    verticalLinesPainter.setStyledText(styledText);
    styledText.addPaintListener(verticalLinesPainter);
    styledText.setLeftMargin(Math.max(styledText.getLeftMargin(), 2));
}
项目:Pydev    文件:PyEditProjection.java   
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    IOverviewRuler overviewRuler = getOverviewRuler();
    PySourceViewer viewer = new PySourceViewer(parent, ruler, overviewRuler, isOverviewRulerVisible(), styles, this);

    //ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);

    return viewer;
}
项目:Pydev    文件:PySourceViewer.java   
public PySourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean showsAnnotationOverview, int styles, final PyEditProjection projection) {
    super(parent, ruler, overviewRuler, showsAnnotationOverview, styles,
            new PyAbstractIndentGuidePreferencesProvider() {

                @Override
                public int getTabWidth() {
                    return ((PyEdit) projection).getIndentPrefs().getTabWidth();
                }
            });
    this.projection = new WeakReference<PyEdit>((PyEdit) projection);
}
项目:Hydrograph    文件:SourceViewer.java   
public SourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
        boolean showAnnotationsOverview, int styles, IAnnotationAccess annotationAccess, ISharedTextColors sharedColors,
        IDocument document) 
{
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, SWT.BOLD);
    int id = currentId++;
    filename = VIEWER_CLASS_NAME + id++ + ".java";
    this.sharedColors=sharedColors;
    this.annotationAccess=annotationAccess;
    this.fOverviewRuler=overviewRuler;
    oldAnnotations= new HashMap<ProjectionAnnotation, Position>();

    IJavaProject javaProject = JavaCore.create(BuildExpressionEditorDataSturcture.INSTANCE.getCurrentProject());
    try 
    {
        IPackageFragmentRoot[] ipackageFragmentRootList=javaProject.getPackageFragmentRoots();
        IPackageFragmentRoot ipackageFragmentRoot=null;
        for(IPackageFragmentRoot tempIpackageFragmentRoot:ipackageFragmentRootList)
        {
            if(tempIpackageFragmentRoot.getKind()==IPackageFragmentRoot.K_SOURCE 
                    && StringUtils.equals(PathConstant.TEMP_BUILD_PATH_SETTINGS_FOLDER,tempIpackageFragmentRoot.getPath().removeFirstSegments(1).toString()))
            {
                ipackageFragmentRoot=tempIpackageFragmentRoot;
                break;
            }   
        } 

        IPackageFragment compilationUnitPackage=   ipackageFragmentRoot.createPackageFragment(HYDROGRAPH_COMPILATIONUNIT_PACKAGE, true, new NullProgressMonitor());
        compilatioUnit=   compilationUnitPackage.createCompilationUnit(filename,document.get(),true, new NullProgressMonitor());
    } 
    catch (Exception exception) {
        LOGGER.warn("Exception occurred while initializing source viewer", exception);
    } finally {
        if (javaProject != null) {
            try {
                javaProject.close();
            } catch (JavaModelException javaModelException) {
                LOGGER.warn("Exception occurred while closing java-project", javaModelException);
            }
        }
    }
    initializeViewer(document);
    updateContents();
}
项目:tm4e    文件:TMViewer.java   
public TMViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
        boolean showAnnotationsOverview, int styles) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
    init();
}
项目:LibertyEiffel-Eclipse-Plugin    文件:EiffelSourceViewer.java   
public EiffelSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean showAnnotationOverview, int styles, EiffelEditor editor) {
    super(parent, ruler, overviewRuler, showAnnotationOverview, styles);
}
项目:LibertyEiffel-Eclipse-Plugin    文件:EiffelSourceViewer.java   
public EiffelSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean showAnnotationOverview, int styles, EiffelEditor editor) {
    super(parent, ruler, overviewRuler, showAnnotationOverview, styles);
    eiffelEditor = editor;
}
项目:dsl-devkit    文件:FixedXtextSourceViewer.java   
/** {@inheritDoc} */
@Override
public XtextSourceViewer createSourceViewer(final Composite parent, final IVerticalRuler ruler, final IOverviewRuler overviewRuler, final boolean showsAnnotationOverview, final int styles) {
  return new FixedXtextSourceViewer(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
项目:fluentmark    文件:FluentMkSourceViewer.java   
/** Creates new source viewer. */
public FluentMkSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean isOverviewRulerShowing, int styles, IPreferenceStore store) {
    super(parent, ruler, overviewRuler, isOverviewRulerShowing, styles);
    setPreferenceStore(store);
}
项目:typescript.java    文件:TypeScriptEditor.java   
public AdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
        boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
项目:typescript.java    文件:TypeScriptSourceViewer.java   
public TypeScriptSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
        boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
项目:typescript.java    文件:JavaScriptLightWeightEditor.java   
protected ISourceViewer createTypeScriptSourceViewer(Composite parent, IVerticalRuler verticalRuler,
        IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
    return new TypeScriptSourceViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles,
            store);
}
项目:bts    文件:XtextSourceViewer.java   
XtextSourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
boolean showsAnnotationOverview, int styles);
项目:bts    文件:XtextSourceViewer.java   
public XtextSourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler,
        IOverviewRuler overviewRuler, boolean showsAnnotationOverview, int styles) {
    return new XtextSourceViewer(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
项目:bts    文件:XtextSourceViewer.java   
public XtextSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean showsAnnotationOverview, int styles) {
    super(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
项目:bts    文件:WrappedSourceViewer.java   
public void createPartControl(Composite parent)
{
    int VERTICAL_RULER_WIDTH = 12;

    int styles = SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
    ISharedTextColors sharedColors = EditorsPlugin.getDefault().getSharedTextColors();
    IOverviewRuler overviewRuler = new OverviewRuler(null, VERTICAL_RULER_WIDTH, sharedColors);
    CompositeRuler ruler = new CompositeRuler(VERTICAL_RULER_WIDTH);

    _document = new Document();
    _document.set(_docString);

    _annotationModel = new AnnotationModel();
    _annotationModel.connect(_document);

    _sourceViewer = new SourceViewer(parent, ruler, overviewRuler, true, styles);
    _sourceViewer.configure(new SourceViewerConfiguration());

    _sds = new SourceViewerDecorationSupport(_sourceViewer, overviewRuler, null, sharedColors);

    AnnotationPreference ap = new AnnotationPreference();
    ap.setColorPreferenceKey(ANNO_KEY_COLOR);
    ap.setHighlightPreferenceKey(ANNO_KEY_HIGHLIGHT);
    ap.setVerticalRulerPreferenceKey(ANNO_KEY_VERTICAL);
    ap.setOverviewRulerPreferenceKey(ANNO_KEY_OVERVIEW);
    ap.setTextPreferenceKey(ANNO_KEY_TEXT);
    ap.setAnnotationType(ANNO_TYPE);
    _sds.setAnnotationPreference(ap);

    //      _sds.install(EditorsPlugin.getDefault().getPreferenceStore());

    _sourceViewer.setDocument(_document, _annotationModel);

    _sourceViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    ruler.addDecorator(0, new LineNumberRulerColumn());

    Annotation annotation = new Annotation(false);
    annotation.setType(ANNO_TYPE);
    Position position = new Position(0, 4);
    _annotationModel.addAnnotation(annotation, position);
    parent.layout();
}
项目:gama    文件:GamaSourceViewerFactory.java   
/**
 * @see org.eclipse.xtext.ui.editor.XtextSourceViewer.Factory#createSourceViewer(org.eclipse.swt.widgets.Composite,
 *      org.eclipse.jface.text.source.IVerticalRuler,
 *      org.eclipse.jface.text.source.IOverviewRuler, boolean, int)
 */
@Override
public XtextSourceViewer createSourceViewer(final Composite parent, final IVerticalRuler ruler,
        final IOverviewRuler overviewRuler, final boolean showsAnnotationOverview, final int styles) {
    return new GamaSourceViewer(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
项目:Eclipse-Postfix-Code-Completion    文件:CompilationUnitEditor.java   
public AdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
项目:Eclipse-Postfix-Code-Completion    文件:CompilationUnitEditor.java   
@Override
protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
    return new AdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles, store);
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaSourceViewer.java   
public JavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
    setPreferenceStore(store);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CompilationUnitEditor.java   
public AdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CompilationUnitEditor.java   
@Override
protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
    return new AdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles, store);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaSourceViewer.java   
public JavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
    setPreferenceStore(store);
}
项目:goclipse    文件:LangSourceViewer.java   
public LangSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
        boolean showAnnotationsOverview, int styles) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
}
项目:goclipse    文件:ProjectionViewerExt.java   
public ProjectionViewerExt(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean showsAnnotationOverview, int styles) {
    super(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
项目:mesfavoris    文件:HyperlinkSourceViewer.java   
/**
 * Constructs a new source viewer. The vertical ruler is initially visible.
 * The overview ruler visibility is controlled by the value of
 * <code>showAnnotationsOverview</code>. The viewer has not yet been
 * initialized with a source viewer configuration.
 *
 * @param parent
 *            the parent of the viewer's control
 * @param verticalRuler
 *            the vertical ruler used by this source viewer
 * @param overviewRuler
 *            the overview ruler
 * @param showAnnotationsOverview
 *            {@code true} if the overview ruler should be visible,
 *            {@code false} otherwise
 * @param styles
 *            the SWT style bits for the viewer's control,
 */
public HyperlinkSourceViewer(Composite parent, IVerticalRuler verticalRuler,
        IOverviewRuler overviewRuler, boolean showAnnotationsOverview,
        int styles) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview,
            styles);
}
项目:APICloud-Studio    文件:AbstractFormatterPreferencePage.java   
/**
 * @param parent
 * @param verticalRuler
 * @param overviewRuler
 * @param showAnnotationsOverview
 * @param styles
 * @param store
 * @return
 */
private ProjectionViewer createPreviewViewer(Composite parent, IVerticalRuler verticalRuler,
        IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles, IPreferenceStore store)
{
    ProjectionViewer viewer = new ProjectionViewer(parent, verticalRuler, overviewRuler,
            showAnnotationsOverview, styles);
    ThemePlugin.getDefault().getControlThemerFactory().apply(viewer);
    return viewer;
}
项目:dsl-devkit    文件:FixedXtextSourceViewer.java   
/**
 * Creates a new instance of {@link FixedXtextSourceViewer}.
 *
 * @param parent
 *          the {@link Composite} parent
 * @param ruler
 *          the {@link IVerticalRuler}
 * @param overviewRuler
 *          the {@link IOverviewRuler}
 * @param showsAnnotationOverview
 *          boolean flag whether to show annotation overview
 * @param styles
 *          styles flags
 */
public FixedXtextSourceViewer(final Composite parent, final IVerticalRuler ruler, final IOverviewRuler overviewRuler, final boolean showsAnnotationOverview, final int styles) {
  super(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
项目:gama    文件:GamaSourceViewer.java   
/**
 * @param parent
 * @param ruler
 * @param overviewRuler
 * @param showsAnnotationOverview
 * @param styles
 */
public GamaSourceViewer(final Composite parent, final IVerticalRuler ruler, final IOverviewRuler overviewRuler,
        final boolean showsAnnotationOverview, final int styles) {
    super(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
    isOverviewVisible = showsAnnotationOverview && overviewRuler != null;
}
项目:APICloud-Studio    文件:CommonProjectionViewer.java   
/**
 * @param parent
 * @param ruler
 * @param overviewRuler
 * @param showsAnnotationOverview
 * @param styles
 */
public CommonProjectionViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean showsAnnotationOverview, int styles)
{
    super(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaEditor.java   
/**
 * Creates the Java source viewer to be used by this editor.
 * Subclasses may re-implement this method.
 *
 * @param parent the parent control
 * @param verticalRuler the vertical ruler
 * @param overviewRuler the overview ruler
 * @param isOverviewRulerVisible <code>true</code> if the overview ruler is visible
 * @param styles style bits, <code>SWT.WRAP</code> is currently not supported
 * @param store the preference store
 * @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
 * @return the source viewer
 */
protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
    return new JavaSourceViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles, store);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaEditor.java   
/**
 * Creates the Java source viewer to be used by this editor.
 * Subclasses may re-implement this method.
 *
 * @param parent the parent control
 * @param verticalRuler the vertical ruler
 * @param overviewRuler the overview ruler
 * @param isOverviewRulerVisible <code>true</code> if the overview ruler is visible
 * @param styles style bits, <code>SWT.WRAP</code> is currently not supported
 * @param store the preference store
 * @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
 * @return the source viewer
 */
protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
    return new JavaSourceViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles, store);
}