Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Error-markers for write-protected files
Error-markers for write-protected files [message #665164] Wed, 13 April 2011 14:13 Go to next message
Johannes Stelzer is currently offline Johannes StelzerFriend
Messages: 30
Registered: October 2009
Member
It seems xtext 1.0.2 doesn't create error-markers for write protected (read only) files. (Highlighting and references though are working)
Is there a way to enable this?

[Updated on: Wed, 13 April 2011 16:06]

Report message to a moderator

Re: Error-markers for write-protected files [message #665213 is a reply to message #665164] Wed, 13 April 2011 17:24 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
Hi Johannes,

there is no way to override this in a language dependent way. The marker
handling is done by the builder which works for all languages.
See org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.
Why do you need to validate files that are readonly? Does your VCS mark
them as such?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 13.04.11 16:13, schrieb Johannes Stelzer:
> It seems xtext 1.0.2 creates error-markers not for write protected
> files. (Highlighting and references work)
> Is there a way to enable this?
Re: Error-markers for write-protected files [message #665232 is a reply to message #665213] Wed, 13 April 2011 19:43 Go to previous messageGo to next message
Johannes Stelzer is currently offline Johannes StelzerFriend
Messages: 30
Registered: October 2009
Member
Sebastian Zarnekow wrote on Wed, 13 April 2011 13:24
Hi Johannes,

there is no way to override this in a language dependent way. The marker
handling is done by the builder which works for all languages.
See org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.
Why do you need to validate files that are readonly? Does your VCS mark
them as such?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 13.04.11 16:13, schrieb Johannes Stelzer:
> It seems xtext 1.0.2 creates error-markers not for write protected
> files. (Highlighting and references work)
> Is there a way to enable this?



yes we're using Rational Synergy for SCM - and files that are not checked out (means sth. like marked as 'in-work' by the developer) are read-only.

I've customized my implementation of the marker update.
And bound it in my UIModule with
    public Class<? extends org.eclipse.xtext.builder.builderState.IMarkerUpdater> bindIMarkerUpdater() {
        return InputFileMarkerUpdater.class;
    }


But it doesn't get called??

[Updated on: Wed, 13 April 2011 20:28]

Report message to a moderator

Re: Error-markers for write-protected files [message #665301 is a reply to message #665232] Thu, 14 April 2011 08:20 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
Hi Johannes,

please file a ticket and attach the use case there.
You could replace the builder module and substitute the MarkerUpdater
with an own implementation that does not ignore read only files. There
is an extension point that allows to enhance the guice module that is
used to instantiate the central components of Xtext. However, it may
only be used once in an Eclipse environment. That is, no other installed
language would be allowed to replace this module. Would that be feasable
for you?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 13.04.11 21:43, schrieb Johannes Stelzer:
> Sebastian Zarnekow wrote on Wed, 13 April 2011 13:24
>> Hi Johannes,
>>
>> there is no way to override this in a language dependent way. The
>> marker handling is done by the builder which works for all languages.
>> See org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.
>> Why do you need to validate files that are readonly? Does your VCS
>> mark them as such?
>>
>> Regards,
>> Sebastian
>> --
>> Need professional support for Eclipse Modeling?
>> Go visit: http://xtext.itemis.com
>>
>> Am 13.04.11 16:13, schrieb Johannes Stelzer:
>> > It seems xtext 1.0.2 creates error-markers not for write protected
>> > files. (Highlighting and references work)
>> > Is there a way to enable this?
>
>
>
> yes we're using Rational Synergy for SCM - and files that are not
> checked out (means sth. like marked as 'in-work' by the developer) are
> read-only.
Re: Error-markers for write-protected files [message #665479 is a reply to message #665301] Thu, 14 April 2011 18:28 Go to previous messageGo to next message
Johannes Stelzer is currently offline Johannes StelzerFriend
Messages: 30
Registered: October 2009
Member
Dear Sebastian,

Since i've made a eclipse product shipping my dsl only i'll give that a try.

EDIT:

Was not that much of work an works like a charm!
Though i've to say that i duplicated your code... Sad

Thank's a lot for your help!



Regards,
Johannes

[Updated on: Thu, 14 April 2011 18:40]

Report message to a moderator

Re: Error-markers for write-protected files [message #666811 is a reply to message #665232] Fri, 22 April 2011 18:04 Go to previous messageGo to next message
Mirko Raner is currently offline Mirko RanerFriend
Messages: 98
Registered: July 2009
Location: New York City, NY
Member
Johannes Stelzer wrote on Wed, 13 April 2011 12:43
yes we're using Rational Synergy for SCM - and files that are not checked out (means sth. like marked as 'in-work' by the developer) are read-only.

We're having the same problem with Perforce, which also marks files as read-only unless they are checked out.
Re: Error-markers for write-protected files [message #702462 is a reply to message #666811] Tue, 26 July 2011 12:02 Go to previous messageGo to next message
Wladimir Safonov is currently offline Wladimir SafonovFriend
Messages: 7
Registered: July 2011
Junior Member
Hi Sebastian,

I also have currently to deal with a custom-specific VCS, which marks files read-only. And unfortunately it is not used in the development environment, but rather in a productive tool for a specific domain. This blocks all validation for the affected files, so much important for the customer.

Although the workaround with overriding the shared module works perfectly, there is still much code to duplicate in a custom read-only permissive MarkerUpdater. Are there any strong objections against making the standard MarkerUpdaterImpl able to work with read-only files? Of course one could consider some extension mechanism to this handling on a per language basis. But I just so far don't see, why we could not have markers generated for all files, whereas during the quick fix the user would have to decide, if the write protection should be removed from a specific file. Have there been any original idea why not to proceed so?

Thanks for your reply in advance!
Re: Error-markers for write-protected files [message #703823 is a reply to message #702462] Thu, 28 July 2011 00:36 Go to previous message
Mirko Raner is currently offline Mirko RanerFriend
Messages: 98
Registered: July 2009
Location: New York City, NY
Member
There is actually a bug open for this problem: https://bugs.eclipse.org/316445
Previous Topic:Xtend - nested graph information
Next Topic:[xtext 2.0] Project wizard not registered
Goto Forum:
  


Current Time: Thu Sep 24 08:40:55 GMT 2020

Powered by FUDForum. Page generated in 0.01864 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top