Commands in the GEF text editing sample are not redoable [message #189859] |
Fri, 29 July 2005 19:44  |
Eclipse User |
|
|
|
Hi,
Commands in the GEF text editing sample are not redoable. This is because
the MiniEdit derived classes that they are based on use object references
that may be stale when the command is re-executed. It seems that the way to
fix this is change them to use an absolute character position in the model
text to determine where to do their thing. Has anyone else tried this? On
a related note, it doesn't look like the text object model in example code
has a method for determining the absolute character position of a TextRun,
is that correct or am I missing something?
Thanks,
Josh
|
|
|
|
|
|
|
Re: Commands in the GEF text editing sample are not redoable [message #191620 is a reply to message #189859] |
Wed, 10 August 2005 13:28  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
They should be redoable. I know that many of them are. Perhaps one of the
miniedit is executing on redo, and therefore creating a new model object
instead of reusing the one it created earlier during the first execute (and
therefore other edits/commands are referencing).
The key to redoability is to reuse all instances, as you've probably
realized.
"Joshua Knauer" <joshua.knauer@businessobjects.com> wrote in message
news:dcef0i$4cr$1@news.eclipse.org...
> Hi,
>
> Commands in the GEF text editing sample are not redoable. This is because
> the MiniEdit derived classes that they are based on use object references
> that may be stale when the command is re-executed. It seems that the way
> to
> fix this is change them to use an absolute character position in the model
> text to determine where to do their thing. Has anyone else tried this?
> On
> a related note, it doesn't look like the text object model in example code
> has a method for determining the absolute character position of a TextRun,
> is that correct or am I missing something?
>
> Thanks,
>
> Josh
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.23456 seconds