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 two tabs:

  • Target Settings

  • Output

Target Settings tab

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

To change the names or commands double click on the entries in the table and use the dropdown box to select the active target set. Use the checkbox in front of each target to define a default.

A new target set contains several 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.

Config

This option lets you define the config command. It is set to cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local ../ by default.

On the top this plugin has a toolbar with the following buttons :

Build the selected target
Add a new build target
Create a new build target set
Copy a command or target set
Delete the current command or target set

Output tab

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

Use the slider at the top to show or hide categories of output:

Full Output, Parsed Output, Errors and Warnings or Only Errors

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.

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

Menu Structure

BuildSelect Target

Select from a list of targets configured by the user.

BuildBuild Default Target

Builds the target defined as default in the active target set.

BuildBuild Previous Target

Switch to the previous target configured by the user.

BuildStop

Stop building a 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.

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.