IDEA-74635, IDEA-74639 Groovy Parameter Info is not updated after changes of PSI or caret position

This commit is contained in:
Maxim Medvedev
2011-10-04 22:06:47 +04:00
parent c80f548831
commit 01d8597863
@@ -169,6 +169,12 @@ public class GroovyParameterInfoHandler implements ParameterInfoHandlerWithTabAc
}
public void updateParameterInfo(@NotNull GroovyPsiElement place, UpdateParameterInfoContext context) {
final PsiElement parameterOwner = context.getParameterOwner();
if (parameterOwner != place) {
context.removeHint();
return;
}
int offset = context.getEditor().getCaretModel().getOffset();
offset = CharArrayUtil.shiftForward(context.getEditor().getDocument().getText(), offset, " \t\n");
final int currIndex = getCurrentParameterIndex(place, offset);