When pressing Ctrl-Space, the window has no completion proposals, but other semantic actions (such as hyperlinking) work fine.
It's almost always a setting under Java/Editor/Content Assist/Advanced. Before 2.0.0-beta09 it was required Java Proposals
to be checked. Although, quite frequently that option was getting unchecked because of some interoperation issue with the Mylyn connector plugin (if installed). Therefore, starting from beta09 we have added two Scala specific content assistant options, so that we can now make sure that once checked they won't ever get unchecked. If you experience problems with completion, please make sure that both the Scala Completions
and Scala Completions (Java sources)
are checked (the latter option is required only if you need completion to work on Java sources as well, but since these are global options we'd recommend to check them both by default) .
The Setup Diagnostics dialog will take care of this, if you use the recommended
settings:
The IDE is completely frozen.
If the deadlock is an instance of [ticket:1000317] you can edit your eclipse.ini
file using the recommended settings:
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-Dosgi.classloader.lock=classname
This will reduce the probability of getting a deadlock, but wont fix it.
The best thing is to take a thread dump:
Once the IDE is frozen, an easy way to get the stack trace is on the command line:
$ jps -v
(to get the PID of the JVM running Eclipse)
$ jstack <pid>
If the thread dump doesn't match the one in #1000317, please open a new ticket attaching your thread dump.
Lots of compilation errors, due to definitions that should be found, but are not taken into account. Those definitions are part of a package object
, many times being implicit definitions. The project can build without errors, but the presentation compiler shows errors as you type.
Make sure each package object
definition appears in a file package.scala
, in the right package. For instance, for a package duration
inside akka.util
, place the source file in akka/util/duration
:
//inside akka/util/duration/package.scala:
package object duration {
/// ...
}
Eclipse shows a message box saying that it failed to initialize the Scala compiler. This is most likely due to the incorrect (or missing) standard Scala library.
The Scala compiler needs the same version of the Scala library, so you cannot mix a 2.9 compiler with a 2.8 standard library. You may get this problem if you generated project files from an existing SBT/maven project that's configured to work with 2.8.
Simply remove the offending scala-library.jar and add the Eclipse version of the Scala library:
I just updated to beta09 (or greater) but I cannot see the package object wizard when right clicking on any project's resource, New ->
, aPackage Object Wizard
should be available, as in the following image:
Close all Scala (and any additional you may have) perspective. To do so, simply right click on the top-right corner under the opened Scala perspective, and choose Close
. Then, go to Window -> Open Perspective
and select Scala
. That should make the Package Object Wizard
available.
Having imported a bunch of projects generated by sbt-eclipse on a Mac, you get parser errors from Scala on every non-ASCII symbol (like arrows if you are using Scalariform with certain settings).
The generated .project
files use the platform encoding, which on the Mac is MacRoman. Either change each project, if you have a reason to keep that default, or change the default to UTF-8
, preferably before importing. Note that you must restart Eclipse in order to have the Scala compiler use that new encoding default.
After upgrading the Scala plugin, java.lang.NoClassDefFoundError: scala/tools/nsc/settings/MutableSettings$SettingValue
exception is reported for all Scala projects in the workspace. The Scala IDE is then unusable.
It is important to make sure that the box Contact all update sites ...
is unchecked when upgrading the Scala IDE plugin, or you may experience the above symptoms.
The reason why it is important to uncheck Contact all update sites ...
box is that if you have several update sites that provide different versions of the Scala IDE plugin, Eclipse may decide to use a newest scala-library instead of the one provided by the plugin you are trying to install. When Contact all update sites ...
is disabled, Eclipse sees only one version of scala-library, i.e., the one that comes with the plugin you are installing.