use of com.intellij.execution.RunManager in project intellij-plugins by JetBrains.
the class FlexRenameTest method testRunConfigUpdatedOnBcRename.
@JSTestOptions({ JSTestOption.WithFlexFacet })
public void testRunConfigUpdatedOnBcRename() throws Exception {
final RunManager runManager = RunManager.getInstance(myProject);
FlexTestUtils.createFlexUnitRunConfig(runManager, "SomeTest.testSomething()", myModule, FlexUnitRunnerParameters.Scope.Method, "", "SomeTest", "testSomething", true);
FlexTestUtils.createFlashRunConfig(runManager, myModule, "SomeClass", "foo.bar.SomeClass", true);
final String newBcName = "Abcde";
FlexTestUtils.modifyBuildConfiguration(myModule, configuration -> configuration.setName(newBcName));
assertEquals(newBcName, FlexBuildConfigurationManager.getInstance(myModule).getActiveConfiguration().getName());
FlexTestUtils.checkFlexUnitRunConfig(runManager, myModule, "SomeTest.testSomething()", "", "SomeTest", "testSomething");
FlexTestUtils.checkFlashRunConfig(runManager, myModule, "SomeClass", "foo.bar.SomeClass");
}
use of com.intellij.execution.RunManager in project intellij-plugins by JetBrains.
the class PhoneGapProjectTemplateGenerator method createRunConfiguration.
private static void createRunConfiguration(@NotNull Project project, @NotNull PhoneGapProjectSettings settings) {
final RunManager runManager = RunManager.getInstance(project);
PhoneGapConfigurationType configurationType = ConfigurationTypeUtil.findConfigurationType(PhoneGapConfigurationType.class);
RunnerAndConfigurationSettings configuration = runManager.createRunConfiguration(PhoneGapBundle.message("phonegap.project.template.create.run.configuration.title"), configurationType.getConfigurationFactories()[0]);
PhoneGapRunConfiguration runConfiguration = (PhoneGapRunConfiguration) configuration.getConfiguration();
runConfiguration.setExecutable(settings.executable);
runConfiguration.setWorkDir(project.getBasePath());
runConfiguration.setPlatform(SystemInfo.isMac ? PhoneGapRunConfigurationEditor.PLATFORM_IOS : PhoneGapRunConfigurationEditor.PLATFORM_ANDROID);
runConfiguration.setCommand(PhoneGapCommandLine.COMMAND_EMULATE);
runManager.addConfiguration(configuration, false);
runManager.setSelectedConfiguration(configuration);
}
use of com.intellij.execution.RunManager in project intellij-plugins by JetBrains.
the class KarmaRunConfiguration method getTemplateRunConfiguration.
@Nullable
private static KarmaRunConfiguration getTemplateRunConfiguration(@NotNull Project project) {
if (project.isDisposed()) {
return null;
}
RunManager runManager = RunManager.getInstance(project);
RunnerAndConfigurationSettings templateSettings = runManager.getConfigurationTemplate(KarmaConfigurationType.getFactory());
RunConfiguration rc = templateSettings.getConfiguration();
if (rc instanceof KarmaRunConfiguration) {
return (KarmaRunConfiguration) rc;
}
LOG.warn("No Karma template run configuration found: " + rc);
return null;
}
Aggregations