public void SetUpFixture() { base.InitFixture(); childElementAllowedWhenNoItemSelected = new string[view.AllowedChildElements.Count]; view.AllowedChildElements.CopyTo(childElementAllowedWhenNoItemSelected, 0); WixDirectoryElement rootDir = editor.Document.RootDirectory; XmlElement directoryElement = (XmlElement)rootDir.ChildNodes[0]; view.SelectedElement = directoryElement; editor.SelectedElementChanged(); childElementsAllowedWhenDirectoryElementSelected = view.AllowedChildElements; WixSchemaCompletionData schema = new WixSchemaCompletionData(); expectedDirectoryChildElementNames = schema.GetChildElements(directoryElement.Name); }
/// <summary> /// The item has been selected in the view. /// </summary> public void SelectedElementChanged() { XmlElement element = view.SelectedElement; view.AllowedChildElements.Clear(); view.Attributes.Clear(); if (element != null) { view.Attributes.AddRange(WixSchemaCompletionData.GetAttributes(element)); view.AllowedChildElements.AddRange(WixSchemaCompletionData.GetChildElements(element.Name)); } else { view.AllowedChildElements.Add("Directory"); } view.AttributesChanged(); }
public void SetUpFixture() { schema = new WixSchemaCompletionData(); }