Skip to content

Commit

Permalink
* idea: fixed -- manual adding of RoboVM SDK from File/Project struct…
Browse files Browse the repository at this point in the history
…ure (#781)

## Fix:
- It was failing due version was not returned
- SDK paths were configured not on Writable scope
  • Loading branch information
dkimitsa authored Apr 16, 2024
1 parent 792606b commit 1206cb6
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 1206cb6

Please sign in to comment.