Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Incorrect diagram model file generated for dynamic objects
Incorrect diagram model file generated for dynamic objects [message #197173] Tue, 15 July 2008 19:37 Go to next message
Gaurav Mehta is currently offline Gaurav MehtaFriend
Messages: 5
Registered: July 2009
Junior Member
I have a scenario where I am using Dynamic EMF to load external Ecore
along with the static ecore so that at run time I have access to objects
from both
the ecores. I have defined a GMF Object (AnyObject) in Static ecore which
I used to represent all the objects from external ecore on canvas
graphically. Now this AnyObject have self reference to it so that we can
have multiple levels of connection like
BaseObject->AnyObject->AnyObject->.........

When I load diagram with Eclipse 3.2 with GMF v1.0 plugins where there is
multiple level of these AnyObject it generates model file like

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:PASample2=" platform:/resource/com.csc.fs.pa.productdefintion/model/PA-S ample2.xsd "
xmlns:_21500CSCTxLife1201ClientExtension2=" http://pa.fss.csc.com/extensions/2.15.00_CSC_TxLife1201_Clie nt_Extension2.xsd">
<PASample2:DocumentRoot>
<oLifE>
<policyProduct>
<oLifEExtension>
<anyTypeLevel
xsi:type="_21500CSCTxLife1201ClientExtension2:ABCType">
<anyTypeLevel
xsi:type="_21500CSCTxLife1201ClientExtension2:BCDType">
<anyTypeLevel
xsi:type="_21500CSCTxLife1201ClientExtension2:ChildExtensionType "/>
</anyTypeLevel>
<anyTypeLevel
xsi:type="_21500CSCTxLife1201ClientExtension2:ABCType"/>
<anyTypeLevel
xsi:type="_21500CSCTxLife1201ClientExtension2:ABCType"/>
</anyTypeLevel>
</oLifEExtension>
</policyProduct>
</oLifE>
</PASample2:DocumentRoot>
<_21500CSCTxLife1201ClientExtension2:BCDType>
<anyTypeLevel
xsi:type="_21500CSCTxLife1201ClientExtension2:ChildExtensionType "/>
</_21500CSCTxLife1201ClientExtension2:BCDType>
<_21500CSCTxLife1201ClientExtension2:ABCType/>
<_21500CSCTxLife1201ClientExtension2:ABCType/>
<_21500CSCTxLife1201ClientExtension2:ChildExtensionType/>
</xmi:XMI>

But when I load same diagram with Eclipse 3.3 with GMF v2.0 plugins where
there is multiple level of these AnyObject it generates wrong model file
which editor itself is not able to load again like

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:PASample2=" platform:/resource/com.csc.fs.pa.productdefintion/model/PA-S ample2.xsd "
xmlns:_21500CSCTxLife1201ClientExtension=" http://pa.fss.csc.com/extensions/2.15.00_CSC_TxLife1201_Clie nt_Extension.xsd">
<PASample2:DocumentRoot>
<oLifE>
<policyProduct>
<oLifEExtension>
<anyTypeLevel
xsi:type="_21500CSCTxLife1201ClientExtension:ABCType">
<anyTypeLevel href=""> <anyTypeLevel href="">
<anyTypeLevel href=""> </anyTypeLevel>
</oLifEExtension>
</policyProduct>
</oLifE>
</PASample2:DocumentRoot>
<_21500CSCTxLife1201ClientExtension:ABCType>
<anyTypeLevel href=""> </_21500CSCTxLife1201ClientExtension:ABCType>
<_21500CSCTxLife1201ClientExtension:ABCType/>
<_21500CSCTxLife1201ClientExtension:ABCType/>
<_21500CSCTxLife1201ClientExtension:ABCType/>
</xmi:XMI>

If you see then it gives correct information till first AnyType level and
for rest it just puts info like href="" which seems like it is putting
some XPath reference but editor itself is not able to load this
information correctly in diagram representation.

Could you pls help me identify as to where should I look for this or what
could cause this problem.
Re: Incorrect diagram model file generated for dynamic objects [message #197367 is a reply to message #197173] Wed, 16 July 2008 10:40 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gaurav,

> But when I load same diagram with Eclipse 3.3 with GMF v2.0 plugins
> where there is multiple level of these AnyObject it generates wrong
> model file which editor itself is not able to load again like
AFAIU you are trying to create new _diagram_ based on existing model (or
open a diagram createdusing prev. version of generated diagram editor). So,
model file gets corrupted on trying to save openned diagram is it right?

Can you open same file using EMF dynamic instance editor and save it without
any problems?

-----------------
Alex Shatalin
Previous Topic:Which environment for GMF development ?
Next Topic:compartment collapsible
Goto Forum:
  


Current Time: Mon May 25 05:02:14 GMT 2020

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

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

Back to the top