Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325136 - JavaValidator isn't registered, if grammer is not generated
Summary: JavaValidator isn't registered, if grammer is not generated
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M5   Edit
Assignee: Jan Koehnlein CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 334080
Blocks:
  Show dependency tree
 
Reported: 2010-09-13 12:55 EDT by Benjamin Schwertfeger CLA
Modified: 2017-09-19 17:16 EDT (History)
4 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Schwertfeger CLA 2010-09-13 12:55:35 EDT
If you use an existing ecore model for your grammar the AbstractXXXJavaValidator and XXXJavaValidator classes are generated and set in the module. 


IS: The Validator is not registered in the Registry, because the getPackages method returns an empty array.

EXPECTED: The generated validator should register for each referenced ecore model or contain a dummy implementation of getEPackages() with a comment to fill in the relevant EPackages.
Comment 1 Sebastian Zarnekow CLA 2010-09-13 14:06:23 EDT
This is intentional: We do not register anything for EPackages that are imported because the Xtext grammar is not the primary source for those packages and should not alter their behaviour or semantics. Developers have to do this explicitly. 
Although this often causes confusion I'm inclined to keep the current behaviour.
Comment 2 Lothar Wendehals CLA 2011-01-04 07:22:13 EST
Hi everybody,

I also stumbled upon this "bug". It took me an hour to find out what was wrong. If its not a bug, it should definitely(!!!) be documented. It's not documented in the build-in help.
Comment 3 Jan Koehnlein CLA 2011-01-12 08:15:32 EST
We should only register for EPackages of elements that can be contained, to avoid a giant composite validator for often referenced languages such as Ecore or JvmTypes. 

If we resolve Bug 334080, we can register the EValidator for all these EPackages, but only in the context of a single language, making it less invasive with regard to other EMF based plug-ins.
Comment 4 Jan Koehnlein CLA 2011-01-13 04:02:27 EST
Implemented and pushed to MASTER.
Comment 5 Karsten Thoms CLA 2017-09-19 17:04:21 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:16:18 EDT
Closing all bugs that were set to RESOLVED before Neon.0