开发者

Problems building Eclipse RCP application

开发者 https://www.devze.com 2023-04-06 14:37 出处:网络
I\'m trying to build a Eclipse RCP application with Maven/Tycho based on features. My application is a simple language with an editor (built within help of Xtext) and a few other plugins which are dep

I'm trying to build a Eclipse RCP application with Maven/Tycho based on features. My application is a simple language with an editor (built within help of Xtext) and a few other plugins which are dependencies to the project. There are a few howtos which describe how to create a Eclipse RCP application, e.g.

http://mattiasholmqvist.se/2010/开发者_如何学编程03/building-with-tycho-part-2-rcp-applications/

or

https://kthoms.wordpress.com/2010/11/12/setting-up-a-rcp-product-for-a-dsl/

So far, what have I done:

  1. Created a plug-in project which contains a feature.xml. The feature.xml consists of the language plug-ins and its dependencies

  2. Created a plug-in project which contains a product definition. The product definition is named after the plug-in projects name (Mattias Homlqvist (first link in this post) emphasizes that Tycho makes assumptions about the product file name (in relation to the plug-in project name)). In the product definition I've created a new product and point to the 'org.eclipse.ui.ide.workbench' application. I've also added my feature plug-in and org.eclipse.pde and org.eclipse.rcp features to the dependencies tab in the editor.

If I'm trying to run the product I get an exception:

java.lang.RuntimeException: No application id has been found.
    at org.eclipse.equinox.internal.app.EclipseAppContainer.
      startDefaultApp(EclipseAppContainer.java:242)
    at org.eclipse.equinox.internal.app.MainApplicationLauncher.
      run(MainApplicationLauncher.java:29)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.
      runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.
      start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.
      run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.
      run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.
      invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.
      invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Okay, something went terribly wrong. Now, I'm checking if all required plugins are added in the run configuration dialogue in the "Plug-ins" tab. So, the product and feature plugin are not selected. If I press 'add required plug-ins' the product plug-in is added, pressing 'validate plug-ins' just pop up and says 'no problems detected'. If I try again to run the product I get the same exception. Pressing 'synchronize' in the product definition editor reverts my changes I've made (product and feature are de-selected) - and I'm wondering why?

The Maven/Tycho build itself seem to work. If I'm trying to build the project with

mvn install 

zip files for the corresponding platforms are created. Unfortunately the problem still exists and the build is not executable. So, probably I've made a terrible mistake in my feature and/or product plug-in project. Maybe somebody has an idea or could point me into the right direction?

Thanks in advance!


I had a similar problem and for me it worked to check "Add new workspace plug-ins to this launch configuration automatically" in the run configuration, the "Plug-ins" tab.

You might also check the Auto-Start (for me, "default" worked).

Best regards.


your product should be 'feature based' and in your feature, you should add the same plugins you added on your plugin.xml
plus, in the 'included feature' tab, you should add org.eclipse.rcp feature

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号