Problem with Saving [message #221694] |
Thu, 17 August 2006 08:53 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dstamkokeng.gmail.com
Hi, I have a problem with saving changes I made.
I m extending the Shapes example given in GEF. Only after changes made in
the properties view and movement of the shapes figure created, can I do a
save.
Changes made to the shapes models using other methods do not allows me to
save the document.
Where do I mark the document as dirty etc? Thanks alot
|
|
|
Re: Problem with Saving [message #221713 is a reply to message #221694] |
Thu, 17 August 2006 14:09 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: guerreroderrick.gmail.com
What other methods do you mean? Following is the part of the shapes
example that marks the doc dirty:
in class that defines your graphical editor...
@Override
public void commandStackChanged(EventObject arg0) {
firePropertyChange(IEditorPart.PROP_DIRTY);
super.commandStackChanged(arg0);
}
I bet if you do the firePropertyChange thing somewhere else it should
have the same effect.
Guerrero
Meo Kok Eng wrote:
> Hi, I have a problem with saving changes I made.
>
> I m extending the Shapes example given in GEF. Only after changes made
> in the properties view and movement of the shapes figure created, can I
> do a save.
>
> Changes made to the shapes models using other methods do not allows me
> to save the document.
>
> Where do I mark the document as dirty etc? Thanks alot
>
|
|
|
Re: Problem with Saving [message #221766 is a reply to message #221713] |
Fri, 18 August 2006 03:05 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dstamkokeng.gmail.com
Hi, what must I do to override the method in ShapesEditor?
My changes to the model does not uses a Command. Actually I have a SWING
textbox and when the user inputs something, it will be saved in the model
and reflected in the diagram.
I tried implementing the exact same thing using the properties view and
changes made in the properties view will allow me to save. However when
the change is done in the SWING textbox, it does not.
I try calling the editor's commandStackChanged(EventObject event) method
in the SWING textbox code by passing a null for the event and it does not
allows me to save.
What exactly enables a document to be savable? Sorry for the lengthy post.
|
|
|
Re: Problem with Saving [message #221774 is a reply to message #221766] |
Fri, 18 August 2006 03:37 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dstamkokeng.gmail.com
I think it is the firePropertyChange(IEditorPart.PROP_DIRTY) which makes
the document dirty and thus enables saving.
I tried calling the firePropertyChange method directly in my code after
changing the method to public, but I am unable to save. Anybody has any
idea how to do saving?? Desperate....:(
|
|
|
Powered by
FUDForum. Page generated in 0.03979 seconds