Ejemplo n.º 1
0
 CSharpLanguageCompilerProvider(ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider)
 {
     this.codeEditorProvider           = codeEditorProvider;
     this.docFactory                   = docFactory;
     this.roslynDocumentChangedService = roslynDocumentChangedService;
     this.textViewUndoManagerProvider  = textViewUndoManagerProvider;
 }
Ejemplo n.º 2
0
		FirstUseOptimizationLoader(IThemeClassificationTypeService themeClassificationTypeService, ITextBufferFactoryService textBufferFactoryService, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService) {
			// This method is currently only called when compiling the code so add an early test
			// that it's still working in case ImmutableArray<T> gets updated.
			ImmutableArrayUtilities<byte>.ToImmutableArray(Array.Empty<byte>());

			new FirstUseOptimization(themeClassificationTypeService, textBufferFactoryService, docFactory, roslynDocumentChangedService);
		}
Ejemplo n.º 3
0
 protected RoslynLanguageCompiler(CompilationKind kind, ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider)
 {
     this.codeEditorProvider           = codeEditorProvider ?? throw new ArgumentNullException(nameof(codeEditorProvider));
     this.docFactory                   = docFactory ?? throw new ArgumentNullException(nameof(docFactory));
     this.roslynDocumentChangedService = roslynDocumentChangedService ?? throw new ArgumentNullException(nameof(roslynDocumentChangedService));
     this.textViewUndoManagerProvider  = textViewUndoManagerProvider ?? throw new ArgumentNullException(nameof(textViewUndoManagerProvider));
     documents = new List <RoslynCodeDocument>();
 }
 VisualBasicLanguageCompilerProvider(VisualBasicCompilerSettings visualBasicCompilerSettings, ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider)
 {
     this.visualBasicCompilerSettings = visualBasicCompilerSettings;
     this.codeEditorProvider          = codeEditorProvider;
     this.docFactory = docFactory;
     this.roslynDocumentChangedService = roslynDocumentChangedService;
     this.textViewUndoManagerProvider  = textViewUndoManagerProvider;
 }
Ejemplo n.º 5
0
 protected RoslynLanguageCompiler(CompilationKind kind, ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider)
 {
     this.codeEditorProvider           = codeEditorProvider ?? throw new ArgumentNullException(nameof(codeEditorProvider));
     this.docFactory                   = docFactory ?? throw new ArgumentNullException(nameof(docFactory));
     this.roslynDocumentChangedService = roslynDocumentChangedService ?? throw new ArgumentNullException(nameof(roslynDocumentChangedService));
     this.textViewUndoManagerProvider  = textViewUndoManagerProvider ?? throw new ArgumentNullException(nameof(textViewUndoManagerProvider));
     DefaultOutputKind                 = GetDefaultOutputKind(kind);
     documents       = new List <RoslynCodeDocument>();
     projectId       = ProjectId.CreateNewId();
     loadedDocuments = new HashSet <DocumentId>();
 }
