Build Plugin

Salma Sultana

T.C. Hollingsworth

Introduction

The Build plugin allows you to run actions like build, clean and compile on a project.

Using the Build Plugin

The Build plugin adds a Build Output tool view at the bottom and a Build menu on the menubar. The tool view can be used to configure build target settings, while the menu can be used to perform build, clean and compile actions.

The Build Output tool view has three tabs:

  • Target Settings

  • Output

  • Errors & Warnings

Target Settings tab

The target settings tab can be used to configure various build targets.

Each target contains four configuration options:

Working Directory

You can set the path to the project here. Leave this empty to use the directory the current document is located in.

Build

This option lets you define the build command. It is set to make by default.

Clean

The option lets you define the clean command. It is set to make clean by default.

Quick Compile

This option lets you define the quick compile command. It is set to gcc -Wall -g %f by default.

One can create a new target by using the New button. The Copy button can be used to make a copy of an existing target. To delete a target, use the Delete button.

Output tab

The Output tab shows the console output generated by the last command.

Errors & Warnings

The Errors & Warnings tab lists the errors and warnings generated by the last command.

Each line contains a message and the file name and line number if available. Clicking on the error or warning takes you to the appropriate file and places the cursor on the corresponding line number.

There are Errors, Warnings, and Others buttons at the top that allow you to show or hide those categories of output.

To navigate to the previous error, press Ctrl+Alt+Left. To navigate to the next error, press Ctrl+Alt+Right.

Menu Structure

BuildBuild

Runs the Build command for the currently selected target.

BuildClean

Runs the Clean command for the currently selected target.

BuildQuick Compile

Runs the Quick Compile command for the currently selected target.

BuildPrevious Error (Ctrl+Alt+Left)

Moves the cursor to the location of the previous error in the document.

BuildNext Error (Ctrl+Alt+Right)

Moves the cursor to the location of the next error in the document.

BuildTargets

Select from a list of targets configured by the user.

BuildNext Target

Switch to the next target configured by the user.

Thanks and Acknowledgments

The Kate Build Plugin was written by Kåre Särs.

Special thanks to Google Code-In 2011 participant Salma Sultana for writing much of this section.