Examples of widgetRange2ModelRange()


Examples of org.eclipse.jface.text.ITextViewerExtension5.widgetRange2ModelRange()

      String text= e.getText();
      int length= text == null ? 0 : text.length();

      if (fViewer instanceof ITextViewerExtension5) {
        ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
        return extension.widgetRange2ModelRange(new Region(e.getOffset(), length));
      }

      IRegion visible= fViewer.getVisibleRegion();
      IRegion region= new Region(e.getOffset() + visible.getOffset(), length);
      return region;
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension5.widgetRange2ModelRange()

    ITextViewer viewer = getTextViewer();
    if (viewer instanceof ITextViewerExtension5) {
      // get document range, taking into account folding regions in
      // viewer
      ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
      styleRegion = extension.widgetRange2ModelRange(new Region(offset, length));
    }
    else {
      // get document range, taking into account viewer visible region
      // get visible region in viewer
      IRegion vr = null;
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension5.widgetRange2ModelRange()

      String text= e.getText();
      int length= text == null ? 0 : text.length();

      if (fViewer instanceof ITextViewerExtension5) {
        ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
        return extension.widgetRange2ModelRange(new Region(e.getOffset(), length));
      }

      IRegion visible= fViewer.getVisibleRegion();
      IRegion region= new Region(e.getOffset() + visible.getOffset(), length);
      return region;
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension5.widgetRange2ModelRange()

    if (offset == Integer.MAX_VALUE)
      return null;

    if (fSourceViewer instanceof ITextViewerExtension5) {
      ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
      return extension.widgetRange2ModelRange(new Region(offset, length));
    }
   
    IRegion region= fSourceViewer.getVisibleRegion();
    return new Region(region.getOffset() + offset, length);
  }
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension5.widgetRange2ModelRange()

      String text= e.getText();
      int length= text == null ? 0 : text.length();

      if (fViewer instanceof ITextViewerExtension5) {
        ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
        return extension.widgetRange2ModelRange(new Region(e.getOffset(), length));
      }

      IRegion visible= fViewer.getVisibleRegion();
      IRegion region= new Region(e.getOffset() + visible.getOffset(), length);
      return region;
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension5.widgetRange2ModelRange()

                ITextViewerExtension2 viewer2 = (ITextViewerExtension2) viewer;

                if (viewer instanceof ITextViewerExtension5) {

                    ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
                    IRegion modelRange = extension.widgetRange2ModelRange(new Region(fRememberedStyleRange.start,
                            fRememberedStyleRange.length));
                    if (modelRange != null)
                        viewer2.invalidateTextPresentation(modelRange.getOffset(), modelRange.getLength());

                } else {
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension5.widgetRange2ModelRange()

    if (offset == Integer.MAX_VALUE)
      return null;

    if (fSourceViewer instanceof ITextViewerExtension5) {
      ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
      return extension.widgetRange2ModelRange(new Region(offset, length));
    }

    IRegion region= fSourceViewer.getVisibleRegion();
    return new Region(region.getOffset() + offset, length);
  }
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension5.widgetRange2ModelRange()

      String text= e.getText();
      int length= text == null ? 0 : text.length();

      if (fViewer instanceof ITextViewerExtension5) {
        ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
        return extension.widgetRange2ModelRange(new Region(e.getOffset(), length));
      }

      IRegion visible= fViewer.getVisibleRegion();
      IRegion region= new Region(e.getOffset() + visible.getOffset(), length);
      return region;
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.