コード例 #1
0
 public ToolTipProviderContext(IDotNetImageService dotNetImageService, IDecompiler decompiler, ICodeToolTipSettings codeToolTipSettings, IDocumentViewer documentViewer, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (dotNetImageService == null)
     {
         throw new ArgumentNullException(nameof(dotNetImageService));
     }
     if (decompiler == null)
     {
         throw new ArgumentNullException(nameof(decompiler));
     }
     if (codeToolTipSettings == null)
     {
         throw new ArgumentNullException(nameof(codeToolTipSettings));
     }
     if (documentViewer == null)
     {
         throw new ArgumentNullException(nameof(documentViewer));
     }
     if (classificationFormatMap == null)
     {
         throw new ArgumentNullException(nameof(classificationFormatMap));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     DocumentViewer          = documentViewer;
     this.dotNetImageService = dotNetImageService;
     Decompiler = decompiler;
     this.codeToolTipSettings            = codeToolTipSettings;
     this.classificationFormatMap        = classificationFormatMap;
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #2
0
 public CodeToolTipProvider(IWpfTextView wpfTextView, IDotNetImageService dotNetImageService, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, bool syntaxHighlight)
 {
     if (wpfTextView == null)
     {
         throw new ArgumentNullException(nameof(wpfTextView));
     }
     if (dotNetImageService == null)
     {
         throw new ArgumentNullException(nameof(dotNetImageService));
     }
     if (classificationFormatMap == null)
     {
         throw new ArgumentNullException(nameof(classificationFormatMap));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.wpfTextView                    = wpfTextView;
     this.dotNetImageService             = dotNetImageService;
     this.classificationFormatMap        = classificationFormatMap;
     this.themeClassificationTypeService = themeClassificationTypeService;
     this.syntaxHighlight                = syntaxHighlight;
     writers = new List <CodeToolTipWriter>();
     CreateNewOutput();
 }
コード例 #3
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);
		}
コード例 #4
0
 public CodeToolTipProvider(IImageManager imageManager, IDotNetImageManager dotNetImageManager, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, bool syntaxHighlight)
 {
     if (imageManager == null)
     {
         throw new ArgumentNullException(nameof(imageManager));
     }
     if (dotNetImageManager == null)
     {
         throw new ArgumentNullException(nameof(dotNetImageManager));
     }
     if (classificationFormatMap == null)
     {
         throw new ArgumentNullException(nameof(classificationFormatMap));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.imageManager                   = imageManager;
     this.dotNetImageManager             = dotNetImageManager;
     this.classificationFormatMap        = classificationFormatMap;
     this.themeClassificationTypeService = themeClassificationTypeService;
     this.syntaxHighlight                = syntaxHighlight;
     this.writers = new List <CodeToolTipWriter>();
     CreateNewOutput();
 }
コード例 #5
0
 RoslynClassificationTypes(IThemeClassificationTypeService themeClassificationTypeService)
 {
     Comment                            = themeClassificationTypeService.GetClassificationType(TextColor.Comment);
     Delegate                           = themeClassificationTypeService.GetClassificationType(TextColor.Delegate);
     Enum                               = themeClassificationTypeService.GetClassificationType(TextColor.Enum);
     EnumField                          = themeClassificationTypeService.GetClassificationType(TextColor.EnumField);
     ExcludedCode                       = themeClassificationTypeService.GetClassificationType(TextColor.ExcludedCode);
     ExtensionMethod                    = themeClassificationTypeService.GetClassificationType(TextColor.ExtensionMethod);
     InstanceEvent                      = themeClassificationTypeService.GetClassificationType(TextColor.InstanceEvent);
     InstanceField                      = themeClassificationTypeService.GetClassificationType(TextColor.InstanceField);
     InstanceMethod                     = themeClassificationTypeService.GetClassificationType(TextColor.InstanceMethod);
     InstanceProperty                   = themeClassificationTypeService.GetClassificationType(TextColor.InstanceProperty);
     Interface                          = themeClassificationTypeService.GetClassificationType(TextColor.Interface);
     Keyword                            = themeClassificationTypeService.GetClassificationType(TextColor.Keyword);
     Label                              = themeClassificationTypeService.GetClassificationType(TextColor.Label);
     LiteralField                       = themeClassificationTypeService.GetClassificationType(TextColor.LiteralField);
     Local                              = themeClassificationTypeService.GetClassificationType(TextColor.Local);
     MethodGenericParameter             = themeClassificationTypeService.GetClassificationType(TextColor.MethodGenericParameter);
     Module                             = themeClassificationTypeService.GetClassificationType(TextColor.Module);
     Namespace                          = themeClassificationTypeService.GetClassificationType(TextColor.Namespace);
     Number                             = themeClassificationTypeService.GetClassificationType(TextColor.Number);
     Operator                           = themeClassificationTypeService.GetClassificationType(TextColor.Operator);
     Parameter                          = themeClassificationTypeService.GetClassificationType(TextColor.Parameter);
     PreprocessorKeyword                = themeClassificationTypeService.GetClassificationType(TextColor.PreprocessorKeyword);
     PreprocessorText                   = themeClassificationTypeService.GetClassificationType(TextColor.PreprocessorText);
     Punctuation                        = themeClassificationTypeService.GetClassificationType(TextColor.Punctuation);
     SealedType                         = themeClassificationTypeService.GetClassificationType(TextColor.SealedType);
     StaticEvent                        = themeClassificationTypeService.GetClassificationType(TextColor.StaticEvent);
     StaticField                        = themeClassificationTypeService.GetClassificationType(TextColor.StaticField);
     StaticMethod                       = themeClassificationTypeService.GetClassificationType(TextColor.StaticMethod);
     StaticProperty                     = themeClassificationTypeService.GetClassificationType(TextColor.StaticProperty);
     StaticType                         = themeClassificationTypeService.GetClassificationType(TextColor.StaticType);
     String                             = themeClassificationTypeService.GetClassificationType(TextColor.String);
     Text                               = themeClassificationTypeService.GetClassificationType(TextColor.Text);
     Type                               = themeClassificationTypeService.GetClassificationType(TextColor.Type);
     TypeGenericParameter               = themeClassificationTypeService.GetClassificationType(TextColor.TypeGenericParameter);
     ValueType                          = themeClassificationTypeService.GetClassificationType(TextColor.ValueType);
     VerbatimString                     = themeClassificationTypeService.GetClassificationType(TextColor.VerbatimString);
     XmlDocCommentAttributeName         = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentAttributeName);
     XmlDocCommentAttributeQuotes       = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentAttributeQuotes);
     XmlDocCommentAttributeValue        = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentAttributeValue);
     XmlDocCommentCDataSection          = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentCDataSection);
     XmlDocCommentComment               = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentComment);
     XmlDocCommentDelimiter             = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentDelimiter);
     XmlDocCommentEntityReference       = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentEntityReference);
     XmlDocCommentName                  = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentName);
     XmlDocCommentProcessingInstruction = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentProcessingInstruction);
     XmlDocCommentText                  = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentText);
     XmlLiteralAttributeName            = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralAttributeName);
     XmlLiteralAttributeQuotes          = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralAttributeQuotes);
     XmlLiteralAttributeValue           = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralAttributeValue);
     XmlLiteralCDataSection             = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralCDataSection);
     XmlLiteralComment                  = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralComment);
     XmlLiteralDelimiter                = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralDelimiter);
     XmlLiteralEmbeddedExpression       = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralEmbeddedExpression);
     XmlLiteralEntityReference          = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralEntityReference);
     XmlLiteralName                     = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralName);
     XmlLiteralProcessingInstruction    = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralProcessingInstruction);
     XmlLiteralText                     = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralText);
 }
