コード例 #1
0
ファイル: Package.cs プロジェクト: spzenk/sfdocsamples
		/// <summary>
		/// Initialization method called by the package base class when this package is loaded.
		/// </summary>
		protected override void Initialize()
		{
			base.Initialize();

			// Register the editor factory used to create the DSL editor.
			this.RegisterEditorFactory(new FWK_DslEditorFactory(this));

			// Create the command set that handles menu commands provided by this package.
			FWK_DslCommandSet commandSet = new FWK_DslCommandSet(this);
			commandSet.Initialize();
			
			// Register the model explorer tool window for this DSL.
			this.AddToolWindow(typeof(FWK_DslExplorerToolWindow));

			if (this.DesignTimeRunMode)
			{
				// Toolbar registration doesn't work well under design run mode as the toolbox needs to be reset
				// Instead we'll dynamically zap and recreate our toolbox every time
				// Regular users of the finished tool will get the toolbox setup in the perfectly normal way
				this.SetupDynamicToolbox();
			}
		}
コード例 #2
0
ファイル: Package.cs プロジェクト: Br3nda/sfdocsamples
        /// <summary>
        /// Initialization method called by the package base class when this package is loaded.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            // Register the editor factory used to create the DSL editor.
            this.RegisterEditorFactory(new FWK_DslEditorFactory(this));

            // Create the command set that handles menu commands provided by this package.
            FWK_DslCommandSet commandSet = new FWK_DslCommandSet(this);

            commandSet.Initialize();

            // Register the model explorer tool window for this DSL.
            this.AddToolWindow(typeof(FWK_DslExplorerToolWindow));

            if (this.DesignTimeRunMode)
            {
                // Toolbar registration doesn't work well under design run mode as the toolbox needs to be reset
                // Instead we'll dynamically zap and recreate our toolbox every time
                // Regular users of the finished tool will get the toolbox setup in the perfectly normal way
                this.SetupDynamicToolbox();
            }
        }