Decorator for svn:needs-lock does not show up

25 views
Skip to first unread message

Niko Paltzer

unread,
Feb 5, 2020, 7:41:37 AM2/5/20
to Subclipse
Hi,

A file that needs a lock to be edited (i.e. the svn:needs-lock is set) has its own icon decorator.

But in eclipse preferences -> Team -> SVN -> Label Decorations, there is no such decorator shown in preview.

And it does not work in project explorer, of course. :-)

So did the icon got lost over time or has it never been included?

Thanks!

Niko

Mark Phippard

unread,
Feb 6, 2020, 8:47:25 AM2/6/20
to Niko Paltzer, Subclipse
I do not recall if this decorator ever existed or not.  The main feature is that files with this property set are made read-only by Subversion so any decorator would have been based on detecting that the file is read only, but I do not see that happening.  What I do see however is that when you try to edit one of these files, Subclipse prompts you to lock the file before you can do so and this also makes the file writable.

Mark


--
You received this message because you are subscribed to the Google Groups "Subclipse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subclipse+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subclipse/1086831e-2b8c-4b06-bf8d-a8324c487840%40googlegroups.com.


--

Niko Paltzer

unread,
Feb 6, 2020, 4:16:18 PM2/6/20
to Mark Phippard, Subclipse
Hi Mark,

thank you for the quick reply. 

Would your suggestion also work for files that are opened in external editors?

And would the prompt be based on svn:needs-lock or on the fact that the file is read-only? 

Niko

Mark Phippard

unread,
Feb 6, 2020, 4:20:32 PM2/6/20
to Niko Paltzer, Subclipse
If a file is opened in an external editor then Subclipse cannot do anything.  We do not step in at the point of opening the file, it happens when you try to edit it.  So if you are using an external editor you would have to use the Team > Lock option before opening it.

Niko Paltzer

unread,
Feb 6, 2020, 5:09:18 PM2/6/20
to Mark Phippard, Subclipse
Ok, thanks. 

So for my use case, I would be better off with the icon decorator, since we use the needs-lock mostly for files that are opened in external editors like xls.
And the decorator would tell me to lock the file before I open it an (probably) see that it is read only.

Could you please tell me, why you didn't consider having a decorator based on the property?
Is there a problem with the performance?

Thanks again.

Mark Phippard

unread,
Feb 6, 2020, 5:17:18 PM2/6/20
to Niko Paltzer, Subclipse
I think what I said is I do not remember.  It is possible we did have this decorator and somewhere along the line it has stopped working.  I just do not recall.  We do not really work on the product anymore but when people send in Pull Requests we do try to review and merge them and the subsequent builds do get posted.  So if you want to take a look, go for it.

Mark

Mark Phippard

unread,
Feb 6, 2020, 5:28:09 PM2/6/20
to Niko Paltzer, Subclipse
I was going to send you a pointer to the code ... here that is:  https://github.com/subclipse/subclipse/search?q=IMG_NEEDSLOCK&unscoped_q=IMG_NEEDSLOCK

But in just looking at that I did see something.  It looks like this is just controlled by a preference that is off by default.  Try checking the Show read only decorator and that ought to resolve it.  See attached


Screen Shot 2020-02-06 at 5.26.31 PM.png

Niko Paltzer

unread,
Feb 7, 2020, 2:55:05 AM2/7/20
to Mark Phippard, Subclipse
Yeah, you're right! Sorry I missed that and thank you for pointing it out!

Niko
Reply all
Reply to author
Forward
0 new messages