Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Customize Code Generation
Customize Code Generation [message #1746156] Mon, 24 October 2016 08:11 Go to next message
A N is currently offline A NFriend
Messages: 19
Registered: July 2014
Junior Member
Hello,

is it possible to customize the code generation of scout?

More specifically I am interested in adding custom annotations to my form fields which I would then also like to get added in the generated form data classes.

But any input on the general topic would be interesting.

Thanks,
an

Re: Customize Code Generation [message #1746595 is a reply to message #1746156] Tue, 01 November 2016 14:31 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 111
Registered: September 2011
Senior Member
Hi

Yes, this is possible.

You can mark your custom annotation with the following Scout annotation: "org.eclipse.scout.rt.platform.annotations.DtoRelevant". If a form field is then annotation with your custom annotation it will be copied to the generated DTO. Please note that your custom annotation must be on the classpath of the shared project where the DTOs are stored.

Do you add the annotation to the form fields manually? Or do you want to include your annotation automatically if the code completion (ctrl+space) is used?

Re: Customize Code Generation [message #1746649 is a reply to message #1746595] Wed, 02 November 2016 13:38 Go to previous message
A N is currently offline A NFriend
Messages: 19
Registered: July 2014
Junior Member
Thanks for the useful response. For now I will add my annotations manually.
Previous Topic:server's session and UI's session
Next Topic:Security issue on Websphere
Goto Forum:
  


Current Time: Thu Jun 29 12:37:45 GMT 2017

Powered by FUDForum. Page generated in 0.01680 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software