[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Views Interaction

Swetha wrote:
Hi All,

I am new to the Eclipse RCP...Please help in me regarding the interaction f views

I am creating two views in a single perspective..one is Tree (SWT) and another view is Table(SWT)..Selection of a tree node should notify the other views like (Table) as I want to display the contents of tree node into the table...
SO I am using IselectionProvider and Listener concept....


  Please throw some light on how to implement this....

Thanks in advance

to be selection listener you should implement ISelectionListener interface and add your view to listeners pool using
addSelectionListener (i do that in createPartControl method):
getSite().getPage().addSelectionListener(this);


or using two parameters version of this method.


to be selection provider you should use

setSelectionProvider from IViewPart interface
getViewSite().setSelectionProvider(yourViewer)


bartosz michalik