1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

[420190] Dragging anything other than a file causes Null Pointer

This commit is contained in:
Dave McKnight 2013-10-24 09:57:22 -04:00
parent 2f54904247
commit 32391805a2

View file

@ -20,6 +20,7 @@
* Kevin Doyle (IBM) - [187536] Drag & Drop file to Editor launchs file in system editor
* David McKnight (IBM) - [248339] [dnd][encodings] Cannot drag&drop / copy&paste files or folders with turkish or arabic names
* David McKnight (IBM) - [407428] [shells] allow dragging of files in shell
* David McKnight (IBM) - [420190] Dragging anything other than a file causes Null Pointer
*******************************************************************************/
package org.eclipse.rse.internal.ui.view;
@ -110,8 +111,13 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter
{
subSystem = adapter.getSubSystem(dragObject);
if (adapter instanceof ISystemRemoteElementAdapter){
ISystemEditableRemoteObject editable = ((ISystemRemoteElementAdapter)adapter).getEditableRemoteObject(dragObject);
subSystem = editable.getSubSystem();
ISystemRemoteElementAdapter rAdapter = (ISystemRemoteElementAdapter)adapter;
if (rAdapter.canEdit(dragObject)){
ISystemEditableRemoteObject editable = ((ISystemRemoteElementAdapter)adapter).getEditableRemoteObject(dragObject);
if (editable != null){
subSystem = editable.getSubSystem();
}
}
}
if (subSystem != null)
{