Feature request: Customization of generated Getter and Setter method name.

Open
#1,142 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, typescript

Research direction

The issue concerns the Java getter and setter generation entry point in the VS Code extension, but names no files or tests. Start by locating that generation path and its existing customization settings; done means users can configure multiple prefixes such as m_ and m_str so m_strName produces getName() and setName().

Written by the indexing model from the issue text.

Description

ai-triaged code-generation enhancement feature-request

Suggestion

Let user customize how to generate method name of Getter and Setter, for example, trims the prefix.

Use Cases

I'm used to add prefix to field, for example: m_, or m_str. In current version of vscode, the generated method names of Getter and Setter contain the prefix, for example: m_strName is generated with getM_strName() and setM_strName().
This function is supported in Eclipse and Android Studio.

Examples

User can specify multiple prefixes to be trimmed from method name when generating Getter and Setter.
User specify prefix: m_, m_str;
With field: m_strName;
Generated Getter and Setter are: getName() and setName().

Thanks!

Dominant language
TypeScript
Stars
352
Forks
166
Avg merge
17h 47m
Merged PRs (30d)
32

Contributor guide

No contributing guide indexed for this repository

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.

More from microsoft/vscode-java-pack

All issues in microsoft/vscode-java-pack

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.