PsiElement (@Nullable PsiElement element) { if (element != null && element.isValid() && myProject != element.getProject()) { throw new AssertionError(myProject + "!=" + element.getProject() + "; element=" + element); } return element; }