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()); }
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); }
public override ExtensionNodeTypeCollection GetAllowedNodeTypes() { return(nodeType.GetAllowedNodeTypes()); }