diff options
Diffstat (limited to 'bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/search/IndexSelector.java')
-rw-r--r-- | bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/search/IndexSelector.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/search/IndexSelector.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/search/IndexSelector.java index d7b673b5..ce754a44 100644 --- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/search/IndexSelector.java +++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/search/IndexSelector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2013 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 @@ -214,7 +214,7 @@ public IPath[] getIndexLocations() { * Returns null if the path doesn't correspond to a project. */ private static IJavaScriptProject getJavaProject(IPath path, IJavaScriptModel model) { - IJavaScriptProject project = model.getJavaScriptProject(path.lastSegment()); + IJavaScriptProject project = model.getJavaScriptProject(path.segment(0)); // First path segment could be a project name if (project.exists()) { return project; } |