MultiPageEditor & GEF [message #196622] |
Fri, 23 September 2005 09:42  |
Eclipse User |
|
|
|
Originally posted by: radicr.stop.spam.gmail.com
Hi all,
I am eclipse and gef newbie, but with the help of this ng and google i
managed to create my first gef editor. It is not perfect though, but it will
get better.
Now i need to implement MultiPageEditor (or at least i think so) and i am
facing some problems.
First, i created multipage editor with just one page containing above
mentioned GEF editor, and it looks ok. Only problem is that i cant get the
ContextMenu from the GEF, and undo redo actions cant be executed. It could
be problem with this
public Object getAdapter(Class type) {
if (getActiveEditor() != null && getActiveEditor() instanceof
BuildingEditor) {
// BuildingEditor is GEF
BuildingEditor editor = (BuildingEditor)getActiveEditor();
return editor.getAdapter(type);
}
return super.getAdapter(type);
}
that is how i obtained PaletteLayout and PropertySheet, but i think it is
wrong. What is appropriate way to implement multipageeditor with gef?
Bigger problem is that i now need second page to add to multi page editor.
Object of editing in second editor is contained in the object edited in the
first editor (BuildingEditor). There is a map of one of the floors in the
building. I need to open it, edit and save returning to the main building
editor. Maybe i should initialize another editor with getEditorInput() from
first editor. Or maybe better solution would be to implement Dialog (modal)
for editing floor map?
Any help appreciated (if i was not too much confusing!)
--
Pozdrav,
Radovan
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04949 seconds