Bug 575824 - Insertion of method from suggestions list contains wrong letters in some cases
Summary: Insertion of method from suggestions list contains wrong letters in some cases
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.21   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-05 16:17 EDT by Dieter Mai CLA
Modified: 2024-01-12 17:50 EST (History)
2 users (show)

See Also:


Attachments
Example code (8.25 KB, image/png)
2021-09-05 16:17 EDT, Dieter Mai CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter Mai CLA 2021-09-05 16:17:16 EDT
Created attachment 287095 [details]
Example code

This issue was introduced with 4.19 and is still present in RC2 of 4.21


Inside a java space CTRL+Space lets you choose from a list of names, eg methods that start with whatever was entered before. If while this list is displayed characters are deleted and a entry is selected, the inserted text contains wrong letters at the end

__How to Reproduce__

_Preconditions_
[P1] Have a java class Bar with the methods abcdxxxx()
[P2] Have a java class Bar with the methods abcdyyyy()
[P3] Have a java class Bar with the methods foo()

_Actions_
[A1] Inside foo switch to an empty line
[A2] Type 'abcd'
[A3] Press CTRL+Space
[A4] Type 'x'
[A5] Press DEL
[A6] Type 'y'
[A7] Press RETURN
[A8] Press CTRL+7 (Just to comment out the error) 
[A9] Switch to an empty line in foo()
[A10] Type 'abcd'
[A11] Press CTRL+Space
[A12] Type 'x'
[A13] Press DEL
[A14] Select entry 'abcdyyyy()' with mouse or keyboard
[A15] Press RETURN

_Observed_
[O3] A list of options for 'abcd' is displayed, including 'abcdxxxx()' and 'abcdyyyy()'
[O4] The entry for 'abcdyyyy()' is removed
[O5] The entry for 'abcdyyyy()' is added again
[O6] The entry for 'abcdxxxx()' is removed
[O7][NOK] The input of the current line is 'abcdyyyy();y'
[O11] A list of options for 'abcd' is displayed, including 'abcdxxxx()' and 'abcdyyyy()'
[O12] The entry for 'abcdyyyy()' is removed
[O13] The entry for 'abcdyyyy()' is added again
[A15][NOK] The input of the current line is 'abcdyyyy();d'

_Expected_
[E7] The input of the current line is 'abcdyyyy();'
[E15] The input of the current line is 'abcdyyyy();'


In both error cases the issue seems to be the Delete and the selection of an item that was not present before the delete
Comment 1 Eclipse Genie CLA 2024-01-10 14:19:44 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Jeff Johnston CLA 2024-01-12 17:50:41 EST
Still occurs with 2024-03 M1