mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-179184 Go to file regression -- no longer matches on forward slashes in Windows
This commit is contained in:
@@ -402,8 +402,8 @@ class Intf {
|
||||
}
|
||||
|
||||
void "test prefer exact case match"() {
|
||||
def upper = myFixture.addClass("class SOMECLASS {}")
|
||||
def camel = myFixture.addClass("class SomeClass {}")
|
||||
def upper = myFixture.addClass("package foo; class SOMECLASS {}")
|
||||
def camel = myFixture.addClass("package bar; class SomeClass {}")
|
||||
assert getPopupElements(new GotoClassModel2(project), 'SomeClass') == [camel, upper]
|
||||
assert getPopupElements(new GotoFileModel(project), 'SomeClass.java') == [camel.containingFile, upper.containingFile]
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ProjectFileIndex;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.io.FileUtilRt;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
@@ -116,6 +117,7 @@ public class GotoFileItemProvider extends DefaultChooseByNameItemProvider {
|
||||
for (Object o : myModel.getElementsByName(fileName, everywhere, pattern)) {
|
||||
String fullName = myModel.getFullName(o);
|
||||
if (o instanceof PsiFileSystemItem && fullName != null) {
|
||||
fullName = FileUtilRt.toSystemIndependentName(fullName);
|
||||
FList<TextRange> fragments = fullMatcher.matchingFragments(fullName);
|
||||
if (fragments != null && !fragments.isEmpty()) {
|
||||
group.add((PsiFileSystemItem)o);
|
||||
|
||||
Reference in New Issue
Block a user