Apex Quick Fix

Apex Quick Fix

The Quick Fix widget suggests ways to automatically update your code.

Quick Fix: Declare Missing Methods

You can invoke the Quick Fix widget when you reference a method that isn’t declared in your source. The widget declares the method for you automatically.

There are three ways to invoke the Declare Missing Methods quick fix in VS Code.

  1. When you click the name of the undeclared method, a lightbulb appears on the left side of the editor window. Click the lightbulb, then click Create method ‘yourMethod’ in ‘YourClass to make the quick fix.

GIF showing declare missing methods quick fix invocation via lightbulb

  1. Hover over the method name, then click Quick Fix in the window that pops up. Then, click Create method ‘yourMethod’ in ‘YourClass to make the quick fix.

GIF showing declare missing methods quick fix invocation via window popup

  1. The keyboard shortcut for the Quick Fix widget is Ctrl+. (Windows or Linux) or Cmd+. (macOS).

Feedback or Bugs | Edit this Article