Beispiel #1
0
 public IntegrateIntoProjectCommand(
     IMenuCommandService commandService,
     IDialogService dialogService,
     IVcProjectService vcProjectService) : base(commandService, dialogService)
 {
     _vcProjectService = vcProjectService;
 }
 public AddConanDependsSolution(
     IMenuCommandService commandService,
     Core.IErrorListService errorListService,
     IVcProjectService vcProjectService,
     IConanService conanService) : base(commandService, errorListService)
 {
     _vcProjectService = vcProjectService;
     _errorListService = errorListService;
     _conanService     = conanService;
 }
 public AddConanDepends(
     IMenuCommandService commandService,
     IDialogService dialogService,
     IVcProjectService vcProjectService,
     ISettingsService settingsService) : base(commandService, dialogService)
 {
     _dialogService    = dialogService;
     _vcProjectService = vcProjectService;
     _settingsService  = settingsService;
 }
Beispiel #4
0
 public AddConanDependsProject(
     IMenuCommandService commandService,
     IErrorListService errorListService,
     IVcProjectService vcProjectService,
     IConanService conanService) : base(commandService, errorListService)
 {
     _errorListService = errorListService;
     _vcProjectService = vcProjectService;
     _conanService     = conanService;
 }
Beispiel #5
0
 public AddConanDependsConanfile(
     IMenuCommandService commandService,
     Core.IErrorListService errorListService,
     IVcProjectService vcProjectService,
     IConanService conanService) : base(commandService, errorListService)
 {
     _errorListService = errorListService;
     _vcProjectService = vcProjectService;
     _conanService     = conanService;
     _dte2             = Package.GetGlobalService(typeof(SDTE)) as DTE2;
 }
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            // Handle commandline switch
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            var cmdLine = await GetServiceAsync(typeof(SVsAppCommandLine)) as IVsAppCommandLine;

            ErrorHandler.ThrowOnFailure(cmdLine.GetOption(_cliSwitch, out int isPresent, out string optionValue));
            if (isPresent == 1)
            {
                System.Console.WriteLine(Vsix.Version);
            }

            _dte = await GetServiceAsync <DTE>();

            _solution = await GetServiceAsync <SVsSolution>() as IVsSolution;

            _solutionBuildManager = await GetServiceAsync <IVsSolutionBuildManager>() as IVsSolutionBuildManager3;

            var serviceProvider = new ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider)_dte);

            await TaskScheduler.Default;

            var commandService = await GetServiceAsync <IMenuCommandService>();

            _vcProjectService = new VcProjectService();
            _settingsService  = new VisualStudioSettingsService(this);
            _errorListService = new ErrorListService();
            _conanService     = new ConanService(_settingsService, _errorListService, _vcProjectService);

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            _addConanDependsProject  = new AddConanDependsProject(commandService, _errorListService, _vcProjectService, _conanService);
            _addConanDependsSolution = new AddConanDependsSolution(commandService, _errorListService, _vcProjectService, _conanService);

            _conanOptions = new ConanOptions(commandService, _errorListService, ShowOptionPage);
            _conanAbout   = new ConanAbout(commandService, _errorListService);

            await TaskScheduler.Default;

            Logger.Initialize(serviceProvider, "Conan");

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            SubscribeToEvents();

            EnableMenus(_dte.Solution != null && _dte.Solution.IsOpen);

            await TaskScheduler.Default;
        }
Beispiel #7
0
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await base.InitializeAsync(cancellationToken, progress);

            _dte = await GetServiceAsync <DTE>();

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            _solution = await GetServiceAsync <SVsSolution>() as IVsSolution;

            _solutionBuildManager = await GetServiceAsync <IVsSolutionBuildManager>() as IVsSolutionBuildManager3;

            var serviceProvider = new ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider)_dte);

            await TaskScheduler.Default;

            var commandService = await GetServiceAsync <IMenuCommandService>();

            _vcProjectService = new VcProjectService();
            _settingsService  = new VisualStudioSettingsService(this);
            _errorListService = new ErrorListService();
            _conanService     = new ConanService(_settingsService, _errorListService, _vcProjectService);

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            _solutionEventsHandler = new SolutionEventsHandler(this);
            _solution.AdviseSolutionEvents(_solutionEventsHandler, out var _solutionEventsCookie);

            _addConanDependsProject   = new AddConanDependsProject(commandService, _errorListService, _vcProjectService, _conanService);
            _addConanDependsSolution  = new AddConanDependsSolution(commandService, _errorListService, _vcProjectService, _conanService);
            _addConanDependsConanfile = new AddConanDependsConanfile(commandService, _errorListService, _vcProjectService, _conanService);

            _conanOptions = new ConanOptions(commandService, _errorListService, ShowOptionPage);

            await TaskScheduler.Default;

            Logger.Initialize(serviceProvider, "Conan");

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            SubscribeToEvents();

            EnableMenus(_dte.Solution != null && _dte.Solution.IsOpen);

            await TaskScheduler.Default;
        }
Beispiel #8
0
 public ConanService(ISettingsService settingsService, Core.IErrorListService errorListService, IVcProjectService vcProjectService)
 {
     _settingsService  = settingsService;
     _errorListService = errorListService;
     _vcProjectService = vcProjectService;
 }
Beispiel #9
0
 public InfoBarEventsHandler(VCProject project)
 {
     _project          = project;
     _vcProjectService = new VcProjectService();
 }