Entry<Command, String> entry = enabledCommands.entrySet().iterator().next();
final Command command = entry.getKey();
String viewerName = entry.getValue();
- addCommand(uuid, command, String.format(Messages.CdmViewerContextMenu_OPEN, viewerName), items);
+ addCommand(uuid, command, String.format(Messages.CdmViewerContextMenu_OPEN, viewerName));
}
else if(enabledCommands.size()>1){
MMenu menu = MMenuFactory.INSTANCE.createMenu();
for(Entry<Command, String> entry:enabledCommands.entrySet()){
String viewerName = entry.getValue();
Command command = entry.getKey();
- menu.getChildren().add(addCommand(uuid, command, viewerName, items));
+ menu.getChildren().add(addCommand(uuid, command, viewerName));
}
}
}
- public MHandledMenuItem addCommand(UUID uuid, Command command, String commandLabel, List<MMenuElement> items) {
+ public MHandledMenuItem addCommand(UUID uuid, Command command, String commandLabel) {
MHandledMenuItem menuItem = MMenuFactory.INSTANCE.createHandledMenuItem();
menuItem.setLabel(commandLabel);
MCommand mCommand = MCommandsFactory.INSTANCE.createCommand();