Bug 506729 - [content assist] Content assist eats closing parentheses when not choosing field and typing semicolon
Summary: [content assist] Content assist eats closing parentheses when not choosing fi...
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 507306 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-28 16:02 EDT by Michael Schierl CLA
Modified: 2024-02-28 16:10 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Schierl CLA 2016-10-28 16:02:39 EDT
To reproduce

1. create this class and place the cursor at the marked position:

public class X {
	static int y;
	void z(X x) {}
	void test() {
		// type in the empty line below
		
	}
}



2. While ignoring any content assist windows, type the following:

z(X.y);

3. Observe that after typing y, the content assist is open suggesting X.y and the closing parenthesis has already been inserted. When you now over-type the closing parenthesis, the parenthesis get skipped as expected, but the content assist is still open suggesting X.y.

4. As soon as you now type the semicolon, the suggestion gets selected and the closing parenthesis disappears, resulting in a syntax error:

z(X.y;


Expected behaviour: As soon as the parenthesis is closed, content assist should close and therefore the semicolon should not eat the parenthesis.
Comment 1 Michael Schierl CLA 2016-10-28 16:09:51 EDT
See also: http://stackoverflow.com/a/40312522/90203
Comment 2 Noopur Gupta CLA 2016-11-10 02:11:00 EST
*** Bug 507306 has been marked as a duplicate of this bug. ***
Comment 3 Eclipse Genie CLA 2020-02-18 04:53: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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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 Michael Schierl CLA 2020-02-18 17:18:34 EST
Just retested the original example in Eclipse 2019-12, the bug is still there, albeit the behaviour is slightly different now.

After typing the closing semicolon, the parenthesis no longer gets eaten, but the cursor position is wrong (before the semicolon instead of after it).
Comment 5 Eclipse Genie CLA 2022-02-08 15:42:11 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 6 Michael Schierl CLA 2022-02-08 17:31:43 EST
In version 2021-12, Behaviour is unchanged from comment #4.
Comment 7 Eclipse Genie CLA 2024-02-25 02:21:52 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 8 Michael Schierl CLA 2024-02-28 16:10:16 EST
In version 2023-12, Behaviour is unchanged from comment #4.