void () { String text = mySearchTextField.getText(); if (StringUtil.isEmptyOrSpaces(text)) { hideSearchPanel(); } else if (mySearchPanel.controller == null) { showSearchPanel(text); } else { mySearchPanel.controller.handleShowPopup(); } }