Codota Logo
IAnnotationModelExtension.getAnnotationModel
Code IndexAdd Codota to your IDE (free)

How to use
getAnnotationModel
method
in
org.eclipse.jface.text.source.IAnnotationModelExtension

Best Java code snippets using org.eclipse.jface.text.source.IAnnotationModelExtension.getAnnotationModel (Showing top 20 results out of 315)

  • Common ways to obtain IAnnotationModelExtension
private void myMethod () {
IAnnotationModelExtension i =
  • Codota Iconnew AnnotationModel()
  • Smart code suggestions by Codota
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public IAnnotationModel getAnnotationModel() {
  if (fVisualAnnotationModel instanceof IAnnotationModelExtension) {
    IAnnotationModelExtension extension= (IAnnotationModelExtension) fVisualAnnotationModel;
    return extension.getAnnotationModel(MODEL_ANNOTATION_MODEL);
  }
  return null;
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public IAnnotationModel getAnnotationModel() {
  if (fVisualAnnotationModel instanceof IAnnotationModelExtension) {
    IAnnotationModelExtension extension= (IAnnotationModelExtension) fVisualAnnotationModel;
    return extension.getAnnotationModel(MODEL_ANNOTATION_MODEL);
  }
  return null;
}
origin: at.bestsolution.eclipse/org.eclipse.fx.text.ui

@Override
public IAnnotationModel getAnnotationModel() {
  if (this.fVisualAnnotationModel instanceof IAnnotationModelExtension) {
    IAnnotationModelExtension extension= (IAnnotationModelExtension) this.fVisualAnnotationModel;
    return extension.getAnnotationModel(MODEL_ANNOTATION_MODEL);
  }
  return null;
}
origin: org.eclipse/org.eclipse.ui.workbench.texteditor

/**
 * Returns the diff model associated with the annotation model of the document currently displayed
 * in this action's editor, if any.
 *
 * @return the diff model associated with the displayed document, or <code>null</code>
 */
protected ILineDiffer getDiffer() {
  IAnnotationModelExtension extension= getModel();
  if (extension != null)
    return (ILineDiffer)extension.getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  return null;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void setModel(IAnnotationModel model) {
  if (model instanceof IAnnotationModelExtension) {
    IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
    model= extension.getAnnotationModel(ProjectionSupport.PROJECTION);
  }
  super.setModel(model);
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void setModel(IAnnotationModel model) {
  if (model instanceof IAnnotationModelExtension) {
    IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
    model= extension.getAnnotationModel(ProjectionSupport.PROJECTION);
  }
  super.setModel(model);
}
origin: org.eclipse/org.eclipse.ui.editors

/**
 * Returns the diff model associated with the annotation model of the document currently displayed
 * in this action's editor, if any.
 *
 * @return the diff model associated with the displayed document, or <code>null</code>
 */
protected ILineDiffer getDiffer() {
  IAnnotationModelExtension extension= getModel();
  if (extension != null)
    return (ILineDiffer)extension.getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  return null;
}
origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

/**
 * Returns the diff model associated with the annotation model of the document currently displayed
 * in this action's editor, if any.
 *
 * @return the diff model associated with the displayed document, or <code>null</code>
 */
protected ILineDiffer getDiffer() {
  IAnnotationModelExtension extension= getModel();
  if (extension != null)
    return (ILineDiffer)extension.getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  return null;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

/**
 * Returns the diff model associated with the annotation model of the document currently displayed
 * in this action's editor, if any.
 *
 * @return the diff model associated with the displayed document, or <code>null</code>
 */
protected ILineDiffer getDiffer() {
  IAnnotationModelExtension extension= getModel();
  if (extension != null)
    return (ILineDiffer)extension.getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  return null;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors

/**
 * Returns the diff model associated with the annotation model of the document currently displayed
 * in this action's editor, if any.
 *
 * @return the diff model associated with the displayed document, or <code>null</code>
 */
protected ILineDiffer getDiffer() {
  IAnnotationModelExtension extension= getModel();
  if (extension != null)
    return (ILineDiffer)extension.getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  return null;
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns the projection annotation model.
 *
 * @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;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Returns the projection annotation model.
 *
 * @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;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Sets the annotation model.
 *
 * @param model the annotation model, possibly <code>null</code>
 * @see IVerticalRulerColumn#setModel(IAnnotationModel)
 */
public void setModel(IAnnotationModel model) {
  IAnnotationModel newModel;
  if (model instanceof IAnnotationModelExtension)
    newModel= ((IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  else
    newModel= model;
  setDiffer(newModel);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Sets the annotation model.
 *
 * @param model the annotation model, possibly <code>null</code>
 * @see IVerticalRulerColumn#setModel(IAnnotationModel)
 */
public void setModel(IAnnotationModel model) {
  IAnnotationModel newModel;
  if (model instanceof IAnnotationModelExtension)
    newModel= ((IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  else
    newModel= model;
  setDiffer(newModel);
}
origin: angelozerr/jdt-codemining

/**
 * Sets the annotation model.
 *
 * @param model the annotation model, possibly <code>null</code>
 * @see IVerticalRulerColumn#setModel(IAnnotationModel)
 */
private void setModel(IAnnotationModel model) {
  IAnnotationModel diffModel;
  if (model instanceof IAnnotationModelExtension)
    diffModel = ((IAnnotationModelExtension) model).getAnnotationModel(MY_QUICK_DIFF_MODEL_ID);
  else
    diffModel = model;
  if (diffModel == null) {
    //diffModel = new DocumentLineDiffer();
  }
  setDiffer(diffModel);
  // setAnnotationModel(model);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Sets the annotation model.
 *
 * @param model the annotation model, possibly <code>null</code>
 * @see IVerticalRulerColumn#setModel(IAnnotationModel)
 */
public void setModel(IAnnotationModel model) {
  IAnnotationModel diffModel;
  if (model instanceof IAnnotationModelExtension)
    diffModel= ((IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  else
    diffModel= model;
  setDiffer(diffModel);
  setAnnotationModel(model);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Sets the annotation model.
 *
 * @param model the annotation model, possibly <code>null</code>
 * @see IVerticalRulerColumn#setModel(IAnnotationModel)
 */
public void setModel(IAnnotationModel model) {
  IAnnotationModel diffModel;
  if (model instanceof IAnnotationModelExtension)
    diffModel= ((IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
  else
    diffModel= model;
  setDiffer(diffModel);
  setAnnotationModel(model);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Extracts the line differ - if any - from the viewer's document's annotation model.
 * @param viewer the viewer
 * @return a line differ for the document displayed in viewer, or <code>null</code>.
 */
private ILineDiffer getDiffer(ISourceViewer viewer) {
  IAnnotationModel model= viewer.getAnnotationModel();
  if (model == null)
    return null;
  if (model instanceof IAnnotationModelExtension) {
    IAnnotationModel diffModel= ((IAnnotationModelExtension)model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
    if (diffModel != null)
      model= diffModel;
  }
  if (model instanceof ILineDiffer) {
    if (model instanceof ILineDifferExtension2 && ((ILineDifferExtension2)model).isSuspended())
      return null;
    return (ILineDiffer)model;
  }
  return null;
}
origin: org.eclipse.platform/org.eclipse.jface.text

private void ensureAnnotationModelInstalled() {
  LinkedPositionAnnotations lpa= fCurrentTarget.fAnnotationModel;
  if (lpa != null) {
    ITextViewer viewer= fCurrentTarget.getViewer();
    if (viewer instanceof ISourceViewer) {
      ISourceViewer sv= (ISourceViewer) viewer;
      IAnnotationModel model= sv.getAnnotationModel();
      if (model instanceof IAnnotationModelExtension) {
        IAnnotationModelExtension ext= (IAnnotationModelExtension) model;
        IAnnotationModel ourModel= ext.getAnnotationModel(getUniqueKey());
        if (ourModel == null) {
          ext.addAnnotationModel(getUniqueKey(), lpa);
        }
      }
    }
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

private void ensureAnnotationModelInstalled() {
  LinkedPositionAnnotations lpa= fCurrentTarget.fAnnotationModel;
  if (lpa != null) {
    ITextViewer viewer= fCurrentTarget.getViewer();
    if (viewer instanceof ISourceViewer) {
      ISourceViewer sv= (ISourceViewer) viewer;
      IAnnotationModel model= sv.getAnnotationModel();
      if (model instanceof IAnnotationModelExtension) {
        IAnnotationModelExtension ext= (IAnnotationModelExtension) model;
        IAnnotationModel ourModel= ext.getAnnotationModel(getUniqueKey());
        if (ourModel == null) {
          ext.addAnnotationModel(getUniqueKey(), lpa);
        }
      }
    }
  }
}
org.eclipse.jface.text.sourceIAnnotationModelExtensiongetAnnotationModel

Javadoc

Returns the attached IAnnotationModel for key, or null if none is attached for key.

Popular methods of IAnnotationModelExtension

  • replaceAnnotations
    Adds and removes annotations to/from this annotation model in a single step. The annotations to remo
  • addAnnotationModel
    Attaches attachment to the receiver. Connectsattachment to the currently connected document. Ifattac
  • removeAnnotationModel
    Removes and returns the attached IAnnotationModel forkey.
  • modifyAnnotationPosition
    Modifies the position associated with the given annotation to equal the given position. If the annot
  • removeAllAnnotations
    Removes all annotations from this annotation model.
  • getModificationStamp
    Returns the modification stamp of this annotation model.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now