/// <summary> /// Executes action. Called after Update, that set ActionPresentation.Enabled to true. /// </summary> /// <param name="solution"> /// The solution. /// </param> /// <param name="context"> /// The context. /// </param> protected override void Execute(ISolution solution, IDataContext context) { var textControl = context.GetData(DataConstants.TEXT_CONTROL); if (textControl == null) { return; } var introduceStringConstantRefactoring = new IntroduceStringConstantRefactoring(solution, textControl); introduceStringConstantRefactoring.Execute(); }
/// <summary> /// Executes this instance. /// </summary> /// <param name="element"> /// The element. /// </param> protected override void Execute(IElement element) { var introduceStringConstantRefactoring = new IntroduceStringConstantRefactoring(this.Solution, this.TextControl); introduceStringConstantRefactoring.Execute(); }