public override void FixtureInit()
		{
			XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();
			schemas.Add(SchemaCompletion);
			string xml = "<note xmlns='http://www.w3schools.com' name=''></note>";
			XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, null);
			schemaAttribute = (XmlSchemaAttribute)schemaDefinition.GetSelectedSchemaObject(xml, xml.IndexOf("name"));
		}
		public override void FixtureInit()
		{
			XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();
			schemas.Add(SchemaCompletion);
			
			string xml = "<note xmlns='http://www.w3schools.com'></note>";
			int index = xml.IndexOf("note xmlns");
			
			XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, null);
			schemaElement = (XmlSchemaElement)schemaDefinition.GetSelectedSchemaObject(xml, index);
			location = schemaDefinition.GetSelectedSchemaObjectLocation(xml, index);
		}
		public override void FixtureInit()
		{
			XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();
			schemas.Add(SchemaCompletion);
			XmlSchemaCompletion xsdSchemaCompletionData = new XmlSchemaCompletion(ResourceManager.ReadXsdSchema());
			schemas.Add(xsdSchemaCompletionData);
			
			string xml = GetSchema();			
			int index = xml.IndexOf("ref=\"dir\"");
			index = xml.IndexOf("dir", index);
			XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, SchemaCompletion);
			schemaAttribute = (XmlSchemaAttribute)schemaDefinition.GetSelectedSchemaObject(xml, index);
		}
        public override void FixtureInit()
        {
            XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();
            schemas.Add(SchemaCompletion);
            XmlSchemaCompletion xsdSchemaCompletion = new XmlSchemaCompletion(ResourceManager.ReadXsdSchema());
            schemas.Add(xsdSchemaCompletion);

            string xml = GetSchema();
            int index = xml.IndexOf("type=\"text-type\"");
            index = xml.IndexOf("text-type", index);
            XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, SchemaCompletion);
            schemaComplexType = (XmlSchemaComplexType)schemaDefinition.GetSelectedSchemaObject(xml, index);
        }
		public override void FixtureInit()
		{
			XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();
			schemas.Add(SchemaCompletion);
			XmlSchemaCompletion xsdSchemaCompletionData = new XmlSchemaCompletion(ResourceManager.ReadXsdSchema());
			schemas.Add(xsdSchemaCompletionData);
			
			string xml = GetSchema();
			
			int index = xml.IndexOf("ref=\"xs:list");
			index = xml.IndexOf("xs", index);
			XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, SchemaCompletion);
			referencedSchemaElement = (XmlSchemaElement)schemaDefinition.GetSelectedSchemaObject(xml, index);
		}
Пример #6
0
        public void GoToSchemaDefinition()
        {
            // Find schema object for selected xml element or attribute.
            XmlSchemaCompletion currentSchemaCompletion = schemas.GetSchemaFromFileName(File.FileName);

            ITextEditor editor = TextEditor;

            if (editor == null)
            {
                return;
            }

            XmlSchemaDefinition     schemaDefinition     = new XmlSchemaDefinition(schemas, currentSchemaCompletion);
            XmlSchemaObjectLocation schemaObjectLocation = schemaDefinition.GetSelectedSchemaObjectLocation(editor.Document.Text, editor.Caret.Offset);

            schemaObjectLocation.JumpToFilePosition();
        }
Пример #7
0
		public void GoToSchemaDefinition()
		{
			// Find schema object for selected xml element or attribute.
			XmlSchemaCompletion currentSchemaCompletion = schemas.GetSchemaFromFileName(File.FileName);
			
			ITextEditor editor = TextEditor;
			if (editor == null) {
				return;
			}
			
			XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, currentSchemaCompletion);
			XmlSchemaObjectLocation schemaObjectLocation = schemaDefinition.GetSelectedSchemaObjectLocation(editor.Document.Text, editor.Caret.Offset);
			schemaObjectLocation.JumpToFilePosition();
		}