Community
Participate
Working Groups
tbm.add(collapseAllAction);
tbm.update(false);
// Create the open action for double clicks
// Register the open handler
openAction = new OpenRemoteFileAction();
viewer.addDoubleClickListener(new IDoubleClickListener() {
viewer.addOpenListener(new IOpenListener() {
public void doubleClick(DoubleClickEvent e) {
public void open(OpenEvent event) {
handleDoubleClick(e);
handleOpen(event);
}
});
viewer.getControl().setRedraw(true);
/**
* The mouse has been double-clicked in the tree, perform appropriate
* Handle open request.
* behaviour.
*/
private void handleDoubleClick(DoubleClickEvent e) {
private void handleOpen(OpenEvent e) {
// Only act on single selection
ISelection selection = e.getSelection();
if (selection instanceof IStructuredSelection) {