Bug 312686 [CommonNavigator] double click on a tree item causes File to open in the editor
Build Identifier: eclipse SDK 3.6.0 M7 Build id: I20100426-0852 When double click on a tree item that is adaptable to IResource class, eclipse launches the editor for the file that was returned by the tree item via the call ((IAdaptable)treeItem).getAdapter(IResource.class) See debug session in the attachment. This is a regression bug. Reproducible: Always Steps to Reproduce: 1. Open a logical model tree that contains some tree items that are adaptable to IResource (such as sub model element). 2. double click on the tree item that is adaptable to IResource class Result: The eclipse's OpenActionProvider launches the editor for the file that was returned by the tree item via the call ((IAdaptable)treeItem).getAdapter(IResource.class)
bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java
/*******************************************************************************
 * Copyright (c) 2005, 2010 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     mark.melvin@onsemi.com - bug 288997 [CommonNavigator] Double-clicking an adapted resource in 
 *        Common Navigator does not open underlying IFile
 *******************************************************************************/
package org.eclipse.ui.internal.navigator.resources.actions;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.mapping.ResourceMapping;