Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » evl validation, how it works?(how is the validation code generated from the parsed evl file?)
evl validation, how it works? [message #539745] Sat, 12 June 2010 15:10 Go to next message
giampow Mising name is currently offline giampow Mising nameFriend
Messages: 31
Registered: May 2010
Member
Hi all,
I'm trying to figure out how works the evl validation logic.
I'm working on a EMF + GMF RCP app, trying to implement my own problems view, and adding the quick fix wizard from scratch.

In order to do this, I need to understand how the validation code is being generated from the evl file.

Can anybody shed a light on this?
Thanks
Re: evl validation, how it works? [message #539751 is a reply to message #539745] Sat, 12 June 2010 15:47 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi,

EVL is an interpreted language and as such, no code needs to be
generated. Does this answer your question?

Cheers,
Dimitris

On 12/06/2010 18:10, giampow wrote:
> Hi all,
> I'm trying to figure out how works the evl validation logic.
> I'm working on a EMF + GMF RCP app, trying to implement my own problems
> view, and adding the quick fix wizard from scratch.
>
> In order to do this, I need to understand how the validation code is
> being generated from the evl file.
>
> Can anybody shed a light on this? Thanks
Re: evl validation, how it works? [message #539752 is a reply to message #539751] Sat, 12 June 2010 16:10 Go to previous messageGo to next message
giampow Mising name is currently offline giampow Mising nameFriend
Messages: 31
Registered: May 2010
Member
Hi Dimitris,
thank you for your reply,
I would like to know the connection between evl and the quick fix wizard: when is the "fix" section of the evl file evaluated? How is this connected to the quick fix wizard?

thank you
Re: evl validation, how it works? [message #539764 is a reply to message #539752] Sat, 12 June 2010 18:13 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi,

For each marker type, you can contribute one or more extensions to the
org.eclipse.ui.ide.markerResolution extension point and define an
instance of IMarkerResolutionGenerator which contributes resolutions
(a.k.a quick fixes) for markers of this type. The resolution generator
for EVL constraints is EvlMarkerResolutionGenerator (in the
org.eclipse.epsilon.evl.emf.validation plugin).

Now, when you right-click on a marker and select "Quick Fix", the
Problems view finds all resolution generators that can provide
resolutions for the marker and collects the available resolutions by
invoking their getResolutions(IMarker marker) method (the
EvlMarkerResolutionGenerator class mentioned above generates instances
of EvlMarkerResolution which when invoked execute the respective "fix"
parts of the EVL constraints).

Finally, it populates the popup list with all the resolutions it has
collected and shows it to the user. I believe that this pop-up window is
reusable (i.e. part of the API) given that it can be invoked from other
parts of the UI as well (e.g. from in-editor markers). I hope this helps.

Cheers,
Dimitris

On 12/06/2010 19:10, giampow wrote:
> Hi Dimitris,
> thank you for your reply,
> I would like to know the connection between evl and the quick fix
> wizard: when is the "fix" section of the evl file evaluated? How is this
> connected to the quick fix wizard?
>
> thank you
Re: evl validation, how it works? [message #539792 is a reply to message #539764] Sun, 13 June 2010 07:38 Go to previous messageGo to next message
giampow Mising name is currently offline giampow Mising nameFriend
Messages: 31
Registered: May 2010
Member
Hi Dimitris,
thank you for your answer, this is what I needed to know
Re: evl validation, how it works? [message #539798 is a reply to message #539764] Sun, 13 June 2010 12:59 Go to previous messageGo to next message
giampow Mising name is currently offline giampow Mising nameFriend
Messages: 31
Registered: May 2010
Member
I've noticed that using evl together with GMF a class ValidationMarker is being generated.

This class contains information on a marker but is not tied with the IMarker class.

I'm trying to implement a quick fix feature for RCP apps, thus trying to get the quick fix popup starting from an instance of ValidationMarker, which I've managed to retrieve from my diagram and to show in my custom problem view, made up from scratch.

Now I'm stuck, since it seems anyway I need to work with instances of IMarker and not of ValidationMarker, for the EvlMarkerResolutionGenerator to return me instances of EvlMarkerResolution.

So, is there a way to do it? As far as I know in a RCP application it makes little sense to use IMarker, since there is no workspace, and so all the infrastructure needed by IMarker is missing.

Thank you
g

[Updated on: Sun, 13 June 2010 13:01]

Report message to a moderator

Re: evl validation, how it works? [message #539915 is a reply to message #539798] Mon, 14 June 2010 09:05 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi,

I don't see any obvious workarounds at the moment. I'll have to have a
closer look at this and get back to you within the next couple of days.
Could you please send me the current version of your code so that I have
a good starting point?

Cheers,
Dimitris

giampow wrote:
> I've noticed that using evl together with GMF a class ValidationMarker
> is being generated.
>
> This class contains information on a marker but is not tied with the
> IMarker class.
>
> I'm trying to implement a quick fix feature for RCP apps, thus trying to
> get the quick fix popup starting from an instance of ValidationMarker,
> which I've managed to retrieve from my diagram and to show in my custom
> problem view, made up from scratch.
>
> Now I'm stuck, since it seems anyway I need to work with instances of
> IMarker and not of ValidationMarker, for the
> EvlMarkerResolutionGenerator to return me instances of EvlMarkerResolution.
>
> So, there is a way to do it? As far as I know in a RCP application it
> makes little sense to use IMarker, since there is no workspace, and so
> all the infrastructure needed by IMarker is missing.
>
> Thank you
> g
Re: evl validation, how it works? [message #590072 is a reply to message #539751] Sat, 12 June 2010 16:10 Go to previous message
giampow Mising name is currently offline giampow Mising nameFriend
Messages: 31
Registered: May 2010
Member
Hi Dimitris,
thank you for your reply,
I would like to know the connection between evl and the quick fix wizard: when is the "fix" section of the evl file evaluated? How is this connected to the quick fix wizard?

thank you
Re: evl validation, how it works? [message #590078 is a reply to message #590072] Sat, 12 June 2010 18:13 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi,

For each marker type, you can contribute one or more extensions to the
org.eclipse.ui.ide.markerResolution extension point and define an
instance of IMarkerResolutionGenerator which contributes resolutions
(a.k.a quick fixes) for markers of this type. The resolution generator
for EVL constraints is EvlMarkerResolutionGenerator (in the
org.eclipse.epsilon.evl.emf.validation plugin).

Now, when you right-click on a marker and select "Quick Fix", the
Problems view finds all resolution generators that can provide
resolutions for the marker and collects the available resolutions by
invoking their getResolutions(IMarker marker) method (the
EvlMarkerResolutionGenerator class mentioned above generates instances
of EvlMarkerResolution which when invoked execute the respective "fix"
parts of the EVL constraints).

Finally, it populates the popup list with all the resolutions it has
collected and shows it to the user. I believe that this pop-up window is
reusable (i.e. part of the API) given that it can be invoked from other
parts of the UI as well (e.g. from in-editor markers). I hope this helps.

Cheers,
Dimitris

On 12/06/2010 19:10, giampow wrote:
> Hi Dimitris,
> thank you for your reply,
> I would like to know the connection between evl and the quick fix
> wizard: when is the "fix" section of the evl file evaluated? How is this
> connected to the quick fix wizard?
>
> thank you
Re: evl validation, how it works? [message #590086 is a reply to message #539764] Sun, 13 June 2010 07:38 Go to previous message
giampow Mising name is currently offline giampow Mising nameFriend
Messages: 31
Registered: May 2010
Member
Hi Dimitris,
thank you for your answer, this is what I needed to know
Re: evl validation, how it works? [message #590095 is a reply to message #539764] Sun, 13 June 2010 13:00 Go to previous message
giampow Mising name is currently offline giampow Mising nameFriend
Messages: 31
Registered: May 2010
Member
I've noticed that using evl together with GMF a class ValidationMarker is being generated.

This class contains information on a marker but is not tied with the IMarker class.

I'm trying to implement a quick fix feature for RCP apps, thus trying to get the quick fix popup starting from an instance of ValidationMarker, which I've managed to retrieve from my diagram and to show in my custom problem view, made up from scratch.

Now I'm stuck, since it seems anyway I need to work with instances of IMarker and not of ValidationMarker, for the EvlMarkerResolutionGenerator to return me instances of EvlMarkerResolution.

So, there is a way to do it? As far as I know in a RCP application it makes little sense to use IMarker, since there is no workspace, and so all the infrastructure needed by IMarker is missing.

Thank you
g
Re: evl validation, how it works? [message #590128 is a reply to message #590095] Mon, 14 June 2010 09:05 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi,

I don't see any obvious workarounds at the moment. I'll have to have a
closer look at this and get back to you within the next couple of days.
Could you please send me the current version of your code so that I have
a good starting point?

Cheers,
Dimitris

giampow wrote:
> I've noticed that using evl together with GMF a class ValidationMarker
> is being generated.
>
> This class contains information on a marker but is not tied with the
> IMarker class.
>
> I'm trying to implement a quick fix feature for RCP apps, thus trying to
> get the quick fix popup starting from an instance of ValidationMarker,
> which I've managed to retrieve from my diagram and to show in my custom
> problem view, made up from scratch.
>
> Now I'm stuck, since it seems anyway I need to work with instances of
> IMarker and not of ValidationMarker, for the
> EvlMarkerResolutionGenerator to return me instances of EvlMarkerResolution.
>
> So, there is a way to do it? As far as I know in a RCP application it
> makes little sense to use IMarker, since there is no workspace, and so
> all the infrastructure needed by IMarker is missing.
>
> Thank you
> g
Previous Topic:where to find eugenia syntax spec?
Next Topic:Automatically update EMF resource within GMF editor
Goto Forum:
  


Current Time: Thu Apr 25 14:10:55 GMT 2024

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

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

Back to the top