Package org.eclipse.emf.edit.command

Examples of org.eclipse.emf.edit.command.CommandParameter


        destinationDataStore = (DestinationDataStore) obj;
        editingDomain = AdapterFactoryEditingDomain.getEditingDomainFor(destinationDataStore);
        if (editingDomain != null) {
          Collection<?> descriptors = editingDomain.getNewChildDescriptors(destinationDataStore, null);
          for (Object descriptor: descriptors) {
            CommandParameter parameter = (CommandParameter) descriptor;
            if (parameter.getFeature() == RfcPackage.Literals.DESTINATION_DATA_STORE__ENTRIES) {
              destinationDataStoreEntry = (DestinationDataStoreEntryImpl) parameter.getValue();
              createDestinationDataStoreEntryCommand = CreateChildCommand.create(editingDomain, destinationDataStore, descriptor, Collections.singletonList(destinationDataStore));
              continue;
            } else if (parameter.getFeature() == RfcPackage.Literals.DESTINATION_DATA_STORE__DESTINATION_DATA) {
              destinationData = (DestinationData) parameter.getValue();
              createDestinationDataCommand = CreateChildCommand.create(editingDomain, destinationDataStore, descriptor, Collections.singletonList(destinationDataStore));
              continue;
            }

          }
View Full Code Here


        serverDataStore = (ServerDataStore) obj;
        editingDomain = AdapterFactoryEditingDomain.getEditingDomainFor(serverDataStore);
        if (editingDomain != null) {
          Collection<?> descriptors = editingDomain.getNewChildDescriptors(serverDataStore, null);
          for (Object descriptor: descriptors) {
            CommandParameter parameter = (CommandParameter) descriptor;
            if (parameter.getFeature() == RfcPackage.Literals.SERVER_DATA_STORE__ENTRIES) {
              serverDataStoreEntry = (ServerDataStoreEntryImpl) parameter.getValue();
              createServerDataStoreEntryCommand = CreateChildCommand.create(editingDomain, serverDataStore, descriptor, Collections.singletonList(serverDataStore));
              continue;
            } else if (parameter.getFeature() == RfcPackage.Literals.SERVER_DATA_STORE__SERVER_DATA) {
              serverData = (ServerData) parameter.getValue();
              createServerDataCommand = CreateChildCommand.create(editingDomain, serverDataStore, descriptor, Collections.singletonList(serverDataStore));
              continue;
            }

          }
View Full Code Here

        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

Related Classes of org.eclipse.emf.edit.command.CommandParameter

Copyright © 2018 www.massapicom. 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.