void (boolean updateText) { List<String> filters = new ArrayList<>(); for (InstanceFilter instanceFilter : myInstanceFilters) { if (instanceFilter.isEnabled()) { filters.add(Long.toString(instanceFilter.getId())); } } if (updateText) { myInstanceFiltersField.setText(StringUtil.join(filters, " ")); } String tipText = concatWithEx(new StringBuilder(), filters, " ", (int) Math.sqrt(myInstanceFilters.length) + 1, "\n").toString(); myInstanceFiltersField.getTextField().setToolTipText(tipText); }