mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
removed generate skeletons action
This commit is contained in:
@@ -137,8 +137,7 @@ public class PythonSdkDetailsDialog extends DialogWrapper {
|
||||
}
|
||||
})
|
||||
.addExtraAction(new ToggleVirtualEnvFilterButton())
|
||||
.addExtraAction(new ShowPathButton())
|
||||
.addExtraAction(new GenerateSkeletonsButton());
|
||||
.addExtraAction(new ShowPathButton());
|
||||
|
||||
decorator.setPreferredSize(new Dimension(600, 500));
|
||||
myMainPanel = decorator.createPanel();
|
||||
@@ -454,36 +453,4 @@ public class PythonSdkDetailsDialog extends DialogWrapper {
|
||||
updateOkButton();
|
||||
}
|
||||
}
|
||||
|
||||
private class GenerateSkeletonsButton extends AnActionButton implements DumbAware {
|
||||
public GenerateSkeletonsButton() {
|
||||
super("Generate skeletons for the selected interpreter", PythonIcons.Python.Skeleton);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return (getSelectedSdk() instanceof PyDetectedSdk);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
final Sdk sdk = getSelectedSdk();
|
||||
if (sdk instanceof PyDetectedSdk) {
|
||||
try {
|
||||
myProjectSdksModel.apply();
|
||||
}
|
||||
catch (ConfigurationException ignored) {
|
||||
}
|
||||
|
||||
final Sdk addedSdk = SdkConfigurationUtil.setupSdk(myProjectSdksModel.getSdks(), sdk.getHomeDirectory(),
|
||||
PythonSdkType.getInstance(), true,
|
||||
null, null);
|
||||
myProjectSdksModel.addSdk(addedSdk);
|
||||
myProjectSdksModel.removeSdk(sdk);
|
||||
refreshSdkList();
|
||||
mySdkList.setSelectedValue(addedSdk, true);
|
||||
updateOkButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 512 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -49,7 +49,6 @@ public class PythonIcons {
|
||||
public static final Icon Python_24 = load("/icons/com/jetbrains/python/python_24.png"); // 24x24
|
||||
public static final Icon PythonClosed = load("/icons/com/jetbrains/python/pythonClosed.png"); // 16x16
|
||||
public static final Icon PythonTests = load("/icons/com/jetbrains/python/pythonTests.png"); // 16x16
|
||||
public static final Icon Skeleton = load("/icons/com/jetbrains/python/skeleton.png"); // 16x16
|
||||
public static final Icon TemplateRoot = load("/icons/com/jetbrains/python/templateRoot.png"); // 16x16
|
||||
public static final Icon Virtualenv = load("/icons/com/jetbrains/python/virtualenv.png"); // 16x16
|
||||
|
||||
|
||||
Reference in New Issue
Block a user