Home » Modeling » UML2 » How to add comments for any Model Object
How to add comments for any Model Object [message #478120] |
Wed, 14 January 2009 10:27 |
|
Hi All;
By using given types of code, I am comfortable to generate any type of
Model Object like Class, Activity, Edge, Control Flow etc.
org.eclipse.uml2.uml.Class class = package.createOwnedClass("My Class",
isAbstract);
But I am unable to add/generate the comment tag in the generated .uml
file. Due to not given any method like setComments() etc.
Please let me tell that How can I add comments in my .uml file for any
generated model object.
Thanks in Advance
Kishore
Regards,
Kishore
|
|
|
Re: How to add comments for any Model Object [message #478122 is a reply to message #478120] |
Wed, 14 January 2009 15:41 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi Kishore,
Element exposes a createOwnedComment() method, or you could call
getOwnedComments().add(myComment).
Since every type in uml extends uml:Element, you should be able to add
comments to any uml Element.
Cheers,
- James.
"kishore " <kishore_74_lko@yahoo.com> wrote in message
news:14e308cec209e0387ecc167aec660fa8$1@www.eclipse.org...
> Hi All;
>
> By using given types of code, I am comfortable to generate any type of
> Model Object like Class, Activity, Edge, Control Flow etc.
>
> org.eclipse.uml2.uml.Class class = package.createOwnedClass("My Class",
> isAbstract);
>
>
> But I am unable to add/generate the comment tag in the generated .uml
> file. Due to not given any method like setComments() etc.
>
>
> Please let me tell that How can I add comments in my .uml file for any
> generated model object.
>
>
>
> Thanks in Advance
> Kishore
|
|
|
Re: How to add comments for any Model Object [message #478124 is a reply to message #478122] |
Wed, 14 January 2009 18:28 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Even to comments!
;-)
James Bruck wrote:
> Hi Kishore,
>
> Element exposes a createOwnedComment() method, or you could call
> getOwnedComments().add(myComment).
> Since every type in uml extends uml:Element, you should be able to add
> comments to any uml Element.
>
> Cheers,
> - James.
-----8<-----
|
|
| | |
Re: How to add comments for any Model Object [message #627328 is a reply to message #478120] |
Wed, 14 January 2009 15:41 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi Kishore,
Element exposes a createOwnedComment() method, or you could call
getOwnedComments().add(myComment).
Since every type in uml extends uml:Element, you should be able to add
comments to any uml Element.
Cheers,
- James.
"kishore " <kishore_74_lko@yahoo.com> wrote in message
news:14e308cec209e0387ecc167aec660fa8$1@www.eclipse.org...
> Hi All;
>
> By using given types of code, I am comfortable to generate any type of
> Model Object like Class, Activity, Edge, Control Flow etc.
>
> org.eclipse.uml2.uml.Class class = package.createOwnedClass("My Class",
> isAbstract);
>
>
> But I am unable to add/generate the comment tag in the generated .uml
> file. Due to not given any method like setComments() etc.
>
>
> Please let me tell that How can I add comments in my .uml file for any
> generated model object.
>
>
>
> Thanks in Advance
> Kishore
|
|
|
Re: How to add comments for any Model Object [message #627330 is a reply to message #478122] |
Wed, 14 January 2009 18:28 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Even to comments!
;-)
James Bruck wrote:
> Hi Kishore,
>
> Element exposes a createOwnedComment() method, or you could call
> getOwnedComments().add(myComment).
> Since every type in uml extends uml:Element, you should be able to add
> comments to any uml Element.
>
> Cheers,
> - James.
-----8<-----
|
|
| | |
Goto Forum:
Current Time: Thu Apr 25 06:36:04 GMT 2024
Powered by FUDForum. Page generated in 0.03479 seconds
|