本文整理汇总了Java中com.intellij.lang.javascript.JSBundle类的典型用法代码示例。如果您正苦于以下问题:Java JSBundle类的具体用法?Java JSBundle怎么用?Java JSBundle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JSBundle类属于com.intellij.lang.javascript包,在下文中一共展示了JSBundle类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createHyperLink
import com.intellij.lang.javascript.JSBundle; //导入依赖的package包/类
@NotNull
private HyperlinkLabel createHyperLink() {
List path = ContainerUtil.newArrayList(JSBundle.message("settings.javascript.root.configurable.name"), JSBundle.message("settings.javascript.linters.configurable.name"), getDisplayName());
String title = Joiner.on(" / ").join(path);
final HyperlinkLabel settingsLink = new HyperlinkLabel(title);
settingsLink.addHyperlinkListener(new HyperlinkAdapter() {
public void hyperlinkActivated(HyperlinkEvent e) {
DataContext dataContext = DataManager.getInstance().getDataContext(settingsLink);
OptionsEditor optionsEditor = OptionsEditor.KEY.getData(dataContext);
if (optionsEditor == null) {
Project project = CommonDataKeys.PROJECT.getData(dataContext);
if (project != null) {
showSettings(project);
}
return;
}
Configurable configurable = optionsEditor.findConfigurableById(ESLintInspection.this.getId());
if (configurable != null) {
optionsEditor.clearSearchAndSelect(configurable);
}
}
});
return settingsLink;
}
示例2: parseUnaryExpression
import com.intellij.lang.javascript.JSBundle; //导入依赖的package包/类
@Override
protected boolean parseUnaryExpression() {
final IElementType tokenType = builder.getTokenType();
if (tokenType == JSTokenTypes.OR) {
builder.advanceLexer();
return true;
}
if (tokenType == EmberJSTokenTypes.ONE_TIME_BINDING) {
final PsiBuilder.Marker expr = builder.mark();
builder.advanceLexer();
if (!super.parseUnaryExpression()) {
builder.error(JSBundle.message("javascript.parser.message.expected.expression"));
}
expr.done(JSElementTypes.PREFIX_EXPRESSION);
return true;
}
return super.parseUnaryExpression();
}
示例3: parseKeyValue
import com.intellij.lang.javascript.JSBundle; //导入依赖的package包/类
private void parseKeyValue() {
builder.advanceLexer();
final PsiBuilder.Marker comma = builder.mark();
parseExplicitIdentifierWithError();
if (builder.getTokenType() == JSTokenTypes.COMMA) {
builder.advanceLexer();
} else {
builder.error(JSBundle.message("javascript.parser.message.expected.comma"));
}
parseExplicitIdentifierWithError();
comma.done(JSElementTypes.COMMA_EXPRESSION);
if (builder.getTokenType() == JSTokenTypes.RPAR) {
builder.advanceLexer();
} else {
builder.error(JSBundle.message("javascript.parser.message.expected.rparen"));
}
}
示例4: getGroupPath
import com.intellij.lang.javascript.JSBundle; //导入依赖的package包/类
@NotNull
@Override
public String[] getGroupPath() {
return new String[]{
"JavaScript",
JSBundle.message("js.linters.inspection.group.name")
};
}
示例5: parseExplicitIdentifierWithError
import com.intellij.lang.javascript.JSBundle; //导入依赖的package包/类
private void parseExplicitIdentifierWithError() {
if (isIdentifierToken(builder.getTokenType())) {
parseExplicitIdentifier();
} else {
builder.error(JSBundle.message("javascript.parser.message.expected.identifier"));
}
}