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

Bug 314290

Summary: [Xtext] Markers are not serialized after validation of model
Product: [Modeling] TMF Reporter: Johan Wannheden <johan.wannheden>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: clay, stephane, sven.efftinge
Version: 1.0.0Flags: sven.efftinge: helios+
Target Milestone: RC3   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
proposed patch none

Description Johan Wannheden CLA 2010-05-25 11:12:04 EDT
Build Identifier: M20100211-1343

It seems that sometimes error/warning markers are not serialized. This happens happens when a clean model is opened, then validated and closed without saving. The validation results in markers appearing in the model. Closing the editor does not update the state on the file icon.


Reproducible: Always

Steps to Reproduce:
1. open a concrete model instance having no error/warning markers
2. validate the model using the context menu action "Validate" -- markers should now appear in the test model because *expensive* checks were conducted
3. close the editor *without saving*
4. verify that there is no marker on the file icon
5. open the model/editor and verify that markers were not preserved after the previous validation
Comment 1 Sven Efftinge CLA 2010-05-26 00:39:03 EDT
Markers are only created during the builder run. If you just open a model, what you see are Annotations which are not persisted. So if I got you right this is intended behavior. However, I wonder why the builder didn't mark the model.
Comment 2 Johan Wannheden CLA 2010-05-26 01:35:40 EDT
Naturally I would have expected the markers resulting from expensive checks to be persisted.
Comment 3 Sven Efftinge CLA 2010-05-26 02:28:26 EDT
Yes, of course. I overlooked that you are triggering the 'expensive' checks.
Comment 4 Sven Efftinge CLA 2010-05-26 04:59:24 EDT
org.eclipse.xtext.ui.editor.handler.ValidateActionHandler uses an org.eclipse.xtext.ui.editor.validation.AnnotationIssueProcessor instead of
org.eclipse.xtext.ui.editor.validation.MarkerIssueProcessor
Comment 5 Michael Clay CLA 2010-05-26 17:25:18 EDT
Created attachment 170105 [details]
proposed patch
Comment 6 Michael Clay CLA 2010-05-26 17:26:34 EDT
fixed in HEAD
Comment 7 Karsten Thoms CLA 2017-09-19 16:29:33 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.