MultiPageEditor & GEF [message #196622] |
Fri, 23 September 2005 13: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
|
|
|
|
Re: MultiPageEditor & GEF [message #196715 is a reply to message #196638] |
Fri, 23 September 2005 18:47 |
Eclipse User |
|
|
|
Originally posted by: zx.us.ibm.com
Randy Hudson wrote:
> MultiPageEditor[Part] creates more problems than it solves.
>
>
As Randy says... MPE's are evil.
Take a look at the UMLX project for an example of a GEF editor using MPEs.
I actually rewrote a recent implementation of an MPE based GEF editor
because it was much easier to manage just using different editors than
the damn editor pages. It cleaned up the code quite a bit.
Cheers,
~ Chris
|
|
|
Re: MultiPageEditor & GEF [message #196729 is a reply to message #196715] |
Sat, 24 September 2005 17:18 |
Eclipse User |
|
|
|
Originally posted by: radicr.killspam.eunet.yu
Ok guys, thank for the thoughts.
I give up MPE and i will think of some solution.
Radovan
"Chris Aniszczyk" <zx@us.ibm.com> wrote in message
news:dh1ijk$8s9$1@news.eclipse.org...
> Randy Hudson wrote:
> > MultiPageEditor[Part] creates more problems than it solves.
> >
> >
>
> As Randy says... MPE's are evil.
>
> Take a look at the UMLX project for an example of a GEF editor using MPEs.
>
> I actually rewrote a recent implementation of an MPE based GEF editor
> because it was much easier to manage just using different editors than
> the damn editor pages. It cleaned up the code quite a bit.
>
> Cheers,
>
> ~ Chris
|
|
|
|
Powered by
FUDForum. Page generated in 0.03133 seconds