@Override public void annotationDefaultSelected(VerticalRulerEvent event) { Annotation annotation= event.getSelectedAnnotation(); IAnnotationModel model= getAnnotationModel(); if (isOverrideIndicator(annotation)) { ((OverrideIndicatorManager.OverrideIndicator)annotation).open(); return; } if (isBreakpoint(annotation)) triggerAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, event.getEvent()); Position position= model.getPosition(annotation); if (position == null) return; if (isQuickFixTarget(annotation)) { ITextOperationTarget operation= getTextEditor().getAdapter(ITextOperationTarget.class); final int opCode= ISourceViewer.QUICK_ASSIST; if (operation != null && operation.canDoOperation(opCode)) { getTextEditor().selectAndReveal(position.getOffset(), position.getLength()); operation.doOperation(opCode); return; } } // default: super.annotationDefaultSelected(event); }
@Override public void annotationDefaultSelected(VerticalRulerEvent event) { Annotation annotation= event.getSelectedAnnotation(); IAnnotationModel model= getAnnotationModel(); if (isOverrideIndicator(annotation)) { ((OverrideIndicatorManager.OverrideIndicator)annotation).open(); return; } if (isBreakpoint(annotation)) triggerAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, event.getEvent()); Position position= model.getPosition(annotation); if (position == null) return; if (isQuickFixTarget(annotation)) { ITextOperationTarget operation= getTextEditor().getAdapter(ITextOperationTarget.class); final int opCode= ISourceViewer.QUICK_ASSIST; if (operation != null && operation.canDoOperation(opCode)) { getTextEditor().selectAndReveal(position.getOffset(), position.getLength()); operation.doOperation(opCode); return; } } // default: super.annotationDefaultSelected(event); }