PsiElement (@Nullable CopyOnWriteList writeVars, @NotNull PsiVariable variable) { if (writeVars == null) return null; PsiManager psiManager = variable.getManager(); for (final VariableInfo variableInfo : writeVars.getList()) { if (psiManager.areElementsEquivalent(variableInfo.variable, variable)) { return variableInfo.expression; } } return null; }