@Override
 protected String getFactoryHint(IAdaptable elementAdapter) {
   // Return a semantic hint as a workaround for bug
   // https://bugs.eclipse.org/bugs/show_bug.cgi?id=281014
   CanonicalElementAdapter element = (CanonicalElementAdapter) elementAdapter;
   int VID =
       MindVisualIDRegistry.getNodeVisualID(
           (View) getHost().getModel(), (EObject) element.getRealObject());
   return MindVisualIDRegistry.getType(VID);
 }
  @SuppressWarnings("unchecked")
  protected List<View> getViewChildren(View view) {
    ArrayList<View> list = new ArrayList<View>();

    for (View child : (EList<View>) view.getChildren()) {
      if (child instanceof Node && ViewType.GROUP.equals(((Node) child).getType())) {
        list.addAll(getViewChildren(child));
      } else {
        EObject element = child.getElement();
        int modelVID = MindVisualIDRegistry.getNodeVisualID((View) host().getModel(), element);
        int diagramVID = MindVisualIDRegistry.getVisualID(child);
        if (modelVID == -1 || modelVID == diagramVID) {
          list.add(child);
        } else {
          ArrayList<View> views = new ArrayList<View>();
          views.add(child);
          deleteViews(views.iterator());
        }
      }
    }
    return list;
  }