Skip to main content



      Home
Home » Eclipse Projects » GEF » Selection in outline view and editor
Selection in outline view and editor [message #162214] Mon, 20 December 2004 11:21 Go to next message
Eclipse UserFriend
Originally posted by: marlu942.student.liu.se

Hi fellow GEFers,

All GEF example applications with an outline view, that I have seen, has
synkronisation beween the outline view and the editor when it comes to
selections.

When I select a entity in the outline view in my application the
property view gets an event and updates but not the editor. And when I
select a entity in the editor the property view gets updated but the
corresponding entity in the outline view is not selected.
Anyone got any idea what the problem might be?

Regards,
Marcus Ludvigson
Re: Selection in outline view and editor [message #162230 is a reply to message #162214] Mon, 20 December 2004 12:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alain.origlia.impika.com

Hi Marcus,

see the OutlinePage inline class of the LogicEditor class (LogicDesigner
example) or the ShapesEditorOutlinePage inline class of the ShapesEditor
class (Shapes example).


"Marcus Ludvigson" <marlu942@student.liu.se> a
Re: Selection in outline view and editor [message #162301 is a reply to message #162230] Mon, 20 December 2004 17:38 Go to previous messageGo to next message
Eclipse UserFriend
In particular, you want to look at the methods hookOutlineViewer() and
unhookOutlineViewer(), where the outline viewer is being added to/removed
from the SelectionSynchronizer.

"Alain Origlia" <alain.origlia@impika.com> wrote in message
news:cq70hf$7n1$1@www.eclipse.org...
> Hi Marcus,
>
> see the OutlinePage inline class of the LogicEditor class (LogicDesigner
> example) or the ShapesEditorOutlinePage inline class of the ShapesEditor
> class (Shapes example).
>
>
> "Marcus Ludvigson" <marlu942@student.liu.se> a
Re: Selection in outline view and editor [message #162657 is a reply to message #162301] Thu, 23 December 2004 03:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marlu942.student.liu.se

Hi,

Unfortunately I have in "public void createControl(Composite parent)":
editor.getSelectionSynchronizer().addViewer(getViewer());
and in dispose():
editor.getSelectionSynchronizer().removeViewer(getViewer());

but still no simultaneous selection in the editor and outline view.

Thank you for your input though. Do you have some advice on how to debug
a issue like this?

Regards,
Marcus Ludvigson

Pratik Shah wrote:

> In particular, you want to look at the methods hookOutlineViewer() and
> unhookOutlineViewer(), where the outline viewer is being added to/removed
> from the SelectionSynchronizer.
>
> "Alain Origlia" <alain.origlia@impika.com> wrote in message
> news:cq70hf$7n1$1@www.eclipse.org...
>
>>Hi Marcus,
>>
>>see the OutlinePage inline class of the LogicEditor class (LogicDesigner
>>example) or the ShapesEditorOutlinePage inline class of the ShapesEditor
>>class (Shapes example).
>>
>>
>>"Marcus Ludvigson" <marlu942@student.liu.se> a écrit dans le message de
>>news:cq6u65$urd$1@www.eclipse.org...
>>
>>>Hi fellow GEFers,
>>>
>>>All GEF example applications with an outline view, that I have seen, has
>>>synkronisation beween the outline view and the editor when it comes to
>>>selections.
>>>
>>>When I select a entity in the outline view in my application the
>>>property view gets an event and updates but not the editor. And when I
>>>select a entity in the editor the property view gets updated but the
>>>corresponding entity in the outline view is not selected.
>>>Anyone got any idea what the problem might be?
>>>
>>>Regards,
>>>Marcus Ludvigson
>>
>>
>
>
Re: Selection in outline view and editor [message #162696 is a reply to message #162657] Thu, 23 December 2004 14:07 Go to previous messageGo to next message
Eclipse UserFriend
Your graphical viewer is being added to the selection synchronizer too,
right? It happens, by default, in GraphicalEditor#hookGraphicalViewer(), so
make sure that you're invoking the super method in case you're overriding
that method. Set a breakpoint in
SelectionSynchronizer#selectionChanged(...) to ensure that both the viewers
have been added and that that method is getting invoked. If everything's
set up right, you can just step into that method to see why the selection is
not synchronized.

"Marcus Ludvigson" <marlu942@student.liu.se> wrote in message
news:cqdujv$pu5$1@www.eclipse.org...
> Hi,
>
> Unfortunately I have in "public void createControl(Composite parent)":
> editor.getSelectionSynchronizer().addViewer(getViewer());
> and in dispose():
> editor.getSelectionSynchronizer().removeViewer(getViewer());
>
> but still no simultaneous selection in the editor and outline view.
>
> Thank you for your input though. Do you have some advice on how to debug
> a issue like this?
>
> Regards,
> Marcus Ludvigson
>
> Pratik Shah wrote:
>
> > In particular, you want to look at the methods hookOutlineViewer() and
> > unhookOutlineViewer(), where the outline viewer is being added
to/removed
> > from the SelectionSynchronizer.
> >
> > "Alain Origlia" <alain.origlia@impika.com> wrote in message
> > news:cq70hf$7n1$1@www.eclipse.org...
> >
> >>Hi Marcus,
> >>
> >>see the OutlinePage inline class of the LogicEditor class (LogicDesigner
> >>example) or the ShapesEditorOutlinePage inline class of the ShapesEditor
> >>class (Shapes example).
> >>
> >>
> >>"Marcus Ludvigson" <marlu942@student.liu.se> a
Re: Selection in outline view and editor [message #162762 is a reply to message #162696] Mon, 27 December 2004 10:26 Go to previous message
Eclipse UserFriend
Originally posted by: marlu942.student.liu.se

Thank you for your help.

I found out that the error layed in the mapping between the different
EditParts. My model does not cache modelchildren because persistence is
done in a DB, so two different getChildren on a model instance results
in different child model instances which made it impossible to map model
to editparts.

A cache, in the outline tree, of model children helped.

Regards,
Marcus Ludvigson


Pratik Shah wrote:

> Your graphical viewer is being added to the selection synchronizer too,
> right? It happens, by default, in GraphicalEditor#hookGraphicalViewer(), so
> make sure that you're invoking the super method in case you're overriding
> that method. Set a breakpoint in
> SelectionSynchronizer#selectionChanged(...) to ensure that both the viewers
> have been added and that that method is getting invoked. If everything's
> set up right, you can just step into that method to see why the selection is
> not synchronized.
>
> "Marcus Ludvigson" <marlu942@student.liu.se> wrote in message
> news:cqdujv$pu5$1@www.eclipse.org...
>
>>Hi,
>>
>>Unfortunately I have in "public void createControl(Composite parent)":
>>editor.getSelectionSynchronizer().addViewer(getViewer());
>>and in dispose():
>> editor.getSelectionSynchronizer().removeViewer(getViewer());
>>
>>but still no simultaneous selection in the editor and outline view.
>>
>>Thank you for your input though. Do you have some advice on how to debug
>> a issue like this?
>>
>>Regards,
>>Marcus Ludvigson
>>
>>Pratik Shah wrote:
>>
>>
>>>In particular, you want to look at the methods hookOutlineViewer() and
>>>unhookOutlineViewer(), where the outline viewer is being added
>
> to/removed
>
>>>from the SelectionSynchronizer.
>>>
>>>"Alain Origlia" <alain.origlia@impika.com> wrote in message
>>>news:cq70hf$7n1$1@www.eclipse.org...
>>>
>>>
>>>>Hi Marcus,
>>>>
>>>>see the OutlinePage inline class of the LogicEditor class (LogicDesigner
>>>>example) or the ShapesEditorOutlinePage inline class of the ShapesEditor
>>>>class (Shapes example).
>>>>
>>>>
>>>>"Marcus Ludvigson" <marlu942@student.liu.se> a écrit dans le message de
>>>>news:cq6u65$urd$1@www.eclipse.org...
>>>>
>>>>
>>>>>Hi fellow GEFers,
>>>>>
>>>>>All GEF example applications with an outline view, that I have seen,
>
> has
>
>>>>>synkronisation beween the outline view and the editor when it comes to
>>>>>selections.
>>>>>
>>>>>When I select a entity in the outline view in my application the
>>>>>property view gets an event and updates but not the editor. And when I
>>>>>select a entity in the editor the property view gets updated but the
>>>>>corresponding entity in the outline view is not selected.
>>>>>Anyone got any idea what the problem might be?
>>>>>
>>>>>Regards,
>>>>>Marcus Ludvigson
>>>>
>>>>
>>>
>
>
Previous Topic:Problem with picture using plugin
Next Topic:GEF Logic Example
Goto Forum:
  


Current Time: Wed Jul 30 17:10:42 EDT 2025

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

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

Back to the top