2

As it is mentioned in the title, mark occurrences in eclipse for Scala is not working.

It works fine with java code.

I have to mention that "Toggle Mark Occurrences" is activated as follow enter image description here

I have to mention as well, that in Preferences > General > Editors > Text Editors > Annotations both Occurrences & Write Occurrences have the Text as Highlighted option selected and with I even changed the color. always nothing happens

enter image description here

Also, I have another question, I have to enable the option that let me access the origin of a variable or a class, I don't know how we call it, but what I mean is, when I press on ctrl and click on an variable or a method it takes me to where it was declared. It works fine on java classes, but I want to enable it for Scala.

I use:

  • Eclipse 2020-03
  • plugin Scala IDE 4.7.x
  • Scala version 2.9.0.1

enter image description here

Bashir
  • 2,057
  • 5
  • 19
  • 44
  • 2
    The **ScalaIDE** is been deprecated since a couple of years now, it is no surprise it won't work anymore _(especially with newer Scala versions)_. You may want to give it a look to **IntellIJ** or [**metals**](https://scalameta.org/metals/) _(which has support for **Eclipse**)_. – Luis Miguel Mejía Suárez May 27 '20 at 16:57
  • 2
    Scala IDE is no longer maintained and there will be no further updates for later version of Eclipse. You can use it if you go back to Eclipse 4.7. For more recent Eclipse versions, debugging and code completion will be broken. There is an [unofficial Scala IDE build for Eclipse Photon](https://groups.google.com/forum/#!topic/scala-ide-user/unku_0GVOU0) which for me also works fine up to Eclipse 2018-12. As far as I know Eclipse 2018-12 is the most recent version that you can use it with, for any more recent version you are out of luck and should check other some plugins or IDEs. – kapex May 27 '20 at 17:02
  • @kapex I tried with Eclipse 2018-12 and the version that you provided, but it is the same – Bashir May 27 '20 at 18:51
  • @LuisMiguelMejíaSuárez I have to keep using eclipse, metals was a nice solution, but it does not support Scala 2.9.0.1, I am working with an old version that is not supported by metals – Bashir May 27 '20 at 18:55
  • @Bashir uhm, **Scala** `2.9.0` was released more than 8 years ago, it is pretty old. Any reason for using such a old version? In any case, then probably the only IDE that will work for you is an old version of the ScalaIDE but do not be surprised it won't do much. - at least you may want to upgrade to [`2.9.3`](https://www.scala-lang.org/news/2.9.3/) which is the oldest release I can find the release notes on the site, these notes mention that you can use **Eclipse** with that version. – Luis Miguel Mejía Suárez May 27 '20 at 19:10
  • @Bashir Mark occurrences and navigating to files with ctrl works for me with the unofficial Scala IDE with Eclipse 2018-12. I'm using Scala 2.12.8 though, maybe that makes a difference. – kapex May 28 '20 at 08:58
  • yes it seems that the problem is because it's an old version of Scala, I tried to use eclipse 3.7 indigo but the plugin link of scala IDE from the official website, but its link is corrupted http://scala-ide.org/download/prev-stable.html , well I think I have to work without marking occurences .. thank you guys – Bashir May 28 '20 at 09:02

1 Answers1

0

In Scala IDE, click on this button in the toolbox to activate Mark Occurrences (off by default) :

link to the screenshot

Elikill58
  • 4,050
  • 24
  • 23
  • 45