UXMessages.getInstance()
.showWarningMessage("Please select a folder to be able to create a child folder");
return;
}
final UXPromptWindow win =
new UXPromptWindow(tree.getContainer().getShell(), "Bookmark Folder", "Please enter the name of new folder!");
win.setOkAction(new UXAbstractAction() {
@Override
public void doAction() {
BookmarkFolder folder = new BookmarkFolder();
folder.setName(win.getInput());
folder.setParent(pFolder);
try {
BookmarkService.instance().save(folder);
pFolder.addFolder(folder);
tree.refresh();
} catch (ServiceException e) {
UXMessages.getInstance().showErrorMessage(e);
} finally {
win.close();
}
}
});
win.open();
}