/** * Returns the parent UI element based on the provided path. * * @param path Format is <tab name>\<tree node path> * @return The parent UI element. * @throws Exception Unspecified exception. */ private ElementUI parentFromPath(String path) throws Exception { if (TOOLBAR_PATH.equalsIgnoreCase(path)) { return getDesktop().getToolbar(); } String[] pieces = path.split(delim, 2); ElementTabPane tabPane = pieces.length == 0 ? null : findTabPane(pieces[0]); ElementUI parent = pieces.length < 2 ? null : getPathResolver().resolvePath(tabPane, pieces[1]); return parent == null ? tabPane : parent; }