JSON Resources from EMF ? [message #1064371] |
Tue, 18 June 2013 23:40 |
Edward MacKerrow 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 |
Ed Merks 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/
|
|
|
Powered by
FUDForum. Page generated in 0.02301 seconds