Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.AnnotationModel


     */
    public void setDocument( IDocument document )
    {
        if ( sourceViewer.getAnnotationModel() == null )
        {
            IAnnotationModel model = new AnnotationModel();
            sourceViewer.setDocument( sourceViewer.getDocument(), model );
        }

        // add annotation painter
        if ( paintManager == null && sourceViewer.getAnnotationModel() instanceof IAnnotationModelExtension )
View Full Code Here


    IAnnotationModel oldDiffer= getDiffer();
    if (oldDiffer == null && annotationModel != null)
      return false; // quick diff is enabled, but no differ? not working for whatever reason

    if (annotationModel == null)
      annotationModel= new AnnotationModel();
    if (!(annotationModel instanceof IAnnotationModelExtension))
      return false;

    QuickDiff util= new QuickDiff();
    Object oldDifferId= util.getConfiguredQuickDiffProvider(oldDiffer);
View Full Code Here

      if (store != null) {
        String defaultId= store.getString(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_DEFAULT_PROVIDER);
        differ= new QuickDiff().createQuickDiffAnnotationModel(getEditor(), defaultId);
        if (differ != null) {
          if (model == null)
            model= new AnnotationModel();
          model.addAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID, differ);
        }
      }
    } else if (differ instanceof ILineDifferExtension2) {
      if (((ILineDifferExtension2) differ).isSuspended())
View Full Code Here

   */
  public IAnnotationModel createAnnotationModel(IPath location) {
    IFile file= FileBuffers.getWorkspaceFileAtLocation(location);
    if (file != null)
      return new ResourceMarkerAnnotationModel(file);
    return new AnnotationModel();
  }
View Full Code Here

      // we can only create a resource marker annotationmodel off of a
      // valid resource
      if (res != null)
        model = new StructuredResourceMarkerAnnotationModel(res, id);
      else
        model = new AnnotationModel();
    }
    if (model == null) {
      model = super.createAnnotationModel(element);
    }
    return model;
View Full Code Here

      // we can only create a resource marker annotationmodel off of a
      // valid resource
      if (res != null)
        model = new StructuredResourceMarkerAnnotationModel(res, id);
      else
        model = new AnnotationModel();
    }
    if (model == null) {
      model = super.createAnnotationModel(element);
    }
    return model;
View Full Code Here

    {
        this.document = document;

        if ( this.sourceViewer.getAnnotationModel() == null )
        {
            IAnnotationModel model = new AnnotationModel();
            this.sourceViewer.setDocument( this.sourceViewer.getDocument(), model );
        }

        // add annotation painter
        if ( this.paintManager == null && this.sourceViewer.getAnnotationModel() instanceof IAnnotationModelExtension )
View Full Code Here

     */
    public void setDocument( IDocument document )
    {
        if ( sourceViewer.getAnnotationModel() == null )
        {
            IAnnotationModel model = new AnnotationModel();
            sourceViewer.setDocument( sourceViewer.getDocument(), model );
        }

        // add annotation painter
        if ( paintManager == null && sourceViewer.getAnnotationModel() instanceof IAnnotationModelExtension )
View Full Code Here

    setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));
    sashForm = new SashForm(this, SWT.VERTICAL);
   
    rootComposite = createRootComposite(sashForm);
    colors = new Colors(getDisplay());
    viewerAnnotationModel = new AnnotationModel();
    viewer = createSourceViewer(rootComposite, viewerAnnotationModel);
    viewer.getTextWidget().setWrapIndent(20);
    viewer.configure(new Configuration(colors));
    createViewerActions(viewer);
    projectionSupport = new ProjectionSupport(viewer,new ProjectionAnnotationAccess(), colors);
View Full Code Here

 
  private void displayNewDocument()  {
    if(activeDocument == null) {
      return;
    }
    final AnnotationModel model = new AnnotationModel();
    viewer.disableProjection();
    final boolean wwflag = viewer.getTextWidget().getWordWrap();
    if(wwflag) viewer.getTextWidget().setWordWrap(false);
    viewer.setDocument(activeDocument.getDocument(), model);
    if(wwflag) viewer.getTextWidget().setWordWrap(true);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.AnnotationModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.