Community
Participate
Working Groups
I defined a class derived from AbstractHandler. This handler is added in the toolbar of view A. If I activate the handler by toolbar icon, the execute method of the handler is invoked. Problem: If the focus is on view B and the handler of view A is invoked by clicking the toolbar icon, frist the execute method of the handler is invoked and afterwards the focus is set to view A. So HandlerUtil.getActivePart() delivers the wrong view for me. If the focus is on view A and the handler action is clicked in view A, it works. But not with the focus on the other view first. The views were not detached. Maybe the problem also exists for editors.
Created attachment 179826 [details] Sample Plugin to reproduce the problem
Oliver, This works correctly for me. I've added the command to the toolbar of Package Explorer. No matter which view is currently in focus, when I click the icon, it always prints "Package Explorer" If there are any specific steps to reproduce this bug, please reopen with the details.