Skip to content

Commit

Permalink
fix: Remove special Idea case for Mac (#15720)
Browse files Browse the repository at this point in the history
If you have multiple versions installed, e.g. community and ultimate, the protocol might open the wrong one
  • Loading branch information
Artur- committed Jan 20, 2023
1 parent 3d467c6 commit ab54335
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,13 @@ public static boolean openFile(File file, int lineNumber) {
if (isVSCode(processInfo)) {
return Open.open("vscode://file" + absolutePath + ":" + lineNumber);
} else if (isIdea(processInfo)) {
if (OSUtils.isMac()) {
// On Mac, the idea:// protocol works...
return Open.open("idea://open?file=" + absolutePath + "&line="
+ lineNumber);
} else {
try {
run(getBinary(processInfo), "--line", lineNumber + "",
absolutePath);
} catch (Exception e) {
getLogger().error("Unable to launch IntelliJ IDEA", e);
}
try {
run(getBinary(processInfo), "--line", lineNumber + "",
absolutePath);
} catch (Exception e) {
getLogger().error("Unable to launch IntelliJ IDEA", e);
}

} else if (isEclipse(processInfo)) {
if (OSUtils.isMac()) {
try {
Expand Down

0 comments on commit ab54335

Please sign in to comment.