Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 260331
Collapse All | Expand All

(-)UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java (-24 / +1 lines)
Lines 34-39 Link Here
34
 * Kevin Doyle 	 (IBM) - [186769] Enable Contributions to Drop Down menu of Remote Systems view -> Preferences
34
 * Kevin Doyle 	 (IBM) - [186769] Enable Contributions to Drop Down menu of Remote Systems view -> Preferences
35
 * David McKnight (IBM)  - [244807] System view does not handle restore from cache
35
 * David McKnight (IBM)  - [244807] System view does not handle restore from cache
36
 * Li Ding        (IBM)          - [256135] Subsystem not restored in system view tree if subsystem configuration does not support filter
36
 * Li Ding        (IBM)          - [256135] Subsystem not restored in system view tree if subsystem configuration does not support filter
37
 * David McKnight   (IBM)        - [257721] Doubleclick doing special handling and expanding
37
 *******************************************************************************/
38
 *******************************************************************************/
38
39
39
package org.eclipse.rse.internal.ui.view;
40
package org.eclipse.rse.internal.ui.view;
Lines 59-66 Link Here
59
import org.eclipse.jface.action.MenuManager;
60
import org.eclipse.jface.action.MenuManager;
60
import org.eclipse.jface.action.Separator;
61
import org.eclipse.jface.action.Separator;
61
import org.eclipse.jface.resource.ImageDescriptor;
62
import org.eclipse.jface.resource.ImageDescriptor;
62
import org.eclipse.jface.viewers.DoubleClickEvent;
63
import org.eclipse.jface.viewers.IDoubleClickListener;
64
import org.eclipse.jface.viewers.ILabelProvider;
63
import org.eclipse.jface.viewers.ILabelProvider;
65
import org.eclipse.jface.viewers.ISelection;
64
import org.eclipse.jface.viewers.ISelection;
66
import org.eclipse.jface.viewers.ISelectionChangedListener;
65
import org.eclipse.jface.viewers.ISelectionChangedListener;
Lines 381-391 Link Here
381
		//hook the part focus to the viewer's control focus.
380
		//hook the part focus to the viewer's control focus.
382
		//hookFocus(systemView.getControl());
381
		//hookFocus(systemView.getControl());
383
382
384
		systemView.addDoubleClickListener(new IDoubleClickListener() {
385
			public void doubleClick(DoubleClickEvent event) {
386
				handleDoubleClick(event);
387
			}
388
		});
389
383
390
		//prime the selection
384
		//prime the selection
391
		//selectionChanged(null, getSite().getDesktopWindow().getSelectionService().getSelection());
385
		//selectionChanged(null, getSite().getDesktopWindow().getSelectionService().getSelection());
Lines 473-495 Link Here
473
		}
467
		}
474
	}
468
	}
475
469
476
	/**
477
	 * Handles double clicks in viewer.
478
	 * Opens editor if file double-clicked.
479
	 */
480
	protected void handleDoubleClick(DoubleClickEvent event) {
481
		if (!systemView.enabledMode) {
482
			//event.doit = false;
483
			return;
484
		}
485
		IStructuredSelection s = (IStructuredSelection) event.getSelection();
486
		Object element = s.getFirstElement();
487
		if (element == null) return;
488
		ISystemViewElementAdapter adapter = systemView.getViewAdapter(element);
489
		if (adapter != null)
490
			adapter.handleDoubleClick(element);
491
492
	}
493
470
494
	/**
471
	/**
495
	 * Creates the frame source and frame list, and connects them.
472
	 * Creates the frame source and frame list, and connects them.
(-)UI/org/eclipse/rse/internal/ui/view/SystemViewForm.java (+4 lines)
Lines 16-21 Link Here
16
 * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
16
 * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
17
 * David McKnight    (IBM)   - [187711] select SystemView APIs exposed by the ISystemTree interface
17
 * David McKnight    (IBM)   - [187711] select SystemView APIs exposed by the ISystemTree interface
18
 * David McKnight   (IBM)        - [225506] [api][breaking] RSE UI leaks non-API types
18
 * David McKnight   (IBM)        - [225506] [api][breaking] RSE UI leaks non-API types
19
 * David McKnight   (IBM)        - [257721] Doubleclick doing special handling and expanding
19
 *******************************************************************************/
