void () { toolbarDecorator.setEditAction(button -> { T item = table.getSelectedObject(); if (item != null) { Function<T, T> mutator; if (helper.isMutable(item)) { mutator = FunctionUtil.id(); } else { final int selectedRow = table.getSelectedRow(); mutator = item12 -> helper.getMutable(item12, selectedRow); } ((DialogItemEditor<T>)itemEditor).edit(item, mutator, false); IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(table, true)); } }).setEditActionUpdater(e -> { T item = table.getSelectedObject(); return item != null && ((DialogItemEditor<T>)itemEditor).isEditable(item); }); if (((DialogItemEditor<?>)itemEditor).isUseDialogToAdd()) { toolbarDecorator.setAddAction(button -> { T item = createElement(); ((DialogItemEditor<T>)itemEditor).edit(item, item1 -> { model.addRow(item1); return item1; }, true); }); } }