public static @Nullable <T> T getContextElement(final @Nullable Editor editor, Class<T> clazz) {
    final DomElement element = getContextElement(editor);
    return getParentOfType(element, clazz, false);
  }
public static @Nullable <T> T getContextElement(final @Nullable Editor editor, Class<T> clazz)