コード例 #6
0
		TextBlock TryCreateObject(StringBuilder sb, ImmutableArray<TaggedText> taggedParts, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService) {
			if (taggedParts.IsDefaultOrEmpty)
				return null;
			var text = ToString(sb, taggedParts);
			var propsSpans = CreateTextRunPropertiesAndSpans(taggedParts, classificationFormatMap, themeClassificationTypeService);
			return TextBlockFactory.Create(text, classificationFormatMap.DefaultTextProperties, propsSpans, TextBlockFactory.Flags.DisableSetTextBlockFontFamily | TextBlockFactory.Flags.DisableFontSize);
		}
コード例 #7
0
 protected SignatureHelpTaggerProviderEx(IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #8
0
 /// <summary>
 /// Gets the cached instance that contains <see cref="IClassificationType"/> values
 /// </summary>
 /// <returns></returns>
 public static RoslynClassificationTypes GetClassificationTypeInstance(IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (classificationTypeInstance == null)
     {
         Interlocked.CompareExchange(ref classificationTypeInstance, new RoslynClassificationTypes(themeClassificationTypeService), null);
     }
     return(classificationTypeInstance);
 }
コード例 #9
0
 public CompletionToolTipTextClassifier(IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #10
0
 public CompletionSuffixTextClassifier(IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     completionSuffixClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.CompletionSuffix);
 }
コード例 #11
0
 public CodeToolTipWriter(IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, bool syntaxHighlight)
 {
     this.classificationFormatMap        = classificationFormatMap ?? throw new ArgumentNullException(nameof(classificationFormatMap));
     this.themeClassificationTypeService = themeClassificationTypeService ?? throw new ArgumentNullException(nameof(themeClassificationTypeService));
     this.syntaxHighlight = syntaxHighlight;
     result = new List <ColorAndText>();
     sb     = new StringBuilder();
 }
コード例 #12
0
 public HackTaggedTextClassifier(IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #13
0
 public FilterMatchCompletionClassifier(IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     completionMatchHighlightClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.CompletionMatchHighlight);
 }
コード例 #14
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);
        }
