Tabnine Logo
TextViewer.setTopIndex
Code IndexAdd Tabnine to your IDE (free)

How to use
setTopIndex
method
in
org.eclipse.jface.text.TextViewer

Best Java code snippets using org.eclipse.jface.text.TextViewer.setTopIndex (Showing top 5 results out of 315)

origin: anb0s/LogViewer

public void setTopIndex(int index) {
  txtViewer.setTopIndex(index);
}
origin: anb0s/LogViewer

public void showTopOfFile() {
  txtViewer.setTopIndex(0);
}
origin: anb0s/LogViewer

public void showBottomOfFile() {
  txtViewer.setTopIndex(document.getNumberOfLines());
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Enables the redrawing of this text viewer.
 *
 * @param topIndex the top index to be set or <code>-1</code>
 * @since 3.0
 */
protected void enabledRedrawing(int topIndex) {
  if (fDocumentAdapter instanceof IDocumentAdapterExtension) {
    IDocumentAdapterExtension extension= (IDocumentAdapterExtension) fDocumentAdapter;
    StyledText textWidget= getTextWidget();
    if (textWidget != null && !textWidget.isDisposed()) {
      extension.resumeForwardingDocumentChanges();
      if (topIndex > -1) {
        try {
          setTopIndex(topIndex);
        } catch (IllegalArgumentException x) {
          // changes don't allow for the previous top pixel
        }
      }
    }
  }
  if (fViewerState != null) {
    fViewerState.restore(topIndex == -1);
    fViewerState= null;
  }
  if (fTextWidget != null && !fTextWidget.isDisposed())
    fTextWidget.setRedraw(true);
  fireRedrawChanged();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Enables the redrawing of this text viewer.
 *
 * @param topIndex the top index to be set or <code>-1</code>
 * @since 3.0
 */
protected void enabledRedrawing(int topIndex) {
  if (fDocumentAdapter instanceof IDocumentAdapterExtension) {
    IDocumentAdapterExtension extension= (IDocumentAdapterExtension) fDocumentAdapter;
    StyledText textWidget= getTextWidget();
    if (textWidget != null && !textWidget.isDisposed()) {
      extension.resumeForwardingDocumentChanges();
      if (topIndex > -1) {
        try {
          setTopIndex(topIndex);
        } catch (IllegalArgumentException x) {
          // changes don't allow for the previous top pixel
        }
      }
    }
  }
  if (fViewerState != null) {
    fViewerState.restore(topIndex == -1);
    fViewerState= null;
  }
  if (fTextWidget != null && !fTextWidget.isDisposed())
    fTextWidget.setRedraw(true);
  fireRedrawChanged();
}
org.eclipse.jface.textTextViewersetTopIndex

Popular methods of TextViewer

  • getTextWidget
  • getControl
  • doOperation
  • setDocument
  • modelRange2WidgetRange
    Same as #modelRange2WidgetRange(IRegion) just for a org.eclipse.jface.text.Position.
  • getRewriteTarget
  • getSelection
  • modelLine2WidgetLine
    Implements the contract of ITextViewerExtension5#modelLine2WidgetLine(int).
  • getDocument
  • setSelectedRange
  • setSelection
  • <init>
    Create a new text viewer with the given SWT style bits. The viewer is ready to use but does not have
  • setSelection,
  • <init>,
  • canDoOperation,
  • getVisibleRegion,
  • handleDispose,
  • invalidateTextPresentation,
  • _getVisibleRegionOffset,
  • activatePlugins,
  • addPresentation

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ImageIO (javax.imageio)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JCheckBox (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now