コード例 #1
0
 public ReferenceHighlightingViewTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners) :
     base(new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.ReferenceHighlighting), notificationService)
 {
     _semanticChangeNotificationService = semanticChangeNotificationService;
 }
コード例 #2
0
 public ReferenceHighlightingViewTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     IAsynchronousOperationListenerProvider listenerProvider)
     : base(listenerProvider.GetListener(FeatureAttribute.ReferenceHighlighting), notificationService)
 {
     _semanticChangeNotificationService = semanticChangeNotificationService;
 }
コード例 #3
0
 public SemanticClassificationTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     ClassificationTypeMap typeMap,
     [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners)
     : base(new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.Classification), notificationService)
 {
     _semanticChangeNotificationService = semanticChangeNotificationService;
     _typeMap = typeMap;
 }
コード例 #4
0
 public SemanticClassificationViewTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     ClassificationTypeMap typeMap,
     IAsynchronousOperationListenerProvider listenerProvider)
     : base(listenerProvider.GetListener(FeatureAttribute.Classification), notificationService)
 {
     _semanticChangeNotificationService = semanticChangeNotificationService;
     _typeMap = typeMap;
 }
コード例 #5
0
 public SemanticClassificationBufferTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     ClassificationTypeMap typeMap,
     IAsynchronousOperationListenerProvider listenerProvider)
 {
     _notificationService = notificationService;
     _semanticChangeNotificationService = semanticChangeNotificationService;
     _typeMap       = typeMap;
     _asyncListener = listenerProvider.GetListener(FeatureAttribute.Classification);
 }
コード例 #6
0
        public RoslynClassificationHighlighting(MonoDevelopWorkspace workspace, DocumentId documentId, string defaultScope)
        {
            this.workspace    = workspace;
            this.documentId   = documentId;
            this.defaultScope = new ScopeStack(defaultScope);
            this.userScope    = this.defaultScope.Push(EditorThemeColors.UserTypes);

            classificationMap = GetClassificationMap(defaultScope);

            semanticChangeNotificationService = Composition.CompositionManager.GetExportedValue <ISemanticChangeNotificationService> ();
            if (semanticChangeNotificationService != null)
            {
                semanticChangeNotificationService.OpenedDocumentSemanticChanged += SemanticChangeNotificationService_OpenedDocumentSemanticChanged;
            }
            workspace.WorkspaceChanged += Workspace_WorkspaceChanged;
        }
コード例 #7
0
 /// <summary>
 /// Reports an event any time the semantics have changed such that this 
 /// <paramref name="subjectBuffer"/> should be retagged.  Semantics are considered changed 
 /// for a buffer if an edit happens directly in that buffer, or if a top level visible 
 /// change happens in any sibling document or in any dependent projects' documents.
 /// </summary>
 public static ITaggerEventSource OnSemanticChanged(ITextBuffer subjectBuffer, TaggerDelay delay, ISemanticChangeNotificationService notificationService)
 {
     return new SemanticChangedEventSource(subjectBuffer, delay, notificationService);
 }
コード例 #8
0
 public SemanticChangedEventSource(ITextBuffer subjectBuffer, TaggerDelay delay, ISemanticChangeNotificationService notificationService) :
     base(subjectBuffer, delay)
 {
     _notificationService = notificationService;
 }
 public SemanticChangedEventSource(ITextBuffer subjectBuffer, TaggerDelay delay, ISemanticChangeNotificationService notificationService) :
     base(subjectBuffer, delay)
 {
     _notificationService = notificationService;
 }
コード例 #10
0
 /// <summary>
 /// Reports an event any time the semantics have changed such that this
 /// <paramref name="subjectBuffer"/> should be retagged.  Semantics are considered changed
 /// for a buffer if an edit happens directly in that buffer, or if a top level visible
 /// change happens in any sibling document or in any dependent projects' documents.
 /// </summary>
 public static ITaggerEventSource OnSemanticChanged(ITextBuffer subjectBuffer, TaggerDelay delay, ISemanticChangeNotificationService notificationService)
 {
     return(new SemanticChangedEventSource(subjectBuffer, delay, notificationService));
 }