Jump to: navigation, search

Difference between revisions of "RAP/EMF Integration"

< RAP
m (Runtime)
Line 1: Line 1:
 
| [[RAP|RAP wiki home]] | [http://eclipse.org/rap RAP project home] |
 
| [[RAP|RAP wiki home]] | [http://eclipse.org/rap RAP project home] |
 
[[Image:Emf rap.png|right]]
 
[[Image:Emf rap.png|right]]
 
== THIS IS EXPERIMENTAL! IT IS NOT OFFICIALLY SUPPORTED NEITHER BY RAP NOR BY EMF ==
 
  
 
== Runtime ==
 
== Runtime ==
Line 10: Line 8:
 
* org.eclipse.emf.common
 
* org.eclipse.emf.common
 
* org.eclipse.emf.ecore
 
* org.eclipse.emf.ecore
 
== Resources ==
 
EMF relies in the UI parts on the Resource infrastructure to support seamless integration with the Eclipse workspace. This is a big problem as the resource framework is multi-user enabled and thus can lead to problem in the RAP environment. Even if there may be workarounds available (eg. session-scoped EFS implementation), there is still only one workspace available. This can lead to big problems like a user who locks the workspace automatically locks all other users in the webapp.
 
  
 
== UI and Edit Framework ==
 
== UI and Edit Framework ==
Generated edtitors of EMF (and in particular their dependencies) have to be modified to run on RAP. The two interesting bundles from EMF are:
+
EMF provides branches of it's UI bundles for the usage in the RAP environment. These are available on the EMF update site to use together with the RAP runtime.
* org.eclipse.emf.common.ui
+
 
* org.eclipse.emf.editor.ui
+
== Target provisioning ==
 +
 
 +
The minimal target of an EMF and RAP runtime consists of two p2 repositories, one for RAP and one for the EMF RAP support.
  
With the support for cell editors in the properties view and D&D, many problems from the past have vanished. But there are still many references to IDE- and Resource-specific features that will not be available in RAP. This should be a topic to discuss further how to resolve this. That resources will be session-scoped is out of the context of the 3.x stream of the platform. This *may* come with e4 but at the moment, there are committers working on this. Another option would be to split the EMF-bundles in EMF-Core and Resource-Integration bundles. As the dependencies to resource is rather broad, this could lead to many API breaks which is not very good either.
+
[[Image:Rapemftarget.png]]
Single-sourcing the EMF-Bundles as they are with the dependency to the Resources framework would lead to a situtation where users could use them but have to be aware of the fact they should never use any API that may, even accidentally, call into the resources infrastructure.
+
  
== IDE Bundle ==
+
Please be sure to '''uncheck''' the "Include required software" option when adding the features from the repositories.
As the EMF UI bundles have a dependency on the IDE bundle of Eclipse (<code>org.eclipse.ui.ide</code>), we need to support this somehow. This is rather problematic as IDE itself relies heavily on the Resource infrastructure.
+
As simple mock is attached to the bug report stated in the references section. This is not intended to be used outside of the research/evaluation process.
+
  
== Demo ==
+
== Targeting RAP as runtime ==
The demo consists of a patch for the EMF-UI plugins, a mock of the IDE bundle and the EMF library example. As host we use a simple RAP application (<code>org.eclipse.rap.demo</code>). The whole source can be found in the zip attached to the corresponding bug report.
+
  
 
== References ==
 
== References ==
 
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=213988 Bug 213988: Investigate support for RAP]
 
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=213988 Bug 213988: Investigate support for RAP]
* [http://ed-merks.blogspot.com/2008/01/emf-and-rap-go-great-together-too.html Blog post: EMF and RAP go great together too]
 
* [http://wiki.eclipse.org/EMF_Editor_goes_RAP Wiki page: EMF Editor goes RAP]
 

Revision as of 17:33, 16 March 2010

| RAP wiki home | RAP project home |

Emf rap.png

Runtime

The non-UI part of EMF works with RAP out of the box. The example mentioned in the end of this page only uses the following two core plug-ins of EMF. These have an optional dependency to the resource bundles but don't need them to work properly. The bundles used for the model in this example are

  • org.eclipse.emf.common
  • org.eclipse.emf.ecore

UI and Edit Framework

EMF provides branches of it's UI bundles for the usage in the RAP environment. These are available on the EMF update site to use together with the RAP runtime.

Target provisioning

The minimal target of an EMF and RAP runtime consists of two p2 repositories, one for RAP and one for the EMF RAP support.

Rapemftarget.png

Please be sure to uncheck the "Include required software" option when adding the features from the repositories.

Targeting RAP as runtime

References