mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix 179379, New submenu not available from the CView context menu when nothing is selected.
This commit is contained in:
parent
0566261b28
commit
bc1789f41e
1 changed files with 2 additions and 2 deletions
|
@ -174,6 +174,8 @@ public class MainActionGroup extends CViewActionGroup {
|
||||||
IStructuredSelection celements = (IStructuredSelection) getCView().getViewer().getSelection();
|
IStructuredSelection celements = (IStructuredSelection) getCView().getViewer().getSelection();
|
||||||
IStructuredSelection resources = SelectionConverter.convertSelectionToResources(celements);
|
IStructuredSelection resources = SelectionConverter.convertSelectionToResources(celements);
|
||||||
|
|
||||||
|
addNewMenu(menu, resources);
|
||||||
|
|
||||||
if (resources.isEmpty()) {
|
if (resources.isEmpty()) {
|
||||||
menu.add(new Separator(IContextMenuConstants.GROUP_GOTO));
|
menu.add(new Separator(IContextMenuConstants.GROUP_GOTO));
|
||||||
menu.add(new Separator(IContextMenuConstants.GROUP_OPEN));
|
menu.add(new Separator(IContextMenuConstants.GROUP_OPEN));
|
||||||
|
@ -204,8 +206,6 @@ public class MainActionGroup extends CViewActionGroup {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
addNewMenu(menu, resources);
|
|
||||||
|
|
||||||
menu.add(new Separator(IContextMenuConstants.GROUP_GOTO));
|
menu.add(new Separator(IContextMenuConstants.GROUP_GOTO));
|
||||||
gotoGroup.fillContextMenu(menu);
|
gotoGroup.fillContextMenu(menu);
|
||||||
menu.add(new Separator(IContextMenuConstants.GROUP_OPEN));
|
menu.add(new Separator(IContextMenuConstants.GROUP_OPEN));
|
||||||
|
|
Loading…
Add table
Reference in a new issue