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
log(e);
			return EMPTY_STRING;
		}
	}
	/**
	 * Get the name of the container. If the marker has the
	 * MarkerViewUtil#PATH_ATTRIBUTE set use that. Otherwise use the path of the
	 * parent resource.
	 * 
	 * @param marker
	 * @return String
	 */
	public static String getContainerName(IMarker marker) {
		try {
			Object pathAttribute = marker
					.getAttribute(MarkerViewUtil.PATH_ATTRIBUTE);
			if (pathAttribute != null)
				return pathAttribute.toString();
		} catch (CoreException exception) {
			
			log(exception);
		}
		IPath path = marker.getResource().getFullPath();
		int n = path.segmentCount() - 1; 
		
		if (n <= 0)
			return Util.EMPTY_STRING;
		int len = 0;
		for (int i = 0; i < n; ++i)
			len += path.segment(i).length();