Scala Eclipse Autocomplete Broken?

前端 未结 4 868
自闭症患者
自闭症患者 2021-02-19 05:15

I\'m trying to get autocomplete working in eclipse for scala development. I\'m trying to reference a java class from a Scala class, and the autocomplete feature never finds it.

相关标签:
4条回答
  • 2021-02-19 05:51

    The best place for questions like this is the Scala IDE user mailing list.

    0 讨论(0)
  • 2021-02-19 05:58

    I had the same problem, and the solution was simple. Pick the menu option Scala -> Run Setup Diagnostics.

    I clicked everything that was called "recommended", and autocomplete started working. I am pretty sure I had done this previously, but the settings might have gotten lost in an update.

    enter image description here

    0 讨论(0)
  • 2021-02-19 06:07

    That type of auto-completion is not yet supported by the Scala plug-in. You can get a similar result by waiting for the compile error to appear, pressing Ctrl-1, and selecting the quick fix to automatically import the type.

    See the "Quick fix imports" section in this "New and noteworthy" post.


    Update September 2011:

    Luc Bourlier has committed an improvement for this to give autocompletion for types on the classpath. It will be in the next beta (2.0.0-beta11), or grab a nightly build.

    0 讨论(0)
  • 2021-02-19 06:09

    here is a simple workaround: https://www.assembla.com/spaces/scala-ide/wiki/Known_Issues#no_completions_available

    0 讨论(0)
提交回复
热议问题