actions = Lists.newArrayList();
defaultAction = createActions(types, defaultType);
}
private ApplicationAction createActions(Iterable<EntityType> types, EntityType defaultType) {
ApplicationAction defaultAction = null;
List<EntityType> typesInOrder = sort(types);
for (EntityType type : typesInOrder) {
if (type == null) {
actions.add(null);
} else if (type == EntityType.Project) {
ApplicationAction action = new NewProjectAction(view.getWindow(), view.getProjectManager());
actions.add(action);
} else {
InterchangeActionFactory f = InterchangeActionFactory.getNewEntityFactory(type);
ApplicationAction a = f.get(view);
if (a != null) {
actions.add(a);
if (type == defaultType) {
defaultAction = a;
}