Navigating to a PsiElement in another window doesn't switch focus Follow
I'm developing a plugin for PhpStorm where I create a line marker that is a link to a PsiElement of another project in another PhpStorm window. When I click the line marker, it moves the cursor to the intended position of the right file in the second window, but the first window stays focused. For the user it looks like nothing has happened, and only when they switch to the second window, they will see element they are trying to navigate to.
The focused window does change in PhpStorm 2021.3.3 but does not in 2022.1.4 and newer versions. Tested on Ubuntu and Windows.
I'm using a LineMarkerProvider where in the navHandler argument of LineMarkerInfo I call navigate() on the GotoRelatedItem.
Is it intentional? If so, how do I switch the focused window?
Please sign in to leave a comment.
It looks like a potential bug.
I suggest opening an issue on https://youtrack.jetbrains.com/issues/IDEA and providing more details that will allow reproducing it.