From f93d8c653a4ad8d0c10230cafa7d9a6c4ac5f7ad Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 20 Oct 2015 17:56:15 +0200 Subject: [PATCH] [ui] optimized applicability conditions in Show File action (IDEA-146537) --- .../src/com/intellij/ide/actions/ShowFilePathAction.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java index 3c367610feed..7f3622a9de54 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java @@ -266,8 +266,8 @@ public class ShowFilePathAction extends AnAction { public static boolean isSupported() { return SystemInfo.isWindows || - Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN) || - SystemInfo.hasXdgOpen() || canUseNautilus.getValue(); + SystemInfo.hasXdgOpen() || canUseNautilus.getValue() || + Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN); } @NotNull @@ -285,9 +285,7 @@ public class ShowFilePathAction extends AnAction { if (!file.exists()) return; file = file.getAbsoluteFile(); File parent = file.getParentFile(); - if (parent == null) { - return; - } + if (parent == null) return; try { doOpen(parent, file); }