void (String name) { boolean isNameChangedByUser = myIsNameChangedByUser; myIsNamePathSyncEnabled = false; try { myTfName.setText(name); } finally { myIsNameChangedByUser = isNameChangedByUser; myIsNamePathSyncEnabled = true; } }