protected boolean hasMappedParents(Collection<?> inputs, Collection<?> outputs) {
   Collection<Object> parents = new HashSet<Object>();
   for (Object input : inputs) {
     parents.add(domain.getParent(input));
   }
   for (Object output : outputs) {
     parents.add(domain.getParent(output));
   }
   return !getAllMappings(parents).isEmpty();
 }
  public boolean isAttachedObject(Object object) {
    Object root = object;
    // FB used to check for parent != null.
    // Need to find the top most model object not including the resource.
    // parent instanceof Eobject only checks for trees in model object space.
    for (Object parent = domain.getParent(object);
        parent instanceof EObject;
        parent = domain.getParent(parent)) {
      root = parent;
    }

    return getInputs().contains(root) || getOutputs().contains(root);
  }