only allow to create anchors for existing PSI

This commit is contained in:
peter.gromov
2010-11-10 15:57:12 +03:00
parent 78dff987eb
commit 9e0753b5c6
@@ -48,7 +48,7 @@ public abstract class PsiAnchor {
public abstract int getStartOffset();
public abstract int getEndOffset();
public static PsiAnchor create(final PsiElement element) {
public static PsiAnchor create(@NotNull final PsiElement element) {
LOG.assertTrue(element.isValid());
if (element instanceof PsiFile) {