斯卡拉Eclipse的自动完成破? [英] Scala Eclipse Autocomplete Broken?

查看:111
本文介绍了斯卡拉Eclipse的自动完成破?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让自动完成在Eclipse工作斯卡拉发展。我试图从斯卡拉类引用一个Java类,并自动完成功能从来没有发现它。

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.

例如借此斯卡拉类:

object Main {
 def main(args: Array[String]) {
  val btn = new JButton
 }
}

当我按Ctrl +空格输入时自动完成的JButton认定编曲,ASOF,案例,抓,高清等结束......但没有课。

When I hit ctrl+space at the end of typing JButton autocomplete finds "Arr", "asof", "case", "catch", "def" etc... but no classes.

在窗口 - > preferences-> Java的>编辑 - >内容Assist->高级无我有默认的议案种下选择:

in Window->Preferences->Java->Editor->Content Assist->Advanced I have selected under "Default Proposal Kinds":

Java的建议,Java类型的提案,SWT模板提案和建议的模板

Java Proposals, Java Type Proposals, SWT Template Proposals and Template Proposals.

我使用Eclipse 3.5.2下的斯卡拉2.8.0决赛插件,在Windows 7中

I'm using the Scala 2.8.0-final plugin under Eclipse 3.5.2, in Windows 7

有没有其他人遇到这个问题?任何解决方案?

Has anyone else encountered this problem? Any solutions?

推荐答案

这型自动完成的还没有被Scala插件的支持。您可以通过等待编译错误出现,pressing按Ctrl-1,并选择速战速决自动导入类型得到类似的结果。

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.

2011更新日:

吕克Bourlier有<一个href=\"http://www.assembla.com/$c$c/scala-ide/git/changesets/75b2dd75abbe5d5760985295273261a75bf97f17\"相对=nofollow>致力于改善这给自动完成的类路径上的类型。这将是在未来的测试版(2.0.0-beta11),或抢每晚构建。

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.

这篇关于斯卡拉Eclipse的自动完成破?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