Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to capture character deleted in a Text Editor?
How to capture character deleted in a Text Editor? [message #296348] Tue, 20 December 2005 22:06 Go to next message
Eclipse UserFriend
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 12:26 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:Entire file name not displayed in tabs
Next Topic:Programming with the Java Editor
Goto Forum:
  


Current Time: Sun May 04 11:59:28 EDT 2025

Powered by FUDForum. Page generated in 0.02906 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top