firePropertyChange & MultiPageEditor (EMF/GEF) [message #242485] |
Mon, 21 April 2008 15:06 |
Eclipse User |
|
|
|
Originally posted by: j4r0d.hotmail.com
Hi,
I'm here for your help because I'm facing a weird problem regarding the
firePropertyChange feature.
My plugin is a MultiPageEditorPart showing two different sub-editors (with
also different domains). Both sub-editors are based around an EMF generated
model. One of those sub-editors is a modified version of a (EMF) generated
editor. The other sub-editor is simply a GEF based editor representing the
model.
I'm calling firePropertyChange(IEditorPart.PROP_DIRTY) anytime there is a
change in the commandStack of both domains in order to update the dirty
state of the whole editor.
When I am doing some operations in the EMF "generated" editor (drag and drop
etc..), the stack seems to work fine (undo/redo are available and okay).
But, when I switch to the other tab (GEF editor), if I simply move an
EditPart and then I switch back to the previous tab, I can't get my
undo/redo action to work (greyed). My BasicCommandStack isSaveNeeded() still
sends true, but no undo/redo possible!
I'm only having this problem with the EMF editor, the GEF editor is always
working fine.
I noticed that this problem only happens when I'm calling for the
firePropertyChange method.
Do you have an idea for this problem? Am I simply missing something?
Thanks for your help,
--
J.
"Music for a while"
|
|
|
Re: firePropertyChange & MultiPageEditor (EMF/GEF) [message #242510 is a reply to message #242485] |
Wed, 23 April 2008 08:00 |
Eclipse User |
|
|
|
Originally posted by: j4r0d.hotmail.com
I've found a solution and honestly I'm not sure why it's working now...
Adding the following code to my pageChange() method (MultiPageEditorPart)
seems to solve my problem.
getActionBarContributor().update();
The weird thing is that this was already done in the ActionBarContributor
(EditingDomainActionBarContributor) with the appropriate actions.
--
J.
"Jarod Mills" <j4r0d@hotmail.com> wrote in message
news:fuiapu$3an$1@build.eclipse.org...
> Hi,
>
> I'm here for your help because I'm facing a weird problem regarding the
> firePropertyChange feature.
> My plugin is a MultiPageEditorPart showing two different sub-editors (with
> also different domains). Both sub-editors are based around an EMF
> generated model. One of those sub-editors is a modified version of a (EMF)
> generated editor. The other sub-editor is simply a GEF based editor
> representing the model.
> I'm calling firePropertyChange(IEditorPart.PROP_DIRTY) anytime there is a
> change in the commandStack of both domains in order to update the dirty
> state of the whole editor.
>
> When I am doing some operations in the EMF "generated" editor (drag and
> drop etc..), the stack seems to work fine (undo/redo are available and
> okay). But, when I switch to the other tab (GEF editor), if I simply move
> an EditPart and then I switch back to the previous tab, I can't get my
> undo/redo action to work (greyed). My BasicCommandStack isSaveNeeded()
> still sends true, but no undo/redo possible!
>
> I'm only having this problem with the EMF editor, the GEF editor is always
> working fine.
> I noticed that this problem only happens when I'm calling for the
> firePropertyChange method.
>
> Do you have an idea for this problem? Am I simply missing something?
>
> Thanks for your help,
>
> --
> J.
> "Music for a while"
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02763 seconds