public void setEditor(ITextEditor editor) { if (getTextEditor() != null) { IVerticalRulerInfo service= (IVerticalRulerInfo) getTextEditor().getAdapter(IVerticalRulerInfo.class); if (service instanceof IVerticalRulerInfoExtension) ((IVerticalRulerInfoExtension) service).removeVerticalRulerListener(this); } super.setEditor(editor); if (getTextEditor() != null) { IVerticalRulerInfo service= (IVerticalRulerInfo) getTextEditor().getAdapter(IVerticalRulerInfo.class); if (service instanceof IVerticalRulerInfoExtension) ((IVerticalRulerInfoExtension) service).addVerticalRulerListener(this); } }
/** * Returns the <code>AbstractMarkerAnnotationModel</code> of the editor's input. * * @return the marker annotation model or <code>null</code> if there's none */ protected IAnnotationModel getAnnotationModel() { IDocumentProvider provider= getTextEditor().getDocumentProvider(); return provider.getAnnotationModel(getTextEditor().getEditorInput()); }
/** * Returns the <code>AbstractMarkerAnnotationModel</code> of the editor's input. * * @return the marker annotation model or <code>null</code> if there's none */ protected IAnnotationModel getAnnotationModel() { IDocumentProvider provider= getTextEditor().getDocumentProvider(); return provider.getAnnotationModel(getTextEditor().getEditorInput()); }
@Override public void setEditor(ITextEditor editor) { if (getTextEditor() != null) { IVerticalRulerInfo service= getTextEditor().getAdapter(IVerticalRulerInfo.class); if (service instanceof IVerticalRulerInfoExtension) ((IVerticalRulerInfoExtension) service).removeVerticalRulerListener(this); } super.setEditor(editor); if (getTextEditor() != null) { IVerticalRulerInfo service= getTextEditor().getAdapter(IVerticalRulerInfo.class); if (service instanceof IVerticalRulerInfoExtension) ((IVerticalRulerInfoExtension) service).addVerticalRulerListener(this); } }
@Override public void setEditor(ITextEditor editor) { if (getTextEditor() != null) { IVerticalRulerInfo service= getTextEditor().getAdapter(IVerticalRulerInfo.class); if (service instanceof IVerticalRulerInfoExtension) ((IVerticalRulerInfoExtension) service).removeVerticalRulerListener(this); } super.setEditor(editor); if (getTextEditor() != null) { IVerticalRulerInfo service= getTextEditor().getAdapter(IVerticalRulerInfo.class); if (service instanceof IVerticalRulerInfoExtension) ((IVerticalRulerInfoExtension) service).addVerticalRulerListener(this); } }
/** * Returns the <code>AbstractMarkerAnnotationModel</code> of the editor's input. * * @return the marker annotation model or <code>null</code> if there's none */ protected IAnnotationModel getAnnotationModel() { IDocumentProvider provider= getTextEditor().getDocumentProvider(); return provider.getAnnotationModel(getTextEditor().getEditorInput()); }
public void annotationDefaultSelected(VerticalRulerEvent event) { Annotation a= event.getSelectedAnnotation(); IAnnotationModel model= getAnnotationModel(); Position position= model.getPosition(a); if (position == null) return; getTextEditor().selectAndReveal(position.offset, position.length); }
@Override public void annotationDefaultSelected(VerticalRulerEvent event) { Annotation a= event.getSelectedAnnotation(); IAnnotationModel model= getAnnotationModel(); Position position= model.getPosition(a); if (position == null) return; getTextEditor().selectAndReveal(position.offset, position.length); }
@Override public void annotationDefaultSelected(VerticalRulerEvent event) { Annotation a= event.getSelectedAnnotation(); IAnnotationModel model= getAnnotationModel(); Position position= model.getPosition(a); if (position == null) return; getTextEditor().selectAndReveal(position.offset, position.length); }