IDEA-140099 Can't remove a single external tool

This commit is contained in:
Vassiliy.Kudryashov
2017-08-29 22:06:16 +03:00
parent 8add3aa39c
commit fc79462629
2 changed files with 3 additions and 10 deletions
@@ -44,7 +44,9 @@ public abstract class AbstractToolBeforeRunTaskProvider<T extends AbstractToolBe
}
boolean isModified = dialog.isModified();
Tool selectedTool = dialog.getSelectedTool();
LOG.assertTrue(selectedTool != null);
if (selectedTool == null) {
return true;
}
String selectedToolId = selectedTool.getActionId();
String oldToolId = task.getToolActionId();
if (oldToolId != null && oldToolId.equals(selectedToolId)) {
@@ -20,8 +20,6 @@ import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
class ToolSelectDialog extends DialogWrapper {
private final BaseToolsPanel myToolsPanel;
@@ -30,13 +28,6 @@ class ToolSelectDialog extends DialogWrapper {
super(project);
myToolsPanel = toolsPanel;
myToolsPanel.reset();
setOKActionEnabled(myToolsPanel.getSingleSelectedTool() != null);
myToolsPanel.addSelectionListener(new TreeSelectionListener() {
@Override
public void valueChanged(TreeSelectionEvent e) {
setOKActionEnabled(myToolsPanel.getSingleSelectedTool() != null);
}
});
init();
pack();
if (actionIdToSelect != null) {