Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Quickest way to change getter names that are generated
Quickest way to change getter names that are generated [message #1758133] Thu, 23 March 2017 19:05 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 524
Registered: November 2009
Senior Member
Hi,

What is the quickest away to change generated method from lets say, EObject[] getXXX() to EObject[] getXXXArray()? I don't want to go through generated code and manually change needed methods by appending 'Array' to them, I need this change to permanent so that if I need to regenerate the code, the getters will have new names.

Thanks,
Alex

[Updated on: Thu, 23 March 2017 23:11]

Report message to a moderator

Re: Quickest way to change getter names that are generated [message #1758165 is a reply to message #1758133] Fri, 24 March 2017 08:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29130
Registered: July 2009
Senior Member
You could change the feature name from xXX to xXXArray, or define an EOperation with the name getXXXArray() with a body annotation that calls the differently named method.
Re: Quickest way to change getter names that are generated [message #1758192 is a reply to message #1758165] Fri, 24 March 2017 13:57 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 524
Registered: November 2009
Senior Member
Thanks Ed,

Is there a way to make something global for whole genmodel - if I set 'Array Accessors' to true, then generate methods with custom pattern, like getXXXArray()?
Re: Quickest way to change getter names that are generated [message #1758201 is a reply to message #1758192] Fri, 24 March 2017 15:46 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29130
Registered: July 2009
Senior Member
Perhaps with dynamic templates you could more tricky things, but I've not looked closely at how that might be possible.
Previous Topic:How can I implement a workflow wizard over a EMF Ecore metamodel?
Next Topic:[CDO] Client side ID generation
Goto Forum:
  


Current Time: Mon Jan 22 20:35:31 GMT 2018

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

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