News

AppCode 2016.3: first part of Swift 3 support, new formatting options, performance improvements, Create from usage for Swift and more!

Hi everyone,

AppCode 2016.3 is here, so download and try it right now! The patch update is also available if you are using 2016.2.4 version.
AppCode 2016.3
In this post we will cover the most important changes included. Let’s get down to it!

Swift

Language support

AppCode 2016.3 delivers the first part of Swift 3 support, and here you can see which tasks are in progress and are included in this release. Note that some proposals (those that have None in the Affected areas column) do not cause problems visible for the end-user but still require some development activity from our side – that’s why they’re in the Open state.

Formatting

Reformat your code easily with the new formatting options for the following Swift code constructs:

  • colons in type annotations, dictionary type declarations and key:value pairs
  • closures
  • chained method calls
  • function declaration parameters and call arguments
  • condition clauses

Read more about their usage in this blog post or see them in action in our What’s New video below.

Create from usage

Code generation is one of the essential areas where AppCode is different. Lots of different actions and intentions are already available for Objective-C/C/C++, and with every release more and more of them become available in Swift. Override/Implement (^O/^I) helps you quickly implement all required methods in the protocol and override multiple methods at once. Live Templates allow you to create reusable and interactive code snippets. Introduce Variable (⌥⌘V) refactoring automates extracting Swift expressions into local variables.

AppCode 2016.3 adds a new member to our code generation family: Create from usage intentions for Swift functions, variables and properties.

Write the signature of a non-existing function (class method or the global one) when prototyping your code, invoke ⌥⏎ and have its declaration created automatically:
Create function from usage
Need to create a local variable or a global one? Or add a new property to your existing class? Use it in your code, invoke ⌥⏎ and save your time on typing its declaration:
Create variable from usage

Performance improvements

In this release we dedicated a lot of time to performance improvements in Swift editing.

The first and huge part of improvements is related to resolution performance. Our previous attempt to implement the recursive closure resolve in Swift allowed us to improve the symbol resolution in case of closures, but its performance was far from perfect.

We’ve managed to fix a lot of the slow-downs and issues with inaccurate resolution. As a result, even complex Swift files should now be highlighted faster while code entities (including closure shorthands which stopped working in 2016.2.x version) should now be resolved significantly better.

SourceKit integration became the second area of performance improvements, as editor optimizations allowed us to clearly reproduce some cases when errors, warnings and fixits in the Swift code were shown very slowly. Now these issues are fixed, so errors and warnings should be shown in the editor much faster than before.

Finally, code completion in Swift and mixed code should work much faster in general now, since we heavily optimized completion calculation and caching.

UI tests

AppCode test runner now supports UI tests. Run all tests in your test file or execute a single one simply by pressing ^⇧R (or debug via ^⇧D). Re-run only failed tests in one click and easily filter them out from successful ones:
Re-run failed
Sort UI tests by duration:
Sort by duration
And benefit from the built-in test history:
Test history

Semantic highlighting

Semantic highlighting helps understand how data flow through the code by highlighting each variable/parameter with its own color. You can enable it in Preferences | Editor | Color & Fonts | Language Defaults and use it when writing Swift, Objective-C or C++ code:
Semantic highlighting

C/C++ language support

We usually focus on new Objective-C and Swift support features. But in addition to these languages, this AppCode release contains lots of new C/C++ support features developed by the CLion team, including:

  • User-defined literals.
  • C++14 digit separators support.
  • Overload resolution support.
  • Dozens of code analysis improvements.
  • C11 keywords support including auto-completion.

Read more about them in this blog post.

Version control

The following changes are available for VCS support:

  • Undo commit action is added to the Log context menu for changes that are not pushed yet.
  • Ability to restore a deleted local branch.
  • New option for Git –signoff commits in Commit dialog.
  • Ability to resolve simple conflicts in one click (non-overlapping changes on one line).
  • Performance improvements for filtering in Git and Mercurial log, as well as an improved UI.

Other changes

  • San Francisco is now the default font in the Default and Darcula themes, and it is used across all menus.
  • Editor color schemes bundled in AppCode are now editable by default and do not require you to copy the color scheme first.
  • The Find in Path dialog now keeps previously used settings (scope, file name filter, context, etc.), regardless of where you call it from.

That wraps it up! Check out this short demo to see the new features in action:

https://youtu.be/NW_a8inDeK4

Download AppCode 2016.3

Your AppCode team
JetBrains
The Drive to Develop