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

项目: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;

        }
    };
}
项目:KaiZen-OpenAPI-Editor    文件:JsonEditor.java   
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout compositeLayout = new GridLayout(1, false);
    compositeLayout.marginHeight = 0;
    compositeLayout.marginWidth = 0;
    compositeLayout.horizontalSpacing = 0;
    compositeLayout.verticalSpacing = 0;
    composite.setLayout(compositeLayout);

    topPanel = new Composite(composite, SWT.NONE);
    topPanel.setLayout(new StackLayout());
    topPanel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));

    Composite editorComposite = new Composite(composite, SWT.NONE);
    editorComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    FillLayout fillLayout = new FillLayout(SWT.VERTICAL);
    fillLayout.marginHeight = 0;
    fillLayout.marginWidth = 0;
    fillLayout.spacing = 0;
    editorComposite.setLayout(fillLayout);

    ISourceViewer result = doCreateSourceViewer(editorComposite, ruler, styles);

    return result;
}
项目:GLSL-Eclipse    文件:GlslEditor.java   
@Override
protected ISourceViewer createSourceViewer(Composite parent,
        IVerticalRuler ruler, int styles) {

    ISourceViewer sourceViewer = super.createSourceViewer(parent, ruler, styles);

    // Apply preference settings from the default editor
    IPreferenceStore store = EditorsUI.getPreferenceStore();

    Color backgroundColor = PreferenceUtils.colorFromString(
            store.getString(PREFERENCE_COLOR_BACKGROUND));
    Color foregroundColor = PreferenceUtils.colorFromString(
            store.getString(PREFERENCE_COLOR_FOREGROUND));
    Color selectionBackgroundColor = PreferenceUtils.colorFromString(
            store.getString(PREFERENCE_COLOR_SELECTION_BACKGROUND), new RGB(99, 99, 99));
    Color selectionForegroundColor = PreferenceUtils.colorFromString(
            store.getString(PREFERENCE_COLOR_SELECTION_FOREGROUND), new RGB(0, 0, 0));

    final StyledText textWidget = sourceViewer.getTextWidget();
    textWidget.setBackground(backgroundColor);
    textWidget.setForeground(foregroundColor);
    textWidget.setSelectionBackground(selectionBackgroundColor);
    textWidget.setSelectionForeground(selectionForegroundColor);

    return sourceViewer;
}
项目:idecore    文件:ApexCodeEditor.java   
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    fAnnotationAccess = createAnnotationAccess();
    fOverviewRuler = createOverviewRuler(getSharedColors());
    ProjectionViewer viewer =
            new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);

    fProjectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
    fProjectionSupport.addSummarizableAnnotationType(ANNOTATION_TYPE_APEX_ERROR); //$NON-NLS-1$
    fProjectionSupport.addSummarizableAnnotationType(ANNOTATION_TYPE_APEX_WARNING); //$NON-NLS-1$
    fProjectionSupport.install();
    setTitleToolTip(EDITOR_NAME);

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

    fBracketInserter = new BracketInserter(this, viewer);
    return viewer;
}
项目:birt    文件:DecoratedScriptEditor.java   
protected ISourceViewer createSourceViewer( Composite parent,
        IVerticalRuler ruler, int styles )
{
    fAnnotationAccess = getAnnotationAccess( );
    fOverviewRuler = createOverviewRuler( getSharedColors( ) );

    ProjectionViewer viewer = new ProjectionViewer( parent,
            ruler,
            getOverviewRuler( ),
            isOverviewRulerVisible( ),
            styles );

    ProjectionSupport fProjectionSupport = new ProjectionSupport( viewer,
            getAnnotationAccess( ),
            getSharedColors( ) );
    fProjectionSupport.addSummarizableAnnotationType( "org.eclipse.ui.workbench.texteditor.error" ); //$NON-NLS-1$
    fProjectionSupport.addSummarizableAnnotationType( "org.eclipse.ui.workbench.texteditor.warning" ); //$NON-NLS-1$
    fProjectionSupport.install( );

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

    return viewer;
}
项目:Pydev    文件:PythonSourceViewer.java   
public PythonSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    super(parent, ruler, null, false, styles, new PyAbstractIndentGuidePreferencesProvider() {

        @Override
        public int getTabWidth() {
            return DefaultIndentPrefs.get(null).getTabWidth();
        }
    });
    StyledText text = this.getTextWidget();
    text.addBidiSegmentListener(new BidiSegmentListener() {
        @Override
        public void lineGetSegments(BidiSegmentEvent event) {
            try {
                event.segments = getBidiLineSegments(event.lineOffset);
            } catch (BadLocationException x) {
                // ignore
            }
        }
    });
    updateViewerFont();
    updateViewerColors();
    getPreferenceStore().addPropertyChangeListener(propertyChangeListener);
}
项目:DarwinSPL    文件:DwprofileEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {

        public void setSelection(ISelection selection, boolean reveal) {
            if (!DwprofileEditor.this.setSelection(selection, reveal)) {
                super.setSelection(selection, reveal);
            }
        }

    };
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:DarwinSPL    文件:HyexpressionEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {

        public void setSelection(ISelection selection, boolean reveal) {
            if (!HyexpressionEditor.this.setSelection(selection, reveal)) {
                super.setSelection(selection, reveal);
            }
        }

    };
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:DarwinSPL    文件:HyvalidityformulaEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {

        public void setSelection(ISelection selection, boolean reveal) {
            if (!HyvalidityformulaEditor.this.setSelection(selection, reveal)) {
                super.setSelection(selection, reveal);
            }
        }

    };
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:DarwinSPL    文件:HydatavalueEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {

        public void setSelection(ISelection selection, boolean reveal) {
            if (!HydatavalueEditor.this.setSelection(selection, reveal)) {
                super.setSelection(selection, reveal);
            }
        }

    };
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:DarwinSPL    文件:HymappingEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {

        public void setSelection(ISelection selection, boolean reveal) {
            if (!HymappingEditor.this.setSelection(selection, reveal)) {
                super.setSelection(selection, reveal);
            }
        }

    };
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:DarwinSPL    文件:HyconstraintsEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {

        public void setSelection(ISelection selection, boolean reveal) {
            if (!HyconstraintsEditor.this.setSelection(selection, reveal)) {
                super.setSelection(selection, reveal);
            }
        }

    };
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:DarwinSPL    文件:HymanifestEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {

        public void setSelection(ISelection selection, boolean reveal) {
            if (!HymanifestEditor.this.setSelection(selection, reveal)) {
                super.setSelection(selection, reveal);
            }
        }

    };
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目: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);
}
项目:texlipse    文件:BibEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    fOverviewRuler = createOverviewRuler(getSharedColors());

    ISourceViewer viewer = new ProjectionViewer(parent,
            ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);

    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:tlaplus    文件:TLAEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles)
{
    ProjectionViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(),
            styles);
    // ensure decoration support has been created and configured.
    // @see org.eclipse.ui.texteditor.ExtendedTextEditor#createSourceViewer
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:ncl30-eclipse    文件:NCLEditor.java   
protected ISourceViewer createSourceViewer(Composite parent,
        IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler,
            getOverviewRuler(), isOverviewRulerVisible(), styles);

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

    return viewer;
}
项目:typescript.java    文件:JavaScriptLightWeightEditor.java   
protected final ISourceViewer createSourceViewer(Composite parent, IVerticalRuler verticalRuler, int styles) {

        IPreferenceStore store = getPreferenceStore();
        ISourceViewer viewer = createTypeScriptSourceViewer(parent, verticalRuler, getOverviewRuler(),
                isOverviewRulerVisible(), styles, store);

        // JavaUIHelp.setHelp(this, viewer.getTextWidget(),
        // IJavaHelpContextIds.JAVA_EDITOR);

        TypeScriptSourceViewer TypeScriptSourceViewer = null;
        if (viewer instanceof TypeScriptSourceViewer)
            TypeScriptSourceViewer = (TypeScriptSourceViewer) viewer;

        /*
         * This is a performance optimization to reduce the computation of the
         * text presentation triggered by {@link #setVisibleDocument(IDocument)}
         */
        if (TypeScriptSourceViewer != null && isFoldingEnabled()
                && (store == null || !store.getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS))) {
            // TypeScriptSourceViewer.prepareDelayedProjection();
        }

        // // do not even install projection support until folding is actually
        // // enabled
        // if (isFoldingEnabled()) {
        // installProjectionSupport(TypeScriptSourceViewer);
        // }

        // fProjectionModelUpdater =
        // JavaScriptPlugin.getDefault().getFoldingStructureProviderRegistry()
        // .getCurrentFoldingProvider();
        // if (fProjectionModelUpdater != null) {
        // fProjectionModelUpdater.install(this, projectionViewer);
        // }
        // ensure source viewer decoration support has been created and
        // configured
        getSourceViewerDecorationSupport(viewer);

        return viewer;
    }