コード例 #15
0
		IEnumerable<TextRunPropertiesAndSpan> CreateTextRunPropertiesAndSpans(ImmutableArray<TaggedText> taggedParts, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService) {
			int pos = 0;
			foreach (var part in taggedParts) {
				var color = TextTagsHelper.ToTextColor(part.Tag);
				var classificationType = themeClassificationTypeService.GetClassificationType(color);
				yield return new TextRunPropertiesAndSpan(new Span(pos, part.Text.Length), classificationFormatMap.GetTextProperties(classificationType));
				pos += part.Text.Length;
			}
		}
コード例 #16
0
 public CompletionClassifier(IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.themeClassificationTypeService = themeClassificationTypeService;
     this.punctuationClassificationType  = themeClassificationTypeService.GetClassificationType(TextColor.Punctuation);
 }
コード例 #17
0
 public RoslynTagger(IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.defaultClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.Error);
     this.roslynClassificationTypes = RoslynClassificationTypes.GetClassificationTypeInstance(themeClassificationTypeService);
 }
コード例 #18
0
 DocumentViewerToolTipServiceProvider(IDotNetImageService dotNetImageService, ICodeToolTipSettings codeToolTipSettings, IQuickInfoBroker quickInfoBroker, IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypeService themeClassificationTypeService, [ImportMany] IEnumerable <Lazy <IDocumentViewerToolTipProvider, IDocumentViewerToolTipProviderMetadata> > documentViewerToolTipProviders)
 {
     this.dotNetImageService             = dotNetImageService;
     this.codeToolTipSettings            = codeToolTipSettings;
     this.quickInfoBroker                = quickInfoBroker;
     this.classificationFormatMapService = classificationFormatMapService;
     this.themeClassificationTypeService = themeClassificationTypeService;
     this.documentViewerToolTipProviders = documentViewerToolTipProviders.OrderBy(a => a.Metadata.Order).ToArray();
 }
コード例 #19
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());
        }
コード例 #20
0
		public QuickInfoContentCreator(IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, ITextView textView) {
			if (classificationFormatMap == null)
				throw new ArgumentNullException(nameof(classificationFormatMap));
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			if (textView == null)
				throw new ArgumentNullException(nameof(textView));
			this.classificationFormatMap = classificationFormatMap;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.textView = textView;
		}
コード例 #21
0
		ReplEditorProvider(IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IClassificationTypeRegistryService classificationTypeRegistryService, IThemeClassificationTypeService themeClassificationTypeService, IPickSaveFilename pickSaveFilename, ITextViewUndoManagerProvider textViewUndoManagerProvider) {
			this.dsTextEditorFactoryService = dsTextEditorFactoryService;
			this.contentTypeRegistryService = contentTypeRegistryService;
			this.textBufferFactoryService = textBufferFactoryService;
			this.editorOperationsFactoryService = editorOperationsFactoryService;
			this.editorOptionsFactoryService = editorOptionsFactoryService;
			this.classificationTypeRegistryService = classificationTypeRegistryService;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.pickSaveFilename = pickSaveFilename;
			this.textViewUndoManagerProvider = textViewUndoManagerProvider;
		}
コード例 #22
0
		public CodeToolTipWriter(IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, bool syntaxHighlight) {
			if (classificationFormatMap == null)
				throw new ArgumentNullException(nameof(classificationFormatMap));
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			this.classificationFormatMap = classificationFormatMap;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.syntaxHighlight = syntaxHighlight;
			result = new List<ColorAndText>();
			sb = new StringBuilder();
		}
コード例 #23
0
 ReplEditorProvider(IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IClassificationTypeRegistryService classificationTypeRegistryService, IThemeClassificationTypeService themeClassificationTypeService, IPickSaveFilename pickSaveFilename)
 {
     this.dsTextEditorFactoryService        = dsTextEditorFactoryService;
     this.contentTypeRegistryService        = contentTypeRegistryService;
     this.textBufferFactoryService          = textBufferFactoryService;
     this.editorOperationsFactoryService    = editorOperationsFactoryService;
     this.editorOptionsFactoryService       = editorOptionsFactoryService;
     this.classificationTypeRegistryService = classificationTypeRegistryService;
     this.themeClassificationTypeService    = themeClassificationTypeService;
     this.pickSaveFilename = pickSaveFilename;
 }
コード例 #24
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;
 }
コード例 #25
0
 public FilterMatchCompletionClassifier(IThemeClassificationTypeService themeClassificationTypeService, CompletionCollection completionSet)
 {
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     if (completionSet == null)
     {
         throw new ArgumentNullException(nameof(completionSet));
     }
     this.completionMatchHighlightClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.CompletionMatchHighlight);
     this.completionSet = completionSet;
 }
