Source:
private void setupSessionTagsTextBox() { stopTypingSessionTagsTimer = new Timer() { @Override public void run() { String generalContent = sessionTagsTextBox.getText().trim(); if (generalContent.isEmpty()) { sessionDataProvider.addDataDisplayIfNotExists(sessionsDataGrid); sessionDataForSessionTagsAsyncProvider.removeDataDisplayIfNotExists(sessionsDataGrid); return; } if (generalContent.contains(",") || generalContent.contains(";") || generalContent.contains("/")) { tagNames.addAll(Arrays.asList(generalContent.split("\\s*[,;/]\\s*"))); } else { tagNames.add(generalContent); } sessionDataForSessionTagsAsyncProvider.setTagNames(tagNames); sessionDataProvider.removeDataDisplayIfNotExists(sessionsDataGrid); sessionDataForDatePeriodAsyncProvider.removeDataDisplayIfNotExists(sessionsDataGrid); sessionDataForSessionIdsAsyncProvider.removeDataDisplayIfNotExists(sessionsDataGrid); sessionDataForSessionTagsAsyncProvider.addDataDisplayIfNotExists(sessionsDataGrid); } }; sessionTagsTextBox.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { setNullWidgetsValue(sessionsTo, sessionsFrom, sessionIdsTextBox); tagNames.clear(); stopTypingSessionTagsTimer.schedule(500); } }); filterBox.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> popupPanelCloseEvent) { setNullWidgetsValue(sessionsFrom, sessionsTo, sessionIdsTextBox); if (!tagNames.isEmpty()) sessionTagsTextBox.setValue(toParsableString(tagNames)); tagNames.clear(); stopTypingSessionTagsTimer.schedule(500); } }); }

Target:
private void setupSessionTagsTextBox() { stopTypingSessionTagsTimer = new Timer() { @Override public void run() { String generalContent = sessionTagsTextBox.getText().trim(); if (generalContent.isEmpty()) { sessionDataProvider.addDataDisplayIfNotExists(sessionsDataGrid); sessionDataForSessionTagsAsyncProvider.removeDataDisplayIfNotExists(sessionsDataGrid); return; } if (generalContent.contains(",") || generalContent.contains(";") || generalContent.contains("/")) { tagNames.addAll(Arrays.asList(generalContent.split("\\s*[,;/]\\s*"))); } else { tagNames.add(generalContent); } sessionDataForSessionTagsAsyncProvider.setTagNames(tagNames); sessionDataProvider.removeDataDisplayIfNotExists(sessionsDataGrid); sessionDataForDatePeriodAsyncProvider.removeDataDisplayIfNotExists(sessionsDataGrid); sessionDataForSessionIdsAsyncProvider.removeDataDisplayIfNotExists(sessionsDataGrid); sessionDataForSessionTagsAsyncProvider.addDataDisplayIfNotExists(sessionsDataGrid); } }; sessionTagsTextBox.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { sessionsTo.setValue(null, true); sessionsFrom.setValue(null,true); sessionIdsTextBox.setValue(null, true); tagNames.clear(); stopTypingSessionTagsTimer.schedule(500); } }); tagFilterBox.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> popupPanelCloseEvent) { sessionsTo.setValue(null, true); sessionsFrom.setValue(null, true); sessionIdsTextBox.setValue(null, true); if (!tagNames.isEmpty()) sessionTagsTextBox.setValue(toParsableString(tagNames)); tagNames.clear(); stopTypingSessionTagsTimer.schedule(500); } }); }