![](http://habrastorage.org/getpro/habr/avatars/38e/dd9/f43/38edd9f437818028e4cdcc1a4723b0f7.png)
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](https://habrastorage.org/web/4c5/e1e/fbb/4c5e1efbb9cc4b2ba5307e08117e028d.png)
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
![Extract method](https://habrastorage.org/web/906/64c/f46/90664cf4674446b29c91d9eb7a6b7c3e.gif)
By the way, if you didn’t try this to work with Objective-C / C / C ++ - be sure to try.
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](https://habrastorage.org/web/dc5/322/e56/dc5322e5620045719a1b398d30967ce6.gif)
And if you want to save time on calling auto-completion for several methods,
![Override / implement](https://habrastorage.org/web/7a9/702/9a2/7a97029a2b174ffc8ac95d592abac8a5.gif)
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](https://habrastorage.org/web/298/888/823/2988888234624e168bef3f3bdece25be.gif)
Each AppCode user is familiar with the keyboard shortcut
![Blank lines](https://habrastorage.org/web/446/dd8/3f1/446dd83f1d8f4f89a931684b24aeb007.png)
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](https://habrastorage.org/web/2e7/edd/8ee/2e7edd8ee54c48a48269fb8b326b1b58.png)
Everything is simple here: we supported
![__auto_type support](https://habrastorage.org/web/09c/9de/78c/09c9de78c6b64e35a46c44ac847b0862.png)
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
![Quick documentation](https://habrastorage.org/web/772/5d1/5bc/7725d15bcad04cc5a17c0a6932b6b233.gif)
By tradition, all the C / C ++ support enhancements described here in the section on parser correctness improvements are available in AppCode.
I would also like to note the changes in Git support that have appeared in all IDEs on the IntelliJ platform:
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.
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](https://habrastorage.org/web/4c5/e1e/fbb/4c5e1efbb9cc4b2ba5307e08117e028d.png)
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
⌥⌘M
select 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](https://habrastorage.org/web/906/64c/f46/90664cf4674446b29c91d9eb7a6b7c3e.gif)
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](https://habrastorage.org/web/dc5/322/e56/dc5322e5620045719a1b398d30967ce6.gif)
And if you want to save time on calling auto-completion for several methods,
^I
/ is ^O
always at your service:![Override / implement](https://habrastorage.org/web/7a9/702/9a2/7a97029a2b174ffc8ac95d592abac8a5.gif)
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](https://habrastorage.org/web/298/888/823/2988888234624e168bef3f3bdece25be.gif)
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](https://habrastorage.org/web/446/dd8/3f1/446dd83f1d8f4f89a931684b24aeb007.png)
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](https://habrastorage.org/web/2e7/edd/8ee/2e7edd8ee54c48a48269fb8b326b1b58.png)
__Auto_type support
Everything is simple here: we supported
__auto_type
for 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](https://habrastorage.org/web/09c/9de/78c/09c9de78c6b64e35a46c44ac847b0862.png)
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
F1
again correctly displays the documentation for various entities in the code:![Quick documentation](https://habrastorage.org/web/772/5d1/5bc/7725d15bcad04cc5a17c0a6932b6b233.gif)
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
):
as well as the ability to format commit messages according to them through⌘⌥L
:
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.