Package com.intellij.execution.ui

Examples of com.intellij.execution.ui.ConsoleView


  @Override
  @NotNull
  public ExecutionResult execute(final @NotNull Executor executor, final @NotNull ProgramRunner runner) throws ExecutionException {
    final ProcessHandler processHandler = startProcess();
    final ConsoleView consoleView = createConsole(getEnvironment());
    consoleView.attachToProcess(processHandler);

    final DefaultExecutionResult executionResult =
      new DefaultExecutionResult(consoleView, processHandler, createActions(consoleView, processHandler, executor));
    executionResult.setRestartActions(new ToggleAutoTestAction(getEnvironment()));
    return executionResult;
View Full Code Here


        ProcessHandler processHandler = new DefaultDebugProcessHandler();

        // Create the console
        final TextConsoleBuilder builder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
        ConsoleView m_console = builder.getConsole();

        return new GdbExecutionResult(m_console, processHandler, m_configuration);
    }
View Full Code Here

                ToolWindow window = manager.getToolWindow(GoCommonConsoleView.ID);

                if (GoCommonConsoleView.consoleView == null) {
                    GoCommonConsoleView.consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole();
                }
                ConsoleView consoleView = GoCommonConsoleView.consoleView;

                if (window == null) {
                    window = manager.registerToolWindow(GoCommonConsoleView.ID, false, ToolWindowAnchor.BOTTOM);

                    ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
                    Content content = contentFactory.createContent(consoleView.getComponent(), "", false);
                    window.getContentManager().addContent(content);
                    window.setIcon(GoSdkUtil.getProjectIcon(sdk));
                    window.setToHideOnEmptyContent(true);
                }
                window.setTitle(TITLE);

                window.show(EmptyRunnable.getInstance());

                String[] goEnv = GoSdkUtil.convertEnvMapToArray(sysEnv);

                String command = String.format(
                        "%s vet ./...",
                        goExecName
                );

                Runtime rt = Runtime.getRuntime();
                Process proc = rt.exec(command, goEnv, new File(projectDir));
                OSProcessHandler handler = new OSProcessHandler(proc, null);
                consoleView.attachToProcess(handler);
                consoleView.print(String.format("%s%n", command), ConsoleViewContentType.NORMAL_OUTPUT);
                handler.startNotify();

                if (proc.waitFor() == 0) {
                    VirtualFileManager.getInstance().syncRefresh();
                    consoleView.print(String.format("%nFinished running go vet on project %s%n", projectDir), ConsoleViewContentType.NORMAL_OUTPUT);
                } else {
                    consoleView.print(String.format("%nCouldn't vet project %s%n", projectDir), ConsoleViewContentType.ERROR_OUTPUT);
                    throw new CantRunException(String.format("Error while processing %s vet command.", goExecName));
                }
            } catch (Exception e) {
                throw new CantRunException(String.format("Error while processing %s vet command.", goExecName));
            }
View Full Code Here

    public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
        ProcessHandler processHandler = startProcess();
        String packageDir = consoleProperties.getConfiguration().packageDir;
        processHandler.addProcessListener(new GoTestProcessListener(processHandler, packageDir));

        ConsoleView console = createAndAttachConsole("GoTest", processHandler, consoleProperties, getEnvironment());
        Project project = consoleProperties.getProject();
        console.addMessageFilter(new GoConsoleFilter(project, packageDir));
        return new DefaultExecutionResult(console, processHandler, createActions(console, processHandler, executor));
    }
View Full Code Here

        ToolWindow window = manager.getToolWindow(GoCommonConsoleView.ID);

        if (GoCommonConsoleView.consoleView == null) {
            GoCommonConsoleView.consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole();
        }
        ConsoleView consoleView = GoCommonConsoleView.consoleView;

        Sdk sdk = GoSdkUtil.getProjectSdk(project);
        if (sdk == null) {
            return;
        }

        if (window == null) {
            window = manager.registerToolWindow(GoCommonConsoleView.ID, false, ToolWindowAnchor.BOTTOM);

            ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
            Content content = contentFactory.createContent(consoleView.getComponent(), "", false);
            window.getContentManager().addContent(content);
            window.setIcon(GoSdkUtil.getProjectIcon(sdk));
            window.setToHideOnEmptyContent(true);
        }
        window.setTitle(TITLE);

        String goExecName = GoSdkUtil.getGoExecName(sdk);
        if (goExecName == null) {
            return;
        }

        final String command = String.format(
                "%s get -v %s",
                goExecName,
                packagesToImport
        );

        consoleView.print(String.format("%s%n", command), ConsoleViewContentType.NORMAL_OUTPUT);

        window.show(EmptyRunnable.getInstance());

        final String finalPackagesToImport = packagesToImport.replace(" ", ", ");
