Java 类com.intellij.lang.javascript.JSBundle 实例源码

项目:eslint-plugin    文件:ESLintInspection.java   
@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;
}
项目:emberjs-plugin    文件:EmberJSParser.java   
@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();
}
项目:emberjs-plugin    文件:EmberJSParser.java   
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"));
    }
}
项目:experimental-jscs-plugin    文件:JscsInspection.java   
@NotNull
@Override
public String[] getGroupPath() {
    return new String[]{
            "JavaScript",
            JSBundle.message("js.linters.inspection.group.name")
    };
}
项目:emberjs-plugin    文件:EmberJSParser.java   
private void parseExplicitIdentifierWithError() {
    if (isIdentifierToken(builder.getTokenType())) {
        parseExplicitIdentifier();
    } else {
        builder.error(JSBundle.message("javascript.parser.message.expected.identifier"));
    }
}