Skip to content
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

Support for adding a new property to an existing class #1

Open
drewhamilton opened this issue May 28, 2020 · 1 comment
Open

Support for adding a new property to an existing class #1

drewhamilton opened this issue May 28, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@drewhamilton
Copy link

Once we've created one of these DSL classes, we may later want to add a new property. If possible, it would be great to support generating the property, the builder property, the builder setter, and the addition of the property to the builder build function.

(On Slack you mentioned some challenges so feel free to enumerate those here 😄)

@Hariofspades Hariofspades added the enhancement New feature or request label May 28, 2020
@Hariofspades
Copy link
Owner

😅 Challenges on this:

  • I wouldn't know the exact position to insert the property. All I have is the cursor position.

But a super simple solution I could think right now for this use case would be to generate the following at the cursor position

  • Immutable property
  • Mutable property
  • Set method
  • Comment

So, the developer just needs to copy and paste this at the respective place. Right now Class Name is mandatory. If there is no class name, we could generate just properties.

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

No branches or pull requests

2 participants