Examples of revealRange()


Examples of org.eclipse.jface.text.ITextViewer.revealRange()

        /*
         * log.debug("Visible: " + visible + " - Selected: " + newSelection);
         */

        if (!TextUtilities.overlaps(visible, newSelection)) {
            viewer.revealRange(selection.getOffset(), selection.getLength());
            return;
        }

        if (!(viewer instanceof ITextViewerExtension5))
            return;
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewer.revealRange()

                int targetOffset = visible.getOffset() + visible.getLength();
                while (getLine(viewer5, targetOffset) < targetLine) {
                    targetOffset++;
                }

                viewer.revealRange(newSelection.getOffset(), targetOffset
                    - newSelection.getOffset());
            }

        } else {
            if (newSelection.getOffset() < visible.getOffset()) {
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewer.revealRange()

                    int targetOffset = visible.getOffset();
                    while (getLine(viewer5, targetOffset) > targetLine) {
                        targetOffset--;
                    }

                    viewer.revealRange(newSelection.getOffset(), targetOffset
                        - newSelection.getOffset());
                }
            }
        }
    }
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewer.revealRange()

        try {
            /**
             * Show the middle of the user's (with
             * {@link User.Permission#WRITE_ACCESS}) viewport.
             */
            viewer.revealRange(
                document.getLineOffset(top + ((bottom - top) / 2)), 0);
        } catch (BadLocationException e) {
            log.error("Internal Error: BadLocationException - ", e);
        }

View Full Code Here

Examples of org.eclipse.jface.text.ITextViewer.revealRange()

      ITextViewerExtension5 extension5= (ITextViewerExtension5) viewer;
      extension5.exposeModelRange(new Region(fFramePosition.offset, fFramePosition.length));
    } else if (!viewer.overlapsWithVisibleRegion(fFramePosition.offset, fFramePosition.length)) {
      viewer.resetVisibleRegion();
    }
    viewer.revealRange(fFramePosition.offset, fFramePosition.length);
    viewer.setSelectedRange(fFramePosition.offset, fFramePosition.length);
  }

  private void redraw() {
    if (fCurrentTarget.fAnnotationModel != null)
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewer.revealRange()

      ITextViewerExtension5 extension5= (ITextViewerExtension5) viewer;
      extension5.exposeModelRange(new Region(fFramePosition.offset, fFramePosition.length));
    } else if (!viewer.overlapsWithVisibleRegion(fFramePosition.offset, fFramePosition.length)) {
      viewer.resetVisibleRegion();
    }
    viewer.revealRange(fFramePosition.offset, fFramePosition.length);
    viewer.setSelectedRange(fFramePosition.offset, fFramePosition.length);
  }

  private void redraw() {
    if (fCurrentTarget.fAnnotationModel != null)
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewer.revealRange()

      ITextViewerExtension5 extension5= (ITextViewerExtension5) viewer;
      extension5.exposeModelRange(new Region(fFramePosition.offset, fFramePosition.length));
    } else if (!viewer.overlapsWithVisibleRegion(fFramePosition.offset, fFramePosition.length)) {
      viewer.resetVisibleRegion();
    }
    viewer.revealRange(fFramePosition.offset, fFramePosition.length);
    viewer.setSelectedRange(fFramePosition.offset, fFramePosition.length);
  }

  private void redraw() {
    if (fCurrentTarget.fAnnotationModel != null)
View Full Code Here

Examples of org.eclipse.jface.text.source.ISourceViewer.revealRange()

                }
            }
            if (moveCursor && offset > -1 && length > 0) {
                ISourceViewer sourceViewer = getSourceViewer();
                if (sourceViewer != null) {
                    sourceViewer.revealRange(offset, length);
                    sourceViewer.setSelectedRange(offset, length);
                }
            }
            return;
        } catch (Exception e) {
View Full Code Here

Examples of org.eclipse.jface.text.source.ISourceViewer.revealRange()

        else
            anchorOffset = 0;
       
        doc.set(newText.toString());
        viewer.setSelectedRange(anchorOffset, 0);
        viewer.revealRange(anchorOffset, 0);
    }

    protected String getPerlEditorActionId()
    {
        return PerlEditorActionIds.FORMAT_SOURCE;
View Full Code Here

Examples of org.eclipse.jface.text.source.ISourceViewer.revealRange()

        if (selection.getLength() < 0) {
            targetOffset -= selection.getLength();
        }

        sourceViewer.setSelectedRange(targetOffset, selection.getLength());
        sourceViewer.revealRange(targetOffset, selection.getLength());
    }

    /**
     * Returns the signed current selection. The length will be negative if the resulting
     * selection is right-to-left (RtoL).
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.