How to capture character deleted in a Text Editor? [message #296348] |
Wed, 21 December 2005 03:06 |
Eclipse User |
|
|
|
Originally posted by: marygeng.hotmail.com
Hi, all,
I am developing a plugin in eclipse and need to capture the characters
which are just deleted by user.
I have added listener to document by
document.addDocumentListener(DocumentEvent event).
However, in all methods defined in DocumentEvent class, seems no one is
for capturing character deleted. (getText() is to capture character
inserted)
Can anyone please give me some hint on how to capture characters
deleted?
Thanks,
Lijuan
|
|
|
Re: How to capture character deleted in a Text Editor? [message #297126 is a reply to message #296348] |
Mon, 09 January 2006 17:26 |
Eclipse User |
|
|
|
Originally posted by: daniel.megert.eclipse.org
Lijuan wrote:
>Hi, all,
>
>I am developing a plugin in eclipse and need to capture the characters
>which are just deleted by user.
>
>I have added listener to document by
>document.addDocumentListener(DocumentEvent event).
>
>However, in all methods defined in DocumentEvent class, seems no one is
>for capturing character deleted. (getText() is to capture character
>inserted)
>
>
If the listener receives the documentAboutToBeChanged(...) you can get
the deleted text from the not yet modified document using offset and
length from the event.
Dani
>Can anyone please give me some hint on how to capture characters
>deleted?
>
>Thanks,
>Lijuan
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04169 seconds