Bug 114542 [Markers] Possible to get empty path nodes in problems view hierarcahl mode
20051101 Warnings on the top level of a project ended up having an empty label. STEPS 1) Change filters to show selected elements and children 2) Go into hierarchal mode 3) Select org.eclipse.ui.tests
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/Util.java
* @param marker
	 * @return String
	 */
	public static String getShortContainerName(IMarker marker) {
		try {
			Object pathAttribute = marker
					.getAttribute(MarkerViewUtil.PATH_ATTRIBUTE);
			if (pathAttribute != null)
				return pathAttribute.toString();
		} catch (CoreException exception) {
			
			log(exception);
		}
		return marker.getResource().getProjectRelativePath().removeLastSegments(1).toOSString();
	}
	
	/**
	 * Return whether or not the selection has one element that
	 * is concrete.
	 * @param selection
	 * @return <true>code</true> if the selection has one element that
	 * is concrete.
	 */
	static boolean isSingleConcreteSelection(IStructuredSelection selection) {
		return selection != null && selection.size() == 1
				&& ((MarkerNode) selection.getFirstElement()).isConcrete();
	}
	
}