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

Fix CN drop of translation unit

This commit is contained in:
Anton Leherbauer 2006-11-13 13:00:37 +00:00
parent c7aa79d9f8
commit 2211c9a1e1

View file

@ -210,6 +210,9 @@ public class CNavigatorDropAdapterAssistant extends CommonDropAdapterAssistant {
ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
ICElement[] cElements= getCElements(selection);
if (cElements == null || cElements.length == 0) {
return Status.CANCEL_STATUS;
}
if (!canCopyElements(cElements))
return Status.CANCEL_STATUS;
@ -226,7 +229,10 @@ public class CNavigatorDropAdapterAssistant extends CommonDropAdapterAssistant {
ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
ICElement[] cElements= getCElements(selection);
if (cElements == null || cElements.length == 0) {
return Status.CANCEL_STATUS;
}
if (Arrays.asList(cElements).contains(target)) {
return Status.CANCEL_STATUS;
}