Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Avoid Collections.unmodifiableList generation(Avoid Collections.unmodifiableList generation)
Avoid Collections.unmodifiableList generation [message #1131503] Thu, 10 October 2013 15:45 Go to next message
Igor S is currently offline Igor SFriend
Messages: 1
Registered: October 2013
Junior Member
Hi,

i would like to avoid that Texo generates a List as unmodifiableList

Lower Bound is 0
Upper Bound is *

this is how Texo generates me the List

public List<Car> getCars() {
return Collections.unmodifiableList(cars);
}

i would like to have the List without the unmodifiableList declaration

public List<Car> getCars() {
return cars;
}

Thanks in advanced
Igor
[Texo] Re: Avoid Collections.unmodifiableList generation [message #1131933 is a reply to message #1131503] Thu, 10 October 2013 22:22 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Igor,
It is best to add the prefix [Texo] to the subject. For your question, that's for sure possible, see this wiki page:
http://wiki.eclipse.org/Texo/Code_Generation_Patterns#Generation_of_a_safe_bi-directional_association_API_.28or_not.29

Probably you have to set some epackage setting differently. Note that if you use the Texo project nature that you can
set some properties/option from the Texo configuration (right click on the dev project and you should fine a Texo
submenu), this page is somewhat outdated:
http://wiki.eclipse.org/Texo/Generate_Artifacts

gr, Martin

On 10/10/2013 07:24 PM, Igor S wrote:
> Hi,
>
> i would like to avoid that Texo generates a List as unmodifiableList
>
> Lower Bound is 0
> Upper Bound is *
>
> this is how Texo generates me the List
> public List<Car> getCars() {
> return Collections.unmodifiableList(cars);
> }
>
> i would like to have the List without the unmodifiableList declaration
>
> public List<Car> getCars() {
> return cars;
> }
>
> Thanks in advanced
> Igor


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:[Texo] getReferringObjects triggers exception
Next Topic:[jet] Controlling the template path
Goto Forum:
  


Current Time: Sat Nov 22 14:32:28 GMT 2014

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

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