about the using of OCLinEcore [message #855201] |
Tue, 24 April 2012 11:49  |
Eclipse User |
|
|
|
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 12:04   |
Eclipse User |
|
|
|
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 #857305 is a reply to message #857254] |
Thu, 26 April 2012 08:36   |
Eclipse User |
|
|
|
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 #860995 is a reply to message #860720] |
Sat, 28 April 2012 06:03  |
Eclipse User |
|
|
|
<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>
Regards<br>
<br>
Ed Willink<br>
</body>
</html>
|
|
|
Powered by
FUDForum. Page generated in 0.05648 seconds