Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problems with moving a label
Problems with moving a label [message #488376] Mon, 28 September 2009 13:33 Go to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hello!

I have a bordered item label that I can't move.

I debug my code, and I found that it doesn't arrive to the refreshBounds() method in the EditPart of the label.

I see the stack trace, and there's a moment in the DiagramEditingDomain class (into DiagramEditingDomainFactory) that does the postcommit (after release the mouse button) function.

This function check the existent notifications:
List notifications = getValidator().getNotificationsForPostcommit(tx);

But the list is empty, and there not arrive to the handleNotification of the labelEditPart.

Anybody can helps me please?

Thanks!
Marc
Re: Problems with moving a label [message #488527 is a reply to message #488376] Tue, 29 September 2009 06:59 Go to previous messageGo to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
It seems like the EditPart isn't registered... I have created this EditPart manually. For other diagrams (i.e. Activity from UML) it works fine... Perhaps I must do something I don't realize with this "customized and manual" EditPart??

Thanks.
Marc
Re: Problems with moving a label [message #488606 is a reply to message #488527] Tue, 29 September 2009 12:29 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 31
Registered: September 2009
Member
Hi,

Quote:

I have created this EditPart manually.



Rather than manually create and customized an EditPart I suggest you (1.) describe this element it in your .gmfgraph file somehow like:

    - FigureDescriptor VariableFigureDescriptor
        - Rectangle VariableFigure
            - Label VariableLabel
        - Child Access getFigureVariableLabel


Or a little bit more detailed.

    <descriptors
        name="VariableFigureDescriptor">
      <actualFigure
          xsi:type="gmfgraph:Rectangle"
          name="VariableFigure"
          outline="false"
          fill="false">
        <children
            xsi:type="gmfgraph:Label"
            name="VariableLabel"/>
      </actualFigure>
      <accessors
          figure="//@figures.0/@descriptors.3/@actualFigure/@children.0"/>
    </descriptors>


Furthermore (2.) create a node that uses the FigureDescriptor and (3.) introduce it in your .gmfmap file. Then (4.) (re-)create your generator model as well as (5.) your diagram editor.

Doing so (and assumed you're using a layout that actually allows moving nodes) you should be able to move the node.

Best regards,

sas
Re: Problems with moving a label [message #488999 is a reply to message #488606] Thu, 01 October 2009 07:45 Go to previous message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Thanks Wink Now it works.

Marc
Previous Topic:[Announce] GMF 2.3.0M2 is available
Next Topic:Trying to try out 2.2.1 update site errors
Goto Forum:
  


Current Time: Wed Apr 24 15:33:54 GMT 2024

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

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

Back to the top