Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL] Quick fixes are not found
[EVL] Quick fixes are not found [message #652535] Fri, 04 February 2011 12:52 Go to next message
Sebastian is currently offline SebastianFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

I followed the 'Live validation and quick-fixes in GMF-based editors with EVL' tutorial and adapted it to my own metamodel.
My purpose is to check a nameing convention as critique and offer a quick fix to fulfill the convention. This is very similar to the Folder quick fix in the tutorial mentioned above.

In cases where the convention is not fulfilled the Problems view shows a warning and the correct message. However, If I open the quick fix wizard, there is only an 'Ignore' fix available.
Is this a bug?

Thanks,
Sebastian
Re: [EVL] Quick fixes are not found [message #652536 is a reply to message #652535] Fri, 04 February 2011 12:59 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Sebastian,

Could you please double check that you've specified the right marker
types (step 4 of
http://eclipse.org/gmt/epsilon/doc/articles/evl-gmf-integrat ion/)?

If this doesn't seem to be the problem could you please zip your code
and send it to us at epsilon.devs gmail com so that we can have a closer
look?

Cheers,
Dimitris

On 04/02/2011 14:52, Sebastian wrote:
> Hi,
>
> I followed the 'Live validation and quick-fixes in GMF-based editors
> with EVL' tutorial and adapted it to my own metamodel.
> My purpose is to check a nameing convention as critique and offer a
> quick fix to fulfill the convention. This is very similar to the Folder
> quick fix in the tutorial mentioned above.
>
> In cases where the convention is not fulfilled the Problems view shows a
> warning and the correct message. However, If I open the quick fix
> wizard, there is only an 'Ignore' fix available.
> Is this a bug?
>
> Thanks,
> Sebastian
Re: [EVL] Quick fixes are not found [message #652820 is a reply to message #652536] Mon, 07 February 2011 08:07 Go to previous messageGo to next message
Sebastian is currently offline SebastianFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Dimitris,

all marker types are specified correctly. Therefore I prepared two zip files for you with source code and an example project. For the example I created a new project and put the model and diagram file to it.
After revalidation of the diagram file I observed some strange behavior because the defined quick fix has been found. However, in the initial project where the example was defined initially, only ignore is available as quick fix.
After some experiments it seems that quick fixes are not available in cases where space characters occur in the project name.

Regards,
Sebastian
Re: [EVL] Quick fixes are not found [message #660210 is a reply to message #652820] Thu, 17 March 2011 11:53 Go to previous messageGo to next message
Hristina Moneva is currently offline Hristina MonevaFriend
Messages: 31
Registered: October 2009
Member
Hi,

I have the same (or at least similar) question... I have followed the "Live validation and quick-fixes in GMF-based editors with EVL" tutorial and adapted it to my own case...

The problem is that I do not see fix proposed... But I have seen it once in the beginning (when I have run it for the first time) and afterwards, it is now found any more. The validation itself works, only the fix is not found.

My evl is as follows:
context Range {
critique RangeHasNoUnit {
check : self.unit <> null
message : 'Range [' + self.min + ':' + self.max + '] has no unit'
fix {
title : 'Select an unit for this range!'
do {
var newUnit := UserInput.choose('Select an unit',
_Model.getAllOfType(Unit));
if (target.isDefined()) self.unit := newUnit;
}
}
}
}

My workspace has in its name white spaces, the project name itself not...

Can you help me or at least give me some directions...

Greetings,
Hristina
Re: [EVL] Quick fixes are not found [message #660216 is a reply to message #660210] Thu, 17 March 2011 12:23 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Hristina,

Could it be the case that you've changed the nsURI of your metamodel since it last worked but haven't updated the marker types accordingly? If this doesn't seem to be the case, could you please send me your code at epsilon.devs gmail com so that I can have a look?

Cheers,
Dimitris
Re: [EVL] Quick fixes are not found [message #660222 is a reply to message #660216] Thu, 17 March 2011 13:01 Go to previous messageGo to next message
Hristina Moneva is currently offline Hristina MonevaFriend
Messages: 31
Registered: October 2009
Member
Hi Dimitris,

When my NS-URI was not correct, the errors/warnings were not shown/found at all... Now, they are found correctly, but the fix is not.

About the code base, it is quite a large one with a few GMF editors working on one EMF model and on top of that - kind of confidential...

I will try to prepare a small example, which I can send you. In the meantime, you may thing of other reasons and tell me...

One more question, I do see the errors/warnings in the Problems view, but not in the Validation view that is provided by Epsilon? What is the cause for that?

Also, is it possible to switch on/off the some constraints as with the GMF Audits and EMF OCL (in Window/Preferences/Model Validation/Constraints)? What do I need to do in order to see the list of EVL-declared constraints there?

By the way, what was the cause in the case of Sebastian?

Greetings,
Hristina
Re: [EVL] Quick fixes are not found [message #660423 is a reply to message #660222] Fri, 18 March 2011 11:37 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Hristina,

Thanks for sending me the example. I'll have a look and get back to you shortly.

The validation view is used only when evaluating EVL constraints from a launch configuration (as opposed to when evaluating EVL from within EMF/GMF editors).

Switching-off individual EVL constraints is not possible at the moment I'm afraid. Could you please file an enhancement request for this in the bugzilla?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT& component=Epsilon

In Sebastian's case, the problem seems to have been caused by spaces in the project name - which doesn't seem to be the case in this instance.

Cheers,
Dimitris

Re: [EVL] Quick fixes are not found [message #661589 is a reply to message #660423] Fri, 25 March 2011 14:03 Go to previous messageGo to next message
Hristina Moneva is currently offline Hristina MonevaFriend
Messages: 31
Registered: October 2009
Member
Bug (enhancement request) submitted: https://bugs.eclipse.org/bugs/show_bug.cgi?id=340960
Looking forward to it! Smile

Thanks,
Hristina
Re: [EVL] Quick fixes are not found [message #661602 is a reply to message #661589] Fri, 25 March 2011 14:43 Go to previous messageGo to next message
Hristina Moneva is currently offline Hristina MonevaFriend
Messages: 31
Registered: October 2009
Member
Just for the others that may stumble upon the same problem...

The problem was that one of the markers described in http://www.eclipse.org/gmt/epsilon/doc/articles/evl-gmf-inte gration/ was not set correct! Obvious, but I did not pay attention that one of the two markers is project specific.

In the tutorial, the markers are as follows:
class : org.eclipse.epsilon.evl.emf.validation.EvlMarkerResolutionGe nerator
markerType : org.eclipse.epsilon.eugenia.examples.filesystem.diagram.diagnostic
&
class : org.eclipse.epsilon.evl.emf.validation.EvlMarkerResolutionGe nerator
markerType : org.eclipse.emf.ecore.diagnostic

The first one (EvlMarkerResolutionGenerator) is project specific and it should be changed to your own custom one... your diagram project name "something.diagram" and then just append ".diagnostic"

Hristina
Re: [EVL] Quick fixes are not found [message #661610 is a reply to message #661602] Fri, 25 March 2011 14:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Hristina,

Many thanks for summarising the solution for this and for filing the enhancement request!

Cheers,
Dimitris
Re: [EVL] Quick fixes are not found [message #757815 is a reply to message #661610] Mon, 21 November 2011 19:24 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi

I'm having a problem with the quick fix. First I the new instance of eclipse could not find the quick fix. Than I resolve that by doing waht Hristina explain, modifying the markerType to my project name.
Now the quick fix found the fix "Ignore", that is not the fix I've created.

What I'm doing in the evl file is this:

context PerformsLink {
	constraint setLabel {
		check: self.label = 'Performs'
		
		message: 'The PerformsLink label is not set.'
		
		fix{
			title: 'Setting PerformsLink label.'
		
			do{
				self.label := 'Performs';
			}
		}
	}
}


PerformsLink is a sub-class of an abstract class Link, that have a String attribute called label. With this constraint I want to set that variable to a static text.
Re: [EVL] Quick fixes are not found [message #758078 is a reply to message #757815] Mon, 21 November 2011 20:42 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Patricia,

Could you please send me your projects are epsilon.devs gmail com so that I can have a look?

Cheers,
Dimitris
Re: [EVL] Quick fixes are not found [message #758087 is a reply to message #758078] Mon, 21 November 2011 21:00 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
I've send you my project. Thank you Dimitris.
Re: [EVL] Quick fixes are not found [message #758103 is a reply to message #758087] Mon, 21 November 2011 21:31 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Patricia,

I've imported your code in my Eclipse and it works as expected. See http://dl.dropbox.com/u/5636547/patricia-quickfixes.png

Could you perhaps try with a fresh Epsilon distribution from http://eclipse.org/gmt/epsilon/download/?

Cheers,
Dimitris
Re: [EVL] Quick fixes are not found [message #758109 is a reply to message #758103] Mon, 21 November 2011 21:43 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
I have the last Epsilon Interim version, maybe it's because that. But I really need it to make figures.
Re: [EVL] Quick fixes are not found [message #758113 is a reply to message #758109] Mon, 21 November 2011 22:08 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Patricia,

This works fine for me even with the latest interim version. Could you perhaps try getting a fresh distribution and then installing the interim version on top of that?

Cheers,
Dimitris
Re: [EVL] Quick fixes are not found [message #758125 is a reply to message #758113] Tue, 22 November 2011 01:20 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi Dimitris

I installed the epsilon-0.9.1-macosx-cocoa distribution and then the epsilon interim version and still nothing. The quick fix is still just showing Ignore.

Any other idead?

Thanks for your help Dimitris
Re: [EVL] Quick fixes are not found [message #758233 is a reply to message #758125] Tue, 22 November 2011 11:53 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Not really. I guess the only thing we could do would be for me to zip my Eclipse instance and upload it somewhere so that you can get download it...

Cheers,
Dimitris
Re: [EVL] Quick fixes are not found [message #758259 is a reply to message #758233] Tue, 22 November 2011 13:28 Go to previous message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Thank you Dimitris, but is not necessary, I'll try to put my constraints directly in the classes properties.
Previous Topic:GMF editor doesn't draw nodes
Next Topic:[Eugenia] Using Phantom Nodes
Goto Forum:
  


Current Time: Tue Apr 16 21:42:07 GMT 2024

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

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

Back to the top