Source: blog.jetbrains.com

Code Generation
AppCode’s code generation features allow you to avoid having to type in lots of the standard code constructs. In addition to the standard file types, you can create custom templates or modify code in existing ones in Preferences | Editor | File and Code Templates: Let’s say you want to modify the copyright notice for Swift classes.

Go to the Includes tab and select the Swift File Header template: Here you can modify the code for all Swift classes and other file types that use this include.

You can create this type right away by pressing ⌥⏎ and choosing one of the three available options: If, for example, you want to create a class in a separate file, select Create type ‘’ in a file and specify the group this file will belong to in the dialog that opens: AppCode will generate the standard code for the newly created class: Now let’s look at how you can generate code inside classes.

When you call a method or property that is not declared in this class, press ⌥⏎, and in the list that appears, select Create property ‘’ or Create method ‘’: The boilerplate code for the new class member will be added: You can create initializers from inside class code.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners