Package org.eclipse.gmf.runtime.emf.type.core.commands

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


            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (eu.admire.visual.pmml._40.diagram.part.PMMLVisualIDRegistry
              .getVisualID(cnode)) {
          case eu.admire.visual.pmml._40.diagram.edit.parts.ValueTypeEditPart.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


    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

            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (eu.admire.visual.pmml._40.diagram.part.PMMLVisualIDRegistry
              .getVisualID(cnode)) {
          case eu.admire.visual.pmml._40.diagram.edit.parts.ChildParentTypeEditPart.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

    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

            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (eu.admire.visual.pmml._40.diagram.part.PMMLVisualIDRegistry
              .getVisualID(cnode)) {
          case eu.admire.visual.pmml._40.diagram.edit.parts.InlineTableTypeEditPart.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

    EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
    if (annotation == null) {
      // there are indirectly referenced children, need extra commands: false
      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

    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

            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (eu.admire.visual.pmml._40.diagram.part.PMMLVisualIDRegistry
              .getVisualID(cnode)) {
          case eu.admire.visual.pmml._40.diagram.edit.parts.DataFieldTypeEditPart.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;
          }
        }
        break;
      case eu.admire.visual.pmml._40.diagram.edit.parts.DataDictionaryTypeTaxonomyCompartmentEditPart.VISUAL_ID:
        for (Iterator cit = node.getChildren().iterator(); cit
            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (eu.admire.visual.pmml._40.diagram.part.PMMLVisualIDRegistry
              .getVisualID(cnode)) {
          case eu.admire.visual.pmml._40.diagram.edit.parts.TaxonomyTypeEditPart.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

    EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
    if (annotation == null) {
      // there are indirectly referenced children, need extra commands: false
      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

    EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
    if (annotation == null) {
      // there are indirectly referenced children, need extra commands: false
      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

Related Classes of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand

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.