EventCreateCommand.java :  » Workflow-Engines » osbl-1_0 » newprocess » diagram » edit » commands » Java Open Source

Java Open Source » Workflow Engines » osbl 1_0 
osbl 1_0 » newprocess » diagram » edit » commands » EventCreateCommand.java
package newprocess.diagram.edit.commands;

import newprocess.NewprocessPackage;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;

import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;

import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

import org.eclipse.gmf.runtime.notation.View;

/**
 * @generated
 */
public class EventCreateCommand extends CreateElementCommand {

  /**
   * @generated
   */
  public EventCreateCommand(CreateElementRequest req) {
    super(req);
  }

  /**
   * @generated
   */
  protected EClass getEClassToEdit() {
    return NewprocessPackage.eINSTANCE.getProcess();
  };

  /**
   * @generated
   */
  protected EObject getElementToEdit() {
    EObject container = ((CreateElementRequest) getRequest())
        .getContainer();
    if (container instanceof View) {
      container = ((View) container).getElement();
    }
    return container;
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.