/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import com.sun.jdi.ObjectReference;
import com.sun.jdi.ReferenceType;
import com.sun.jdi.Value;
+import org.jetbrains.annotations.Nullable;
/**
* User: lex
return false;
}
- public static PsiExpression substituteThis(PsiExpression expressionWithThis, PsiExpression howToEvaluateThis, Value howToEvaluateThisValue)
+ @Nullable
+ public static PsiExpression substituteThis(@Nullable PsiExpression expressionWithThis, PsiExpression howToEvaluateThis, Value howToEvaluateThisValue)
throws EvaluateException {
+ if (expressionWithThis == null) return null;
PsiExpression result = (PsiExpression)expressionWithThis.copy();
PsiClass thisClass = PsiTreeUtil.getContextOfType(result, PsiClass.class, true);