예제 #1
0
		public CodeEditorAdapter(CodeEditor codeEditor, CodeEditorView textEditor) : base(textEditor)
		{
			if (codeEditor == null)
				throw new ArgumentNullException("codeEditor");
			this.codeEditor = codeEditor;
			options = CodeEditorOptions.Instance;
		}
예제 #2
0
		public TextMarkerService(CodeEditor codeEditor)
		{
			if (codeEditor == null)
				throw new ArgumentNullException("codeEditor");
			this.codeEditor = codeEditor;
			codeEditor.DocumentChanged += codeEditor_DocumentChanged;
			codeEditor_DocumentChanged(null, null);
		}
 Task CreateParseTypeScriptFileTask(CodeEditor editor)
 {
     ITextBuffer fileContent = editor.DocumentAdapter.CreateSnapshot();
     return Task
         .Factory
         .StartNew(() => ParseTypeScriptFile(editor.FileName, fileContent))
         .ContinueWith(task => UpdateParseInformation(task.Result), TaskScheduler.FromCurrentSynchronizationContext());
 }
		public OverlayUIElementContainer(CodeEditor codeEditor)
		{
			if (codeEditor == null)
				throw new ArgumentNullException("codeEditor");
			this.codeEditor = codeEditor;
			
			Background = SystemColors.WindowBrush;
			Foreground = SystemColors.WindowTextBrush;
			HorizontalAlignment = HorizontalAlignment.Right;
			VerticalAlignment = VerticalAlignment.Bottom;
			MaxWidth = 300;
			Margin = new Thickness(0, 0, 20, 20);
		}
		Task CreateParseTypeScriptFileTask(CodeEditor editor)
		{
			ITextSource fileContent = editor.Document.CreateSnapshot();
			TypeScriptProject project = TypeScriptService.GetProjectForFile(editor.FileName);
			return Task
				.Factory
				.StartNew(() => ParseTypeScriptFile(editor.FileName, fileContent, project))
				.ContinueWith(task => UpdateParseInformation(task.Result), TaskScheduler.FromCurrentSynchronizationContext());
		}
		private NewLineConsistencyCheck(CodeEditor editor)
		{
			this.editor = editor;
			this.snapshot = editor.Document.CreateSnapshot();
		}
		public static void StartConsistencyCheck(CodeEditor editor)
		{
			NewLineConsistencyCheck c = new NewLineConsistencyCheck(editor);
			ThreadPool.QueueUserWorkItem(c.CheckNewLinesForConsistency);
		}
예제 #8
0
 private NewLineConsistencyCheck(CodeEditor editor)
 {
     this.editor   = editor;
     this.snapshot = editor.Document.CreateSnapshot();
 }
예제 #9
0
        public static void StartConsistencyCheck(CodeEditor editor)
        {
            NewLineConsistencyCheck c = new NewLineConsistencyCheck(editor);

            ThreadPool.QueueUserWorkItem(c.CheckNewLinesForConsistency);
        }