mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed EA-48905 - SIOOBE: ParameterInfoComponent$OneLineComponent.buildLabelText
This commit is contained in:
@@ -150,7 +150,7 @@ public class PyParameterInfoHandler implements ParameterInfoHandler<PyArgumentLi
|
||||
EnumSet[] flags = new EnumSet[hintFlags.size()];
|
||||
for (int i = 0; i < flags.length; i += 1) flags[i] = hintFlags.get(i);
|
||||
if (hints.length < 1) {
|
||||
hints = new String[]{XmlStringUtil.escapeString(NO_PARAMS_MSG)};
|
||||
hints = new String[]{NO_PARAMS_MSG};
|
||||
flags = new EnumSet[]{EnumSet.of(ParameterInfoUIContextEx.Flag.DISABLE)};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
def function(param, param1):
|
||||
pass
|
||||
|
||||
|
||||
def result():
|
||||
pass
|
||||
|
||||
|
||||
function(result<arg1>(), result())
|
||||
@@ -385,6 +385,11 @@ public class PyParameterInfoTest extends LightMarkedTestCase {
|
||||
feignCtrlP(marks.get("<arg1>").getTextOffset()).check("a, b, c", new String[]{"a, "});
|
||||
}
|
||||
|
||||
public void testNoArgsException() {
|
||||
Map<String, PsiElement> marks = loadTest(1);
|
||||
feignCtrlP(marks.get("<arg1>").getTextOffset()).check("<no parameters>", new String[0], new String[]{"<no parameters>"});
|
||||
}
|
||||
|
||||
/**
|
||||
* Imitates pressing of Ctrl+P; fails if results are not as expected.
|
||||
* @param offset offset of 'cursor' where ^P is pressed.
|
||||
|
||||
Reference in New Issue
Block a user