/** * Constructs this column with the given arguments. * * @param model the annotation model to get the annotations from * @param width the width of the vertical ruler */ public AnnotationRulerColumn(IAnnotationModel model, int width) { fWidth= width; fAllowSetModel= false; fModel= model; fModel.addAnnotationModelListener(fAnnotationListener); }
/** * Constructs this column with the given arguments. * * @param model the annotation model to get the annotations from * @param width the width of the vertical ruler */ public AnnotationRulerColumn(IAnnotationModel model, int width) { fWidth= width; fAllowSetModel= false; fModel= model; fModel.addAnnotationModelListener(fInternalListener); }
public void addAnnotationModelListener(IAnnotationModelListener listener) { if(delegate != null) { delegate.addAnnotationModelListener(listener); } }
/** * Constructs this column with the given arguments. * * @param model the annotation model to get the annotations from * @param width the width of the vertical ruler * @param annotationAccess the annotation access * @since 3.0 */ public AnnotationRulerColumn(IAnnotationModel model, int width, IAnnotationAccess annotationAccess) { this(width, annotationAccess); fAllowSetModel= false; fModel= model; fModel.addAnnotationModelListener(fAnnotationListener); }
/** * Constructs this column with the given arguments. * * @param model the annotation model to get the annotations from * @param width the width of the vertical ruler * @param annotationAccess the annotation access * @since 3.0 */ public AnnotationRulerColumn(IAnnotationModel model, int width, IAnnotationAccess annotationAccess) { this(width, annotationAccess); fAllowSetModel= false; fModel= model; fModel.addAnnotationModelListener(fInternalListener); }
public AnnotationIssueProcessor(IXtextDocument xtextDocument, IAnnotationModel annotationModel, IssueResolutionProvider issueResolutionProvider) { super(); this.annotationModel = annotationModel; if(annotationModel == null) throw new IllegalArgumentException("Annotation model cannot be null"); annotationModel.addAnnotationModelListener(this); this.xtextDocument = xtextDocument; this.issueResolutionProvider = issueResolutionProvider; }
private void setDiffer(IAnnotationModel differ) { if (differ instanceof ILineDiffer || differ == null) { if (fLineDiffer != differ) { if (fLineDiffer != null) ((IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener); fLineDiffer = (ILineDiffer) differ; if (fLineDiffer != null) ((IAnnotationModel) fLineDiffer).addAnnotationModelListener(fAnnotationListener); } } }
/** * Adds the projection annotation model to the given annotation model. * * @param model the model to which the projection annotation model is added */ private void addProjectionAnnotationModel(IAnnotationModel model) { if (model instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) model; extension.addAnnotationModel(ProjectionSupport.PROJECTION, fProjectionAnnotationModel); model.addAnnotationModelListener(fAnnotationModelListener); } }
/** * Adds the projection annotation model to the given annotation model. * * @param model the model to which the projection annotation model is added */ private void addProjectionAnnotationModel(IAnnotationModel model) { if (model instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) model; extension.addAnnotationModel(ProjectionSupport.PROJECTION, fProjectionAnnotationModel); model.addAnnotationModelListener(fAnnotationModelListener); } }
@Override public void addAnnotationModel(Object key, IAnnotationModel attachment) { Assert.isNotNull(attachment); if (!fAttachments.containsValue(attachment)) { fAttachments.put(key, attachment); for (int i= 0; i < fOpenConnections; i++) attachment.connect(fDocument); attachment.addAnnotationModelListener(fModelListener); } }
@Override public void addAnnotationModel(Object key, IAnnotationModel attachment) { Assert.isNotNull(attachment); if (!fAttachments.containsValue(attachment)) { fAttachments.put(key, attachment); for (int i= 0; i < fOpenConnections; i++) attachment.connect(fDocument); attachment.addAnnotationModelListener(fModelListener); } }
/** * Sets the line differ. * * @param differ the line differ */ private void setDiffer(IAnnotationModel differ) { if (differ instanceof ILineDiffer) { if (fLineDiffer != differ) { if (fLineDiffer != null) ((IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener); fLineDiffer= (ILineDiffer) differ; ((IAnnotationModel) fLineDiffer).addAnnotationModelListener(fAnnotationListener); } } }
/** * Sets the line differ. * * @param differ the line differ or <code>null</code> if none */ private void setDiffer(IAnnotationModel differ) { if (differ instanceof ILineDiffer || differ == null) { if (fLineDiffer != differ) { if (fLineDiffer != null) ((IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener); fLineDiffer= (ILineDiffer) differ; if (fLineDiffer != null) ((IAnnotationModel) fLineDiffer).addAnnotationModelListener(fAnnotationListener); } } }
@Override public void setModel(IAnnotationModel model) { if (fAllowSetModel && model != fModel) { if (fModel != null) fModel.removeAnnotationModelListener(fAnnotationListener); fModel= model; if (fModel != null) fModel.addAnnotationModelListener(fAnnotationListener); postRedraw(); } }
@Override public void setModel(IAnnotationModel model) { if (model != fModel) { if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); fModel= model; if (fModel != null) fModel.addAnnotationModelListener(fInternalListener); update(); } }
@Override public void setModel(IAnnotationModel model) { if (model != fModel) { if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); fModel= model; if (fModel != null) fModel.addAnnotationModelListener(fInternalListener); update(); } }
@Override public void setModel(IAnnotationModel model) { if (model != fModel || model != null) { if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); fModel= model; if (fModel != null) fModel.addAnnotationModelListener(fInternalListener); update(); } }
@Override public void setModel(IAnnotationModel model) { if (model != fModel || model != null) { if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); fModel= model; if (fModel != null) fModel.addAnnotationModelListener(fInternalListener); update(); } }
@Override public void setModel(IAnnotationModel model) { if (fAllowSetModel && model != fModel) { if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); fModel= model; if (fModel != null) fModel.addAnnotationModelListener(fInternalListener); postRedraw(); } }
protected void updateImageAndRegisterListener() { defaultImage = editor.getDefaultImage(); updateEditorImage(editor); annotationModel = editor.getInternalSourceViewer().getAnnotationModel(); if (annotationModel != null) annotationModel.addAnnotationModelListener(this); }