Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354402

Summary: Would like to run all validators, even when finding errors
Product: [Modeling] TMF Reporter: Stephan Herrmann <stephan.herrmann>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sven.efftinge: kepler+
Target Milestone: M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Stephan Herrmann CLA 2011-08-10 11:57:09 EDT
In a project that uses both a JavaValidator and a validator written in Check
I found that the former is skipped if the latter reports any errors for
the current model. This also affects the dependent validators
ImportUriValidator and NamesAreUniqueValidator.

Digging into the code I was surprised to see lines like this in all three 
validate methods of CompositeEValidator:

	result = result && val.getDelegate().validate(eClass, eObject, diagnostics, context);

Is "&&" really intended here? I would expect:

	boolean success = val.getDelegate().validate(eClass, eObject, diagnostics, context);
	result = result && success;
Comment 1 Sebastian Zarnekow CLA 2011-08-16 17:06:20 EDT
We'll keep that in mind for Juno.
Comment 2 Sven Efftinge CLA 2012-11-23 02:06:47 EST
pusehd to master
Comment 3 Eclipse Webmaster CLA 2017-10-31 10:47:17 EDT
Requested via bug 522520.

-M.
Comment 4 Eclipse Webmaster CLA 2017-10-31 10:58:25 EDT
Requested via bug 522520.

-M.