mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 13:31:28 +07:00
IDEA-72144 Import StringValue class
This commit is contained in:
@@ -396,7 +396,11 @@ public class ImportHelper{
|
||||
}
|
||||
}
|
||||
|
||||
if (useOnDemand && curRefClass != null && "java.lang".equals(StringUtil.getPackageName(curRefClass.getQualifiedName()))) {
|
||||
if (useOnDemand &&
|
||||
curRefClass != null &&
|
||||
refClass.getContainingClass() != null &&
|
||||
mySettings.INSERT_INNER_CLASS_IMPORTS &&
|
||||
"java.lang".equals(StringUtil.getPackageName(curRefClass.getQualifiedName()))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Bar {
|
||||
{
|
||||
StringValu<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import foo.*;
|
||||
|
||||
public class Bar {
|
||||
{
|
||||
StringValue <caret>
|
||||
}
|
||||
}
|
||||
@@ -920,6 +920,12 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
doTest '\n'
|
||||
}
|
||||
|
||||
public void testImportStringValue() throws Throwable {
|
||||
myFixture.addClass("package foo; public class StringValue {}")
|
||||
myFixture.addClass("package java.lang; class StringValue {}")
|
||||
doTest ' '
|
||||
}
|
||||
|
||||
public void testPrimitiveArrayWithRBrace() throws Throwable { doTest '[' }
|
||||
|
||||
public void testSuggestMembersOfStaticallyImportedClasses() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user