Bug 139511 [CommonNavigator] getParent() fails in certain cases
In the implementation of getParents(), clients can sometimes fail to return the correct parent with the override cases taken into account. The attached patch fixes these issues, but should be reviewed by the Team Team to ensure that it does not cause any regressions for their cases.
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java
ITreePathContentProvider tpcp = (ITreePathContentProvider) aContentProvider;
			TreePath[] paths = tpcp.getParents(anElement);
			for (int i = 0; i < paths.length; i++) {
				TreePath path = paths[i];
				result.add(path.createChildPath(anElement));
			}
		} else {
			
			result.add(TreePath.EMPTY.createChildPath(anElement));
		}
		return result;
	}
	/**
	 * Get the element from an element or tree path argument.
	 * @param parentElementOrPath the element or tree path
	 * @return the element
	 */
	private Object internalAsElement(Object parentElementOrPath) {
		if (parentElementOrPath instanceof TreePath) {
			TreePath tp = (TreePath) parentElementOrPath;
			if (tp.getSegmentCount() > 0) {
				return tp.getLastSegment();
			}
			
			return viewer.getInput();
		}
		return parentElementOrPath;
	}
}