public override ICompletionDataProvider HandleCodeCompletion( ICodeCompletionContext completionContext, char completionChar) { TextEditor editor = IdeApp.Workbench.ActiveDocument.TextEditor; int line, column; editor.GetLineColumnFromPosition(editor.CursorPosition, out line, out column); string currentLine = editor.GetLineText(line); string currentDocsExtension = Path.GetExtension(IdeApp.Workbench.ActiveDocument.FileName); string currentLanguage = GetLanguageFromExtension(currentDocsExtension); if (tags.Count == 0 || !CurrentLanguagesTagsLoaded.Equals(currentLanguage)) { LoadTags(); CurrentLanguagesTagsLoaded = currentLanguage; } CTagsCompletionDataProvider provider = new CTagsCompletionDataProvider(); // TODO: check specializations foreach (Tag tag in tags) { provider.AddCompletionData(new CTagsCompletionData(tag, "md-class")); } return(provider); }
public override ICompletionDataProvider HandleCodeCompletion ( ICodeCompletionContext completionContext, char completionChar) { TextEditor editor = IdeApp.Workbench.ActiveDocument.TextEditor; int line, column; editor.GetLineColumnFromPosition (editor.CursorPosition, out line, out column); string currentLine = editor.GetLineText (line); string currentDocsExtension = Path.GetExtension (IdeApp.Workbench.ActiveDocument.FileName); string currentLanguage = GetLanguageFromExtension (currentDocsExtension); if (tags.Count == 0 || !CurrentLanguagesTagsLoaded.Equals (currentLanguage)) { LoadTags (); CurrentLanguagesTagsLoaded = currentLanguage; } CTagsCompletionDataProvider provider = new CTagsCompletionDataProvider (); // TODO: check specializations foreach (Tag tag in tags) { provider.AddCompletionData (new CTagsCompletionData (tag, "md-class")); } return provider; }