Focus back to Intellij Ide


I am trying to implement PKCE auth for a plugin feature and making use of the BuiltInServer to do the redirect back to the IDE from the browser after the auth. 

However, I am not able to focus the IDE which initiated the PKCE auth and bring it to front.

I explored IdeFocusManager class and used below code. However, after this line is executed no other window is opening.


Whats the best way to do this?

Can anyone please help!

1 comment
Comment actions Permalink

Are you executing focus code on EDT? As you already have relevant Project, see also com.intellij.openapi.wm.WindowManager


Please sign in to leave a comment.