mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Only allowed Bookmark on an IFile
This commit is contained in:
parent
68a6a349df
commit
01d01ec5fc
1 changed files with 6 additions and 2 deletions
|
@ -818,9 +818,13 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
|||
}
|
||||
|
||||
void addBookMarkMenu (IMenuManager menu, IStructuredSelection selection) {
|
||||
//if (resource instanceof IFile) {
|
||||
IAdaptable element = (IAdaptable)selection.getFirstElement();
|
||||
IResource resource = (IResource)element.getAdapter(IResource.class);
|
||||
if (resource == null)
|
||||
return;
|
||||
if (resource instanceof IFile) {
|
||||
menu.add(addBookmarkAction);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
void addPropertyMenu (IMenuManager menu, IStructuredSelection selection) {
|
||||
|
|
Loading…
Add table
Reference in a new issue