grab focus in show all action from interpreter combobox

This commit is contained in:
Ekaterina Tuzova
2014-02-21 14:17:39 +04:00
parent f6be520b78
commit 31ea5013cc
2 changed files with 15 additions and 9 deletions
@@ -165,9 +165,13 @@ public class PyActiveSdkConfigurable implements UnnamedConfigurable {
@Override
public void setSelectedItem(Object item) {
if (SHOW_ALL.equals(item)) {
PythonSdkDetailsDialog options = myModule == null ? new PythonSdkDetailsDialog(myProject, myDetailsCallback) :
new PythonSdkDetailsDialog(myModule, myDetailsCallback);
options.show();
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
PythonSdkDetailsDialog options = myModule == null ? new PythonSdkDetailsDialog(myProject, myDetailsCallback) :
new PythonSdkDetailsDialog(myModule, myDetailsCallback);
options.show();
}
});
return;
}
if (!PySdkListCellRenderer.SEPARATOR.equals(item))
@@ -235,6 +235,7 @@ public class PythonSdkDetailsDialog extends DialogWrapper {
mySdkList.updateUI();
}
}
@Nullable
private Sdk getSdk() {
if (myModule == null) {
@@ -246,12 +247,13 @@ public class PythonSdkDetailsDialog extends DialogWrapper {
private void addSdk(AnActionButton button) {
PythonSdkDetailsStep
.show(myProject, myProjectSdksModel.getSdks(), this, myMainPanel, button.getPreferredPopupPoint().getScreenPoint(), false, new NullableConsumer<Sdk>() {
@Override
public void consume(Sdk sdk) {
addCreatedSdk(sdk, false);
}
});
.show(myProject, myProjectSdksModel.getSdks(), this, myMainPanel, button.getPreferredPopupPoint().getScreenPoint(), false,
new NullableConsumer<Sdk>() {
@Override
public void consume(Sdk sdk) {
addCreatedSdk(sdk, false);
}
});
}
private void addCreatedSdk(@Nullable final Sdk sdk, boolean newVirtualEnv) {