mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagostics for EA-24292 - CCE: PyElementGeneratorImpl.createCallExpression
This commit is contained in:
@@ -198,7 +198,11 @@ public class PyElementGeneratorImpl extends PyElementGenerator {
|
||||
|
||||
public PyCallExpression createCallExpression(String functionName) {
|
||||
final PsiFile dummyFile = createDummyFile(LanguageLevel.getDefault(), functionName + "()");
|
||||
return (PyCallExpression)dummyFile.getFirstChild().getFirstChild();
|
||||
final PsiElement element = dummyFile.getFirstChild().getFirstChild();
|
||||
if (!(element instanceof PyCallExpression)) {
|
||||
throw new IllegalArgumentException("Invalid call expression text " + functionName);
|
||||
}
|
||||
return (PyCallExpression)element;
|
||||
}
|
||||
|
||||
public PyImportStatement createImportStatementFromText(final String text) {
|
||||
|
||||
Reference in New Issue
Block a user