mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-67267 Go To File should show exact extension patterns matches first
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ public class JavadocCompletionTest extends LightFixtureCompletionTestCase {
|
||||
|
||||
public void testNamesInMethod1() throws Exception {
|
||||
configureByFile("MethodTagName1.java");
|
||||
assertStringItems("see", "serialData", "since", "class", "throws");
|
||||
assertStringItems("see", "serialData", "since", "throws", "class");
|
||||
}
|
||||
|
||||
public void testParamValueCompletion() throws Exception {
|
||||
|
||||
@@ -3,6 +3,7 @@ import com.intellij.ide.util.gotoByName.ChooseByNameBase
|
||||
import com.intellij.ide.util.gotoByName.ChooseByNameModel
|
||||
import com.intellij.ide.util.gotoByName.ChooseByNamePopup
|
||||
import com.intellij.ide.util.gotoByName.GotoClassModel2
|
||||
import com.intellij.ide.util.gotoByName.GotoFileModel
|
||||
import com.intellij.ide.util.gotoByName.GotoSymbolModel2
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.application.ModalityState
|
||||
@@ -76,6 +77,13 @@ class Intf {
|
||||
assert elements == [intf.findMethodsByName('xxx2', false), ChooseByNameBase.NON_PREFIX_SEPARATOR, intf.findMethodsByName('_xxx1', false)]
|
||||
}
|
||||
|
||||
public void "test prefer exact extension matches"() {
|
||||
def m = myFixture.addFileToProject("relaunch.m", "")
|
||||
def mod = myFixture.addFileToProject("reference.mod", "")
|
||||
def elements = getPopupElements(new GotoFileModel(project), "re*.m")
|
||||
assert elements == [m, mod]
|
||||
}
|
||||
|
||||
private List<Object> getPopupElements(ChooseByNameModel model, String text) {
|
||||
return getPopupElements(createPopup(model), text)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user