// Add a marquee tool to the group
toolbar.add(new MarqueeToolEntry());
// Add (solid-line) connection tool
tool = new ConnectionCreationToolEntry("Solid connection", "Create a solid-line connection",
new CreationFactory() {
public Object getNewObject() {
return null;
}
// see ShapeEditPart#createEditPolicies()
// this is abused to transmit the desired line style
public Object getObjectType() {
return ShapeConstants.SOLID_CONNECTION;
}
},
ImageDescriptor.createFromFile(ShapesPlugin.class, "icons/connection_s16.gif"),
ImageDescriptor.createFromFile(ShapesPlugin.class, "icons/connection_s24.gif"));
toolbar.add(tool);
// Add (dashed-line) connection tool
tool = new ConnectionCreationToolEntry("Dashed connection", "Create a dashed-line connection",
new CreationFactory() {
public Object getNewObject() {
return null;
}