Eclipse RCP and Eclipse Plugin projects are based on OSGi. At the core of an Eclipse application there is an OSGi runtime called Equinox. Osmorc's Equinox framework integrator provides support for working on applications using Equinox. At the time of this writing it is not possible to run and debug OSGi applications with Osmorc, but that is a planned feature for the near future. Currently Osmorc also doesn't contain any support for Eclipse specific features like extensions.
Currently it is possible to import an Eclipse workspace into IntelliJ IDEA and use Osmorc to resolve dependencies between the different OSGi bundles of that workspace. The outcome is that the created IntelliJ IDEA project can be compiled in IntelliJ IDEA without any errors with the possibility to edit the classes, manifest files, and other artifacts of the bundles.
From this topic you will learn how to import an Eclipse workspace into IntelliJ IDEA.
Please, use the guide describing how to migrate Eclipse RCP applications to IntelliJ IDEA. This is a workaround that enables the developer of an Eclipse RCP application to work on that application with a pure IntelliJ IDEA without Osmorc. Projects changed as described in that guide won't be compatible with Osmorc. Osmorc adds OSGi support to IntelliJ IDEA making a great part of the workaround obsolete.
- Start importing an Eclipse workspace into IntelliJ IDEA as described in Importing Eclipse Projects into IntelliJ IDEA.
- Clear the Link created IntelliJ IDEA modules to Eclipse project files check box. Osmorc changes the dependencies between the modules created from the Eclipse projects in order to make them match the bundle dependencies expressed in the manifest files. Linking IntelliJ IDEA modules with Eclipse project files would result in unnecessary dependencies being introduced into the project files.
- Remove the dependency to the global library ECLIPSE on any of the created modules, if one was added.
Osmorc only works on modules with its facet. Therefore after creating a project and modules for an Eclipse project, IntelliJ IDEA should detect the modules as being candidates for an Osmorc facet and display a message for each detection.
- Confirm adding Osmorc facet to each module.
- To make sure that each module has an Osmorc facet, open the project structure, select the Modules node, and check that each module in the tree to the right has an Osmorc sub-node.
- If you inadvertently deny the addition of the Osmorc facet, remove it or if it just does appear as a sub-node of the module node, add the Osmorc facet manually.
Now you have imported your Eclipse workspace into IntelliJ IDEA and you can start working on it in IntelliJ IDEA. One thing you haven't done yet, is transfer your target platform into IntelliJ IDEA. In Osmorc, the target platform is called a framework instance and you can define it in Osmorc's settings. Please read the Settings section to learn how to define different framework instances and how to choose one for a project.