Home » Eclipse Projects » Eclipse Platform » Open View, and bring it to front?
Open View, and bring it to front? [message #301183] |
Fri, 24 March 2006 15:12 |
Paul E. Keyser Messages: 878 Registered: July 2009 |
Senior Member |
|
|
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 19:24 |
|
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
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
Goto Forum:
Current Time: Sat Jan 04 23:08:59 GMT 2025
Powered by FUDForum. Page generated in 0.03618 seconds
|