コード例 #26
0
 public SignatureHelpTaggerEx(ITextBuffer buffer, IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException(nameof(buffer));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.buffer = buffer;
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #27
0
ファイル: ReplEditor.cs プロジェクト: weimingtom/dnSpy
 public ReplCustomLineNumberMarginOwner(IReplEditor2 replEditor, IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (replEditor == null)
     {
         throw new ArgumentNullException(nameof(replEditor));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.replEditor = replEditor;
     this.replLineNumberInput1ClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.ReplLineNumberInput1);
     this.replLineNumberInput2ClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.ReplLineNumberInput2);
     this.replLineNumberOutputClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.ReplLineNumberOutput);
 }
コード例 #28
0
 public AsyncToolTipContent(CompletionToolTipProvider owner, RoslynCompletionCollection collection, RoslynCompletion completion, ICompletionSession session, ITaggedTextElementProviderService taggedTextElementProviderService, IThemeClassificationTypeService themeClassificationTypeService)
 {
     this.owner   = owner;
     this.Session = session;
     this.cancellationTokenSource          = new CancellationTokenSource();
     this.taggedTextElementProviderService = taggedTextElementProviderService;
     this.themeClassificationTypeService   = themeClassificationTypeService;
     this.Session.Dismissed += Session_Dismissed;
     Unloaded += AsyncToolTipContent_Unloaded;
     GetDescriptionAsync(collection, completion, cancellationTokenSource.Token)
     .ContinueWith(t => {
         var ex = t.Exception;
         Dispose();
     }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
 }
コード例 #29
0
		public CodeToolTipProvider(IWpfTextView wpfTextView, IDotNetImageService dotNetImageService, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, bool syntaxHighlight) {
			if (wpfTextView == null)
				throw new ArgumentNullException(nameof(wpfTextView));
			if (dotNetImageService == null)
				throw new ArgumentNullException(nameof(dotNetImageService));
			if (classificationFormatMap == null)
				throw new ArgumentNullException(nameof(classificationFormatMap));
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			this.wpfTextView = wpfTextView;
			this.dotNetImageService = dotNetImageService;
			this.classificationFormatMap = classificationFormatMap;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.syntaxHighlight = syntaxHighlight;
			writers = new List<CodeToolTipWriter>();
			CreateNewOutput();
		}
コード例 #30
0
 public QuickInfoContentCreator(IRoslynGlyphService roslynGlyphService, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (roslynGlyphService == null)
     {
         throw new ArgumentNullException(nameof(roslynGlyphService));
     }
     if (classificationFormatMap == null)
     {
         throw new ArgumentNullException(nameof(classificationFormatMap));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.roslynGlyphService             = roslynGlyphService;
     this.classificationFormatMap        = classificationFormatMap;
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #31
0
 public QuickInfoContentCreator(IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, ITextView textView)
 {
     if (classificationFormatMap == null)
     {
         throw new ArgumentNullException(nameof(classificationFormatMap));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     if (textView == null)
     {
         throw new ArgumentNullException(nameof(textView));
     }
     this.classificationFormatMap        = classificationFormatMap;
     this.themeClassificationTypeService = themeClassificationTypeService;
     this.textView = textView;
 }
コード例 #32
0
 public DocumentViewerToolTipService(IImageManager imageManager, IDotNetImageManager dotNetImageManager, ICodeToolTipSettings codeToolTipSettings, Lazy <IDocumentViewerToolTipProvider, IDocumentViewerToolTipProviderMetadata>[] documentViewerToolTipProviders, IDocumentViewer documentViewer, IQuickInfoBroker quickInfoBroker, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService)
 {
     if (imageManager == null)
     {
         throw new ArgumentNullException(nameof(imageManager));
     }
     if (dotNetImageManager == null)
     {
         throw new ArgumentNullException(nameof(dotNetImageManager));
     }
     if (codeToolTipSettings == null)
     {
         throw new ArgumentNullException(nameof(codeToolTipSettings));
     }
     if (documentViewerToolTipProviders == null)
     {
         throw new ArgumentNullException(nameof(documentViewerToolTipProviders));
     }
     if (documentViewer == null)
     {
         throw new ArgumentNullException(nameof(documentViewer));
     }
     if (quickInfoBroker == null)
     {
         throw new ArgumentNullException(nameof(quickInfoBroker));
     }
     if (classificationFormatMap == null)
     {
         throw new ArgumentNullException(nameof(classificationFormatMap));
     }
     if (themeClassificationTypeService == null)
     {
         throw new ArgumentNullException(nameof(themeClassificationTypeService));
     }
     this.imageManager                   = imageManager;
     this.dotNetImageManager             = dotNetImageManager;
     this.codeToolTipSettings            = codeToolTipSettings;
     this.documentViewerToolTipProviders = documentViewerToolTipProviders;
     this.documentViewer                 = documentViewer;
     this.quickInfoBroker                = quickInfoBroker;
     this.classificationFormatMap        = classificationFormatMap;
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #33
0
		public ToolTipProviderContext(IDotNetImageService dotNetImageService, IDecompiler decompiler, ICodeToolTipSettings codeToolTipSettings, IDocumentViewer documentViewer, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService) {
			if (dotNetImageService == null)
				throw new ArgumentNullException(nameof(dotNetImageService));
			if (decompiler == null)
				throw new ArgumentNullException(nameof(decompiler));
			if (codeToolTipSettings == null)
				throw new ArgumentNullException(nameof(codeToolTipSettings));
			if (documentViewer == null)
				throw new ArgumentNullException(nameof(documentViewer));
			if (classificationFormatMap == null)
				throw new ArgumentNullException(nameof(classificationFormatMap));
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			DocumentViewer = documentViewer;
			this.dotNetImageService = dotNetImageService;
			Decompiler = decompiler;
			this.codeToolTipSettings = codeToolTipSettings;
			this.classificationFormatMap = classificationFormatMap;
			this.themeClassificationTypeService = themeClassificationTypeService;
		}
コード例 #34
0
		public InformationQuickInfoContentVM(ITextView textView, InformationQuickInfoContent content, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService) {
			if (textView == null)
				throw new ArgumentNullException(nameof(textView));
			if (content == null)
				throw new ArgumentNullException(nameof(content));
			if (classificationFormatMap == null)
				throw new ArgumentNullException(nameof(classificationFormatMap));
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			var sb = new StringBuilder();
			if (content.SymbolGlyph != null)
				SymbolImageReference = content.SymbolGlyph.Value.GetImageReference() ?? default(ImageReference);
			if (content.WarningGlyph != null)
				WarningImageReference = content.WarningGlyph.Value.GetImageReference() ?? default(ImageReference);
			MainDescriptionObject = TryCreateObject(sb, content.MainDescription, classificationFormatMap, themeClassificationTypeService);
			DocumentationObject = TryCreateObject(sb, content.Documentation, classificationFormatMap, themeClassificationTypeService);
			UsageObject = TryCreateObject(sb, content.UsageText, classificationFormatMap, themeClassificationTypeService);
			TypeParameterMapObject = TryCreateObject(sb, content.TypeParameterMap, classificationFormatMap, themeClassificationTypeService);
			AnonymousTypesObject = TryCreateObject(sb, content.AnonymousTypes, classificationFormatMap, themeClassificationTypeService);
			ExceptionObject = TryCreateObject(sb, content.ExceptionText, classificationFormatMap, themeClassificationTypeService);
		}
コード例 #35
0
ファイル: ReplEditor.cs プロジェクト: manojdjoshi/dnSpy
		public ReplEditor(ReplEditorOptions options, IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IClassificationTypeRegistryService classificationTypeRegistryService, IThemeClassificationTypeService themeClassificationTypeService, IPickSaveFilename pickSaveFilename, ITextViewUndoManagerProvider textViewUndoManagerProvider) {
			dispatcher = Dispatcher.CurrentDispatcher;
			this.pickSaveFilename = pickSaveFilename;
			options = options?.Clone() ?? new ReplEditorOptions();
			options.CreateGuidObjects = CommonGuidObjectsProvider.Create(options.CreateGuidObjects, new GuidObjectsProvider(this));
			PrimaryPrompt = options.PrimaryPrompt;
			SecondaryPrompt = options.SecondaryPrompt;
			subBuffers = new List<ReplSubBuffer>();
			cachedColorsList = new CachedColorsList();
			TextClassificationType = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.Text);
			ReplPrompt1ClassificationType = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.ReplPrompt1);
			ReplPrompt2ClassificationType = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.ReplPrompt2);

			var contentType = contentTypeRegistryService.GetContentType(options.ContentType, options.ContentTypeString) ?? textBufferFactoryService.TextContentType;
			var textBuffer = textBufferFactoryService.CreateTextBuffer(contentType);
			CachedColorsListTaggerProvider.AddColorizer(textBuffer, cachedColorsList);
			var roles = dsTextEditorFactoryService.CreateTextViewRoleSet(options.Roles);
			var textView = dsTextEditorFactoryService.CreateTextView(textBuffer, roles, editorOptionsFactoryService.GlobalOptions, options);
			var wpfTextViewHost = dsTextEditorFactoryService.CreateTextViewHost(textView, false);
			this.wpfTextViewHost = wpfTextViewHost;
			wpfTextView = wpfTextViewHost.TextView;
			textViewUndoManager = textViewUndoManagerProvider.GetTextViewUndoManager(wpfTextView);
			ReplEditorUtils.AddInstance(this, wpfTextView);
			wpfTextView.Options.SetOptionValue(DefaultWpfViewOptions.AppearanceCategory, AppearanceCategoryConstants.TextEditor);
			wpfTextView.Options.SetOptionValue(DefaultTextViewOptions.DragDropEditingId, false);
			//TODO: ReplEditorOperations doesn't support virtual space
			wpfTextView.Options.SetOptionValue(DefaultTextViewOptions.UseVirtualSpaceId, false);
			//TODO: Support box selection
			wpfTextView.Options.SetOptionValue(DefaultDsTextViewOptions.AllowBoxSelectionId, false);
			wpfTextView.Options.OptionChanged += Options_OptionChanged;
			wpfTextView.TextBuffer.ChangedLowPriority += TextBuffer_ChangedLowPriority;
			wpfTextView.Closed += WpfTextView_Closed;
			wpfTextView.TextBuffer.Changed += TextBuffer_Changed;
			AddNewDocument();
			WriteOffsetOfPrompt(null, true);
			ReplEditorOperations = new ReplEditorOperations(this, wpfTextView, editorOperationsFactoryService);
			wpfTextView.VisualElement.Loaded += WpfTextView_Loaded;
			UpdateRefreshScreenOnChange();
			CustomLineNumberMargin.SetOwner(wpfTextView, new ReplCustomLineNumberMarginOwner(this, themeClassificationTypeService));
		}
コード例 #36
0
		public CompletionSuffixTextClassifier(IThemeClassificationTypeService themeClassificationTypeService) {
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			completionSuffixClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.CompletionSuffix);
		}
コード例 #37
0
 CompletionSuffixTextClassifierProvider(IThemeClassificationTypeService themeClassificationTypeService) => this.themeClassificationTypeService = themeClassificationTypeService;
コード例 #38
0
		public CompletionClassifier(IThemeClassificationTypeService themeClassificationTypeService) {
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			this.themeClassificationTypeService = themeClassificationTypeService;
			punctuationClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.Punctuation);
		}
