Community
Participate
Working Groups
For direct menu items in a handler: @CanExecute public boolean test(@Optional @Named("EXIT_CONDITIION") String s) { if (s == null) { return false; } return true; } In a part: button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { ctx.set("EXIT_CONDITIION", "true"); todoService.getTodos(viewer::setInput); } }); Setting the value in the context does not trigger CanExecute evaluation. See also Bug 465893, Bug 377884 and Bug 428793.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
I still don't see that working
Rolf, I have the vague memory that you fixed that. But I see it again in 4.18.
I have worked on enable checks, but that was related to (parameterized) opaque items. Also according to Bug 377884 this should be evaluated, no testcases available. There most be some regression or corner case, the method to look at is: MenuManagerRendererFilter#updateElementVisibility Note that the @CanExecute for menu items is only evaluated on showing of the menu, not when the context is set. Do you see the problem for a pop-up menu or for (a child of) the main menu?
(In reply to Rolf Theunissen from comment #4) > Also according to Bug 377884 this should be evaluated, no testcases > available. There most be some regression or corner case, the method to look > at is: MenuManagerRendererFilter#updateElementVisibility > > Note that the @CanExecute for menu items is only evaluated on showing of the > menu, not when the context is set. Do you see the problem for a pop-up menu > or for (a child of) the main menu? Thanks for the answer. It was for a "normal" direct menu item contributed to the IDE. I try to recreate and add as attachment to the bug.