コード例 #1
0
ファイル: HostFactory.cs プロジェクト: GunioRobot/VsVim
 public HostFactory(
     IVim vim,
     ITextBufferFactoryService bufferFactoryService,
     ITextEditorFactoryService editorFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IKeyBindingService keyBindingService,
     SVsServiceProvider serviceProvider,
     IVsEditorAdaptersFactoryService adaptersFactory,
     IExternalEditorManager externalEditorManager,
     IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
     IVsAdapter adapter,
     IProtectedOperations protectedOperations,
     IVimBufferCoordinatorFactory bufferCoordinatorFactory)
 {
     _vim = vim;
     _keyBindingService = keyBindingService;
     _bufferFactoryService = bufferFactoryService;
     _editorFactoryService = editorFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _externalEditorManager = externalEditorManager;
     _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
     _adaptersFactory = adaptersFactory;
     _adapter = adapter;
     _protectedOperations = protectedOperations;
     _bufferCoordinatorFactory = bufferCoordinatorFactory;
 }
コード例 #2
0
ファイル: SettingsMigrator.cs プロジェクト: wmchristie/VsVim
 internal SettingsMigrator(SVsServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, ILegacySettings legacySettings, [EditorUtilsImport] IProtectedOperations protectedOperations)
 {
     _dte = serviceProvider.GetService<SDTE, _DTE>();
     _vimApplicationSettings = vimApplicationSettings;
     _legacySettings = legacySettings;
     _protectedOperations = protectedOperations;
 }
        public VisualStudioMetadataAsSourceFileSupportService(SVsServiceProvider serviceProvider, IMetadataAsSourceFileService metadataAsSourceFileService)
        {
            _metadataAsSourceFileService = metadataAsSourceFileService;

            var solution = (IVsSolution)serviceProvider.GetService(typeof(SVsSolution));
            ErrorHandler.ThrowOnFailure(solution.AdviseSolutionEvents(this, out _eventCookie));
        }
コード例 #4
0
 public VisualStudioDocumentNavigationService(
     SVsServiceProvider serviceProvider,
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService)
 {
     _serviceProvider = serviceProvider;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
 }
コード例 #5
0
 public VsTextViewListener(
     IVsEditorAdaptersFactoryService editorAdaptersFactory,
     SVsServiceProvider serviceProvider)
 {
     this.editorAdaptersFactory = editorAdaptersFactory;
     this.serviceProvider = serviceProvider;
 }
コード例 #6
0
ファイル: VsVimHost.cs プロジェクト: honeyhoneywell/VsVim
        internal VsVimHost(
            IVsAdapter adapter,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            ITextDocumentFactoryService textDocumentFactoryService,
            ITextBufferUndoManagerProvider undoManagerProvider,
            IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
            IEditorOperationsFactoryService editorOperationsFactoryService,
            ISmartIndentationService smartIndentationService,
            ITextManager textManager,
            ISharedServiceFactory sharedServiceFactory,
            IVimApplicationSettings vimApplicationSettings,
            SVsServiceProvider serviceProvider)
            : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
        {
            _vsAdapter = adapter;
            _editorAdaptersFactoryService = editorAdaptersFactoryService;
            _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
            _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility));
            _textManager = textManager;
            _sharedService = sharedServiceFactory.Create();
            _vsMonitorSelection = serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();
            _fontProperties = new TextEditorFontProperties(serviceProvider);
            _vimApplicationSettings = vimApplicationSettings;
            _smartIndentationService = smartIndentationService;

            uint cookie;
            _vsMonitorSelection.AdviseSelectionEvents(this, out cookie);
        }
コード例 #7
0
ファイル: ReSharperUtil.cs プロジェクト: aesire/VsVim
 internal ReSharperUtil(IVim vim, IVimBufferCoordinatorFactory vimBufferCoordinatorFactory, SVsServiceProvider serviceProvider)
 {
     var vsShell = serviceProvider.GetService<SVsShell, IVsShell>();
     _isResharperInstalled = vsShell.IsPackageInstalled(Resharper5Guid);
     _vim = vim;
     _vimBufferCoordinatorFactory = vimBufferCoordinatorFactory;
 }
