mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-167834 Prioritize down classes from "exclude imports" in the "Go to class" list
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.navigation
|
||||
|
||||
import com.intellij.codeInsight.JavaProjectCodeInsightSettings
|
||||
import com.intellij.ide.actions.GotoFileItemProvider
|
||||
import com.intellij.ide.util.gotoByName.*
|
||||
import com.intellij.lang.java.JavaLanguage
|
||||
@@ -352,6 +353,17 @@ class Intf {
|
||||
assert file in elements
|
||||
}
|
||||
|
||||
void "test classes sorted by qualified name dispreferring excluded from import and completion"() {
|
||||
def foo = myFixture.addClass('package foo; class List {}')
|
||||
def bar = myFixture.addClass('package bar; class List {}')
|
||||
|
||||
def popup = createPopup(new GotoClassModel2(project), myFixture.addClass('class Context {}'))
|
||||
assert calcPopupElements(popup, "List", false) == [bar, foo]
|
||||
|
||||
JavaProjectCodeInsightSettings.setExcludedNames(project, testRootDisposable, 'bar')
|
||||
assert calcPopupElements(popup, "List", false) == [foo, bar]
|
||||
}
|
||||
|
||||
private List<Object> getPopupElements(ChooseByNameModel model, String text, boolean checkboxState = false) {
|
||||
return calcPopupElements(createPopup(model), text, checkboxState)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user