コード例 #39
0
		RoslynClassificationTypes(IThemeClassificationTypeService themeClassificationTypeService) {
			Comment = themeClassificationTypeService.GetClassificationType(TextColor.Comment);
			Delegate = themeClassificationTypeService.GetClassificationType(TextColor.Delegate);
			Enum = themeClassificationTypeService.GetClassificationType(TextColor.Enum);
			EnumField = themeClassificationTypeService.GetClassificationType(TextColor.EnumField);
			ExcludedCode = themeClassificationTypeService.GetClassificationType(TextColor.ExcludedCode);
			ExtensionMethod = themeClassificationTypeService.GetClassificationType(TextColor.ExtensionMethod);
			InstanceEvent = themeClassificationTypeService.GetClassificationType(TextColor.InstanceEvent);
			InstanceField = themeClassificationTypeService.GetClassificationType(TextColor.InstanceField);
			InstanceMethod = themeClassificationTypeService.GetClassificationType(TextColor.InstanceMethod);
			InstanceProperty = themeClassificationTypeService.GetClassificationType(TextColor.InstanceProperty);
			Interface = themeClassificationTypeService.GetClassificationType(TextColor.Interface);
			Keyword = themeClassificationTypeService.GetClassificationType(TextColor.Keyword);
			Label = themeClassificationTypeService.GetClassificationType(TextColor.Label);
			LiteralField = themeClassificationTypeService.GetClassificationType(TextColor.LiteralField);
			Local = themeClassificationTypeService.GetClassificationType(TextColor.Local);
			MethodGenericParameter = themeClassificationTypeService.GetClassificationType(TextColor.MethodGenericParameter);
			Module = themeClassificationTypeService.GetClassificationType(TextColor.Module);
			Namespace = themeClassificationTypeService.GetClassificationType(TextColor.Namespace);
			Number = themeClassificationTypeService.GetClassificationType(TextColor.Number);
			Operator = themeClassificationTypeService.GetClassificationType(TextColor.Operator);
			Parameter = themeClassificationTypeService.GetClassificationType(TextColor.Parameter);
			PreprocessorKeyword = themeClassificationTypeService.GetClassificationType(TextColor.PreprocessorKeyword);
			PreprocessorText = themeClassificationTypeService.GetClassificationType(TextColor.PreprocessorText);
			Punctuation = themeClassificationTypeService.GetClassificationType(TextColor.Punctuation);
			SealedType = themeClassificationTypeService.GetClassificationType(TextColor.SealedType);
			StaticEvent = themeClassificationTypeService.GetClassificationType(TextColor.StaticEvent);
			StaticField = themeClassificationTypeService.GetClassificationType(TextColor.StaticField);
			StaticMethod = themeClassificationTypeService.GetClassificationType(TextColor.StaticMethod);
			StaticProperty = themeClassificationTypeService.GetClassificationType(TextColor.StaticProperty);
			StaticType = themeClassificationTypeService.GetClassificationType(TextColor.StaticType);
			String = themeClassificationTypeService.GetClassificationType(TextColor.String);
			Text = themeClassificationTypeService.GetClassificationType(TextColor.Text);
			Type = themeClassificationTypeService.GetClassificationType(TextColor.Type);
			TypeGenericParameter = themeClassificationTypeService.GetClassificationType(TextColor.TypeGenericParameter);
			ValueType = themeClassificationTypeService.GetClassificationType(TextColor.ValueType);
			VerbatimString = themeClassificationTypeService.GetClassificationType(TextColor.VerbatimString);
			XmlDocCommentAttributeName = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentAttributeName);
			XmlDocCommentAttributeQuotes = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentAttributeQuotes);
			XmlDocCommentAttributeValue = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentAttributeValue);
			XmlDocCommentCDataSection = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentCDataSection);
			XmlDocCommentComment = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentComment);
			XmlDocCommentDelimiter = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentDelimiter);
			XmlDocCommentEntityReference = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentEntityReference);
			XmlDocCommentName = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentName);
			XmlDocCommentProcessingInstruction = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentProcessingInstruction);
			XmlDocCommentText = themeClassificationTypeService.GetClassificationType(TextColor.XmlDocCommentText);
			XmlLiteralAttributeName = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralAttributeName);
			XmlLiteralAttributeQuotes = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralAttributeQuotes);
			XmlLiteralAttributeValue = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralAttributeValue);
			XmlLiteralCDataSection = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralCDataSection);
			XmlLiteralComment = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralComment);
			XmlLiteralDelimiter = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralDelimiter);
			XmlLiteralEmbeddedExpression = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralEmbeddedExpression);
			XmlLiteralEntityReference = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralEntityReference);
			XmlLiteralName = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralName);
			XmlLiteralProcessingInstruction = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralProcessingInstruction);
			XmlLiteralText = themeClassificationTypeService.GetClassificationType(TextColor.XmlLiteralText);
		}
