mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-12510 NPE in Idea 13 Python Plugin New Module SDK dialog prevents all python use
Component could return null if the Component is not directly under the mouse
This commit is contained in:
@@ -279,8 +279,9 @@ public class PythonSdkType extends SdkType {
|
||||
|
||||
public void showCustomCreateUI(SdkModel sdkModel, final JComponent parentComponent, final Consumer<Sdk> sdkCreatedCallback) {
|
||||
Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(parentComponent));
|
||||
final Point point = parentComponent.getMousePosition();
|
||||
SwingUtilities.convertPointToScreen(point, parentComponent);
|
||||
final PointerInfo pointerInfo = MouseInfo.getPointerInfo();
|
||||
if (pointerInfo == null) return;
|
||||
final Point point = pointerInfo.getLocation();
|
||||
PythonSdkDetailsStep
|
||||
.show(project, sdkModel.getSdks(), null, parentComponent, point, new NullableConsumer<Sdk>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user