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

Bug 328148

Summary: Dropping resource onto Eclipse IFile causes RSEG1003U unexpected exception
Product: [Tools] Target Management Reporter: Kenya Ishimoto <kenya>
Component: RSEAssignee: David McKnight <dmcknigh>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: dmcknigh, jwsnyder
Version: 3.0   
Target Milestone: 3.3 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 328157    
Attachments:
Description Flags
Error log
none
patch to use parent when target is a File none

Description Kenya Ishimoto CLA 2010-10-19 11:40:31 EDT
Build Identifier: 3.2

Drag an RSE resource and drop onto eclipse IFile causes error "RSEG1003U An unexpected exception has occurred". For example, if the drop target is file1.txt in folder1 in project1, the following error message dialog is displayed:

Dialog title: RSEG1003U
Message: An unexpected exception has occurred
Message in Details field: Resource '/project1/folder1/file1.txt' does not exist.

Reproducible: Always

Steps to Reproduce:
1. In Remote Systems view, expand Local system > Local Files and select a file (or select a remote resource. This error seems to occur with remote resource too.)
2. Drag the file and drop onto a file in Eclipse Navigator view
Comment 1 Kenya Ishimoto CLA 2010-10-19 11:44:46 EDT
Created attachment 181196 [details]
Error log

The attached file is errors in .matadata/.log file
Comment 2 Kenya Ishimoto CLA 2010-10-19 11:45:57 EDT
We think, to be consistent with Eclipse, dropping onto a file should be treated as drop onto its parent container. In Navigator view, it works so.
At least the "unexpected exception" error should be prevented.

This problem affects our customized view (z/OS Projects view of Rational Developer for System z) and causes the same error.
When a resource is dropped onto a remote resource, SystemDNDTransferRunnable#runInWorkspace calls transferRSEResources method and we can handle the case in our target adapter.
However, when a resource is dropped onto an Eclipse IResource, SystemDNDTransferRunnable.runInWorkspace calls transferRSEResourcesToEclipseResource, and we cannot prevent the error.
Comment 3 David McKnight CLA 2010-10-19 12:03:25 EDT
Created attachment 181198 [details]
patch to use parent when target is a File
Comment 4 David McKnight CLA 2010-10-19 12:07:21 EDT
This patch should resolve this.  Could you try it out to confirm?
Comment 5 David McKnight CLA 2010-10-19 15:46:56 EDT
I've committed my change to the HEAD stream.  Please let me know if you need a backport to RSE 3.2.2.
Comment 6 Kenya Ishimoto CLA 2010-10-20 02:11:12 EDT
David, I have tried the attached patch in my runtime-workspace, and confirmed that it resolves the problem in both Navigator view and our view (z/OS Projects view). The dropped resource was copied to its parent folder.
Comment 7 John W Snyder CLA 2010-10-20 10:22:02 EDT
Yes, please backport to RSE 3.2.2