Bug 187713 - [dnd] Drag and Drop Filter Displays Error
Summary: [dnd] Drag and Drop Filter Displays Error
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 222953 231971
  Show dependency tree
 
Reported: 2007-05-17 20:11 EDT by Kevin Doyle CLA
Modified: 2011-05-25 07:54 EDT (History)
4 users (show)

See Also:
ddykstal.eclipse: review-


Attachments
solution for getFilterReferenceWithAbsoluteName method to return proper filter reference (2.39 KB, patch)
2007-06-07 12:56 EDT, Rupen Mardirossian CLA
mober.at+eclipse: iplog+
Details | Diff
Removes NPE explained above when attempting to dnd a filter. (2.01 KB, patch)
2007-06-07 16:11 EDT, Rupen Mardirossian CLA
mober.at+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Doyle CLA 2007-05-17 20:11:05 EDT
Drag and Drop a filter just above itself and you will get the error:

File kevin.Local.interface org.eclipse.rse.services.files.IFileService.kevin.kevin:local.files.a not found on host Local

Same thing happens when dragging and dropping the filter to a folder, remote scratchpad, etc.

Log shows:
!ENTRY org.eclipse.rse.ui 4 0 2007-05-17 20:08:08.163
!MESSAGE RSEG1106E: SUB#0:kevin.Local.interface org.eclipse.rse.services.files.IFileService.kevin.kevin:local.files.a

!ENTRY org.eclipse.rse.ui 4 0 2007-05-17 20:08:08.163
!MESSAGE RSEG1106E: SUB#1:Local

-----------Enter bugs above this line-----------
TM 2.0M7 Testing
installation : eclipse-SDK-3.3M7
RSE install  : I20070517-0600
java.runtime : Sun 1.5.0_06-b05
os.name:     : Windows XP 5.1, Service Pack 2
------------------------------------------------
Comment 1 David McKnight CLA 2007-05-30 13:20:12 EDT
There seems to be a problem with the filter naming here such that we're not able to match a filter with the name we have.
Comment 2 Rupen Mardirossian CLA 2007-06-07 11:18:36 EDT
I've tried to implement some code in the getFilterReferenceWithAbsoluteName(String key) method to take the proper string to work with prior to processing.  My solution works, Although an issue arises if the Filter were to have any "." or ":" characters, which is currently being allowed to the user.  Basic idea below

String key = 

kevin.Local.interface org.eclipse.rse.services.files.IFileService.kevin.kevin:local.files.a

and after executing some string methods we have something easier to work with in order to return the proper information, initial code was attempting to get the below information from the string above and is failing:

kevin.kevin:local.files.a

SystemFilterPoolManager : kevin
filterPoolName : kevin:local.files
filterName : a



Comment 3 Rupen Mardirossian CLA 2007-06-07 12:56:54 EDT
Created attachment 70525 [details]
solution for getFilterReferenceWithAbsoluteName method to return proper filter reference

I have come with a workaround with the issue I stated above.  The correct filter reference is now being returned by the getFilterReferenceWithAbsoluteName method.  The filters can be now moved to the scratchpad.  The patch has resolved the defect. 

Although, there is another issue that is present (NPE) that only occurs sometimes when the filter is moved above or below itself.  This NPE is occuring in the  SystemDNDTransferRunnable.java class and I will take a look to see if I can resolve the issue now.

Stack from log:

!ENTRY org.eclipse.core.jobs 4 2 2007-06-07 11:59:55.369
!MESSAGE An internal error occurred during: "Transfer Operation".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.rse.internal.ui.view.SystemDNDTransferRunnable.transferRSEResources(SystemDNDTransferRunnable.java:247)
	at org.eclipse.rse.internal.ui.view.SystemDNDTransferRunnable.runInWorkspace(SystemDNDTransferRunnable.java:575)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 4 Rupen Mardirossian CLA 2007-06-07 12:58:21 EDT
I, Rupen Mardirossian, declare that I developed attached code above from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 5 Rupen Mardirossian CLA 2007-06-07 16:11:15 EDT
Created attachment 70572 [details]
Removes NPE explained above when attempting to dnd a filter.

The problem was occuring when trying to drag to 'DRIVES' filter on the local giving a NPE becuse the target was returning as null.  Path being " ".  Just put in a check to see if the target is null and return false.  This fixed the issue.  

I, Rupen Mardirossian, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 6 David McKnight CLA 2007-06-08 11:34:22 EDT
The second patch looks good.  

The thing I'm worried about with the first patch is that it assumes a naming convention based on the signature of the service interface and this is likely to change.  We're going to have think about this a bit more.
Comment 7 David McKnight CLA 2007-06-12 10:59:01 EDT
I'd like to apply the second patch for RC3 but defer the first issue for later.   Martin, what do you think?
Comment 8 David McKnight CLA 2007-06-13 10:55:56 EDT
Martin is not around.  Dave I want to know whether you think we should apply the second patch for this or not for RC3.
Comment 9 David McKnight CLA 2007-06-13 11:08:24 EDT
Moving this to 2.0.1 for now.
Comment 10 David Dykstal CLA 2007-06-13 11:13:05 EDT
I don't think this is high enough priority to put this patch in so I'm rejecting it. Please move it to 2.0.1.
Comment 11 David McKnight CLA 2007-06-29 10:31:58 EDT
I've applied the second patch.  For the first issue, I'm going to defer until later.
Comment 12 Martin Oberhuber CLA 2008-03-18 10:48:03 EDT
Kevin should we assign a different target milestone for this? What's the current status of this?
Comment 13 Kevin Doyle CLA 2008-03-18 16:14:59 EDT
It's my understanding that nobody has worked on this.  Correct Dave?
Comment 14 David McKnight CLA 2008-03-18 16:55:32 EDT
(In reply to comment #13)
> It's my understanding that nobody has worked on this.  Correct Dave?

No, as far as I know, nobody has worked on this.
Comment 15 Martin Oberhuber CLA 2008-05-13 18:59:40 EDT
Closing this to clean up our IP log.
Remaining issue will be tracked in bug 231971.
Comment 16 Kevin Doyle CLA 2008-05-30 15:53:12 EDT
Verified fixed with 3.0RC2.