Community
Participate
Working Groups
In the Application Model Editor it's possible to specify a Handled Tool Item and configure it to use some command. If no 'Label' property is explicitly specified for the Handle Tool Item, it will be displayed without a label. However because no label is displayed, it'll be hard to find that item on the final user interface. I wasted much time trying to figure out why my item was missing on the user interface checking all kind of application model configurations until i realized that the item is displayed but not really visible because of missing label. Potential solutions could be either mark the 'Label' property as mandatory and clearly display it in the GUI (see bug 429595) or by default use the name of the Command as the label for the Handled Tool Item.
Please do not change those fields, unless this only ever a problem with the application editor and never a problem at runtime. You are not familiar with where the fix has to go. PW
Sorry, I was not really familiar with the way the tooling works. I saw the change in the project and thought that I've initially submitted this bug to a wrong project. That's why I reverted it to my original selection (which was not correct as I understand now). I'll pay more attention to the changes other people make to my bug reports (now I know how it works).
The org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.updateMenuItem() has the code where we drop through to the command name if the label is not initialized. In setting the tooltip, we use a similar pattern. org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.getToolTipText() Are you talking about using a text label on the toolitem itself (as opposed to the tooltip + an icon)? That's currently set in org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.updateToolItem() PW
Not sure what exactly goes wrong. I will try to find it out by looking at both places.
I think I know what's going wrong, it's indeed updateToolItem() that should be fixed. I've looked at updateMenuItem() but its implementation also needs some improvement. I'll need to figure out what the real implementation should be but this will take some time...
(In reply to D. Spiridenok from comment #5) > I think I know what's going wrong, it's indeed updateToolItem() that should > be fixed. I've looked at updateMenuItem() but its implementation also needs > some improvement. If you see room for improvement sin updateMenuItem() this should be potentially handled by a new bug report.
(In reply to Lars Vogel from comment #6) > (In reply to D. Spiridenok from comment #5) > > I think I know what's going wrong, it's indeed updateToolItem() that should > > be fixed. I've looked at updateMenuItem() but its implementation also needs > > some improvement. > > If you see room for improvement sin updateMenuItem() this should be > potentially handled by a new bug report. Submitted Bug 429919 for that. It seems to be not that simple to clean up updateMenuItem(), so would like to have additional information before start changing.
https://git.eclipse.org/r/23071
Fixed with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=74fd99e788df5a0366286b6b72682b71cbe7a990 Thanks a lot Dzmitry, great to see your contributions coming in after our RCP training!
.
You are welcome! It's always fun to fix the bugs I submitted myself :)
Verified in Build id: I20140427-2030