public static boolean isDynamicElement(@Nullable PsiElement element, @NotNull String classSource) {
    return element instanceof DynamicElement && classSource.equals(((DynamicElement)element).getSource());
  }
public static boolean isDynamicElement(@Nullable PsiElement element, @NotNull String classSource)