コード例 #8
0
        public VmsViewportAdornment(IWpfTextView view, SVsServiceProvider serviceProvider)
        {
            var service = (DTE)serviceProvider.GetService(typeof(DTE));
            var properties = service.Properties["Visual Method Separators", "Global"];

            var colorProperty = properties.Item("Color");
            var color = UIntToColor(colorProperty.Value);

            var dashStyleProperty = properties.Item("PenDashStyle");
            var dashStyle = DashStyleFromInt(dashStyleProperty.Value);

            var thicknessProperty = properties.Item("Thickness");
            var thickness = (double) thicknessProperty.Value;

            _view = view;
            _view.LayoutChanged += OnLayoutChanged;

            _layer = view.GetAdornmentLayer("VmsViewportAdornment");

            _pen = new Pen(new SolidColorBrush(color), thickness)
                {
                    DashStyle = dashStyle,
                    DashCap = PenLineCap.Flat,
                };

            _pen.Freeze();
        }
コード例 #9
0
ファイル: VsVimHost.cs プロジェクト: 0-F/VsVim
        internal VsVimHost(
            IVsAdapter adapter,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            ITextDocumentFactoryService textDocumentFactoryService,
            ITextBufferUndoManagerProvider undoManagerProvider,
            IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
            IEditorOperationsFactoryService editorOperationsFactoryService,
            IWordUtilFactory wordUtilFactory,
            ITextManager textManager,
            ISharedServiceFactory sharedServiceFactory,
            SVsServiceProvider serviceProvider)
            : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
        {
            _vsAdapter = adapter;
            _editorAdaptersFactoryService = editorAdaptersFactoryService;
            _wordUtilFactory = wordUtilFactory;
            _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
            _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility));
            _textManager = textManager;
            _sharedService = sharedServiceFactory.Create();
            _vsMonitorSelection = serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();

            uint cookie;
            _vsMonitorSelection.AdviseSelectionEvents(this, out cookie);
        }
コード例 #10
0
 public GlobalUndoServiceFactory(
     ITextUndoHistoryRegistry undoHistoryRegistry,
     SVsServiceProvider serviceProvider,
     Lazy<VisualStudioWorkspace> workspace)
 {
     _singleton = new GlobalUndoService(undoHistoryRegistry, serviceProvider, workspace);
 }
コード例 #11
0
ファイル: RoslynRenameUtil.cs プロジェクト: Yzzl/VsVim
 internal static bool TryCreate(SVsServiceProvider vsServiceProvider, out IRoslynRenameUtil roslynRenameUtil)
 {
     RoslynRenameUtil util;
     bool ret = TryCreateCore(vsServiceProvider, out util);
     roslynRenameUtil = util;
     return ret;
 }
コード例 #12
0
        public JavaEditorConnectionListener(SVsServiceProvider serviceProvider)
        {
            ServiceProvider = serviceProvider;
            RegisterSolutionEvents(serviceProvider);

            Telemetry.Client.Get().TrackEvent("App.Start");
        }
コード例 #13
0
        private void RegisterSolutionEvents(SVsServiceProvider serviceProvider)
        {
            var dte = serviceProvider.GetService(typeof(SApplicationObject)) as DTE2;
            var solutionEvents = dte.Events.SolutionEvents;

            solutionEvents.Opened += solutionEvents_Opened;
        }
コード例 #14
0
        public TemplateCompletionHandlerProvider(
            ITemplateEditorOptions options, 
            IVsEditorAdaptersFactoryService editorAdapterFactory,
            SVsServiceProvider serviceProvider,
            ICompletionBroker completionBroker)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            if (editorAdapterFactory == null)
            {
                throw new ArgumentNullException(nameof(editorAdapterFactory));
            }

            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }

            if (completionBroker == null)
            {
                throw new ArgumentNullException(nameof(completionBroker));
            }

            this.options = options;
            this.editorAdapterFactory = editorAdapterFactory;
            this.serviceProvider = serviceProvider;
            this.completionBroker = completionBroker;
        }
コード例 #15
0
        public VisualStudioDiagnosticListTable(
            SVsServiceProvider serviceProvider,
            VisualStudioWorkspace workspace,
            IDiagnosticService diagnosticService,
            ExternalErrorDiagnosticUpdateSource errorSource,
            ITableManagerProvider provider) :
            this(serviceProvider, (Workspace)workspace, diagnosticService, errorSource, provider)
        {
            ConnectWorkspaceEvents();

            _errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;
            if (_errorList == null)
            {
                AddInitialTableSource(workspace.CurrentSolution, _liveTableSource);
                return;
            }

            _errorList.PropertyChanged += OnErrorListPropertyChanged;
            AddInitialTableSource(workspace.CurrentSolution, GetCurrentDataSource());
            SuppressionStateColumnDefinition.SetDefaultFilter(_errorList.TableControl);

            if (ErrorListHasFullSolutionAnalysisButton())
            {
                SetupErrorListFullSolutionAnalysis(workspace);
            }
        }
