This 1st part of this answer applied mostly to added a toolbox to whitebox using Java; the second part focuses on the somewhat similar, though much easier, processes that currently exists for adding tools using python scripts.
Plugin addition using Java
Following the instructions on the pdf hosted here will get you 99% of the way there. But after the following the instructions exactly, I could not load my tool. The problem comes down to a difference in the way you name your package in the java code for the tool. Step 9 in the instructions states:
First, if your new tools doesn’t reside within the same package (jar
file) as the tool you just pasted the code from, you will need to
alter the package statement on the first line; in the example from the
image above, the MyTool class would need to have a first line that
states, ‘package JohnLindsaysTools’ in reference to the
JohnLindsaysTools.jar file that will be created when I compile my
This is referencing the part of the java code for the tool that is circled below:
I have found that writing the name of the eventual jar file (the name of the project - in my case Tom_Taggart_Tools) doesn't work - that this prevents proper WhiteBox GAT from seeing the compiled JAR file - it probably compiles incorrectly or something, not sure. Anyway, the fix is to simply write the first line as it is labeled in the picture - "package plugins". That will allow the tool to (correctly) compile in a manner which produces a .jar file that WhiteBox recognizes. I assume this works because it correctly identifies the Java package that it actually resides in, the 'plugins' package that is a member of my project, "Tom_Taggart_Tools".
Plugin addition using Python
The standard available tools in Whitebox's toolbox have one of two icons, a little wrench or a scroll. The tools with the wrench icon are written in Java and are compiled and the scrolled icon tools are actually scripts, some of which have been written in Groovy (higher performance) and some in Jython (Python for Java). You can write a script to call existing scripts, i.e. to automate a workflow, or you can write a script that will be seen by the Whitebox interface as a full-fledged plugin tool. That is, it will be listed in the toolbox and will available to be called by other scripts.
There's an example file containing code replete with comments focused on how to write this type of tool. If you open the Scripter, then open the file 'ExamplePluginScript.py' which is located in Whitebox_3_2_0/resources/plugins/Scripts then you should see that it is a well documented template for how to write a tool this way. The process, you should find, is far easier than the process of writing a Java tool for Whitebox. And there's none of the complications of having to compile a jar file and place the jar in the appropriate folder and then relaunch the program. All you need to do is write the tool in the Scripter, then any changes that you make to the script will be live. Once you've saved the script, the next time that you launch Whitebox, if it's been written correctly, you'll find that it's listed in the toolbox.
Note: At the top of the script, you will need these lines:
# the name variable is the unique identifier for this tool. It cannot contain any spaces.
name = "MyScript"
# the descriptiveName variable is the name of the tool as it appears in the various tool listings. This name can contain spaces.
descriptiveName = "My Script"
# this string appears as a brief description in the status bar when the user clicks on your tool.
description = "This tool processes counts the number of records in a shapefile."
# these are the various toolboxes in the tool tree panel that this tool will appear in.
toolboxes = ["ConversionTools", "StatisticalTools"]
This describes the basic process for plugin creation using python - it doesn't go into creating a dialog box, but this can be accomplished easily learning from existing files in the WhiteBox toolset as well.
Additionally, you can open any of the script plugin tools that are in the Scripts folder for good examples of how to do specific things, e.g. create a dynamic tool dialog that updates as the user enters data, or work with attribute tables or shapefiles, etc.
Now, if you're running your various tools thousands of times, the developer (WhiteBoxDev) suggests that you take a look at running them through the 'Run Plugin in Parallel' tool, which will allow you to run a tool many times in parallel, using all of the various cores that you have available. WhiteBoxDev says this can drastically cut down on the time of execution.