|
|
|
Re: Using instances inside model from another model [message #646046 is a reply to message #645989] |
Tue, 21 December 2010 17:22 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Stefan,
Comments below.
Stefan Mijatov wrote:
> When I open model in e-core editor, in properties tab for the
> referenced attribute of some element, type which is say EDataType, is
> not loaded properly.
> That is the name is missing, and instead of being 'EDataType String'
> the editor shows only 'EDataType'.
Yes, that sounds like an unresolved proxy.
> I am keeping primitive types in separate model as i described in
> previous post.
> Maybe it has something to do with the proxy resolving as you say, but
> I don't know what I have to do in order for this to work...
When there's a proxy, any normal attempt to access it will try to
resolve it.
> How do I "make" editor to resolve proxies?
It will do that on its own.
> And not only editor, I have this problem also when I am running some
> qvt transformation for this type of situation!? (and also xpand :? )
As I mentioned already, any attempt to resolve a proxy (and it's hard to
prevent such attempts) will cause a resource to be loaded. So if you
have broken proxies you should see a resource in the resource set with
the URI of that broken proxy. Isn't that the case?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Using instances inside model from another model [message #646148 is a reply to message #646046] |
Wed, 22 December 2010 11:16 |
Stefan Mijatov Messages: 59 Registered: March 2010 Location: Vienna, Austria |
Member |
|
|
When I validate model it shows a bunch of errors that look like this:
The feature 'eType' of 'Business Method findLekar' contains an unresolved proxy 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl/http:/www.example.com/ejb3#EntityBean@168ad51{platform:/resource/generatorOutput/model/OrganizacijaEntities.xmi#//@eClassifiers.2}'
In the list of loaded resources when I open the model with the editor, there is no link to model that holds instances that are causing the problem!!
This model that has the problem is generated through qvt not by hand...
[Updated on: Wed, 22 December 2010 14:15] Report message to a moderator
|
|
|
|
Re: Using instances inside model from another model [message #646255 is a reply to message #646225] |
Wed, 22 December 2010 22:06 |
Stefan Mijatov Messages: 59 Registered: March 2010 Location: Vienna, Austria |
Member |
|
|
I have created 4 projects into which I divided my whole generator. In one project I keep meta models and instances of primitive types for each of them, in second project I keep QVT transformations, in third one I have Xpand templates and work-flow files, and in the forth project I have the output of QVT transformations which are models that are input for Xpand transformations (which is named "generatorOutput").
[Updated on: Wed, 22 December 2010 22:07] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Using instances inside model from another model [message #646400 is a reply to message #646388] |
Thu, 23 December 2010 17:51 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Stefan,
Oh sorry, the names are very similar...
So in the picture you're showing, you've invoked Validate and gotten the
diagnostic about an unresolved proxy that you described? Can you show
me the lines of the XML with the serialized reference that's not
resolving. Is the corresponding EReference in which this reference
appears one that is a non-containment reference with resolveProxies set
to true? Can you open the resource being referenced directly in an
editor without any problems?
Stefan Mijatov wrote:
> As much as I can understand, the resource that is needed is
> OrganizacijaEntities.xmi, and it is not being loaded into resource set
> at all. Furthermore, there is 7 eClassifiers in
> OrganizacijaEntities.xmi and the reference to them is by position in
> xmi starting from zero (0, 1, 2...6). My conclusion is that some how
> editor is having trouble to resolve this references, and I don't know
> what is the reason.
>
> Anyway, thank you for the effort in trying to help me.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Using instances inside model from another model [message #646447 is a reply to message #646400] |
Fri, 24 December 2010 10:43 |
Stefan Mijatov Messages: 59 Registered: March 2010 Location: Vienna, Austria |
Member |
|
|
1. So in the picture you're showing, you've invoked Validate and gotten the diagnostic about an unresolved proxy that you described?
Yes. 40+ errors about proxies not being resolved.
2. Can you show me the lines of the XML with the serialized reference that's not resolving. Is the corresponding EReference in which this reference appears one that is a on-containment reference with resolveProxies set to true?
Here is the XMI with the references not being resolved: (all this references are containment) (I GAVE HERE ONLY THE PIECE OF XMI BECAUSE OF THE SPACE)
<?xml version="1.0" encoding="UTF-8"?>
<java:JavaPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ejb3="http://example/ejb3" xmlns:java="http://example/java" xmlns:ocore="http://example/ocore" xsi:schemaLocation="http://example/ejb3 ../../generatorMetamodels/model/ejb3.ecore http://example/java ../../generatorMetamodels/model/java.ecore http://example/ocore ../../generatorMetamodels/model/ocore.ecore" name="ModelOrganizacijeManagers">
<eClassifiers xsi:type="ejb3:StatelessSessionBean" name="MestoManager" implementsInterfaces="//@eClassifiers.1">
<fields name="mesto">
<eType xsi:type="ejb3:EntityBean" href="OrganizacijaEntities.xmi#//@eClassifiers.3"/>
</fields>
<methods xsi:type="ejb3:BusinessMethod" name="saveMesto">
<eParameters xsi:type="java:JavaParameter" name="mesto">
<eType xsi:type="ejb3:EntityBean" href="OrganizacijaEntities.xmi#//@eClassifiers.3"/>
</eParameters>
</methods>
<methods xsi:type="ejb3:BusinessMethod" name="deleteMesto">
<eParameters xsi:type="java:JavaParameter" name="mesto">
<eType xsi:type="ejb3:EntityBean" href="OrganizacijaEntities.xmi#//@eClassifiers.3"/>
</eParameters>
</methods>
<methods xsi:type="ejb3:BusinessMethod" name="findMesto">
<eType xsi:type="ejb3:EntityBean" href="OrganizacijaEntities.xmi#//@eClassifiers.3"/>
<eParameters xsi:type="java:JavaParameter" name="naziv">
<eType xsi:type="ocore:ODataType" href="../../generatorMetamodels/instances/OCOREPrimitives.xmi#//@eClassifiers.1"/>
</eParameters>
</methods>
</eClassifiers>
</java:JavaPackage>
4. Can you open the resource being referenced directly in an editor without any problems?
Yes. When I open OrganizacijaEntities.xmi (which is being referenced) with sample reflective ecore editor it works just fine.
[Updated on: Fri, 24 December 2010 10:45] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06251 seconds