@Override public IAnnotationModel getAnnotationModel() { if (fVisualAnnotationModel instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) fVisualAnnotationModel; return extension.getAnnotationModel(MODEL_ANNOTATION_MODEL); } return null; }
@Override public IAnnotationModel getAnnotationModel() { if (fVisualAnnotationModel instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) fVisualAnnotationModel; return extension.getAnnotationModel(MODEL_ANNOTATION_MODEL); } return null; }
@Override public IAnnotationModel getAnnotationModel() { if (this.fVisualAnnotationModel instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) this.fVisualAnnotationModel; return extension.getAnnotationModel(MODEL_ANNOTATION_MODEL); } return null; }
/** * 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; }
@Override public void setModel(IAnnotationModel model) { if (model instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) model; model= extension.getAnnotationModel(ProjectionSupport.PROJECTION); } super.setModel(model); }
@Override public void setModel(IAnnotationModel model) { if (model instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) model; model= extension.getAnnotationModel(ProjectionSupport.PROJECTION); } super.setModel(model); }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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; }
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); } } } } }
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); } } } } }