Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » error in graphical model
error in graphical model [message #633519] Mon, 18 October 2010 10:21 Go to next message
lalakis  is currently offline lalakis Friend
Messages: 48
Registered: October 2009
Member
I created a new gmf project to create an editor for my emf model.I am in the phase where i have to create the mapping tool,but when i am loading the graphical tool that i have already created i get an error : Error loading model: Unresolved reference 'Polygon'. (platform:/resource/ATAG%20Ecore/model/My.gmfgraph, 35, 30)"

The Polygon is a reference to a figure that i have created which is a single polygon icon for my components.

This is the graph file i have already created:

<?xml version="1.0" encoding="UTF-8"?>
<gmfgraph:Canvas xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gmfgraph="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
<figures>
<descriptors
name="Polygon node">
<actualFigure
xsi:type="gmfgraph:Polygon">
<layout
xsi:type="gmfgraph:GridLayout"/>
<size
x="20"
y="20"/>
<children
xsi:type="gmfgraph:Label"
name="Node"
text="node"/>
</actualFigure>
</descriptors>
<descriptors
name="Elipse node">
<actualFigure
xsi:type="gmfgraph:Ellipse"/>
</descriptors>
<descriptors
name="Connection">
<actualFigure
xsi:type="gmfgraph:PolylineConnection"/>
</descriptors>
</figures>
<nodes
name="ATAGPLAN"
figure="Polygon node"/>
<nodes
name="Task"
figure="Elipse node"/>
<nodes
name="Data"
figure="Elipse node"/>
<connections
name="con"
figure="Connection"/>
</gmfgraph:Canvas>

Did i forget to include something in my graph file?

Re: error in graphical model [message #633531 is a reply to message #633519] Mon, 18 October 2010 10:40 Go to previous messageGo to next message
Mariot Chauvin is currently offline Mariot ChauvinFriend
Messages: 174
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020502010809080707050408
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Hi,

You should not use name with empty space for figures.
Rename "Polygon node" to "PolygonNode" and "Elipse node" to "ElipseNode" and it will work.
Hope this help.
Regards,

Mariot


--
Mariot Chauvin @ Obeo

http://www.obeo.fr
http://mariot-thoughts.blogspot.com
http://fr.linkedin.com/in/mariotchauvin



lalakis a écrit :
> I created a new gmf project to create an editor for my emf model.I am
> in the phase where i have to create the mapping tool,but when i am
> loading the graphical tool that i have already created i get an error
> : Error loading model: Unresolved reference 'Polygon'.
> (platform:/resource/ATAG%20Ecore/model/My.gmfgraph, 35, 30)"
>
> The Polygon is a reference to a figure that i have created which is a
> single polygon icon for my components.
>
> This is the graph file i have already created:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <gmfgraph:Canvas xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:gmfgraph="http://www.eclipse.org/gmf/2006/GraphicalDefinition">
> <figures>
> <descriptors
> name="Polygon node">
> <actualFigure
> xsi:type="gmfgraph:Polygon">
> <layout
> xsi:type="gmfgraph:GridLayout"/>
> <size
> x="20"
> y="20"/>
> <children
> xsi:type="gmfgraph:Label"
> name="Node"
> text="node"/>
> </actualFigure>
> </descriptors>
> <descriptors
> name="Elipse node">
> <actualFigure
> xsi:type="gmfgraph:Ellipse"/>
> </descriptors>
> <descriptors
> name="Connection">
> <actualFigure
> xsi:type="gmfgraph:PolylineConnection"/>
> </descriptors>
> </figures>
> <nodes
> name="ATAGPLAN"
> figure="Polygon node"/>
> <nodes
> name="Task"
> figure="Elipse node"/>
> <nodes
> name="Data"
> figure="Elipse node"/>
> <connections
> name="con"
> figure="Connection"/>
> </gmfgraph:Canvas>
>
> Did i forget to include something in my graph file?
>
>

--------------020502010809080707050408
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre class="moz-signature" cols="150"><font color="#000000">Hi,

You should not use name with empty space for figures.
Rename "Polygon node" to "PolygonNode" and "Elipse node" to "ElipseNode" and it will work.
Hope this help.
Regards,

Mariot
</font>

--
Mariot Chauvin @ Obeo

<a class="moz-txt-link-freetext" href="http://www.obeo.fr">http://www.obeo.fr</a>
<a class="moz-txt-link-freetext" href="http://mariot-thoughts.blogspot.com">http://mariot-thoughts.blogspot.com</a>
<a class="moz-txt-link-freetext" href="http://fr.linkedin.com/in/mariotchauvin">http://fr.linkedin.com/in/mariotchauvin</a> </pre>
<br>
<br>
lalakis a écrit :
<blockquote cite="mid:i9h6ss$sqg$1@news.eclipse.org" type="cite">I
created a new gmf project to create an editor for my emf model.I am in
the phase where i have to create the mapping tool,but when i am loading
the graphical tool that i have already created i get an error : Error
loading model: Unresolved reference 'Polygon'.
(platform:/resource/ATAG%20Ecore/model/My.gmfgraph, 35, 30)"
<br>
<br>
The Polygon is a reference to a figure that i have created which is a
single polygon icon for my components.
<br>
<br>
This is the graph file i have already created:
<br>
<br>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
<br>
&lt;gmfgraph:Canvas xmi:version="2.0"
<br>
   xmlns:xmi=<a class="moz-txt-link-rfc2396E" href="http://www.omg.org/XMI">"http://www.omg.org/XMI"</a>
<br>
   xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
<br>
  
xmlns:gmfgraph=<a class="moz-txt-link-rfc2396E" href="http://www.eclipse.org/gmf/2006/GraphicalDefinition">"http://www.eclipse.org/gmf/2006/GraphicalDefinition"</a>&gt;
<br>
 &lt;figures&gt;
<br>
   &lt;descriptors
<br>
       name="Polygon node"&gt;
<br>
     &lt;actualFigure
<br>
         xsi:type="gmfgraph:Polygon"&gt;
<br>
       &lt;layout
<br>
           xsi:type="gmfgraph:GridLayout"/&gt;
<br>
       &lt;size
<br>
           x="20"
<br>
           y="20"/&gt;
<br>
       &lt;children
<br>
           xsi:type="gmfgraph:Label"
<br>
           name="Node"
<br>
           text="node"/&gt;
<br>
     &lt;/actualFigure&gt;
<br>
   &lt;/descriptors&gt;
<br>
   &lt;descriptors
<br>
       name="Elipse node"&gt;
<br>
     &lt;actualFigure
<br>
         xsi:type="gmfgraph:Ellipse"/&gt;
<br>
   &lt;/descriptors&gt;
<br>
   &lt;descriptors
<br>
       name="Connection"&gt;
<br>
     &lt;actualFigure
<br>
         xsi:type="gmfgraph:PolylineConnection"/&gt;
<br>
   &lt;/descriptors&gt;
<br>
 &lt;/figures&gt;
<br>
 &lt;nodes
<br>
     name="ATAGPLAN"
<br>
     figure="Polygon node"/&gt;
<br>
 &lt;nodes
<br>
     name="Task"
<br>
     figure="Elipse node"/&gt;
<br>
 &lt;nodes
<br>
     name="Data"
<br>
     figure="Elipse node"/&gt;
<br>
 &lt;connections
<br>
     name="con"
<br>
     figure="Connection"/&gt;
<br>
&lt;/gmfgraph:Canvas&gt;
<br>
<br>
Did i forget to include something in my graph file?
<br>
<br>
<br>
</blockquote>
</body>
</html>

--------------020502010809080707050408--
Re: error in graphical model [message #633549 is a reply to message #633531] Mon, 18 October 2010 11:27 Go to previous message
lalakis  is currently offline lalakis Friend
Messages: 48
Registered: October 2009
Member
Now it works.It was that.
Previous Topic:Creating Labels in Inner Figures
Next Topic:Custom Figure
Goto Forum:
  


Current Time: Thu Apr 25 23:33:17 GMT 2024

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

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

Back to the top