Examples of DestroyElementCommand


Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

   * @generated
   */
  protected Command getDestroyElementCommand(DestroyElementRequest req) {
    CompoundCommand cc = getDestroyEdgesCommand();
    addDestroyShortcutsCommand(cc);
    cc.add(getGEFWrapper(new DestroyElementCommand(req)));
    return cc.unwrap();
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

  /**
   * @generated
   */
  protected Command getDestroyElementCommand(DestroyElementRequest req) {
    return getGEFWrapper(new DestroyElementCommand(req));
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

    addDestroyShortcutsCommand(cc);
    View view = (View) getHost().getModel();
    if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
      req.setElementToDestroy(view);
    }
    cc.add(getGEFWrapper(new DestroyElementCommand(req)));
    return cc.unwrap();
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

    addDestroyShortcutsCommand(cc);
    View view = (View) getHost().getModel();
    if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
      req.setElementToDestroy(view);
    }
    cc.add(getGEFWrapper(new DestroyElementCommand(req)));
    return cc.unwrap();
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

    addDestroyShortcutsCommand(cc);
    View view = (View) getHost().getModel();
    if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
      req.setElementToDestroy(view);
    }
    cc.add(getGEFWrapper(new DestroyElementCommand(req)));
    return cc.unwrap();
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

    if (annotation == null) {
      // there are indirectly referenced children, need extra commands: false
      addDestroyChildNodesCommand(cmd);
      addDestroyShortcutsCommand(cmd, view);
      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

        for (Iterator<?> cit = node.getChildren().iterator(); cit
            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (DispelVisualIDRegistry.getVisualID(cnode)) {
          case ProcessingElementAnonymousConstructorEditPart.VISUAL_ID:
            cmd.add(new DestroyElementCommand(
                new DestroyElementRequest(getEditingDomain(),
                    cnode.getElement(), false))); // directlyOwned: true
            // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
            // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
            break;
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

    if (annotation == null) {
      // there are indirectly referenced children, need extra commands: false
      addDestroyChildNodesCommand(cmd);
      addDestroyShortcutsCommand(cmd, view);
      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

    View view = (View) getHost().getModel();
    for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
      Node node = (Node) nit.next();
      switch (DispelVisualIDRegistry.getVisualID(node)) {
      case ArrayInitializerEditPart.VISUAL_ID:
        cmd.add(new DestroyElementCommand(new DestroyElementRequest(
            getEditingDomain(), node.getElement(), false))); // directlyOwned: true
        // don't need explicit deletion of node as parent's view deletion would clean child views as well
        // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
        break;
      }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

    if (annotation == null) {
      // there are indirectly referenced children, need extra commands: true
      addDestroyChildNodesCommand(cmd);
      addDestroyShortcutsCommand(cmd, view);
      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }
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.