Beispiel #1
0
        protected override void Initialize()
        {
            base.Initialize();

            IDE            = GetService(typeof(EnvDTE.DTE)) as DTE2;
            CommandService = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            Options        = GetDialogPage(typeof(VsDiffOptions)) as VsDiffOptions;

            VS.Initialize(this);
            DiffToolFactory.Initialize(this);

            DiffSelectedFilesCommand.Initialize(this);
            DiffClipboardWithCodeCommand.Initialize(this);
            DiffClipboardWithFileCommand.Initialize(this);

            VS.OutputWindow.Info("Package is sited and initialized.");
        }
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            IDE = await GetServiceAsync(typeof(EnvDTE.DTE)) as DTE2;

            CommandService = await GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;

            Options = GetDialogPage(typeof(VsDiffOptions)) as VsDiffOptions;

            VS.Initialize(this);
            DiffToolFactory.Initialize(this);

            DiffSelectedFilesCommand.Initialize(this);
            DiffClipboardWithCodeCommand.Initialize(this);
            DiffClipboardWithFileCommand.Initialize(this);
            DiffClipboardWithDocumentCommand.Initialize(this);

            VS.OutputWindow.Info("Package is sited and initialized.");
        }