Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Hooking a Table View with Graphical Editor
Hooking a Table View with Graphical Editor [message #222743] Tue, 12 September 2006 09:04 Go to next message
Eclipse UserFriend
Originally posted by: rajakididi.hotmail.com

Hey everyone !

I am working on a view which will show information in a tabular form. The
information is getting displayed properly. I am able to create a Table in
the view having required columns and rows populated with the required data.

Now the problem is, I want to hook this view with the Graphical Editor in
focus i.e. the active editor, in the same way how Outline View works. So
the contents of the table should get modified according to the Active
Editor.

I am not able to get the same effect on the Table View I have. My Table
View is just a simple code creating a Table widget and 'n' TableItems.
There is no TableViewer attached with the view and it is based on
PageBookView and Page.

Can anyone please tell me where am I doing a mistake and what other
functionality should I implemenet along with the ones that I already have.

Thanks & Regards,
Krum
Re: Hooking a Table View with Graphical Editor [message #222753 is a reply to message #222743] Tue, 12 September 2006 11:55 Go to previous messageGo to next message
Hans Mueller-Dieckert is currently offline Hans Mueller-DieckertFriend
Messages: 32
Registered: July 2009
Member
Hi,

maybe instead of writing your own view, you could use the properties view.

But if you want to write your own view, you need to do the following in
order to make your view react on selections in the active WorkbenchPart:

1) make your editor register a SelectionProvider. (I think this is
already done by GEF):

getSite().setSelectionProvider(provider)

2) register your view as SelectionListener to the Workbench:

getSite().getPage().addSelectionListener(this);

Now your View gets informed about selection changes in the graphical
editor (as well as in other WorkbenchParts).

Maybe the following two articles can help you too:

http://www.eclipse.org/articles/Article-WorkbenchSelections/ article.html
http://www-128.ibm.com/developerworks/opensource/library/os- ecllink/

greetings,
Hans

Krum schrieb:
> Hey everyone !
>
> I am working on a view which will show information in a tabular form.
> The information is getting displayed properly. I am able to create a
> Table in the view having required columns and rows populated with the
> required data.
>
> Now the problem is, I want to hook this view with the Graphical Editor
> in focus i.e. the active editor, in the same way how Outline View works.
> So the contents of the table should get modified according to the Active
> Editor.
>
> I am not able to get the same effect on the Table View I have. My Table
> View is just a simple code creating a Table widget and 'n' TableItems.
> There is no TableViewer attached with the view and it is based on
> PageBookView and Page.
>
> Can anyone please tell me where am I doing a mistake and what other
> functionality should I implemenet along with the ones that I already have.
>
> Thanks & Regards,
> Krum
>
Re: Hooking a Table View with Graphical Editor [message #222760 is a reply to message #222753] Tue, 12 September 2006 12:51 Go to previous message
Eclipse UserFriend
Originally posted by: rajakididi.hotmail.com

Hey

Thanks a lot for the help. I will go through the links and will try to
give it a shot.

Other suggestions are also welcome. :)

Thanks again !
Krum
Previous Topic:Inverted Y in XYLayout
Next Topic:getting current page index from MultiPageEditorPart
Goto Forum:
  


Current Time: Fri Apr 26 00:59:50 GMT 2024

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

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

Back to the top