コード例 #40
0
ファイル: LineNumberMargin.cs プロジェクト: manojdjoshi/dnSpy
		public LineNumberMargin(IWpfTextViewHost wpfTextViewHost, IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypeService themeClassificationTypeService, ITextFormatterProvider textFormatterProvider)
			: base(PredefinedMarginNames.LineNumber, wpfTextViewHost, classificationFormatMapService, textFormatterProvider) {
			lineNumberClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.LineNumber);
		}
コード例 #41
0
		DocumentViewerToolTipServiceProvider(IDotNetImageService dotNetImageService, ICodeToolTipSettings codeToolTipSettings, IQuickInfoBroker quickInfoBroker, IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypeService themeClassificationTypeService, IDecompilerService decompilerService, [ImportMany] IEnumerable<Lazy<IDocumentViewerToolTipProvider, IDocumentViewerToolTipProviderMetadata>> documentViewerToolTipProviders) {
			this.dotNetImageService = dotNetImageService;
			this.codeToolTipSettings = codeToolTipSettings;
			this.quickInfoBroker = quickInfoBroker;
			this.classificationFormatMapService = classificationFormatMapService;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.decompilerService = decompilerService;
			this.documentViewerToolTipProviders = documentViewerToolTipProviders.OrderBy(a => a.Metadata.Order).ToArray();
		}
