classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Fixing the selection handling in JTextComponent.


From: Michael Koch
Subject: Re: [cp-patches] Fixing the selection handling in JTextComponent.
Date: Sun, 27 Feb 2005 14:00:14 +0100
User-agent: mutt-ng 1.5.8i (Debian)

On Sat, Feb 26, 2005 at 07:58:41PM +0100, Meskauskas Audrius wrote:
> The Mauve test have indicated wrong work of the 
> JTextComponent.getSelectedText(). For example, if the text is 0123456789 and 
> the selection covers the interval 
> 2..5, the expected value is '234' and the returned value is '01234'.
> 
> Another test indicated that setSelectionStart(int) and setSelectionEnd(int) 
> can set the 'dot' of the component carret ahead the 'mark' of this carret, 
> something that should never happen unless moveCaretPosition(int) is called. 
> This clearly shows that goes wrong in the first test.
> 
> Fixing this problem required to rewrite several selection-related methods in 
> JTextComponent. The suggested path is attached. With this path, the selection 
> handling seems operating as expected.
> 
> This case is covered by the two tests, gnu.testlet.javax.swing.JTextArea.text 
> and additionally written gnu.testlet.javax.swing.JTextArea gettingText.
> 
> As this file uses tabulation symbol, the whitespace may not be correctly 
> displayed in the patch. Please verify the attached java file before reporting 
> the 
> wrongly placed whitespace.

The patch is nearly impossible to review. Please submit code changes and
formatting changes as separate patches. Please dont attach diff and full
source of one class. If one needs the context he can apply the patch
his source tree.

Please resubmit a reabable patch. Thanks for your work.


Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]