Quick Fix Proposals

Quick Fix Proposals are available for problems indicated with a light-bulb on the left vertical bar of the editor.

To display the list of proposals, place the cursor inside the problem highlight range (squiggle underline) and select the Quick Fix… command, click on the light-bulb or trigger the context menu of an entry from the Problems View.

Create File From Build Configuration Editor

A build configuration error is triggered when a non-existing file is specified for compilation or included as an argument file (for example using -f).

To fix it, select Create file … in … from the list of proposals.

The file is created in the chosen location and opened in a new editor.

Create Imported File

An error is triggered when including a file that does not exist.

To fix it, select Create file … in … from the list of proposals.

The file is created in the chosen location and opened in a new editor.

Declare Enum Constant

An error is triggered when using a non-existing enumerated type constant. DVT provides an easy way to declare the missing constant.

To fix it, select Declare enumerated type constant … from the list of quick fix proposals.

Declare Event

An error is triggered when using an event which does not exist.

To fix it, select Declare event … from the list of quick fix proposals.

The event is declared in the appropriate scope.

Declare Variable

An error is triggered when using an identifier that does not exist, for example, a variable that you did not declare yet.

To fix it, select Declare variable … from the list of proposals. Depending on context, several quick fix proposals might be available:

  1. declare variable

  2. declare argument (if inside a method)

  3. declare field (if inside a class)

The type of the new variable declaration is automatically detected from context and the variable declaration is placed in such a way that it is visible for all usages.

Did You Mean

Typos represent a common source of compilation errors.

To fix such an error, select Did you mean … from the list of proposals. The list may contain up to 3 relevant proposals, available only for unknown identifiers at least 3 characters long.

The undeclared identifier is replaced by a proposal of your choice.

Waive Compilation Problems

DVT provides a quick and easy way to waive compilation problems from the editor.

Select Waive … from the list of proposals.

You can change the default waiver severity, description, path, and message in the dialog view. When done, the new waiver is automatically added to the .dvt/waivers.xml file and applied.