Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » outiline view
outiline view [message #172642] Mon, 21 March 2005 11:25 Go to next message
Eclipse UserFriend
Originally posted by: sidus68.yahoo.com

hi! I am working on a graphical editor where each form contains one or
more panels, and each panel contains controls (label, text fields,
checkboxes, etc.). I have an outline view which displays the hierarchy,
for example:

- panel1
| |
| --- group1
| | |
| | --- label 1
| |
| --- lable2
|
+ panel2

because the panels may overlap, I would like to only show the currently
selected panel in the editor, i.e. when a panel or control is selected in
the outline view, hide all other panels in the editor. So, my tree edit
parts implement the ISelectionChangedListener interface and I assume I
would need to register the edit parts with the ContentOutlinePage as a
ISelectionProvider? If so, how do I access my graphical editor subclass
(which contains the ContentOutlinePage subclass) from my tree edit part to
add it as a listener?

kind regards.
Re: outiline view [message #172725 is a reply to message #172642] Mon, 21 March 2005 16:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The TreeViewer should be the selection provider for the selection service in
the workbench. The editparts are the items which are actually selected.

You can tie the outline and editor together via the selectionservice, which
spans across every part in the workbench window. See
editorsite.getSelectionService.

"Sidney Lee" <sidus68@yahoo.com> wrote in message
news:de982e5cf03801f74d6b20c01960e228$1@www.eclipse.org...
> hi! I am working on a graphical editor where each form contains one or
> more panels, and each panel contains controls (label, text fields,
> checkboxes, etc.). I have an outline view which displays the hierarchy,
> for example:
>
> - panel1
> | |
> | --- group1
> | | |
> | | --- label 1
> | |
> | --- lable2
> |
> + panel2
>
> because the panels may overlap, I would like to only show the currently
> selected panel in the editor, i.e. when a panel or control is selected in
> the outline view, hide all other panels in the editor. So, my tree edit
> parts implement the ISelectionChangedListener interface and I assume I
> would need to register the edit parts with the ContentOutlinePage as a
> ISelectionProvider? If so, how do I access my graphical editor subclass
> (which contains the ContentOutlinePage subclass) from my tree edit part to
> add it as a listener?
>
> kind regards.
>
re: outiline view [message #172945 is a reply to message #172725] Tue, 22 March 2005 10:48 Go to previous message
Eclipse UserFriend
Originally posted by: sidus68.yahoo.com

thanks v. much!

one question though: would an alternative solution - to install an edit
policy for my AbstractTreeEditPart subclass using
EditPolicy.SELECTION_FEEDBACK_ROLE and subclass the SelectionEditPolicy,
where showSelection() and hideSelection() show/hide the the relevant
panels - be feasible too?
Previous Topic:add a menu entry
Next Topic:editor background color
Goto Forum:
  


Current Time: Thu Sep 26 07:54:06 GMT 2024

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

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

Back to the top