protected override void Initialize() { base.Initialize(); Editor.SetSelectionSurroundingProvider(new CSharpSelectionSurroundingProvider(Editor, DocumentContext)); syntaxMode = new CSharpSyntaxMode(Editor, DocumentContext); Editor.SemanticHighlighting = syntaxMode; }
public CSharpChunkParser(CSharpSyntaxMode csharpSyntaxMode, SpanParser spanParser, ColorScheme style, DocumentLine line) : base(csharpSyntaxMode, spanParser, style, line) { this.csharpSyntaxMode = csharpSyntaxMode; foreach (var tag in CommentTag.SpecialCommentTags) { tags.Add(tag.Tag); } }
public override void Initialize() { base.Initialize(); TextEditorData.SelectionSurroundingProvider = new CSharpSelectionSurroundingProvider(Document); syntaxMode = new CSharpSyntaxMode(Document); TextEditorData.Document.SyntaxMode = syntaxMode; }
// 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 Dispose() { if (syntaxMode != null) { Editor.SemanticHighlighting = null; syntaxMode.Dispose(); syntaxMode = null; } base.Dispose(); }
public override void Dispose() { if (syntaxMode != null) { TextEditorData.Document.SyntaxMode = null; syntaxMode.Dispose(); syntaxMode = null; } base.Dispose(); }
static void OnDisableConditionalCompilation(object s, MonoDevelop.Ide.Gui.DocumentEventArgs e) { CSharpSyntaxMode mode = e.Document.Editor.Document.SyntaxMode as CSharpSyntaxMode; if (mode == null) { return; } mode.DisableConditionalHighlighting = true; e.Document.Editor.Document.CommitUpdateAll(); }
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 Initialize() { base.Initialize(); textEditorData = base.Document.Editor; textEditorData.SelectionSurroundingProvider = new CSharpSelectionSurroundingProvider(Document); 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 (); }
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(); }