Search in sources :

Example 1 with PluginConfigurationType

use of org.jetbrains.idea.devkit.run.PluginConfigurationType in project intellij-community by JetBrains.

the class PluginModuleBuilder method commitModule.

@Nullable
@Override
public Module commitModule(@NotNull Project project, @Nullable ModifiableModuleModel model) {
    Module module = super.commitModule(project, model);
    if (module != null) {
        RunManager runManager = RunManager.getInstance(project);
        RunnerAndConfigurationSettings configuration = runManager.createRunConfiguration(DevKitBundle.message("run.configuration.title"), new PluginConfigurationType().getConfigurationFactories()[0]);
        runManager.addConfiguration(configuration, false);
        runManager.setSelectedConfiguration(configuration);
    }
    return module;
}
Also used : RunnerAndConfigurationSettings(com.intellij.execution.RunnerAndConfigurationSettings) PluginConfigurationType(org.jetbrains.idea.devkit.run.PluginConfigurationType) RunManager(com.intellij.execution.RunManager) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

RunManager (com.intellij.execution.RunManager)1 RunnerAndConfigurationSettings (com.intellij.execution.RunnerAndConfigurationSettings)1 Nullable (org.jetbrains.annotations.Nullable)1 PluginConfigurationType (org.jetbrains.idea.devkit.run.PluginConfigurationType)1