mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[248339] [dnd][encodings] Cannot drag&drop / copy&paste files or folders with turkish or arabic names
This commit is contained in:
parent
2fcf4227a4
commit
a76d32a3c1
2 changed files with 23 additions and 3 deletions
|
@ -17,10 +17,12 @@
|
|||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||
* David Dykstal (IBM) - [142065] fix drag and drop on Mac OS X
|
||||
* 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
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
|
@ -228,7 +230,15 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter
|
|||
}
|
||||
}
|
||||
|
||||
PluginTransferData data = new PluginTransferData("org.eclipse.rse.ui.view.DropActions", dataStream.toString().getBytes()); //$NON-NLS-1$
|
||||
byte[] bytes = null;
|
||||
try {
|
||||
bytes = dataStream.toString().getBytes("UTF-8"); //$NON-NLS-1$
|
||||
}
|
||||
catch (UnsupportedEncodingException e){
|
||||
bytes = dataStream.toString().getBytes();
|
||||
}
|
||||
|
||||
PluginTransferData data = new PluginTransferData("org.eclipse.rse.ui.view.DropActions", bytes); //$NON-NLS-1$
|
||||
event.data = data;
|
||||
if (dataStream.length() > 0)
|
||||
{
|
||||
|
|
|
@ -16,10 +16,12 @@
|
|||
* David McKnight (IBM) - [192704] work around drag&drop issues from Project Explorer
|
||||
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||
* David McKnight (IBM) - [234924] [ftp][dnd][Refresh] Copy/Paste file from Package Explorer doesn't refresh folder
|
||||
* David McKnight (IBM) - [248339] [dnd][encodings] Cannot drag&drop / copy&paste files or folders with turkish or arabic names
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -133,8 +135,16 @@ extends ViewerDropAdapter
|
|||
byte[] result = transferData.getData();
|
||||
|
||||
// get the sources
|
||||
//StringTokenizer tokenizer = new StringTokenizer(new String(result), RESOURCE_SEPARATOR);
|
||||
String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); //$NON-NLS-1$
|
||||
String str = null;
|
||||
try {
|
||||
str = new String(result, "UTF-8"); //$NON-NLS-1$
|
||||
}
|
||||
catch (UnsupportedEncodingException e)
|
||||
{
|
||||
str = new String(result);
|
||||
}
|
||||
|
||||
String[] tokens = str.split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); //$NON-NLS-1$
|
||||
|
||||
|
||||
ArrayList srcObjects = new ArrayList();
|
||||
|
|
Loading…
Add table
Reference in a new issue