Package org.eclipse.emf.transaction

Examples of org.eclipse.emf.transaction.TransactionalEditingDomain.createCommand()


        Resource resource = eclass.eResource();
        ResourceSet resourceSet = resource.getResourceSet();
        TransactionalEditingDomain domain = TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain(resourceSet);
        try{
        if (domain != null){
          Command setCommand = domain.createCommand(SetCommand.class, new CommandParameter(eclass,
              EcorePackage.Literals.ENAMED_ELEMENT__NAME, newName));
          domain.getCommandStack().execute(setCommand);
          try {
            resource.save(Collections.emptyMap());
          } catch (IOException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.