예제 #1
0
        /// <summary>
        /// Initialization of the package
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            // This two objects must be cached.
            // Otherwise GC will collect them.
            events    = VS.Instance.Events;
            docEvents = events.DocumentEvents;

            docEvents.DocumentSaved += onSave;

            ReplaceSelectionWithJokeCommand.Initialize(this);
            AllJokesPanelCommand.Initialize(this);
        }
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 public static void Initialize(Package package)
 {
     Instance = new AllJokesPanelCommand(package);
 }