Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Wed, 21 December 2005 03: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 17: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: Sat Dec 21 14:46:39 GMT 2024

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

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

Back to the top