Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » diagram initialized incorrectly(_diagram file is initialized incorrectly when using the rightclick on the model)
diagram initialized incorrectly [message #485249] Thu, 10 September 2009 22:46 Go to next message
Calin Medianu is currently offline Calin MedianuFriend
Messages: 12
Registered: July 2009
Junior Member
Hi,

I built a GMF Diagram editor with the diagram and the model stored in separate files.

When I start with an empty model and diagram, everything works OK, but if I delete the _diagram file and recreate it by clicking on the model file and using "Initialize dw_diagram file", it's created incorrectly, it seems like the graphical part is not properly linked to the data. The diagram looks OK just after recreation, but when I close and open, the part that was not linked to the data is missing.

File attachments don't seem to work so I'm pasting relevant parts below.. Any ideas?

Thanks!

Calin

model file:
<?xml version="1.0" encoding="UTF-8"?>
<dw:DataWarehouse xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dw="http://www.eclipse.org/2009/dw" xmi:id="_UKVqgJjJEd63sd6cUqwLjg">
<typeDefinitions xsi:type="dw:FactDefinition" name="1">
<measures xsi:type="dw:FactMeasure" name="11"/>
</typeDefinitions>
</dw:DataWarehouse>

diagram file created together with model:

<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:dw="http://www.eclipse.org/2009/dw" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_lEsY8Z5SEd6IPYBnyKE-Vg" type="Dw" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_q7ErkZ5UEd6j6Zl4Y6ahBQ" type="2002">
<children xmi:type="notation:DecorationNode" xmi:id="_q7Erk55UEd6j6Zl4Y6ahBQ" type="5002"/>
<children xmi:type="notation:BasicCompartment" xmi:id="_q7ErlJ5UEd6j6Zl4Y6ahBQ" type="7003">
<children xmi:type="notation:Node" xmi:id="_r9r_IJ5UEd6j6Zl4Y6ahBQ" type="3003">
<element xmi:type="dw:FactMeasure" href="My.dw#//@typeDefinitions.0/@measures.0"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_r9r_IZ5UEd6j6Zl4Y6ahBQ"/>
</children>
<styles xmi:type="notation:TitleStyle" xmi:id="_q7ErlZ5UEd6j6Zl4Y6ahBQ" showTitle="true"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_q7Erlp5UEd6j6Zl4Y6ahBQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_q7Erl55UEd6j6Zl4Y6ahBQ"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_q7ErmJ5UEd6j6Zl4Y6ahBQ" type="7004">
<styles xmi:type="notation:SortingStyle" xmi:id="_q7ErmZ5UEd6j6Zl4Y6ahBQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_q7Ermp5UEd6j6Zl4Y6ahBQ"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_q7Erm55UEd6j6Zl4Y6ahBQ" type="7005">
<styles xmi:type="notation:SortingStyle" xmi:id="_q7ErnJ5UEd6j6Zl4Y6ahBQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_q7ErnZ5UEd6j6Zl4Y6ahBQ"/>
</children>
<element xmi:type="dw:FactDefinition" href="My.dw#//@typeDefinitions.0"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_q7Erkp5UEd6j6Zl4Y6ahBQ" x="108" y="59"/>
</children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_lEsY8p5SEd6IPYBnyKE-Vg"/>
<element xmi:type="dw:DataWarehouse" href="My.dw#_UKVqgJjJEd63sd6cUqwLjg"/>
</notation:Diagram>

recreated diagram file, using rightclick on the model file:

<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:dw="http://www.eclipse.org/2009/dw" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_Gvl-kJ5ZEd6BqqEcWjAv1g" type="Dw" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_GwVlcJ5ZEd6BqqEcWjAv1g" type="2002">
<children xmi:type="notation:DecorationNode" xmi:id="_GwVlcp5ZEd6BqqEcWjAv1g" type="5002"/>
<children xmi:type="notation:BasicCompartment" xmi:id="_GwVlc55ZEd6BqqEcWjAv1g" type="7003">
<styles xmi:type="notation:TitleStyle" xmi:id="_GwVldJ5ZEd6BqqEcWjAv1g" showTitle="true"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_GwVldZ5ZEd6BqqEcWjAv1g"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_GwVldp5ZEd6BqqEcWjAv1g"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_GwVld55ZEd6BqqEcWjAv1g" type="7004">
<styles xmi:type="notation:SortingStyle" xmi:id="_GwVleJ5ZEd6BqqEcWjAv1g"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_GwVleZ5ZEd6BqqEcWjAv1g"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_GwVlep5ZEd6BqqEcWjAv1g" type="7005">
<styles xmi:type="notation:SortingStyle" xmi:id="_GwVle55ZEd6BqqEcWjAv1g"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_GwVlfJ5ZEd6BqqEcWjAv1g"/>
</children>
<element xmi:type="dw:FactDefinition" href="My.dw#//@typeDefinitions.0"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_GwVlcZ5ZEd6BqqEcWjAv1g" x="24" y="24"/>
</children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_Gvl-kZ5ZEd6BqqEcWjAv1g"/>
<element xmi:type="dw:DataWarehouse" href="My.dw#_UKVqgJjJEd63sd6cUqwLjg"/>
</notation:Diagram>

The missing part is
<element xmi:type="dw:FactMeasure" href="My.dw#//@typeDefinitions.0/@measures.0"/>

Re: diagram initialized incorrectly [message #485255 is a reply to message #485249] Fri, 11 September 2009 00:33 Go to previous message
Calin Medianu is currently offline Calin MedianuFriend
Messages: 12
Registered: July 2009
Junior Member
I see now it's a known issue..

Previous Topic:Show referenced Node name on Label
Next Topic:Get IProject of active DiagramEditor
Goto Forum:
  


Current Time: Sat Apr 27 04:51:31 GMT 2024

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

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

Back to the top