Open n5a5 opened 4 months ago
I doubt this can be changed. SWT Components on Mac such as the Text control and the Browser integrate as native Mac components, and selecting "Search With Google" on native Mac components will open it in Safari in spite of setting another Browser as default.
Highlighting a word in Slack on MacOS and selecting "Search with Google..." opens in the default browser. So, this should be possible, no?
Highlighting a word in Slack on MacOS and selecting "Search with Google..." opens in the default browser. So, this should be possible, no?
It seems that this is an integrated service on Mac components. See this and this. The conclusion is that the "Search with Google" service is provided by Safari, and is not meant to work with other browsers.
Thanks, @Phillipus! The second link resolves the issue. Turning off the built-in "Search with Google" service allows Eclipse to use the default browser.
Turning off the built-in "Search with Google" service allows Eclipse to use the default browser.
@JTMosaic How did you do that? Disabling it in the Services dialog has no effect for me (Sonoma).
I just noticed something. There are two different context-based searches in DBeaver (based on Eclipse)
There is a one in free-text, such as a script, that reads:
and one that appears in the results pane that reads:
The latter appears to use SWT and only opens in Safari while the former, as the tooltip says, opens in the default browser.
This would seem to indicate that it is possible for Eclipse to use the default browser but it isn't implemented consistently?
This would seem to indicate that it is possible for Eclipse to use the default browser but it isn't implemented consistently?
I would think that DBeaver added that option as a custom menu item.
So you're saying that vanilla Eclipse doesn't have the "Search selected text with Google" option? Then this may be a DBeaver issue and not an Eclipse issue, per se. Assuming the results grid isn't a SWT component in which case this may be unsolvable
I guess it depends what the DBeaver control is. If it's a non-native component such as StyledText
, or they've defined their own context menu, then the native Mac services menu won't show. If the control is a SWT Text
control, for example, it will. I don't think it's possible for SWT to hook into the native services menu.
At any rate the "Search with Google" menu item is provided by Safari as a "service" so it can't be changed.
I would think that DBeaver added that option as a custom menu item. So you're saying that vanilla Eclipse doesn't have the "Search selected text with Google" option?
That's correct. It's a custom menu item added by DBeaver.
Thank you for clarifications @Phillipus. Now we have a couple of questions left: a) How does Slack respect the default browser setting, and b) Do we want the Eclipse Platform to follow Slack's route?
In any case, I find this a pretty minor thing, and I would rather see SWT developers spending time on something more substantial. What say you @JTMosaic?
Thank you for clarifications @Phillipus. Now we have a couple of questions left: a) How does Slack respect the default browser setting
I don't use Slack so I don't know. Is the context menu there actually Mac's native Service menu, or perhaps they added their own service menu item?
and b) Do we want the Eclipse Platform to follow Slack's route?
For the reasons above this will be unlikely. The "Search with Google" menu item is provided by Safari as a "service". I doubt anyone will spend any time on this (but who knows?). ;-)
@n5a5 I agree. I see this as a DBeaver issue more than an Eclipse issue but I think the discussion was helpful for all involved.
Describe the bug On macOS, the 'Search With Google' action in the context menu opens Google search in Safari even if another browser is set as default.
To Reproduce
Expected behavior The text should be searched in the default browser.
Environment:
Select the platform(s) on which the behavior is seen:
Additional OS info (e.g. OS version, Linux Desktop, etc)
macOS 14.4.1.
Workaround (or) Additional context To be fair, native macOS applications such as TextEdit and Mail do not respect this setting either. However, all the third-party apps I tried (Slack, IntelliJ IDEA, Notion) invoke the default browser, and it seems like the correct behavior.
Originally reported here: https://github.com/dbeaver/dbeaver/issues/26611.