Ejemplo n.º 6
0
 public RoslynTagger(ITextBuffer textBuffer, IThemeClassificationTypeService themeClassificationTypeService, IRoslynDocumentChangedService roslynDocumentChangedService)
 {
     if (themeClassificationTypeService is null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.textBuffer                               = textBuffer ?? throw new ArgumentNullException(nameof(textBuffer));
     defaultClassificationType                     = themeClassificationTypeService.GetClassificationType(TextColor.Error);
     roslynClassificationTypes                     = RoslynClassificationTypes.GetClassificationTypeInstance(themeClassificationTypeService);
     this.roslynDocumentChangedService             = roslynDocumentChangedService ?? throw new ArgumentNullException(nameof(roslynDocumentChangedService));
     roslynDocumentChangedService.DocumentChanged += RoslynDocumentChangedService_DocumentChanged;
 }
Ejemplo n.º 7
0
		protected RoslynLanguageCompiler(CompilationKind kind, ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider) {
			if (codeEditorProvider == null)
				throw new ArgumentNullException(nameof(codeEditorProvider));
			if (docFactory == null)
				throw new ArgumentNullException(nameof(docFactory));
			if (roslynDocumentChangedService == null)
				throw new ArgumentNullException(nameof(roslynDocumentChangedService));
			if (textViewUndoManagerProvider == null)
				throw new ArgumentNullException(nameof(textViewUndoManagerProvider));
			this.codeEditorProvider = codeEditorProvider;
			this.docFactory = docFactory;
			this.roslynDocumentChangedService = roslynDocumentChangedService;
			this.textViewUndoManagerProvider = textViewUndoManagerProvider;
			documents = new List<RoslynCodeDocument>();
		}
Ejemplo n.º 8
0
 protected RoslynLanguageCompiler(ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService)
 {
     if (codeEditorProvider == null)
     {
         throw new ArgumentNullException(nameof(codeEditorProvider));
     }
     if (docFactory == null)
     {
         throw new ArgumentNullException(nameof(docFactory));
     }
     if (roslynDocumentChangedService == null)
     {
         throw new ArgumentNullException(nameof(roslynDocumentChangedService));
     }
     this.codeEditorProvider           = codeEditorProvider;
     this.docFactory                   = docFactory;
     this.roslynDocumentChangedService = roslynDocumentChangedService;
     this.documents = new List <RoslynCodeDocument>();
 }
Ejemplo n.º 9
0
 RoslynTaggerProvider(IThemeClassificationTypeService themeClassificationTypeService, IRoslynDocumentChangedService roslynDocumentChangedService)
 {
     this.themeClassificationTypeService = themeClassificationTypeService;
     this.roslynDocumentChangedService   = roslynDocumentChangedService;
 }
Ejemplo n.º 10
0
 public CSharpLanguageCompiler(CompilationKind kind, CSharpCompilerSettings csharpCompilerSettings, ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider)
     : base(kind, codeEditorProvider, docFactory, roslynDocumentChangedService, textViewUndoManagerProvider) =>
     this.csharpCompilerSettings = csharpCompilerSettings ?? throw new ArgumentNullException(nameof(csharpCompilerSettings));
Ejemplo n.º 11
0
        public FirstUseOptimization(IThemeClassificationTypeService themeClassificationTypeService, ITextBufferFactoryService textBufferFactoryService, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService)
        {
            var buffer = textBufferFactoryService.CreateTextBuffer();
            var tagger = new RoslynTagger(buffer, themeClassificationTypeService, roslynDocumentChangedService);

            Task.Run(() => InitializeAsync(buffer, tagger, docFactory))
            .ContinueWith(t => {
                var ex = t.Exception;
                Debug.Assert(ex == null);
            }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
        }
Ejemplo n.º 12
0
        FirstUseOptimizationLoader(IThemeClassificationTypeService themeClassificationTypeService, ITextBufferFactoryService textBufferFactoryService, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService)
        {
            // This method is currently only called when compiling the code so add an early test
            // that it's still working in case ImmutableArray<T> gets updated.
            ImmutableArrayUtilities <byte> .ToImmutableArray(Array.Empty <byte>());

            new FirstUseOptimization(themeClassificationTypeService, textBufferFactoryService, docFactory, roslynDocumentChangedService);
        }
Ejemplo n.º 13
0
 public CSharpLanguageCompiler(ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService)
     : base(codeEditorProvider, docFactory, roslynDocumentChangedService)
 {
 }
Ejemplo n.º 14
0
		public FirstUseOptimization(IThemeClassificationTypeService themeClassificationTypeService, ITextBufferFactoryService textBufferFactoryService, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService) {
			var buffer = textBufferFactoryService.CreateTextBuffer();
			var tagger = new RoslynTagger(buffer, themeClassificationTypeService, roslynDocumentChangedService);
			Task.Run(() => InitializeAsync(buffer, tagger, docFactory))
			.ContinueWith(t => {
				var ex = t.Exception;
				Debug.Assert(ex == null);
			}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
		}
 public VisualBasicLanguageCompiler(ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider)
     : base(codeEditorProvider, docFactory, roslynDocumentChangedService, textViewUndoManagerProvider)
 {
 }
		public VisualBasicLanguageCompiler(CompilationKind kind, ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider)
			: base(kind, codeEditorProvider, docFactory, roslynDocumentChangedService, textViewUndoManagerProvider) {
		}
		VisualBasicLanguageCompilerCreator(ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider) {
			this.codeEditorProvider = codeEditorProvider;
			this.docFactory = docFactory;
			this.roslynDocumentChangedService = roslynDocumentChangedService;
			this.textViewUndoManagerProvider = textViewUndoManagerProvider;
		}
Ejemplo n.º 18
0
 FirstUseOptimizationLoader(IThemeClassificationTypeService themeClassificationTypeService, ITextBufferFactoryService textBufferFactoryService, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService)
 {
     new FirstUseOptimization(themeClassificationTypeService, textBufferFactoryService, docFactory, roslynDocumentChangedService);
 }
Ejemplo n.º 19
0
 public CSharpLanguageCompiler(CompilationKind kind, ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService, ITextViewUndoManagerProvider textViewUndoManagerProvider)
     : base(kind, codeEditorProvider, docFactory, roslynDocumentChangedService, textViewUndoManagerProvider)
 {
 }
Ejemplo n.º 20
0
 CSharpLanguageCompilerProvider(ICodeEditorProvider codeEditorProvider, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService)
 {
     this.codeEditorProvider           = codeEditorProvider;
     this.docFactory                   = docFactory;
     this.roslynDocumentChangedService = roslynDocumentChangedService;
 }