mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-173501 Parameter hints glue together after comma deletion
This commit is contained in:
+2
-1
@@ -140,7 +140,8 @@ public class MethodParameterInfoHandler implements ParameterInfoHandlerWithTabAc
|
||||
int currentNumberOfParameters = expressionList.getExpressions().length;
|
||||
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(context.getProject());
|
||||
Document document = psiDocumentManager.getCachedDocument(context.getFile());
|
||||
if (context.getHighlightedParameter() != null && document != null && psiDocumentManager.isCommitted(document) &&
|
||||
if ((context.getHighlightedParameter() != null || candidates.length == 1) &&
|
||||
document != null && psiDocumentManager.isCommitted(document) &&
|
||||
originalNumberOfParameters != currentNumberOfParameters && !(originalNumberOfParameters == 1 && currentNumberOfParameters == 0)) {
|
||||
List<Inlay> hints = expressionList.getUserData(JavaMethodCallElement.COMPLETION_HINTS);
|
||||
if (hints != null) {
|
||||
|
||||
+9
@@ -225,6 +225,15 @@ public class CompletionHintsTest extends LightFixtureCompletionTestCase {
|
||||
myFixture.checkResultWithInlays("class C { void m() { System.getProperty( ) } }");
|
||||
}
|
||||
|
||||
public void testHintsDisappearWhenNumberOfParametersIsChangedDirectlyWithNoOverloads() throws Exception {
|
||||
myFixture.configureByText(JavaFileType.INSTANCE, "class C { void m() { Character.for<caret> } }");
|
||||
complete("forDigit");
|
||||
myFixture.checkResultWithInlays("class C { void m() { Character.forDigit(<hint text=\"digit:\"/>, <hint text=\"radix:\"/>) } }");
|
||||
myFixture.performEditorAction(IdeActions.ACTION_EDITOR_DELETE);
|
||||
waitForAllAsyncStuff();
|
||||
myFixture.checkResultWithInlays("class C { void m() { Character.forDigit( ) } }");
|
||||
}
|
||||
|
||||
public void testCaretIsToTheRightOfHintAfterSmartInnerCompletion() throws Exception {
|
||||
myFixture.configureByText(JavaFileType.INSTANCE, "class C { void m() { System.setPro<caret> } }");
|
||||
complete("setProperty");
|
||||
|
||||
Reference in New Issue
Block a user