Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Return a set of Tuple in OCLInEcore editor
Return a set of Tuple in OCLInEcore editor [message #1241116] Fri, 07 February 2014 09:07 Go to next message
Capi Tali is currently offline Capi Tali
Messages: 38
Registered: February 2012
Member
Hello everyone,
When defining an operation returning a set of tuples using OCLInEcore editor like this:
operation createTupleSet() : Tuple(name : String, alias : String[*])[*] {ordered}
, the return type is always considered as Void and thus, I've always got the following error:
Quote:
An operation with void return type must have an upper bound of 1 not -1
. Would you mind telling me what is the proper way of declaring an operation with the return type containing Tuples?

Best regards,

[Updated on: Fri, 07 February 2014 09:08]

Report message to a moderator

Re: Return a set of Tuple in OCLInEcore editor [message #1241155 is a reply to message #1241116] Fri, 07 February 2014 10:02 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4031
Registered: July 2009
Senior Member
Hi

It works fine for me on the development branch.

What version are you using?

Try using a Luna milestone release that should be installable on Kepler.

Regards

Ed Willink


On 07/02/2014 14:07, Capi Tali wrote:
> Hello everyone,
> When defining an operation returning a set of tuple using OCLInEcore
> editor like this: operation createTupleSet() : Tuple(name : String,
> alias : String[*])[*] {ordered}, the return type is always considered
> as Void and thus, I've always got the following error:
> Quote:
>> An operation with void return type must have an upper bound of 1 not -1
> Would you mind telling me what is the proper way of declaring an
> operation with the return type containing Tuples.
>
> Best regards,
Re: Return a set of Tuple in OCLInEcore editor [message #1241836 is a reply to message #1241155] Sat, 08 February 2014 11:16 Go to previous messageGo to next message
Capi Tali is currently offline Capi Tali
Messages: 38
Registered: February 2012
Member
Hi Ed,
I've got the following errors while trying to install OCL-5.0.0M5 from OCL Milestones Repositories:

Quote:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.standard, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: org.eclipse.update.feature,org.eclipse.ocl.master,5.0.0.v20140124-1452


By the way, the problem is not solved with OCL-4.2.0M4 and Eclipse Luna, on my computer. Would you mind checking on this issue?

Many thanks,
Re: Return a set of Tuple in OCLInEcore editor [message #1241840 is a reply to message #1241836] Sat, 08 February 2014 11:22 Go to previous messageGo to next message
Capi Tali is currently offline Capi Tali
Messages: 38
Registered: February 2012
Member
For more information, a simple ecore model like this:
package test : test = 'http://test.fr/test/1.0'
{
	class Test
	{
		operation createTupleSet(): Tuple(name : String, alias : String[*])[*] {ordered}
		{
			body: null;
		}
	}
}

would cause the following validation error on createTupleSet if the model is opened using the Sample Ecore Model Editor:
Quote:

An operation with void return type must have an upper bound of 1 not -1


Regards,

[Updated on: Sat, 08 February 2014 11:29]

Report message to a moderator

Re: Return a set of Tuple in OCLInEcore editor [message #1243303 is a reply to message #1241836] Mon, 10 February 2014 15:23 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4031
Registered: July 2009
Senior Member
Hi

I'm totally confused.

This is a thread about a semantic error but you comment on an
installation error. So I ignore both.

Regards

Ed Willink


On 08/02/2014 16:16, Capi Tali wrote:
> Hi Ed,
> I've got the following errors while trying to install OCL-5.0.0M5 from
> OCL Milestones Repositories:
>
> Quote:
>> An error occurred while collecting items to be installed
>> session context was:(profile=epp.package.standard,
>> phase=org.eclipse.equinox.internal.p2.engine.phases.Collect,
>> operand=, action=).
>> No repository found containing:
>> org.eclipse.update.feature,org.eclipse.ocl.master,5.0.0.v20140124-1452
>
>
> By the way, the problem is not solved with OCL-4.2.0M4 and Eclipse
> Luna, on my computer. Would you mind checking on this issue?
> Many thanks,
Re: Return a set of Tuple in OCLInEcore editor [message #1243306 is a reply to message #1241840] Mon, 10 February 2014 15:29 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4031
Registered: July 2009
Senior Member
Hi

Sorry

https://bugs.eclipse.org/bugs/show_bug.cgi?id=401938#c5

shows that more work is needed to support persistence of OCL Tuples in
an Ecore environment.

Regards

Ed Willink


On 08/02/2014 16:22, Capi Tali wrote:
> For more information, a simple ecore model like this: package test :
> test = 'http://test.fr/test/1.0'
> {
> class Test
> {
> operation createTupleSet(): Tuple(name : String, alias :
> String[*])[*] {ordered}
> {
> body: null;
> }
> }
> }
> would cause the following validation error on createTupleSet:
> Quote:
>> An operation with void return type must have an upper bound of 1 not -1
>
>
> Regards,
Previous Topic:Unresolved Namespace at run-time
Next Topic:Help with OCL function
Goto Forum:
  


Current Time: Sat Aug 23 15:57:57 EDT 2014

Powered by FUDForum. Page generated in 0.01703 seconds