Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Adding operations to Class Diagram (Adding operations to Class Diagram )
Adding operations to Class Diagram [message #524001] Tue, 30 March 2010 09:06 Go to next message
savutu  is currently offline savutu Friend
Messages: 4
Registered: March 2010
Junior Member
Hi,

I am trying to add operations to a class diagram. I am able to add simple operation like add(), but how can I set In parameters and return type of this operation,please suggest

thanks,
Re: Adding operations to Class Diagram [message #524493 is a reply to message #524001] Thu, 01 April 2010 07:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: arendt.mathematik.uni-marburg.de

Hi,

> how can I set In parameters

context menu (click right) -> manage parameters


> and return type of this operation,

properties sheet -> Type


GreetX,
Thorsten
Re: Adding operations to Class Diagram [message #546917 is a reply to message #524493] Wed, 14 July 2010 15:32 Go to previous messageGo to next message
Tonté  Pouncil is currently offline Tonté PouncilFriend
Messages: 13
Registered: July 2009
Junior Member
I am having the same problem when it comes to specifying type that are not primatives. For example, I would like to greate an operation like so: +getSearchResults():List<SomeObject> or +getSearchResults():<Generalization Set> SomeObject>.

Any suggestion would be greatly appreciated.

Thanks!
Re: Adding operations to Class Diagram [message #549130 is a reply to message #546917] Sat, 24 July 2010 23:58 Go to previous message
Andres  is currently offline Andres Friend
Messages: 57
Registered: July 2010
Member
For example for the operation +getSearchResults():List<>

1-click left on your class, and clik operation icon
2-In properties sheet set the name as getSearchResults

3-You can set the return type, in properties sheet -> Type.
To set List, you should have a Class named List, in your diagram(current resource package when you click in type properties), or in a other ecore file(load resources).

4-To set the parameters
Click left in your opeation class(in the diagram), and edit directly the name and types of parameters.For example, if your operation is op1(param1:String), write param1:String.
If you now go to context menu (click right) -> manage parameters, you can see your new parameter and type,(i can`t directly edit de type of a parameter in manage parameter)

I hope this help you.





> and return type of this operation,

properties sheet -> Type
Previous Topic:Unexpected layout of elements inside Component
Next Topic:Adding operations to Class Diagram
Goto Forum:
  


Current Time: Sun Nov 23 14:59:16 GMT 2014

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

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