Package org.eclipse.emf.edit.command

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


    private void updateModel() {
      EStructuralFeature structuralFeature = getEStructuralFeature();
      if (getEObject() != null && structuralFeature != null) {
        String value = text.getText().trim();
        if (isChanged(value, getFeatureValue())) {
          Command command = new SetCommand(editor.getEditingDomain(), getEObject(), structuralFeature, (value != null && value.length() > 0 ? value : null));
          editor.getEditingDomain().getCommandStack().execute(command);
  //      getEObject().eSet(structuralFeature, (value != null && value.length() > 0 ? value : null));
        }
      }
    }
View Full Code Here


                  MessageDialog.openInformation( getSite().getShell(), "Not valid",
                      "The selected resource has to be part of the source folder" );
                }
                if ( template != null ) {
                  if ( getTask().getDeploy().getTemplate() == null ) {
                    Command cmd = new SetCommand( editingDomain, getTask().getDeploy(), DEPLOY__TEMPLATE, ParametersFactory.eINSTANCE
                        .createTemplate() );
                    if ( cmd.canExecute() ) {
                      cmd.execute();
                    }
                  }
                  Command cmd = new SetCommand( editingDomain, getTask().getDeploy().getTemplate(), TEMPLATE__FILE, template );
                  if ( cmd.canExecute() ) {
                    cmd.execute();
                  }
                }
              }
            }
          }
View Full Code Here

TOP

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

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.