コード例 #16
0
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="serviceProvider">The service provider to use</param>
        /// <param name="buffer">The buffer to use</param>
        /// <param name="provider">The quick info source provider to use</param>
        public XmlCommentsLinkQuickInfoSource(SVsServiceProvider serviceProvider, ITextBuffer buffer,
          XmlCommentsLinkQuickInfoSourceProvider provider)
        {
            this.serviceProvider = serviceProvider;
            this.textBuffer = buffer;
            this.provider = provider;
        }
コード例 #17
0
 internal PowerToolsUtil(SVsServiceProvider serviceProvider)
 {
     var vsShell = serviceProvider.GetService<SVsShell, IVsShell>();
     _isQuickFindInstalled = vsShell.IsPackageInstalled(QuickFindGuid);
     _searchModel = new Lazy<object>(GetSearchModel);
     _isActivePropertyInfo = new Lazy<PropertyInfo>(GetIsActivePropertyInfo);
 }
コード例 #18
0
ファイル: HostFactory.cs プロジェクト: nligerakis/VsVim
        public HostFactory(
            IVim vim,
            ITextBufferFactoryService bufferFactoryService,
            ITextEditorFactoryService editorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IKeyBindingService keyBindingService,
            SVsServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IResharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            [EditorUtilsImport] IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil)
        {
            _vim = vim;
            _keyBindingService = keyBindingService;
            _bufferFactoryService = bufferFactoryService;
            _editorFactoryService = editorFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _textManager = textManager;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil = keyUtil;

            #if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
            #endif
        }
        public RoslynCodeAnalysisHelper(IWpfTextView view, ITextDocument document, IVsTaskList tasks, DTE2 dte, SVsServiceProvider serviceProvider, IVsActivityLog log)
        {
            _view = view;
            _document = document;
            _text = new Adornment();
            _tasks = tasks;
            _serviceProvider = serviceProvider;
            _log = log;
            _dispatcher = Dispatcher.CurrentDispatcher;

            _adornmentLayer = view.GetAdornmentLayer(RoslynCodeAnalysisFactory.LayerName);

            _view.ViewportHeightChanged += SetAdornmentLocation;
            _view.ViewportWidthChanged += SetAdornmentLocation;

            _text.MouseUp += (s, e) => dte.ExecuteCommand("View.ErrorList");

            _timer = new Timer(750);
            _timer.Elapsed += (s, e) =>
            {
                _timer.Stop();
                System.Threading.Tasks.Task.Run(() =>
                {
                    _dispatcher.Invoke(new Action(() => Update(false)), DispatcherPriority.ApplicationIdle, null);
                });
            };
            _timer.Start();
        }
コード例 #20
0
    public ClousotOptions(SVsServiceProvider serviceProvider) {
      var shell = (IVsShell)serviceProvider.GetService(typeof(SVsShell));
      IVsPackage package;
      Marshal.ThrowExceptionForHR(shell.LoadPackage(GuidList.guidOptionsPagePackagePkg, out package));

      this.page = ((OptionsPagePackage)package).GetOptionsPage();
    }
コード例 #21
0
 /// <summary>
 /// Default ctor
 /// </summary>
 protected XmlResourceCompletionSource(ITextBuffer textBuffer, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService, IGlyphService glyphService)
 {
     this.textBuffer = textBuffer;
     this.serviceProvider = serviceProvider;
     this.vsEditorAdaptersFactoryService = vsEditorAdaptersFactoryService;
     this.glyphService = glyphService;
 }
コード例 #22
0
    public ClousotOptions(SVsServiceProvider serviceProvider) {
        var shell = (IVsShell)serviceProvider.GetService(typeof(SVsShell));
        IVsPackage package;
        Marshal.ThrowExceptionForHR(shell.LoadPackage(Microsoft.Research.AskCodeContracts.Guids.guidOptionsPagePackagePkg, out package));

        this.page = ((OptionsPagePackage)package).GetOptionsPage();
    }
コード例 #23
0
ファイル: OptionsProvider.cs プロジェクト: louisfeng/VsVim
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings, IVimProtectedOperations protectedOperations)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = provider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations = protectedOperations;
 }
コード例 #24
0
        public TemplateProvider(SVsServiceProvider vsServiceProvider)
        {
            //var shellSettingsManager = new ShellSettingsManager(vsServiceProvider);
            //writableSettingsStore = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            //LoadTemplates();
        }
