Question

I'm creating a eclipse plugin with GEF. My problem: When I use the MarqueeToolEntry or the PanningSelectionToolEntry to select the nodes (for example for copy&past) the tool did not select the connections between the nodes and only a copy of the nodes is created. When I manually add the connection to the selection, I can copy nodes and connection- I've tested the example gef plugin and it looks like the same.

I found a bug report on eclipse.org with status fixed, but I couldn't find out how to change the behaviour.

Regards

Was it helpful?

Solution

Set the behavior of marqueeToolEntry as below-

MarqueeToolEntry marquee = new MarqueeToolEntry();
marquee.setToolProperty(MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR,
    new Integer(MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS));

This will select the nodes as well the related connections.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top