Ejemplo n.º 1
0
 public ReferenceHighlightingViewTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners) :
     base(new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.ReferenceHighlighting), notificationService)
 {
     _semanticChangeNotificationService = semanticChangeNotificationService;
 }
 public ReferenceHighlightingViewTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     IAsynchronousOperationListenerProvider listenerProvider)
     : base(listenerProvider.GetListener(FeatureAttribute.ReferenceHighlighting), notificationService)
 {
     _semanticChangeNotificationService = semanticChangeNotificationService;
 }
 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;
 }
Ejemplo n.º 4
0
 public SemanticClassificationViewTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     ClassificationTypeMap typeMap,
     IAsynchronousOperationListenerProvider listenerProvider)
     : base(listenerProvider.GetListener(FeatureAttribute.Classification), notificationService)
 {
     _semanticChangeNotificationService = semanticChangeNotificationService;
     _typeMap = typeMap;
 }
Ejemplo n.º 5
0
 public SemanticClassificationBufferTaggerProvider(
     IForegroundNotificationService notificationService,
     ISemanticChangeNotificationService semanticChangeNotificationService,
     ClassificationTypeMap typeMap,
     IAsynchronousOperationListenerProvider listenerProvider)
 {
     _notificationService = notificationService;
     _semanticChangeNotificationService = semanticChangeNotificationService;
     _typeMap       = typeMap;
     _asyncListener = listenerProvider.GetListener(FeatureAttribute.Classification);
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
 /// <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));
 }