Community
Participate
Working Groups
Created attachment 232048 [details] DirectTool Item example @CanExecute is not evaluated for DirectToolItems, see attached example. The first ToolItem in the example is a direct, the second one a handled. If you click the save button, both should toggle their enabled state. for DirectMenuItems this has been resolved: https://bugs.eclipse.org/bugs/show_bug.cgi?id=377884
The enabled state is evaluated for handled tool items using the org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.ToolItemUpdateTimer We should consider DirectToolItems in whatever solution we find for bug 385394 PW
Jonas, can you provide a patch for this issue?
sure, I will give it a try!
I had a look at DirectContributionItem and HandledContributionItem. They have a big overlap. Therefore, a couple of fixes in the past had to been done twice, e.g. Bug 385414. Other fixes, e.g. Bug 380946 have only been fixed for HandledItem (Probably the direct case was accidentally missed). This BR is another case, when fixing Bug 385394, again, it seems to me that the DirectContribution case was overlooked. To avoid this in the future, I suggest to refactor both classes and create a common super class containing all the common code. This will also enable a pretty simple fix for this BR. If you agree, I would open up a new BR for the refactoring and do a contribution then.
(In reply to Jonas Helming from comment #4) > I had a look at DirectContributionItem and HandledContributionItem. > If you agree, I would open up a new BR for the refactoring and do a > contribution then. Sounds good.
(In reply to Jonas Helming from comment #4) > > If you agree, I would open up a new BR for the refactoring and do a > contribution then. I'm OK with that, but you'll have to be careful. A DirectContributionItem is a rendering that's little more than an SWT widget with some listeners. A HandledContributionItem renders a full participant in our command and service lifecycle. PW
*** This bug has been marked as a duplicate of bug 465893 ***