|
|
|
Re: Using Sample Reflective Ecore Model Editor on our XMI files [message #426186 is a reply to message #426173] |
Thu, 18 December 2008 14:25 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Andrew,
I'm glad you like it. It's evolved over the last 6 years specifically
to address real world needs in a bottom up fashion. I'm always happy to
help people get past any roadblocks...
Andrew H wrote:
> Thanks Ed
>
> Adding the following to our root package did the trick. @Override
> protected Resource createResource(String uri)
> {
> return
> super.createResource("platform:/resource/<path>/ourmodel.ecore ");
> }
>
> Thanks for all your help throughout the year. So far our EMF work has
> been very positive. Its enabling us to take a step change improvement
> in how we do things. Its a very impressive framework.
>
> cheers
>
> Andrew
>
> Ed Merks wrote:
>
>> Andrew,
>
>> Comments below.
>
>> Andrew H wrote:
>>> When we save our models as XMI and then load them in the Sample
>>> Reflective Ecore Model Editor it fails to find the ecore models.
>>>
>>> We've set some options to get it to save the schema location but it
>>> only populates it with the namespace uri not the file uri.
>> The schema location will be saved only if the ePackage.getNsURI() is
>> not the same as ePackage.eResource().getURI().
>>>
>>> What is the trick to get this to work without having to edit each file?
>>>
>>> Note we are not a plug in.
>>>
>>> Interestingly, the meta model explorer finds all our models so if
>>> only it could tell the editor about them we'd be set.
>> I'm not quite sure if you have a generated model or not. If you do,
>> you can specialize the XyzPackageImpl like this to ignore the uri,
>> which by default will be the nsURI and instead use some other
>> physical location.
>
>> @Override
>> protected Resource createResource(String uri)
>> {
>> return super.createResource("<location>");
>> }
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03649 seconds