Bug 31215 close project enabled on a closed project
20030206 create a non-java project in package explorer close it from the context menu open the context menu again - both 'open project' and 'close project' actions are enabled
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ProjectActionGroup.java
private IWorkbenchSite fSite;
	private OpenResourceAction fOpenAction;
	private CloseResourceAction fCloseAction;
	/**
	 * Creates a new <code>ProjectActionGroup</code>. The group requires
	 * that the selection provided by the site's selection provider is of type <code>
	 * org.eclipse.jface.viewers.IStructuredSelection</code>.
	 * 
	 * @param part the view part that owns this action group
	 */
	public ProjectActionGroup(IViewPart part) {
		fSite = part.getSite();
		Shell shell= fSite.getShell();
		ISelectionProvider provider= fSite.getSelectionProvider();
		ISelection selection= provider.getSelection();
		
		fOpenAction= new OpenResourceAction(shell);
		fCloseAction= new CloseResourceAction(shell);
		if (selection instanceof IStructuredSelection) {
			IStructuredSelection s= (IStructuredSelection)selection;
			fOpenAction.selectionChanged(s);
			fCloseAction.selectionChanged(s);
		}
		provider.addSelectionChangedListener(fOpenAction);
		provider.addSelectionChangedListener(fCloseAction);
		ResourcesPlugin.getWorkspace().addResourceChangeListener(fOpenAction);
	}
	
	/* (non-Javadoc)
	 * Method declared in ActionGroup