Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Document metaclasses?
Document metaclasses? [message #431806] Mon, 27 July 2009 15:59 Go to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Is it possible to add some documentation to metaclasses in a metamodel?
And is it possible to let the documentation be displayed in some place
of the second Eclipse instance containing the generated editor?`Maybe in
the status line?

regards
Gilbert
Re: Document metaclasses? [message #431812 is a reply to message #431806] Mon, 27 July 2009 16:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30692
Registered: July 2009
Senior Member
Gilbert,

With EAnnotations, anything is possible.
EcoreUtil.getDocumentation/setDocumentation shows how documentation that
will appear in the generated Javadoc is supported.


Gilbert Mirenque wrote:
> Is it possible to add some documentation to metaclasses in a metamodel?
> And is it possible to let the documentation be displayed in some place
> of the second Eclipse instance containing the generated editor?`Maybe in
> the status line?
>
> regards
> Gilbert
>
Re: Document metaclasses? [message #431877 is a reply to message #431812] Tue, 28 July 2009 15:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Ed Merks wrote:
> Gilbert,
>
> With EAnnotations, anything is possible.
> EcoreUtil.getDocumentation/setDocumentation shows how documentation that
> will appear in the generated Javadoc is supported.

Thanks Ed. Now I'm trying to get an EModelElement to pass to
getDocumentation. When an element is selected in the tree of the
generated editor I only get the EObject instance. How can I get then the
EModelElement?
Re: Document metaclasses? [message #431887 is a reply to message #431877] Tue, 28 July 2009 16:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30692
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080004050602010706050607
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Gilbert,

You'll have to do an instance of test and cast. Or if you have
instances of some model, you'd use eClass() to get at the Ecore model
for it...


Gilbert Mirenque wrote:
> Ed Merks wrote:
>
>> Gilbert,
>>
>> With EAnnotations, anything is possible.
>> EcoreUtil.getDocumentation/setDocumentation shows how documentation that
>> will appear in the generated Javadoc is supported.
>>
>
> Thanks Ed. Now I'm trying to get an EModelElement to pass to
> getDocumentation. When an element is selected in the tree of the
> generated editor I only get the EObject instance. How can I get then the
> EModelElement?
>

--------------080004050602010706050607
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gilbert,<br>
<br>
You'll have to do an instance of test and cast.  Or if you have
instances of some model, you'd use eClass() to get at the Ecore model
for it...<br>
<br>
<br>
Gilbert Mirenque wrote:
<blockquote cite="mid:h4n5h5$ns6$1@build.eclipse.org" type="cite">
<pre wrap="">Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Gilbert,

With EAnnotations, anything is possible.
EcoreUtil.getDocumentation/setDocumentation shows how documentation that
will appear in the generated Javadoc is supported.
</pre>
</blockquote>
<pre wrap=""><!---->
Thanks Ed. Now I'm trying to get an EModelElement to pass to
getDocumentation. When an element is selected in the tree of the
generated editor I only get the EObject instance. How can I get then the
EModelElement?
</pre>
</blockquote>
</body>
</html>

--------------080004050602010706050607--
Re: Document metaclasses? [message #431892 is a reply to message #431887] Tue, 28 July 2009 17:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Ed Merks wrote:
> You'll have to do an instance of test and cast.
That's not possible because my objects are only EObjects. Did I forget
to specify a special Ecore supertype for the elements in my metamodel?

> Or if you have
> instances of some model, you'd use eClass() to get at the Ecore model
> for it...

How do I get then to the EModelElement if I have the EClass?

Sorry for the silly questions but those are my first real steps with emf.
Re: Document metaclasses? [message #431898 is a reply to message #431892] Tue, 28 July 2009 23:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30692
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020901080905050608090508
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Gilbert,

An EClass is an EModelElement.


Gilbert Mirenque wrote:
> Ed Merks wrote:
>
>> You'll have to do an instance of test and cast.
>>
> That's not possible because my objects are only EObjects. Did I forget
> to specify a special Ecore supertype for the elements in my metamodel?
>
>
>> Or if you have
>> instances of some model, you'd use eClass() to get at the Ecore model
>> for it...
>>
>
> How do I get then to the EModelElement if I have the EClass?
>
> Sorry for the silly questions but those are my first real steps with emf.
>

--------------020901080905050608090508
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gilbert,<br>
<br>
An EClass is an EModelElement.<br>
<br>
<br>
Gilbert Mirenque wrote:
<blockquote cite="mid:h4nc0p$uij$1@build.eclipse.org" type="cite">
<pre wrap="">
Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">You'll have to do an instance of test and cast.
</pre>
</blockquote>
<pre wrap=""><!---->That's not possible because my objects are only EObjects. Did I forget
to specify a special Ecore supertype for the elements in my metamodel?

</pre>
<blockquote type="cite">
<pre wrap="">Or if you have
instances of some model, you'd use eClass() to get at the Ecore model
for it...
</pre>
</blockquote>
<pre wrap=""><!---->
How do I get then to the EModelElement if I have the EClass?

Sorry for the silly questions but those are my first real steps with emf.
</pre>
</blockquote>
</body>
</html>

--------------020901080905050608090508--
Re: Document metaclasses? [message #431907 is a reply to message #431898] Wed, 29 July 2009 08:33 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Ed Merks wrote:
> Gilbert,
>
> An EClass is an EModelElement.
Doh...thanks one more time Ed :)

best regards,
Gilbert
Previous Topic:Which query language is it and how to change it?
Next Topic:cdo - unimplemented methods and missing repositories
Goto Forum:
  


Current Time: Thu Dec 12 19:53:58 GMT 2019

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

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

Back to the top