private BasicCommandStack commandStack;
public void load() {
// Create an adapter factory that yields item providers.
adapterFactory = new ComposedAdapterFactory();
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ModelItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE));
// 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.