void (final Object aValue, final int rowIndex, final int columnIndex) { if (columnIndex == CHECKED_COLUMN) { myCheckedMarks[rowIndex] = ((Boolean)aValue).booleanValue(); fireTableRowsUpdated(rowIndex, rowIndex); } else { String name = (String)aValue; PsiField field = myFields[rowIndex]; switch (columnIndex) { case GETTER_COLUMN -> myGetterNames[rowIndex] = name; case SETTER_COLUMN -> mySetterNames[rowIndex] = name; default -> throw new RuntimeException("Incorrect column index"); } ReadAction.nonBlocking(() -> { switch (columnIndex) { case GETTER_COLUMN -> { PsiMethod method = myHelper.generateMethodPrototype(field, name, true); if (method != null) { myGetterPrototypes.put(rowIndex, method); } myGetterPrototypesIcons.put(rowIndex, EncapsulateFieldsContainer.getIcon(myGetterPrototypes.get(rowIndex), myClass)); } case SETTER_COLUMN -> { PsiMethod method = myHelper.generateMethodPrototype(field, name, false); if (method != null) { mySetterPrototypes.put(rowIndex, method); } mySetterPrototypesIcons.put(rowIndex, EncapsulateFieldsContainer.getIcon(mySetterPrototypes.get(rowIndex), myClass)); } default -> throw new RuntimeException("Incorrect column index"); } return null; }) .finishOnUiThread(ModalityState.stateForComponent(EncapsulateFieldsDialog.this.myTable), nill->{ EncapsulateFieldsDialog.this.repaint(); }) .expireWith(EncapsulateFieldsDialog.this.getDisposable()) .submit(AppExecutorUtil.getAppExecutorService()); } }