Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to notify other view?
How to notify other view? [message #445962] Sat, 11 March 2006 17:23 Go to next message
Lukas Zapletal is currently offline Lukas Zapletal
Messages: 44
Registered: July 2009
Member
Hello,

I have a view with a Tree and other view with a Property Sheet. When a
user double click on an object in the tree, I want to load the object
properties in the Sheet.

How to get a reference to the Sheet view?

Should I notify the Sheet view directly (with a method call), using my
own listener mechanism or should I use an action?

Thank you for help

--
Best regards,
Lukas Zapletal
Re: How to notify other view? [message #445963 is a reply to message #445962] Sat, 11 March 2006 17:33 Go to previous messageGo to next message
James Leotta is currently offline James Leotta
Messages: 203
Registered: July 2009
Senior Member
Hello Lukas,

imlement ISelectionListener in the view with the property and add
getSite().setSelectionProvider(treeViewer);
to your createpartcontrol of your view with the tree.


Lukas Zapletal wrote:
> Hello,
>
> I have a view with a Tree and other view with a Property Sheet. When a
> user double click on an object in the tree, I want to load the object
> properties in the Sheet.
>
> How to get a reference to the Sheet view?
>
> Should I notify the Sheet view directly (with a method call), using my
> own listener mechanism or should I use an action?
>
> Thank you for help
>
Re: How to notify other view? [message #445966 is a reply to message #445963] Sat, 11 March 2006 18:09 Go to previous messageGo to next message
Lukas Zapletal is currently offline Lukas Zapletal
Messages: 44
Registered: July 2009
Member
Dne Sat, 11 Mar 2006 12:33:51 -0500
James Leotta <jleotta@bascom.com> napsal(a):

> imlement ISelectionListener in the view with the property and add
> getSite().setSelectionProvider(treeViewer);
> to your createpartcontrol of your view with the tree.

But I do not have a reference to treeViewer in the createPartControl
method. Is there any standard way to get it?

--
Best regards,
Lukas Zapletal
Re: How to notify other view? [message #445967 is a reply to message #445966] Sat, 11 March 2006 18:25 Go to previous messageGo to next message
James Leotta is currently offline James Leotta
Messages: 203
Registered: July 2009
Senior Member
Where ever your tree is defined.

Lukas Zapletal wrote:
> Dne Sat, 11 Mar 2006 12:33:51 -0500
> James Leotta <jleotta@bascom.com> napsal(a):
>
>> imlement ISelectionListener in the view with the property and add
>> getSite().setSelectionProvider(treeViewer);
>> to your createpartcontrol of your view with the tree.
>
> But I do not have a reference to treeViewer in the createPartControl
> method. Is there any standard way to get it?
>
Re: How to notify other view? [message #445970 is a reply to message #445967] Sat, 11 March 2006 20:57 Go to previous messageGo to next message
Lukas Zapletal is currently offline Lukas Zapletal
Messages: 44
Registered: July 2009
Member
Dne Sat, 11 Mar 2006 13:25:53 -0500
James Leotta <jleotta@bascom.com> napsal(a):

> Where ever your tree is defined.
>
> >> imlement ISelectionListener in the view with the property and add
> >> getSite().setSelectionProvider(treeViewer);
> >> to your createpartcontrol of your view with the tree.

Oh I wrote treeView? I thought you meant

getSite().setSelectionProvider(sheetViewer);

and I have no reference to the sheetViewer.

ps - does it mean I have to create a class (say PropertyView) extending
the ViewPart?

--
Best regards,
Lukas Zapletal
Re: How to notify other view? [message #445972 is a reply to message #445970] Sat, 11 March 2006 21:30 Go to previous messageGo to next message
James Leotta is currently offline James Leotta
Messages: 203
Registered: July 2009
Senior Member
I thought you already did have a view with the Tree in it?
Creating the view extending viewpart is the only way I know.


Lukas Zapletal wrote:
> Dne Sat, 11 Mar 2006 13:25:53 -0500
> James Leotta <jleotta@bascom.com> napsal(a):
>
>> Where ever your tree is defined.
>>
>>>> imlement ISelectionListener in the view with the property and add
>>>> getSite().setSelectionProvider(treeViewer);
>>>> to your createpartcontrol of your view with the tree.
>
> Oh I wrote treeView? I thought you meant
>
> getSite().setSelectionProvider(sheetViewer);
>
> and I have no reference to the sheetViewer.
>
> ps - does it mean I have to create a class (say PropertyView) extending
> the ViewPart?
>
> --
> Best regards,
> Lukas Zapletal
Re: How to notify other view? [message #445973 is a reply to message #445962] Sat, 11 March 2006 21:42 Go to previous message
Cristi Angheluta is currently offline Cristi Angheluta
Messages: 25
Registered: July 2009
Junior Member
Take a look at this tutorial

"Make your Eclipse applications richer with view linking":
http://www.ibm.com/developerworks/opensource/library/os-ecll ink/

it might help you.

Best regards,
Cristinel Angheluta


On Sat, 11 Mar 2006 19:23:44 +0200, Lukas Zapletal =

<lukas.zapletal@linuxexpres.cz> wrote:

> Hello,
>
> I have a view with a Tree and other view with a Property Sheet. When a=

> user double click on an object in the tree, I want to load the object
> properties in the Sheet.
>
> How to get a reference to the Sheet view?
>
> Should I notify the Sheet view directly (with a method call), using my=

> own listener mechanism or should I use an action?
>
> Thank you for help
>



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:3.1 jar bundle classloading vs. 3.0 folder bundles
Next Topic:test
Goto Forum:
  


Current Time: Wed Sep 17 09:39:13 GMT 2014

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

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