/*
* @see org.rssowl.ui.dialogs.properties.IEntityPropertyPage#performOk(java.util.Set)
*/
public boolean performOk(Set<IEntity> entitiesToSave) {
if (fEntities.size() == 1) {
IEntity entity = fEntities.get(0);
Object oldNotesObj = entity.getProperty(NOTES_PREF_ID);
String oldNotes = (oldNotesObj != null) ? oldNotesObj.toString() : ""; //$NON-NLS-1$
String newNotes = fNotesInput.getText();
boolean save = false;
if (!StringUtils.isSet(newNotes) && StringUtils.isSet(oldNotes)) {
entity.removeProperty(NOTES_PREF_ID);
save = true;
} else if (!newNotes.equals(oldNotes)) {
entity.setProperty(NOTES_PREF_ID, newNotes);
save = true;
}
if (save)
entitiesToSave.add(entity);