Separate GEF view with separate selection [message #234221] |
Wed, 16 May 2007 12:17 |
Eclipse User |
|
|
|
Originally posted by: msched.msched.no-ip.org
Hi!
We're writing a graphical editor with outline view which basically shows
some text and images (roughly like a word processor). In addition to
these "content elements", our model also includes styles, which are
displayed in a separate view, somewhat similar to the outline view. The
style view is also GEF-based, i.e. we take the model instances from our
model tree and create matching edit parts which contribute to the tree
control in the view.
Our problem is that this view should have a selection independent from that
of the "main editor" (i.e. graphical viewer and outline view). We have to
be able to select content in the editor and at the same time select a style
in the style view. All normal editor actions should always use the editor's
selection, while the view's actions should refer to the view's own actions.
Also, we will have an "apply style" action which is basically a
SelectionAction in the main editor, but also aware of the selection in the
style view. I expect we might have to manually write the code to access the
style view in this case, but how should we go about handling the style
view's separate selection in the first place? For example, even when we
don't hook up the style view to the edit domain's selection synchronizer,
our editor actions still get updated when the focus switches to the style
view (and the style view's root edit part is reported as the current
selection, whereas we need the actions to still be tied to the main
editor's selection).
Thanks in advance,
Marian.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02461 seconds