mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-27091 When finishing method lookup item with '(', put caret after this '(' even if method has no parameters
IDEA-51789 When "Insert pair bracket" on Editor->Smart keys page is off, IDEA still inserts both parentheses on autocomplete lookup, but overtype doesn't work
This commit is contained in:
@@ -308,6 +308,25 @@ public class NormalCompletionTest extends LightCompletionTestCase {
|
||||
checkResultByFile("/codeInsight/completion/normal/MethodWithLeftParTailType2_after.java");
|
||||
}
|
||||
|
||||
public void testMethodWithLeftParTailTypeNoPairBrace() throws Exception {
|
||||
final boolean old = CodeInsightSettings.getInstance().AUTOINSERT_PAIR_BRACKET;
|
||||
CodeInsightSettings.getInstance().AUTOINSERT_PAIR_BRACKET = false;
|
||||
|
||||
try {
|
||||
configureByFile("/codeInsight/completion/normal/" + getTestName(false) + ".java");
|
||||
selectItem(myItems[0], '(');
|
||||
checkResultByFile("/codeInsight/completion/normal/" + getTestName(false) + "_after.java");
|
||||
|
||||
//no tail type should work the normal way
|
||||
configureByFile("/codeInsight/completion/normal/" + getTestName(false) + ".java");
|
||||
selectItem(myItems[0]);
|
||||
checkResultByFile("/codeInsight/completion/normal/" + getTestName(false) + "_after2.java");
|
||||
}
|
||||
finally {
|
||||
CodeInsightSettings.getInstance().AUTOINSERT_PAIR_BRACKET = old;
|
||||
}
|
||||
}
|
||||
|
||||
public void testExcessSpaceInTypeCast() throws Throwable {
|
||||
configureByFile("/codeInsight/completion/normal/" + getTestName(false) + ".java");
|
||||
selectItem(myItems[0]);
|
||||
|
||||
Reference in New Issue
Block a user