Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra bracket generated when auto-completing constructor #503

Closed
akaroml opened this issue Apr 12, 2018 · 6 comments
Closed

Extra bracket generated when auto-completing constructor #503

akaroml opened this issue Apr 12, 2018 · 6 comments

Comments

@akaroml
Copy link
Contributor

akaroml commented Apr 12, 2018

When creating a class instance with nested constructor calls, an extra bracket is generated when pressing Enter to confirm. Here's a screen recording that shows how to reproduce.

extra bracket

@fbricon
Copy link
Collaborator

fbricon commented Apr 12, 2018

I think the 1st closing parenthesis is automatically added by vscode-java as you type (, then applying the completion adds the originally exoected closing ). Not sure who's to blame here honestly.

@fbricon
Copy link
Collaborator

fbricon commented Apr 12, 2018

you can reproduce by just typing new String( then tab or enter, this has nothing to do with nested declarations.

@snjeza
Copy link
Contributor

snjeza commented Apr 16, 2018

VS Code adds an extra bracket. You won't be able to reproduce the issue if you set the 'editor.autoClosingBrackets' property to false.

@jdneo
Copy link
Collaborator

jdneo commented Aug 28, 2019

@akaroml @fbricon @snjeza

It seems that the VS Code team has fixed this issue in the Insider version.

image

See gif below:

demo

@jdneo
Copy link
Collaborator

jdneo commented Feb 8, 2022

Tested in VS Code@1.64.0 + vscode-java@1.3.0. The issue has been resolved.

@jdneo
Copy link
Collaborator

jdneo commented Jun 14, 2022

Closed as fixed.

@jdneo jdneo closed this as completed Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants