Bug 496661 - [content assist] Duplicate recommendations after removing comment
Summary: [content assist] Duplicate recommendations after removing comment
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on: 406463
Blocks:
  Show dependency tree
 
Reported: 2016-06-23 11:09 EDT by Julius Hager CLA
Modified: 2022-08-23 16:06 EDT (History)
2 users (show)

See Also:


Attachments
A visual example of the bug (29.51 KB, image/png)
2016-06-23 11:09 EDT, Julius Hager CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julius Hager CLA 2016-06-23 11:09:08 EDT
Created attachment 262643 [details]
A visual example of the bug

The bug:

When using the recommendations window that normally appear when pressing the ctrl + space shortcut,
if you remove a comment (using backspace) the recommendations window starts to show duplicates of every recommendation. 
Both the single-line (//) and multi-line (/**/) comments are affected.


Speculation:

The number of slashes does not seem to affect the outcome nor type of comment, 
which leads me to believe the bug only appears when the recommendations windows is open and you are moving from a comment to normal code without closing the window.


How to replicate:

1. Type "//" in a normal code setting

2. Open the recommendations window (ctrl + space is default)

3. Press backspace twice to remove the comment while the window is still open
Comment 1 Andreas Sewe CLA 2016-06-24 06:09:30 EDT
(In reply to Julius Hager from comment #0)
> How to replicate:
> 
> 1. Type "//" in a normal code setting
> 
> 2. Open the recommendations window (ctrl + space is default)
> 
> 3. Press backspace twice to remove the comment while the window is still open

Thank you so much for the detailed bug report! This is much appreciated.

I can reproduce the behavior you describe both with Code Recommenders enabled and without, so this seems to be a general issue with the way JDT handles proposal computers when the cursor switches document partitions (from comment to non-comment).

@JDT team:
I have reproduced this with a plain Eclipse 4.6 SDK from [1]. The only difference to the reporter's screenshot is that proposals are only duplicated, not quadruplicated (is this a word?), as less proposal computers are active.

[1] <http://download.eclipse.org/eclipse/downloads/drops4/R-4.6-201606061100/>
Comment 2 Noopur Gupta CLA 2016-06-24 09:41:31 EDT
This is visible after the fix for bug 406463.
Comment 3 Eclipse Genie CLA 2020-08-02 16:40:46 EDT
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 4 Noopur Gupta CLA 2020-08-03 02:07:37 EDT
Still reproducible.
Comment 5 Eclipse Genie CLA 2022-08-23 16:06:33 EDT
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.