当前位置: 首页>>代码示例>>Java>>正文


Java DefaultLanguageConfig类代码示例

本文整理汇总了Java中org.netbeans.modules.csl.spi.DefaultLanguageConfig的典型用法代码示例。如果您正苦于以下问题:Java DefaultLanguageConfig类的具体用法?Java DefaultLanguageConfig怎么用?Java DefaultLanguageConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultLanguageConfig类属于org.netbeans.modules.csl.spi包,在下文中一共展示了DefaultLanguageConfig类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sameCommentHandler

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
private boolean sameCommentHandler(TokenHierarchy<?> th, int offset, boolean backwardBias, CommentHandler cH) {
    CommentHandler cH2 = null;
    List<TokenSequence<?>> seqs = th.embeddedTokenSequences(offset, backwardBias);
    if (!seqs.isEmpty()) {
        for(int i = seqs.size() - 1; i >= 0; i--) {
            TokenSequence<?> ts = seqs.get(i);
            Language lang = LanguageRegistry.getInstance().getLanguageByMimeType(ts.language().mimeType());
            if (lang != null) {
                if (lang.getGsfLanguage() instanceof DefaultLanguageConfig) {
                    cH2 = ((DefaultLanguageConfig) lang.getGsfLanguage()).getCommentHandler();
                }
                break;
            }
        }
    }

    return cH2 != null && cH.getClass() == cH2.getClass();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:ToggleBlockCommentAction.java

示例2: initializeRegistry

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
protected void initializeRegistry() {
    DefaultLanguageConfig defaultLanguage = getPreferredLanguage();
    if (defaultLanguage == null) {
        fail("If you don't implement getPreferredLanguage(), you must override initializeRegistry!");
        return;
    }
    if (!LanguageRegistry.getInstance().isSupported(getPreferredMimeType())) {
        List<Action> actions = Collections.emptyList();
        org.netbeans.modules.csl.core.Language dl = new org.netbeans.modules.csl.core.Language(
                "unknown", getPreferredMimeType(), actions,
                defaultLanguage, getCodeCompleter(),
                getRenameHandler(), defaultLanguage.getDeclarationFinder(),
                defaultLanguage.getFormatter(), getKeystrokeHandler(),
                getIndexerFactory(), getStructureScanner(), null,
                defaultLanguage.isUsingCustomEditorKit());
        List<org.netbeans.modules.csl.core.Language> languages = new ArrayList<org.netbeans.modules.csl.core.Language>();
        languages.add(dl);
        CslCorePackageAccessor.get().languageRegistryAddLanguages(languages);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:CslTestBase.java

示例3: getGsfLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
/** Return a language configuration object for this language.
 */
@NonNull
public GsfLanguage getGsfLanguage() {
    if (language == null && languageFile != null) {
        // Lazily construct Language
        language = (GsfLanguage)createInstance(languageFile);
        if (language == null) {
            // Don't keep trying
            languageFile = null;
        } else if (language instanceof DefaultLanguageConfig) {
            languageConfig = (DefaultLanguageConfig)language;
        }
    }
    return language;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:Language.java

示例4: getPreferredLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
protected DefaultLanguageConfig getPreferredLanguage() {
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:CslTestBase.java

示例5: getPreferredLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
    return new YamlLanguage();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:YamlTestBase.java

示例6: getPreferredLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
    return CSS_LANGUAGE;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:CssFileModelTest.java

示例7: getPreferredLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
    return new CssLanguage();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:CssModuleTestBase.java

示例8: getPreferredLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
    return new LessCslLanguage();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:LessLexerTest.java

示例9: getPreferredLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
    return new SQLLanguageConfig();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:SQLTypedTextInterceptorTest.java

示例10: getPreferredLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
    return new XhtmlElLanguage();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:XhtmlElLexerTest.java

示例11: getPreferredLanguage

import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
    return new HtmlLanguage();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:TestBase2.java


注:本文中的org.netbeans.modules.csl.spi.DefaultLanguageConfig类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。