handlerService.activateHandler("Jampa.newPlaylist", new ActionHandler(newPlaylistAction));
playlistGeneratorAction = new Action(Messages.getString("Menu.Playlists.PlaylistGenerator"), SWT.NONE) {
public void run() {
System.out.println("test2");
PlaylistGeneratorWizard wizard = new PlaylistGeneratorWizard();
WizardDialog wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
wizardDialog.setPageSize(500, 200);
if (wizardDialog.open() == Dialog.OK) {
Controller.getInstance().getPlaylistController().addEmptyPlaylist(wizard.getPlaylistName());
Controller.getInstance().getPlaylistController().addItemToPlaylist(wizard.getPlaylistName(), wizard.getGenerator().getResults(), wizard.getPlay());
new OpenPlaylistAction(wizard.getPlaylistName()).run();
}
}
};
playlistGeneratorAction.setActionDefinitionId("Jampa.playlistGeneratorWizard");
handlerService.activateHandler("Jampa.playlistGeneratorWizard", new ActionHandler(playlistGeneratorAction));
importPlaylistAction = new Action(Messages.getString("Menu.Playlists.ImportPlaylist"), SWT.NONE) {
public void run() {
PlaylistImportWizard wizard = new PlaylistImportWizard();
WizardDialog wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
wizardDialog.setPageSize(500, 100);
if (wizardDialog.open() == Dialog.OK) {
Log.getInstance(MenuController.class).debug("Importing file " + wizard.getFileName() + " to playlist: " + wizard.getPlaylistName()); //$NON-NLS-1$ //$NON-NLS-2$
Controller.getInstance().getPlaylistController().importPlaylist(wizard.getPlaylistName(), wizard.getFileName());
}
}
};
importPlaylistAction.setActionDefinitionId("Jampa.playlistImportWizard");
handlerService.activateHandler("Jampa.playlistImportWizard", new ActionHandler(importPlaylistAction));