static final NullableLazyKey<ExpectedTypeInfo[], CompletionLocation> EXPECTED_TYPES = NullableLazyKey.create("expectedTypes", new NullableFunction<CompletionLocation, ExpectedTypeInfo[]>() {
@Nullable
public ExpectedTypeInfo[] fun(final CompletionLocation location) {
return getExpectedTypes(location.getCompletionParameters());
}
<BUG>});
@Nullable</BUG>
public static ExpectedTypeInfo[] getExpectedTypes(final CompletionParameters parameters) {
final PsiExpression expr = PsiTreeUtil.getContextOfType(parameters.getPosition(), PsiExpression.class, true);
if (expr != null) {

static final NullableLazyKey<ExpectedTypeInfo[], CompletionLocation> EXPECTED_TYPES = NullableLazyKey.create("expectedTypes", new NullableFunction<CompletionLocation, ExpectedTypeInfo[]>() {
@Nullable
public ExpectedTypeInfo[] fun(final CompletionLocation location) {
return getExpectedTypes(location.getCompletionParameters());
}
});
private static final PsiElementPattern.Capture<PsiElement> LEFT_PAREN = psiElement(JavaTokenType.LPARENTH).andOr(psiElement().withParent(
PsiExpressionList.class), psiElement().afterLeaf(".", PsiKeyword.NEW));
@Nullable
public static ExpectedTypeInfo[] getExpectedTypes(final CompletionParameters parameters) {
final PsiExpression expr = PsiTreeUtil.getContextOfType(parameters.getPosition(), PsiExpression.class, true);
if (expr != null) {
