Bug 537157 - [content assist] Issues with autocomplete and autoclosing characters
Summary: [content assist] Issues with autocomplete and autoclosing characters
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.7.1a   Edit
Hardware: PC Unix All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-18 12:16 EDT by Stephen Slaboda CLA
Modified: 2024-02-26 19:35 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Slaboda CLA 2018-07-18 12:16:08 EDT
While typing in the Java editor, I often get strange behavior from content assist when going across pre-inserted closing characters, such as >, ), and ].  For example:

Collection<Object> c = new ArrayList<Object>

After typing that second >, the cursor moves past the > and I still see the popup which has "Object" highlighted as the suggestion (even though I clearly already have that inserted and have moved on beyond the context the popup is for).  When I press space it selects the top item (which usually is correct) but it doesn't insert a space - it only makes the popup disappear.  When I press the >, I have already completed the content of the <...> and I would expect that it would remove the content assist since I pressed a character other than my settings (and subsequently the space would be added).  It's worth noting that pressing the right arrow after this makes the content assist disappear.  Also, pressing left and the right makes the popup disappear.  I wonder if the editor is not passing on the press of the > because it has already been inserted, and instead it is simply moving the cursor without triggering the necessary event(s)?

Another example:

if(myBoolean)

After pressing the close parenthesis, I press enter to move to the next line so I can type the if statement block.  In this case, the close parenthesis is removed and the cursor remains on the if line.  I would expect that after pressing the close parenthsis, the content assist popup would disappear and not accept the keystroke so that I can continue my typing, since the context for the content assist is no longer relevant.

Auto Activation settings:
Enabled
Delay = 200
triggers for Java = .qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM
triggers for Javadoc = @#
Comment 1 Jay Arthanareeswaran CLA 2018-07-19 00:05:41 EDT
(In reply to Stephen Slaboda from comment #0)
> While typing in the Java editor, I often get strange behavior from content
> assist when going across pre-inserted closing characters, such as >, ), and
> ].  For example:
> 
> Collection<Object> c = new ArrayList<Object>
> 
> After typing that second >, 

I don't see this behavior in the latest I build. But can you please tell me why you had to enter '>'. Doesn't the editor automatically does it for you?
Comment 2 Eclipse Genie CLA 2020-08-04 14:31:26 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 3 Jeff Johnston CLA 2020-08-04 17:08:22 EDT
Using latest Eclipse 4.17M2, the problem exists with the preferences given.  After typing if (myboolean) the content assist still shows the list with myboolean on top.  Hitting the enter key removes the content list and then the user needs to hit enter again to move to the next line.
Comment 4 Eclipse Genie CLA 2024-02-26 19:35:37 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.