Skip to content

Commit

Permalink
DevKit: IDEA-128345 Can't create plugin SDK on OS X + friendly sdk na…
Browse files Browse the repository at this point in the history
…me for CLion
  • Loading branch information
amakeev committed Sep 3, 2014
1 parent 620027a commit c633f5c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plugins/devkit/src/projectRoots/IdeaJdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ public String suggestHomePath() {
return PathManager.getHomePath().replace(File.separatorChar, '/');
}

@Override
public String adjustSelectedSdkHome(String homePath) {
if (SystemInfo.isMac) {
File home = new File(homePath, "Contents");
if (home.exists()) return home.getPath();
}
return super.adjustSelectedSdkHome(homePath);
}

public boolean isValidSdkHome(String path) {
if (isFromIDEAProject(path)) {
return true;
Expand Down Expand Up @@ -153,6 +162,9 @@ else if (new File(sdkHome, "lib/webide.jar").exists()) {
else if (new File(sdkHome, "license/AppCode_license.txt").exists()) {
productName = "AppCode ";
}
else if (new File(sdkHome, "license/CLion_Preview_License.txt").exists()) {
productName = "CLion ";
}
else {
productName = "IDEA ";
}
Expand Down

0 comments on commit c633f5c

Please sign in to comment.