Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problems generating .gmfgen
Problems generating .gmfgen [message #640813] Tue, 23 November 2010 09:39 Go to next message
Thomas Buchmann is currently offline Thomas BuchmannFriend
Messages: 53
Registered: November 2010
Member
Hi,

i tried to build a simple statechart editor, but i keep getting the following error, when in try to generate the gmfgen model:

No Definition top::Descriptor::Inner for FigureDescriptor could be found!

I checked the gmfgraph definition file several times, but i didn't find any unfilled references. I also recreated the gmfmap file, but still no success.

How can i find out where the problem originates from?

Validating gmfgraph and gmfmap files is always successful...
Re: Problems generating .gmfgen [message #640824 is a reply to message #640813] Tue, 23 November 2010 10:09 Go to previous messageGo to next message
Asiri Rathnayake is currently offline Asiri RathnayakeFriend
Messages: 80
Registered: September 2010
Location: Colombo, Sri Lanka.
Member
Hi,

It seems you have a problem in your graphical definition (gmfgraph). Did you give names to all figure descriptors inside your figure gallery? If you can post an expanded screenshot of your gmfgraph along with the xml content of your gmfgraph, may be we can help you further.

- Asiri
Re: Problems generating .gmfgen [message #640832 is a reply to message #640824] Tue, 23 November 2010 10:28 Go to previous messageGo to next message
Thomas Buchmann is currently offline Thomas BuchmannFriend
Messages: 53
Registered: November 2010
Member
Hello Asiri,

thanks for answering.

The XML Content of my File is:

<?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" name="MainCanvas">
  <figures
      name="Default">
    <descriptors
        name="InitialStateFigure">
      <actualFigure
          xsi:type="gmfgraph:Ellipse"
          name="InitialStateFigure">
        <maximumSize
            dx="10"
            dy="10"/>
        <minimumSize
            dx="5"
            dy="5"/>
      </actualFigure>
    </descriptors>
    <descriptors
        name="NormalStateFigure">
      <actualFigure
          xsi:type="gmfgraph:RoundedRectangle"
          name="NormalStateFigure">
        <foregroundColor
            xsi:type="gmfgraph:ConstantColor"/>
        <border
            xsi:type="gmfgraph:MarginBorder">
          <insets
              top="5"
              left="5"
              bottom="5"
              right="5"/>
        </border>
        <children
            xsi:type="gmfgraph:Label"
            name="NormalStateLabel"
            text="State"/>
      </actualFigure>
      <accessors
          accessor="getFigureStateLabel"
          figure="//@figures.0/@descriptors.1/@actualFigure/@children.0"/>
    </descriptors>
    <descriptors
        name="TransitionFigure"/>
  </figures>
  <nodes
      name="NormalStateNode"
      figure="NormalStateFigure"/>
  <nodes
      name="InitialStateNode"
      figure="InitialStateFigure"/>
  <connections
      name="Transition"
      figure="TransitionFigure"/>
  <labels
      name="StateNameLabel"
      figure="NormalStateFigure"
      accessor="//@figures.0/@descriptors.1/@accessors.0"/>
</gmfgraph:Canvas>


http://www.abload.de/img/statechart1po5.png

regards,
Thomas
Re: Problems generating .gmfgen [message #640839 is a reply to message #640813] Tue, 23 November 2010 10:35 Go to previous messageGo to next message
Asiri Rathnayake is currently offline Asiri RathnayakeFriend
Messages: 80
Registered: September 2010
Location: Colombo, Sri Lanka.
Member
Hi Thomas,

Your TransitionFigure needs an actually figure inside it (a poly-line connection since this is to be used as a connection).

- Asiri

[Updated on: Tue, 23 November 2010 10:38]

Report message to a moderator

Re: Problems generating .gmfgen [message #640850 is a reply to message #640813] Tue, 23 November 2010 10:57 Go to previous messageGo to next message
Thomas Buchmann is currently offline Thomas BuchmannFriend
Messages: 53
Registered: November 2010
Member
I added the Polyline Connection, assigned a name to it, but i still get the same type of error Sad

Thomas
Re: Problems generating .gmfgen [message #640857 is a reply to message #640813] Tue, 23 November 2010 11:03 Go to previous messageGo to next message
Asiri Rathnayake is currently offline Asiri RathnayakeFriend
Messages: 80
Registered: September 2010
Location: Colombo, Sri Lanka.
Member
Hi Thomas,

Can you post your mapping definition as well? (like before)

- Asiri

EDIT: Once you have a gmfmap file, never edit gmfgraph, gmftool files individually, always use the gmfmap editor.

[Updated on: Tue, 23 November 2010 11:05]

Report message to a moderator

Re: Problems generating .gmfgen [message #640860 is a reply to message #640857] Tue, 23 November 2010 11:11 Go to previous messageGo to next message
Thomas Buchmann is currently offline Thomas BuchmannFriend
Messages: 53
Registered: November 2010
Member
Here we go

<?xml version="1.0" encoding="UTF-8"?>
<gmfmap:Mapping xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
    xmlns:gmfmap="http://www.eclipse.org/gmf/2008/mappings"
    xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
  <nodes>
    <containmentFeature
        href="statechart.ecore#//StateMachine/states"/>
    <ownedChild>
      <domainMetaElement
          href="statechart.ecore#//NormalState"/>
      <labelMappings
          xsi:type="gmfmap:FeatureLabelMapping">
        <diagramLabel
            href="statechart.gmfgraph#StateNameLabel"/>
        <features
            href="statechart.ecore#//State/name"/>
      </labelMappings>
      <tool
          xsi:type="gmftool:CreationTool"
          href="statechart.gmftool#//@palette/@tools.0/@tools.1"/>
      <diagramNode
          href="statechart.gmfgraph#NormalStateNode"/>
    </ownedChild>
  </nodes>
  <nodes>
    <containmentFeature
        href="statechart.ecore#//StateMachine/states"/>
    <ownedChild>
      <domainMetaElement
          href="statechart.ecore#//InitialState"/>
      <tool
          xsi:type="gmftool:CreationTool"
          href="statechart.gmftool#//@palette/@tools.0/@tools.2"/>
      <diagramNode
          href="statechart.gmfgraph#InitialStateNode"/>
    </ownedChild>
  </nodes>
  <links>
    <domainMetaElement
        href="statechart.ecore#//Transition"/>
    <containmentFeature
        href="statechart.ecore#//StateMachine/transitions"/>
    <tool
        xsi:type="gmftool:CreationTool"
        href="statechart.gmftool#//@palette/@tools.0/@tools.0"/>
    <diagramLink
        href="statechart.gmfgraph#Transition"/>
    <sourceMetaFeature
        xsi:type="ecore:EReference"
        href="statechart.ecore#//Transition/start"/>
    <linkMetaFeature
        xsi:type="ecore:EReference"
        href="statechart.ecore#//Transition/end"/>
  </links>
  <diagram>
    <diagramCanvas
        href="statechart.gmfgraph#/"/>
    <domainModel
        href="statechart.ecore#/"/>
    <domainMetaElement
        href="statechart.ecore#//StateMachine"/>
    <palette
        href="statechart.gmftool#//@palette"/>
  </diagram>
</gmfmap:Mapping>


http://www.abload.de/img/statechartgmfmapnt5l.png

Quote:
EDIT: Once you have a gmfmap file, never edit gmfgraph, gmftool files individually, always use the gmfmap editor.


Yes, i know, but i keep getting this error even if i create all of the files using the "Simple Graphical Definition Model", "Simple Tooling Definition Model" and "Guide Mapping Model Creation" Wizards and without any manual changes.

[Updated on: Tue, 23 November 2010 11:14]

Report message to a moderator

Re: Problems generating .gmfgen [message #640886 is a reply to message #640813] Tue, 23 November 2010 13:05 Go to previous messageGo to next message
Thomas Buchmann is currently offline Thomas BuchmannFriend
Messages: 53
Registered: November 2010
Member
Update: Restarting Eclipse after my lunchbreak solved the problem...

Scary Smile
Re: Problems generating .gmfgen [message #640890 is a reply to message #640886] Tue, 23 November 2010 13:13 Go to previous messageGo to next message
Asiri Rathnayake is currently offline Asiri RathnayakeFriend
Messages: 80
Registered: September 2010
Location: Colombo, Sri Lanka.
Member
Hi,

bkunlimited wrote on Tue, 23 November 2010 18:35
Update: Restarting Eclipse after my lunchbreak solved the problem...

Try removing the poly-line connection from your gmfgraph (revert back to original state) and see if you can reproduce the error. If you can reproduce, that means there is some caching problem in eclipse, otherwise it would be very scary indeed Smile

- Asiri
Re: Problems generating .gmfgen [message #640898 is a reply to message #640813] Tue, 23 November 2010 13:36 Go to previous messageGo to next message
Thomas Buchmann is currently offline Thomas BuchmannFriend
Messages: 53
Registered: November 2010
Member
Hello Asiri,

removing the Polyline Connection resulted again in the error. Adding it didn't work until the next restart of eclipse. So it really looks like a cashing problem.

Thanks a lot for your efforts!!

Thomas

EDIT: This bug is pretty annoying as i end up in restarting eclipse almost after each change Shocked

[Updated on: Tue, 23 November 2010 13:51]

Report message to a moderator

Re: Problems generating .gmfgen [message #641052 is a reply to message #640898] Wed, 24 November 2010 06:11 Go to previous messageGo to next message
Asiri Rathnayake is currently offline Asiri RathnayakeFriend
Messages: 80
Registered: September 2010
Location: Colombo, Sri Lanka.
Member
Hi,

bkunlimited wrote on Tue, 23 November 2010 19:06
EDIT: This bug is pretty annoying as i end up in restarting eclipse almost after each change Shocked

Ok I don't think this is the normal behaviour (for one I don't face such an issue). Once you make a change within your gmfmap editor, can you refresh (righ-lick menu) and then regenerate gmfgen + code and see if your changes have been propagated into code?

- Asiri
Re: Problems generating .gmfgen [message #641058 is a reply to message #641052] Wed, 24 November 2010 07:44 Go to previous message
Thomas Buchmann is currently offline Thomas BuchmannFriend
Messages: 53
Registered: November 2010
Member
Asiri Rathnayake wrote on Wed, 24 November 2010 01:11

Once you make a change within your gmfmap editor, can you refresh (righ-lick menu) and then regenerate gmfgen + code and see if your changes have been propagated into code?



Ah yes it works if i use it that way. Sorry Wink I always used the context menu by right-clicking on the gmfmap file in the package explorer. Maybe that makes a difference.

Thomas
Previous Topic:Creation Diagram file
Next Topic:Border Item refresh problem on create connection during drag
Goto Forum:
  


Current Time: Thu Apr 25 18:14:23 GMT 2024

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

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

Back to the top