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/actions/LinkEditorAction.java
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.internal.navigator.CommonNavigatorMessages;
import org.eclipse.ui.internal.navigator.NavigatorContentService;
import org.eclipse.ui.internal.navigator.NavigatorPlugin;
import org.eclipse.ui.internal.navigator.extensions.LinkHelperService;
import org.eclipse.ui.navigator.CommonNavigator;
import org.eclipse.ui.navigator.CommonViewer;
import org.eclipse.ui.navigator.ILinkHelper;
import org.eclipse.ui.navigator.INavigatorContentService;
import org.eclipse.ui.part.ISetSelectionTarget;
import org.eclipse.ui.progress.UIJob;
/**
 * This action links the activate editor with the Navigator selection.
 * 
 * @since 3.2
 */
public class LinkEditorAction extends Action implements
		ISelectionChangedListener, IAction, IPropertyListener {
	private static final long BRIEF_DELAY = 100;
	private IPartListener partListener;
	private final CommonNavigator commonNavigator;
	private final CommonViewer commonViewer;
	private final NavigatorContentService contentService;
	private final LinkHelperService linkService;
	private UIJob activateEditorJob = new UIJob(
			CommonNavigatorMessages.Link_With_Editor_Job_) {
		public IStatus runInUIThread(IProgressMonitor monitor) {
			ISelection selection = commonViewer.getSelection();