Example usage for com.intellij.openapi.fileTypes StdFileTypes JS

List of usage examples for com.intellij.openapi.fileTypes StdFileTypes JS

Introduction

In this page you can find the example usage for com.intellij.openapi.fileTypes StdFileTypes JS.

Prototype

LanguageFileType JS

To view the source code for com.intellij.openapi.fileTypes StdFileTypes JS.

Click Source Link

Usage

From source file:com.intellij.javascript.flex.refactoring.FlexPackageImpl.java

License:Apache License

@NotNull
public Language getLanguage() {
    return StdFileTypes.JS.getLanguage();
}

From source file:org.jetbrains.jet.plugin.compiler.JetCompilerManager.java

License:Apache License

public JetCompilerManager(CompilerManager manager) {
    manager.addTranslatingCompiler(new JetCompiler(), Collections.<FileType>singleton(JetFileType.INSTANCE),
            Collections.singleton(StdFileTypes.CLASS));
    manager.addTranslatingCompiler(new K2JSCompiler(), Collections.<FileType>singleton(JetFileType.INSTANCE),
            Collections.<FileType>singleton(StdFileTypes.JS));
    manager.addCompilableFileType(JetFileType.INSTANCE);
}

From source file:org.textmapper.idea.actions.CreateTextmapperFileAction.java

License:Open Source License

@Override
protected void buildDialog(Project project, PsiDirectory directory,
        CreateFileFromTemplateDialog.Builder builder) {
    builder.setTitle(TextmapperBundle.message("newfile.action.text"));
    for (TemplatesHandler handler : TemplatesHandler.EP_NAME.getExtensions()) {
        handler.addTemplates(builder);/*from w  w w . j  av  a 2  s .  c o m*/
    }
    builder.addKind("generates Javascript", StdFileTypes.JS.getIcon(), "GrammarForJS.tm");
    builder.setValidator(new InputValidatorEx() {
        @Nullable
        @Override
        public String getErrorText(String inputString) {
            return null;
        }

        @Override
        public boolean checkInput(String inputString) {
            return StringUtil.isJavaIdentifier(inputString);
        }

        @Override
        public boolean canClose(String inputString) {
            return checkInput(inputString);
        }
    });
}