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

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

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

origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void changeTextPresentation(TextPresentation presentation, boolean controlRedraw) {
  if (presentation == null || !redraws())
    return;
  if (fTextWidget == null)
    return;
  /*
   * Call registered text presentation listeners
   * and let them apply their presentation.
   */
  if (fTextPresentationListeners != null) {
    ArrayList<ITextPresentationListener> listeners= new ArrayList<>(fTextPresentationListeners);
    for (int i= 0, size= listeners.size(); i < size; i++) {
      ITextPresentationListener listener= listeners.get(i);
      listener.applyTextPresentation(presentation);
    }
  }
  if (presentation.isEmpty())
    return;
  if (controlRedraw)
    fTextWidget.setRedraw(false);
  if (fReplaceTextPresentation)
    applyTextPresentation(presentation);
  else
    addPresentation(presentation);
  if (controlRedraw)
    fTextWidget.setRedraw(true);
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void changeTextPresentation(TextPresentation presentation, boolean controlRedraw) {
  if (presentation == null || !redraws())
    return;
  if (fTextWidget == null)
    return;
  /*
   * Call registered text presentation listeners
   * and let them apply their presentation.
   */
  if (fTextPresentationListeners != null) {
    ArrayList<ITextPresentationListener> listeners= new ArrayList<>(fTextPresentationListeners);
    for (int i= 0, size= listeners.size(); i < size; i++) {
      ITextPresentationListener listener= listeners.get(i);
      listener.applyTextPresentation(presentation);
    }
  }
  if (presentation.isEmpty())
    return;
  if (controlRedraw)
    fTextWidget.setRedraw(false);
  if (fReplaceTextPresentation)
    applyTextPresentation(presentation);
  else
    addPresentation(presentation);
  if (controlRedraw)
    fTextWidget.setRedraw(true);
}
org.eclipse.jface.textTextVieweraddPresentation

Javadoc

Adds the given presentation to the viewer's style information.

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,
  • setTopIndex,
  • _getVisibleRegionOffset,
  • activatePlugins

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Path (java.nio.file)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • JLabel (javax.swing)
  • Option (scala)
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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