Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Vorto » Overriding Vorto Code Templates(Abillity to override Vorto Code templates)
Overriding Vorto Code Templates [message #1725339] Wed, 02 March 2016 16:55 Go to next message
Nagavijay Sivakumar is currently offline Nagavijay SivakumarFriend
Messages: 11
Registered: August 2015
Junior Member
User should have the ability to override default template at runtime or extend the generator template at design time.

Few typical scenarios :
Design time :
1. For iOS/ android generator, the generation code can vary as little as package name changes whenever there is a newer version. Instead of creating whole new generator, there should be a possibility to extend the template at the design time.

Runtime :
A generator can be overriden at runtime for adding certain client related information. For example rest api code generator can have domain name url pattern based on client specific additional code generation requirement.

Few Implementation options:

Design Time:
- Provide Interface for part of the Template to override all or certain parts of code snippet.

Runtime:
- Provide user option to upload template at runtime to override the default template with that of overriden template.

PS: This topic is slightly related to Configurable Vorto Generators? - https://www.eclipse.org/forums/index.php/t/1075273/

Any thoughts/feedback?

[Updated on: Wed, 02 March 2016 16:59]

Report message to a moderator

Re: Overriding Vorto Code Templates [message #1725362 is a reply to message #1725339] Thu, 03 March 2016 02:46 Go to previous messageGo to next message
Alexander Edelmann is currently offline Alexander EdelmannFriend
Messages: 37
Registered: January 2015
Member
Hi Vijay,

i definitely see your point of re-using templates to define a new generator to remove code duplication.
If we come to a point where we see code duplication in generators and it is getting very messy, we would need to implement your suggestion for sure.
At the moment I do not have a concrete generator where we require template inheritance, do you?

- Alex
Re: Overriding Vorto Code Templates [message #1725467 is a reply to message #1725362] Thu, 03 March 2016 16:46 Go to previous messageGo to next message
Nagavijay Sivakumar is currently offline Nagavijay SivakumarFriend
Messages: 11
Registered: August 2015
Junior Member
@Alex,

Yes. Agree. I too think there is no strong usecase for this. Will leave the discussion open. We could revisit later also.



Re: Overriding Vorto Code Templates [message #1725476 is a reply to message #1725467] Thu, 03 March 2016 17:39 Go to previous message
Olaf Weinmann is currently offline Olaf WeinmannFriend
Messages: 29
Registered: May 2015
Junior Member
Good point, Vijay!

You're right this is really related to the configurable generators topic. However only supporting configuration will not cover all points that you've mentioned here. I agree that it would be great to upload templates during runtime. This would make the whole solution much more flexible. However I agree with Alex that this should be realized when there is really a need for it.

I would be very interested in other comments here! Has anyone suggestions or specific use cases that require a flexibility like this?

Cheers,

Olaf

Previous Topic:Vorto Meta Model Discussion
Next Topic:Configurable Vorto Generators?
Goto Forum:
  


Current Time: Sat Nov 17 19:42:08 GMT 2018

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

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

Back to the top