Ejemplo n.º 1
0
        private bool HandleEnterPressed(IActionContext context)
        {
            ITextControl textControl = context.TextControl;

            if (GetTypingAssistOption(textControl, TypingAssistOptions.BraceInsertTypeExpression) == SmartBraceInsertType.DISABLED)
            {
                return(false);
            }

            using (CommandProcessor.UsingCommand("Smart Enter"))
            {
                using (WriteLockCookie.Create())
                {
                    if (DoHandleEnterAfterLBracePressed(textControl))
                    {
                        return(true);
                    }

                    context.CallNext();
                    DoSmartIndentOnEnter(textControl);
                    return(true);
                }
            }
        }