Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » about the using of OCLinEcore
about the using of OCLinEcore [message #855201] Tue, 24 April 2012 15:49 Go to next message
Lucy Chan is currently offline Lucy ChanFriend
Messages: 29
Registered: March 2012
Junior Member
when loading the Royal and Loyal, I found a OCLinEcore file. In this file, there were many OCL expressions. And I wonder how this file make constraints to the .ecore file? If we need to run the OCLinEcore file? Or the model will be validated accordting to the definition in the OCLinEcore?
Re: about the using of OCLinEcore [message #855215 is a reply to message #855201] Tue, 24 April 2012 16:04 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

There is no OCLinEcore file in the Royal and Loyal example.

There is a RoyalAndLoyal.ecore which is an Ecore file that may be edited
with any Ecore editor, of which OCLinEcore is just one. This file is a
pure structural meta-model; it has no embedded OCL constraints. It does
however have some very old obsolete annotations that represent one of
the earlier approaches at embedding OCL. This was superseded by the EMF
delegate technology. Thus

class CustomerCard
{
operation getTransactions(until : Date[?] { ordered }, from :
Date[?] { ordered }) : Transaction[*]
{
annotation _'http://www.eclipse.org/OCL/1.0.0/body'
(
body =
'self.transactions->select( i_Transaction : Transaction
| i_Transaction.date.isAfter(from) and i_Transaction.date.isBefore(until) )'
);
}

is an EAnnotation that looks confusingly like OCL, whereas

class CustomerCard
{
operation getTransactions(until : Date[?] { ordered }, from :
Date[?] { ordered }) : Transaction[*]
{
body:
self.transactions->select( i_Transaction : Transaction
| i_Transaction.date.isAfter(from) and i_Transaction.date.isBefore(until) );
}

would be the syntax sugar for the EAnnotation that EMF supports. I guess
this confusing content should be removed; I never noticed that it was
there when I imported the example from the OCL Tools prototype.

There is also a RoyalAndLoyal.ocl that contains the complementary
Complete OCL constraints. Prior to Juno M6, this could only be used from
Java code. There is now a Load Complete OCL Resource menu action that
would allow you to open a RoyalAndLoyal model, load the additional
constraints and see them at work using the Validate menu action, the
Sample Reflective Ecore Editor Properties View or the OCL Console.

Regards

Ed Willink


On 24/04/2012 16:49, Lucy Chan wrote:
> when loading the Royal and Loyal, I found a OCLinEcore file. In this
> file, there were many OCL expressions. And I wonder how this file make
> constraints to the .ecore file? If we need to run the OCLinEcore file?
> Or the model will be validated accordting to the definition in the
> OCLinEcore?
Re: about the using of OCLinEcore [message #855827 is a reply to message #855215] Wed, 25 April 2012 06:18 Go to previous messageGo to next message
Lucy Chan is currently offline Lucy ChanFriend
Messages: 29
Registered: March 2012
Junior Member
I'm using the Helios Packages and already installed Xtext SDK and OCL Example and Editors. But the console can only show the Interactive OCL but cannot find the Interactive Xtext OCL. BTY, where I can download the Juno M6? Since I'm not so familiar with the tool, I didn't find the Load Complete OCL Resource. Can you give me suggestions?
Thanks sincerely.
Re: about the using of OCLinEcore [message #855938 is a reply to message #855827] Wed, 25 April 2012 08:09 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The Xtext OCL Console was introduced in Indigo.

Juno M6 is available from
http://www.eclipse.org/downloads/index-developer.php.

Probably easiest to create an Eclipse Modeling Tools installation then
using the Modeling Discovery wizard to add OCL Examples and Editors.

Regards

Ed Willink

On 25/04/2012 07:18, Lucy Chan wrote:
> I'm using the Helios Packages and already installed Xtext SDK and OCL
> Example and Editors. But the console can only show the Interactive OCL
> but cannot find the Interactive Xtext OCL. BTY, where I can download
> the Juno M6? Since I'm not so familiar with the tool, I didn't find
> the Load Complete OCL Resource. Can you give me suggestions?
> Thanks sincerely.
Re: about the using of OCLinEcore [message #856356 is a reply to message #855938] Wed, 25 April 2012 15:37 Go to previous messageGo to next message
Lucy Chan is currently offline Lucy ChanFriend
Messages: 29
Registered: March 2012
Junior Member
When I try to install the OCL tools through installing modeling tools, eclipse shows some error information "An internal error occurred during: "Install download3".
Comparison method violates its general contract". Can you help me to solve it?
Re: about the using of OCLinEcore [message #856371 is a reply to message #856356] Wed, 25 April 2012 15:48 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Not without much more information about what you were doing with what
and what you actually observed.

Regards

Ed Willink

On 25/04/2012 16:37, Lucy Chan wrote:
> When I try to install the OCL tools through installing modeling tools,
> eclipse shows some error information "An internal error occurred
> during: "Install download3".
> Comparison method violates its general contract". Can you help me to
> solve it?
Re: about the using of OCLinEcore [message #857254 is a reply to message #856371] Thu, 26 April 2012 11:48 Go to previous messageGo to next message
Lucy Chan is currently offline Lucy ChanFriend
Messages: 29
Registered: March 2012
Junior Member
Since you suggest me the Xtext OCL Console was introduced in Indigo. I downloaded the Indigo Modeling tools for win32 and win64. But for win32, when I tried to installed the modeling tools using the "Installing new software" menu, Eclipse showed an error information "An internal error occurred Comparison method violates its general contract", just a few words, which puzzled me. And I also tried the win64 and this time I even cannot restart the eclipse. The attachment is the screenshot for the error in the win64 edition.
Re: about the using of OCLinEcore [message #857305 is a reply to message #857254] Thu, 26 April 2012 12:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I only have 32 bit Windows machine so I only use win32.

I presume that you should use whichever is appropriate to your machine;
so I would expect onle of the two to fail miseravly just as you observe.

When reporting problems that are not clear you must be more accurate;
you may know what "Indigo Modeling tools for win32 and win64" mean. I
don't I would need exact download file specifications.

You report "I tried to installed the modeling tools using the
"Installing new software" menu, Eclipse showed an error information "An
internal error occurred Comparison method violates its general
contract", just a few words, which puzzled me."

In order to help, I need to know what menu actions you think were
appropriate and details of the error that you observe.

Regards

Ed Willink

On 26/04/2012 12:48, Lucy Chan wrote:
> Since you suggest me the Xtext OCL Console was introduced in Indigo. I downloaded the Indigo Modeling tools for win32 and win64. But for win32, when I tried to installed the modeling tools using the "Installing new software" menu, Eclipse showed an error information "An internal error occurred Comparison method violates its general contract", just a few words, which puzzled me. And I also tried the win64 and this time I even cannot restart the eclipse. The attachment is the screenshot for the error in the win64 edition.
>
Re: about the using of OCLinEcore [message #860720 is a reply to message #857305] Sat, 28 April 2012 07:01 Go to previous messageGo to next message
Lucy Chan is currently offline Lucy ChanFriend
Messages: 29
Registered: March 2012
Junior Member
I have updated the error information for details. Both the windonw-64 bit and windows 32-bit edition have the folloing errors when installing. The picture is in the attachment.
Re: about the using of OCLinEcore [message #860995 is a reply to message #860720] Sat, 28 April 2012 10:03 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi<br>
<br>
The attached PNG contains only the start of the error message; there
is much more if you scroll the error window. So I cannot tell much
apart from seeing that you appear to be using Juno M5 or M6 and the
emf.doc is failing. Since EMF is a very basic install, clearly you
are doing something very wrong or unusual.<br>
<br>
In my previous message I wrote:<br>
<br>
<i>When reporting problems that are not clear you must be more
accurate; you may know what "Indigo Modeling tools for win32 and
win64" mean. I don't I would need exact download file
specifications.
</i><br>
<br>
<i>You report "I tried to installed the modeling tools using the
"Installing new software" menu, Eclipse showed an error
information "An internal error occurred Comparison method violates
its general contract", just a few words, which puzzled me."
<br>
<br>
In order to help, I need to know what menu actions you think were
appropriate and details of the error that you observe.
</i>
<i><br>
</i>
<br>
If you are not prepared to provide useable error reports, and ignore
the advice you are given, then you are wasting your time and mine.<br>
<br>
&nbsp;&nbsp;&nbsp; Regards<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Ed Willink<br>
</body>
</html>
Previous Topic:OCL console: querying when having multiples resources
Next Topic:Making OCL.parse() and import directives
Goto Forum:
  


Current Time: Tue Apr 23 17:52:06 GMT 2024

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

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

Back to the top