public CodeCompletionKeyPressResult HandleKeyPress(ITextEditor editor, char ch) { if (MatchesExtension(editor)) { return(binding.HandleKeyPress(editor, ch)); } else { return(CodeCompletionKeyPressResult.None); } }
public bool HandleKeyPress(SharpDevelopTextAreaControl editor, char ch) { string ext = Path.GetExtension(editor.FileName); foreach (string extension in extensions) { if (ext.Equals(extension, StringComparison.OrdinalIgnoreCase)) { if (binding == null) { binding = (ICodeCompletionBinding)codon.AddIn.CreateObject(codon.Properties["class"]); } return(binding.HandleKeyPress(editor, ch)); } } return(false); }
public CodeCompletionKeyPressResult HandleKeyPress(ITextEditor editor, char ch) { string ext = Path.GetExtension(editor.FileName); foreach (string extension in extensions) { if (ext.Equals(extension, StringComparison.OrdinalIgnoreCase)) { if (binding == null) { binding = (ICodeCompletionBinding)codon.AddIn.CreateObject(codon.Properties["class"]); if (binding == null) { break; } } return(binding.HandleKeyPress(editor, ch)); } } return(CodeCompletionKeyPressResult.None); }