Examples of showSelection()


Examples of org.eclipse.swt.custom.StyledText.showSelection()

        // invert selection to avoid jumping to the end of the selection in st.showSelection()
        viewer.setSelectedRange(offset + length, -length);
        //viewer.revealRange(offset, length); // will trigger jumping
        StyledText st = viewer.getTextWidget();
        if (st != null)
            st.showSelection(); // only minimal scrolling
    }

    private IRegion getRegion(IDocument document, ILineRange lineRange) throws BadLocationException {
        final int startLine = lineRange.getStartLine();
        int offset = document.getLineOffset(startLine);
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText.showSelection()

    // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=132263
    widget.getDisplay().asyncExec(new Runnable() {
      public void run() {
        if (!widget.isDisposed())
          try {
          widget.showSelection();
          } catch (IllegalArgumentException e) {
            /*
             * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=66914
             * if the StyledText is in setRedraw(false) mode, its
             * selection may not be up2date and calling showSelection
View Full Code Here

Examples of org.eclipse.swt.widgets.Table.showSelection()

        if (isValid(viewer)) {
          viewer.refresh();
          Control control = viewer.getControl();
          if (control instanceof Table) {
            Table table = (Table) control;
            table.showSelection();
          }
        }
      }
    });
  }
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.