Hello,
I am currently working on an Eclipse GEF Plugin. There are Nodes that can be moved and resized using an SelectionToolEntry, and can be Connected Using a ConnectionCreationToolEntry. Since the areas with one tool can interact with are distinct from the areas the other tool can interact with, i'd like to combine these tools to one. One witch is capable of selecting and resizing nodes and create connections between them.
Here is what I got:
SelectionToolEntry selection = new SelectionToolEntry();
mainPalette.add(selection);
setDefaultEntry(selection);
ConnectionCreationToolEntry connectionCreation =
new ConnectionCreationToolEntry("Connect",
"Connect 2 Nodes", new CreationFactory()
{
@Override
public Object getObjectType()
{
return NodeConnection.class;
}
@Override
public Object getNewObject()
{
return new NodeConnection();
}
}, null, null);
mainPalette.add(connectionCreation);
And this is what I'd like to get
SelectionAndConnectionCreationToolEntry editToolEntry =
new SelectionAndConnectionCreationToolEntry("Edit",
"Connect 2 Actions", new CreationFactory()
{
@Override
public Object getObjectType()
{
return NodeConnection.class;
}
@Override
public Object getNewObject()
{
return new NodeConnection();
}
}, null, null);
mainPalette.add(editToolEntry);
setDefaultEntry(editToolEntry);
Is there a Better way then to create my own ToolEntry and my Own TargetingTool?
Thanks in advance,
Bastian Schumacher