AppCode 2017.2: Extract Method and auto-completion improvements for Swift, __auto_type support in Objective-C and much more

    Hello, Habr!

    AppCode 2017.2 has been released, which means it's time to talk about all the new features in this release! Under the cut, as always, a lot of pictures.

    AppCode 2017.2

    Extract method


    There is such a tradition among IDE developers: the third refactoring for any language is always to do the Extract Method . Joking as a joke, but this is really one of the most commonly used code transformations.

    In AppCode, it happens as follows: we ⌥⌘Mselect a section of code, call it , set the desired method name, if necessary, edit the order of parameters and their names in place, click and voila, a new method is created, the desired section of code is replaced:

    Extract method

    By the way, if you didn’t try this to work with Objective-C / C / C ++ - be sure to try.

    Auto completion


    Autocompletion of methods and properties available for overloading (or implementation) is one of the features familiar to all Xcode users. Now in AppCode it is also available for Swift code:

    Override completion

    And if you want to save time on calling auto-completion for several methods, ^I/ is ^Oalways at your service:

    Override / implement

    Type Tips


    What if I can’t immediately recall the type of one of the closure arguments? That's right - enable the Show Swift Type Hints setting in AppCode:

    Inline type hints

    Formatting


    Each AppCode user is familiar with the keyboard shortcut ⌥⌘L, which allows you to quickly and conveniently format the current file (or the entire project when called from the Project view ). In this version, we added the ability to configure the minimum number of empty lines around properties and methods separately for classes and protocols:

    Blank lines

    As well as a setting that allows not to apply transfer rules to simple functions and methods when formatting:

    Simple methods and functions in one line

    __Auto_type support


    Everything is simple here: we supported __auto_typefor Objective-C, learned how to parse it correctly, show it in the auto-completion list and take it into account in type calculation:

    __auto_type support

    Documentation


    In Xcode 8.x-9.x, the format of the database with the documentation changed a couple of times, we picked up these changes and finalized support in AppCode. Now F1again correctly displays the documentation for various entities in the code:

    Quick documentation

    C ++


    By tradition, all the C / C ++ support enhancements described here in the section on parser correctness improvements are available in AppCode.

    Vcs


    I would also like to note the changes in Git support that have appeared in all IDEs on the IntelliJ platform:

    • Ability to roll back multiple changes through Git Log using Revert or change commit message using Reword
    • Settings for automatic verification of commit messages (available in Preferences | Version Control | Commit Dialog):

      Commit message inspections

      as well as the ability to format commit messages according to them through ⌘⌥L:

      Reformat commit message

    That's all - read about other features of the product on our website , stay tuned in our English-language blog and ask any questions in the comments to this post.

    Also popular now: