@Override protected void updateToolItem() { ToolItem item = (ToolItem) widget; if (item.getImage() == null || getModel().getTags().contains(FORCE_TEXT)) { final String text = getModel().getLocalizedLabel(); if (text == null || text.length() == 0) { final MCommand command = getModel().getCommand(); if (command == null) { // Set some text so that the item stays visible in the menu item.setText("UnLabled"); //$NON-NLS-1$ } else { item.setText(command.getLocalizedCommandName()); } } else { item.setText(text); } } else { item.setText(""); //$NON-NLS-1$ } final String tooltip = getToolTipText(true); item.setToolTipText(tooltip); item.setSelection(getModel().isSelected()); item.setEnabled(getModel().isEnabled()); }
if (text == null || text.isEmpty()) { try { text = parmCmd.getName(getModel().getCommand().getLocalizedCommandName()); } catch (NotDefinedException e) { Activator.log(LogService.LOG_DEBUG, e.getMessage(), e);