本文整理汇总了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();
}
示例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);
}
}
示例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;
}
示例4: getPreferredLanguage
import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
protected DefaultLanguageConfig getPreferredLanguage() {
return null;
}
示例5: getPreferredLanguage
import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
return new YamlLanguage();
}
示例6: getPreferredLanguage
import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
return CSS_LANGUAGE;
}
示例7: getPreferredLanguage
import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
return new CssLanguage();
}
示例8: getPreferredLanguage
import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
return new LessCslLanguage();
}
示例9: getPreferredLanguage
import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
return new SQLLanguageConfig();
}
示例10: getPreferredLanguage
import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
return new XhtmlElLanguage();
}
示例11: getPreferredLanguage
import org.netbeans.modules.csl.spi.DefaultLanguageConfig; //导入依赖的package包/类
@Override
protected DefaultLanguageConfig getPreferredLanguage() {
return new HtmlLanguage();
}