Community
Participate
Working Groups
Build Identifier: 20100218-1602 Building/cleaning a project won't update (add or remove) markers for files that are read-only. Spawning the Xtext validation manually however does this. Reproducible: Always Steps to Reproduce: 1. Turn off auto build 2. Create a general project, paste into it a file with contents that will yield an Xtext resource, and that also should contain some errors/warnings when built/validated. 3. Set the file to read-only. 4. Clean the project and notice that no markers are created. 5. Disable the read-only flag again. 6. Clean the project and notice that the markers get created.
That's intended behavior. The rational (besides that we have a similar behavior in JDT) is that you can't do anything about it (i.e. fix them) and also the markers API is not available for non workspace resources like jar entries for instance.
(In reply to comment #1) > That's intended behavior. The rational (besides that we have a similar behavior > in JDT) is that you can't do anything about it (i.e. fix them) and also the > markers API is not available for non workspace resources like jar entries for > instance. Ok, thanks for the clarification. A different rationale for open (read-only) documents then.
Yes.
Many version control systems such as Perforce,Clearcase mark files that are not checked out as read only. So the intended behaviour according to you has caused me lot of problems and basically we need to change that condition (!file.isReadonly())
See last comment. We should have a second look at this issue.
Another person has added a similar comment to the corresponding forum thread (http://www.eclipse.org/forums/index.php/t/207688/#msg_702462) on 07/26/2011. I think it is high time that this issue is addressed. The original rationale seems flawed to me, because developers can actually do something about errors in write-protected resources, namely they can check out the file out of source control and fix the problem (or just remove the write lock manually). But even for files that are not currently writable, developers would want to know if they contain any problems. IMHO, the fact that a file is read-only does not imply that I don't care about any errors in that file.
Removed the dependency to bug 351963 since the readonly issue affects all languages (even those, that you cannot manipulate, e.g. Xtext, Xtend, mwe2).
Pushed to master.
Thanks for fixing this! :-)
*** Bug 342875 has been marked as a duplicate of this bug. ***
Closing all bugs that were set to RESOLVED before Neon.0