[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [gef-dev] Wrapping GraphicalEditor inside another EditorPart
|
Randy-
I am
using a GraphicalEditorWithPalette inside a MultiPageEditorPart and noticed
problems with the selection actions.
Can
you go into more detail in what you mean by misusing GraphicalEditor in
this way (wrapping the editor in another editor part). What is the
recommended way to use GraphicalEditor? And what do you mean that "a
workbench part is not a convenient unit for composition."
Thanks,
Erik
-----Original Message-----
From: gef-dev-admin@xxxxxxxxxxx
[mailto:gef-dev-admin@xxxxxxxxxxx]On Behalf Of Randy
Hudson
Sent: Wednesday, December 03, 2003 8:20 AM
To:
gef-dev@xxxxxxxxxxx
Subject: [gef-dev] Wrapping GraphicalEditor inside
another EditorPart
In GEF 2.1.2, we fixed a bug
which required us to check whether an editor was currently active when it
received selection notification from the SelectionService. The do this
is to call getSite().getPage().getActiveEditor() == this.
If you are composing/wrapping GraphicalEditor or
GraphicalEditorWithPalette inside another EditorPart (such as
MultiPageEditorPart), then GraphicalEditor will never think that it is active,
and none of your SelectionActions will work.
If you are (mis)using GraphicalEditor in this way, the
hack to avoid this problem is to subclass it and override
selectionChanged(...) to call:
updateActions(getSelectionActions());
whenever your wrappered editor is active.
We have made an effort to put as little as possible in
GraphicalEditor in hopes that people would not feel obligated to reuse it.
We have done this intentionally because a workbench part is not a
convenient unit for composition.
Randy Hudson