Bug 91409 Project Open/Close items are disabled when Package Explorer active
Project Open/Close option in the Project menu is disabled in Plugin prespective.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/OpenCloseWorkingSetAction.java
setEnabled(projects != null && projects.size() > 0);
	}
	
	public void run(IStructuredSelection selection) {
		final List projects= getProjects(selection);
		if (projects == null)
			return;
		try {
			PlatformUI.getWorkbench().getProgressService().busyCursorWhile(
				new WorkbenchRunnableAdapter(new IWorkspaceRunnable() {
					public void run(IProgressMonitor monitor) throws CoreException {
						monitor.beginTask("", projects.size()); 
						for (Iterator iter= projects.iterator(); iter.hasNext();) {
							IProject project= (IProject)iter.next();
							performOperation(project, new SubProgressMonitor(monitor, 1));
						}
						monitor.done();
					}
				}));
		} catch (InvocationTargetException e) {
			ExceptionHandler.handle(e, getShell(), getErrorTitle(), getErrorMessage());
		} catch (InterruptedException e) {
			
		}
	}
	
	protected abstract boolean validate(IProject project);
	
	protected abstract void performOperation(IProject project, IProgressMonitor monitor) throws CoreException;