コード例 #42
0
		CompletionToolTipTextClassifierProvider(IThemeClassificationTypeService themeClassificationTypeService) {
			this.themeClassificationTypeService = themeClassificationTypeService;
		}
コード例 #43
0
		public DefaultTextClassifier(IThemeClassificationTypeService themeClassificationTypeService) {
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			this.themeClassificationTypeService = themeClassificationTypeService;
		}
コード例 #44
0
		public DocumentViewerToolTipService(IDotNetImageService dotNetImageService, ICodeToolTipSettings codeToolTipSettings, Lazy<IDocumentViewerToolTipProvider, IDocumentViewerToolTipProviderMetadata>[] documentViewerToolTipProviders, IDocumentViewer documentViewer, IQuickInfoBroker quickInfoBroker, IClassificationFormatMap classificationFormatMap, IThemeClassificationTypeService themeClassificationTypeService, IDecompilerService decompilerService) {
			if (dotNetImageService == null)
				throw new ArgumentNullException(nameof(dotNetImageService));
			if (codeToolTipSettings == null)
				throw new ArgumentNullException(nameof(codeToolTipSettings));
			if (documentViewerToolTipProviders == null)
				throw new ArgumentNullException(nameof(documentViewerToolTipProviders));
			if (documentViewer == null)
				throw new ArgumentNullException(nameof(documentViewer));
			if (quickInfoBroker == null)
				throw new ArgumentNullException(nameof(quickInfoBroker));
			if (classificationFormatMap == null)
				throw new ArgumentNullException(nameof(classificationFormatMap));
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			if (decompilerService == null)
				throw new ArgumentNullException(nameof(decompilerService));
			this.dotNetImageService = dotNetImageService;
			this.codeToolTipSettings = codeToolTipSettings;
			this.documentViewerToolTipProviders = documentViewerToolTipProviders;
			this.documentViewer = documentViewer;
			this.quickInfoBroker = quickInfoBroker;
			this.classificationFormatMap = classificationFormatMap;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.decompilerService = decompilerService;
		}
