xmi:id get lost when saving Resource [message #949729] |
Fri, 19 October 2012 04:24  |
Eclipse User |
|
|
|
Hello everyone,
I am using the EMF project Henshin.
Currently I am using Henshin to do a model transformation on a UML model.
The transformed model is contained in an EGraph and saved like this:
options.put(XMIResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
Resource resource2 = resourceSet.createResource(URI.createFileURI("seclinks_corrected.uml"));
resource2.getContents().addAll(graph.getRoots());
try {
resource2.save(options);}
What I miss in the saved model are all xmi:id-attributes.
I already had a look at further options in XMIResource but didn't find an matching option.
Any ideas?
Thanks in advance,
Jens
|
|
|
|
|
Re: xmi:id get lost when saving Resource [message #953485 is a reply to message #953471] |
Mon, 22 October 2012 05:27  |
Eclipse User |
|
|
|
Jens,
Comments below.
On 22/10/2012 11:15 AM, Jens Bürger wrote:
> Am 19.10.2012 17:16, schrieb Ed Merks:
>> Is this running stand alone in an Eclipse application?
>
> I'm not 100% sure what you mean by this. The code is part of an
> Eclipse plug-in project. It has a main-method and run via the
> "Run As -> Java Application"-command.
So you're running it stand alone. No plugin.xml registrations will kick in.
>
>> What resource
>> implementation is resource2?
>
> It's an implementation of
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
No, a resource is not a resource set.
>> I.e., is it's UML2's specialized resource
>> implementation?
>
> Apparently not :)
So you need to be sure to register the necessary UML2 things. They have
some UMLUtil thingy that you can use to initialize a resource set. Ask
questions about UML2 on eclipse.modeling.mdt.uml2.
>
> Thanks,
>
> Jens
|
|
|
Powered by
FUDForum. Page generated in 0.07101 seconds