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

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

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

origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void setDocument(IDocument document, int modelRangeOffset, int modelRangeLength) {
  fReplaceTextPresentation= true;
  fireInputDocumentAboutToBeChanged(fDocument, document);
  IDocument oldDocument= fDocument;
  fDocument= document;
  try {
    IDocument slaveDocument= createSlaveDocument(document);
    updateSlaveDocument(slaveDocument, modelRangeOffset, modelRangeLength);
    setVisibleDocument(slaveDocument);
  } catch (BadLocationException x) {
    throw new IllegalArgumentException(JFaceTextMessages.getString("TextViewer.error.invalid_visible_region_1")); //$NON-NLS-1$
  }
  resetPlugins();
  inputChanged(fDocument, oldDocument);
  fireInputDocumentChanged(oldDocument, fDocument);
  fLastSentSelectionChange= null;
  fReplaceTextPresentation= false;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void setDocument(IDocument document, int modelRangeOffset, int modelRangeLength) {
  fReplaceTextPresentation= true;
  fireInputDocumentAboutToBeChanged(fDocument, document);
  IDocument oldDocument= fDocument;
  fDocument= document;
  try {
    IDocument slaveDocument= createSlaveDocument(document);
    updateSlaveDocument(slaveDocument, modelRangeOffset, modelRangeLength);
    setVisibleDocument(slaveDocument);
  } catch (BadLocationException x) {
    throw new IllegalArgumentException(JFaceTextMessages.getString("TextViewer.error.invalid_visible_region_1")); //$NON-NLS-1$
  }
  resetPlugins();
  inputChanged(fDocument, oldDocument);
  fireInputDocumentChanged(oldDocument, fDocument);
  fLastSentSelectionChange= null;
  fReplaceTextPresentation= false;
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void setVisibleRegion(int start, int length) {
  IRegion region= getVisibleRegion();
  if (start == region.getOffset() && length == region.getLength()) {
    // nothing to change
    return;
  }
  setRedraw(false);
  try {
    IDocument slaveDocument= createSlaveDocument(getVisibleDocument());
    if (updateSlaveDocument(slaveDocument, start, length))
      setVisibleDocument(slaveDocument);
  } catch (BadLocationException x) {
    throw new IllegalArgumentException(JFaceTextMessages.getString("TextViewer.error.invalid_visible_region_2")); //$NON-NLS-1$
  } finally {
    setRedraw(true);
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void setVisibleRegion(int start, int length) {
  IRegion region= getVisibleRegion();
  if (start == region.getOffset() && length == region.getLength()) {
    // nothing to change
    return;
  }
  setRedraw(false);
  try {
    IDocument slaveDocument= createSlaveDocument(getVisibleDocument());
    if (updateSlaveDocument(slaveDocument, start, length))
      setVisibleDocument(slaveDocument);
  } catch (BadLocationException x) {
    throw new IllegalArgumentException(JFaceTextMessages.getString("TextViewer.error.invalid_visible_region_2")); //$NON-NLS-1$
  } finally {
    setRedraw(true);
  }
}
org.eclipse.jface.textTextViewercreateSlaveDocument

Javadoc

Creates a slave document for the given document if there is a slave document manager associated with this viewer.

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,
  • addPresentation

Popular in Java

  • Running tasks concurrently on multiple threads
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JOptionPane (javax.swing)
  • JPanel (javax.swing)
  • Github Copilot alternatives
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