Esempio n. 1
0
        /////////////////////////////////////////////////////////////////////////////
        // Overriden Package Implementation
        #region Package Members

        /// <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 initilaization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            base.Initialize();

            // this is unfortunately necessary
            var mgr = GetService(typeof(SVsFontAndColorCacheManager)) as IVsFontAndColorCacheManager;

            if (mgr != null)
            {
                mgr.ClearAllCaches();
                Guid guid = Guid.Empty;
                mgr.RefreshCache(ref guid);
                // refresh text editor category
                guid = new Guid(0xA27B4E24, 0xA735, 0x4d1d, 0xB8, 0xE7, 0x97, 0x16, 0xE1, 0xE3, 0xD8, 0xE0);
                mgr.RefreshCache(ref guid);
            }

            // Proffer the service.
            var serviceContainer = this as IServiceContainer;

#if true
            var langService = new AsmHighlighterLanguageService();
            langService.SetSite(this);
            serviceContainer.AddService(typeof(AsmHighlighterLanguageService), langService, true);
        }
        /////////////////////////////////////////////////////////////////////////////
        // Overriden Package Implementation
        #region Package Members

        /// <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 initilaization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            base.Initialize();

            // Proffer the service.
#if true
            IServiceContainer             serviceContainer = this as IServiceContainer;
            AsmHighlighterLanguageService langService      = new AsmHighlighterLanguageService();
            langService.SetSite(this);
            serviceContainer.AddService(typeof(AsmHighlighterLanguageService),
                                        langService,
                                        true);
        }
Esempio n. 3
0
        /////////////////////////////////////////////////////////////////////////////
        // Overriden Package Implementation
        #region Package Members

        /// <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 initilaization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            Trace.WriteLine (string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            base.Initialize();

            // Proffer the service.
#if true
            IServiceContainer serviceContainer = this as IServiceContainer;
            AsmHighlighterLanguageService langService = new AsmHighlighterLanguageService();
            langService.SetSite(this);
            serviceContainer.AddService(typeof(AsmHighlighterLanguageService),
                                        langService,
                                        true);
        }