IMenuManager target= menu; IMenuManager searchSubMenu= null; if (fEditor != null) { String groupName= SearchMessages.getString("group.search"); searchSubMenu= new MenuManager(groupName, ITextEditorActionConstants.GROUP_FIND); searchSubMenu.add(new GroupMarker(ITextEditorActionConstants.GROUP_FIND)); target= searchSubMenu; }  fReferencesGroup.fillContextMenu(target); fDeclarationsGroup.fillContextMenu(target); fImplementorsGroup.fillContextMenu(target); fReadAccessGroup.fillContextMenu(target); fWriteAccessGroup.fillContextMenu(target);
	public void fillContextMenu(IMenuManager menu) {		super.fillContextMenu(menu);		IMenuManager target= menu;		IMenuManager searchSubMenu= null;		if (fEditor != null) {			String groupName= SearchMessages.getString("group.search"); //$NON-NLS-1$			searchSubMenu= new MenuManager(groupName, ITextEditorActionConstants.GROUP_FIND);			searchSubMenu.add(new GroupMarker(ITextEditorActionConstants.GROUP_FIND));			target= searchSubMenu;		}		fReferencesGroup.fillContextMenu(target);		fDeclarationsGroup.fillContextMenu(target);		fImplementorsGroup.fillContextMenu(target);		fReadAccessGroup.fillContextMenu(target);		fWriteAccessGroup.fillContextMenu(target);				if (searchSubMenu != null) {			searchSubMenu.add(new Separator());			addAction(target, fOccurrencesInFileAction);		} else {			addAction(target, IContextMenuConstants.GROUP_SEARCH, fOccurrencesInFileAction);		}				// no other way to find out if we have added items.		if (searchSubMenu != null && searchSubMenu.getItems().length > 2) {					menu.appendToGroup(ITextEditorActionConstants.GROUP_FIND, searchSubMenu);		}	}	