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:
parent
c7aa79d9f8
commit
2211c9a1e1
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue