private void refreshView() { final Map<CommandGoal, List<CommandImpl>> commandsByGoals = new HashMap<>(); // all predefined command goals must be shown in the view // so populate map by all registered command goals for (CommandGoal goal : goalRegistry.getAllPredefinedGoals()) { commandsByGoals.put(goal, new ArrayList<>()); } commandsByGoals.putAll(commandUtils.groupCommandsByGoal(commandManager.getCommands())); view.setCommands(commandsByGoals); } }