Difference between revisions of "RAP/EMF Integration"

From Eclipsepedia

< RAP
Jump to: navigation, search
m (UI and Edit Framework)
m (Assemble the Runtime Target)
 
(27 intermediate revisions by 5 users not shown)
Line 1: Line 1:
| [[RAP|RAP wiki home]] | [http://eclipse.org/rap RAP project home] |
 
 
[[Image:Emf rap.png|right]]
 
[[Image:Emf rap.png|right]]
  
 
== EMF Runtime ==
 
== EMF 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 non-UI part of EMF works with RAP out of the box. With the aid of the following bundles, EMF models can be created and accessed.
The bundles used for the model in this example are
+
* <code>org.eclipse.emf.common</code>
* org.eclipse.emf.common
+
* <code>org.eclipse.emf.ecore</code>
* org.eclipse.emf.ecore
+
Even though these bundles express an optional dependency on <code>org.eclipse.core.resources</code>, this dependency isn't required at runtime. As of the Indigo release, these base features (along with a couple of others) are built independently of the rest of the core and are included in a "EMF Base Framework" feature.
  
== UI and Edit Framework ==
+
== EMF UI and Edit Framework ==
Since 2.6 M6, EMF provides branches of it's UI/Edit framework for use with RAP. The necessary bundles are available from the EMF software repository and can be used together with the RAP runtime (> 1.3 M6).
+
Since 2.6 M6, EMF provides branches of it's UI/Edit framework for use with RAP (details are documented in [https://bugs.eclipse.org/bugs/show_bug.cgi?id=213988 bug 213988]). The necessary bundles are available from the EMF software repository and can be used together with the RAP runtime (> 1.3 M6).
  
== Target provisioning ==
+
The following sections ouline the basic steps to run EMF on RAP. The Ecore and Genmodel of the Library Example used throughout this page can be [http://wiki.eclipse.org/images/0/0b/Emfrapexample.zip downloaded here]
  
The minimal target of an EMF and RAP runtime consists of two p2 repositories, one for RAP and one for the EMF RAP support.
+
=== Prepare the IDE ===
 +
 
 +
In order to develop applications for EMF and RAP, you will need to install two features into your IDE:
 +
* The tools to work with EMF models, which are available from [http://www.eclipse.org/modeling/emf/updates here] (chose versions >= 2.6 M6)
 +
* The tooling for RAP, that can be obtained from [http://eclipse.org/rap/downloads/index.php here] (chose versions >= 1.3 M6)
 +
 
 +
=== Assemble the Runtime Target ===
 +
 
 +
The minimal runtime consists of EMF for RAP and the RAP runtime itself. To set up the target platform, the most conventient way is assemble it directly from the Helios software repository:
 +
* Helios Repository: <code><nowiki>http://download.eclipse.org/releases/helios</nowiki></code>
 +
The following features are interesting for you:
 +
* Remote Application Platform (RAP) Target Components
 +
* EMF RAP Target Components
 +
Both of them are contained in the EclipseRT category. Note also that, as of the Indigo release, the "EMF Base Framework" feature must also be installed from the Modeling category.
 +
{{warning|EMF for RAP and the RAP runtime must not be installed into the IDE, it will break the IDE.}}
  
 
[[Image:Rapemftarget.png]]
 
[[Image:Rapemftarget.png]]
  
Please be sure to '''uncheck''' the "Include required software" option when adding the features from the repositories.
+
Please make sure to '''uncheck''' the "Include required software" option when adding the features from the repositories.
  
== Targeting RAP as runtime ==
+
=== Configuring EMF and RAP as Runtime ===
  
Open up the Properties view on your .genmodel file and set "Rich Ajax Application" to true.
+
Open up the Properties view on your .genmodel file and set the "Rich Ajax Application" from the "Editor" category to true.
  
 
[[Image:Rapemfproperties.png]]
 
[[Image:Rapemfproperties.png]]
Line 28: Line 41:
 
After that you can generate your edit and editor code.
 
After that you can generate your edit and editor code.
  
== Launch the application ==
+
=== Launch the application ===
  
You can now launch the application via it's generated IApplication. Just use the ''LibraryEditorAdvisorApplication'' entrypoint.
+
You can now launch the application via it's generated <code>org.eclipse.core.runtime.applications</code> extension. Just use the ''LibraryEditorAdvisorApplication'' entry point.
  
 
[[Image:Rapemflaunch.png]]
 
[[Image:Rapemflaunch.png]]
  
== References ==
+
[[Category:RAP]]
* [http://wiki.eclipse.org/images/0/0b/Emfrapexample.zip Library Example Ecore and Genmodel]
+
[[Category:Modeling]]
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=213988 Bug 213988: Investigate support for RAP]
+
[[Category:EMF]]

Latest revision as of 12:18, 5 April 2013

Emf rap.png

Contents

[edit] EMF Runtime

The non-UI part of EMF works with RAP out of the box. With the aid of the following bundles, EMF models can be created and accessed.

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

Even though these bundles express an optional dependency on org.eclipse.core.resources, this dependency isn't required at runtime. As of the Indigo release, these base features (along with a couple of others) are built independently of the rest of the core and are included in a "EMF Base Framework" feature.

[edit] EMF UI and Edit Framework

Since 2.6 M6, EMF provides branches of it's UI/Edit framework for use with RAP (details are documented in bug 213988). The necessary bundles are available from the EMF software repository and can be used together with the RAP runtime (> 1.3 M6).

The following sections ouline the basic steps to run EMF on RAP. The Ecore and Genmodel of the Library Example used throughout this page can be downloaded here

[edit] Prepare the IDE

In order to develop applications for EMF and RAP, you will need to install two features into your IDE:

  • The tools to work with EMF models, which are available from here (chose versions >= 2.6 M6)
  • The tooling for RAP, that can be obtained from here (chose versions >= 1.3 M6)

[edit] Assemble the Runtime Target

The minimal runtime consists of EMF for RAP and the RAP runtime itself. To set up the target platform, the most conventient way is assemble it directly from the Helios software repository:

  • Helios Repository: http://download.eclipse.org/releases/helios

The following features are interesting for you:

  • Remote Application Platform (RAP) Target Components
  • EMF RAP Target Components

Both of them are contained in the EclipseRT category. Note also that, as of the Indigo release, the "EMF Base Framework" feature must also be installed from the Modeling category.

Warning2.png
EMF for RAP and the RAP runtime must not be installed into the IDE, it will break the IDE.


Rapemftarget.png

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

[edit] Configuring EMF and RAP as Runtime

Open up the Properties view on your .genmodel file and set the "Rich Ajax Application" from the "Editor" category to true.

Rapemfproperties.png

After that you can generate your edit and editor code.

[edit] Launch the application

You can now launch the application via it's generated org.eclipse.core.runtime.applications extension. Just use the LibraryEditorAdvisorApplication entry point.

Rapemflaunch.png