* @param configuration the connection widget configuration
*/
public ConnectionActionGroup( ConnectionWidget mainWidget, ConnectionConfiguration configuration )
{
this.mainWidget = mainWidget;
TreeViewer viewer = mainWidget.getViewer();
collapseAllAction = new CollapseAllAction( viewer );
expandAllAction = new ExpandAllAction( viewer );
connectionActionMap = new HashMap<String, ConnectionViewActionProxy>();
connectionActionMap.put( newConnectionAction, new ConnectionViewActionProxy( viewer, this,
new NewConnectionAction() ) );
connectionActionMap.put( newConnectionFolderAction, new ConnectionViewActionProxy( viewer, this,
new NewConnectionFolderAction() ) );
connectionActionMap.put( openConnectionAction, new ConnectionViewActionProxy( viewer, this,
new OpenConnectionAction() ) );
connectionActionMap.put( closeConnectionAction, new ConnectionViewActionProxy( viewer, this,
new CloseConnectionAction() ) );
connectionActionMap
.put( pasteConnectionAction, new ConnectionViewActionProxy( viewer, this, new PasteAction() ) );
connectionActionMap.put( copyConnectionAction, new ConnectionViewActionProxy( viewer, this, new CopyAction(
( StudioActionProxy ) connectionActionMap.get( pasteConnectionAction ) ) ) );
connectionActionMap.put( deleteConnectionAction, new ConnectionViewActionProxy( viewer, this,
new DeleteAction() ) );
connectionActionMap.put( renameConnectionAction, new ConnectionViewActionProxy( viewer, this,
new RenameAction() ) );
connectionActionMap.put( propertyDialogAction, new ConnectionViewActionProxy( viewer, this,
new PropertiesAction() ) );
// DND support
dropConnectionListener = new DropConnectionListener();
dragConnectionListener = new DragConnectionListener( viewer );
int ops = DND.DROP_COPY | DND.DROP_MOVE;
Transfer[] transfers = new Transfer[]
{ ConnectionTransfer.getInstance() };
viewer.addDragSupport( ops, transfers, dragConnectionListener );
viewer.addDropSupport( ops, transfers, dropConnectionListener );
}