Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Possible bug with findView
Possible bug with findView [message #337096] Mon, 27 July 2009 13:06 Go to next message
Eclipse UserFriend
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 #452926 is a reply to message #337096] Sat, 01 August 2009 10:29 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Possible bug with findView [message #468059 is a reply to message #452926] Mon, 03 August 2009 15:58 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Text editor synchronization problem
Next Topic:Custom text editor not showing the enable/disable breakpoint menu items in the context menu...
Goto Forum:
  


Current Time: Fri May 02 12:30:34 EDT 2025

Powered by FUDForum. Page generated in 0.03733 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top