public String getName() { return "NakedObjectAction " + action.getName(); } });
public String getName() { return "Preparing action " + action.getName(); } });
private DialoggedObjectOption(final NakedObjectAction action, final NakedObject target) { super(action, target, action.getName() + "..."); }
public String getName() { return action.getName(); }
private ImmediateObjectOption(final NakedObjectAction action, final NakedObject target) { super(action, target, action.getName()); }
private Consent canDropOntoObject(final NakedObject target, final NakedObject source) { final NakedObjectAction action = dropAction(source, target); if (action != null) { final Consent parameterSetValid = action.isProposedArgumentSetValid(target, new NakedObject[] { source }); parameterSetValid.setDescription("Execute '" + action.getName() + "' with " + source.titleString()); return parameterSetValid; } else { return setFieldOfMatchingType(target, source); } }
public Consent canDrop(final Content sourceContent) { NakedObjectAction action = actionFor(sourceContent); if (action == null) { return Veto.DEFAULT; } else { NakedObject source = sourceContent.getNaked(); final Consent parameterSetValid = action.isProposedArgumentSetValid(adapter, new NakedObject[] { source }); parameterSetValid.setDescription("Execute '" + action.getName() + "' with " + source.titleString()); return parameterSetValid; } }
for (int j = 0; j < actions.length; j++) { final NakedObjectAction action = actions[j]; final String name = action.getName(); Component menuItem = null; if (action.getActions().length > 0) { final String consentReason = consent.getReason(); menuItem = context.getComponentFactory().createMenuItem( actionId, action.getName(), action.getDescription(), consentReason, action.getType(), collectParameters, targetObjectId);
for (int j = 0; j < actions.length; j++) { final NakedObjectAction action = actions[j]; final String name = action.getName(); Component menuItem = null; if (action.getActions().length > 0) { final String consentReason = consent.getReason(); menuItem = context.getComponentFactory().createMenuItem( actionId, action.getName(), action.getDescription(), consentReason, action.getType(), collectParameters, targetObjectId);
private static void menuOptions(final NakedObjectAction[] actions, final NakedObject target, final UserActionSet menuOptionSet) { for (int i = 0; i < actions.length; i++) { UserAction option = null; if (actions[i].getActions().length > 0) { option = new UserActionSet(actions[i].getName(), menuOptionSet); menuOptions(actions[i].getActions(), target, (UserActionSet) option); } else { final int noOfParameters = actions[i].getParameterCount(); if (noOfParameters == 0) { option = ImmediateObjectOption.createOption(actions[i], target); } else if (actions[i].isContributed() && noOfParameters == 1 && target != null && target.getSpecification().isOfType(actions[i].getParameters()[0].getSpecification())) { option = ImmediateObjectOption.createServiceOption(actions[i], target); } else { option = DialoggedObjectOption.createOption(actions[i], target); } } if (option != null) { menuOptionSet.add(option); } } } }
protected MethodTask(final Context context, final NakedObject target, final NakedObjectAction action) { super(context, action.getName(), action.getDescription(), target, action.getParameterCount()); this.action = action;
protected MethodTask(final Context context, final NakedObject target, final NakedObjectAction action) { super(context, action.getName(), action.getDescription(), target, action.getParameterCount()); this.action = action;