Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354402 - Would like to run all validators, even when finding errors
Summary: Would like to run all validators, even when finding errors
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 11:57 EDT by Stephan Herrmann CLA
Modified: 2017-10-31 10:58 EDT (History)
1 user (show)

See Also:
sven.efftinge: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.