Esempio n. 1
0
        /// <summary>
        /// This is called by the package base class when our package is loaded. When devenv is run
        /// with the "/setup" command line switch it is not able to do a lot of the normal things,
        /// such as creating output windows and tool windows. Under normal circumstances our package
        /// isn't loaded when run with this switch. However, our package will be loaded when items
        /// are added to the toolbox, even when run with "/setup". To be safe we'll check for "setup"
        /// and we don't do anything interesting in MgdSetSite if we find it.
        /// </summary>
        protected sealed override void Initialize()
        {
            base.Initialize();

            // register the class designer editor factory
            RegisterEditorFactory(new ORMDesignerEditorFactory(this));

            if (!SetupMode)
            {
                ((IServiceContainer)this).AddService(typeof(ORMDesignerFontsAndColors), myFontAndColorService = new ORMDesignerFontsAndColors(this), true);

                FactEditorLanguageService managedLanguageService = new FactEditorLanguageService();
                managedLanguageService.SetSite(this);
                ((IServiceContainer)this).AddService(typeof(FactEditorLanguageService), managedLanguageService, true);

                // setup commands
                (myCommandSet = ORMDesignerDocView.CreateCommandSet(this)).Initialize();

                // Create managed tool windows
                AddToolWindow(typeof(ORMModelBrowserToolWindow));
                AddToolWindow(typeof(ORMReadingEditorToolWindow));
                AddToolWindow(typeof(ORMReferenceModeEditorToolWindow));
                AddToolWindow(typeof(ORMSamplePopulationToolWindow));
                AddToolWindow(typeof(ORMVerbalizationToolWindow));
                AddToolWindow(typeof(ORMDescriptionToolWindow));
                AddToolWindow(typeof(ORMNotesToolWindow));
                AddToolWindow(typeof(ORMContextWindow));
                AddToolWindow(typeof(ORMDiagramSpyWindow));

                // Make sure our options are loaded from the registry
                GetDialogPage(typeof(OptionsPage));

                InitializeToolbox();
            }
        }
Esempio n. 2
0
		/// <summary>
		/// This is called by the package base class when our package is loaded. When devenv is run
		/// with the "/setup" command line switch it is not able to do a lot of the normal things,
		/// such as creating output windows and tool windows. Under normal circumstances our package
		/// isn't loaded when run with this switch. However, our package will be loaded when items 
		/// are added to the toolbox, even when run with "/setup". To be safe we'll check for "setup"
		/// and we don't do anything interesting in MgdSetSite if we find it. 
		/// </summary>
		protected sealed override void Initialize()
		{
			base.Initialize();

			// register the class designer editor factory
			RegisterEditorFactory(new ORMDesignerEditorFactory(this));

			if (!SetupMode)
			{
				((IServiceContainer)this).AddService(typeof(ORMDesignerFontsAndColors), myFontAndColorService = new ORMDesignerFontsAndColors(this), true);

				FactEditorLanguageService managedLanguageService = new FactEditorLanguageService();
				managedLanguageService.SetSite(this);
				((IServiceContainer)this).AddService(typeof(FactEditorLanguageService), managedLanguageService, true);

				// setup commands
				(myCommandSet = ORMDesignerDocView.CreateCommandSet(this)).Initialize();

				// Create managed tool windows
				AddToolWindow(typeof(ORMModelBrowserToolWindow));
				AddToolWindow(typeof(ORMReadingEditorToolWindow));
				AddToolWindow(typeof(ORMReferenceModeEditorToolWindow));
				AddToolWindow(typeof(ORMSamplePopulationToolWindow));
				AddToolWindow(typeof(ORMVerbalizationToolWindow));
				AddToolWindow(typeof(ORMDescriptionToolWindow));
				AddToolWindow(typeof(ORMNotesToolWindow));
				AddToolWindow(typeof(ORMContextWindow));
				AddToolWindow(typeof(ORMDiagramSpyWindow));

				// Make sure our options are loaded from the registry
				GetDialogPage(typeof(OptionsPage));

				InitializeToolbox();
			}

		}