Examples of DeleteCommand


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

    if (shouldProceed) {
      if (completedRequest instanceof DestroyRequest) {
        TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
            .getEditingDomain();
        Command deleteViewCommand = new ICommandProxy(
            new DeleteCommand(editingDomain, (View) getHost()
                .getModel()));
        semanticCommand = semanticCommand == null ? deleteViewCommand
            : semanticCommand.chain(deleteViewCommand);
      }
      return semanticCommand;
View Full Code Here

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

      // is this element currently contained within the current
      // edit part?
      IGraphicalEditPart contained = elementContainedWithin(selected, diagramEditPart);
      if (contained != null) {
        // it is: delete the node from the current display               
        DeleteCommand command2 = new DeleteCommand(editingDomain, contained.getPrimaryView());
        command2.execute(monitor, info);
      }
    }
  }
View Full Code Here

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

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

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

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

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

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

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

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

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

Examples of org.eclipse.jst.pagedesigner.commands.range.DeleteCommand

  public void perform() {
    DesignerCommand command = null;
    IHTMLGraphicalViewer viewer = getViewer();
    if (viewer.isInRangeMode()) {
      command = new DeleteCommand(true, viewer);
      command.execute();
    } else {
      command = new DeleteNodeCommand(viewer);
      command.execute();
    }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.commands.range.DeleteCommand

            }
          }
        }
        if (command == null) {
          // "delete"
          command = new DeleteCommand(true,
              (IHTMLGraphicalViewer) this.getCurrentViewer());
        }
      } else {
        // "cut"
        command = new CutCommand((IHTMLGraphicalViewer) this
            .getCurrentViewer());
        e.doit = false;
      }
      break;
    case SWT.BS:
      // "delete"
      command = new DeleteCommand(false, (IHTMLGraphicalViewer) this
          .getCurrentViewer());
      e.doit = false;
      break;
    case SWT.INSERT:
      if ((e.stateMask & SWT.SHIFT) != 0) {
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.