Deprecated methods should be struck through in autocompletion
Deprecated methods should be displayed with a line struck through in the autocomplete popup. This doesn't happen right now for deprecated Java or Scala methods:
val a = new java.io.File(".")
val b = a.toURL //should be struck through in autocomplete popup
@deprecated def deprecatedMethod = ""
val c = deprecatedMethod //should be struck through in autocomplete popup
Leave a comment
on 2013-03-10 02:11 *
By Simon Schäfer
In
For code completion it is not working yet.
Preferences → Scala → Syntax coloring
it is possible to activate strikethrough for deprecated symbols.For code completion it is not working yet.
I think there's a problem with the strikethrough for deprecated symbols in the latest Scala IDE. I did a fresh install of 3.0.0.rc2-2_10-201303061959-e1dcc54 in Indigo SR 2. "Strikethrough deprecated symbols" is enabled by default, but it isn't working. I've tried unchecking it and checking it again, it still doesn't work.
on 2013-03-10 14:36 *
By Simon Schäfer
Type changed from Defect to Enhancement
Component changed from None to Code Completion
Description changed from Deprecated methods should b... to Deprecated methods should b...
Summary changed from Deprecated methods should be struck through to Deprecated methods should be struck through in autocompletion
The not updated deprecated symbols is a regression error. I filled a ticket: #1001584
I changed this ticket to only mentioning autocompletion.
I changed this ticket to only mentioning autocompletion.
@ dnadolny After enabling "Strikethrough deprecated symbols", deprecation should show up if you close and re-open the editor (this is just a workaround, of course) - btw, my comment was related to #1001584, sorry for the confusion.
@ dotta - Still not working. I had tried closing and re-opening the editor before, and just now I've tried closing all editors, disabling it, restarting eclipse, enabling it, restarting eclipse, and then opening the editor, and deprecated methods still don't have strikethrough in the editor.
on 2013-03-11 22:12 *
By Simon Schäfer
It is a bug, see ticket #1001584
on 2013-03-12 08:13 *
By Mirco Dotta
@dnadolny To avoid any possible confusion, let me reiterate on the fact that deprecated entities are not struckthrough in the completion proposal dialog. This is a missing feature, hence closing/re-opening the editor won't make it work. What it should (does for me) work is correct display in the editor of deprecated entities. As mentioned by @Simon Schäfer, there is indeed a bug with picking up the preference change linked to "Strikethrough deprecated symbols" (ticket #1001584), and the workaround in that case is to close and re-open the editor. In my above comment you can see how your example looks like in the editor with "Strikethrough deprecated symbols" enabled (e.g., enable it before creating the source). What I'm understanding is that, in your case, deprecated entities are never struckthrough, even in the simple snippet you provided. If that's the case, then there is an additional bug lying somewhere. One thing that would be interesting to know is if any of the semantic colorings is applied in your editor (e.g., do you get variables to be displayed in red?)
@dotta - Yes, semantic highlighting is working, I'll attach a screenshot. My eclipse and scala ide version are in the 2nd comment I posted. I hadn't touched any colouring preferences before reproducing this, in the preferences dialog "Strikethrough deprecated symbols" was checked by default.
You made me a bit paranoid, so I've tried again with a fresh install of eclipse and the scala ide, and it still doesn't work.
I'm on Ubuntu 10.04.
I've just reproduced it on another machine, same eclipse/scala ide version but Ubuntu 12.10.
You made me a bit paranoid, so I've tried again with a fresh install of eclipse and the scala ide, and it still doesn't work.
I'm on Ubuntu 10.04.
I've just reproduced it on another machine, same eclipse/scala ide version but Ubuntu 12.10.