Exemplo n.º 1
0
        /// <summary>
        /// The execute transaction inner.
        /// </summary>
        /// <param name="solution">
        /// The solution.
        /// </param>
        /// <param name="textControl">
        /// The text control.
        /// </param>
        public override void ExecuteTransactionInner(ISolution solution, ITextControl textControl)
        {
            Utils.FormatLineForTextControl(solution, textControl);

            ITreeNode element         = Utils.GetElementAtCaret(solution, textControl);
            IBlock    containingBlock = element.GetContainingNode <IBlock>(true);

            if (containingBlock != null)
            {
                SpacingRules.CommasMustBeSpacedCorrectly(containingBlock);
            }

            IFieldDeclaration fieldDeclarationNode = element.GetContainingNode <IFieldDeclaration>(true);

            if (fieldDeclarationNode != null)
            {
                SpacingRules.CommasMustBeSpacedCorrectly(fieldDeclarationNode);
            }
        }