AppCode 2017.3 Help

Keymap:

Creating Code Constructs Using Generate Menu

The Generate menu helps you quickly create standard code constructs in your code. Depending on the current context, the caret position, or selected code, AppCode gives you a list of constructs to be generated.

Depending on a language, the Generate menu provides the following features:

You can modify code constructs by editing the code templates under Preferences | Editor | File and Code Templates

Item

Obj-C

Swift

C++

Generate method/function

Create -initWith and -init/encodeWithCodermethods.

Create -copyWith method.

Create -isEqual:and -hash methods.

Create -description method.

Create +instance method.

Declare and synthesize properties.

Declare members in header file.

Not supported

Constructors and destructors.

Getters and setters.

Implement method/function/member

Supported.

Supported.

Supported.

Override method/function/member

Supported.

Supported.

Supported.

In unit tests, you can create setUp/tearDown methods or test methods for OCUnit, XCTest, or Google Test. It, context, beforeEach, afterEach and specify blocks can be created for Kiwi.

Examples:

Examples below demonstrate how Generate | Override command works for Objective-C and Swift: