mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +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();
|
ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
|
||||||
ICElement[] cElements= getCElements(selection);
|
ICElement[] cElements= getCElements(selection);
|
||||||
|
|
||||||
|
if (cElements == null || cElements.length == 0) {
|
||||||
|
return Status.CANCEL_STATUS;
|
||||||
|
}
|
||||||
if (!canCopyElements(cElements))
|
if (!canCopyElements(cElements))
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
|
|
||||||
|
@ -227,6 +230,9 @@ public class CNavigatorDropAdapterAssistant extends CommonDropAdapterAssistant {
|
||||||
ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
|
ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
|
||||||
ICElement[] cElements= getCElements(selection);
|
ICElement[] cElements= getCElements(selection);
|
||||||
|
|
||||||
|
if (cElements == null || cElements.length == 0) {
|
||||||
|
return Status.CANCEL_STATUS;
|
||||||
|
}
|
||||||
if (Arrays.asList(cElements).contains(target)) {
|
if (Arrays.asList(cElements).contains(target)) {
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue