mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
typing 'new File(' shouldn't insert some File* imported class when java.io.File is not imported yet
This commit is contained in:
@@ -102,7 +102,7 @@ public class JavaCharFilter extends CharFilter {
|
||||
}
|
||||
if (c == '.' && isWithinLiteral(lookup)) return Result.ADD_TO_PREFIX;
|
||||
|
||||
if ((c == '[' || c == '<' || c == '.' || c == ' ') && isNonImportedClassEntered((LookupImpl)lookup)) {
|
||||
if ((c == '[' || c == '<' || c == '.' || c == ' ' || c == '(') && isNonImportedClassEntered((LookupImpl)lookup)) {
|
||||
return Result.HIDE_LOOKUP;
|
||||
}
|
||||
|
||||
|
||||
@@ -1100,6 +1100,10 @@ public class UTest {
|
||||
edt { myFixture.performEditorAction IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN }
|
||||
type ' '
|
||||
assert myFixture.file.text.contains('Foo239Util2 ')
|
||||
|
||||
myFixture.configureByText "a.java", "class Foo {{ <caret> }}"
|
||||
type 'new Foo239('
|
||||
assert myFixture.file.text.contains('new Foo239()')
|
||||
}
|
||||
|
||||
public void testTypingFirstVarargDot() {
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class GroovyReferenceCharFilter extends CharFilter {
|
||||
return Result.ADD_TO_PREFIX;
|
||||
}
|
||||
|
||||
if ((c == '[' || c == '<' || c == '.' || c == ' ') && JavaCharFilter.isNonImportedClassEntered((LookupImpl)lookup)) {
|
||||
if ((c == '[' || c == '<' || c == '.' || c == ' ' || c == '(') && JavaCharFilter.isNonImportedClassEntered((LookupImpl)lookup)) {
|
||||
return Result.HIDE_LOOKUP;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user