private void onOpen(IBookMark bookmark, INews news, MouseEvent e) {
/* Open Link in Browser if Modifier Key is pressed */
if ((e.stateMask & SWT.MOD1) != 0) {
new OpenInBrowserAction(new StructuredSelection(news)).run();
close();
return;
}
/* Otherwise open Feedview and select the News */
IWorkbenchPage page = OwlUI.getPage();
if (page != null) {
Shell shell = page.getWorkbenchWindow().getShell();
/* Restore from Tray or Minimization if required */
ApplicationWorkbenchWindowAdvisor advisor = ApplicationWorkbenchAdvisor.fgPrimaryApplicationWorkbenchWindowAdvisor;
if (advisor != null && advisor.isMinimizedToTray())
advisor.restoreFromTray(shell);
else if (shell.getMinimized()) {
shell.setMinimized(false);
shell.forceActive();
}
/* First try if the Bookmark is already visible */
IEditorReference editorRef = EditorUtils.findEditor(page.getEditorReferences(), bookmark);
if (editorRef != null) {
IEditorPart editor = editorRef.getEditor(false);
if (editor instanceof FeedView) {
((FeedView) editor).setSelection(new StructuredSelection(news));
page.activate(editor);
}
}
/* Otherwise Open */