@Test public void testGetParentInDepthNullElement() { setElementChain(); Element parentElementRecovered = tested.getParentInDepth(null, 4); assertNull(parentElementRecovered); }
static Element getParentInDepth(final Element element, int depth) { if (null != element && depth > 0) { Element parent = element.getParentElement(); return null != parent ? getParentInDepth(parent, --depth) : element; } return element; }
MonacoEditorView implements UberElement<MonacoEditorPresenter> { static Element getParentInDepth(final Element element, int depth) { if (null != element && depth > 0) { Element parent = element.getParentElement(); return null != parent ? getParentInDepth(parent, --depth) : element; } return element; } }
MonacoEditorView implements UberElement<MonacoEditorPresenter> { static Element getParentInDepth(final Element element, int depth) { if (null != element && depth > 0) { Element parent = element.getParentElement(); return null != parent ? getParentInDepth(parent, --depth) : element; } return element; }  }
MonacoEditorView implements UberElement<MonacoEditorPresenter> { static Element getParentInDepth(final Element element, int depth) { if (null != element && depth > 0) { Element parent = element.getParentElement(); return null != parent ? getParentInDepth(parent, --depth) : element; } return element; }  @Override void init(final MonacoEditorPresenter presenter); String getValue(); String getLanguage(); void load(String[] modules,
                     MonacoEditorOptions options,
                     Runnable callback); void dispose(); @PreDestroy void destroy(); @Override HTMLElement getElement(); }
MonacoEditorView implements UberElement<MonacoEditorPresenter> { static Element getParentInDepth(final Element element, int depth) { if (null != element && depth > 0) { Element parent = element.getParentElement(); return null != parent ? getParentInDepth(parent, --depth) : element; } return element; }  @Override void init(final MonacoEditorPresenter presenter); String getValue(); String getLanguage(); void load(String[] modules,
                     MonacoEditorOptions options,
                     Runnable callback); void dispose(); @PreDestroy void destroy(); @Override HTMLElement getElement();  }