force 'dirty' state? [message #50757] |
Fri, 28 March 2003 21:06  |
Eclipse User |
|
|
|
Hi,
Is there a way to manually force a 'dirty' state in a given editor / command stack
instance, i.e., so that the file can be Saved by the user? When I create a bookmark for a
graphical application (the marker is associated with a GEF AbstractEditPart), I need to
maintain the marker ID in the model. However, creating the marker does not cause the
resource to show 'modified' (i.e., w/asterisk). I've tried doing
EditorPart.firePropertyChange( IEditorPart.PROP_DIRTY ) in the editor as well as
firePropertyChange() in the EditPart's model instance. Neither works. Any thoughts
appreciated.
thanks,
Ron
|
|
|
Re: force 'dirty' state? [message #51069 is a reply to message #50757] |
Wed, 02 April 2003 03:10   |
Eclipse User |
|
|
|
Originally posted by: spambucket.baverman.se
I don't know this API, but to it sounds as if the methods You have been
trying should be
called AFTER the change has already happened and not to make it happen.
When the editor has changed tell everybody that wants to know this by
calling
firePropertyChange(...).
I suggest you look for a method that marks the edited file as dirty, or if
you cannot find that
just try to substitute one character in the file with the same character.
This will effectively not change
the file content, but could make the editor think that it's dirty.
Just my 0.02 worth.
/Bengt B
[Substitute spambucket with bengt if you want to send me an email]
"Ron" <rr.cm@cox.net> wrote in message news:3E84FF94.20606@cox.net...
> Hi,
>
> Is there a way to manually force a 'dirty' state in a given editor /
command stack
> instance, i.e., so that the file can be Saved by the user? When I create
a bookmark for a
> graphical application (the marker is associated with a GEF
AbstractEditPart), I need to
> maintain the marker ID in the model. However, creating the marker does
not cause the
> resource to show 'modified' (i.e., w/asterisk). I've tried doing
> EditorPart.firePropertyChange( IEditorPart.PROP_DIRTY ) in the editor as
well as
> firePropertyChange() in the EditPart's model instance. Neither works.
Any thoughts
> appreciated.
>
> thanks,
>
> Ron
>
|
|
|
Re: force 'dirty' state? [message #53114 is a reply to message #50757] |
Thu, 24 April 2003 07:12  |
Eclipse User |
|
|
|
Originally posted by: sahni_rishi.rediffmail.com
Add
firePropertyChange(PROP_DIRTY);
after you are done with your changes
Rishi
Ron wrote:
> Hi,
> Is there a way to manually force a 'dirty' state in a given editor / command
stack
> instance, i.e., so that the file can be Saved by the user? When I create a
bookmark for a
> graphical application (the marker is associated with a GEF
AbstractEditPart), I need to
> maintain the marker ID in the model. However, creating the marker does not
cause the
> resource to show 'modified' (i.e., w/asterisk). I've tried doing
> EditorPart.firePropertyChange( IEditorPart.PROP_DIRTY ) in the editor as
well as
> firePropertyChange() in the EditPart's model instance. Neither works. Any
thoughts
> appreciated.
> thanks,
> Ron
|
|
|
Re: force 'dirty' state? [message #592342 is a reply to message #50757] |
Wed, 02 April 2003 03:10  |
Eclipse User |
|
|
|
Originally posted by: spambucket.baverman.se
I don't know this API, but to it sounds as if the methods You have been
trying should be
called AFTER the change has already happened and not to make it happen.
When the editor has changed tell everybody that wants to know this by
calling
firePropertyChange(...).
I suggest you look for a method that marks the edited file as dirty, or if
you cannot find that
just try to substitute one character in the file with the same character.
This will effectively not change
the file content, but could make the editor think that it's dirty.
Just my 0.02 worth.
/Bengt B
[Substitute spambucket with bengt if you want to send me an email]
"Ron" <rr.cm@cox.net> wrote in message news:3E84FF94.20606@cox.net...
> Hi,
>
> Is there a way to manually force a 'dirty' state in a given editor /
command stack
> instance, i.e., so that the file can be Saved by the user? When I create
a bookmark for a
> graphical application (the marker is associated with a GEF
AbstractEditPart), I need to
> maintain the marker ID in the model. However, creating the marker does
not cause the
> resource to show 'modified' (i.e., w/asterisk). I've tried doing
> EditorPart.firePropertyChange( IEditorPart.PROP_DIRTY ) in the editor as
well as
> firePropertyChange() in the EditPart's model instance. Neither works.
Any thoughts
> appreciated.
>
> thanks,
>
> Ron
>
|
|
|
Re: force 'dirty' state? [message #593224 is a reply to message #50757] |
Thu, 24 April 2003 07:12  |
Eclipse User |
|
|
|
Originally posted by: sahni_rishi.rediffmail.com
Add
firePropertyChange(PROP_DIRTY);
after you are done with your changes
Rishi
Ron wrote:
> Hi,
> Is there a way to manually force a 'dirty' state in a given editor / command
stack
> instance, i.e., so that the file can be Saved by the user? When I create a
bookmark for a
> graphical application (the marker is associated with a GEF
AbstractEditPart), I need to
> maintain the marker ID in the model. However, creating the marker does not
cause the
> resource to show 'modified' (i.e., w/asterisk). I've tried doing
> EditorPart.firePropertyChange( IEditorPart.PROP_DIRTY ) in the editor as
well as
> firePropertyChange() in the EditPart's model instance. Neither works. Any
thoughts
> appreciated.
> thanks,
> Ron
|
|
|
Powered by
FUDForum. Page generated in 0.03070 seconds