diff --git a/plugins/idea/src/main/java/org/robovm/idea/sdk/RoboVmSdkType.java b/plugins/idea/src/main/java/org/robovm/idea/sdk/RoboVmSdkType.java index 613ed88d3..f744e0e56 100755 --- a/plugins/idea/src/main/java/org/robovm/idea/sdk/RoboVmSdkType.java +++ b/plugins/idea/src/main/java/org/robovm/idea/sdk/RoboVmSdkType.java @@ -75,6 +75,13 @@ public String suggestSdkName(String currentSdkName, String sdkHome) { return SDK_NAME + " " + Version.getCompilerVersion(); } + @Override + public @Nullable String getVersionString(@NotNull String sdkHome) { + if (sdkHome.equals(suggestHomePath())) + return Version.getCompilerVersion(); + else return null; + } + @Nullable @Override public AdditionalDataConfigurable createAdditionalDataConfigurable(@NotNull SdkModel sdkModel, @NotNull SdkModificator sdkModificator) { @@ -123,7 +130,9 @@ private void setupSdkRoots(Sdk sdk) { sdkModificator.setHomePath(RoboVmPlugin.getSdkHome().getAbsolutePath()); // commit changes and let IDEA handle the rest - sdkModificator.commitChanges(); + ApplicationManager.getApplication().invokeAndWait(() -> + ApplicationManager.getApplication().runWriteAction(sdkModificator::commitChanges) + ); } public static void createSdkIfNotExists() {