Example #1
0
 /// <summary>
 /// Invoked when the user selects the "Rename" command
 /// </summary>
 private void RenameClicked(Object sender, EventArgs e)
 {
     try
     {
         RenamingHelper.AddToQueue(RefactoringHelper.GetDefaultRefactorTarget());
     }
     catch (Exception ex)
     {
         ErrorManager.ShowError(ex);
     }
 }
Example #2
0
        /// <summary>
        /// Apply the new name.
        /// </summary>
        private void OnApply(InlineRename sender, string oldName, string newName)
        {
            UpdateDefaultFlags(sender);
            if (newName.Length == 0 || oldName == newName) return;

            if (isRenamePackage)
            {
                renamePackage = new Move(new Dictionary<string, string> { { renamePackagePath, newName } }, true, true);
            }

            OldName = oldName;
            NewName = newName;
            RenamingHelper.AddToQueue(this);
        }