use of org.jetbrains.ide.script.IdeScriptEngineManager in project intellij-community by JetBrains.
the class RunIdeConsoleAction method update.
@Override
public void update(AnActionEvent e) {
IdeScriptEngineManager manager = IdeScriptEngineManager.getInstance();
e.getPresentation().setVisible(e.getProject() != null);
e.getPresentation().setEnabled(manager.isInitialized() && !manager.getLanguages().isEmpty());
}
use of org.jetbrains.ide.script.IdeScriptEngineManager in project intellij-community by JetBrains.
the class IdeStartupScripts method prepareScriptEngines.
@NotNull
private static List<Pair<VirtualFile, IdeScriptEngine>> prepareScriptEngines(@NotNull List<VirtualFile> scripts) {
IdeScriptEngineManager scriptEngineManager = IdeScriptEngineManager.getInstance();
List<Pair<VirtualFile, IdeScriptEngine>> result = ContainerUtil.newArrayList();
for (VirtualFile script : scripts) {
String extension = script.getExtension();
IdeScriptEngine engine = extension != null ? scriptEngineManager.getEngineForFileExtension(extension, null) : null;
result.add(Pair.create(script, engine));
}
return result;
}
Aggregations