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

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

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

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

/**
 * Initializes the text widget with the visual document and
 * invalidates the overall presentation.
 */
private void initializeWidgetContents() {
  if (fTextWidget != null && fVisibleDocument != null) {
    // set widget content
    if (fDocumentAdapter == null)
      fDocumentAdapter= createDocumentAdapter();
    fDocumentAdapter.setDocument(fVisibleDocument);
    fTextWidget.setContent(fDocumentAdapter);
    // invalidate presentation
    invalidateTextPresentation();
  }
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Initializes the text widget with the visual document and
 * invalidates the overall presentation.
 */
private void initializeWidgetContents() {
  if (fTextWidget != null && fVisibleDocument != null) {
    // set widget content
    if (fDocumentAdapter == null)
      fDocumentAdapter= createDocumentAdapter();
    fDocumentAdapter.setDocument(fVisibleDocument);
    fTextWidget.setContent(fDocumentAdapter);
    // invalidate presentation
    invalidateTextPresentation();
  }
}
origin: org.eclipse.pde/org.eclipse.pde.ui

@Override
protected void configureTextViewer(final TextViewer textViewer) {
  if (textViewer instanceof SourceViewer) {
    if (fColorManager == null)
      fColorManager = ColorManager.getDefault();
    final XMLConfiguration configuration = new XMLConfiguration(fColorManager);
    textViewer.getControl().addDisposeListener(e -> configuration.dispose());
    IPropertyChangeListener propertyChangedListener = event -> {
      // the configuration will test if the properties affect the presentation also,
      // but checking it here allows us to prevent the viewer from being invalidated
      // and saves some unnecessary work
      if (configuration.affectsColorPresentation(event) || configuration.affectsTextPresentation(event)) {
        configuration.adaptToPreferenceChange(event);
        textViewer.invalidateTextPresentation();
      }
    };
    PDEPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(propertyChangedListener);
    if (fPropertyChangedListeners == null)
      fPropertyChangedListeners = new ArrayList<>(3);
    fPropertyChangedListeners.add(propertyChangedListener);
    ((SourceViewer) textViewer).configure(configuration);
    Font font = JFaceResources.getFont(PluginContentMergeViewer.class.getName());
    if (font != null)
      ((SourceViewer) textViewer).getTextWidget().setFont(font);
  }
}
org.eclipse.jface.textTextViewerinvalidateTextPresentation

Javadoc

Invalidates the given range of the text presentation.

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Table (org.hibernate.mapping)
    A relational table
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Vim plugins
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