コード例 #45
0
		OpenFromGACTextClassifierProvider(IThemeClassificationTypeService themeClassificationTypeService) {
			gacMatchHighlightClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.GacMatchHighlight);
		}
コード例 #46
0
		DefaultTextClassifierProvider(IThemeClassificationTypeService themeClassificationTypeService) {
			this.themeClassificationTypeService = themeClassificationTypeService;
		}
コード例 #47
0
		AppSettingsSearchTextClassifierProvider(IThemeClassificationTypeService themeClassificationTypeService) {
			appSettingsTextMatchHighlightClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.AppSettingsTextMatchHighlight);
		}
コード例 #48
0
		FilterMatchCompletionClassifierProvider(IThemeClassificationTypeService themeClassificationTypeService) {
			this.themeClassificationTypeService = themeClassificationTypeService;
		}
コード例 #49
0
		public FilterMatchCompletionClassifier(IThemeClassificationTypeService themeClassificationTypeService) {
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			completionMatchHighlightClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.CompletionMatchHighlight);
		}
コード例 #50
0
		QuickInfoContentCreatorProvider(IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypeService themeClassificationTypeService) {
			this.classificationFormatMapService = classificationFormatMapService;
			this.themeClassificationTypeService = themeClassificationTypeService;
		}
コード例 #51
0
ファイル: ReplEditor.cs プロジェクト: manojdjoshi/dnSpy
		public ReplCustomLineNumberMarginOwner(IReplEditor2 replEditor, IThemeClassificationTypeService themeClassificationTypeService) {
			if (replEditor == null)
				throw new ArgumentNullException(nameof(replEditor));
			if (themeClassificationTypeService == null)
				throw new ArgumentNullException(nameof(themeClassificationTypeService));
			this.replEditor = replEditor;
			replLineNumberInput1ClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.ReplLineNumberInput1);
			replLineNumberInput2ClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.ReplLineNumberInput2);
			replLineNumberOutputClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.ReplLineNumberOutput);
		}
コード例 #52
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());
		}
コード例 #53
0
#pragma warning restore 1591 // Missing XML comment for publicly visible type or member

		/// <summary>
		/// Gets the cached instance that contains <see cref="IClassificationType"/> values
		/// </summary>
		/// <returns></returns>
		public static RoslynClassificationTypes GetClassificationTypeInstance(IThemeClassificationTypeService themeClassificationTypeService) {
			if (classificationTypeInstance == null)
				Interlocked.CompareExchange(ref classificationTypeInstance, new RoslynClassificationTypes(themeClassificationTypeService), null);
			return classificationTypeInstance;
		}
コード例 #54
0
 CompletionClassifierProvider(IThemeClassificationTypeService themeClassificationTypeService)
 {
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #55
0
 QuickInfoContentCreatorProvider(IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypeService themeClassificationTypeService)
 {
     this.classificationFormatMapService = classificationFormatMapService;
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #56
0
 CachedColorsListTaggerProvider(IThemeClassificationTypeService themeClassificationTypeService)
 {
     this.themeClassificationTypeService = themeClassificationTypeService;
 }
コード例 #57
0
ファイル: SpacerMargin.cs プロジェクト: manojdjoshi/dnSpy
		SpacerMarginProvider(IClassificationFormatMapService classificationFormatMapService, IThemeClassificationTypeService themeClassificationTypeService, ITextFormatterProvider textFormatterProvider) {
			this.classificationFormatMapService = classificationFormatMapService;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.textFormatterProvider = textFormatterProvider;
		}
コード例 #58
0
 RoslynTaggerProvider(IThemeClassificationTypeService themeClassificationTypeService, IRoslynDocumentChangedService roslynDocumentChangedService)
 {
     this.themeClassificationTypeService = themeClassificationTypeService;
     this.roslynDocumentChangedService   = roslynDocumentChangedService;
 }
コード例 #59
0
		OpenDocumentListTextClassifierProvider(IThemeClassificationTypeService themeClassificationTypeService) {
			documentListMatchHighlightClassificationType = themeClassificationTypeService.GetClassificationType(TextColor.DocumentListMatchHighlight);
		}