private void setActionEnablement(StructuredSelection ss) {
		if (ss == null) {
			return;
		}
		Map<String, Object> config = new HashMap<String, Object>();
		Object sel = ss.getFirstElement();
		if (sel instanceof String || sel instanceof AliasTask) {
			String task = "";
			if (sel instanceof String) {
				task = (String) sel;
			} else {
				task = ((AliasTask) sel).task;
			}
			IFile gruntFile = contentProvider.getFileForTask((String) task);
			config.put(Activator.KEY_TASK, task);
			config.put(Activator.KEY_FILE, gruntFile);
			config.put(Activator.KEY_PAGE, getSite().getWorkbenchWindow().getActivePage());
			startGruntTaskAction.setEnabled(!Activator.getDefault().isTaskRunning(task));
			startGruntTaskAction.configureAction(config);
			stopGruntTaskAction.setEnabled(Activator.getDefault().isTaskRunning(task));
			stopGruntTaskAction.configureAction(config);
			restartGruntTaskAction.setEnabled(Activator.getDefault().isTaskRunning(task));
			restartGruntTaskAction.configureAction(config);
		} 
		else {
			startGruntTaskAction.setEnabled(false);
			startGruntTaskAction.configureAction(null);
			stopGruntTaskAction.setEnabled(false);
			stopGruntTaskAction.configureAction(null);
			restartGruntTaskAction.setEnabled(false);
			restartGruntTaskAction.configureAction(null);
		}
	}