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

Bug 311142

Summary: All markers are removed by fastchecks
Product: [Modeling] TMF Reporter: Patrick <bugzilla>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: clay, jan, sebastian.zarnekow
Version: 0.7.2Flags: sebastian.zarnekow: helios+
Target Milestone: RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch, pls review
none
with tests sven.efftinge: review+

Description Patrick CLA 2010-04-30 04:47:12 EDT
Build Identifier: M20100211-1343

We are using Check for evaluating constraints. Therefore we would like to differ between fastchecks and the default checks, which are just evaluated when the file is saved.
The checks themselfs work fine, but the problem is, that the fastchecks seem to erase ALL markers, even those created by the default checks. This has the effect, that if the user saves his file some error markers just appear for a few seconds, until they are removed again when the fast checks are executed (which seems to happen during the save-process or short after).

We think it would make sense just to reevaluate the markers set by the specific check-file, so the markers created by the default check scope will be available until the next time the user saves the file.

Reproducible: Always

Steps to Reproduce:
Using xtext/xtend 0.7.2

1. Add <fragment class="org.eclipse.xtext.generator.validation.CheckFragment"/> to generateDsl-workflow.
2. Add some checks to DslFastChecks.chk file
3. Add some additional checks to DslChecks.chk file
4. Edit a file, breaking rules of the DslChecks
5. Save
Comment 1 Sebastian Zarnekow CLA 2010-04-30 04:51:55 EDT
IIRC, this was already fixed in Xtext 1.0 which is due June, 23.
Do you have the possiblity to verify that?
Comment 2 Patrick CLA 2010-05-12 04:06:43 EDT
(In reply to comment #1)
> IIRC, this was already fixed in Xtext 1.0 which is due June, 23.
> Do you have the possiblity to verify that?


Hi,
I finally managed to verify that and well, let's say it's better. The markers are not removed immediatly after saving the file, but with the first typing (revalidation). 

I think it would be more useful, if the markers would disappear with the next file save (if the error is fixed), as seen in other eclipse editors.

But I am not sure if this is a bug anymore, it's more a feature request. ;)

Regards
Patrick
Comment 3 Sebastian Zarnekow CLA 2010-05-12 04:36:15 EDT
I consider this to be a bug. 
Scheduled for RC2.

We should provide different icons in the annotation gutter for different check types.
Comment 4 Michael Clay CLA 2010-05-18 16:26:47 EDT
Created attachment 169012 [details]
proposed patch, pls review
Comment 5 Sebastian Zarnekow CLA 2010-05-19 05:17:49 EDT
Review results:

- MarkerUpdaterImpl.updateMarker(ResourceSet, ImmutableList<Delta>, IProgressMonitor) should not remove NORMAL markers on type.
- I'ld like to see some tests that document this behaviour.
Comment 6 Michael Clay CLA 2010-05-19 16:42:18 EDT
Created attachment 169225 [details]
with tests
Comment 7 Jan Koehnlein CLA 2010-05-25 03:26:32 EDT
Patch applied.
Comment 8 Patrick CLA 2010-06-09 02:51:34 EDT
Thank you, guys! :)
Comment 9 Karsten Thoms CLA 2017-09-19 15:39:17 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.