Package org.eclipse.gmf.runtime.diagram.core.commands

Examples of org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand


  /**
   * @generated
   */
  protected Command addDeleteViewCommand(Command mainCommand,
      DestroyRequest completedRequest) {
    Command deleteViewCommand = getGEFWrapper(new DeleteCommand(
        getEditingDomain(), (View) getHost().getModel()));
    return mainCommand == null ? deleteViewCommand : mainCommand
        .chain(deleteViewCommand);
  }
View Full Code Here


        .hasNext();) {
      View nextView = (View) it.next();
      if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
        continue;
      }
      cmd.add(new DeleteCommand(getEditingDomain(), nextView));
    }
  }
View Full Code Here

      // 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

      Edge incomingLink = (Edge) it.next();
      if (DispelVisualIDRegistry.getVisualID(incomingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
        DestroyElementRequest r = new DestroyElementRequest(
            incomingLink.getElement(), false);
        cmd.add(new DestroyElementCommand(r));
        cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
        continue;
      }
    }
    for (Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
      Edge outgoingLink = (Edge) it.next();
      if (DispelVisualIDRegistry.getVisualID(outgoingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
        DestroyElementRequest r = new DestroyElementRequest(
            outgoingLink.getElement(), false);
        cmd.add(new DestroyElementCommand(r));
        cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
        continue;
      }
    }
    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

      Edge incomingLink = (Edge) it.next();
      if (DispelVisualIDRegistry.getVisualID(incomingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
        DestroyElementRequest r = new DestroyElementRequest(
            incomingLink.getElement(), false);
        cmd.add(new DestroyElementCommand(r));
        cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
        continue;
      }
    }
    for (Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
      Edge outgoingLink = (Edge) it.next();
      if (DispelVisualIDRegistry.getVisualID(outgoingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
        DestroyElementRequest r = new DestroyElementRequest(
            outgoingLink.getElement(), false);
        cmd.add(new DestroyElementCommand(r));
        cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
        continue;
      }
    }
    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

      Edge incomingLink = (Edge) it.next();
      if (DispelVisualIDRegistry.getVisualID(incomingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
        DestroyElementRequest r = new DestroyElementRequest(
            incomingLink.getElement(), false);
        cmd.add(new DestroyElementCommand(r));
        cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
        continue;
      }
    }
    for (Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
      Edge outgoingLink = (Edge) it.next();
      if (DispelVisualIDRegistry.getVisualID(outgoingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
        DestroyElementRequest r = new DestroyElementRequest(
            outgoingLink.getElement(), false);
        cmd.add(new DestroyElementCommand(r));
        cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
        continue;
      }
    }
    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

      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

              if (DispelVisualIDRegistry
                  .getVisualID(incomingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
                DestroyElementRequest r = new DestroyElementRequest(
                    incomingLink.getElement(), false);
                cmd.add(new DestroyElementCommand(r));
                cmd.add(new DeleteCommand(getEditingDomain(),
                    incomingLink));
                continue;
              }
            }
            for (Iterator<?> it = cnode.getSourceEdges().iterator(); it
                .hasNext();) {
              Edge outgoingLink = (Edge) it.next();
              if (DispelVisualIDRegistry
                  .getVisualID(outgoingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
                DestroyElementRequest r = new DestroyElementRequest(
                    outgoingLink.getElement(), false);
                cmd.add(new DestroyElementCommand(r));
                cmd.add(new DeleteCommand(getEditingDomain(),
                    outgoingLink));
                continue;
              }
            }
            cmd.add(new DestroyElementCommand(
View Full Code Here

      Edge incomingLink = (Edge) it.next();
      if (DispelVisualIDRegistry.getVisualID(incomingLink) == MethodCall2EditPart.VISUAL_ID) {
        DestroyElementRequest r = new DestroyElementRequest(
            incomingLink.getElement(), false);
        cmd.add(new DestroyElementCommand(r));
        cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
        continue;
      }
    }
    EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
    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

      // 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.diagram.core.commands.DeleteCommand

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.