Examples of IAnnotationModelExtension


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

   * @return the removed projection annotation model or <code>null</code> if there was none
   */
  private IAnnotationModel removeProjectionAnnotationModel(IAnnotationModel model) {
    if (model instanceof IAnnotationModelExtension) {
      model.removeAnnotationModelListener(fAnnotationModelListener);
      IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
      return extension.removeAnnotationModel(ProjectionSupport.PROJECTION);
    }
    return null;
  }
View Full Code Here

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

   * @return the projection annotation model
   */
  public ProjectionAnnotationModel getProjectionAnnotationModel() {
    IAnnotationModel model= getVisualAnnotationModel();
    if (model instanceof IAnnotationModelExtension) {
      IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
      return (ProjectionAnnotationModel) extension.getAnnotationModel(ProjectionSupport.PROJECTION);
    }
    return null;
  }
View Full Code Here

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

  /*
   * @see org.eclipse.jface.text.source.AnnotationRulerColumn#setModel(org.eclipse.jface.text.source.IAnnotationModel)
   */
  public void setModel(IAnnotationModel model) {
    if (model instanceof IAnnotationModelExtension) {
      IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
      model= extension.getAnnotationModel(ProjectionSupport.PROJECTION);
    }
    super.setModel(model);
  }
View Full Code Here

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

   * @param editor Editor to attach a annotation model to
   */
  public static void attach(ITextEditor editor) {
    IAnnotationModel model = editor.getDocumentProvider().getAnnotationModel(editor.getEditorInput());
    if (!(model instanceof IAnnotationModelExtension)) return;
    IAnnotationModelExtension modelex = (IAnnotationModelExtension) model;
   
    IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());
   
    CoverageAnnotationModel coveragemodel = (CoverageAnnotationModel) modelex.getAnnotationModel(KEY);
    if (coveragemodel == null) {
      coveragemodel = new CoverageAnnotationModel(editor, document);
      modelex.addAnnotationModel(KEY, coveragemodel);
    }
  }
View Full Code Here

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

   * @param editor Editor to detach the annotation model from
   */
  public static void detach(ITextEditor editor) {
    IAnnotationModel model = editor.getDocumentProvider().getAnnotationModel(editor.getEditorInput());
    if (!(model instanceof IAnnotationModelExtension)) return;
    IAnnotationModelExtension modelex = (IAnnotationModelExtension) model;
    modelex.removeAnnotationModel(KEY);
  }
View Full Code Here

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

      return;
    IAnnotationModel model = provider.getAnnotationModel(editor
        .getEditorInput());
    if (!(model instanceof IAnnotationModelExtension))
      return;
    IAnnotationModelExtension modelex = (IAnnotationModelExtension) model;

    IDocument document = provider.getDocument(editor.getEditorInput());

    CoverageAnnotationModel coveragemodel = (CoverageAnnotationModel) modelex
        .getAnnotationModel(KEY);
    if (coveragemodel == null) {
      coveragemodel = new CoverageAnnotationModel(editor, document);
      modelex.addAnnotationModel(KEY, coveragemodel);
    }
  }
View Full Code Here

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

      return;
    IAnnotationModel model = provider.getAnnotationModel(editor
        .getEditorInput());
    if (!(model instanceof IAnnotationModelExtension))
      return;
    IAnnotationModelExtension modelex = (IAnnotationModelExtension) model;
    modelex.removeAnnotationModel(KEY);
  }
View Full Code Here

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

      return;
    IAnnotationModel model = provider.getAnnotationModel(editor
        .getEditorInput());
    if (!(model instanceof IAnnotationModelExtension))
      return;
    IAnnotationModelExtension modelex = (IAnnotationModelExtension) model;

    IDocument document = provider.getDocument(editor.getEditorInput());

    CoverageAnnotationModel coveragemodel = (CoverageAnnotationModel) modelex
        .getAnnotationModel(KEY);
    if (coveragemodel == null) {
      coveragemodel = new CoverageAnnotationModel(editor, document);
      modelex.addAnnotationModel(KEY, coveragemodel);
    }
  }
View Full Code Here

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

      return;
    IAnnotationModel model = provider.getAnnotationModel(editor
        .getEditorInput());
    if (!(model instanceof IAnnotationModelExtension))
      return;
    IAnnotationModelExtension modelex = (IAnnotationModelExtension) model;
    modelex.removeAnnotationModel(KEY);
  }
View Full Code Here

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

    IDocumentProvider provider = editor.getDocumentProvider();
    // there may be text editors without document providers (SF #1725100)
    if (provider == null) return;
    IAnnotationModel model = provider.getAnnotationModel(editor.getEditorInput());
    if (!(model instanceof IAnnotationModelExtension)) return;
    IAnnotationModelExtension modelex = (IAnnotationModelExtension) model;
   
    IDocument document = provider.getDocument(editor.getEditorInput());
   
    CoverageAnnotationModel coveragemodel = (CoverageAnnotationModel) modelex.getAnnotationModel(KEY);
    if (coveragemodel == null) {
      coveragemodel = new CoverageAnnotationModel(editor, document);
      modelex.addAnnotationModel(KEY, coveragemodel);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.