public CSharpChunkParser(CSharpSyntaxMode csharpSyntaxMode, SpanParser spanParser, ColorScheme style, DocumentLine line) : base(csharpSyntaxMode, spanParser, style, line) { lineNumber = line.LineNumber; this.csharpSyntaxMode = csharpSyntaxMode; foreach (var tag in CommentTag.SpecialCommentTags) { tags.Add(tag.Tag); } }
// Span preprocessorSpan; // Rule preprocessorRule; public CSharpSpanParser(CSharpSyntaxMode mode, CloneableStack <Span> spanStack) : base(mode, spanStack) { // foreach (Span span in mode.Spans) { // if (span.Rule == "text.preprocessor") { // preprocessorSpan = span; // preprocessorRule = GetRule (span); // } // } }
public override void Initialize() { base.Initialize(); textEditorData = base.Document.Editor; textEditorData.SelectionSurroundingProvider = new CSharpSelectionSurroundingProvider(); textEditorData.Caret.PositionChanged += HandleTextEditorDataCaretPositionChanged; textEditorData.Document.TextReplaced += HandleTextEditorDataDocumentTextReplaced; textEditorData.SelectionChanged += HandleTextEditorDataSelectionChanged; syntaxMode = new CSharpSyntaxMode(Document); textEditorData.Document.SyntaxMode = syntaxMode; }
public override void Dispose() { if (syntaxMode != null) { textEditorData.Document.SyntaxMode = null; syntaxMode.Dispose(); syntaxMode = null; } textEditorData.SelectionChanged -= HandleTextEditorDataSelectionChanged; textEditorData.Caret.PositionChanged -= HandleTextEditorDataCaretPositionChanged; textEditorData.Document.TextReplaced -= HandleTextEditorDataDocumentTextReplaced; base.Dispose(); RemoveTimer(); }