use of com.jetbrains.python.psi.impl.stubs.CustomTargetExpressionStub in project intellij-community by JetBrains.
the class PyTargetExpressionImpl method getCalleeName.
@Override
public QualifiedName getCalleeName() {
final PyTargetExpressionStub stub = getStub();
if (stub != null) {
final PyTargetExpressionStub.InitializerType initializerType = stub.getInitializerType();
if (initializerType == PyTargetExpressionStub.InitializerType.CallExpression) {
return stub.getInitializer();
} else if (initializerType == PyTargetExpressionStub.InitializerType.Custom) {
final CustomTargetExpressionStub customStub = stub.getCustomStub(CustomTargetExpressionStub.class);
if (customStub != null) {
return customStub.getCalleeName();
}
}
return null;
}
final PyExpression value = findAssignedValue();
if (value instanceof PyCallExpression) {
final PyExpression callee = ((PyCallExpression) value).getCallee();
return PyPsiUtils.asQualifiedName(callee);
}
return null;
}
Aggregations