mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-25908 (Add Find Usages for imports)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import<caret> java.util.List;
|
||||
|
||||
class HighlightImport<T extends List> {
|
||||
|
||||
void f(List l) {
|
||||
List m;
|
||||
java.util.List n;
|
||||
}
|
||||
|
||||
List<List> g() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<caret>import static java.lang.Math.*;
|
||||
|
||||
class HighlightStaticImport {
|
||||
|
||||
void g() {
|
||||
abs(-1.0);
|
||||
abs(1L);
|
||||
pow(1.0, 2.0);
|
||||
}
|
||||
}
|
||||
+14
@@ -15,6 +15,20 @@ public class HighlightUsagesHandlerTest extends LightCodeInsightFixtureTestCase
|
||||
HighlightUsagesHandler.invoke(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile());
|
||||
}
|
||||
|
||||
public void testHighlightImport() throws Exception {
|
||||
configureFile();
|
||||
ctrlShiftF7();
|
||||
assertRangeText("import", "List", "List", "List", "List", "List");
|
||||
checkUnselect();
|
||||
}
|
||||
|
||||
public void testHighlightStaticImport() throws Exception {
|
||||
configureFile();
|
||||
ctrlShiftF7();
|
||||
assertRangeText("import", "abs", "abs", "pow");
|
||||
checkUnselect();
|
||||
}
|
||||
|
||||
public void testSimpleThrows() throws Exception {
|
||||
configureFile();
|
||||
ctrlShiftF7();
|
||||
|
||||
Reference in New Issue
Block a user