Skip to content

Attempting to fix code completion after new HashMap<>#8237

Merged
lahodaj merged 1 commit intoapache:masterfrom
lahodaj:constructors-after-type-params
Feb 21, 2025
Merged

Attempting to fix code completion after new HashMap<>#8237
lahodaj merged 1 commit intoapache:masterfrom
lahodaj:constructors-after-type-params

Conversation

@lahodaj
Copy link
Copy Markdown
Contributor

@lahodaj lahodaj commented Feb 12, 2025

Consider code like:

Map<Object, Object> m = new HashMap<>//code completion here

In VS Code, selecting e.g. the HashMap() option will repeat HashMap here. Inside the NetBeans UI, this will not happen, but <tab> will still insert HashMap.

This is an attempt to avoid these problems, by recording the completion appeared after the <>, and not inserting the name. Not sure if this is the best solution, though.

@lahodaj lahodaj added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests VSCode Extension labels Feb 12, 2025
@lahodaj lahodaj added this to the NB26 milestone Feb 12, 2025
@lahodaj lahodaj requested a review from dbalek February 12, 2025 08:19
@mbien
Copy link
Copy Markdown
Member

mbien commented Feb 12, 2025

quickly checked for regressions since the last completion chaining fix #4165 and everything appeared to still work fine

Copy link
Copy Markdown
Contributor

@dbalek dbalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. Thanks.

@lahodaj lahodaj merged commit cb54ec0 into apache:master Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests VSCode Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants