Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » JSON Resources from EMF ?(Trying to persist EMF model to JSON from EMF generated RCP application ?)
JSON Resources from EMF ? [message #1064371] Tue, 18 June 2013 23:40 Go to next message
Edward MacKerrow is currently offline Edward MacKerrowFriend
Messages: 7
Registered: July 2010
Location: Santa Fe, New Mexico
Junior Member
I am struggling a bit with trying to persist an EMF model, running as a RCP app (e.g. not IDE or GWT), to JSON. I am using Eclipse Juno 4.2.

I have installed the emfjson plugins from github and they appear to work ok for creating new JSON Resources from my EMF model.

Being a RCP newbie I am confused though how to associate the JSON persistance with the Save and Save As menu actions that were generated from EMF? It seems like I should be creating a new Command and Handler that extend the Save/Save As/Open commands that are generated from a EMF --> RCP generated app?

I found a ActionFactory.SAVE in the API docs. However I do not see an option to create an extension decoratively that extends org.eclipse.ui.file.save.

I assume that I need to create handlers to deal with JSON persistence? Or does the Resource framework create these handlers and associated commands / menu items for the custom Resources registered with the Resource framework?

Any guidance is appreciated. Apologies if this is more of a RCP Newsgroup question than EMF?

Thanks
Ed

[Updated on: Tue, 18 June 2013 23:50]

Report message to a moderator

Re: JSON Resources from EMF ? [message #1064382 is a reply to message #1064371] Wed, 19 June 2013 04:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Ed,

I'd expect such a project would provide something that extends
ResourceImpl and you'd register a resource factory to create such a
resource for your file extension.


On 19/06/2013 1:40 AM, Edward MacKerrow wrote:
> I am struggling a bit with trying to persist an EMF model, running as
> a RCP app (e.g. not IDE or GWT), to JSON. I am using Eclipse Juno 4.2.
>
> I have installed the emfjson plugins from github and they appear to
> work ok for creating new JSON Resources from my EMF model.
>
> Being a RCP newbie I am confused though how to associate the JSON
> persistance with the Save and Save As menu actions that were generated
> from EMF? It seems like I should be creating a new Command and
> Handler that extend the Save/Save As/Open commands that are generated
> from a EMF --> RCP generated app?
>
> I found a ActionFactory.SAVE in the API docs. However I do not see an
> option to create an extension decoratively that extends
> org.eclipse.ui.file.save.
>
> I assume that I need to create handlers to deal with JSON
> persistence? Or does the Resource framework create these handlers and
> associated commands / menu items for the custom Resources registered
> with the Resource framework?
>
> Any guidance is appreciated. Apologies if this is more of a RCP
> Newsgroup question than EMF?
>
> Thanks
> Ed


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Teneo] On delete child, parent id is set to null before actual delete statement
Next Topic:[Teneo] idBag ID generator
Goto Forum:
  


Current Time: Thu Mar 28 14:25:11 GMT 2024

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

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

Back to the top