mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
copy reference: fix isReferenceTo check (IDEA-152601)
This commit is contained in:
@@ -38,6 +38,15 @@ public class CopyReferenceActionTest extends LightCodeInsightFixtureTestCase {
|
||||
public void testIdentifierSeparator() throws Exception { doTest(); }
|
||||
public void testMethodFromAnonymousClass() throws Exception { doTest(); }
|
||||
|
||||
public void testSameClassNames() throws Exception {
|
||||
myFixture.addClass("package p; public class Foo {}")
|
||||
myFixture.configureByText("Foo.java", "package p1; public class Fo<caret>o {}")
|
||||
performCopy()
|
||||
myFixture.configureByText("a.java", "import p.Foo; class Bar { <caret>}")
|
||||
performPaste()
|
||||
myFixture.checkResult """import p.Foo; class Bar {p1.Foo}"""
|
||||
}
|
||||
|
||||
public void testAddImport() {
|
||||
myFixture.addClass("package foo; public class Foo {}")
|
||||
myFixture.configureByText "a.java", "import foo.F<caret>oo;"
|
||||
|
||||
Reference in New Issue
Block a user