Example #1
0
 protected void OnValueCompletionAvailable(ValueCompletionEventArgs args)
 {
     if (ValueCompletionAvailable != null)
     {
         ValueCompletionAvailable(this, args);
     }
 }
Example #2
0
        public void CompleteAttributeValue(string line, int caretColumn)
        {
            // Get information about what's being worked on
            XMLAnalysis analysis = XMLAnalysis.AnalyzeLine(line, caretColumn);

            if (analysis.CurrentAttribute == null || !analysis.IsCaretInsideAttributeValue)
            {
                return;                 // Not typing out an attribute value
            }
            // Get the tag that's being worked on
            CompletableXMLTag tag;

            if (!_tagsByName.TryGetValue(analysis.CurrentTag, out tag))
            {
                return;
            }

            // Get the attribute that's being worked on
            CompletableXMLAttribute attribute = tag.FindAttributeByName(analysis.CurrentAttribute);

            if (attribute == null || !attribute.HasValues)
            {
                return;
            }

            // Raise the ValueCompletionAvailable event
            var args = new ValueCompletionEventArgs(attribute.Values);

            OnValueCompletionAvailable(args);
        }
Example #3
0
        private void ValueCompletionAvailable(object sender, ValueCompletionEventArgs e)
        {
            _completionWindow = new CompletionWindow(txtPlugin.TextArea);

            IList<ICompletionData> data = _completionWindow.CompletionList.CompletionData;
            foreach (CompletableXMLValue tag in e.Suggestions)
                data.Add(new XMLValueCompletionData(tag));

            _completionWindow.Show();
        }
Example #4
0
		public void CompleteAttributeValue(string line, int caretColumn)
		{
			// Get information about what's being worked on
			XMLAnalysis analysis = XMLAnalysis.AnalyzeLine(line, caretColumn);
			if (analysis.CurrentAttribute == null || !analysis.IsCaretInsideAttributeValue)
				return; // Not typing out an attribute value

			// Get the tag that's being worked on
			CompletableXMLTag tag;
			if (!_tagsByName.TryGetValue(analysis.CurrentTag, out tag))
				return;

			// Get the attribute that's being worked on
			CompletableXMLAttribute attribute = tag.FindAttributeByName(analysis.CurrentAttribute);
			if (attribute == null || !attribute.HasValues)
				return;

			// Raise the ValueCompletionAvailable event
			var args = new ValueCompletionEventArgs(attribute.Values);
			OnValueCompletionAvailable(args);
		}
Example #5
0
		protected void OnValueCompletionAvailable(ValueCompletionEventArgs args)
		{
			if (ValueCompletionAvailable != null)
				ValueCompletionAvailable(this, args);
		}