Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [HUTN] Problem Linux with property "upper" of the UML.ecore
[HUTN] Problem Linux with property "upper" of the UML.ecore [message #501872] Fri, 04 December 2009 03:57 Go to next message
Raul  is currently offline Raul
Messages: 14
Registered: November 2009
Junior Member
Hi, I am working with epsilon_0.8.8 in linux and I am using eclipse Ganymede 3.4.0.
I have problem with property "upper" of the model "UML.ecore".
I test the same file in Windows XP and I have not any problem.
Thanks!

This file HUTN shows this error: Reason: Expected UnlimitedNatural for: upper.
@Spec {
	metamodel "UML" {
		nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
	}
}

uml {
	Model "Model1"{
		name: "Model1"
		nestedPackage: Package "Package1"
	}
	
	Package "Package1"{
		name: "Package1"
		packagedElement: 	Class "Class1" {name : "Class1"}, 
							Class "Class2" {name : "Class2"}, 
							Association "Association1" {
								name : "Association1"
								ownedEnd: Property "src1" {
											name : "src1"
											type : Class "Class1"
											upper : -1
											lower : 1
										},
										Property "dst1"{
											name : "dst1"
											type : Class "Class2"
											upper : -1 // FAILS HERE
											lower : 1
										}
								memberEnd: Property "src2", Property "dst2"
							},
							Property "scr2",
							Property "dst2"
	}

	Property "src2"{
		name : "src2"
		type : Class "Class1"
		upper : -1
		lower : 1
	}
	
	Property "dst2"{
		name : "dst2"
		type : Class "Class2"
		upper : 1
		lower : 1
	}
	
}


[Updated on: Fri, 04 December 2009 04:03]

Report message to a moderator

Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #501977 is a reply to message #501872] Fri, 04 December 2009 11:08 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Raul,

Reply below...

Raul wrote on Fri, 04 December 2009 03:57
Hi, I am working with epsilon_0.8.8 in linux and I am using eclipse Ganymede 3.4.0.
I have problem with property "upper" of the model "UML.ecore".
I test the same file in Windows XP and I have not any problem.
Thanks!

This file HUTN shows this error: Reason: Expected UnlimitedNatural for: upper.
@Spec {
	metamodel "UML" {
		nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
	}
}

uml {
	Model "Model1"{
		name: "Model1"
		nestedPackage: Package "Package1"
	}
	
	Package "Package1"{
		name: "Package1"
		packagedElement: 	Class "Class1" {name : "Class1"}, 
							Class "Class2" {name : "Class2"}, 
							Association "Association1" {
								name : "Association1"
								ownedEnd: Property "src1" {
											name : "src1"
											type : Class "Class1"
											upper : -1
											lower : 1
										},
										Property "dst1"{
											name : "dst1"
											type : Class "Class2"
											upper : -1 // FAILS HERE
											lower : 1
										}
								memberEnd: Property "src2", Property "dst2"
							},
							Property "scr2",
							Property "dst2"
	}

	Property "src2"{
		name : "src2"
		type : Class "Class1"
		upper : -1
		lower : 1
	}
	
	Property "dst2"{
		name : "dst2"
		type : Class "Class2"
		upper : 1
		lower : 1
	}
	
}





The values in the packagedElement slot of Package1 don't look right to me. The first 3 are objects and the last 2 are references to objects. The values in a slot must all be primitives, objects or references, and not a mixture.

Therefore, it seems that the corrected code might be:

@Spec {
	metamodel "UML" {
		nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
	}
}

uml {
	Model "Model1"{
		name: "Model1"
		nestedPackage: Package "Package1"
	}
	
	Package "Package1"{
		name: "Package1"
		packagedElement: 	Class "Class1" {name : "Class1"}, 
							Class "Class2" {name : "Class2"}, 
							Association "Association1" {
								name : "Association1"
								ownedEnd: Property "src1" {
											name : "src1"
											type : Class "Class1"
											upper : -1
											lower : 1
										},
										Property "dst1"{
											name : "dst1"
											type : Class "Class2"
											upper : -1 // FAILS HERE
											lower : 1
										}
								memberEnd: Property "src2", Property "dst2"
							},
							Property "src2"{
								name : "src2"
								type : Class "Class1"
								upper : -1
								lower : 1
							},
							Property "dst2"{
								name : "dst2"
								type : Class "Class2"
								upper : 1
								lower : 1
							}
	}
}


However, in the version of UML that I'm using (3.0.0), Property is not a subclass of PackagableElement, so I get an error for the above code.

A correct specification for me places the properties inside ownedAttribute slots of the classes, like this:

@Spec {
	metamodel "UML" {
		nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
	}
}

uml {
	Model "Model1"{
		name: "Model1"
		nestedPackage: Package "Package1"
	}
	
	Package "Package1"{
		name: "Package1"
		packagedElement: 	Class "Class1" {
								name : "Class1"
								ownedAttribute: Property "dst2"{
										name : "dst2"
										type : Class "Class2"
										upper : 1
										lower : 1
									}
							}, 
							Class "Class2" {
								name : "Class2"
								ownedAttribute: Property "src2"{
													name : "src2"
													type : Class "Class1"
													upper : -1
													lower : 1
												}
							}, 
							Association "Association1" {
								name : "Association1"
								ownedEnd: Property "src1" {
											name : "src1"
											type : Class "Class1"
											upper : -1
											lower : 1
										},
										Property "dst1"{
											name : "dst1"
											type : Class "Class2"
											upper : -1 // FAILS HERE
											lower : 1
										}
								memberEnd: Property "src2", Property "dst2"
							}						
	}
}


The error message that you received seems counter-intuitive. I will investigate, and see if we can produce a better error message when mixed values are provided for a slot.

Hope this helps,
Louis.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #501992 is a reply to message #501977] Fri, 04 December 2009 11:35 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Raul,

I've changed the HUTN parser to disallow mixed containment and reference values in the same slot. The changes are available from the Epsilon SVN now, and will be included in the next release of HUTN / Epsilon.

The bug report is here, which will be updated when the fix is released:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=296930

Thanks for reporting the issue, and apologies for the inconvenience.

Best,
Louis.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #502639 is a reply to message #501872] Wed, 09 December 2009 04:26 Go to previous messageGo to next message
Raul  is currently offline Raul
Messages: 14
Registered: November 2009
Junior Member
Thanks for your help, I have modified the file HUTN without references, but if I use Linux (Ubuntu) I have the same problem with property "upper". If I use Windows XP I have not this problem and the model is generated correctly.
I can't understand what happens.

@Spec {
	metamodel "UML" {
		nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
	}
}

uml {
	Model "Model1"{
		name: "Model1"
		nestedPackage: Package "Package1"
	}
	
	Package "Package1"{
		name: "Package1"
		packagedElement: 	Class "Class1" {
								name : "Class1"
								ownedAttribute: Property "dst2"{
										name : "dst2"
										type : Class "Class2"
										upper : 1 // FAILS HERE
										lower : 1
									}
							}, 
							Class "Class2" {
								name : "Class2"
								ownedAttribute: Property "src2"{
													name : "src2"
													type : Class "Class1"
													upper : -1 // FAILS HERE
													lower : 1
												}
							}, 
							Association "Association1" {
								name : "Association1"
								ownedEnd: Property "src1" {
											name : "src1"
											type : Class "Class1"
											upper : -1 // FAILS HERE
											lower : 1
										},
										Property "dst1"{
											name : "dst1"
											type : Class "Class2"
											upper : -1 // FAILS HERE
											lower : 1
										}
								memberEnd: Property "src2", Property "dst2"
							}						
	}
}
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #502815 is a reply to message #502639] Wed, 09 December 2009 14:27 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Raul,

Sorry to hear that this is still causing problems.

What versions of EMF and HUTN do you have on Windows XP and on Linux? (Help | About | Installation Details should contain this information). Perhaps the difference in behaviour is due to a difference in versions?

Cheers,
Louis.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #502897 is a reply to message #501872] Thu, 10 December 2009 03:48 Go to previous messageGo to next message
Raul  is currently offline Raul
Messages: 14
Registered: November 2009
Junior Member
I have same version for Linux and WindowsXP I used the same zip file (org.eclipse.epsilon_0.8.8_incubation.zip), I have this versions:

EMF - Eclipse Modeling Framework Coreruntime 2.4.0.v200806091234
Human Usable Textual Notification (Incubation) 0.7.8.200910281243


Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #502923 is a reply to message #502897] Thu, 10 December 2009 05:38 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Raul wrote on Thu, 10 December 2009 03:48
I have same version for Linux and WindowsXP I used the same zip file (org.eclipse.epsilon_0.8.8_incubation.zip), I have this versions:

EMF - Eclipse Modeling Framework Coreruntime 2.4.0.v200806091234
Human Usable Textual Notification (Incubation) 0.7.8.200910281243



Thanks Raul. I'll try to reproduce the problem with this version of EMF and HUTN, and get back to you.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #502968 is a reply to message #502923] Thu, 10 December 2009 08:33 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Raul,

I've installed Ganymede and the above versions of EMF and HUTN on a Ubuntu system, and I'm unable to reproduce this problem.

Could you export and email to me the project that causes the error on your system? (louis AT cs DOT york DOT ac DOT uk)

How are you converting your HUTN file to a model: with the "Generate Model" action on the right-click menu, or automatically by enabling the HUTN nature on your project?

Cheers,
Louis.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #503896 is a reply to message #501872] Tue, 15 December 2009 23:44 Go to previous messageGo to next message
Raul  is currently offline Raul
Messages: 14
Registered: November 2009
Junior Member
Thanks for your help, I have resolved the problem I have installed the epsilon plugins other time and now I haven't the problem with "upper" property.

Bye.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #503916 is a reply to message #503896] Wed, 16 December 2009 07:03 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Raul,

I'm glad that you have resolved the problem. It sounds like the problem may have been caused by an older version of the Epsilon plugins.

Cheers,
Louis.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #583432 is a reply to message #501872] Fri, 04 December 2009 11:08 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Raul,

Reply below...

Raul wrote on Fri, 04 December 2009 03:57
> Hi, I am working with epsilon_0.8.8 in linux and I am using eclipse Ganymede 3.4.0.
> I have problem with property "upper" of the model "UML.ecore".
> I test the same file in Windows XP and I have not any problem.
> Thanks!
>
> This file HUTN shows this error: Reason: Expected UnlimitedNatural for: upper.
>
> @Spec {
> metamodel "UML" {
> nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
> }
> }
>
> uml {
> Model "Model1"{
> name: "Model1"
> nestedPackage: Package "Package1"
> }
>
> Package "Package1"{
> name: "Package1"
> packagedElement: Class "Class1" {name : "Class1"},
> Class "Class2" {name : "Class2"},
> Association "Association1" {
> name : "Association1"
> ownedEnd: Property "src1" {
> name : "src1"
> type : Class "Class1"
> upper : -1
> lower : 1
> },
> Property "dst1"{
> name : "dst1"
> type : Class "Class2"
> upper : -1 // FAILS HERE
> lower : 1
> }
> memberEnd: Property "src2", Property "dst2"
> },
> Property "scr2",
> Property "dst2"
> }
>
> Property "src2"{
> name : "src2"
> type : Class "Class1"
> upper : -1
> lower : 1
> }
>
> Property "dst2"{
> name : "dst2"
> type : Class "Class2"
> upper : 1
> lower : 1
> }
>
> }


The values in the packagedElement slot of Package1 don't look right to me. The first 3 are objects and the last 2 are references to objects. The values in a slot must all be primitives, objects or references, and not a mixture.

Therefore, it seems that the corrected code might be:

@Spec {
metamodel "UML" {
nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
}
}

uml {
Model "Model1"{
name: "Model1"
nestedPackage: Package "Package1"
}

Package "Package1"{
name: "Package1"
packagedElement: Class "Class1" {name : "Class1"},
Class "Class2" {name : "Class2"},
Association "Association1" {
name : "Association1"
ownedEnd: Property "src1" {
name : "src1"
type : Class "Class1"
upper : -1
lower : 1
},
Property "dst1"{
name : "dst1"
type : Class "Class2"
upper : -1 // FAILS HERE
lower : 1
}
memberEnd: Property "src2", Property "dst2"
},
Property "src2"{
name : "src2"
type : Class "Class1"
upper : -1
lower : 1
},
Property "dst2"{
name : "dst2"
type : Class "Class2"
upper : 1
lower : 1
}
}
}

However, in the version of UML that I'm using (3.0.0), Property is not a subclass of PackagableElement, so I get an error for the above code.

A correct specification for me places the properties inside ownedAttribute slots of the classes, like this:

@Spec {
metamodel "UML" {
nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
}
}

uml {
Model "Model1"{
name: "Model1"
nestedPackage: Package "Package1"
}

Package "Package1"{
name: "Package1"
packagedElement: Class "Class1" {
name : "Class1"
ownedAttribute: Property "dst2"{
name : "dst2"
type : Class "Class2"
upper : 1
lower : 1
}
},
Class "Class2" {
name : "Class2"
ownedAttribute: Property "src2"{
name : "src2"
type : Class "Class1"
upper : -1
lower : 1
}
},
Association "Association1" {
name : "Association1"
ownedEnd: Property "src1" {
name : "src1"
type : Class "Class1"
upper : -1
lower : 1
},
Property "dst1"{
name : "dst1"
type : Class "Class2"
upper : -1 // FAILS HERE
lower : 1
}
memberEnd: Property "src2", Property "dst2"
}
}
}

The error message that you received seems counter-intuitive. I will investigate, and see if we can produce a better error message when mixed values are provided for a slot.

Hope this helps,
Louis.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #583633 is a reply to message #501872] Wed, 09 December 2009 04:26 Go to previous messageGo to next message
Raul  is currently offline Raul
Messages: 14
Registered: November 2009
Junior Member
Thanks for your help, I have modified the file HUTN without references, but if I use Linux (Ubuntu) I have the same problem with property "upper". If I use Windows XP I have not this problem and the model is generated correctly.
I can't understand what happens.


@Spec {
metamodel "UML" {
nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
}
}

uml {
Model "Model1"{
name: "Model1"
nestedPackage: Package "Package1"
}

Package "Package1"{
name: "Package1"
packagedElement: Class "Class1" {
name : "Class1"
ownedAttribute: Property "dst2"{
name : "dst2"
type : Class "Class2"
upper : 1 // FAILS HERE
lower : 1
}
},
Class "Class2" {
name : "Class2"
ownedAttribute: Property "src2"{
name : "src2"
type : Class "Class1"
upper : -1 // FAILS HERE
lower : 1
}
},
Association "Association1" {
name : "Association1"
ownedEnd: Property "src1" {
name : "src1"
type : Class "Class1"
upper : -1 // FAILS HERE
lower : 1
},
Property "dst1"{
name : "dst1"
type : Class "Class2"
upper : -1 // FAILS HERE
lower : 1
}
memberEnd: Property "src2", Property "dst2"
}
}
}
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #583679 is a reply to message #583633] Wed, 09 December 2009 14:27 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Raul,

Sorry to hear that this is still causing problems.

What versions of EMF and HUTN do you have on Windows XP and on Linux? (Help | About | Installation Details should contain this information). Perhaps the difference in behaviour is due to a difference in versions?

Cheers,
Louis.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #583691 is a reply to message #501872] Thu, 10 December 2009 03:48 Go to previous messageGo to next message
Raul  is currently offline Raul
Messages: 14
Registered: November 2009
Junior Member
I have same version for Linux and WindowsXP I used the same zip file (org.eclipse.epsilon_0.8.8_incubation.zip), I have this versions:

EMF - Eclipse Modeling Framework Coreruntime 2.4.0.v200806091234
Human Usable Textual Notification (Incubation) 0.7.8.200910281243
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #583705 is a reply to message #583691] Thu, 10 December 2009 05:38 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Raul wrote on Thu, 10 December 2009 03:48
> I have same version for Linux and WindowsXP I used the same zip file (org.eclipse.epsilon_0.8.8_incubation.zip), I have this versions:
>
> EMF - Eclipse Modeling Framework Coreruntime 2.4.0.v200806091234
> Human Usable Textual Notification (Incubation) 0.7.8.200910281243


Thanks Raul. I'll try to reproduce the problem with this version of EMF and HUTN, and get back to you.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #583716 is a reply to message #583705] Thu, 10 December 2009 08:33 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Raul,

I've installed Ganymede and the above versions of EMF and HUTN on a Ubuntu system, and I'm unable to reproduce this problem.

Could you export and email to me the project that causes the error on your system? (louis AT cs DOT york DOT ac DOT uk)

How are you converting your HUTN file to a model: with the "Generate Model" action on the right-click menu, or automatically by enabling the HUTN nature on your project?

Cheers,
Louis.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #583793 is a reply to message #501872] Tue, 15 December 2009 23:44 Go to previous messageGo to next message
Raul  is currently offline Raul
Messages: 14
Registered: November 2009
Junior Member
Thanks for your help, I have resolved the problem I have installed the epsilon plugins other time and now I haven't the problem with "upper" property.

Bye.
Re: [HUTN] Problem Linux with property "upper" of the UML.ecore [message #583821 is a reply to message #503896] Wed, 16 December 2009 07:03 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Raul,

I'm glad that you have resolved the problem. It sounds like the problem may have been caused by an older version of the Epsilon plugins.

Cheers,
Louis.
Previous Topic:Java 1.5 Compliance Problem
Next Topic:Code Completion for EWL
Goto Forum:
  


Current Time: Sat Apr 19 00:38:44 EDT 2014

Powered by FUDForum. Page generated in 0.04213 seconds