protected CommandResult handleYes(CommandContext context, Selection selection, Object input) { return new NotificationResult(context).setMessage("Yes!"); }
@Override protected CommandResult execute(CommandContext context, SelectionItem parent) { return new BatchResult( new RefreshListResult(), new NotificationResult(context, this) .setDefaultMessage("The list has been refreshed.")); }
public CommandResult execute(CommandContext context, Selection selection) { sessionFactory.getStatistics().clear(); return new BatchResult( new RefreshListResult(), new NotificationResult(context, this) .setDefaultMessage("The baseline has been cleared.")); } }
public CommandResult execute(CommandContext context, Selection selection) { Clipboard.get(context).set(context.getScreen(), selection, this); return new BatchResult( new UpdateCommandsResult(), new NotificationResult(context, this) .setArgs(selection.size()) .setDefaultMessage("{0,choice,1#Item|1<{0} items} put into the clipboard")); }
public CommandResult execute(CommandContext context, Selection selection) { Clipboard.get(context).set(context.getScreen(), selection, this); return new BatchResult( new UpdateCommandsResult(), new NotificationResult(context, this) .setArgs(selection.size()) .setDefaultMessage("{0,choice,1#Item|1<{0} items} put into the clipboard")); }
@Override protected CommandResult handleYes(CommandContext context, Selection selection, Object input) { Object[] args = getArgs(context, selection); for (SelectionItem item : selection) { context.getScreen().getDao().delete(item.getObject(), context.getParent()); } return new BatchResult( new RefreshListResult(), new NotificationResult(context, this) .setDefaultMessage("{0,choice,1#Item \"{1}\"|1<{0} items} successfully deleted.") .setArgs(args)); }
@Override public CommandResult execute(CommandContext context, SelectionItem parent) { NotificationResult notification = new NotificationResult(context, this) .setDefaultMessage("{0,choice,1#One item has|1<{0} items have} been pasted."); Clipboard.get(context).paste(context, parent, notification); return new BatchResult( notification, new RefreshListResult(parent.getObjectId()).refreshAll()); }