ptanov / epf-process-validator

Set of plugins to be contributed to Eclipse Process Framework (EPF) for validating processes
0 stars 0 forks source link

Robus way to wrap custom type #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Current scheme (with wrapping in LibraryEValidator.validate()) has many errors:
 * When validation error occurs it is not reported to original widget
 * When saving document document is not wrapped (LibraryEValidator.validate() is called only with right click of mouse and > validate action)
 * When custom type is contained in object that is validated it is not wrapped
 * others?

Original issue reported on code.google.com by 1.Pla...@gmail.com on 17 Jan 2011 at 10:25

GoogleCodeExporter commented 9 years ago
Issue 87 has been merged into this issue.

Original comment by 1.Pla...@gmail.com on 17 Jan 2011 at 10:26

GoogleCodeExporter commented 9 years ago
Issue 91 has been merged into this issue.

Original comment by 1.Pla...@gmail.com on 17 Jan 2011 at 10:26

GoogleCodeExporter commented 9 years ago
Issue 92 has been merged into this issue.

Original comment by 1.Pla...@gmail.com on 17 Jan 2011 at 10:26

GoogleCodeExporter commented 9 years ago
Maybe context can be changed - but where is saved current variable, e.g. when 
evaluating a.b.c - where result from a.b is stored?
There is other way in .internal package - there is method is...object() and if 
true ...object() is called - that can be overrided and used to wrap

Original comment by 1.Pla...@gmail.com on 17 Jan 2011 at 10:28

GoogleCodeExporter commented 9 years ago
"There is other way in .internal package - there is method is...object() and if 
true ...object() is called - that can be overrided and used to wrap":
HelperUtil.getConstraintContext():
env.getUMLReflection().isStereotype()
env.getUMLReflection().getStereotypeApplication()

Original comment by 1.Pla...@gmail.com on 17 Jan 2011 at 9:17

GoogleCodeExporter commented 9 years ago
There is solution:
If object is wrapped too early - validation status is bind to wrong object 
(wrapper, rather than original object). So it should be wrapped at OCL rule 
evaluation time. So EcoreEvaluationEnvironment should be extended in method 
navigateProperty() - wrap target if needed.
In order to register ExtendedEcoreEvaluationEnvironment - 
EcoreEnvironmentFactory should be extended, too.
OCL should be instantiated with custom factory.

In order to match some object to OCL constraint before wrapping actual object - 
OCLConstraintDescriptor should be changed in method targetsTypeOf().

More info at wiki: UsingOCL

Original comment by 1.Pla...@gmail.com on 17 Jan 2011 at 10:14

GoogleCodeExporter commented 9 years ago
More info at wiki: UsingOCL 
http://code.google.com/p/epf-process-validator/wiki/UsingOCL

Original comment by 1.Pla...@gmail.com on 17 Jan 2011 at 10:14

GoogleCodeExporter commented 9 years ago
Removed old scheme for early wrapping of validated object. EObjects in OCL are 
wrapped at rule evaluation time - while fetching children 
(EcoreEvaluationEnvironment.navigateProperty()).
In order to match some object to OCL constraint before wrapping actual object - 
OCLConstraintDescriptor.targetsTypeOf() is fixed.

Original comment by 1.Pla...@gmail.com on 18 Jan 2011 at 7:57