diff options
Diffstat (limited to 'xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.java')
-rw-r--r-- | xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.java b/xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.java index 4f7f4efa5085..65da7b30722c 100644 --- a/xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.java +++ b/xml/impl/src/com/intellij/ide/browsers/BrowserLauncherImpl.java @@ -24,6 +24,7 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.options.ShowSettingsUtil; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.Messages; +import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.AppUIUtil; import com.intellij.util.ArrayUtil; @@ -38,7 +39,7 @@ final class BrowserLauncherImpl extends BrowserLauncherAppless { @Override protected void browseUsingNotSystemDefaultBrowserPolicy(@NotNull URI uri, @NotNull GeneralSettings settings, @Nullable Project project) { WebBrowserManager browserManager = WebBrowserManager.getInstance(); - if (browserManager.getDefaultBrowserPolicy() == DefaultBrowserPolicy.FIRST) { + if (browserManager.getDefaultBrowserPolicy() == DefaultBrowserPolicy.FIRST || (SystemInfo.isMac && "open".equals(settings.getBrowserPath()))) { WebBrowser browser = browserManager.getFirstActiveBrowser(); if (browser != null) { browseUsingPath(uri.toString(), null, browser, project, ArrayUtil.EMPTY_STRING_ARRAY); @@ -50,7 +51,11 @@ final class BrowserLauncherImpl extends BrowserLauncherAppless { } @Override - protected void doShowError(@Nullable final String error, @Nullable final WebBrowser browser, @Nullable final Project project, final String title, @Nullable final Runnable launchTask) { + protected void showError(@Nullable final String error, + @Nullable final WebBrowser browser, + @Nullable final Project project, + final String title, + @Nullable final Runnable launchTask) { AppUIUtil.invokeOnEdt(new Runnable() { @Override public void run() { @@ -85,7 +90,7 @@ final class BrowserLauncherImpl extends BrowserLauncherAppless { public void run() { try { if (process.waitFor() == 1) { - doShowError(ExecUtil.readFirstLine(process.getErrorStream(), null), browser, project, null, launchTask); + showError(ExecUtil.readFirstLine(process.getErrorStream(), null), browser, project, null, launchTask); } } catch (InterruptedException ignored) { |