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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
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

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Top 17 Free Sublime Text Plugins
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