Tabnine Logo
FastPartitioner.getTokenContentType
Code IndexAdd Tabnine to your IDE (free)

How to use
getTokenContentType
method
in
org.eclipse.jface.text.rules.FastPartitioner

Best Java code snippets using org.eclipse.jface.text.rules.FastPartitioner.getTokenContentType (Showing top 8 results out of 315)

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

/**
 * Performs the initial partitioning of the partitioner's document.
 * <p>
 * May be extended by subclasses.
 * </p>
 */
protected void initialize() {
  fIsInitialized= true;
  clearPositionCache();
  fScanner.setRange(fDocument, 0, fDocument.getLength());
  try {
    IToken token= fScanner.nextToken();
    while (!token.isEOF()) {
      String contentType= getTokenContentType(token);
      if (isSupportedContentType(contentType)) {
        TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType);
        fDocument.addPosition(fPositionCategory, p);
      }
      token= fScanner.nextToken();
    }
  } catch (BadLocationException x) {
    // cannot happen as offsets come from scanner
  } catch (BadPositionCategoryException x) {
    // cannot happen if document has been connected before
  }
}
origin: at.bestsolution.eclipse/org.eclipse.fx.text.compat

/**
 * Performs the initial partitioning of the partitioner's document.
 * <p>
 * May be extended by subclasses.
 * </p>
 */
protected void initialize() {
  fIsInitialized= true;
  clearPositionCache();
  fScanner.setRange(fDocument, 0, fDocument.getLength());
  try {
    IToken token= fScanner.nextToken();
    while (!token.isEOF()) {
      String contentType= getTokenContentType(token);
      if (isSupportedContentType(contentType)) {
        TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType);
        fDocument.addPosition(fPositionCategory, p);
      }
      token= fScanner.nextToken();
    }
  } catch (BadLocationException x) {
    // cannot happen as offsets come from scanner
  } catch (BadPositionCategoryException x) {
    // cannot happen if document has been connected before
  }
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Performs the initial partitioning of the partitioner's document.
 * <p>
 * May be extended by subclasses.
 * </p>
 */
protected void initialize() {
  fIsInitialized= true;
  clearPositionCache();
  fScanner.setRange(fDocument, 0, fDocument.getLength());
  try {
    IToken token= fScanner.nextToken();
    while (!token.isEOF()) {
      String contentType= getTokenContentType(token);
      if (isSupportedContentType(contentType)) {
        TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType);
        fDocument.addPosition(fPositionCategory, p);
      }
      token= fScanner.nextToken();
    }
  } catch (BadLocationException x) {
    // cannot happen as offsets come from scanner
  } catch (BadPositionCategoryException x) {
    // cannot happen if document has been connected before
  }
}
origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.text.compat

/**
 * Performs the initial partitioning of the partitioner's document.
 * <p>
 * May be extended by subclasses.
 * </p>
 */
protected void initialize() {
  fIsInitialized= true;
  clearPositionCache();
  fScanner.setRange(fDocument, 0, fDocument.getLength());
  try {
    IToken token= fScanner.nextToken();
    while (!token.isEOF()) {
      String contentType= getTokenContentType(token);
      if (isSupportedContentType(contentType)) {
        TypedPosition p= new TypedPosition(fScanner.getTokenOffset(), fScanner.getTokenLength(), contentType);
        fDocument.addPosition(fPositionCategory, p);
      }
      token= fScanner.nextToken();
    }
  } catch (BadLocationException x) {
    // cannot happen as offsets come from scanner
  } catch (BadPositionCategoryException x) {
    // cannot happen if document has been connected before
  }
}
origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.text.compat

contentType= getTokenContentType(token);
origin: org.eclipse.platform/org.eclipse.jface.text

contentType= getTokenContentType(token);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

contentType= getTokenContentType(token);
origin: at.bestsolution.eclipse/org.eclipse.fx.text.compat

contentType= getTokenContentType(token);
org.eclipse.jface.text.rulesFastPartitionergetTokenContentType

Javadoc

Returns a content type encoded in the given token. If the token's data is not null and a string it is assumed that it is the encoded content type.

May be replaced or extended by subclasses.

Popular methods of FastPartitioner

  • <init>
    Creates a new partitioner that uses the given scanner and may return partitions of the given legal c
  • connect
    May be extended by subclasses.
  • flushRewriteSession
    Flushes the active rewrite session.
  • checkInitialization
    Calls #initialize() if the receiver is not yet initialized.
  • clearPositionCache
    Clears the position cache. Needs to be called whenever the positions have been updated.
  • computePartitioning
    May be replaced or extended by subclasses.
  • createRegion
    Creates the minimal region containing all partition changes using the remembered offset, end offset,
  • documentChanged2
    May be extended by subclasses.
  • findClosestPosition
    Returns the position in the partitoner's position category which is close to the given offset. This
  • getFirstIndexEndingAfterOffset
    Returns the index of the first position which ends after the given offset.
  • getFirstIndexStartingAfterOffset
    Returns the index of the first position which starts at or after the given offset.
  • getPartition
    May be replaced or extended by subclasses.
  • getFirstIndexStartingAfterOffset,
  • getPartition,
  • getPositions,
  • initialize,
  • isSupportedContentType,
  • overlapsOrTouches,
  • rememberDeletedOffset,
  • rememberRegion,
  • toString

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Path (java.nio.file)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Top 12 Jupyter Notebook extensions
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