Code completion for Java record class constructors
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Description
Within Java record classes, there is no code completion for generating constructors. It would be helpful to have them, in analogy to code completion for constructors in regular classes.
### Use case/motivation
In a regular class like for example `class Example { int a; String b; }`, invoking code completion offers to generate constructors `Example()` and `Example(int a, String b)`. In record classes, it would be similarly useful to offer generating a compact constructor (`Example { }`) or a default constructor (`Example() { this(...); }`).
When invoking code completion within a record class, while the record type name is offered among all other accessible types, for insertion as e.g. a field type, this is less convenient that a dedicated constructor completion, because the latter would be at the top of the completion popup, and would also insert the access modifier (e.g. compact constructors of public record classes need to be declared as public), braces and possible argument list, etc.
### Related issues
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by finding NetBeans' existing constructor code-completion implementation and the record-class completion path, then compare the requested compact and delegating constructor forms. Done means completion offers the appropriate constructor forms with modifiers, braces, and arguments for Java records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100