Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF and RAP
EMF and RAP [message #1159656] Mon, 28 October 2013 17:49 Go to next message
boby pietri is currently offline boby pietriFriend
Messages: 27
Registered: October 2013
Junior Member
Hello,

I have a very simple EMF model that I'd like to migrate on Web. To do so I'd like to use RAP (2.1) however I struggle to make it work with EMF.
I followed this tutorial (the only I found):
http://wiki.eclipse.org/RAP/EMF_Integration

I installed "EMF RAP Target Components" and "RAP SDK 2.1" in the "EclipseRT Target Platform Components" category as said in the tutorial.
Then I defined a target using these 2 components and configured the runtime. However when running the application no RAP classes are generated.

If someone has any idea on how to use RAP 2.1 with an EMF model or what is the problem it would help me a lot...

Thank you.


Re: EMF and RAP [message #1159867 is a reply to message #1159656] Mon, 28 October 2013 21:03 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 143
Registered: December 2011
Location: SWEDEN
Senior Member
Hi Boby,

First of all. I want to tell you that RAP does not generate anything for you. The code generated here in this tutorial is just an EMF Code Generation, which is generated for using your Ecore model in RAP.

If you want to share your EMF model on web. This is the right tutorial which should be used for that purpose.

In your message, it is clear that you have installed the "RAP target platform". But, I do not know if you have installed RAP tooling.

After installing the RAP tooling, you should run the your application as RAP application.

You should also set the entry point before running the rap application.

Re: EMF and RAP [message #1159945 is a reply to message #1159867] Mon, 28 October 2013 22:14 Go to previous messageGo to next message
boby pietri is currently offline boby pietriFriend
Messages: 27
Registered: October 2013
Junior Member
Thanks for your reply UmaShankar. Yes Rap Tooling is installed.

I downloaded all the RAP components from http://download.eclipse.org/rt/rap/tools/2.1

I am just trying to have the "library" example of the tutorial working on web and desktop as a first step.
I created a target "EMF + RAP" as described. It includes: "EMF RAP Target components 2.9.0..." and "RAP Runtime 2.1.1...".
There is no more "Rich Ajax Platform Runtime SDK" as stated in the tutorial as the name changed to Remote Access Platform.

Then I put "Rich Ajax Platform to true".

In the las step of the tutorial "Launch the application" I do not see "Library application" under "Rap Application" as in the screenshot when doing "Run Conifgurations". Furthermore "LibraryEditorAdvisorApplication" was not generated.

What am I doing wrong ?

Thank you.



Re: EMF and RAP [message #1159987 is a reply to message #1159945] Mon, 28 October 2013 22:53 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 143
Registered: December 2011
Location: SWEDEN
Senior Member
Boby,

Before trying to launch the application, you must generate the "Edit and Editor" code. It is mentioned in the tutorial like this "After that you can generate your edit and editor code".

Then the "LibraryEditorAdvisorApplication" is one among the generated classes. You should browse and point to this class in the runconfiguration to get the same configuration mentioned in the tutorial.

Set the server name as mentioned in the tutorial as "rap".

Do not hesitate to contact me, if you have some more problems.
Re: EMF and RAP [message #1160678 is a reply to message #1159987] Tue, 29 October 2013 09:31 Go to previous messageGo to next message
boby pietri is currently offline boby pietriFriend
Messages: 27
Registered: October 2013
Junior Member
Yes of course I generated all the classes from the "library.genmodel" file of the example.
I am using Eclipse Modeling Tools Kepler Service Release 1 (latest version on Eclipse website). May be it does not work with Kepler as the example was made with Helios.

The only difference with the tutorial is my target content which does not contains "Rich Ajax Platform (RAP) Runtime SDK 1.3" as it is not available in Kepler (http://download.eclipse.org/releases/kepler) but "RAP SDK 2.1.1"instead see file attached.

I must be missing something but I really can't find what it is...

Thanks again for your help.


  • Attachment: EMF RAP.jpg
    (Size: 310.05KB, Downloaded 48 times)
Re: EMF and RAP [message #1160761 is a reply to message #1160678] Tue, 29 October 2013 10:35 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 143
Registered: December 2011
Location: SWEDEN
Senior Member
Yes of course I generated all the classes from the "library.genmodel" file of the example.
I am using Eclipse Modeling Tools Kepler Service Release 1 (latest version on Eclipse website). May be it does not work with Kepler as the example was made with Helios.

*I do not think there is any problem with the eclipse versions

The only difference with the tutorial is my target content which does not contains "Rich Ajax Platform (RAP) Runtime SDK 1.3" as it is not available in Kepler (http://download.eclipse.org/releases/kepler) but "RAP SDK 2.1.1"instead see file attached.

*They both are same indeed. But their name and version differs.

I must be missing something but I really can't find what it is...

*I see in the screenshot that, everything is fine except the "LibraryEditor.java" class. Can't you find what the problem is with this class?


/Uma

[Updated on: Tue, 29 October 2013 10:37]

Report message to a moderator

Re: EMF and RAP [message #1161076 is a reply to message #1160761] Tue, 29 October 2013 15:06 Go to previous messageGo to next message
boby pietri is currently offline boby pietriFriend
Messages: 27
Registered: October 2013
Junior Member
Yes you are right the problem is that the org.eclipse.jface_3.9.1.jar is not included in the Plug-in Dependencies when I generate with the "RAP + EMF" target platform (1.jpg) while it is with the default target (2.jpg) and I can't add it manually it is not found when clicking the Add button in Dependencies.

Also when I try Run configurations I get screen in 3.jpg which is not the same as in the tutorial: "Library Application" under "Rap Application".

  • Attachment: 1.jpg
    (Size: 309.26KB, Downloaded 44 times)
  • Attachment: 2.jpg
    (Size: 291.63KB, Downloaded 32 times)
  • Attachment: 3.jpg
    (Size: 301.27KB, Downloaded 34 times)
Re: EMF and RAP [message #1161347 is a reply to message #1161076] Tue, 29 October 2013 18:56 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 143
Registered: December 2011
Location: SWEDEN
Senior Member
Boby,

You are almost there.

Replace the dependency on "org.eclipse.jface" with "org.eclipse.rap.jface".

And try installing "EMF SDK" in your eclipse(not as target platform).

Hope this will solve your problem.









/Uma
Re: EMF and RAP [message #1161529 is a reply to message #1161347] Tue, 29 October 2013 21:39 Go to previous messageGo to next message
boby pietri is currently offline boby pietriFriend
Messages: 27
Registered: October 2013
Junior Member
Thanks Uma,
the error was resolved when adding "org.eclipse.rap.jface" and generating the classes again.
Also "EMF - Eclipse Modeling Framework SDK" is already installed.

But then I can't complete step "Launch the application" of the tutorial as I don't have the "LibraryEditorAdvisorApplication" class generated. So I can't use it as entry point.
How can I run the application then ?

I'm getting mad as this is only Eclipse configuration and I can't manage to get it working...

I really appreciate your help Uma.

[Updated on: Tue, 29 October 2013 21:41]

Report message to a moderator

Re: EMF and RAP [message #1161857 is a reply to message #1161529] Wed, 30 October 2013 02:49 Go to previous messageGo to next message
boby pietri is currently offline boby pietriFriend
Messages: 27
Registered: October 2013
Junior Member
I have the "run configurations" as attached. When trying to run I get the errors in "error.txt".
Do you have any idea how to fix this (I don't have org.eclipse.equinox.console) ?

Thanks.
Re: EMF and RAP [message #1163846 is a reply to message #1161857] Thu, 31 October 2013 08:56 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 143
Registered: December 2011
Location: SWEDEN
Senior Member
Hi Boby,

Add this class in your editor plugin. Then try to run your RAP application using this class as EntryPoint.

If it does not work. Try importing the RAP examples project to your workspace. This is just to make sure, if RAP is correctly installed.


You should also add these plugins in your run configuration.

*org.apache.felix.gogo.command
*org.apache.felix.gogo.runtime
*org.apache.felix.gogo.shell
*org.eclipse.equinox.console


Good Luck,
Uma Shankar

[Updated on: Thu, 31 October 2013 08:59]

Report message to a moderator

Re: EMF and RAP [message #1164308 is a reply to message #1163846] Thu, 31 October 2013 15:36 Go to previous messageGo to next message
boby pietri is currently offline boby pietriFriend
Messages: 27
Registered: October 2013
Junior Member
Hi Uma,

Thanks for the class.
Yes my Rap configuration is correct. I can run any RAP examples (mail, hello world).
I made some progress as now I can run the library application in a browser. The problem is that I get a HTTP 404 error now (I tried refreshing and it's still the same).
I tried to embed your class in my library package using org.eclipse.rap.rwt but it does not work also it seems that IEntryPoint is deprecated.
I also tried to use a similar entrypoint as in the mail RAP application example (see below) but it does not work either Sad

public class Application implements IApplication {

public Object start(IApplicationContext context) throws Exception {
Display display = PlatformUI.createDisplay();
WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
return PlatformUI.createAndRunWorkbench(display, advisor);
}

public void stop() {
// Do nothing
}
}

Did you have the chance to run the library Example of the tutorial (Emfrapexample.zip) on your side already (using RAP2.1) ?
Re: EMF and RAP [message #1165376 is a reply to message #1164308] Fri, 01 November 2013 08:28 Go to previous message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 143
Registered: December 2011
Location: SWEDEN
Senior Member
Boby,

I just used your Library example. I generated Edit and Editor code. Just selected the "entrypoint" which is also automatically generated for me in the editor plugin "LibraryEditorAdvisorAppplication". (You do not have to use the class which I sent you, I was wrong).

It works fine.

So, nothing is wrong with the Library example.

Use the generated "LibraryEditorAdvisorAppplication" class as your entrypoint. Specify your entrypoint, in the same way it is specified in the MailDemo example(though your editor plugin). Then everything should work fine.

If you still have problems, just select all the target platform plugins in the "Bundles tab".
Then run you RAP application.

Are there any exceptions?

/Uma

[Updated on: Fri, 01 November 2013 10:19]

Report message to a moderator

Previous Topic:[CDO]CDO support version control?
Next Topic:Use of OCL with CDO
Goto Forum:
  


Current Time: Fri Nov 28 17:24:04 GMT 2014

Powered by FUDForum. Page generated in 0.16334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software