Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [XCore] How to load .xcore programmatically(How do you load .xcore programmatically and then browse its Ecore and GenModel models)
[XCore] How to load .xcore programmatically [message #1793374] Mon, 06 August 2018 19:30 Go to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 83
Registered: May 2010
Member
Hi,

I would like to parse .xcore files that reside in the workspace in order to get GenModel and ECore properties. I wonder how to load .xcore file. Is there a kind of special XCoreResourceFactory and XCoreResource to be used? I am digging the org.eclipse.emf.ecore.xcore source code. Some guidance would be appreciated.

Thanks
;-)
Re: [XCore] How to load .xcore programmatically [message #1793378 is a reply to message #1793374] Tue, 07 August 2018 04:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29653
Registered: July 2009
Senior Member
Note that the Sample Ecore Editor can load a *.xcore resource, e.g., when you create a dynamic instanceof some EClass from that Xcore resource. So there's not so much special involved. Note that the Sample Ecore Editor does this
    resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(true));
and that will be important that other *.genmodels/*.xcore models can be found. Perhaps the details in https://bugs.eclipse.org/bugs/show_bug.cgi?id=536644 are helpful.
Re: [XCore] How to load .xcore programmatically [message #1793519 is a reply to message #1793378] Thu, 09 August 2018 12:57 Go to previous message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 83
Registered: May 2010
Member
Thanks Ed. It works.
Previous Topic:Modeling Symposium @ EclipseCon Europe 2018
Next Topic:EMF simple example
Goto Forum:
  


Current Time: Thu Nov 15 05:50:11 GMT 2018

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

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

Back to the top