Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to control default javadoc creation..(Switching off default Javadoc content..)
How to control default javadoc creation.. [message #1020214] Sun, 17 March 2013 15:29 Go to next message
Kapil Gambhir is currently offline Kapil Gambhir
Messages: 5
Registered: March 2013
Junior Member
The default EMF javadoc has contents which reads like "If the meaning of the ... attribute isn't clear,there really should be more of a description here.".
This is between <beging-user-doc> and <end-user-doc>.

Is there a way to switch off this content globally for all its instances. I am generating the ECore model from a BIG XSD file and thus want an easy option to switch it off globally.
Re: How to control default javadoc creation.. [message #1020227 is a reply to message #1020214] Sun, 17 March 2013 16:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26125
Registered: July 2009
Senior Member
Kapil,

No, there's no option to switch it off. If the feature has an
EAnnotation with source "http://www.eclipse.org/emf/2002/GenModel" and
key "documentation" the value of that key will be emitted instead. If
the XSD contained documentation element, that would be automatically
converted to corresponding Ecore annotations.


On 17/03/2013 4:29 PM, Kapil Gambhir wrote:
> The default EMF javadoc has contents which reads like "If the meaning
> of the ... attribute isn't clear,there really should be more of a
> description here.".
> This is between <beging-user-doc> and <end-user-doc>.
>
> Is there a way to switch off this content globally for all its
> instances. I am generating the ECore model from a BIG XSD file and
> thus want an easy option to switch it off globally.
Re: How to control default javadoc creation.. [message #1020241 is a reply to message #1020227] Sun, 17 March 2013 17:30 Go to previous messageGo to next message
Kapil Gambhir is currently offline Kapil Gambhir
Messages: 5
Registered: March 2013
Junior Member
Ed, appreciate a prompt response.
Yes i tried the approach that u mentioned and this way the custom doc content (i.e. value of key "documentation"), mentioned in the ecore is generated inside <!-- begin-model-doc --> ..<!-- end-model-doc --> and the earlier one is not emitted.
The challenge i have is that the number of these instances is quite high (and thus not efficient to be done manually).

I guess the intent of this default value is to ensure owners provide something meaningful, but am wondering if its a good idea to provide a ecore directive to switch it off, which is also an indication that the owner of the model owns what comes out.

As a side note, if i want to hide the documentation for certain elements or attributes, would the ecore:ignore of the xsd:documentation help.
Re: How to control default javadoc creation.. [message #1020413 is a reply to message #1020241] Mon, 18 March 2013 05:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26125
Registered: July 2009
Senior Member
Kapil,

Comments below.


On 17/03/2013 6:30 PM, Kapil Gambhir wrote:
> Ed, appreciate a prompt response.
> Yes i tried the approach that u mentioned and this way the custom doc
> content (i.e. value of key "documentation"), mentioned in the ecore is
> generated inside <!-- begin-model-doc --> ..<!-- end-model-doc --> and
> the earlier one is not emitted.
Exactly.
> The challenge i have is that the number of these instances is quite
> high (and thus not efficient to be done manually).
No, though it's only a few lines of code to read and Ecore resource, and
use Resource.getAllContents to visit each EStructuralFeature and use
EcoreUtil.setDocumentation("").
> I guess the intent of this default value is to ensure owners provide
> something meaningful,
Yes.
> but am wondering if its a good idea to provide a ecore directive to
> switch it off, which is also an indication that the owner of the model
> owns what comes out.
I suppose so. Yet more options...
> As a side note, if i want to hide the documentation for certain
> elements or attributes, would the ecore:ignore of the
> xsd:documentation help.
Yes or on the xsd:annotation itself.
Re: How to control default javadoc creation.. [message #1020568 is a reply to message #1020413] Mon, 18 March 2013 13:32 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 801
Registered: July 2009
Senior Member
Hi, Ed, Kapil,

Is this bit of the Javadoc overrideable in custom templates? If not,
factoring it out into a *.javajetinc could be a lighter-weight solution
than adding an option to the GenModel.

cW


On 2013-03-18 05:38:10 +0000, Ed Merks said:

> Kapil,
>
> Comments below.
>
>
> On 17/03/2013 6:30 PM, Kapil Gambhir wrote:
>> Ed, appreciate a prompt response.
>> Yes i tried the approach that u mentioned and this way the custom doc
>> content (i.e. value of key "documentation"), mentioned in the ecore is
>> generated inside <!-- begin-model-doc --> ..<!-- end-model-doc --> and
>> the earlier one is not emitted.
> Exactly.
>> The challenge i have is that the number of these instances is quite
>> high (and thus not efficient to be done manually).
> No, though it's only a few lines of code to read and Ecore resource,
> and use Resource.getAllContents to visit each EStructuralFeature and
> use EcoreUtil.setDocumentation("").
>> I guess the intent of this default value is to ensure owners provide
>> something meaningful,
> Yes.
>> but am wondering if its a good idea to provide a ecore directive to
>> switch it off, which is also an indication that the owner of the model
>> owns what comes out.
> I suppose so. Yet more options...
>> As a side note, if i want to hide the documentation for certain
>> elements or attributes, would the ecore:ignore of the xsd:documentation
>> help.
> Yes or on the xsd:annotation itself.
Re: How to control default javadoc creation.. [message #1020571 is a reply to message #1020568] Mon, 18 March 2013 13:39 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26125
Registered: July 2009
Senior Member
Christian,

There's only //Class/getGenFeature.javadoc.override.javajetinc that
affects the entire Javadoc comment, not just this part.


On 18/03/2013 2:32 PM, Christian W. Damus wrote:
> Hi, Ed, Kapil,
>
> Is this bit of the Javadoc overrideable in custom templates? If not,
> factoring it out into a *.javajetinc could be a lighter-weight
> solution than adding an option to the GenModel.
>
> cW
>
>
> On 2013-03-18 05:38:10 +0000, Ed Merks said:
>
>> Kapil,
>>
>> Comments below.
>>
>>
>> On 17/03/2013 6:30 PM, Kapil Gambhir wrote:
>>> Ed, appreciate a prompt response.
>>> Yes i tried the approach that u mentioned and this way the custom
>>> doc content (i.e. value of key "documentation"), mentioned in the
>>> ecore is generated inside <!-- begin-model-doc --> ..<!--
>>> end-model-doc --> and the earlier one is not emitted.
>> Exactly.
>>> The challenge i have is that the number of these instances is quite
>>> high (and thus not efficient to be done manually).
>> No, though it's only a few lines of code to read and Ecore resource,
>> and use Resource.getAllContents to visit each EStructuralFeature and
>> use EcoreUtil.setDocumentation("").
>>> I guess the intent of this default value is to ensure owners provide
>>> something meaningful,
>> Yes.
>>> but am wondering if its a good idea to provide a ecore directive to
>>> switch it off, which is also an indication that the owner of the
>>> model owns what comes out.
>> I suppose so. Yet more options...
>>> As a side note, if i want to hide the documentation for certain
>>> elements or attributes, would the ecore:ignore of the
>>> xsd:documentation help.
>> Yes or on the xsd:annotation itself.
>
>
Previous Topic:[Teneo] Table name conflict with imported package
Next Topic:[XCore/Xbase] Filtering
Goto Forum:
  


Current Time: Mon Oct 20 13:20:41 GMT 2014

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

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