项目:bts    文件:XtextEditor.java   
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    if (log.isDebugEnabled())
        log.debug("Creating Xtext source viewer.");

    // overwrite superclass implementation to allow folding
    fAnnotationAccess = createAnnotationAccess();
    fOverviewRuler = createOverviewRuler(getSharedColors());
    ISourceViewer projectionViewer = sourceViewerFactory.createSourceViewer(parent, ruler, getOverviewRuler(),
            isOverviewRulerVisible(), styles);
    getSourceViewerDecorationSupport(projectionViewer);
    return projectionViewer;
}
项目:velocity-edit    文件:VelocityEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles)
{
    fAnnotationAccess = createAnnotationAccess();
    fOverviewRuler = createOverviewRuler(getSharedColors());
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, fOverviewRuler, true, styles);
    // ensure decoration support has been created and configured:
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:APICloud-Studio    文件:AbstractThemeableEditor.java   
@Override
protected ISourceViewer createSourceViewer(Composite parent, final IVerticalRuler ruler, int styles)
{
    fAnnotationAccess = getAnnotationAccess();
    fOverviewRuler = createOverviewRuler(getSharedColors());

    // Need to make it a projection viewer now that we have folding...
    CommonProjectionViewer viewer = new CommonProjectionViewer(parent, ruler, getOverviewRuler(),
            isOverviewRulerVisible(), styles)
    {
        @SuppressWarnings("rawtypes")
        @Override
        public Object getAdapter(Class adapter)
        {
            if (AbstractThemeableEditor.class == adapter || ITextEditor.class == adapter)
            {
                return AbstractThemeableEditor.this;
            }
            return super.getAdapter(adapter);
        }

    };

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

    fThemeableEditorColorsExtension.createBackgroundPainter(viewer);

    return viewer;
}
项目:Eclipse-Markdown-Editor-Plugin    文件:MarkdownEditor.java   
@Override
    protected ISourceViewer createSourceViewer(Composite parent,
            IVerticalRuler ruler, int styles) {
//      if (true) return super.createSourceViewer(parent, ruler, styles);
        // Create with code-folding
        ISourceViewer viewer = new ProjectionViewer(parent, ruler,
                getOverviewRuler(), isOverviewRulerVisible(), styles);
        // ensure decoration support has been created and configured.
        SourceViewerDecorationSupport decSupport = getSourceViewerDecorationSupport(viewer);
//      SourceViewer viewer = (SourceViewer) super.createSourceViewer(parent, ruler, styles);
        // Setup word-wrapping      
        final StyledText widget = viewer.getTextWidget();
        // Listen to pref changes
        prefChangeListener = new IPropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent event) {
                if (event.getProperty().equals(MarkdownPreferencePage.PREF_WORD_WRAP)) {
                    widget.setWordWrap(MarkdownPreferencePage.wordWrap());
                }
            }           
        };
        pStore.addPropertyChangeListener(prefChangeListener);
        // Switch on word-wrapping
        if (MarkdownPreferencePage.wordWrap()) {
            widget.setWordWrap(true);
        }       
        return viewer;  
    }
