Declare Method

An error is triggered when calling a method which does not exist.

Place the editor cursor on the error’s line and press Ctrl+1, select Declare function … or Declare task … from the list of quick fix proposals and press Enter.

../../_images/sv_quick_fix_declare_method_list.png

The method stub declaration is inserted in the appropriate scope.

../../_images/sv_quick_fix_declare_method_after.png

Note

The method signature (return type, argument names and types) is automatically detected from context.

Note

The implementation stub contains a TODO reminder which shows up the Tasks View. See Track Tasks using TODO Markers.

Tip

You may change the function’s return type, as well as the name and type of each argument. Press Tab key to switch between the edit boxes, and Enter when done.

Tip

You can change the method signature by editing the Method Code Templates