Examples of ECommandService


Examples of org.eclipse.e4.core.commands.ECommandService

    if( item.getCommand().getElementId() == null || item.getCommand().getElementId().trim().isEmpty() ) {
      logger.error("No command id assigned to " + item.getCommand().getElementId());
      return null;
    }
   
    ECommandService cmdService = (ECommandService) lclContext
        .get(ECommandService.class.getName());
    Map<String, Object> parameters = null;
    List<MParameter> modelParms = item.getParameters();
    if (modelParms != null && !modelParms.isEmpty()) {
      parameters = new HashMap<String, Object>();
      for (MParameter mParm : modelParms) {
        parameters.put(mParm.getName(), mParm.getValue());
      }
    }
    ParameterizedCommand cmd = cmdService.createCommand(item.getCommand()
        .getElementId(), parameters);
    return cmd;
  }
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.