Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Give input to a view
Give input to a view [message #794403] Thu, 09 February 2012 08:41 Go to next message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Hi,

I'm trying to give an input to a view. I'm using views instead of editors because the way they are tied to a perspective.

I'm using the standard way to open a view:

page.showView("id1", "id2", IWorkbenchPage.VIEW_ACTIVATE);


But in this way I can't give an object to this view. With an editor you can give an editorinput.. I'm looking for something similar for views..

Hope someone can help. Thanks in advance.
Re: Give input to a view [message #794473 is a reply to message #794403] Thu, 09 February 2012 10:32 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 09.02.2012 09:41, Ricky de Klerck wrote:
> Hi,
>
> I'm trying to give an input to a view. I'm using views instead of
> editors because the way they are tied to a perspective.
>
> I'm using the standard way to open a view:
>
> page.showView("id1", "id2", IWorkbenchPage.VIEW_ACTIVATE);
>
> But in this way I can't give an object to this view. With an editor
> you can give an editorinput.. I'm looking for something similar for
> views..
There isn't. You'd have to implement something like setInput(...) in
your own view.

Dani
>
> Hope someone can help. Thanks in advance.
Re: Give input to a view [message #794570 is a reply to message #794473] Thu, 09 February 2012 13:03 Go to previous message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Thanks for your answer.

I found a way to set an input to the view. I opened (and activated) the view and retrieved the view by calling: page.getActivePart(). I then set the input and because I use databinding all works perfectly.

When someone has a better solution I'm glad to here it.
Previous Topic:Solutions for fine-grained extensibility in RCP applications?
Next Topic:Grouping Problems in Problem View
Goto Forum:
  


Current Time: Thu Apr 25 19:42:22 GMT 2024

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

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

Back to the top