Skip to content

enhance java Generate toString() #696

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

Closed
gongxun0928 opened this issue Oct 30, 2018 · 1 comment
Closed

enhance java Generate toString() #696

gongxun0928 opened this issue Oct 30, 2018 · 1 comment
Labels

Comments

@gongxun0928
Copy link

[provide a description of the issue]

Environment
  • Operating System:
    Mac OS Darwin bogon 17.5.0 Darwin Kernel Version 17.5.0
  • JDK version:
    java version "1.8.0_151"
    Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
  • Visual Studio Code version:
    version 1.28
  • Java extension version:
Steps To Reproduce
  1. use MyBatis Generator generate some classes.
  2. choose a field with docs comment
  3. click generate toString()
Current Result

the method generated like this:
@OverRide
public String toString() {
return "{" +
" ='" + get() + "'" +
", ='" + get() + "'" +
", @mbg.generated='" + [email protected]() + "'" +
", entityId='" + getEntityId() + "'" +
"}";
}

Expected Result

@OverRide
public String toString() {
return "{" +
" entityId='" + getEntityId() + "'" +
"}";
}

Additional Informations

could it skip the docs comment?

@fbricon
Copy link
Collaborator

fbricon commented Oct 30, 2018

vscode-java doesn't provide a menu to generate toString() methods. This must come from another extension.
As for actually providing toString() and other methods generation, see #597.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants