View | Details | Raw Unified | Return to bug 158190 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java (-4 / +9 lines)
Lines 9-14 Link Here
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     QNX Software System
10
 *     QNX Software System
11
 *     Sergey Prigogin, Google - https://bugs.eclipse.org/bugs/show_bug.cgi?id=13221
11
 *     Sergey Prigogin, Google - https://bugs.eclipse.org/bugs/show_bug.cgi?id=13221
12
 *     Ed Swartz (Nokia)
12
 *******************************************************************************/
13
 *******************************************************************************/
13
package org.eclipse.cdt.internal.ui.editor;
14
package org.eclipse.cdt.internal.ui.editor;
14
15
Lines 44-49 Link Here
44
import org.eclipse.cdt.core.parser.IScannerInfo;
45
import org.eclipse.cdt.core.parser.IScannerInfo;
45
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
46
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
46
import org.eclipse.cdt.ui.CUIPlugin;
47
import org.eclipse.cdt.ui.CUIPlugin;
48
import org.eclipse.cdt.utils.PathUtil;
47
49
48
import org.eclipse.cdt.internal.ui.CPluginImages;
50
import org.eclipse.cdt.internal.ui.CPluginImages;
49
import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
51
import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
Lines 165-177 Link Here
165
			throws CoreException {
167
			throws CoreException {
166
		// in case it is an absolute path
168
		// in case it is an absolute path
167
		IPath includeFile= new Path(name);		
169
		IPath includeFile= new Path(name);		
168
		if (includeFile.isAbsolute() && includeFile.toFile().exists()) {
170
		if (includeFile.isAbsolute()) {
169
			list.add(includeFile);
171
			includeFile = PathUtil.getCanonicalPath(includeFile);
170
			return;
172
			if (includeFile.toFile().exists()) {
173
				list.add(includeFile);
174
				return;
175
			}
171
		}
176
		}
172
		HashSet foundSet = new HashSet();
177
		HashSet foundSet = new HashSet();
173
		for (int i = 0; i < includePaths.length; i++) {
178
		for (int i = 0; i < includePaths.length; i++) {
174
			IPath path = new Path(includePaths[i]).append(includeFile);
179
			IPath path = PathUtil.getCanonicalPath(new Path(includePaths[i]).append(includeFile));
175
			File file = path.toFile();
180
			File file = path.toFile();
176
			if (file.exists()) {
181
			if (file.exists()) {
177
				IPath[] paths = resolveIncludeLink(path);
182
				IPath[] paths = resolveIncludeLink(path);

Return to bug 158190