Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Inconsistency with generated code { EVL not getting picked }
Inconsistency with generated code { EVL not getting picked } [message #1279802] Sat, 29 March 2014 08:49 Go to next message
Shrikanth NC is currently offline Shrikanth NC
Messages: 28
Registered: February 2014
Junior Member
EVL
****

I generated edit,editor,diagram code from eugenia using the filesystem emfatic file

described here http://www.eclipse.org/epsilon/doc/articles/eugenia-gmf-tutorial/

But My evl was not working in the eclipse instance. ( I followed every instr in the evl article)


But then I checked out the org.eclipse.epsilon.eugenia.examples.filesystem.*
example from SVN and compared it with eugenia generated code and found that it had additional packages/classes/different content

Like., filesystem.diagram.view.factories new package in (Diagram) &
filesystem.presentation.FilesystemEditor ( Editor ) content is different from the one generated from emfatic.


Kindly let me know What I am missing while generation.
Re: Inconsistency with generated code { EVL not getting picked } [message #1279831 is a reply to message #1279802] Sat, 29 March 2014 09:55 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Hi,

Does validation work for you in the unmodified filesystem example (org.eclipse.epsilon.eugenia.examples.filesystem.* in the SVN)? To test this, you can create a file element with an empty name in your GMF editor, and then validate your model (this should produce an error marker on the file element). The example in the SVN has been developed using an older version of GMF so I suspect that the differences you're observing in terms of the generated code are the result of (hopefully backward-compatible) changes to the GMF generator.

Cheers,
Dimitris
Re: Inconsistency with generated code { EVL not getting picked } [message #1279922 is a reply to message #1279831] Sat, 29 March 2014 13:27 Go to previous messageGo to next message
Shrikanth NC is currently offline Shrikanth NC
Messages: 28
Registered: February 2014
Junior Member
Yes validation work for me in the unmodified filesystem example (org.eclipse.epsilon.eugenia.examples.filesystem.* in the SVN)?( On save ).
( But the Validate option > Diagram menu is missing )

But the below doesn't work

My emfatic file,

@namespace(uri="bank", prefix="bank")
@gmf
package banking;

@gmf.diagram
class Bank {
val Customer[*] customer;
}


@gmf.node(label = "name")
class Customer {
attr String name;
}

My Evl file,



context Customer {


critique NameStartsWithCapital {


check {
var nameToUpperCase = self.name.firstToUpperCase();
return nameToUpperCase = self.name;
}

message : 'Customer ' + self.name +
' should start with an upper-case letter'

fix {
title : 'Rename to ' +
self.name.firstToUpperCase()
do {
self.name := self.name.firstToUpperCase();
}
}
}
}

My plugin.xml of CheckEVL.validation project

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.epsilon.evl.emf.validation">
<constraintsBinding
constraints="validation/Bank.evl"
namespaceURI="bank">
</constraintsBinding>
</extension>
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="org.eclipse.epsilon.evl.emf.validation.EvlMarkerResolutionGenerator"
markerType="CheckEVL.diagram.diagnostic">
</markerResolutionGenerator>
<markerResolutionGenerator
class="org.eclipse.epsilon.evl.emf.validation.EvlMarkerResolutionGenerator"
markerType="org.eclipse.emf.ecore.diagnostic">
</markerResolutionGenerator>
</extension>

</plugin>

And in build.properties validation folder is selected.

I did not add any entries to edit,editor,diagram,model projects ( left as generated from emfatic file)

But Customer is not getting validated on save/ Diagram > validate is not found either.

Thanks for the quick reply kindly Help!


Thanks,
Shrikanth NC






Re: Inconsistency with generated code { EVL not getting picked } [message #1279937 is a reply to message #1279922] Sat, 29 March 2014 14:03 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Hi,

In recent versions of GMF, the Validate action has moved under the Edit menu. Copying from [1]:

> To validate this we go to the Diagram menu and select Validate (if you are running Galileo, the Validate option is under the Edit menu instead). The editor now looks like this:

To get the on-save validation behaviour, you'll need to modify the generated code as discussed in the "Recipes" section of the article [1].

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/articles/evl-gmf-integration/
Re: Inconsistency with generated code { EVL not getting picked } [message #1279979 is a reply to message #1279937] Sat, 29 March 2014 15:38 Go to previous messageGo to next message
Shrikanth NC is currently offline Shrikanth NC
Messages: 28
Registered: February 2014
Junior Member
Yes validatation works On Edit > Validate.

Will look into recipes for 'On Save'.

Thanks for epsilon,
Shrikanth NC
Re: Inconsistency with generated code { EVL not getting picked } [message #1279989 is a reply to message #1279979] Sat, 29 March 2014 15:59 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Glad this helped!

Cheers,
Dimitris
Previous Topic:ETL
Next Topic:ECL matches operation for Sets
Goto Forum:
  


Current Time: Wed Sep 17 23:45:28 GMT 2014

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

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