Пример #1
0
 protected override void Initialize()
 {
     base.Initialize();
     Editor.SetSelectionSurroundingProvider(new CSharpSelectionSurroundingProvider(Editor, DocumentContext));
     syntaxMode = new CSharpSyntaxMode(Editor, DocumentContext);
     Editor.SemanticHighlighting = syntaxMode;
 }
Пример #2
0
 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;
        }
Пример #4
0
            //		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);
//					}
//				}
            }
Пример #5
0
 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();
 }
Пример #7
0
        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;
		}
Пример #9
0
        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 ();
		}
Пример #11
0
        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();
        }