Community
Participate
Working Groups
Build ID: 3.3.1.1 This feature request is to enhance the ability for clients to configure/customize the validation messages generated by EObjectValidator. One suggestion mentioned in this thread http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg27459.html is to refactor the creation of the BasicDiagnostic into a protected helper method that can be overridden by the generated subclass. Additionally, getEcoreResourceLocator.getString would be refactored into a protected getString method that could also be overridden for customization.
Created attachment 88298 [details] Proposed changes I wonder how best to change the templates...
Guys, I'm wondering how best to change the template if at all. Obviously for 1.4 generation the base class methods wouldn't be available. I suppose we could generate them. Or I could just generated a comment in the TODO section of the validator showing the new pattern and suggesting it be used... What do you think?
My first thought is to generate using the new pattern only when targeting 5.0 or higher. The new pattern is nicer but, especially since it's not available on the built-in EObject validation, I doubt its worth generating the extra methods each time.
Created attachment 88454 [details] Updates that include generator changes. This introduces a new GenModel.runtimeVersion field of type GenRuntimeVersion that includes literals for EMF22, EMF23, and EMF24. The new validator pattern is generated only for version EMF24 or greater.
The changes are committed to CVS for 2.4
Fix available in HEAD: 2.4.0.I200802052000.