Created
June 1, 2012 08:25
-
-
Save abelhegedus/2850302 to your computer and use it in GitHub Desktop.
Infinite exception with re-executed command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IEditorPart editorPart = pm.getParent().getParent().getEditorPart(); | |
if(editorPart.getSite().getPage().getActiveEditor() != editorPart) { | |
//bring editor part to top | |
editorPart.getSite().getPage().bringToTop(editorPart); // this should make it active as well, otherwise infinite execption | |
IHandlerService handlerService = (IHandlerService) editorPart.getSite().getService(IHandlerService.class); | |
try { | |
handlerService.executeCommand(CommandConstants.SHOW_LOCATION_COMMAND_ID, null); | |
return; | |
} catch (Exception e) { | |
IncQueryEngine.getDefaultLogger().logError("Exception when activating show location!", e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment