Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EVL validation is working, EMF is not
EVL validation is working, EMF is not [message #498522] Tue, 17 November 2009 10:43 Go to next message
Giovanni De Sossi is currently offline Giovanni De Sossi
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Hi all,

I've implemented EVL validation in my GMF application, I've difined my own rules in *.evl file in an external plugin (as I read in http://www.eclipse.org/gmt/epsilon/doc/articles/evl-gmf-inte gration/ ): it's working fine, but on my console i got the following:

java.lang.NullPointerException
at org.eclipse.epsilon.emc.emf.EmfUtil.getEStructuralFeature(Em fUtil.java:50)
at org.eclipse.epsilon.emc.emf.AbstractEmfModel.knowsAboutPrope rty(AbstractEmfModel.java:137)

[...]

and the rules implemented at EMF Model level are not respected; anyone knows about that problem?

Regards,
Giovanni.
Re: EVL validation is working, EMF is not [message #498527 is a reply to message #498522] Tue, 17 November 2009 10:48 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Giovanni,

The EVL/EMF integration has been implemented to respect existing EMF
validators. Could you possibly share a minimal configuration that
reproduces this problem so that I can have a closer look?

Cheers,
Dimitris

giovanni wrote:
> Hi all,
>
> I've implemented EVL validation in my GMF application, I've difined my
> own rules in *.evl file in an external plugin (as I read in
> http://www.eclipse.org/gmt/epsilon/doc/articles/evl-gmf-inte gration/ ):
> it's working fine, but on my console i got the following:
>
> java.lang.NullPointerException
> at org.eclipse.epsilon.emc.emf.EmfUtil.getEStructuralFeature(Em
> fUtil.java:50)
> at org.eclipse.epsilon.emc.emf.AbstractEmfModel.knowsAboutPrope
> rty(AbstractEmfModel.java:137)
> [...]
>
> and the rules implemented at EMF Model level are not respected; anyone
> knows about that problem?
>
> Regards,
> Giovanni.


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: EVL validation is working, EMF is not [message #498924 is a reply to message #498527] Thu, 19 November 2009 08:42 Go to previous messageGo to next message
Giovanni De Sossi is currently offline Giovanni De Sossi
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Sure, this is my environment:

- Eclipse Modeling Galileo SR1 Incubation
- Epsilon (by stable update site)
- EMFatic

I developed a new GMF Project from an *.emf file:

@namespace(uri="hierarchy", prefix="hierarchy")
@gmf(foo="bar")
package hierarchy;

@gmf.link(source="From",target="To",style="solid",width= "1",label.icon="false",tool.small.path="icons\obj16\Association.gif ",tool.small.bundle="org.eclipse.uml2.diagram.common")
class Arc {
ref Node[1]#arcs From;
ref Node[1] To;
id attr String name;
attr boolean[1] multiple = false;
attr boolean[1] optional = false;
}

@gmf.node(figure="ellipse",size="15,15",color="0,0,0",tool.small.path= "icons\obj16\ActivityFinalNode.gif",tool.small.bundle="org.eclipse.uml2.diagram.common ")
class Dimension extends Node {
}

@gmf.node(figure="ellipse",size="10,10",tool.small.path= "icons\obj16\Artifact.gif",tool.small.bundle="org.eclipse.uml2.diagram.common ")
class Attribute extends Node {
attr boolean[1] crossDimensional = false;
attr boolean[1] descriptive = false;
attr boolean[1] optional = false;
attr boolean[1] convergence = false;
attr boolean[1] shared = false;
attr boolean[1] recursive = false;
}

@gmf.diagram(onefile="true",model.extension="hrc",diagram.extension= "hrc")
class Hierarchy {
id attr String[1] name;
val Dimension[1] dimension;
val Attribute[*] attributes;
attr String description;
attr String businessDescription = "";
attr Date dateLastModified;
attr Date date;
attr Type type = "NOT_CONFORMED";
val FactSchema factSchema;
}

@gmf.node(label="name",label.placement="external",label.icon= "false")
abstract interface Node {
id attr String[1] name;
attr String businessDescription;
attr Date date;
attr Date dateLastModified;
attr String description;
attr DataType dataType;
val Arc[*]#From arcs;
}

datatype Date : java.util.Date;

enum Type {
CONFORMED = 0;
NOT_CONFORMED = 1;
DEGENERATED = 2;
}

enum DataType {
CHAR = 0;
VARCHAR = 1;
TEXT = 2;
INTEGER = 3;
FLOAT = 4;
}

@gmf.node(label="name",label.placement="internal",figure= "rounded",size="60,90",tool.small.path="icons\obj16\ActivityPartition.gif ",tool.small.bundle="org.eclipse.uml2.diagram.common")
class FactSchema extends Node {
@gmf.compartment(layout="list")
val Measure[+] measures;
}

@gmf.node(label="name",label.icon="false",label.placement= "internal",figure="rectangle",size="60,25",tool.small.path= "icons\obj16\ActivityParameterNode.gif",tool.small.bundle="org.eclipse.uml2.diagram.common ")
class Measure {
id attr String[1] name;
attr String businessDescription;
attr Date date;
attr Date dateLastModified;
attr String description;
attr boolean ~derived;
attr String formula = "";
}


and thus I added a validation plugin with an *.evl file with several rules, that are respected when I invoke "Validate" from the menu of my application. But the implicit constraint derived from EMF model (i.e.: at least one Dimensione per Hierarchy, or every Object must have a name, ....) are not validated.

Instead, the NullPointerException was resolved, the cause was an error in the *.evl file synthax.
Re: EVL validation is working, EMF is not [message #498963 is a reply to message #498924] Thu, 19 November 2009 10:52 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Giovanni,

I've reproduced this and it seems to be a bug. Could you please open a
bug report and post the link here?

Cheers,
Dimitris

giovanni wrote:
> Sure, this is my environment:
>
> - Eclipse Modeling Galileo SR1 Incubation
> - Epsilon (by stable update site)
> - EMFatic
>
> I developed a new GMF Project from an *.emf file:
> @namespace(uri="hierarchy", prefix="hierarchy")
> @gmf(foo="bar")
> package hierarchy;
>
> @gmf.link(source="From",target="To",style="solid",width=
> "1",label.icon="false",tool.small.path="icons\obj16\Association.gif
> ",tool.small.bundle="org.eclipse.uml2.diagram.common")
> class Arc {
> ref Node[1]#arcs From;
> ref Node[1] To;
> id attr String name;
> attr boolean[1] multiple = false;
> attr boolean[1] optional = false;
> }
>
> @gmf.node(figure="ellipse",size="15,15",color="0,0,0",tool.small.path=
> "icons\obj16\ActivityFinalNode.gif",tool.small.bundle="org.eclipse.uml2.diagram.common
> ")
> class Dimension extends Node {
> }
>
> @gmf.node(figure="ellipse",size="10,10",tool.small.path=
> "icons\obj16\Artifact.gif",tool.small.bundle="org.eclipse.uml2.diagram.common
> ")
> class Attribute extends Node {
> attr boolean[1] crossDimensional = false;
> attr boolean[1] descriptive = false;
> attr boolean[1] optional = false;
> attr boolean[1] convergence = false;
> attr boolean[1] shared = false;
> attr boolean[1] recursive = false;
> }
>
> @gmf.diagram(onefile="true",model.extension="hrc",diagram.extension= "hrc")
> class Hierarchy {
> id attr String[1] name;
> val Dimension[1] dimension;
> val Attribute[*] attributes;
> attr String description;
> attr String businessDescription = "";
> attr Date dateLastModified;
> attr Date date;
> attr Type type = "NOT_CONFORMED";
> val FactSchema factSchema;
> }
>
> @gmf.node(label="name",label.placement="external",label.icon= "false")
> abstract interface Node {
> id attr String[1] name;
> attr String businessDescription;
> attr Date date;
> attr Date dateLastModified;
> attr String description;
> attr DataType dataType;
> val Arc[*]#From arcs;
> }
>
> datatype Date : java.util.Date;
>
> enum Type {
> CONFORMED = 0;
> NOT_CONFORMED = 1;
> DEGENERATED = 2;
> }
>
> enum DataType {
> CHAR = 0;
> VARCHAR = 1;
> TEXT = 2;
> INTEGER = 3;
> FLOAT = 4;
> }
>
> @gmf.node(label="name",label.placement="internal",figure=
> "rounded",size="60,90",tool.small.path="icons\obj16\ActivityPartition.gif
> ",tool.small.bundle="org.eclipse.uml2.diagram.common")
> class FactSchema extends Node {
> @gmf.compartment(layout="list")
> val Measure[+] measures;
> }
>
> @gmf.node(label="name",label.icon="false",label.placement=
> "internal",figure="rectangle",size="60,25",tool.small.path=
> "icons\obj16\ActivityParameterNode.gif",tool.small.bundle="org.eclipse.uml2.diagram.common
> ")
> class Measure {
> id attr String[1] name;
> attr String businessDescription;
> attr Date date;
> attr Date dateLastModified;
> attr String description;
> attr boolean ~derived;
> attr String formula = "";
> }
>
>
> and thus I added a validation plugin with an *.evl file with several
> rules, that are respected when I invoke "Validate" from the menu of my
> application. But the implicit constraint derived from EMF model (i.e.:
> at least one Dimensione per Hierarchy, or every Object must have a name,
> ....) are not validated.
>
> Instead, the NullPointerException was resolved, the cause was an error
> in the *.evl file synthax.


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: EVL validation is working, EMF is not [message #498980 is a reply to message #498963] Thu, 19 November 2009 12:24 Go to previous messageGo to next message
Giovanni De Sossi is currently offline Giovanni De Sossi
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Hi Dimitris,

I filed the bug, the link is:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=295575

Regards,

Giovanni.
Re: EVL validation is working, EMF is not [message #583010 is a reply to message #498527] Thu, 19 November 2009 08:42 Go to previous messageGo to next message
Giovanni De Sossi is currently offline Giovanni De Sossi
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Sure, this is my environment:

- Eclipse Modeling Galileo SR1 Incubation
- Epsilon (by stable update site)
- EMFatic

I developed a new GMF Project from an *.emf file:

@namespace(uri="hierarchy", prefix="hierarchy")
@gmf(foo="bar")
package hierarchy;

@gmf.link(source="From",target="To",style="solid",width= "1",label.icon="false",tool.small.path="icons\obj16\Association.gif ",tool.small.bundle="org.eclipse.uml2.diagram.common")
class Arc {
ref Node[1]#arcs From;
ref Node[1] To;
id attr String name;
attr boolean[1] multiple = false;
attr boolean[1] optional = false;
}

@gmf.node(figure="ellipse",size="15,15",color="0,0,0",tool.small.path= "icons\obj16\ActivityFinalNode.gif",tool.small.bundle="org.eclipse.uml2.diagram.common ")
class Dimension extends Node {
}

@gmf.node(figure="ellipse",size="10,10",tool.small.path= "icons\obj16\Artifact.gif",tool.small.bundle="org.eclipse.uml2.diagram.common ")
class Attribute extends Node {
attr boolean[1] crossDimensional = false;
attr boolean[1] descriptive = false;
attr boolean[1] optional = false;
attr boolean[1] convergence = false;
attr boolean[1] shared = false;
attr boolean[1] recursive = false;
}

@gmf.diagram(onefile="true",model.extension="hrc",diagram.extension= "hrc")
class Hierarchy {
id attr String[1] name;
val Dimension[1] dimension;
val Attribute[*] attributes;
attr String description;
attr String businessDescription = "";
attr Date dateLastModified;
attr Date date;
attr Type type = "NOT_CONFORMED";
val FactSchema factSchema;
}

@gmf.node(label="name",label.placement="external",label.icon= "false")
abstract interface Node {
id attr String[1] name;
attr String businessDescription;
attr Date date;
attr Date dateLastModified;
attr String description;
attr DataType dataType;
val Arc[*]#From arcs;
}

datatype Date : java.util.Date;

enum Type {
CONFORMED = 0;
NOT_CONFORMED = 1;
DEGENERATED = 2;
}

enum DataType {
CHAR = 0;
VARCHAR = 1;
TEXT = 2;
INTEGER = 3;
FLOAT = 4;
}

@gmf.node(label="name",label.placement="internal",figure= "rounded",size="60,90",tool.small.path="icons\obj16\ActivityPartition.gif ",tool.small.bundle="org.eclipse.uml2.diagram.common")
class FactSchema extends Node {
@gmf.compartment(layout="list")
val Measure[+] measures;
}

@gmf.node(label="name",label.icon="false",label.placement= "internal",figure="rectangle",size="60,25",tool.small.path= "icons\obj16\ActivityParameterNode.gif",tool.small.bundle="org.eclipse.uml2.diagram.common ")
class Measure {
id attr String[1] name;
attr String businessDescription;
attr Date date;
attr Date dateLastModified;
attr String description;
attr boolean ~derived;
attr String formula = "";
}


and thus I added a validation plugin with an *.evl file with several rules, that are respected when I invoke "Validate" from the menu of my application. But the implicit constraint derived from EMF model (i.e.: at least one Dimensione per Hierarchy, or every Object must have a name, ....) are not validated.

Instead, the NullPointerException was resolved, the cause was an error in the *.evl file synthax.
Re: EVL validation is working, EMF is not [message #583024 is a reply to message #583010] Thu, 19 November 2009 10:52 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Giovanni,

I've reproduced this and it seems to be a bug. Could you please open a
bug report and post the link here?

Cheers,
Dimitris

giovanni wrote:
> Sure, this is my environment:
>
> - Eclipse Modeling Galileo SR1 Incubation
> - Epsilon (by stable update site)
> - EMFatic
>
> I developed a new GMF Project from an *.emf file:
> @namespace(uri="hierarchy", prefix="hierarchy")
> @gmf(foo="bar")
> package hierarchy;
>
> @gmf.link(source="From",target="To",style="solid",width=
> "1",label.icon="false",tool.small.path="icons\obj16\Association.gif
> ",tool.small.bundle="org.eclipse.uml2.diagram.common")
> class Arc {
> ref Node[1]#arcs From;
> ref Node[1] To;
> id attr String name;
> attr boolean[1] multiple = false;
> attr boolean[1] optional = false;
> }
>
> @gmf.node(figure="ellipse",size="15,15",color="0,0,0",tool.small.path=
> "icons\obj16\ActivityFinalNode.gif",tool.small.bundle="org.eclipse.uml2.diagram.common
> ")
> class Dimension extends Node {
> }
>
> @gmf.node(figure="ellipse",size="10,10",tool.small.path=
> "icons\obj16\Artifact.gif",tool.small.bundle="org.eclipse.uml2.diagram.common
> ")
> class Attribute extends Node {
> attr boolean[1] crossDimensional = false;
> attr boolean[1] descriptive = false;
> attr boolean[1] optional = false;
> attr boolean[1] convergence = false;
> attr boolean[1] shared = false;
> attr boolean[1] recursive = false;
> }
>
> @gmf.diagram(onefile="true",model.extension="hrc",diagram.extension= "hrc")
> class Hierarchy {
> id attr String[1] name;
> val Dimension[1] dimension;
> val Attribute[*] attributes;
> attr String description;
> attr String businessDescription = "";
> attr Date dateLastModified;
> attr Date date;
> attr Type type = "NOT_CONFORMED";
> val FactSchema factSchema;
> }
>
> @gmf.node(label="name",label.placement="external",label.icon= "false")
> abstract interface Node {
> id attr String[1] name;
> attr String businessDescription;
> attr Date date;
> attr Date dateLastModified;
> attr String description;
> attr DataType dataType;
> val Arc[*]#From arcs;
> }
>
> datatype Date : java.util.Date;
>
> enum Type {
> CONFORMED = 0;
> NOT_CONFORMED = 1;
> DEGENERATED = 2;
> }
>
> enum DataType {
> CHAR = 0;
> VARCHAR = 1;
> TEXT = 2;
> INTEGER = 3;
> FLOAT = 4;
> }
>
> @gmf.node(label="name",label.placement="internal",figure=
> "rounded",size="60,90",tool.small.path="icons\obj16\ActivityPartition.gif
> ",tool.small.bundle="org.eclipse.uml2.diagram.common")
> class FactSchema extends Node {
> @gmf.compartment(layout="list")
> val Measure[+] measures;
> }
>
> @gmf.node(label="name",label.icon="false",label.placement=
> "internal",figure="rectangle",size="60,25",tool.small.path=
> "icons\obj16\ActivityParameterNode.gif",tool.small.bundle="org.eclipse.uml2.diagram.common
> ")
> class Measure {
> id attr String[1] name;
> attr String businessDescription;
> attr Date date;
> attr Date dateLastModified;
> attr String description;
> attr boolean ~derived;
> attr String formula = "";
> }
>
>
> and thus I added a validation plugin with an *.evl file with several
> rules, that are respected when I invoke "Validate" from the menu of my
> application. But the implicit constraint derived from EMF model (i.e.:
> at least one Dimensione per Hierarchy, or every Object must have a name,
> ....) are not validated.
>
> Instead, the NullPointerException was resolved, the cause was an error
> in the *.evl file synthax.


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: EVL validation is working, EMF is not [message #583041 is a reply to message #498963] Thu, 19 November 2009 12:24 Go to previous message
Giovanni De Sossi is currently offline Giovanni De Sossi
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Hi Dimitris,

I filed the bug, the link is:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=295575

Regards,

Giovanni.
Previous Topic:[EuGENia]
Next Topic:ECore2GMF.eol: How to access/change node in GmfMap
Goto Forum:
  


Current Time: Fri Oct 31 13:45:42 GMT 2014

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

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