mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ui] optimized applicability conditions in Show File action (IDEA-146537)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user