Possible Error in Papyrus [message #1778596] |
Mon, 18 December 2017 06:54  |
Eclipse User |
|
|
|
Hello, im trying to use Papyrus, but when i draw a simple class diagram like:
1 employee works in one company, and one company has one employee ( 1 to 1 relation).
When i generate the code in Java it appears the company and employee class, but it doesnt appear any reference to employee or company....
What i get ( two files employee.java and company.java):
class employee {
char idemp;
//other attributes
}
class company {
char idcompany;
//other attributes
}
what i expected ( and think should be)
class employee
{
char idemp;
//other attributes
Company cmp;
}
class company {
char idcompany;
//other attributes
Employee emp;
}
Because in one to one relation, you have to assign zero or one value to the other class.
I dont know if its some properties or settings problem
I think that relations with many ( one to many, many to many) its ok, as appears an Array of elements of the class.
ex: one company has many employees
class company {
char idcompany;
//other attributes
Employee[] emp;
}
i think this is ok.
Im using latest Eclipse version with Papyrus form Eclipse Market.
Thanks
|
|
|
|
|
Re: Possible Error in Papyrus [message #1778752 is a reply to message #1778724] |
Wed, 20 December 2017 15:45  |
Eclipse User |
|
|
|
Hello Eduardo,
If you create a property (or operation) in the model explorer, it may not show up in the element compartment on a diagram.
Have you tried to right-click on the diagram element and selecting "Filters > Show/Hide Contents" in order to show what you need to see?
Alternately, you if you always want to see all the content, you could turn on "Filters > Synchronized with model."
|
|
|
Powered by
FUDForum. Page generated in 0.04069 seconds