Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [ Teneo ] Comments as annotations?
[ Teneo ] Comments as annotations? [message #89459] Thu, 12 July 2007 19:14 Go to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Hi all,

So I've got my local build to put comments into the hbm file based on the
<documentation> tags in the xsd/ecore. That's all working nicely and for my
needs that's enough.

However, in the default case you don't generate your hbm from ecore
directly, you just let teneo generate hbm from the class files that are
present. I haven't found a way to access the documentation in that
scenario. The data is present in a <!-- begin-model-doc --> section of the
comment holding the model documentation, but I don't think I there's any way
to access that at runtime.

It seems like <!-- begin-model-doc --> would be more useful as some kind of
@model-doc annotation, though I can imagine that there would be all kinds of
hassels for someone making that work.

Am I off-base? Is there some way to access the model documentation at
runtime when I the user doesn't have ecore handy? If not, then I'm going to
call this done and package it up for submission. There will probably have
to be some documentation saying that you must generate from ecore in order
to get the comments.

Thanks,

Jason Henriksen
Re: [ Teneo ] Comments as annotations? [message #89487 is a reply to message #89459] Thu, 12 July 2007 19:31 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
Also in the direct case Teneo will make use of the ecore model, only it is the runtime ecore model
which is build up by the generated EPackageImpl. So I think it should work in both cases.
You can check by getting the hbm by calling datastore.getMappingXML.

I have checked in many changes the last few days. Can you check if you are up-to-date with your changes?

gr. Martin

Jason Henriksen wrote:
> Hi all,
>
> So I've got my local build to put comments into the hbm file based on the
> <documentation> tags in the xsd/ecore. That's all working nicely and for my
> needs that's enough.
>
> However, in the default case you don't generate your hbm from ecore
> directly, you just let teneo generate hbm from the class files that are
> present. I haven't found a way to access the documentation in that
> scenario. The data is present in a <!-- begin-model-doc --> section of the
> comment holding the model documentation, but I don't think I there's any way
> to access that at runtime.
>
> It seems like <!-- begin-model-doc --> would be more useful as some kind of
> @model-doc annotation, though I can imagine that there would be all kinds of
> hassels for someone making that work.
>
> Am I off-base? Is there some way to access the model documentation at
> runtime when I the user doesn't have ecore handy? If not, then I'm going to
> call this done and package it up for submission. There will probably have
> to be some documentation saying that you must generate from ecore in order
> to get the comments.
>
> Thanks,
>
> Jason Henriksen
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [ Teneo ] Comments as annotations? [message #89501 is a reply to message #89459] Thu, 12 July 2007 19:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Jason,

In EMF 2.3 we added support for the GenModel property "Suppress GenModel
Annotations", which defaults to true. But if you set it to false, the
documentation annotations will be available on the runtime instance of
the Ecore metadata. I.e., you could use
EcoreUtil.getDocumentation(XyzPackage.Literals.MY_CLASS). I'm not sure
if that helps with your problem.


Jason Henriksen wrote:
> Hi all,
>
> So I've got my local build to put comments into the hbm file based on the
> <documentation> tags in the xsd/ecore. That's all working nicely and for my
> needs that's enough.
>
> However, in the default case you don't generate your hbm from ecore
> directly, you just let teneo generate hbm from the class files that are
> present. I haven't found a way to access the documentation in that
> scenario. The data is present in a <!-- begin-model-doc --> section of the
> comment holding the model documentation, but I don't think I there's any way
> to access that at runtime.
>
> It seems like <!-- begin-model-doc --> would be more useful as some kind of
> @model-doc annotation, though I can imagine that there would be all kinds of
> hassels for someone making that work.
>
> Am I off-base? Is there some way to access the model documentation at
> runtime when I the user doesn't have ecore handy? If not, then I'm going to
> call this done and package it up for submission. There will probably have
> to be some documentation saying that you must generate from ecore in order
> to get the comments.
>
> Thanks,
>
> Jason Henriksen
>
>
>
Re: [ Teneo ] Comments as annotations? [message #89626 is a reply to message #89501] Thu, 12 July 2007 22:04 Go to previous message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Gah!

You told me that before, and since I had set it once before I thought it
must not apply to this.
I had assumed it was an eclipse wide setting, not a per-genmodel property.

Sorry for the wasted time, but at least the comments work with a run-time
generation now!

Thanks for the help,

Jason



"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f75vlr$d26$1@build.eclipse.org...
> Jason,
>
> In EMF 2.3 we added support for the GenModel property "Suppress GenModel
> Annotations", which defaults to true. But if you set it to false, the
> documentation annotations will be available on the runtime instance of
> the Ecore metadata. I.e., you could use
> EcoreUtil.getDocumentation(XyzPackage.Literals.MY_CLASS). I'm not sure
> if that helps with your problem.
>
>
> Jason Henriksen wrote:
> > Hi all,
> >
> > So I've got my local build to put comments into the hbm file based on
the
> > <documentation> tags in the xsd/ecore. That's all working nicely and
for my
> > needs that's enough.
> >
> > However, in the default case you don't generate your hbm from ecore
> > directly, you just let teneo generate hbm from the class files that are
> > present. I haven't found a way to access the documentation in that
> > scenario. The data is present in a <!-- begin-model-doc --> section of
the
> > comment holding the model documentation, but I don't think I there's any
way
> > to access that at runtime.
> >
> > It seems like <!-- begin-model-doc --> would be more useful as some kind
of
> > @model-doc annotation, though I can imagine that there would be all
kinds of
> > hassels for someone making that work.
> >
> > Am I off-base? Is there some way to access the model documentation at
> > runtime when I the user doesn't have ecore handy? If not, then I'm
going to
> > call this done and package it up for submission. There will probably
have
> > to be some documentation saying that you must generate from ecore in
order
> > to get the comments.
> >
> > Thanks,
> >
> > Jason Henriksen
> >
> >
> >
Re: [ Teneo ] Comments as annotations? [message #608729 is a reply to message #89459] Thu, 12 July 2007 19:31 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Jason,
Also in the direct case Teneo will make use of the ecore model, only it is the runtime ecore model
which is build up by the generated EPackageImpl. So I think it should work in both cases.
You can check by getting the hbm by calling datastore.getMappingXML.

I have checked in many changes the last few days. Can you check if you are up-to-date with your changes?

gr. Martin

Jason Henriksen wrote:
> Hi all,
>
> So I've got my local build to put comments into the hbm file based on the
> <documentation> tags in the xsd/ecore. That's all working nicely and for my
> needs that's enough.
>
> However, in the default case you don't generate your hbm from ecore
> directly, you just let teneo generate hbm from the class files that are
> present. I haven't found a way to access the documentation in that
> scenario. The data is present in a <!-- begin-model-doc --> section of the
> comment holding the model documentation, but I don't think I there's any way
> to access that at runtime.
>
> It seems like <!-- begin-model-doc --> would be more useful as some kind of
> @model-doc annotation, though I can imagine that there would be all kinds of
> hassels for someone making that work.
>
> Am I off-base? Is there some way to access the model documentation at
> runtime when I the user doesn't have ecore handy? If not, then I'm going to
> call this done and package it up for submission. There will probably have
> to be some documentation saying that you must generate from ecore in order
> to get the comments.
>
> Thanks,
>
> Jason Henriksen
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [ Teneo ] Comments as annotations? [message #608730 is a reply to message #89459] Thu, 12 July 2007 19:33 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Jason,

In EMF 2.3 we added support for the GenModel property "Suppress GenModel
Annotations", which defaults to true. But if you set it to false, the
documentation annotations will be available on the runtime instance of
the Ecore metadata. I.e., you could use
EcoreUtil.getDocumentation(XyzPackage.Literals.MY_CLASS). I'm not sure
if that helps with your problem.


Jason Henriksen wrote:
> Hi all,
>
> So I've got my local build to put comments into the hbm file based on the
> <documentation> tags in the xsd/ecore. That's all working nicely and for my
> needs that's enough.
>
> However, in the default case you don't generate your hbm from ecore
> directly, you just let teneo generate hbm from the class files that are
> present. I haven't found a way to access the documentation in that
> scenario. The data is present in a <!-- begin-model-doc --> section of the
> comment holding the model documentation, but I don't think I there's any way
> to access that at runtime.
>
> It seems like <!-- begin-model-doc --> would be more useful as some kind of
> @model-doc annotation, though I can imagine that there would be all kinds of
> hassels for someone making that work.
>
> Am I off-base? Is there some way to access the model documentation at
> runtime when I the user doesn't have ecore handy? If not, then I'm going to
> call this done and package it up for submission. There will probably have
> to be some documentation saying that you must generate from ecore in order
> to get the comments.
>
> Thanks,
>
> Jason Henriksen
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [ Teneo ] Comments as annotations? [message #608738 is a reply to message #89501] Thu, 12 July 2007 22:04 Go to previous message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Gah!

You told me that before, and since I had set it once before I thought it
must not apply to this.
I had assumed it was an eclipse wide setting, not a per-genmodel property.

Sorry for the wasted time, but at least the comments work with a run-time
generation now!

Thanks for the help,

Jason



"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f75vlr$d26$1@build.eclipse.org...
> Jason,
>
> In EMF 2.3 we added support for the GenModel property "Suppress GenModel
> Annotations", which defaults to true. But if you set it to false, the
> documentation annotations will be available on the runtime instance of
> the Ecore metadata. I.e., you could use
> EcoreUtil.getDocumentation(XyzPackage.Literals.MY_CLASS). I'm not sure
> if that helps with your problem.
>
>
> Jason Henriksen wrote:
> > Hi all,
> >
> > So I've got my local build to put comments into the hbm file based on
the
> > <documentation> tags in the xsd/ecore. That's all working nicely and
for my
> > needs that's enough.
> >
> > However, in the default case you don't generate your hbm from ecore
> > directly, you just let teneo generate hbm from the class files that are
> > present. I haven't found a way to access the documentation in that
> > scenario. The data is present in a <!-- begin-model-doc --> section of
the
> > comment holding the model documentation, but I don't think I there's any
way
> > to access that at runtime.
> >
> > It seems like <!-- begin-model-doc --> would be more useful as some kind
of
> > @model-doc annotation, though I can imagine that there would be all
kinds of
> > hassels for someone making that work.
> >
> > Am I off-base? Is there some way to access the model documentation at
> > runtime when I the user doesn't have ecore handy? If not, then I'm
going to
> > call this done and package it up for submission. There will probably
have
> > to be some documentation saying that you must generate from ecore in
order
> > to get the comments.
> >
> > Thanks,
> >
> > Jason Henriksen
> >
> >
> >
Previous Topic:Teneo Release Update (0.8.0) - please read for backward compatibility
Next Topic:[EMF Compare] NullViewer opening
Goto Forum:
  


Current Time: Thu Apr 25 11:18:17 GMT 2024

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

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

Back to the top