There are 2 code examples for org.eclipse.ui.IViewReference.
The API names are highlighted below.
You can use
button
to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.
Project Name: rssowl.ui Package: org.rssowl.ui.internal
Source Code: OwlUI.java (Click to view .java file)
Method Code:
/**
* Attempts to find the opened <code>BookMarkExplorer</code> from the
* PlatformUI facade. Otherwise, returns <code>NULL</code> if none.
* @return the <code>BookMarkExplorer</code> from the PlatformUI facade or
* <code>NULL</code> if not opened.
*/
public static BookMarkExplorer getOpenedBookMarkExplorer(){
IWorkbenchPage page=getPage();
if (page != null) {
IViewReference[] viewReferences=page.getViewReferences();
for ( IViewReference viewRef : viewReferences) {
if (viewRef.getId().equals(BookMarkExplorer.VIEW_ID)) {
IViewPart view=viewRef.getView(true);
if (view instanceof BookMarkExplorer) return (BookMarkExplorer)view;
}
}
}
return null;
}
Project Name: rssowl.ui Package: org.rssowl.ui.internal
Source Code: OwlUI.java (Click to view .java file)
Method Code:
/**
* Attempts to find the opened <code>BookMarkExplorer</code> from the
* PlatformUI facade. Otherwise, returns <code>NULL</code> if none.
* @return the <code>BookMarkExplorer</code> from the PlatformUI facade or
* <code>NULL</code> if not opened.
*/
public static BookMarkExplorer getOpenedBookMarkExplorer(){
IWorkbenchPage page=getPage();
if (page != null) {
IViewReference[] viewReferences=page.getViewReferences();
for ( IViewReference viewRef : viewReferences) {
if (viewRef.getId().equals(BookMarkExplorer.VIEW_ID)) {
IViewPart view=viewRef.getView(true);
if (view instanceof BookMarkExplorer) return (BookMarkExplorer)view;
}
}
}
return null;
}