Beispiel #1
0
        public TaskList(object application)
        {
            instance = this;

            this.app = application as DTE2;
            var app = application as Microsoft.VisualStudio.OLE.Interop.IServiceProvider;
            if (app != null)
            {
                this.serviceProvider = new ServiceProvider(app);
                this.listProvider = new ErrorListProvider(this.serviceProvider);
                this.listProvider.ProviderName = this.GetType().Assembly.FullName;
                this.listProvider.ProviderGuid = new Guid("F1415C4C-5D67-401F-A81C-71F0721BB6F0");
                this.listProvider.Show();
            }
        }
Beispiel #2
0
        /// <summary>
        /// Implements the OnStartupComplete method of the IDTExtensibility2 interface. Receives notification that the host application has completed loading.
        /// </summary>
        /// <param name="custom">Array of parameters that are host application specific.</param>
        /// <seealso cref="IDTExtensibility2"/>
        public void OnStartupComplete(ref Array custom)
        {
            this.eventsOnDocs = this.events.get_DocumentEvents();
            this.eventsOnProjectItems = this.events.ProjectItemsEvents;
            this.eventsOnSolution = this.events.SolutionEvents;
            this.eventsOnBuild = this.events.BuildEvents;
            this.eventsOnCommand = this.events.CommandEvents;

            this.eventsOnCommand.BeforeExecute += new _dispCommandEvents_BeforeExecuteEventHandler(this.CommandEvents_BeforeExecute);
            this.eventsOnSolution.Opened += new _dispSolutionEvents_OpenedEventHandler(eventsOnSolution_Opened);
            this.eventsOnSolution.ProjectRemoved += new _dispSolutionEvents_ProjectRemovedEventHandler(this.SolutionEvents_ProjectRemoved);
            this.eventsOnSolution.AfterClosing += new _dispSolutionEvents_AfterClosingEventHandler(this.EventsOnSolution_AfterClosing);
            this.eventsOnProjectItems.ItemRenamed += new _dispProjectItemsEvents_ItemRenamedEventHandler(this.ProjectItemsEvents_ItemRenamed);
            this.eventsOnProjectItems.ItemAdded += new _dispProjectItemsEvents_ItemAddedEventHandler(this.ProjectItemsEvents_ItemAdded);
            this.eventsOnProjectItems.ItemRemoved += new _dispProjectItemsEvents_ItemRemovedEventHandler(this.ProjectItemsEvents_ItemRemoved);
            this.eventsOnDocs.DocumentSaved += new _dispDocumentEvents_DocumentSavedEventHandler(this.DocumentEvents_DocumentSaved);

            this.tasks = new TaskList(this.App);

             try {
                this.LoadActions();
             }
             catch (Exception ex)
             {
                 this.OutputWindowWriteText("Error in load action: " + ex.ToString());
             }

            try {
                if (Settings.Instance().LessSyntaxHighlighting)
                {
                    this.TreatLessAsCss(true);
                }
            } catch (Exception ex) {
                this.OutputWindowWriteText("Error in TreatLessAsCss: " + ex.ToString());
            }

            // ensures the output window is lazy loaded so the multiple threads don't compete for and end up creating several
            if (Settings.Instance().ShowDetailLog)
            {
                this.OutputWindowWriteText("Ready");
            }
        }