Possible bug with findView [message #337096] |
Mon, 27 July 2009 13:06  |
Eclipse User |
|
|
|
Eclipse 3.4.1
For views created with secondaryid's, I can call on the active page:
findView(viewID);
findViewReference(viewID);
findViewReference(viewID, secondaryID);
It seems like an inconsistency in the API to not be able to call
something like findView(viewID, secondaryID)?
Additionally, in the part listener events an IWorkbenchPart is passed
in but it is not clear that it's possible to get a view from this when it
was created with a secondaryID?
|
|
|
|
Re: Possible bug with findView [message #468059 is a reply to message #452926] |
Mon, 03 August 2009 15:58  |
Eclipse User |
|
|
|
On Sat, 01 Aug 2009 10:29:04 -0400, Paul Webster wrote:
> findView only supports primary IDs. You have to use
> findViewReference("id", "secondaryId").
>
> You then use ref.getPart(false) if you don't necessarily want the part
> instantiated, and ref.getPart(true) if you want to force instantiation.
>
> re:listener ... If you have an IWorkbenchPart that's a view, you can ask
> it for the IViewSite which will return the secondary ID.
>
> PW
If findView can't handle sedcondaryid's I guess that's ok.
Thanks for the tip, it's cleaner than what I'd come up with.
|
|
|
Powered by
FUDForum. Page generated in 0.03733 seconds