Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326910

Summary: Remote System view looses selection when creating a new project
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: Martin Oberhuber <mober.at+eclipse>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3    
Version: 3.2.1   
Target Milestone: 3.3 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 326913, 326922    
Attachments:
Description Flags
Patch fixing the issue none

Description Martin Oberhuber CLA 2010-10-04 08:26:49 EDT
CQ:WIND00235145 

Build ID: TM 3.2.1 on Eclipse 3.6.1

The Remote Systems view looses the selection, when a new-wizard is used to create a new file or project. This is annoying since RSE offers context sensitive actions, like Refresh which requires the user to select the resource twice.

To reproduce:
- Start Ecilpse open the resource perspective
- Open the Remote Systems view
- Select any file in the "Local Files" subsystem
- Create a simple Eclipse Project (File > New Project; General > Project)
- Click Finish

-> The RSE selection is gone
Comment 1 Martin Oberhuber CLA 2010-10-04 08:31:08 EDT
Created attachment 180153 [details]
Patch fixing the issue

When a new-wizard is finished creating an item, it uses the ISetSelectionTarget interface to reveal that item in any views that support it.

Since the RSE View can be filled with any kind of items, it always tries to reveal the new item. The problem is, that in case the new item is not available in the RSE view, selection is set to empty.

Attached patch fixes this by preserving the current selection, and restoring it in case the selectAndReveal() results in making the selection empty.
Comment 2 Martin Oberhuber CLA 2010-10-04 08:51:17 EDT
Committed to 3.3 / HEAD.