项目:myLOGO4Eclipse    文件:LogoScriptEditor.java   
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目: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);
}
项目:birt    文件:ScriptEditor.java   
/**
 * Creates the vertical ruler to be used by this editor.
 * 
 * @return the vertical ruler
 */
protected IVerticalRuler createVerticalRuler( )
{
    CompositeRuler ruler = createCompositeRuler( );

    ruler.addDecorator( 0, createLineNumberRulerColumn( ) );
    return ruler;
}
项目:birt    文件:ExpressionBuilder.java   
/**
 * Creates the source viewer to be used by this editor.
 * 
 * @param parent
 *            the parent control
 * @return the source viewer
 */
protected SourceViewer createSourceViewer( Composite parent )
{
    IVerticalRuler ruler = createVerticalRuler( );
    Composite composite = new Composite( parent, SWT.BORDER
            | SWT.LEFT_TO_RIGHT );

    composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
    composite.setLayout( UIUtil.createGridLayoutWithoutMargin( ) );

    int styles = SWT.V_SCROLL
            | SWT.H_SCROLL
            | SWT.MULTI
            | SWT.BORDER
            | SWT.FULL_SELECTION;

    SourceViewer viewer = new SourceViewer( composite, ruler, styles );

    viewer.configure( sourceViewerConfiguration );

    updateStyledTextColors( viewer.getTextWidget( ) );

    JSEditorInput editorInput = new JSEditorInput( expression,
            getEncoding( ) );
    JSDocumentProvider documentProvider = new JSDocumentProvider( );

    try
    {
        documentProvider.connect( editorInput );
    }
    catch ( CoreException e )
    {
        ExceptionHandler.handle( e );
    }

    viewer.setDocument( documentProvider.getDocument( editorInput ),
            ruler == null ? null : ruler.getModel( ) );

    return viewer;
}
项目:birt    文件:ExpressionBuilder.java   
/**
 * Creates the vertical ruler to be used by this editor.
 * 
 * @return the vertical ruler
 */
