protected void OnValueCompletionAvailable(ValueCompletionEventArgs args) { if (ValueCompletionAvailable != null) { ValueCompletionAvailable(this, args); } }
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); }
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(); }
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); }
protected void OnValueCompletionAvailable(ValueCompletionEventArgs args) { if (ValueCompletionAvailable != null) ValueCompletionAvailable(this, args); }