How to write eclipse rcp applications with scala?

后端 未结 7 1866
隐瞒了意图╮
隐瞒了意图╮ 2021-02-01 07:32

The Scala Eclipse plugin page says: * Support for Eclipse plugin and OSGi development including hyperlinking to Scala source from plugin.xml and manifest files.

How does

相关标签:
7条回答
  • 2021-02-01 08:15

    The Scala Nature invokes the JDT compiler and makes the Java classes available tot he Scala compiler. I was having an issue where I have both the Scala Nature and Java Nature enabled. Make sure you don't have the Java Nature enabled.

    0 讨论(0)
  • 2021-02-01 08:17

    This tutorial should be of help:

    http://www.coconut-palm-software.com/the_new_visual_editor/doku.php?id=blog:using_scala_to_create_eclipse_rcp_applications

    I tried it out and it worked for me.

    0 讨论(0)
  • 2021-02-01 08:21

    Did anyone get it to work as an actual exported product? I was happily developing my scala plugin and it was running great inside Eclipse, but when I tried to export the product, the build process failed saying it couldn't resolve my scala object to a type. I found this bug report:

    http://lampsvn.epfl.ch/trac/scala/ticket/1919

    0 讨论(0)
  • 2021-02-01 08:28

    After adding Scala Nature to the plug-in project, don't forget to include scala.library among the dependencies of your plugin (and update the corresponding run and product configuration)! (Additionally, if another JRE system library appears in the build path when adding Scala Nature, you can safely remove it to avoid the RequiredExecutionEnvironment warning.)

    0 讨论(0)
  • 2021-02-01 08:33

    This is an old question; but an update may be helpful to someone.

    I can say that I have successfully created a Scala RCP application using the scala 2.8.0 beta release. The improvements are notable. I followed the steps described here. It was easier than I initially thought.

    For good measure I then translated the Java code to Scala ... one file at a time.

    0 讨论(0)
  • 2021-02-01 08:37

    Yes, it is possible. In fact, the Scala Eclipse plugin itself is written in Scala.

    I've never created a Scala RCP app myself, but I'm guessing that what you need to do is create the project normally using your wizard of choice. Once the project is in your workspace, right-click and select "Add Scala Nature" (or something to that effect). The result will be a Scala project with all of the regular trappings of an RCP app. You should be able to use both Java and Scala within the project after these setup steps.

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