Fix preventing showing any methods in "Goto Symbols" by kotlin plugin
This commit is contained in:
@@ -411,7 +411,7 @@ public class JetShortNamesCache extends PsiShortNamesCache {
|
|||||||
@NotNull GlobalSearchScope scope,
|
@NotNull GlobalSearchScope scope,
|
||||||
@NotNull Processor<PsiMethod> processor
|
@NotNull Processor<PsiMethod> processor
|
||||||
) {
|
) {
|
||||||
return false;
|
return ContainerUtil.process(getMethodsByName(name, scope), processor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
fun test() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// SEARCH_TEXT: flushBuffer
|
||||||
|
// CHECK_BOX
|
||||||
|
// REF: (in java.io.BufferedOutputStream).flushBuffer()
|
||||||
|
// REF: (in java.io.BufferedWriter).flushBuffer()
|
||||||
|
// REF: (in java.io.OutputStreamWriter).flushBuffer()
|
||||||
@@ -30,6 +30,10 @@ public class JetGotoSymbolTest extends JetLightCodeInsightFixtureTestCase {
|
|||||||
doTest();
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testJavaMethods() {
|
||||||
|
doTest();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTestDataPath() {
|
protected String getTestDataPath() {
|
||||||
return new File(PluginTestCaseBase.getTestDataPathBase(), "/navigation/gotoSymbol").getPath() + File.separator;
|
return new File(PluginTestCaseBase.getTestDataPathBase(), "/navigation/gotoSymbol").getPath() + File.separator;
|
||||||
|
|||||||
@@ -77,16 +77,17 @@ public final class NavigationTestUtils {
|
|||||||
searchTextList.isEmpty());
|
searchTextList.isEmpty());
|
||||||
|
|
||||||
List<String> expectedReferences = InTextDirectivesUtils.findListWithPrefixes(editor.getDocument().getText(), "// REF:");
|
List<String> expectedReferences = InTextDirectivesUtils.findListWithPrefixes(editor.getDocument().getText(), "// REF:");
|
||||||
|
boolean enableCheckbox = InTextDirectivesUtils.isDirectiveDefined(editor.getDocument().getText(), "// CHECK_BOX");
|
||||||
|
|
||||||
String searchText = searchTextList.get(0);
|
String searchText = searchTextList.get(0);
|
||||||
|
|
||||||
List<Object> elementsByName = new ArrayList<Object>();
|
List<Object> elementsByName = new ArrayList<Object>();
|
||||||
|
|
||||||
GotoSymbolModel2 model = new GotoSymbolModel2(project);
|
GotoSymbolModel2 model = new GotoSymbolModel2(project);
|
||||||
String[] names = model.getNames(false);
|
String[] names = model.getNames(enableCheckbox);
|
||||||
for (String name : names) {
|
for (String name : names) {
|
||||||
if (name != null && name.startsWith(searchText)) {
|
if (name != null && name.startsWith(searchText)) {
|
||||||
elementsByName.addAll(Arrays.asList(model.getElementsByName(name, false, name + "*")));
|
elementsByName.addAll(Arrays.asList(model.getElementsByName(name, enableCheckbox, name + "*")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user