redhat-developer / redhat-developer/quarkus-ls

Generate private field when generating getter for missing member referenced in Qute template

Open
#678 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code action enhancement qute
Dominant language
Java
Stars
50
Forks
18
Avg merge
22h 11m
Merged PRs (30d)
3

Description

In #671, the "create getter" code action generates a method which returns null when the corresponding field for the getter doesn't exist. It would be neat if it generated a new private field, then in the getter method, returned this field instead of null.

See https://github.com/redhat-developer/quarkus-ls/pull/671#issuecomment-1197058836

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing "create getter" code action introduced in #671 and inspect how it handles a missing corresponding field. The change is complete when the generated getter also creates a private field and returns that field instead of null.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.