コード例 #1
0
        ExtensionNodeTypeCollection GetAllowedChildTypes()
        {
            ExtensionNodeInfo en     = (ExtensionNodeInfo)CurrentNode.DataItem;
            object            parent = en.Node.Parent;

            Extension ext = parent as Extension;

            if (ext != null)
            {
                return(ext.GetAllowedNodeTypes());
            }
            else
            {
                ExtensionNodeDescription node = (ExtensionNodeDescription)parent;
                if (node != null)
                {
                    ExtensionNodeType tn = node.GetNodeType();
                    if (tn != null)
                    {
                        return(tn.GetAllowedNodeTypes());
                    }
                }
            }
            return(new ExtensionNodeTypeCollection());
        }
コード例 #2
0
        ExtensionNodeTypeCollection GetAllowedChildTypes(TreeIter it)
        {
            ExtensionNodeTypeCollection types = null;

            Extension ext = (Extension)store.GetValue(it, ColExtension);

            if (ext != null)
            {
                if (ext.Parent == null)
                {
                    ExtensionPoint ep = (ExtensionPoint)store.GetValue(it, ColExtensionPoint);
                    types = ep.NodeSet.GetAllowedNodeTypes();
                }
                else
                {
                    types = ext.GetAllowedNodeTypes();
                }
            }

            ExtensionNodeDescription node = (ExtensionNodeDescription)store.GetValue(it, ColNode);

            if (node != null)
            {
                ExtensionNodeType tn = node.GetNodeType();
                if (tn != null)
                {
                    types = tn.GetAllowedNodeTypes();
                }
            }
            return(types);
        }
コード例 #3
0
 public override ExtensionNodeTypeCollection GetAllowedNodeTypes()
 {
     return(nodeType.GetAllowedNodeTypes());
 }