Java Code Examples for org.netbeans.api.lexer.TokenSequence#languagePath()

The following examples show how to use org.netbeans.api.lexer.TokenSequence#languagePath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SyntaxHighlighting.java    From netbeans with Apache License 2.0 6 votes vote down vote up
/**
 * @param ts
 */
public TSInfo(TokenSequence<T> ts) {
    this.ts = ts;
    LanguagePath languagePath = ts.languagePath();
    @SuppressWarnings("unchecked")
    Language<T> innerLanguage = (Language<T>)languagePath.innerLanguage();
    String mimePathExt;
    if (mimeTypeForOptions != null) {
        // First mime-type in mimePath starts with "test"
        mimePathExt = languagePathToMimePathOptions(languagePath);
    } else {
        mimePathExt = languagePath.mimePath();
    }

    fcsInfo = findFCSInfo(mimePathExt, innerLanguage);
}
 
Example 2
Source File: SyntaxHighlighting.java    From netbeans with Apache License 2.0 6 votes vote down vote up
/**
 * @param ts
 */
public TSInfo(TokenSequence<T> ts) {
    this.ts = ts;
    LanguagePath languagePath = ts.languagePath();
    @SuppressWarnings("unchecked")
    Language<T> innerLanguage = (Language<T>)languagePath.innerLanguage();
    String mimePathExt;
    if (mimeTypeForOptions != null) {
        // First mime-type in mimePath starts with "test"
        mimePathExt = languagePathToMimePathOptions(languagePath);
    } else {
        mimePathExt = languagePath.mimePath();
    }

    fcsInfo = findFCSInfo(mimePathExt, innerLanguage);
}