|handlerService.executeHandler loops indefinitely [message #1061409]
||Fri, 31 May 2013 13:54
| Ozgur Cagdas
Registered: May 2013
I am trying to execute a command within the 'init' method of a Part which is annotated as @PostConstruct but somehow the execution line triggers a loop and the console is flooded with the 'true' messages printed by the below println line and the application doesn't go any further than that point. If I comment out the 'handlerService.executeHandler' line, 'true' is printed only once and execution continues as normal.
I have this command tied to a popup menu item as well and when I activate it from the menu, it also runs without any issues. Seems like I'm making a fundamental mistake here but can't figure out what it is.
The init method of the Part is;
public void init(Composite parent, final IEclipseContext context, EMenuService service)
and this is the bit which I'm having the issue with;
ECommandService commandService = context.get(ECommandService.class);
EHandlerService handlerService = context.get(EHandlerService.class);
ParameterizedCommand myCommand = commandService.createCommand("com.mycomp.first_command.id", null);
Object result = handlerService.executeHandler(myCommand);
I also tried injecting the ECommandService and EHandlerService parameters into the 'init' method but it didn't make any difference at all.
Thanks in advance,
[Updated on: Fri, 31 May 2013 14:03]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02126 seconds