Reworked editing support to allow the editing of whole resources (not only statements).

Change-Id: I730448abbc6d0f30e7bfe63e3bf825a538424e39