Package com.intellij.execution.ui

Examples of com.intellij.execution.ui.RunContentDescriptor


        JPanel panel = new JPanel(new BorderLayout());
        panel.add(actionToolbar.getComponent(), BorderLayout.WEST);
        panel.add(consoleView.getComponent(), BorderLayout.CENTER);

        RunContentDescriptor myDescriptor =
            new RunContentDescriptor(consoleView, processHandler, panel, consoleTitle);

        // tool bar actions
        AnAction[] actions = fillToolBarActions(toolbarActions, defaultExecutor, myDescriptor);
        registerActionShortcuts(actions, getLanguageConsole().getConsoleEditor().getComponent());
        registerActionShortcuts(actions, panel);
View Full Code Here


        Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());

        FileDocumentManager.getInstance().saveAllDocuments(); //todo: save configs only

        RunContentDescriptor runContentDescriptor = getRunContentDescriptor(event);
        if (runContentDescriptor != null) {
            if (runContentDescriptor.getProcessHandler() == null) {
                return;
            }

            final ConsoleView console = (ConsoleView) runContentDescriptor.getExecutionConsole();

            try {
                //the action will be disabled when there's no process handler, so no npe here. i hope...
                NginxProcessHandler processHandler = (NginxProcessHandler) runContentDescriptor.getProcessHandler();
                NginxServerDescriptor descriptor = processHandler.getDescriptor();

                //evil user may have deleted either server configuration
                validateDescriptor(descriptor);
View Full Code Here

    @Nullable
    private RunContentDescriptor getRunContentDescriptor(AnActionEvent e) {

        //magic copied from com.intellij.execution.actions.StopAction
        RunContentDescriptor runContentDescriptor = RunContentManager.RUN_CONTENT_DESCRIPTOR.getData(e.getDataContext());
        if (runContentDescriptor == null) {
            Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext());
            if (project != null) {
                runContentDescriptor = ExecutionManager.getInstance(project).getContentManager().getSelectedContent();
            }
View Full Code Here

    }

    @Nullable
    private ProcessHandler getProcessHandler(AnActionEvent e) {
        RunContentDescriptor rcd = getRunContentDescriptor(e);
        return rcd != null ? rcd.getProcessHandler() : null;
    }
View Full Code Here

                MethodExecutionManager executionManager = MethodExecutionManager.getInstance(project);
                boolean continueExecution = executionManager.promptExecutionDialog(executionInput, true);

                if (continueExecution) {
                    RunContentDescriptor reuseContent = environment.getContentToReuse();
                    DBProgramDebugProcessStarter debugProcessStarter = new DBProgramDebugProcessStarter(connectionHandler);
                    XDebugSession session = null;
                    try {
                        session = XDebuggerManager.getInstance(project).startSession(
                                DBProgramRunner.this,
                                environment,
                                reuseContent,
                                debugProcessStarter);

                        RunContentDescriptor descriptor = session.getRunContentDescriptor();

                        if (callback != null) callback.processStarted(descriptor);

                        if (true /*LocalHistoryConfiguration.getInstance().ADD_LABEL_ON_RUNNING*/) {
                            RunProfile runProfile = environment.getRunProfile();
                            LocalHistory.getInstance().putSystemLabel(project, executor.getId() + " " + runProfile.getName());
                        }

                        ExecutionManager.getInstance(project).getContentManager().showRunContent(executor, descriptor);
                        ProcessHandler processHandler = descriptor.getProcessHandler();
                        if (processHandler != null) processHandler.startNotify();
                    } catch (ExecutionException e) {
                        e.printStackTrace();
                    }
                }
View Full Code Here

      javaParameters.getProgramParametersList().add("-d", VfsUtil.virtualToIoFile(virtualDir).getAbsolutePath());
      javaParameters.getProgramParametersList().add(VfsUtil.virtualToIoFile(flexFile).getAbsolutePath());

      OSProcessHandler processHandler = javaParameters.createOSProcessHandler();

      RunContentDescriptor runContentDescriptor = createConsole(project, commandName);

      ((ConsoleViewImpl) runContentDescriptor.getExecutionConsole()).attachToProcess(processHandler);


      processHandler.addProcessListener(new ProcessAdapter() {
        @Override
        public void processTerminated(ProcessEvent event) {
View Full Code Here

    JPanel toolbarPanel = new JPanel(new BorderLayout());
    toolbarPanel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, toolbarActions, false).getComponent());
    consoleComponent.add(toolbarPanel, BorderLayout.WEST);
    consoleComponent.add(consoleView.getComponent(), BorderLayout.CENTER);

    RunContentDescriptor descriptor = new RunContentDescriptor(consoleView, null, consoleComponent, tabTitle, null);

    Executor executor = DefaultRunExecutor.getRunExecutorInstance();
    for (AnAction action : consoleView.createConsoleActions()) {
      toolbarActions.add(action);
    }
View Full Code Here

      return AsyncResult.<RunProfileStarter>done(new RunProfileStarter() {
        @Nullable
        @Override
        public RunContentDescriptor execute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) {
          RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, env);
          final RunContentDescriptor descriptor = contentBuilder.showRunContent(env.getContentToReuse());
          karmaServer.onBrowsersReady(new Runnable() {
            @Override
            public void run() {
              ExecutionUtil.restartIfActive(descriptor);
            }
View Full Code Here

    ExecutionResult executionResult = state.executeWithServer(env.getExecutor(), server);
    if (server.areBrowsersReady()) {
      return doCoverage(executionResult, env, server);
    }
    RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, env);
    final RunContentDescriptor descriptor = contentBuilder.showRunContent(env.getContentToReuse());
    server.onBrowsersReady(new Runnable() {
      @Override
      public void run() {
        ExecutionUtil.restartIfActive(descriptor);
      }
View Full Code Here

    final KarmaRunConfiguration runConfiguration = (KarmaRunConfiguration) env.getRunProfile();
    CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(runConfiguration);
    CoverageHelper.resetCoverageSuit(runConfiguration);
    final String coverageFilePath = coverageEnabledConfiguration.getCoverageFilePath();
    RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, env);
    final RunContentDescriptor descriptor = contentBuilder.showRunContent(env.getContentToReuse());
    if (coverageFilePath != null) {
      KarmaCoveragePeer coveragePeer = getCoveragePeer(server);
      coveragePeer.startCoverageSession(new KarmaCoverageSession() {
        @Override
        public void onCoverageSessionFinished(@NotNull final File lcovFile) {
View Full Code Here

TOP

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

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.