View Full Code Here

        if (goEnv == null) {
            return;
        }

        Runtime rt = Runtime.getRuntime();
        ConsoleView consoleView = GoCommonConsoleView.consoleView;

        try {

            Process proc = rt.exec(command, goEnv);
            OSProcessHandler handler = new OSProcessHandler(proc, null);
            consoleView.attachToProcess(handler);

            handler.startNotify();

            if (proc.waitFor() == 0) {
                VirtualFileManager.getInstance().syncRefresh();

                consoleView.print(String.format("%nFinished installing %s%n", packagesToImport), ConsoleViewContentType.NORMAL_OUTPUT);
            } else {
                consoleView.print(String.format("%nCould not install %s%n", packagesToImport), ConsoleViewContentType.ERROR_OUTPUT);
            }


        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        ToolWindow window = manager.getToolWindow(GoCommonConsoleView.ID);

        if (GoCommonConsoleView.consoleView == null) {
            GoCommonConsoleView.consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole();
        }
        ConsoleView consoleView = GoCommonConsoleView.consoleView;

        if (window == null) {
            window = manager.registerToolWindow(GoCommonConsoleView.ID, false, ToolWindowAnchor.BOTTOM);

            ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
            Content content = contentFactory.createContent(consoleView.getComponent(), "", false);
            window.getContentManager().addContent(content);
            window.setIcon(GoSdkUtil.getProjectIcon(sdk));
            window.setToHideOnEmptyContent(true);
        }
        window.setTitle(TITLE);

        String goExecName = GoSdkUtil.getGoExecName(sdk);
        if (goExecName == null) {
            return;
        }

        final String command = String.format(
                "%s get -v -u %s",
                goExecName,
                packagesToImport
        );

        consoleView.print(String.format("%s%n", command), ConsoleViewContentType.NORMAL_OUTPUT);

        window.show(EmptyRunnable.getInstance());

        final String finalPackagesToImport = packagesToImport.replace(" ", ", ");
View Full Code Here

        if (goEnv == null) {
            return;
        }

        Runtime rt = Runtime.getRuntime();
        ConsoleView consoleView = GoCommonConsoleView.consoleView;

        try {

            Process proc = rt.exec(command, goEnv);
            OSProcessHandler handler = new OSProcessHandler(proc, null);
            consoleView.attachToProcess(handler);

            handler.startNotify();

            if (proc.waitFor() == 0) {
                VirtualFileManager.getInstance().syncRefresh();

                consoleView.print(String.format("%nFinished installing %s%n", packagesToImport), ConsoleViewContentType.NORMAL_OUTPUT);
            } else {
                consoleView.print(String.format("%nCould not install %s%n", packagesToImport), ConsoleViewContentType.ERROR_OUTPUT);
            }


        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

  @NotNull
  public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
    ProcessHandler processHandler = startProcess();
    setConsoleBuilder(getConsoleBuilder());

    final ConsoleView consoleView = createConsoleView(executor);
    ErlangConsoleUtil.attachFilters(myConfiguration.getProject(), consoleView);
    consoleView.attachToProcess(processHandler);

    DefaultExecutionResult executionResult = new DefaultExecutionResult(consoleView, processHandler);

    ErlangUnitRerunFailedTestsAction rerunAction = new ErlangUnitRerunFailedTestsAction(consoleView);
    rerunAction.init(((BaseTestsOutputConsoleView) consoleView).getProperties());
View Full Code Here

  @Override
  public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
    ProcessHandler processHandler = startProcess();
    setConsoleBuilder(getConsoleBuilder());

    final ConsoleView consoleView = createConsoleView(executor);
    ErlangConsoleUtil.attachFilters(myConfiguration.getProject(), consoleView);
    consoleView.attachToProcess(processHandler);

    RebarEunitRerunFailedTestsAction rerunAction = new RebarEunitRerunFailedTestsAction(consoleView);
    rerunAction.init(((BaseTestsOutputConsoleView) consoleView).getProperties());
    rerunAction.setModelProvider(new Getter<TestFrameworkRunningModel>() {
      @Override
View Full Code Here

TOP

Related Classes of com.intellij.execution.ui.ConsoleView

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.