Focus application windows Permanently deleted user Created January 12, 2017 20:16 Hi! How can I focus on Idea windows like in debug mode (Focus application on breakpoint in settings)?
Try this simple code:
JFrame frame = WindowManager.getInstance().getFrame(project);
if (frame != null) frame.toFront();
Hi Vassiliy! Thanks for reply.
Unfortunately, the code above doesn't switch to idea window.
I see, sorry. But this code below works for me, please try. (It's macos case)
JFrame frame = WindowManager.getInstance().getFrame(e.getProject());
if (frame instanceof IdeFrame) {
AppIcon.getInstance().requestFocus((IdeFrame)frame);
}
Yes, it works great!
Thank you!