/** @param elem the element to be deleted */
 void deleteSignal(Object elem) {
   if (!(elem instanceof Signal)) {
     throw new IllegalArgumentException("elem: " + elem);
   }
   Signal signal = (Signal) elem;
   // Delete all SendActions which have this as signal
   modelImpl
       .getUmlHelper()
       .deleteCollection(
           ((org.omg.uml.UmlPackage) signal.refOutermostPackage())
               .getCommonBehavior()
               .getASignalSendAction()
               .getSendAction(signal));
   // Delete all SignalEvents which have this as the signal
   modelImpl
       .getUmlHelper()
       .deleteCollection(
           ((org.omg.uml.UmlPackage) signal.refOutermostPackage())
               .getStateMachines()
               .getASignalOccurrence()
               .getOccurrence((Signal) elem));
 }
 /**
  * Create a new Signal in the same namespace as the target.
  *
  * @param element target element
  * @return newly created Signal
  */
 private Signal buildSignalInt(Object element) {
   Signal signal = createSignal();
   Namespace ns = ((ModelElement) element).getNamespace();
   signal.setNamespace(ns);
   return signal;
 }