public void RegisterCodeCompletionBinding(string extension, ICodeCompletionBinding binding) { if (!Bindings.ContainsKey(extension)) { Bindings.Add(extension, new List <ICodeCompletionBinding>()); } Bindings[extension].Add(binding); }
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; }
private ICodeCompletionBinding[] GetCompletionBinding() { ICodeCompletionBinding[] bindings = null; if (_scriptLanguage == ScriptLanguage.CSharp) { bindings = new ICodeCompletionBinding[] { new CSharpCompletionBinding() } } ; else { bindings = new ICodeCompletionBinding[] { new VBNetCompletionBinding() } }; return(bindings); }
public bool CtrlSpace(SharpDevelopTextAreaControl editor) { 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.CtrlSpace(editor)); } } return(false); }
public bool HandleKeyPress(SharpDevelopTextAreaControl editor, char ch) { string ext = Path.GetExtension(editor.FileName); foreach (string extension in extensions) { if (ext.Equals(extension, StringComparison.InvariantCultureIgnoreCase)) { 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); }
bool MatchesExtension(ITextEditor editor) { 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) { return(false); } } return(true); } } return(false); }
bool MatchesExtension(ITextEditor editor) { 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) return false; } return true; } } 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; }