Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Making EVL files known to Eclipse
Making EVL files known to Eclipse [message #21145] Mon, 29 June 2009 16:43 Go to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi,

I may have a wrong intuition about this, but here is what I try to do
and cannot quite figure out how to do:

I am building an editor based on TEF and am trying to add some
validation to it. It seems, that TEF by default links into the standard
Eclipse Validation Framework for this, so I thought why not use EVL to
write my constraints? I have written a simple EVL file, which I hope
expresses my constraints, but now I am struggling to figure out how to
register this with the validation framework so that it will be evaluated
for all models that comply to some given metamodel?

The Epsilonbook does not really tell me anything about this, as
unfortunately it is generally a bit silent about how to use an
individual language in practice. Is what I want to do possible at all?
If so, what do I need to do?

Many thanks in advance,

Steffen
Re: Making EVL files known to Eclipse [message #21177 is a reply to message #21145] Mon, 29 June 2009 17:21 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Steffen,

There is a relevant tutorial available in
http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration and a
screencast in
http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation (both
resources are accessible under the EVL documentation section:
http://www.eclipse.org/gmt/epsilon/doc/evl/)

Looking forward to hearing how it goes!

Cheers,
Dimitris

Steffen Zschaler wrote:
> Hi,
>
> I may have a wrong intuition about this, but here is what I try to do
> and cannot quite figure out how to do:
>
> I am building an editor based on TEF and am trying to add some
> validation to it. It seems, that TEF by default links into the standard
> Eclipse Validation Framework for this, so I thought why not use EVL to
> write my constraints? I have written a simple EVL file, which I hope
> expresses my constraints, but now I am struggling to figure out how to
> register this with the validation framework so that it will be evaluated
> for all models that comply to some given metamodel?
>
> The Epsilonbook does not really tell me anything about this, as
> unfortunately it is generally a bit silent about how to use an
> individual language in practice. Is what I want to do possible at all?
> If so, what do I need to do?
>
> Many thanks in advance,
>
> Steffen
Re: Making EVL files known to Eclipse [message #21238 is a reply to message #21177] Tue, 30 June 2009 09:42 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010102020708050306080909
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Dimitris,

Thanks for the information, this was really helpful. Unfortunately, it
doesn't work yet :-(

As I don't know enough about the validation framework or EVL, maybe I am
just misinterpreting something here. Here's what I think I know:

1. EVL constraints, once bound using the extension point are somehow
registered with the validation framework.
2. TEF by default uses the validation framework to evaluate any
constraints that may exist for some model element. In particular,
it uses the code excerpted below to do this.
3. Thus, I believe a correctly registered EVL constraint should be
picked up by TEF automatically.

Here's the code (slightly adjusted to fit in a few lines):

IBatchValidator validator =
(IBatchValidator) ModelValidationService.getInstance()
.newValidator(EvaluationMode.BATCH);
validator.setIncludeLiveConstraints(false);
final IStatus status = validator.validate(value); // Where value is some EObject from the model
if (!status.isOK()) {
// Add status message to context as an error/warning
// Errors and warnings from the context will later be placed in the problems listing
}


I'm sure, somewhere in the above thinking there is a fault, but I don't
know where. Can you give me a pointer?

Many thanks,

Steffen

Dimitris Kolovos wrote:
> Hi Steffen,
>
> There is a relevant tutorial available in
> http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration and a
> screencast in
> http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation (both
> resources are accessible under the EVL documentation section:
> http://www.eclipse.org/gmt/epsilon/doc/evl/)
>
> Looking forward to hearing how it goes!
>
> Cheers,
> Dimitris
>
> Steffen Zschaler wrote:
>> Hi,
>>
>> I may have a wrong intuition about this, but here is what I try to do
>> and cannot quite figure out how to do:
>>
>> I am building an editor based on TEF and am trying to add some
>> validation to it. It seems, that TEF by default links into the
>> standard Eclipse Validation Framework for this, so I thought why not
>> use EVL to write my constraints? I have written a simple EVL file,
>> which I hope expresses my constraints, but now I am struggling to
>> figure out how to register this with the validation framework so that
>> it will be evaluated for all models that comply to some given metamodel?
>>
>> The Epsilonbook does not really tell me anything about this, as
>> unfortunately it is generally a bit silent about how to use an
>> individual language in practice. Is what I want to do possible at
>> all? If so, what do I need to do?
>>
>> Many thanks in advance,
>>
>> Steffen

--------------010102020708050306080909
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Dimitris,<br>
<br>
Thanks for the information, this was really helpful. Unfortunately, it
doesn't work yet :-(<br>
<br>
As I don't know enough about the validation framework or EVL, maybe I
am just misinterpreting something here. Here's what I think I know:<br>
<ol>
<li>EVL constraints, once bound using the extension point are somehow
registered with the validation framework.</li>
<li>TEF by default uses the validation framework to evaluate any
constraints that may exist for some model element. In particular, it
uses the code excerpted below to do this.</li>
<li>Thus, I believe a correctly registered EVL constraint should be
picked up by TEF automatically.</li>
</ol>
Here's the code (slightly adjusted to fit in a few lines):<br>
<blockquote>
<pre>IBatchValidator validator =
(IBatchValidator) ModelValidationService.getInstance()
.newValidator(EvaluationMode.BATCH);
validator.setIncludeLiveConstraints(false);
final IStatus status = validator.validate(value); // Where value is some EObject from the model
if (!status.isOK()) {
// Add status message to context as an error/warning
// Errors and warnings from the context will later be placed in the problems listing
}
</pre>
</blockquote>
I'm sure, somewhere in the above thinking there is a fault, but I don't
know where. Can you give me a pointer?<br>
<br>
Many thanks,<br>
<br>
Steffen<br>
<br>
Dimitris Kolovos wrote:
<blockquote cite="mid:h2at6u$fto$1@build.eclipse.org" type="cite">Hi
Steffen,
<br>
<br>
There is a relevant tutorial available in
<a class="moz-txt-link-freetext" href="http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration">http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration</a> and a
screencast in
<a class="moz-txt-link-freetext" href="http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation">http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation</a> (both
resources are accessible under the EVL documentation section:
<a class="moz-txt-link-freetext" href="http://www.eclipse.org/gmt/epsilon/doc/evl/">http://www.eclipse.org/gmt/epsilon/doc/evl/</a>)
<br>
<br>
Looking forward to hearing how it goes!
<br>
<br>
Cheers,
<br>
Dimitris
<br>
<br>
Steffen Zschaler wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I may have a wrong intuition about this, but here is what I try to do
and cannot quite figure out how to do:
<br>
<br>
I am building an editor based on TEF and am trying to add some
validation to it. It seems, that TEF by default links into the standard
Eclipse Validation Framework for this, so I thought why not use EVL to
write my constraints? I have written a simple EVL file, which I hope
expresses my constraints, but now I am struggling to figure out how to
register this with the validation framework so that it will be
evaluated for all models that comply to some given metamodel?
<br>
<br>
The Epsilonbook does not really tell me anything about this, as
unfortunately it is generally a bit silent about how to use an
individual language in practice. Is what I want to do possible at all?
If so, what do I need to do?
<br>
<br>
Many thanks in advance,
<br>
<br>
Steffen
<br>
</blockquote>
</blockquote>
</body>
</html>

--------------010102020708050306080909--
Re: Making EVL files known to Eclipse [message #21254 is a reply to message #21238] Tue, 30 June 2009 09:59 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Steffen,

1. is right but I'll have to check TEF/BatchValidator to see how they
actually work.

Cheers,
Dimitris

Steffen Zschaler wrote:
> Hi Dimitris,
>
> Thanks for the information, this was really helpful. Unfortunately, it
> doesn't work yet :-(
>
> As I don't know enough about the validation framework or EVL, maybe I am
> just misinterpreting something here. Here's what I think I know:
>
> 1. EVL constraints, once bound using the extension point are somehow
> registered with the validation framework.
> 2. TEF by default uses the validation framework to evaluate any
> constraints that may exist for some model element. In particular,
> it uses the code excerpted below to do this.
> 3. Thus, I believe a correctly registered EVL constraint should be
> picked up by TEF automatically.
>
> Here's the code (slightly adjusted to fit in a few lines):
>
> IBatchValidator validator = (IBatchValidator)
> ModelValidationService.getInstance()
> .newValidator(EvaluationMode.BATCH);
> validator.setIncludeLiveConstraints(false);
> final IStatus status = validator.validate(value); // Where value is
> some EObject from the model
> if (!status.isOK()) {
> // Add status message to context as an error/warning
> // Errors and warnings from the context will later be placed in the
> problems listing
> }
>
> I'm sure, somewhere in the above thinking there is a fault, but I don't
> know where. Can you give me a pointer?
>
> Many thanks,
>
> Steffen
>
> Dimitris Kolovos wrote:
>> Hi Steffen,
>>
>> There is a relevant tutorial available in
>> http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration and a
>> screencast in
>> http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation (both
>> resources are accessible under the EVL documentation section:
>> http://www.eclipse.org/gmt/epsilon/doc/evl/)
>>
>> Looking forward to hearing how it goes!
>>
>> Cheers,
>> Dimitris
>>
>> Steffen Zschaler wrote:
>>> Hi,
>>>
>>> I may have a wrong intuition about this, but here is what I try to do
>>> and cannot quite figure out how to do:
>>>
>>> I am building an editor based on TEF and am trying to add some
>>> validation to it. It seems, that TEF by default links into the
>>> standard Eclipse Validation Framework for this, so I thought why not
>>> use EVL to write my constraints? I have written a simple EVL file,
>>> which I hope expresses my constraints, but now I am struggling to
>>> figure out how to register this with the validation framework so that
>>> it will be evaluated for all models that comply to some given metamodel?
>>>
>>> The Epsilonbook does not really tell me anything about this, as
>>> unfortunately it is generally a bit silent about how to use an
>>> individual language in practice. Is what I want to do possible at
>>> all? If so, what do I need to do?
>>>
>>> Many thanks in advance,
>>>
>>> Steffen
>
Re: Making EVL files known to Eclipse [message #569905 is a reply to message #21145] Mon, 29 June 2009 17:21 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Steffen,

There is a relevant tutorial available in
http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration and a
screencast in
http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation (both
resources are accessible under the EVL documentation section:
http://www.eclipse.org/gmt/epsilon/doc/evl/)

Looking forward to hearing how it goes!

Cheers,
Dimitris

Steffen Zschaler wrote:
> Hi,
>
> I may have a wrong intuition about this, but here is what I try to do
> and cannot quite figure out how to do:
>
> I am building an editor based on TEF and am trying to add some
> validation to it. It seems, that TEF by default links into the standard
> Eclipse Validation Framework for this, so I thought why not use EVL to
> write my constraints? I have written a simple EVL file, which I hope
> expresses my constraints, but now I am struggling to figure out how to
> register this with the validation framework so that it will be evaluated
> for all models that comply to some given metamodel?
>
> The Epsilonbook does not really tell me anything about this, as
> unfortunately it is generally a bit silent about how to use an
> individual language in practice. Is what I want to do possible at all?
> If so, what do I need to do?
>
> Many thanks in advance,
>
> Steffen
Re: Making EVL files known to Eclipse [message #570060 is a reply to message #21177] Tue, 30 June 2009 09:42 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010102020708050306080909
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Dimitris,

Thanks for the information, this was really helpful. Unfortunately, it
doesn't work yet :-(

As I don't know enough about the validation framework or EVL, maybe I am
just misinterpreting something here. Here's what I think I know:

1. EVL constraints, once bound using the extension point are somehow
registered with the validation framework.
2. TEF by default uses the validation framework to evaluate any
constraints that may exist for some model element. In particular,
it uses the code excerpted below to do this.
3. Thus, I believe a correctly registered EVL constraint should be
picked up by TEF automatically.

Here's the code (slightly adjusted to fit in a few lines):

IBatchValidator validator =
(IBatchValidator) ModelValidationService.getInstance()
.newValidator(EvaluationMode.BATCH);
validator.setIncludeLiveConstraints(false);
final IStatus status = validator.validate(value); // Where value is some EObject from the model
if (!status.isOK()) {
// Add status message to context as an error/warning
// Errors and warnings from the context will later be placed in the problems listing
}


I'm sure, somewhere in the above thinking there is a fault, but I don't
know where. Can you give me a pointer?

Many thanks,

Steffen

Dimitris Kolovos wrote:
> Hi Steffen,
>
> There is a relevant tutorial available in
> http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration and a
> screencast in
> http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation (both
> resources are accessible under the EVL documentation section:
> http://www.eclipse.org/gmt/epsilon/doc/evl/)
>
> Looking forward to hearing how it goes!
>
> Cheers,
> Dimitris
>
> Steffen Zschaler wrote:
>> Hi,
>>
>> I may have a wrong intuition about this, but here is what I try to do
>> and cannot quite figure out how to do:
>>
>> I am building an editor based on TEF and am trying to add some
>> validation to it. It seems, that TEF by default links into the
>> standard Eclipse Validation Framework for this, so I thought why not
>> use EVL to write my constraints? I have written a simple EVL file,
>> which I hope expresses my constraints, but now I am struggling to
>> figure out how to register this with the validation framework so that
>> it will be evaluated for all models that comply to some given metamodel?
>>
>> The Epsilonbook does not really tell me anything about this, as
>> unfortunately it is generally a bit silent about how to use an
>> individual language in practice. Is what I want to do possible at
>> all? If so, what do I need to do?
>>
>> Many thanks in advance,
>>
>> Steffen

--------------010102020708050306080909
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Dimitris,<br>
<br>
Thanks for the information, this was really helpful. Unfortunately, it
doesn't work yet :-(<br>
<br>
As I don't know enough about the validation framework or EVL, maybe I
am just misinterpreting something here. Here's what I think I know:<br>
<ol>
<li>EVL constraints, once bound using the extension point are somehow
registered with the validation framework.</li>
<li>TEF by default uses the validation framework to evaluate any
constraints that may exist for some model element. In particular, it
uses the code excerpted below to do this.</li>
<li>Thus, I believe a correctly registered EVL constraint should be
picked up by TEF automatically.</li>
</ol>
Here's the code (slightly adjusted to fit in a few lines):<br>
<blockquote>
<pre>IBatchValidator validator =
(IBatchValidator) ModelValidationService.getInstance()
.newValidator(EvaluationMode.BATCH);
validator.setIncludeLiveConstraints(false);
final IStatus status = validator.validate(value); // Where value is some EObject from the model
if (!status.isOK()) {
// Add status message to context as an error/warning
// Errors and warnings from the context will later be placed in the problems listing
}
</pre>
</blockquote>
I'm sure, somewhere in the above thinking there is a fault, but I don't
know where. Can you give me a pointer?<br>
<br>
Many thanks,<br>
<br>
Steffen<br>
<br>
Dimitris Kolovos wrote:
<blockquote cite="mid:h2at6u$fto$1@build.eclipse.org" type="cite">Hi
Steffen,
<br>
<br>
There is a relevant tutorial available in
<a class="moz-txt-link-freetext" href="http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration">http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration</a> and a
screencast in
<a class="moz-txt-link-freetext" href="http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation">http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation</a> (both
resources are accessible under the EVL documentation section:
<a class="moz-txt-link-freetext" href="http://www.eclipse.org/gmt/epsilon/doc/evl/">http://www.eclipse.org/gmt/epsilon/doc/evl/</a>)
<br>
<br>
Looking forward to hearing how it goes!
<br>
<br>
Cheers,
<br>
Dimitris
<br>
<br>
Steffen Zschaler wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I may have a wrong intuition about this, but here is what I try to do
and cannot quite figure out how to do:
<br>
<br>
I am building an editor based on TEF and am trying to add some
validation to it. It seems, that TEF by default links into the standard
Eclipse Validation Framework for this, so I thought why not use EVL to
write my constraints? I have written a simple EVL file, which I hope
expresses my constraints, but now I am struggling to figure out how to
register this with the validation framework so that it will be
evaluated for all models that comply to some given metamodel?
<br>
<br>
The Epsilonbook does not really tell me anything about this, as
unfortunately it is generally a bit silent about how to use an
individual language in practice. Is what I want to do possible at all?
If so, what do I need to do?
<br>
<br>
Many thanks in advance,
<br>
<br>
Steffen
<br>
</blockquote>
</blockquote>
</body>
</html>

--------------010102020708050306080909--
Re: Making EVL files known to Eclipse [message #570080 is a reply to message #21238] Tue, 30 June 2009 09:59 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Steffen,

1. is right but I'll have to check TEF/BatchValidator to see how they
actually work.

Cheers,
Dimitris

Steffen Zschaler wrote:
> Hi Dimitris,
>
> Thanks for the information, this was really helpful. Unfortunately, it
> doesn't work yet :-(
>
> As I don't know enough about the validation framework or EVL, maybe I am
> just misinterpreting something here. Here's what I think I know:
>
> 1. EVL constraints, once bound using the extension point are somehow
> registered with the validation framework.
> 2. TEF by default uses the validation framework to evaluate any
> constraints that may exist for some model element. In particular,
> it uses the code excerpted below to do this.
> 3. Thus, I believe a correctly registered EVL constraint should be
> picked up by TEF automatically.
>
> Here's the code (slightly adjusted to fit in a few lines):
>
> IBatchValidator validator = (IBatchValidator)
> ModelValidationService.getInstance()
> .newValidator(EvaluationMode.BATCH);
> validator.setIncludeLiveConstraints(false);
> final IStatus status = validator.validate(value); // Where value is
> some EObject from the model
> if (!status.isOK()) {
> // Add status message to context as an error/warning
> // Errors and warnings from the context will later be placed in the
> problems listing
> }
>
> I'm sure, somewhere in the above thinking there is a fault, but I don't
> know where. Can you give me a pointer?
>
> Many thanks,
>
> Steffen
>
> Dimitris Kolovos wrote:
>> Hi Steffen,
>>
>> There is a relevant tutorial available in
>> http://epsilonlabs.wiki.sourceforge.net/EVL-GMF+Integration and a
>> screencast in
>> http://www.eclipse.org/gmt/epsilon/cinema/#EVLGMFValidation (both
>> resources are accessible under the EVL documentation section:
>> http://www.eclipse.org/gmt/epsilon/doc/evl/)
>>
>> Looking forward to hearing how it goes!
>>
>> Cheers,
>> Dimitris
>>
>> Steffen Zschaler wrote:
>>> Hi,
>>>
>>> I may have a wrong intuition about this, but here is what I try to do
>>> and cannot quite figure out how to do:
>>>
>>> I am building an editor based on TEF and am trying to add some
>>> validation to it. It seems, that TEF by default links into the
>>> standard Eclipse Validation Framework for this, so I thought why not
>>> use EVL to write my constraints? I have written a simple EVL file,
>>> which I hope expresses my constraints, but now I am struggling to
>>> figure out how to register this with the validation framework so that
>>> it will be evaluated for all models that comply to some given metamodel?
>>>
>>> The Epsilonbook does not really tell me anything about this, as
>>> unfortunately it is generally a bit silent about how to use an
>>> individual language in practice. Is what I want to do possible at
>>> all? If so, what do I need to do?
>>>
>>> Many thanks in advance,
>>>
>>> Steffen
>
Previous Topic:[EML] using EML for generic metamodel compositon
Next Topic:[EML] using EML for generic metamodel compositon
Goto Forum:
  


Current Time: Thu Apr 25 19:56:56 GMT 2024

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

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

Back to the top