コード例 #25
0
        public CommentTaskTokenSerializer(SVsServiceProvider serviceProvider)
        {
            var tokenInfo = serviceProvider.GetService(typeof(SVsTaskList)) as IVsCommentTaskInfo;

            // The SVsTaskList may not be available (e.g. during "devenv /build")
            _taskTokenList = tokenInfo != null ? GetTaskTokenList(tokenInfo) : string.Empty;
        }
コード例 #26
0
ファイル: Encouragments.cs プロジェクト: RC1140/Encourage
        public Encouragements(SVsServiceProvider vsServiceProvider)
        {
            var shellSettingsManager = new ShellSettingsManager(vsServiceProvider);
            writableSettingsStore = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            LoadSettings();
        }
コード例 #27
0
 private MiscellaneousDiagnosticListTable(
     SVsServiceProvider serviceProvider, Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
     base(serviceProvider, workspace, diagnosticService, provider)
 {
     _source = new LiveTableDataSource(serviceProvider, workspace, diagnosticService, IdentifierString);
     AddInitialTableSource(workspace.CurrentSolution, _source);
 }
コード例 #28
0
        internal DocumentMonitorService(SVsServiceProvider vsServiceProvider, ICompletionBroker completionBroker)
        {
            _vsServiceProvider = vsServiceProvider;
            _runningDocumentTable = new RunningDocumentTable(vsServiceProvider);
            _runningDocumentTable.Advise(this);
            _completionBroker = completionBroker;
            _dte = (DTE)vsServiceProvider.GetService(typeof(_DTE));

            // NB: Resharper somehow f***s with this event, we need to do as
            // little as possible in the event handler itself
            var documentChanged = _changed
                .ObserveOn(RxApp.TaskpoolScheduler)
                .Throttle(TimeSpan.FromSeconds(2.0), RxApp.TaskpoolScheduler)
                .Where(_ => !isCompletionActive())
                .Select(_ => Unit.Default)
                .ObserveOn(RxApp.MainThreadScheduler);

            documentChanged.Subscribe(_ => SaveAll());

            // NB: We use the message bus here, because we want to effectively
            // merge all of the text change notifications from any document
            MessageBus.Current.RegisterMessageSource(documentChanged, "AnyDocumentChanged");

            checkAlreadyOpenDocuments(vsServiceProvider);

            _dte.Events.WindowEvents.WindowActivated += (o,e) => _changed.OnNext(Unit.Default);
        }
コード例 #29
0
 public SettingsFileUserNotifier(SVsServiceProvider sp, INotificationService notifier, SettingsPersister persister, SettingsLocator locator)
 {
     this.locator = locator;
     this.notifier = notifier;
     this.persister = persister;
     dte = (DTE)sp.GetService(typeof(DTE));
 }
コード例 #30
0
ファイル: HostFactory.cs プロジェクト: bajtos/VsVim
        public HostFactory(
            IVim vim,
            ITextBufferFactoryService bufferFactoryService,
            ITextEditorFactoryService editorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IKeyBindingService keyBindingService,
            SVsServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IResharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            IVsAdapter adapter,
            IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory)
        {
            _vim = vim;
            _keyBindingService = keyBindingService;
            _bufferFactoryService = bufferFactoryService;
            _editorFactoryService = editorFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;

            _vim.AutoLoadVimRc = false;
        }
コード例 #31
0
 public ProjectExportProvider(SVsServiceProvider serviceProvider)
 {
     ServiceProvider = serviceProvider;
 }
コード例 #32
0
 public RoslynBufferListener(SVsServiceProvider exportProvider, RoslynSetup forceImport)
 {
     ExportProvider = exportProvider;
 }
コード例 #33
0
 public VSNotificationServiceFactory(SVsServiceProvider serviceProvider)
 {
     _uiShellService = (IVsUIShell)serviceProvider.GetService(typeof(SVsUIShell));
 }
コード例 #34
0
ファイル: Extensions.cs プロジェクト: yunfzhan/VsVim
        public static WritableSettingsStore GetWritableSettingsStore(this SVsServiceProvider vsServiceProvider)
        {
            var shellSettingsManager = new ShellSettingsManager(vsServiceProvider);

            return(shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings));
        }
コード例 #35
0
ファイル: Extensions.cs プロジェクト: yunfzhan/VsVim
        public static VisualStudioVersion GetVisualStudioVersion(this SVsServiceProvider vsServiceProvider)
        {
            var dte = vsServiceProvider.GetService <SDTE, _DTE>();

            return(dte.GetVisualStudioVersion());
        }
