Skip to main content



      Home
Home » Modeling » EMF » Option for public constructor
Option for public constructor [message #408858] Thu, 26 April 2007 20:58 Go to next message
Eclipse UserFriend
Is there an option to set in the genmodel so that the generated constructors
are public instead of protected?

Thanks
Pradeep
Re: Option for public constructor [message #408860 is a reply to message #408858] Fri, 27 April 2007 06:33 Go to previous messageGo to next message
Eclipse UserFriend
Pradeep,

No. But I suppose adding that would be quite trivial to support.
It's also possible to copy the template, modify it to be public, and use
dynamic templates to generate what you want. I wonder why you would
want it public?


Pradeep wrote:
> Is there an option to set in the genmodel so that the generated constructors
> are public instead of protected?
>
> Thanks
> Pradeep
>
>
>
Re: Option for public constructor [message #408865 is a reply to message #408860] Fri, 27 April 2007 11:11 Go to previous messageGo to next message
Eclipse UserFriend
Well, I am writing a library for others to use. As I update the existing
code using EMF, i don't want any previous code that uses this library, which
often uses the public constructor, to break. Also I want to provide a most
familiar way of creating objects.

Thanks
Pradeep


"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f0sjhe$q9p$2@build.eclipse.org...
> Pradeep,
>
> No. But I suppose adding that would be quite trivial to support. It's
> also possible to copy the template, modify it to be public, and use
> dynamic templates to generate what you want. I wonder why you would want
> it public?
>
>
> Pradeep wrote:
>> Is there an option to set in the genmodel so that the generated
>> constructors are public instead of protected?
>>
>> Thanks
>> Pradeep
>>
>>
Re: Option for public constructor [message #408869 is a reply to message #408865] Fri, 27 April 2007 12:32 Go to previous message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------060906050006070901030106
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Pradeep,

It's certainly trivial to add such an option to the generator, so open a
bugzilla feature request and we'll consider it.


Pradeep wrote:
> Well, I am writing a library for others to use. As I update the existing
> code using EMF, i don't want any previous code that uses this library, which
> often uses the public constructor, to break. Also I want to provide a most
> familiar way of creating objects.
>
> Thanks
> Pradeep
>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:f0sjhe$q9p$2@build.eclipse.org...
>
>> Pradeep,
>>
>> No. But I suppose adding that would be quite trivial to support. It's
>> also possible to copy the template, modify it to be public, and use
>> dynamic templates to generate what you want. I wonder why you would want
>> it public?
>>
>>
>> Pradeep wrote:
>>
>>> Is there an option to set in the genmodel so that the generated
>>> constructors are public instead of protected?
>>>
>>> Thanks
>>> Pradeep
>>>
>>>
>>>
>
>
>


--------------060906050006070901030106
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Pradeep,<br>
<br>
It's certainly trivial to add such an option to the generator, so open
a bugzilla feature request and we'll consider it.<br>
<br>
<br>
Pradeep wrote:
<blockquote cite="midf0t3qi$9at$1@build.eclipse.org" type="cite">
<pre wrap="">Well, I am writing a library for others to use. As I update the existing
code using EMF, i don't want any previous code that uses this library, which
often uses the public constructor, to break. Also I want to provide a most
familiar way of creating objects.

Thanks
Pradeep


"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:f0sjhe$q9p$2@build.eclipse.org">news:f0sjhe$q9p$2@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Pradeep,

No. But I suppose adding that would be quite trivial to support. It's
also possible to copy the template, modify it to be public, and use
dynamic templates to generate what you want. I wonder why you would want
it public?


Pradeep wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Is there an option to set in the genmodel so that the generated
constructors are public instead of protected?

Thanks
Pradeep


</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
<br>
</body>
</html>

--------------060906050006070901030106--
Previous Topic:[Transaction] How to do thread safe transaction demarcation
Next Topic:Overriding XMLString in XMLSaveImpl
Goto Forum:
  


Current Time: Sun Oct 19 02:56:40 EDT 2025

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

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

Back to the top