// Create the command stack that will notify this editor as commands are executed.
commandStack = new BasicCommandStack();
// Create the editing domain with a special command stack.
editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap());
// Load the resource through the editing domain.
URI resourceURI = URI.createURI("service://");
try {
getEditingDomain().getResourceSet().getResource(resourceURI, true);