Package com.intellij.execution

Examples of com.intellij.execution.RunManager


        if (selectedTestJavaArtifact != null) {
            String RPackageName = findRPackageName(androidUnitTest);

            String vmParameters = buildVmParameters(module, RPackageName, selectedTestJavaArtifact, androidVariant);

            RunManager runManager = RunManager.getInstance(project);
            runManager.getConfigurationFactories();
            JUnitConfigurationType junitConfigType = ConfigurationTypeUtil.findConfigurationType(JUnitConfigurationType.class);
            List<RunConfiguration> configs = runManager.getConfigurationsList(junitConfigType);

            for (RunConfiguration config : configs) {
                if (isRelevantRunConfig(module, config)) {
                    JUnitConfiguration jconfig = (JUnitConfiguration) config;
                    jconfig.setVMParameters(vmParameters);
                }
            }


            for (ConfigurationFactory factory : junitConfigType.getConfigurationFactories()) {
                RunnerAndConfigurationSettings settings = runManager.getConfigurationTemplate(factory);
                RunConfiguration config = settings.getConfiguration();
                if (isRelevantRunConfig(module, config)) {
                    JUnitConfiguration jconfig = (JUnitConfiguration) config;
                    jconfig.setVMParameters(vmParameters);
                }
View Full Code Here


            String RPackageName = testDelegate.getRPackageName();

            String vmParameters = oldBuildVmParameters(RPackageName, selectedTestVariant);

            RunManager runManager = RunManager.getInstance(project);
            runManager.getConfigurationFactories();
            JUnitConfigurationType junitConfigType = ConfigurationTypeUtil.findConfigurationType(JUnitConfigurationType.class);
            List<RunConfiguration> configs = runManager.getConfigurationsList(junitConfigType);


            for (RunConfiguration config : configs) {
                if (isRelevantRunConfig(module, config)) {
                    JUnitConfiguration jconfig = (JUnitConfiguration) config;
                    jconfig.setVMParameters(vmParameters);
                }
            }

            for (ConfigurationFactory factory : junitConfigType.getConfigurationFactories()) {
                RunnerAndConfigurationSettings settings = runManager.getConfigurationTemplate(factory);
                RunConfiguration config = settings.getConfiguration();
                if (isRelevantRunConfig(module, config)) {
                    JUnitConfiguration jconfig = (JUnitConfiguration) config;
                    jconfig.setVMParameters(vmParameters);
                }
View Full Code Here

    return new VirtualFile[]{pubspecFile, mainFile};
  }

  private static void createRunConfiguration(final @NotNull Module module, final @NotNull VirtualFile mainDartFile) {
    final RunManager runManager = RunManager.getInstance(module.getProject());
    final RunnerAndConfigurationSettings settings =
      runManager.createRunConfiguration("", DartCommandLineRunConfigurationType.getInstance().getConfigurationFactories()[0]);

    final DartCommandLineRunConfiguration runConfiguration = (DartCommandLineRunConfiguration)settings.getConfiguration();
    runConfiguration.getRunnerParameters().setFilePath(mainDartFile.getPath());
    runConfiguration.getRunnerParameters().setWorkingDirectory(mainDartFile.getParent().getPath());
    settings.setName(runConfiguration.suggestedName());

    runManager.addConfiguration(settings, false);
    runManager.setSelectedConfiguration(settings);
  }
View Full Code Here

        final PsiFile psiFile = PsiManager.getInstance(module.getProject()).findFile(htmlFile);
        final Url url = psiFile == null ? null : WebBrowserServiceImpl.getUrlForContext(psiFile);
        if (url == null) return;

        final RunManager runManager = RunManager.getInstance(module.getProject());
        try {
          final RunnerAndConfigurationSettings settings =
            runManager.createRunConfiguration("", JavascriptDebugConfigurationType.getTypeInstance().getFactory());

          ((JavaScriptDebugConfiguration)settings.getConfiguration()).setUri(url.toDecodedForm());
          ((JavaScriptDebugConfiguration)settings.getConfiguration()).setEngineId(dartium.getId().toString());
          settings.setName(((JavaScriptDebugConfiguration)settings.getConfiguration()).suggestedName());

          runManager.addConfiguration(settings, false);
          runManager.setSelectedConfiguration(settings);
        }
        catch (Throwable t) {/* ClassNotFound in IDEA Community or if JS Debugger plugin disabled */}
      }
    });
  }
View Full Code Here

            }

            final String configName = (new File(packageDir)).getName();

            // Now add a new run configuration:
            RunManager runManager = RunManager.getInstance(module.getProject());
            GoApplicationConfigurationType goAppConfigType = new GoApplicationConfigurationType();
            GoApplicationConfigurationType.GoFactory goConfigFactory = new GoApplicationConfigurationType.GoFactory(new GoApplicationConfigurationType());
            GoApplicationConfiguration configuration = new GoApplicationConfiguration("name", module.getProject(), goAppConfigType);
            configuration.runPackage = true;
            configuration.packageDir = packageDir;
            configuration.workingDir = module.getProject().getBasePath();
            configuration.goOutputDir = module.getProject().getBasePath() + File.separatorChar + "bin";
            configuration.goBuildBeforeRun = true;
            configuration.runBuilderArguments = "";
            configuration.runExecutableName = configName;
            configuration.scriptName = "";
            configuration.scriptArguments = "";
            configuration.autoStartGdb = true;
            configuration.GDB_PATH = "gdb";
            configuration.debugBuilderArguments = "-gcflags \"-N -l\"";
            configuration.setModule(module);
            configuration.setName(configName);
            RunnerAndConfigurationSettings runAndConfig = runManager.createConfiguration(configuration, goConfigFactory);
            runManager.addConfiguration(runAndConfig, false);
            runManager.setSelectedConfiguration(runAndConfig);

            toolWindow.showAndCreate(module.getProject());


        } catch (CantRunException e) {
View Full Code Here

TOP

Related Classes of com.intellij.execution.RunManager

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.