How to add a method to a class?

Create a new method from a class Coder using the + button above the method list.

Just enter the code and accept it (checkmark). You can also just enter the method header, and continue editing once the method has been added to the list.

You can also create a method from a fixit in a code snippet or any code editor where the class of the method to be added can be inferred.