use of com.github.masahirosuzuka.PhoneGapIntelliJPlugin.runner.PhoneGapRunConfiguration 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);
}
Aggregations