Exemple #1
0
        void ExecuteWithSelect(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            var plugin = new OlegShilo.VSX.MoveTypeToFile();

            plugin.SynchActiveDocument(); //must be synch first
            plugin.ExecuteWithSelect();
            plugin.SynchActiveDocument();
        }
Exemple #2
0
        /// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        void Execute(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            var plugin = new OlegShilo.VSX.MoveTypeToFile();

            plugin.SynchActiveDocument(); //must be synch first
            plugin.Execute();

            // breaks the async formatting in `MoveToFile.FormatActiveDocument` thus comment it out
            // if formatting is desired.
            plugin.SynchActiveDocument();
        }