Intellij IDEA 在合法的 Scala 代码上显示错误
我是 Scala 和 IntelliJ IDEA 的新手。我正在从 Simply Lift 示例学习 Lift。我已按照此处提供的说明设置了 IDE。我正在使用基于 Maven 的方法。Scala 插件已版本化(0.4.1084——最新截至 2011 年 6 月 30 日)。 IntelliJ IDEA 版本是 10.5。
原型是
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-blank_2.8.1 \
-DarchetypeVersion=2.3 \
-DarchetypeRepository=http://scala-tools.org/repo-releases \
-DremoteRepositories=http://scala-tools.org/repo-releases \
-DgroupId=com.company \
-DartifactId=lift_test \
-Dversion=1.0
当我开始编写代码段和站点地图示例时。我看到 IDE 在以下行显示错误(以及代码下方令人讨厌的波浪线)
Menu.i("Info") / "info" submenus (
Menu.i("About") / "about" >> Hidden >> LocGroup("bottom"),
Menu.i("Contact") / "contact",
Menu.i("Feedback") / "feedback" >> LocGroup("bottom")
),
错误说,
Expression of type (Menu.Menuable , Menu.Menuable with Menu.withSlash,
Menu.Menuable) doesn't conform to expected type ConvertableToMenu
但是,当我运行 Maven > 时从 IDEA 安装
或编译'Boot.scala
它们似乎运行没有错误。
我很难让 Scala/Lift 在 IDEA 和 Eclipse 这两个 IDE 中完美运行。
请让我知道我错过了什么?
我添加了一个错误报告,您可以在这里看到它 http://youtrack.jetbrains .net/issue/SCL-3429?projectKey=SCL
I am new to Scala and IntelliJ IDEA. I am learning Lift from Simply Lift examples. I have setup my IDE as per instructions provided here. I am using Maven based approach.The Scala plugin is versioned (0.4.1084 -- latest as of June 30, 2011). IntelliJ IDEA version is 10.5.
The archetype is
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-blank_2.8.1 \
-DarchetypeVersion=2.3 \
-DarchetypeRepository=http://scala-tools.org/repo-releases \
-DremoteRepositories=http://scala-tools.org/repo-releases \
-DgroupId=com.company \
-DartifactId=lift_test \
-Dversion=1.0
When I started coding the Snippet and Sitemap example. I see IDE show error (and nasty wavy line below the code) at the following line
Menu.i("Info") / "info" submenus (
Menu.i("About") / "about" >> Hidden >> LocGroup("bottom"),
Menu.i("Contact") / "contact",
Menu.i("Feedback") / "feedback" >> LocGroup("bottom")
),
The error says,
Expression of type (Menu.Menuable , Menu.Menuable with Menu.withSlash,
Menu.Menuable) doesn't conform to expected type ConvertableToMenu
However, when I run a Maven > Install
or Compile 'Boot.scala
from IDEA they seem to run without error.
I am having hard time on getting Scala/Lift working perfectly on either of the two IDEs, IDEA and Eclipse.
Please let me know what am I missing?
I have added a bug report, you may see it here http://youtrack.jetbrains.net/issue/SCL-3429?projectKey=SCL
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该插件仍在开发中。好的红色代码和坏的绿色代码都是日常使用中出现的问题。如果您想帮助开发该插件,请提交一份错误报告,并附上一个简短的示例来说明您的问题。
http://youtrack.jetbrains.net/issues/SCL
The plugin is still under development. Good code red and bad code green are both issues that arise in every day usage. If you want to help with the development of the plugin, please file a bug report with a short example demonstrating your issue.
http://youtrack.jetbrains.net/issues/SCL