Search in sources :

Example 6 with EditConfigurationsDialog

use of com.intellij.execution.impl.EditConfigurationsDialog in project intellij-community by JetBrains.

the class ProjectStartupConfigurable method editRunConfiguration.

private void editRunConfiguration() {
    final int row = myTable.getSelectedRow();
    if (row < 0)
        return;
    final RunnerAndConfigurationSettings selected = myModel.getAllConfigurations().get(row);
    final RunManager runManager = RunManager.getInstance(myProject);
    final RunnerAndConfigurationSettings was = runManager.getSelectedConfiguration();
    try {
        runManager.setSelectedConfiguration(selected);
        new EditConfigurationsDialog(myProject).showAndGet();
    } finally {
        runManager.setSelectedConfiguration(was);
    }
    myModel.fireTableDataChanged();
    refreshDataUpdateSelection(selected);
}
Also used : EditConfigurationsDialog(com.intellij.execution.impl.EditConfigurationsDialog) RelativePoint(com.intellij.ui.awt.RelativePoint)

Example 7 with EditConfigurationsDialog

use of com.intellij.execution.impl.EditConfigurationsDialog in project intellij-community by JetBrains.

the class EditMavenRunConfigurationAction method actionPerformed.

@Override
public void actionPerformed(@NotNull AnActionEvent e) {
    Project project = e.getProject();
    RunnerAndConfigurationSettings settings = MavenDataKeys.RUN_CONFIGURATION.getData(e.getDataContext());
    assert settings != null && project != null;
    RunManager.getInstance(project).setSelectedConfiguration(settings);
    EditConfigurationsDialog dialog = new EditConfigurationsDialog(project);
    dialog.show();
}
Also used : Project(com.intellij.openapi.project.Project) EditConfigurationsDialog(com.intellij.execution.impl.EditConfigurationsDialog) RunnerAndConfigurationSettings(com.intellij.execution.RunnerAndConfigurationSettings)

Aggregations

EditConfigurationsDialog (com.intellij.execution.impl.EditConfigurationsDialog)7 Project (com.intellij.openapi.project.Project)5 RunnerAndConfigurationSettings (com.intellij.execution.RunnerAndConfigurationSettings)2 ConfigurationType (com.intellij.execution.configurations.ConfigurationType)2 UnknownConfigurationType (com.intellij.execution.configurations.UnknownConfigurationType)2 DataContext (com.intellij.openapi.actionSystem.DataContext)2 NotNull (org.jetbrains.annotations.NotNull)2 ConfigurationFactory (com.intellij.execution.configurations.ConfigurationFactory)1 DefaultRunExecutor (com.intellij.execution.executors.DefaultRunExecutor)1 RunManagerImpl (com.intellij.execution.impl.RunManagerImpl)1 ExternalSystemNode (com.intellij.openapi.externalSystem.view.ExternalSystemNode)1 RunConfigurationNode (com.intellij.openapi.externalSystem.view.RunConfigurationNode)1 ListPopup (com.intellij.openapi.ui.popup.ListPopup)1 Condition (com.intellij.openapi.util.Condition)1 Navigatable (com.intellij.pom.Navigatable)1 RelativePoint (com.intellij.ui.awt.RelativePoint)1 List (java.util.List)1 Nullable (org.jetbrains.annotations.Nullable)1