bool IsInComment(SharpDevelopTextAreaControl editor) { VBExpressionFinder ef = new VBExpressionFinder(); int cursor = editor.ActiveTextAreaControl.Caret.Offset - 1; return(ef.FilterComments(editor.Document.GetText(0, cursor + 1), ref cursor) == null); }
private bool IsInComment(CodeEditorControl editor) { VBExpressionFinder ef = new VBExpressionFinder(); int cursor = editor.ActiveViewControl.Caret.Offset - 1; return(ef.FilterComments(ScriptControl.Parser.ProjectParser.GetFileContents(editor.FileName).Substring(0, cursor + 1), ref cursor) == null); }