Example #1
0
 /// <summary>
 ///   Handles the <see cref="XmlCompletionProvider.GotAutoCompleteList" /> event of the
 ///   completion provider.
 /// </summary>
 /// <remarks>
 ///   This raises the editor's <see cref="GotAutoCompleteList" /> event.
 /// </remarks>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">An <see cref="AutoCompleteListEventArgs" /> describing the event arguments.</param>
 private void m_cdpXmlCompletionProvider_GotAutoCompleteList(object sender, AutoCompleteListEventArgs e)
 {
     if (GotAutoCompleteList != null)
     {
         var raaArgs = new RegeneratableAutoCompleteListEventArgs(e);
         GotAutoCompleteList(this, raaArgs);
         m_booGenerateOnNextKey = raaArgs.GenerateOnNextKey;
         e.ExtraInsertionCharacters.AddRange(raaArgs.ExtraInsertionCharacters);
     }
 }
Example #2
0
 /// <summary>
 /// Handles the <see cref="XmlCompletionProvider.GotAutoCompleteList"/> event of the
 /// xml config editor.
 /// </summary>
 /// <remarks>
 /// This raises the editor's <see cref="GotXMLAutoCompleteList"/> event.
 /// </remarks>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">An <see cref="RegeneratableAutoCompleteListEventArgs"/> describing the event arguments.</param>
 private void xedScript_GotAutoCompleteList(object sender, RegeneratableAutoCompleteListEventArgs e)
 {
     if (GotXMLAutoCompleteList != null)
         GotXMLAutoCompleteList(this, e);
 }
Example #3
0
 /// <summary>
 ///   Handles the <see cref="XmlCompletionProvider.GotAutoCompleteList" /> event of the
 ///   completion provider.
 /// </summary>
 /// <remarks>
 ///   This raises the editor's <see cref="GotAutoCompleteList" /> event.
 /// </remarks>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">An <see cref="AutoCompleteListEventArgs" /> describing the event arguments.</param>
 private void m_cdpXmlCompletionProvider_GotAutoCompleteList(object sender, AutoCompleteListEventArgs e)
 {
   if (GotAutoCompleteList != null)
   {
     var raaArgs = new RegeneratableAutoCompleteListEventArgs(e);
     GotAutoCompleteList(this, raaArgs);
     m_booGenerateOnNextKey = raaArgs.GenerateOnNextKey;
     e.ExtraInsertionCharacters.AddRange(raaArgs.ExtraInsertionCharacters);
   }
 }
Example #4
0
 /// <summary>
 ///   Handles the <see cref="FomodScriptEditor.GotXMLAutoCompleteList" /> event of the script
 ///   editor.
 /// </summary>
 /// <remarks>
 ///   This methods populates the code completion list with the file paths in the FOMod file structure
 ///   when the value being completed is the source value of a file tag.
 /// </remarks>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">A <see cref="RegeneratableAutoCompleteListEventArgs" /> decribing the event arguments.</param>
 private void fseScriptEditor_GotXMLAutoCompleteList(object sender, RegeneratableAutoCompleteListEventArgs e)
 {
   if (!String.IsNullOrEmpty(e.ElementPath) &&
       (Path.GetFileName(e.ElementPath).Equals("file") || Path.GetFileName(e.ElementPath).Equals("folder")) &&
       (e.AutoCompleteType == AutoCompleteType.AttributeValues) &&
       (e.Siblings[e.Siblings.Length - 1].Equals("source")))
   {
     var strPrefix = e.LastWord.EndsWith("=") ? "" : e.LastWord;
     var lstFiles = ffsFileStructure.FindFomodFiles(strPrefix + "*");
     foreach (var kvpFile in lstFiles)
     {
       e.AutoCompleteList.Add(new XmlCompletionData(AutoCompleteType.AttributeValues, kvpFile.Key, null));
     }
     e.GenerateOnNextKey = true;
     e.ExtraInsertionCharacters.Add(Path.DirectorySeparatorChar);
   }
 }