mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-102916 Java: annotation parameter info should select a current attribute if the caret if between it and a right parenth
This commit is contained in:
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -91,7 +91,8 @@ public class AnnotationParameterInfoHandler implements ParameterInfoHandler<PsiA
|
||||
public void updateParameterInfo(@NotNull final PsiAnnotationParameterList o, final UpdateParameterInfoContext context) {
|
||||
CharSequence chars = context.getEditor().getDocument().getCharsSequence();
|
||||
int offset1 = CharArrayUtil.shiftForward(chars, context.getEditor().getCaretModel().getOffset(), " \t");
|
||||
if (chars.charAt(offset1) == ',') {
|
||||
final char c = chars.charAt(offset1);
|
||||
if (c == ',' || c == ')') {
|
||||
offset1 = CharArrayUtil.shiftBackward(chars, offset1 - 1, " \t");
|
||||
}
|
||||
context.setHighlightedParameter(findAnnotationMethod(context.getFile(), offset1));
|
||||
|
||||
Reference in New Issue
Block a user