gdelmas/IntelliJDashPlugin

Call Dash without activating it

Kapeli opened this issue · 5 comments

IntelliJDashPlugin calls Dash by opening a dash-plugin:// URL. The problem is that the system forces Dash to become active when this URL is opened.

Currently, this is not an issue. However, a future update of Dash will add support for iOS remotes. While an iOS remote is connected, extensions are redirected to it directly and Dash on OS X is not shown at all. Unfortunately there's no way for me to prevent the system from activating Dash when you open the dash-plugin:// URL.

You currently open Dash by running:

openUri(request);

I have no idea what this does behind the scenes, but it should be the equivalent of this Terminal command:

open dash-plugin://query

Instead of that, you should perform the equivalent of this Terminal command:

open -g dash-plugin://query

The -g causes Dash to not get activated if it does not want to and the user experience is a lot better as the active app does not lose focus anymore. When you make the change, please make sure to test whether or not you need to escape special symbols (e.g. $).

It is safe to make this change as soon as possible (no need to wait for a Dash update), as the current version of Dash already knows to activate itself if it needs to.

all right. will implement with the next update. when will the iOS update arrive?

i don't own the iOS app. do you have a code so i can test?

When will the iOS update arrive?

I'm going to release a beta soon (in 2-3 days). The stable release is far away, so no rush.

i don't own the iOS app. do you have a code so i can test?

Email me and give me your Apple ID and I'll add you to the beta.

@Kapeli,

just wanted to change the way i open dash. but the current way already seems to work. if i check "Redirect integrations plugin" Dash Beta does not show up.

do you have different results?

@Kapeli,

i just saw dash gets the focus for a very short time, and than return the focus to the IDE. i guess this is what you wanted to have changed?

also open -g dash-plugin://query doesn't seem to work when dash is not already running. when it has to open dash for the first time, Dash shows its window.

i just saw dash gets the focus for a very short time, and than return the focus to the IDE. i guess this is what you wanted to have changed?

Yes.

also open -g dash-plugin://query doesn't seem to work when dash is not already running. when it has to open dash for the first time, Dash shows its window.

That's by design. The same happens if you use that command while a remote is not connected. When Dash is not running, there's no remote connected so... Dash shows.