-
1. Re: [forge-dev] Formatting Forge generated output
gastaldi Jan 26, 2015 8:43 AM (in response to ivan_stefanov)If you call Roaster.format() passing as an argument the Eclipse formatter profile XML it should format as you wish. You could implement it as a ResourceListener and monitor new resources using the ResourceMonitor feature, or after every command execution using a CommandExecutionListener.
Em 26/01/2015, às 10:04, Ivan St. Ivanov <ivan.st.ivanov@gmail.com> escreveu:
Hi folks,
During my recent Forge talk for the Barcelona JUG I was asked whether it is possible to change the formatter that is currently used by Forge for the generated classes. At the moment the generated code is with 3 spaces indentation and with opening braces on the next line. Which is not what everybody uses.
So, how can we change that configuration?
Thanks,
Ivan
_______________________________________________
forge-dev mailing list
_______________________________________________
forge-dev mailing list
https://lists.jboss.org/mailman/listinfo/forge-dev
-
2. Re: [forge-dev] Formatting Forge generated output
ivan_stefanov Jan 26, 2015 9:19 AM (in response to gastaldi)Hi George,
Thanks! But this is if you implement an addon that generates code.
What if you are just using Forge. Could you somehow configure the tool with
your own formatter XML to be used for example in the entities or JAX-RS
resources generation?
Thanks,
Ivan
On Mon, Jan 26, 2015 at 3:43 PM, George Gastaldi <ggastald@redhat.com>
wrote:
If you call Roaster.format() passing as an argument the Eclipse formatter
profile XML it should format as you wish. You could implement it as a
ResourceListener and monitor new resources using the ResourceMonitor
feature, or after every command execution using a CommandExecutionListener.
>
Em 26/01/2015, às 10:04, Ivan St. Ivanov <ivan.st.ivanov@gmail.com>
escreveu:
Hi folks,
During my recent Forge talk for the Barcelona JUG I was asked whether it
is possible to change the formatter that is currently used by Forge for the
generated classes. At the moment the generated code is with 3 spaces
indentation and with opening braces on the next line. Which is not what
everybody uses.
So, how can we change that configuration?
Thanks,
Ivan
_______________________________________________
forge-dev mailing list
_______________________________________________
forge-dev mailing list
-
att1.html.zip 1.0 KB
-
-
3. Re: [forge-dev] Formatting Forge generated output
gastaldi Jan 26, 2015 9:24 AM (in response to ivan_stefanov)That is one of the use cases the CommandExecutionListener is for.
Perhaps we could have this feature in core (reading from the user configuration) and do it automatically. Could you please file a new feature request in JIRA?
Best Regards,
George
Em 26/01/2015, às 12:20, Ivan St. Ivanov <ivan.st.ivanov@gmail.com> escreveu:
Hi George,
Thanks! But this is if you implement an addon that generates code.
What if you are just using Forge. Could you somehow configure the tool with your own formatter XML to be used for example in the entities or JAX-RS resources generation?
Thanks,
Ivan
>> On Mon, Jan 26, 2015 at 3:43 PM, George Gastaldi <ggastald@redhat.com> wrote:
>> If you call Roaster.format() passing as an argument the Eclipse formatter profile XML it should format as you wish. You could implement it as a ResourceListener and monitor new resources using the ResourceMonitor feature, or after every command execution using a CommandExecutionListener.
>>
>>
>>
>> > Em 26/01/2015, às 10:04, Ivan St. Ivanov <ivan.st.ivanov@gmail.com> escreveu:
>> >
>> > Hi folks,
>> >
>> > During my recent Forge talk for the Barcelona JUG I was asked whether it is possible to change the formatter that is currently used by Forge for the generated classes. At the moment the generated code is with 3 spaces indentation and with opening braces on the next line. Which is not what everybody uses.
>> >
>> > So, how can we change that configuration?
>> >
>> > Thanks,
>> > Ivan
>> > _______________________________________________
>> > forge-dev mailing list
>> > forge-dev@lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/forge-dev
>>
>> _______________________________________________
>> forge-dev mailing list
>> https://lists.jboss.org/mailman/listinfo/forge-dev
_______________________________________________
forge-dev mailing list
-
att1.html.zip 1.3 KB
-
-
4. Re: [forge-dev] Formatting Forge generated output
ivan_stefanov Jan 26, 2015 10:53 AM (in response to gastaldi)There it is:
https://issues.jboss.org/browse/FORGE-2202
@Alex: would you communicate this issue to the Barcelona JUG member that
asked the question?
Thanks,
Ivan
On Mon, Jan 26, 2015 at 4:24 PM, George Gastaldi <ggastald@redhat.com>
wrote:
That is one of the use cases the CommandExecutionListener is for.
Perhaps we could have this feature in core (reading from the user
configuration) and do it automatically. Could you please file a new
feature request in JIRA?
Best Regards,
George
>
Em 26/01/2015, às 12:20, Ivan St. Ivanov <ivan.st.ivanov@gmail.com>
escreveu:
Hi George,
Thanks! But this is if you implement an addon that generates code.
What if you are just using Forge. Could you somehow configure the tool
with your own formatter XML to be used for example in the entities or
JAX-RS resources generation?
Thanks,
Ivan
On Mon, Jan 26, 2015 at 3:43 PM, George Gastaldi <ggastald@redhat.com>
wrote:
>> If you call Roaster.format() passing as an argument the Eclipse formatter
>> profile XML it should format as you wish. You could implement it as a
>> ResourceListener and monitor new resources using the ResourceMonitor
>> feature, or after every command execution using a CommandExecutionListener.
>>
>>
>>
>> > Em 26/01/2015, às 10:04, Ivan St. Ivanov <ivan.st.ivanov@gmail.com>
>> escreveu:
>> >
>> > Hi folks,
>> >
>> > During my recent Forge talk for the Barcelona JUG I was asked whether
>> it is possible to change the formatter that is currently used by Forge for
>> the generated classes. At the moment the generated code is with 3 spaces
>> indentation and with opening braces on the next line. Which is not what
>> everybody uses.
>> >
>> > So, how can we change that configuration?
>> >
>> > Thanks,
>> > Ivan
>> > _______________________________________________
>> > forge-dev mailing list
>> > forge-dev@lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/forge-dev
>>
>> _______________________________________________
>> forge-dev mailing list
>> https://lists.jboss.org/mailman/listinfo/forge-dev
>
_______________________________________________
forge-dev mailing list
https://lists.jboss.org/mailman/listinfo/forge-dev
>
_______________________________________________
forge-dev mailing list
https://lists.jboss.org/mailman/listinfo/forge-dev
-
att1.html.zip 1.3 KB
-