This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
How to control indentation of Annotation members #658
Comments
This is the annotation creation method: private AnnotationSpec createJpaColumnAnnotation(String columnName) {
return AnnotationSpec.builder(ClassName.get("javax.persistence", "Column"))
.addMember("name", "$S", columnName)
.build();
} |
We don't have APIs to customize indentation. But if there's a change we should make to the defaults please send a pull request! |
I think the compact type of annotations is usually preferred. Would you guys be OK with changing the default to that? |
No because then you just create the opposite problem.
…On Sat, Oct 20, 2018, 4:34 AM Vlad Topala ***@***.*** wrote:
I think the compact type of annotations is usually preferred. Would you
guys be OK with changing the default to that?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#658 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEQW8rfWjbLX1bKDb3COuJtFAx9Jpks5umuAngaJpZM4VlrNE>
.
|
Then this issue can be closed or is there a plan to add APIs to customize indentation? |
No. A better solution would be to write the annotation, see if it exceeds
the column limit, and then rewrite it with a property on each line.
…On Sat, Oct 20, 2018, 11:36 AM Vlad Topala ***@***.*** wrote:
Then this issue can be closed or is there a plan to add *APIs to
customize indentation*?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#658 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEUVkYSVlJd5PLyQhElQ0SoPWhT-aks5um0MSgaJpZM4VlrNE>
.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I generate code like this, but i have not find the way to control the indentation of annotation members
I want this:
to be
The text was updated successfully, but these errors were encountered: