コード例 #1
0
        public StreamingFindUsagesPresenter(
            IThreadingContext threadingContext,
            VisualStudioWorkspace workspace,
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            IClassificationFormatMapService classificationFormatMapService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService)
            : base(threadingContext)
        {
            _workspace                 = workspace;
            _serviceProvider           = serviceProvider;
            TextBufferFactoryService   = textBufferFactoryService;
            ContentTypeRegistryService = contentTypeRegistryService;

            TextEditorFactoryService = textEditorFactoryService;
            TypeMap                        = typeMap;
            FormatMapService               = formatMapService;
            ClassificationFormatMap        = classificationFormatMapService.GetClassificationFormatMap("tooltip");
            ProjectionBufferFactoryService = projectionBufferFactoryService;
            EditorOptionsFactoryService    = editorOptionsFactoryService;

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
コード例 #2
0
 public VisualStudioDesignerAttributeServiceFactory(
     IThreadingContext threadingContext,
     Shell.SVsServiceProvider serviceProvider)
 {
     _threadingContext = threadingContext;
     _serviceProvider  = serviceProvider;
 }
コード例 #3
0
        public StreamingFindUsagesPresenter(
            IThreadingContext threadingContext,
            VisualStudioWorkspace workspace,
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            IClassificationFormatMapService classificationFormatMapService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            [ImportMany] IEnumerable <ITableColumnDefinition> columns)
            : base(threadingContext)
        {
            _workspace                 = workspace;
            _serviceProvider           = serviceProvider;
            TextBufferFactoryService   = textBufferFactoryService;
            ContentTypeRegistryService = contentTypeRegistryService;

            TextEditorFactoryService = textEditorFactoryService;
            TypeMap                        = typeMap;
            FormatMapService               = formatMapService;
            ClassificationFormatMap        = classificationFormatMapService.GetClassificationFormatMap("tooltip");
            ProjectionBufferFactoryService = projectionBufferFactoryService;
            EditorOptionsFactoryService    = editorOptionsFactoryService;

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
            _customColumns = columns.OfType <AbstractFindUsagesCustomColumnDefinition>().ToImmutableArray();
        }
コード例 #4
0
        public StreamingFindReferencesPresenter(
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners)
        {
            _serviceProvider                = serviceProvider;
            _textBufferFactoryService       = textBufferFactoryService;
            _projectionBufferFactoryService = projectionBufferFactoryService;
            _editorOptionsFactoryService    = editorOptionsFactoryService;
            _contentTypeRegistryService     = contentTypeRegistryService;

            _textEditorFactoryService = textEditorFactoryService;
            _typeMap          = typeMap;
            _formatMapService = formatMapService;

            _asyncListener = new AggregateAsynchronousOperationListener(
                asyncListeners, FeatureAttribute.ReferenceHighlighting);

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
コード例 #5
0
 internal override AbstractGenerateNuGetPackageCommand CreateInstanceCore(
     UnconfiguredProject unconfiguredProject,
     IProjectThreadingService threadingService,
     Shell.SVsServiceProvider serviceProvider,
     GeneratePackageOnBuildPropertyProvider generatePackageOnBuildPropertyProvider)
 {
     return(new GenerateNuGetPackageTopLevelBuildMenuCommand(unconfiguredProject, threadingService, serviceProvider, generatePackageOnBuildPropertyProvider));
 }
コード例 #6
0
 public WorkspaceEventListener(
     IThreadingContext threadingContext,
     Shell.SVsServiceProvider serviceProvider,
     IAsynchronousOperationListenerProvider listenerProvider)
 {
     _threadingContext = threadingContext;
     _serviceProvider  = serviceProvider;
     _listener         = listenerProvider.GetListener(nameof(Workspace));
 }
コード例 #7
0
 public VisualStudioDesignerAttributeService(
     VisualStudioWorkspaceImpl workspace,
     IThreadingContext threadingContext,
     Shell.SVsServiceProvider serviceProvider)
     : base(threadingContext)
 {
     _workspace        = workspace;
     _threadingContext = threadingContext;
     _serviceProvider  = serviceProvider;
 }
コード例 #8
0
 public StreamingFindUsagesPresenter(
     IThreadingContext threadingContext,
     VisualStudioWorkspace workspace,
     Shell.SVsServiceProvider serviceProvider,
     ClassificationTypeMap typeMap,
     IEditorFormatMapService formatMapService,
     IClassificationFormatMapService classificationFormatMapService,
     [ImportMany] IEnumerable <ITableColumnDefinition> columns)
     : this(workspace, threadingContext, serviceProvider, typeMap, formatMapService, classificationFormatMapService, columns)
 {
 }
コード例 #9
0
        public VisualStudioDesignerAttributeService(
            VisualStudioWorkspaceImpl workspace,
            IThreadingContext threadingContext,
            Shell.SVsServiceProvider serviceProvider)
            : base(threadingContext)
        {
            _workspace       = workspace;
            _serviceProvider = serviceProvider;

            _workQueue = new AsyncBatchingWorkQueue <DesignerAttributeData>(
                TimeSpan.FromSeconds(1),
                this.NotifyProjectSystemAsync,
                ThreadingContext.DisposalToken);
        }
コード例 #10
0
 public StreamingFindUsagesPresenter(
     IThreadingContext threadingContext,
     VisualStudioWorkspace workspace,
     Shell.SVsServiceProvider serviceProvider,
     ClassificationTypeMap typeMap,
     IEditorFormatMapService formatMapService,
     IClassificationFormatMapService classificationFormatMapService,
     [ImportMany] IEnumerable <Lazy <ITableColumnDefinition, NameMetadata> > columns)
     : this(workspace,
            threadingContext,
            serviceProvider,
            typeMap,
            formatMapService,
            classificationFormatMapService,
            columns.Where(c => c.Metadata.Name == FindUsagesValueUsageInfoColumnDefinition.ColumnName).Select(c => c.Value))
 {
 }
コード例 #11
0
        private StreamingFindUsagesPresenter(
            Workspace workspace,
            IThreadingContext threadingContext,
            Shell.SVsServiceProvider serviceProvider,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            IClassificationFormatMapService classificationFormatMapService,
            IEnumerable <ITableColumnDefinition> columns)
            : base(threadingContext, assertIsForeground: false)
        {
            _workspace              = workspace;
            _serviceProvider        = serviceProvider;
            TypeMap                 = typeMap;
            FormatMapService        = formatMapService;
            ClassificationFormatMap = classificationFormatMapService.GetClassificationFormatMap("tooltip");

            _customColumns = columns.ToImmutableArray();
        }
コード例 #12
0
        public AbstractSnippetInfoService(
            Shell.SVsServiceProvider serviceProvider,
            Guid languageGuidForSnippets,
            IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners)
        {
            AssertIsForeground();

            if (serviceProvider != null)
            {
                var textManager = (IVsTextManager2)serviceProvider.GetService(typeof(SVsTextManager));
                if (textManager.GetExpansionManager(out _expansionManager) == VSConstants.S_OK)
                {
                    ComEventSink.Advise <IVsExpansionEvents>(_expansionManager, this);
                    _waiter = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.Snippets);
                    _languageGuidForSnippets = languageGuidForSnippets;
                    PopulateSnippetCaches();
                }
            }
        }
コード例 #13
0
        private StreamingFindUsagesPresenter(
            Workspace workspace,
            IThreadingContext threadingContext,
            Shell.SVsServiceProvider serviceProvider,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            IClassificationFormatMapService classificationFormatMapService,
            IEnumerable <ITableColumnDefinition> columns)
            : base(threadingContext)
        {
            _workspace              = workspace;
            _serviceProvider        = serviceProvider;
            TypeMap                 = typeMap;
            FormatMapService        = formatMapService;
            ClassificationFormatMap = classificationFormatMapService.GetClassificationFormatMap("tooltip");

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
            _customColumns = columns.OfType <AbstractFindUsagesCustomColumnDefinition>().ToImmutableArray();
        }
コード例 #14
0
        public AbstractSnippetInfoService(
            IThreadingContext threadingContext,
            Shell.SVsServiceProvider serviceProvider,
            Guid languageGuidForSnippets,
            IAsynchronousOperationListenerProvider listenerProvider)
            : base(threadingContext)
        {
            AssertIsForeground();

            if (serviceProvider != null)
            {
                var textManager = (IVsTextManager2)serviceProvider.GetService(typeof(SVsTextManager));
                if (textManager.GetExpansionManager(out _expansionManager) == VSConstants.S_OK)
                {
                    ComEventSink.Advise <IVsExpansionEvents>(_expansionManager, this);
                    _waiter = listenerProvider.GetListener(FeatureAttribute.Snippets);
                    _languageGuidForSnippets = languageGuidForSnippets;
                    PopulateSnippetCaches();
                }
            }
        }
コード例 #15
0
        public StreamingFindUsagesPresenter(
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService)
        {
            _serviceProvider                = serviceProvider;
            _textBufferFactoryService       = textBufferFactoryService;
            _projectionBufferFactoryService = projectionBufferFactoryService;
            _editorOptionsFactoryService    = editorOptionsFactoryService;
            _contentTypeRegistryService     = contentTypeRegistryService;

            _textEditorFactoryService = textEditorFactoryService;
            _typeMap          = typeMap;
            _formatMapService = formatMapService;

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
コード例 #16
0
        public AbstractSnippetInfoService(
            Shell.SVsServiceProvider serviceProvider,
            Guid languageGuidForSnippets,
            IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners)
        {
            _languageGuidForSnippets = languageGuidForSnippets;

            if (serviceProvider != null)
            {
                var textManager = (IVsTextManager2)serviceProvider.GetService(typeof(SVsTextManager));
                if (textManager.GetExpansionManager(out _expansionManager) == VSConstants.S_OK)
                {
                    ComEventSink.Advise <IVsExpansionEvents>(_expansionManager, this);
                }
            }

            IAsynchronousOperationListener waiter = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.Snippets);
            var token = waiter.BeginAsyncOperation(GetType().Name + ".Start");

            InitialCachePopulationTask = Task.Factory.StartNew(() => PopulateSnippetCaches(),
                                                               CancellationToken.None,
                                                               TaskCreationOptions.None,
                                                               ForegroundTaskScheduler).CompletesAsyncOperation(token);
        }
コード例 #17
0
        public StreamingFindUsagesPresenter(
            VisualStudioWorkspace workspace,
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            DeferredContentFrameworkElementFactory frameworkElementFactory,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            IClassificationFormatMapService classificationFormatMapService)
        {
            _workspace                             = workspace;
            _serviceProvider                       = serviceProvider;
            TextBufferFactoryService               = textBufferFactoryService;
            ContentTypeRegistryService             = contentTypeRegistryService;
            DeferredContentFrameworkElementFactory = frameworkElementFactory;

            TextEditorFactoryService = textEditorFactoryService;
            TypeMap                 = typeMap;
            FormatMapService        = formatMapService;
            ClassificationFormatMap = classificationFormatMapService.GetClassificationFormatMap("tooltip");

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
コード例 #18
0
        internal AbstractMoveCommand CreateAbstractInstance(IPhysicalProjectTree projectTree = null, Shell.SVsServiceProvider serviceProvider = null, ConfiguredProject configuredProject = null, IProjectAccessor accessor = null)
        {
            projectTree       = projectTree ?? IPhysicalProjectTreeFactory.Create();
            serviceProvider   = serviceProvider ?? SVsServiceProviderFactory.Create();
            configuredProject = configuredProject ?? ConfiguredProjectFactory.Create();
            accessor          = accessor ?? IProjectAccessorFactory.Create();

            return(CreateInstance(projectTree, serviceProvider, configuredProject, accessor));
        }
コード例 #19
0
 internal abstract AbstractMoveCommand CreateInstance(IPhysicalProjectTree projectTree, Shell.SVsServiceProvider serviceProvider, ConfiguredProject configuredProject, IProjectAccessor accessor);
コード例 #20
0
        internal AbstractAddClassProjectCommand CreateInstance(IPhysicalProjectTree projectTree = null, IUnconfiguredProjectVsServices projectVsServices = null, Shell.SVsServiceProvider serviceProvider = null, IProjectTreeProvider provider = null, IVsAddProjectItemDlg dlg = null)
        {
            projectTree       = projectTree ?? IPhysicalProjectTreeFactory.Create(provider);
            projectVsServices = projectVsServices ?? IUnconfiguredProjectVsServicesFactory.Implement(threadingServiceCreator: () => IProjectThreadingServiceFactory.Create());
            serviceProvider   = serviceProvider ?? SVsServiceProviderFactory.Create(dlg);

            return(CreateInstance(projectTree, projectVsServices, serviceProvider));
        }
コード例 #21
0
 override internal AbstractMoveCommand CreateInstance(IPhysicalProjectTree projectTree, Shell.SVsServiceProvider serviceProvider, ConfiguredProject configuredProject, IProjectAccessor accessor)
 {
     return(new MoveDownCommand(projectTree, serviceProvider, configuredProject, accessor));
 }
コード例 #22
0
 internal abstract AbstractAddClassProjectCommand CreateInstance(IPhysicalProjectTree tree, IUnconfiguredProjectVsServices services, Shell.SVsServiceProvider serviceProvider);
コード例 #23
0
 internal abstract AbstractGenerateNuGetPackageCommand CreateInstanceCore(
     UnconfiguredProject project,
     IProjectThreadingService threadingService,
     Shell.SVsServiceProvider serviceProvider,
     GeneratePackageOnBuildPropertyProvider generatePackageOnBuildPropertyProvider);
 public VisualStudioDebuggeeModuleMetadataProvider(Shell.SVsServiceProvider serviceProvider)
 {
     _componentModel   = (IComponentModel)serviceProvider.GetService(typeof(SComponentModel));
     _baselineMetadata = new DebuggeeModuleInfoCache();
 }