We need to make sure that the changes in the text fields are reflected in the EAnnotation. To do this, we need to add a ModifyListener on the text fields.
Plus we need to create a command or use an existing one to do the job of modifying the resource in a transaction.
We choose to create our own command, we could also have used a chain of commands with EMF.