private IVerticalRuler createVerticalRuler( )
{
    IVerticalRuler ruler = createCompositeRuler( );

    if ( ruler instanceof CompositeRuler )
    {
        CompositeRuler compositeRuler = (CompositeRuler) ruler;

        compositeRuler.addDecorator( 0, createLineNumberRulerColumn( ) );
    }
    return ruler;
}
项目:wt-studio    文件:JsonTextEditor.java   
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {

    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);

    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目: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);
}
项目:goclipse    文件:AbstractLangEditor.java   
@Override
protected final ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    LangSourceViewer viewer = doCreateSourceViewer(parent, ruler, styles);
    assertInstance(viewer, SourceViewer.class);
    assertInstance(viewer, ISourceViewerExt.class);
    return viewer;
}
项目:goclipse    文件:AbstractLangEditor.java   
protected LangSourceViewer doCreateSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    LangSourceViewer viewer = 
            new LangSourceViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);
    // ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);
    return viewer;
}
项目:dLabPro-Plugin    文件:AbstractEditor.java   
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles)
{
  fAnnotationAccess = createAnnotationAccess();
  fOverviewRuler = createOverviewRuler(getSharedColors());

  ISourceViewer viewer = new ProjectionViewer(parent, ruler, fOverviewRuler, true, styles);
  // ensure decoration support has been created and configured:
  getSourceViewerDecorationSupport(viewer);
  return viewer;
}
项目: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 ruler, int styles) {
    super(parent, ruler, styles);
    init();
}
项目: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, int styles, EiffelEditor editor) {
    super(parent, ruler, styles);
    eiffelEditor = editor;
}
项目: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;
}