@Override public void setTopIndex(int index) { if (fTextWidget != null) { int widgetLine= modelLine2WidgetLine(index); if (widgetLine == -1) widgetLine= getClosestWidgetLineForModelLine(index); if (widgetLine > -1) { fTextWidget.setTopIndex(widgetLine); updateViewportListeners(INTERNAL); } } }
@Override public void setTopIndex(int index) { if (fTextWidget != null) { int widgetLine= modelLine2WidgetLine(index); if (widgetLine == -1) widgetLine= getClosestWidgetLineForModelLine(index); if (widgetLine > -1) { fTextWidget.setTopIndex(widgetLine); updateViewportListeners(INTERNAL); } } }
protected void setLastRulerMouseLocation(ISourceViewer viewer, int line) { // set last mouse activity in order to get the correct context menu if (fCompositeRuler != null) { StyledText st= viewer.getTextWidget(); if (st != null && !st.isDisposed()) { if (viewer instanceof ITextViewerExtension5) { int widgetLine= ((ITextViewerExtension5)viewer).modelLine2WidgetLine(line); Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine)); fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y); } else if (viewer instanceof TextViewer) { // TODO remove once TextViewer implements the extension int widgetLine= ((TextViewer)viewer).modelLine2WidgetLine(line); Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine)); fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y); } } } }
protected void setLastRulerMouseLocation(ISourceViewer viewer, int line) { // set last mouse activity in order to get the correct context menu if (fCompositeRuler != null) { StyledText st= viewer.getTextWidget(); if (st != null && !st.isDisposed()) { if (viewer instanceof ITextViewerExtension5) { int widgetLine= ((ITextViewerExtension5)viewer).modelLine2WidgetLine(line); Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine)); fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y); } else if (viewer instanceof TextViewer) { // TODO remove once TextViewer implements the extension int widgetLine= ((TextViewer)viewer).modelLine2WidgetLine(line); Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine)); fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y); } } } }
protected void setLastRulerMouseLocation(ISourceViewer viewer, int line) { // set last mouse activity in order to get the correct context menu if (fCompositeRuler != null) { StyledText st= viewer.getTextWidget(); if (st != null && !st.isDisposed()) { if (viewer instanceof ITextViewerExtension5) { int widgetLine= ((ITextViewerExtension5)viewer).modelLine2WidgetLine(line); Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine)); fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y); } else if (viewer instanceof TextViewer) { // TODO remove once TextViewer implements the extension int widgetLine= ((TextViewer)viewer).modelLine2WidgetLine(line); Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine)); fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y); } } } }
int stableWidgetLine= modelLine2WidgetLine(stableLine); fStablePixel= getTextWidget().getLinePixel(stableWidgetLine); IRegion stableLineInfo= fUpdaterDocument.getLineInformation(stableLine);
int stableWidgetLine= modelLine2WidgetLine(stableLine); fStablePixel= getTextWidget().getLinePixel(stableWidgetLine); IRegion stableLineInfo= fUpdaterDocument.getLineInformation(stableLine);