public void showContextMenu(Menu menu) { if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationContextMenuAboutToShow(event, menu); } }
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 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 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 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 a= event.getSelectedAnnotation(); IAnnotationModel model= getAnnotationModel(); Position position= model.getPosition(a); if (position == null) return; getTextEditor().selectAndReveal(position.offset, position.length); }
public void defaultSelected() { if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationDefaultSelected(event); } dispose(); }
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); Position position= model.getPosition(annotation); if (position == null) return; if (isQuickFixTarget(annotation)) { ITextOperationTarget operation= (ITextOperationTarget) 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); }
public void selected() { Display disp= fShell.getDisplay(); canvas.setCursor(getHandCursor(disp)); // TODO: shade - for now: set grey background canvas.setBackground(getSelectionColor(disp)); // highlight the viewer background at its position oldStyles= setViewerBackground(fAnnotation); // set the selection fSelection= this; if (fHoverManager != null) fHoverManager.showInformation(); if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationSelected(event); } }
public void selected() { Display disp= fShell.getDisplay(); canvas.setCursor(getHandCursor(disp)); // TODO: shade - for now: set grey background canvas.setBackground(getSelectionColor(disp)); // highlight the viewer background at its position oldStyles= setViewerBackground(fAnnotation); // set the selection fSelection= this; if (fHoverManager != null) fHoverManager.showInformation(); if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationSelected(event); } }
public void selected() { Display disp= fShell.getDisplay(); canvas.setCursor(fHandCursor); // TODO: shade - for now: set grey background canvas.setBackground(getSelectionColor(disp)); // highlight the viewer background at its position oldStyles= setViewerBackground(fAnnotation); // set the selection fSelection= this; if (fHoverManager != null) fHoverManager.showInformation(); if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationSelected(event); } }
public void defaultSelected(MouseEvent e) { if (fInput.fAnnotationListener != null) { Event swtEvent= new Event(); swtEvent.type= SWT.MouseDown; swtEvent.display= e.display; swtEvent.widget= e.widget; swtEvent.time= e.time; swtEvent.data= e.data; swtEvent.x= e.x; swtEvent.y= e.y; swtEvent.button= e.button; swtEvent.stateMask= e.stateMask; swtEvent.count= e.count; VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation, swtEvent); fInput.fAnnotationListener.annotationDefaultSelected(event); } dispose(); }
public void defaultSelected(MouseEvent e) { if (fInput.fAnnotationListener != null) { Event swtEvent= new Event(); swtEvent.type= SWT.MouseDown; swtEvent.display= e.display; swtEvent.widget= e.widget; swtEvent.time= e.time; swtEvent.data= e.data; swtEvent.x= e.x; swtEvent.y= e.y; swtEvent.button= e.button; swtEvent.stateMask= e.stateMask; swtEvent.count= e.count; VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation, swtEvent); fInput.fAnnotationListener.annotationDefaultSelected(event); } dispose(); }