Hello,
I use Roassal to visualize a FAST AST as a kind of UML diagram. Each node on Roassal is a node of the AST and the edges shows the parent link. That's work fine and it's very easy to do it ! Thanks ! But I would like to add some text on the edges to know what are the instance variables containing the children nodes. I saw the examples and there's not a such functionality. Is it possible to add it ? Cheers, Vincent _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Vincent,
I am not right now with my computer, so I cannot give you the right code snippet, but this functionality is implemented in Roassal. Have a look at the class ROConstraints. On the class side it contains a method to set an element between two other elements. What you can do, is having a label between the two edge extremities. Cheers, Alexandre > Le 24-01-2014 à 7:11, Vincent Blondeau <[hidden email]> a écrit : > > Hello, > > I use Roassal to visualize a FAST AST as a kind of UML diagram. > Each node on Roassal is a node of the AST and the edges shows the parent link. > That's work fine and it's very easy to do it ! Thanks ! > > But I would like to add some text on the edges to know what are the instance variables containing the children nodes. > > I saw the examples and there's not a such functionality. > > Is it possible to add it ? > > Cheers, > Vincent > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Vincent Blondeau
Vincent, did it work?
Alexandre > On 24 Jan 2014, at 07:11, Vincent Blondeau <[hidden email]> wrote: > > Hello, > > I use Roassal to visualize a FAST AST as a kind of UML diagram. > Each node on Roassal is a node of the AST and the edges shows the parent link. > That's work fine and it's very easy to do it ! Thanks ! > > But I would like to add some text on the edges to know what are the instance variables containing the children nodes. > > I saw the examples and there's not a such functionality. > > Is it possible to add it ? > > Cheers, > Vincent > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Le 29/01/2014 11:49, Alexandre Bergel a
écrit :
Not really...Vincent, did it work? The code I use is : //Node and edges creation ... view shape label centeredLabel. labelNode := view node: 'Hello'. "create the label I want between (it's for the example)" ROConstraint stick: labelNode between: view edges first from and: view edges first to. "locate the label between 2 nodes" view treeLayout. view open A text "hello" is displayed but at the begining, the text is misplaced : If I move one of the nodes linked to the edge, the text moves to the right location (the picture at the bottom, shows what I want to do :) ) But the text doesn't stay on the edge but it's between the left sides of the nodes... Do I use the right method and the right arguments ? Thanks for helping ! Vincent AlexandreOn 24 Jan 2014, at 07:11, Vincent Blondeau [hidden email] wrote: Hello, I use Roassal to visualize a FAST AST as a kind of UML diagram. Each node on Roassal is a node of the AST and the edges shows the parent link. That's work fine and it's very easy to do it ! Thanks ! But I would like to add some text on the edges to know what are the instance variables containing the children nodes. I saw the examples and there's not a such functionality. Is it possible to add it ? Cheers, Vincent _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev PNG |