From 84f06cf5c6d93324e9c4e4257a0b43f4d8a42da5 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Fri, 22 Apr 2016 20:44:14 +0300 Subject: [PATCH] IDEA-139647 Change signature: focus is lost while typing parameter name/value --- .../changeSignature/ParameterTableModelBase.java | 8 +------- .../src/com/intellij/util/ui/ListTableModel.java | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ParameterTableModelBase.java b/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ParameterTableModelBase.java index 21b1a41b8d6f..b1fd7f19fe38 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ParameterTableModelBase.java +++ b/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ParameterTableModelBase.java @@ -64,13 +64,7 @@ public abstract class ParameterTableModelBase

, Aspect> diff --git a/platform/util/src/com/intellij/util/ui/ListTableModel.java b/platform/util/src/com/intellij/util/ui/ListTableModel.java index bdd04ec399ac..28386e00e89e 100644 --- a/platform/util/src/com/intellij/util/ui/ListTableModel.java +++ b/platform/util/src/com/intellij/util/ui/ListTableModel.java @@ -113,10 +113,23 @@ public class ListTableModel extends TableViewModel implements Editab @Override public void setValueAt(Object aValue, int rowIndex, int columnIndex) { + setValueAt(aValue, rowIndex, columnIndex, true); + } + + /** + * Sets the value in the cell at {@code columnIndex} and {@code rowIndex} to {@code aValue}. + * This method allows to choose will the model listeners notified or not. + * + * @param aValue the new value + * @param rowIndex the row whose value is to be changed + * @param columnIndex the column whose value is to be changed + * @param notifyListeners indicates whether the model listeners are notified + */ + public void setValueAt(Object aValue, int rowIndex, int columnIndex, boolean notifyListeners) { if (rowIndex < myItems.size()) { myColumnInfos[columnIndex].setValue(getItem(rowIndex), aValue); } - fireTableCellUpdated(rowIndex, columnIndex); + if (notifyListeners) fireTableCellUpdated(rowIndex, columnIndex); } /**