コード例 #36
0
 public VisualStudioCodeDefinitionWindowService(SVsServiceProvider asyncServiceProvider, IThreadingContext threadingContext)
 {
     _asyncServiceProvider = (IAsyncServiceProvider)asyncServiceProvider;
     _threadingContext     = threadingContext;
 }
コード例 #37
0
 protected VisualStudioBaseDiagnosticListTable(
     SVsServiceProvider serviceProvider, Workspace workspace, IDiagnosticService diagnosticService, Guid identifier, ITableManagerProvider provider) :
     base(workspace, provider, StandardTables.ErrorsTable, new TableDataSource(serviceProvider, workspace, diagnosticService, identifier))
 {
 }
コード例 #38
0
 public MiscellaneousDiagnosticListTable(
     SVsServiceProvider serviceProvider, MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
     base(serviceProvider, workspace, diagnosticService, Identifier, provider)
 {
     AddTableSource();
 }
コード例 #39
0
 public RemoteDiagnosticListTable(
     SVsServiceProvider serviceProvider, RemoteLanguageServiceWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
     this(workspace, diagnosticService, provider)
 {
     ConnectWorkspaceEvents();
 }
コード例 #40
0
 public OptionsSettings(SVsServiceProvider serviceProvider)
 {
     Requires.NotNull(serviceProvider, nameof(serviceProvider));
     _serviceProvider = serviceProvider;
 }
コード例 #41
0
 public AntlrLanguageInfo(SVsServiceProvider serviceProvider)
     : base(serviceProvider, typeof(AntlrLanguageInfo).GUID)
 {
 }
コード例 #42
0
 protected abstract InteractiveEvaluator CreateInteractiveEvaluator(
     SVsServiceProvider serviceProvider,
     IViewClassifierAggregatorService classifierAggregator,
     IContentTypeRegistryService contentTypeRegistry,
     VisualStudioWorkspace workspace);
コード例 #43
0
 public PreviewPaneService(SVsServiceProvider serviceProvider)
 {
     _dte = serviceProvider.GetService(typeof(EnvDTE.DTE)) as EnvDTE.DTE;
 }
コード例 #44
0
 internal StatusBarAdapter(IVim vim, IProtectedOperations vimProtectedOperations, ICommandMarginUtil commandMarginUtil, IVimApplicationSettings vimApplicationSettings, SVsServiceProvider vsServiceProvider)
 {
     _vim = vim;
     _vimProtectedOperations = vimProtectedOperations;
     _commandMarginUtil      = commandMarginUtil;
     _vimApplicationSettings = vimApplicationSettings;
     _vsStatusbar            = vsServiceProvider.GetService <SVsStatusbar, IVsStatusbar>();
     _timer = new DispatcherTimer(
         TimeSpan.FromSeconds(.1),
         DispatcherPriority.Normal,
         OnTimer,
         Dispatcher.CurrentDispatcher)
     {
         IsEnabled = !_vimApplicationSettings.UseEditorCommandMargin
     };
     _vimApplicationSettings.SettingsChanged += OnSettingsChanged;
 }
コード例 #45
0
 public StringTemplateLanguageInfo(SVsServiceProvider serviceProvider)
     : base(serviceProvider, typeof(StringTemplateLanguageInfo).GUID)
 {
 }
コード例 #46
0
ファイル: PreviewPaneService.cs プロジェクト: zuvys/roslyn
 public PreviewPaneService(IThreadingContext threadingContext, SVsServiceProvider serviceProvider)
     : base(threadingContext)
 {
     _uiShell = serviceProvider.GetService(typeof(SVsUIShell)) as IVsUIShell;
 }
コード例 #47
0
 public GotoDefnCommandFilter(IWpfTextView textView, SVsServiceProvider serviceProvider)
 {
     _serviceProvider = serviceProvider;
     TextView         = textView;
     _project         = new Lazy <Project>(() => new Project(() => TextView.TextBuffer.CurrentSnapshot.GetProject(GaugePackage.DTE)));
 }
コード例 #48
0
 public SettingsLocator(SVsServiceProvider sp)
 {
     userFolder = new ShellSettingsManager(sp).GetApplicationDataFolder(ApplicationDataFolder.RoamingSettings);
 }
コード例 #49
0
        public VisualStudioFileChangeTrackerFactoryFactory(ForegroundDispatcher foregroundDispatcher, SVsServiceProvider serviceProvider, JoinableTaskContext joinableTaskContext)
        {
            if (foregroundDispatcher == null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }

            if (joinableTaskContext is null)
            {
                throw new ArgumentNullException(nameof(joinableTaskContext));
            }

            _foregroundDispatcher = foregroundDispatcher;
            _joinableTaskContext  = joinableTaskContext;
            _fileChangeService    = serviceProvider.GetService(typeof(SVsFileChangeEx)) as IVsAsyncFileChangeEx;
        }
コード例 #50
0
ファイル: SnippetCommandHandler.cs プロジェクト: zuvys/roslyn
 public SnippetCommandHandler(IThreadingContext threadingContext, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, SVsServiceProvider serviceProvider)
     : base(threadingContext, editorAdaptersFactoryService, serviceProvider)
 {
 }
コード例 #51
0
ファイル: VsxHelper.cs プロジェクト: lukesmith/SpecFlow
 public static DTE GetDte(SVsServiceProvider serviceProvider)
 {
     return((DTE)serviceProvider.GetService(typeof(DTE)));
 }
コード例 #52
0
 public CSharpSnippetInfoService(
     SVsServiceProvider serviceProvider,
     [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners)
     : base(serviceProvider, Guids.CSharpLanguageServiceId, asyncListeners)
 {
 }
コード例 #53
0
 public VisualStudioSymbolNavigationServiceFactory(
     SVsServiceProvider serviceProvider,
     [Import] VisualStudio14StructureTaggerProvider outliningTaggerProvider)
 {
     _singleton = new VisualStudioSymbolNavigationService(serviceProvider, outliningTaggerProvider);
 }
コード例 #54
0
ファイル: VsxHelper.cs プロジェクト: lukesmith/SpecFlow
        public static Project GetCurrentProject(ITextBuffer buffer, IVsEditorAdaptersFactoryService adaptersFactory, SVsServiceProvider serviceProvider)
        {
            IPersistFileFormat persistFileFormat = adaptersFactory.GetBufferAdapter(buffer) as IPersistFileFormat;

            if (persistFileFormat == null)
            {
                return(null);
            }

            string ppzsFilename;
            uint   iii;

            persistFileFormat.GetCurFile(out ppzsFilename, out iii);

            if (String.IsNullOrWhiteSpace(ppzsFilename))
            {
                return(null);
            }

            DTE dte = GetDte(serviceProvider);

            ProjectItem prjItem = dte.Solution.FindProjectItem(ppzsFilename);

            if (prjItem == null)
            {
                return(null);
            }

            return(prjItem.ContainingProject);
        }
コード例 #55
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public LayoutResourceCompletionSource(ITextBuffer textBuffer, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService, IGlyphService glyphService)
     : base(textBuffer, serviceProvider, vsEditorAdaptersFactoryService, glyphService)
 {
 }
 public VisualStudioPersistentStorageLocationService([Import] SVsServiceProvider serviceProvider)
     : base(assertIsForeground: false)
 {
     _serviceProvider = serviceProvider;
 }
コード例 #57
0
 internal VimApplicationSettings(
     SVsServiceProvider vsServiceProvider,
     IVimProtectedOperations protectedOperations)
     : this(vsServiceProvider.GetVisualStudioVersion(), vsServiceProvider.GetWritableSettingsStore(), protectedOperations)
 {
 }
コード例 #58
0
 public CSharpAddPackageCodeFixProvider([Import] SVsServiceProvider serviceProvider)
     : base(new PackageInstaller(serviceProvider), ProjectMetadataProvider.Instance)
 {
     _serviceProvider = serviceProvider;
 }
コード例 #59
0
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="textView">The text view to use</param>
        /// <param name="serviceProvider">The service provider to use</param>
        /// <param name="aggregator">The classifier tag aggregator to use</param>
        /// <param name="navigator">The text structure navigator to use</param>
        /// <param name="state">The Ctrl key state tracker to use</param>
        /// <param name="enableInCRef">True to enable in <c>cref</c> targets, false if not</param>
        public CSharpGoToDefinitionMouseProcessor(IWpfTextView textView, SVsServiceProvider serviceProvider,
                                                  IClassifier aggregator, ITextStructureNavigator navigator, CtrlKeyState state, bool enableInCRef) :
            base(textView, serviceProvider, aggregator, navigator, state)
        {
            this.enableInCRef = enableInCRef;
        }
コード例 #60
0
 public PreviewPaneService(SVsServiceProvider serviceProvider)
 {
     _serviceProvider = serviceProvider;
 }