سؤال

In eclipse, my sbt files show the 'J' symbol in the icon, rather than the superman 'S' symbol I expect to see for scala files. Not a kryptonite-serious problem, but how do I fix it?

eclipse icons

generated via sbt-eclipse plugin 2.4.0, sbt 0.13.1-RC2, eclipse 4.3.1, scala-ide 4.0.0-m2.

I'll guess that the problem is related to the convention of including sbt .scala files in the root of the /project directory.

Edit:

It is bad to not have the super 'S' symbol, otherwise the .scala files won't be compiled in eclipse.

I manually added the following to the project/.classpath:

 <classpathentry including="*.scala" kind="src" output="target/scala-2.10/sbt-0.13/classes" path=""/>

That fixes things. Is this an sbteclipse issue? Is there a workaround?

هل كانت مفيدة؟

المحلول

The wrong icon is the result of a bug in SDT - I created a ticket.

Beside from that, Scala files (as well as Java files) which are not assigned to the classpath (as it is currently the case for sbt project files) are not compiled by Eclipse (because they are not associated with a builder).

Nevertheless, you get most other IDE features for these files like semantic highlighting or auto completion (in fact all features which don't require or rely on bytecode generation should work).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top