@Override protected void initialize() { String goal = editedCommand.getGoal(); initialGoal = isNullOrEmpty(goal) ? goalRegistry.getDefaultGoal().getId() : goal; view.setAvailableGoals(goalRegistry.getAllGoals()); view.setGoal(initialGoal); }
/** Set the specified goal name for the currently edited command. */ private void setGoal(String goalName) { editedCommand.setGoal(goalName); Set<CommandGoal> allGoals = goalRegistry.getAllGoals(); allGoals.add(goalRegistry.getGoalForId(goalName)); view.setAvailableGoals(allGoals); view.setGoal(goalName); notifyDirtyStateChanged(); }
final String newGoalName = value.trim(); final Set<CommandGoal> allGoals = goalRegistry.getAllGoals();