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.

Now we have the choice of extending AbstractGenericEAnnotationDndHandler or implement IGenericEAnnotationDndHandler.
Their main difference is that the IGenericEAnnotationDndHandler interface gives you access to the edit part, while the abstract implementation does the job of
grabbing the semantic element behind it.

Whichever you choose, your handler will have two implement two methods:

This method returns a IStatus status. If its severity is different of IStatus.OK, the drop will be cancelled. The status message field is also useful to create some messages that can be shown to the user.

Here is what our implementation of the accept method should look like:

The other method you need to implement is the performDrop method. This method gives you an access to the command that is going to execute the drop of the annotation. You can return false if yoiu want to cancel the drop at this point.