/** * Returns a human-readable representation of this command with all of its * parameterizations. * * @return The human-readable representation of this parameterized command; * never <code>null</code>. * @throws NotDefinedException * If the underlying command is not defined. */ public final String getName() throws NotDefinedException { return getName(command.getName()); }
public String getCommandName() { if (fSelectedCommand != null) try { return fSelectedCommand.getName(); } catch (NotDefinedException e) { return fSelectedCommand.getId(); } return null; }
@Override public String getName() throws NotDefinedException { try { return command.getName(); } catch (final org.eclipse.core.commands.common.NotDefinedException e) { throw new NotDefinedException(e); } }
/** * Returns a human-readable representation of this command with all of its * parameterizations. * * @return The human-readable representation of this parameterized command; * never <code>null</code>. * @throws NotDefinedException * If the underlying command is not defined. */ public String getName() throws NotDefinedException { return getName(command.getName()); }
/** * Returns a human-readable representation of this command with all of its * parameterizations. * * @return The human-readable representation of this parameterized command; * never <code>null</code>. * @throws NotDefinedException * If the underlying command is not defined. */ public final String getName() throws NotDefinedException { return getName(command.getName()); }
protected static String getText(Object obj) { if (obj instanceof Command) { Command com = (Command) obj; try { return com.getName(); } catch (NotDefinedException e) { return com.getId(); } } else if (obj instanceof Category) { Category cat = (Category) obj; try { return cat.getName(); } catch (NotDefinedException e) { return cat.getId(); } } return ""; //$NON-NLS-1$ }
private void updateButton() { Button item = (Button) widget; String text = label; if (text == null) { if (command != null) { try { text = command.getCommand().getName(); } catch (NotDefinedException e) { StatusManager.getManager().handle( StatusUtil.newStatus(IStatus.ERROR, "Update item failed " //$NON-NLS-1$ + getId(), e)); } } } if (text != null) { item.setText(text); } String toolTipText = getToolTipText(text); item.setToolTipText(toolTipText); if (item.getSelection() != checkedState) { item.setSelection(checkedState); } // allow the handler update its enablement boolean shouldBeEnabled = isEnabled(); // disabled command + visibility follows enablement == disposed if (!item.isDisposed() && item.getEnabled() != shouldBeEnabled) { item.setEnabled(shouldBeEnabled); } }
String name = command.getName(); Collection commands = (Collection) commandsByName.get(name);
private String getFilteredCommand() { ParameterizedCommand pCommand = buildParameterizedCommand(); String serializedCommand = pCommand.serialize(); String markupLabel; try { markupLabel = fSelectedCommand.getName(); } catch (NotDefinedException ex) { markupLabel = null; } int index; boolean surroundWithMarkup = false; if (fCCP.getFilterType() == CommandComposerPart.F_FILTER_NOT_SET) { surroundWithMarkup = fSurroundCopyText.getSelection(); index = fFilterCombo.getSelectionIndex(); } else { index = fCCP.getFilterType(); } CommandCopyFilter ccf = CommandCopyFilter.getFilter(index); return ccf.filter(serializedCommand, surroundWithMarkup, markupLabel); }
try { String cmdName = cmd.getName(); if (!cmdName.equals(mCommand.getCommandName())) { mCommand.setCommandName(cmdName);
actionDesc.setLabel(command.getName()); } catch (final NotDefinedException e) {
actionDesc.setLabel(command.getName()); } catch (final NotDefinedException e) {
String logMsgPrefix; try { logMsgPrefix = event.getCommand().getName() + ": "; //$NON-NLS-1$ } catch (NotDefinedException e1) {
if (baseCommand.isDefined()) { try { newName = baseCommand.getName(); } catch (final NotDefinedException e) {
if (command != null) { try { text = command.getCommand().getName(); tooltip = command.getCommand().getDescription(); if (tooltip == null || tooltip.trim().length() == 0) {
ql.label = pc.getCommand().getName();
String commandName1 = Util.ZERO_LENGTH_STRING; try { commandName1 = command1.getName(); categoryName1 = command1.getCategory().getName(); } catch (final NotDefinedException e) { String commandName2 = Util.ZERO_LENGTH_STRING; try { commandName2 = command2.getName(); categoryName2 = command2.getCategory().getName(); } catch (final org.eclipse.core.commands.common.NotDefinedException e) {
command.setElementId(cmd.getId()); command.setCategory(categoryModel); command.setCommandName(cmd.getName()); command.setDescription(cmd.getDescription());
if (command != null) { try { text = command.getCommand().getName(); } catch (NotDefinedException e) { StatusManager.getManager().handle(