mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-86810 Find Usages not finding usages when I do it on decompiled stub source
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
import javax.swing.JLabel;
|
||||
|
||||
public class Usage {
|
||||
JLabel s;
|
||||
}
|
||||
@@ -89,6 +89,12 @@ public class FindUsagesTest extends PsiTestCase{
|
||||
assertEquals(1, ReferencesSearch.search(method).findAll().size());
|
||||
}
|
||||
|
||||
public void testLibraryClassUsageFromDecompiledSource() {
|
||||
PsiElement decompiled =
|
||||
((PsiCompiledElement)myJavaFacade.findClass("javax.swing.JLabel", GlobalSearchScope.allScope(myProject))).getMirror();
|
||||
assertEquals(2, ReferencesSearch.search(decompiled).findAll().size());
|
||||
}
|
||||
|
||||
public void testImplicitConstructorUsage() throws Throwable {
|
||||
PsiMethod[] ctrs = myJavaFacade.findClass("Foo", GlobalSearchScope.allScope(myProject)).getConstructors();
|
||||
PsiMethod method = ctrs[0];
|
||||
|
||||
Reference in New Issue
Block a user