Example #1
0
        private void MarkDocumentAsUnsaved()
        {
            Document document = DocumentLifetimeManager.GetDocument(_filename);

            if (document != null)
            {
                document.Saved = false;
            }
        }
Example #2
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 void Initialize()
        {
            base.Initialize();
            DocumentLifetimeManager.Initialize(this);
            EnableDisableCodyDocsCommand.Initialize(this);
            DocumentCodeSpanCommand.Initialize(this);
            //VisualStudioServices.InitializeAsync(this);

            System.Threading.Tasks.Task.Factory.StartNew(() =>
                                                         VisualStudioServices.ComponentModel = this.GetService(typeof(SComponentModel)) as IComponentModel);
        }