Action newBookmarkAction = new Action(Messages.BookMarkExplorer_BOOKMARK) {
@Override
public void run() {
IStructuredSelection selection = (IStructuredSelection) fViewer.getSelection();
IFolder parent = getParent(selection);
IMark position = (IMark) ((selection.getFirstElement() instanceof IMark) ? selection.getFirstElement() : null);
new NewBookMarkAction(fViewSite.getShell(), parent, position).run(null);
}
@Override
public ImageDescriptor getImageDescriptor() {
return OwlUI.BOOKMARK;
}
};
newBookmarkAction.setId("org.rssowl.ui.actions.NewBookMark"); //$NON-NLS-1$
newBookmarkAction.setActionDefinitionId("org.rssowl.ui.actions.NewBookMark"); //$NON-NLS-1$
newMenu.add(newBookmarkAction);
/* New NewsBin */
Action newNewsBinAction = new Action(Messages.BookMarkExplorer_NEWSBIN) {
@Override
public void run() {
IStructuredSelection selection = (IStructuredSelection) fViewer.getSelection();
IFolder parent = getParent(selection);
IMark position = (IMark) ((selection.getFirstElement() instanceof IMark) ? selection.getFirstElement() : null);
new NewNewsBinAction(fViewSite.getShell(), parent, position).run(null);
}
@Override
public ImageDescriptor getImageDescriptor() {
return OwlUI.NEWSBIN;
}
};
newNewsBinAction.setId("org.rssowl.ui.actions.NewNewsBin"); //$NON-NLS-1$
newNewsBinAction.setActionDefinitionId("org.rssowl.ui.actions.NewNewsBin"); //$NON-NLS-1$
newMenu.add(newNewsBinAction);
/* New Saved Search */
Action newSavedSearchAction = new Action(Messages.BookMarkExplorer_SAVED_SEARCH) {
@Override
public void run() {
IStructuredSelection selection = (IStructuredSelection) fViewer.getSelection();
IFolder parent = getParent(selection);
IMark position = (IMark) ((selection.getFirstElement() instanceof IMark) ? selection.getFirstElement() : null);
new NewSearchMarkAction(fViewSite.getShell(), parent, position).run(null);
}
@Override
public ImageDescriptor getImageDescriptor() {
return OwlUI.SEARCHMARK;
}
};
newSavedSearchAction.setId("org.rssowl.ui.actions.NewSearchMark"); //$NON-NLS-1$
newSavedSearchAction.setActionDefinitionId("org.rssowl.ui.actions.NewSearchMark"); //$NON-NLS-1$
newMenu.add(newSavedSearchAction);
/* New Folder */
newMenu.add(new Separator());
Action newFolderAction = new Action(Messages.BookMarkExplorer_FOLDER) {
@Override
public void run() {
IStructuredSelection selection = (IStructuredSelection) fViewer.getSelection();
IFolder parent = getParent(selection);
IMark position = (IMark) ((selection.getFirstElement() instanceof IMark) ? selection.getFirstElement() : null);
new NewFolderAction(fViewSite.getShell(), parent, position).run(null);
}
@Override
public ImageDescriptor getImageDescriptor() {