mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix Tab not working to move between completion parameters for a call inside another call
This commit is contained in:
@@ -327,7 +327,7 @@ public class JavaMethodCallElement extends LookupItem<PsiMethod> implements Type
|
||||
|
||||
PsiDocumentManager.getInstance(project).commitDocument(document);
|
||||
MethodParameterInfoHandler handler = new MethodParameterInfoHandler();
|
||||
ShowParameterInfoContext infoContext = new ShowParameterInfoContext(editor, project, context.getFile(), braceOffset, braceOffset);
|
||||
ShowParameterInfoContext infoContext = new ShowParameterInfoContext(editor, project, context.getFile(), offset, braceOffset);
|
||||
if (!methodCall.isValid() || handler.findElementForParameterInfo(infoContext) == null) {
|
||||
document.deleteString(offset, offset + commas.length());
|
||||
return;
|
||||
|
||||
+16
-1
@@ -1383,7 +1383,22 @@ public class CompletionHintsTest extends AbstractParameterInfoTestCase {
|
||||
public void testHintsAreNotShownInImproperContext() {
|
||||
configureJava("class C { void m() { int a = Math.ma<caret>5; } }");
|
||||
complete("max(int a, int b)");
|
||||
checkResult("class C { void m() { int a = Math.max(<caret>)5; } }");
|
||||
checkResultWithInlays("class C { void m() { int a = Math.max(<caret>)5; } }");
|
||||
}
|
||||
|
||||
public void testConstructorInvocationInsideMethodInvocation() throws Exception {
|
||||
enableVirtualComma();
|
||||
|
||||
configureJava("class C { void m() { System.getPro<caret> } }");
|
||||
complete("getProperty(String key)");
|
||||
checkResultWithInlays("class C { void m() { System.getProperty(<caret>) } }");
|
||||
type("new Strin");
|
||||
complete("String(byte[] bytes, String charsetName)");
|
||||
checkResultWithInlays("class C { void m() { System.getProperty(new String(<HINT text=\"bytes:\"/><caret><Hint text=\",charsetName:\"/>)) } }");
|
||||
type("null");
|
||||
next();
|
||||
waitForAllAsyncStuff();
|
||||
checkResultWithInlays("class C { void m() { System.getProperty(new String(<Hint text=\"bytes:\"/>null, <HINT text=\"charsetName:\"/><caret>)) } }");
|
||||
}
|
||||
|
||||
private void checkResultWithInlays(String text) {
|
||||
|
||||
Reference in New Issue
Block a user