20
 *******************************************************************************/
20
package org.eclipse.rse.internal.ui.view;
21
package org.eclipse.rse.internal.ui.view;
21
import java.util.List;
22
import java.util.List;
Lines 437-442 Link Here
437
	    treeData.heightHint= 200;
438
	    treeData.heightHint= 200;
438
	    tree.getTree().setLayoutData(treeData);  	  	    		
439
	    tree.getTree().setLayoutData(treeData);  	  	    		
439
	    tree.setShowActions(showActions);
440
	    tree.setShowActions(showActions);
441
	    
442
	    // for bug 257721, when using system view from a dialog, by default, we don't let adapter handle double-click
443
	    tree.allowAdapterToHandleDoubleClick(false);
440
	}
444
	}
441
	
445
	
442
	protected void addOurMouseListener()
446
	protected void addOurMouseListener()
(-)UI/org/eclipse/rse/internal/ui/view/SystemView.java (-3 / +16 lines)
Lines 64-70 Link Here
64
 * David McKnight   (IBM)        - [187739] [refresh] Sub Directories are collapsed when Parent Directory is Refreshed on Remote Systems
64
 * David McKnight   (IBM)        - [187739] [refresh] Sub Directories are collapsed when Parent Directory is Refreshed on Remote Systems
65
 * David Dykstal (IBM) - [233530] Not Prompted on Promptable Filters after using once by double click
65
 * David Dykstal (IBM) - [233530] Not Prompted on Promptable Filters after using once by double click
66
 * David McKnight   (IBM)        - [249245] not showing inappropriate popup actions for: Refresh, Show In Table, Go Into, etc. 
66
 * David McKnight   (IBM)        - [249245] not showing inappropriate popup actions for: Refresh, Show In Table, Go Into, etc. 
67
 * David McKnight   (IBM)        - [251851] Backport Widget disposed exception when renaming/pasting a folder
67
 * David McKnight   (IBM)        - [251625] Widget disposed exception when renaming/pasting a folder
68
 * David McKnight   (IBM)        - [257721] Doubleclick doing special handling and expanding
68
 ********************************************************************************/
69
 ********************************************************************************/
69
70
70
package org.eclipse.rse.internal.ui.view;
71
package org.eclipse.rse.internal.ui.view;
Lines 390-395 Link Here
390
	protected ViewerFilter[] initViewerFilters = null;
391
	protected ViewerFilter[] initViewerFilters = null;
391
392
392
	protected List _setList;
393
	protected List _setList;
394
	
395
	protected boolean _allowAdapterToHandleDoubleClick = true;
393
396
394
	/**
397
	/**
395
	 * Constructor
398
	 * Constructor
Lines 642-648 Link Here
642
		TreePath[] paths = s.getPathsFor(element);
645
		TreePath[] paths = s.getPathsFor(element);
643
		if (paths == null || paths.length == 0 || paths[0] == null) return;
646
		if (paths == null || paths.length == 0 || paths[0] == null) return;
644
		TreePath elementPath = paths[0];
647
		TreePath elementPath = paths[0];
645
		if (isExpandable(elementPath)) {
648
		
649
		// bringing back handling at the adapter level here due to bug 257721
650
		ISystemViewElementAdapter adapter = getViewAdapter(element);
651
		boolean alreadyHandled = false;
652
		if (adapter != null && _allowAdapterToHandleDoubleClick) 
653
			alreadyHandled = adapter.handleDoubleClick(element);	
654
		
655
		if (!alreadyHandled && isExpandable(element)) {
646
			boolean expandedState = getExpandedState(elementPath);
656
			boolean expandedState = getExpandedState(elementPath);
647
			setExpandedState(elementPath, !expandedState);
657
			setExpandedState(elementPath, !expandedState);
648
			// DWD:  fire collapse / expand event
658
			// DWD:  fire collapse / expand event
Lines 6621-6625 Link Here
6621
		}
6631
		}
6622
	}
6632
	}
6623
6633
6624
6634
	public void allowAdapterToHandleDoubleClick(boolean flag)
6635
	{
6636
		_allowAdapterToHandleDoubleClick = flag;
6637
	}
6625
}
6638
}

Return to bug 260331