Package com.boxysystems.scriptmonkey.intellij.ui

Examples of com.boxysystems.scriptmonkey.intellij.ui.ScriptCommandProcessor$ScriptRunningTask


    pluginDescriptor = PluginManager.getPlugin(PluginId.getId(Constants.PLUGIN_ID));
  }

  public void projectOpened() {
    toolWindow = new ScriptMonkeyToolWindow(project);
    ScriptCommandProcessor commandProcessor = new ScriptCommandProcessor(ApplicationManager.getApplication(), project, this);

    ClearEditorAction clearEditorAction = new ClearEditorAction();
    ShowScriptMonkeyConfigurationAction showConfigurationAction = new ShowScriptMonkeyConfigurationAction();
    OpenHelpAction openHelpAction = new OpenHelpAction();

    AnAction commandShellActions[] = {clearEditorAction, showConfigurationAction, openHelpAction};

    commandShellPanel = new ScriptShellPanel(commandProcessor, commandShellActions);
    commandShellPanel.applySettings(ScriptMonkeyApplicationComponent.getInstance().getSettings());
    clearEditorAction.setScriptShellPanel(commandShellPanel);
    commandProcessor.processCommandLine();
    commandProcessor.addGlobalVariable("window", commandShellPanel);
    toolWindow.addContentPanel("JS Shell", commandShellPanel);
  }
View Full Code Here


        if (settings != null) {
            List<PluginScript> pluginScripts = settings.getPluginScripts();
            for (final PluginScript pluginScript : pluginScripts) {
                if (pluginScript.isEnabled() && runMode.equals(pluginScript.getRunMode()) && ScriptMonkeyFileUtil.exists(pluginScript.getFilePath())) {
                    logger.info("Running plugin script '" + pluginScript.getFilePath() + "' on runMode = " + runMode);
                    ScriptCommandProcessor commandProcessor;
                    final File scriptFile = new File(pluginScript.getFilePath());
                    try {
                        if (project != null) {
                            commandProcessor = new ScriptCommandProcessor(ApplicationManager.getApplication(), project, plugin);
                        } else {
                            commandProcessor = new ScriptCommandProcessor(ApplicationManager.getApplication());
                        }

                        if (synchronous) {
                            commandProcessor.processScriptFileSynchronously(scriptFile, new ScriptProcessorCallbackImpl(pluginScript, scriptFile));
                        } else {
                            commandProcessor.processScriptFile(scriptFile, new ScriptProcessorCallbackImpl(pluginScript, scriptFile));
                        }
                    } catch (Exception e) {
                        logger.error("Error running script file = " + scriptFile, e);
                    }
                }
View Full Code Here

TOP

Related Classes of com.boxysystems.scriptmonkey.intellij.ui.ScriptCommandProcessor$ScriptRunningTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.