Component (final TableCellEditor editor, final int row, final int column) { final DocumentListener listener = new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent e) { final TableCellEditor ed = myParametersTable.getCellEditor(); if (ed != null) { Object editorValue = ed.getCellEditorValue(); myParametersTableModel.setValueAtWithoutUpdate(editorValue, row, column); updateSignature(); } } }; if (editor instanceof StringTableCellEditor ed) { ed.addDocumentListener(listener); } else if (editor instanceof CodeFragmentTableCellEditorBase) { ((CodeFragmentTableCellEditorBase)editor).addDocumentListener(listener); } return super.prepareEditor(editor, row, column); }