boolean selectionHasElements= !selection.isEmpty();
Object element= selection.getFirstElement();  fPropertyDialogAction.selectionChanged(selection);  MenuManager newMenu= new MenuManager(PackagesMessages.getString("PackageExplorer.new")); menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu); new NewWizardMenu(newMenu, getSite().getWorkbenchWindow(), false);
	public void menuAboutToShow(IMenuManager menu) {		JavaPlugin.createStandardGroups(menu);		IStructuredSelection selection= (IStructuredSelection) fViewer.getSelection();		boolean selectionHasElements= !selection.isEmpty();//		Object element= selection.getFirstElement();		// updateActions(selection);//		addGotoMenu(menu);////		fOpenCUAction.update();//		if (fOpenCUAction.isEnabled())//			menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpenCUAction);//			//		addOpenWithMenu(menu, selection);//		//		addOpenToMenu(menu, selection);//		addRefactoring(menu);//		if (selection.size() == 1) {//			menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new JavaReplaceWithEditionAction());	//			menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new JavaAddElementFromHistory(null, fViewer));	//		}		ContextMenuGroup.add(menu, fStandardGroups, fViewer);				if (fAddBookmarkAction.canOperateOnSelection())			menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, fAddBookmarkAction);							menu.appendToGroup(IContextMenuConstants.GROUP_BUILD, fRefreshAction);		fRefreshAction.selectionChanged(selection);		if (selectionHasElements) {			// update the action to use the right selection since the refresh			// action doesn't listen to selection changes.			menu.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, fPropertyDialogAction);		}		}