Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » How to load an EMFText model in a standalone Java application
How to load an EMFText model in a standalone Java application [message #1070750] Thu, 18 July 2013 15:33 Go to next message
d 627 is currently offline d 627
Messages: 28
Registered: March 2013
Junior Member
Hi there

I like to load my EMFText model in a standalone java application. I have been looking for a possible answer but nothing yet. I found this piece of code but for Xtext

new org.eclipse.emf.mwe.utils.StandaloneSetup().setPlatformUri("../");
Injector injector = new MyDslStandaloneSetup().createInjectorAndDoEMFRegistration();
XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
resourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
Resource resource = resourceSet.getResource(
   URI.createURI("platform:/resource/org.xtext.example.mydsl/src/example.mydsl"), true);
Model model = (Model) resource.getContents().get(0);


I need to do exactly the same but using EMFText instead of Xtext. Is it possible?

I would really appreciate any help or answer.

Best regards.
Re: How to load an EMFText model in a standalone Java application [message #1073313 is a reply to message #1070750] Wed, 24 July 2013 14:00 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1625
Registered: July 2009
Senior Member
Hi,

I do not know about EMFText, you might want to ask on their own forum or support mailing list if they have one. Most EMF resources follow the same schema for standalone use : you need to register the corresponding EPackage and ResourceFactory. They proabably don't have a custom EPackage, but you will need to find the proper resource factory for your emftext resources.

Laurent Goubet
Obeo
Re: How to load an EMFText model in a standalone Java application [message #1082490 is a reply to message #1070750] Thu, 08 August 2013 16:44 Go to previous message
Jaime Chavarriaga is currently offline Jaime Chavarriaga
Messages: 3
Registered: June 2013
Junior Member
This is not related to EMF Compare. However, you can check the FAQ in the EMFText website. There is an answer to your question.
www.emftext.org/index.php/EMFText_FAQ
Previous Topic:On EMF Compare 2.X scalability
Next Topic:Customizing EMF compare 2.0 diff engine
Goto Forum:
  


Current Time: Wed Sep 17 05:54:16 GMT 2014

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

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