-
Notifications
You must be signed in to change notification settings - Fork 8
Id provider #19
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
Id provider #19
Conversation
mark_dappollone@comcast.com seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
This PR addresses #20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid. More fiddly stuff than anything that affects the code quality.
@@ -78,6 +87,10 @@ TypeSpec generateResourceProviderClass() { | |||
FieldSpec integerProvider = FieldSpec.builder(integerProviderClassName, "integerProvider") | |||
.addModifiers(Modifier.PRIVATE, Modifier.FINAL).build(); | |||
|
|||
ClassName idProviderClassName = get(packageName, "IdProvider"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking, since this is fiddly - should this also be scoped to only get made if the user requested Id provision?
.addStatement("this.context = context") | ||
.build(); | ||
|
||
TypeSpec.Builder classBuilder = classBuilder("IdProvider") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indents are messed up here - because classBuilder doesn't make an immediate chained call on the same line, the subsequent calls are aligned to the . in the TypeSpec.Builder, not to the related calls.
Generate a new provider that gives APIs to access Id values for layout items. Also generate mocking utility for Ids and add a sample.