Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse RCP let two views communicate

I am currently building a RCP application based on Eclipse. In one of my plugins I am adding two views via code:

    layout.addView("dev.asd.tableviewer.tree", IPageLayout.LEFT, 0.25f, IPageLayout.ID_EDITOR_AREA);
    layout.addView("dev.asd.tableviewer.view", IPageLayout.RIGHT, 0.75f, IPageLayout.ID_EDITOR_AREA);

The first view contains a treeviewer, the second one a tableviewer. Now I want to update the tableviewer's content according to the selection of the treeviewer. My question is, how can I reference the tableviewer from within the treeviewer? Or is there an other way to solve this problem?

like image 758
Coxer Avatar asked Dec 18 '25 17:12

Coxer


1 Answers

Use the SelectionService for this issue. No referencing of views required, see http://www.eclipse.org/articles/Article-WorkbenchSelections/article.html

like image 131
Tom Seidel Avatar answered Dec 24 '25 12:12

Tom Seidel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!