[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Finding the active IViewReference in an IViewPart

I'm trying to find a way to get the active IViewReference from a
IViewPart when the IViewReference gets selected.  I've been trying to
work with the IPartListener2 interface to trap the selection on a
partActivated() even for an IViewPart, but I'm not sure if this is the
way to go.

The problem is that the IPartListener2.partActivated() event will trap
the selected (activated) IViewReference when you click on it, but the
IPartListener2.partActivated() will also fire for every IViewReferences
thatis currently opened for an IViewPart.  In other words, if the first
of ten active IViewReferences in an IViewPart is selected, then
partActivated() will fire ten times with the same results
(i.e. the first IViewReference is now active).

Is there better way of doing this?

Thanks in advance.
DW