| 
| Open View, and bring it to front? [message #301183] | Fri, 24 March 2006 10:12  |  | 
| Eclipse User  |  |  |  |  | R3.1.1, WinXP 
 To open a view I know how to do:
 
 PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().showView() ...
 
 But if the user has previously "tabbed" (or whatever is the correct term) the view in question
 behind another View, this does *not* bring the view to the front. I've tried showView(ID_VIEW),
 showView(ID_VIEW, null, IWorkbenchPage.VIEW_ACTIVATE), and showView(ID_VIEW, null,
 IWorkbenchPage.VIEW_VISIBLE). (My view does not allow multiple instances.)
 
 There does not seem to be a method in IViewPart that would be relevant.
 
 Have I missed something, or is this an oversight by Eclipse, or just a bug?
 
 thanks,
 Paul
 |  |  |  | 
|  | 
|  | 
| 
| Re: Open View, and bring it to front? [message #301216 is a reply to message #301205] | Fri, 24 March 2006 14:24  |  | 
| Eclipse User  |  |  |  |  | Paul Keyser wrote: > Doh on me: I was first calling findView(ID), and *only* calling
 > showView(ID) if the findView() returned null -- i.e., I had
 > misunderstood the intent of the two methods, thinking that a null return
 > from findView() meant that the View needed to be opened or made visible,
 
 Actually, findView(*) will return the IViewPart if the view is currently
 open (visible or not).
 
 showView(*) for all intents and purposes does a findView(*), and if the
 view is in the page does an activate(part) ... if the findView(*)
 returned null, then it actually tries to create the view.
 
 Later,
 PW
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.05613 seconds