All Functions and Procedures

Name Unit Description
AddCommand Command.Add

This command adds features to the project like a unit tests project creating a tests subfolder, or adds code documentation capabilities to the project base on pasdoc.

BuildCommand Command.Build

This command uses the lazbuild tool to build the specified project. If one was not provided, try to find one on current directory and builds it.

The purpose of this command is to automate the build process along with the watch command.

The command accepts two build options –debug or –release. The project file must have both modes with these respective names. If no option is passed, the lazbuild tool will run in default mode.

CleanCommand Command.Clean

This command recursively from the current path searches for folders named "lib" and "backup" to remove them. However, before removing them, it asks the user for confirmation. Confirmation that can be suppressed if the –force option is given.

FindFile Utils.IO

Recursively search for the first file from the specified path. Returns the filename with the full path if it was found.

FindInCodeFile Utils.IO

Returns first ocurrence of text in format line:1 (column is always 1). It is case insensitive search. If not text is found the function returns an empty string.

FindProject Command.Build

Checks if specified project exists, if a project file is not provided try to find one on current directory. Returns complete file name if a project is found.

FindProjectFile Utils.IO

From the current directory it tries to locate a lazarus project that contains a specific text. If AText is empty the first project found will be returned. Returns the project file name.

FindSourceFile Utils.IO

From the current directory it tries to locate a source file. Any file with .pas or .pp extension will be considered as source file. Returns the first occurence of a source file. Returns empty if not source file was found.

GetFileContent Utils.IO

Get the contents of AFileName in string.

GetJsonFileContentWithOutComments Utils.IO

Get the contents of a JSON AFileName in string. Remove commented lines to make possible do parse its content. Returns JSON content.

GetParametersFrom Utils.Shell

Process a raw string and returns an array of strings with the parameters that were separated by spaces, and consider as single parameter a string between double quotes.

GetResource Utils.Resources

Returns a string with the content of the resource file.

GetTestExecutable Command.Test

From the current directory it tries to locate an fpcunit compatible test project that has been previously compiled. Returns complete test file executable name. If the function returns empty, the project does not exist or is not of the expected type.

InstallCommand Command.Install

Copy the pasc application to the "home" folder and create the folder if it doesn't exist. Updates the OS-equivalent path environment variable with the new folder so that pasc is visible on the command line.

NewCommand Command.New

This command creates a freepascal/lazarus project respecting a previously organized folder structure so that it is easier to operate the project in vscode, with git previously initialized and ready to work with boss dependency manager.

OutputError Utils.Output

Outputs a error message in console with color from CommandBuilder theme color.

OutputInfo Utils.Output

Outputs a text in console with color from CommandBuilder theme color.

Registry Command.Add

Registry a add command using the command builder from pascli.

Registry Command.Build

Registry a build command using the command builder from pascli, also sets. options and usage help info.

Registry Command.Clean

Registry a clean command using the command builder from pascli, also sets. options and usage help info.

Registry Command.Install

Registry a install command using the command builder from pascli, also sets. options and usage help info.

Registry Command.New

Registry a new command using the command builder from pascli.

Registry Command.Test

Registry a test command using the command builder from pascli.

Registry Command.Watch

Registry a watch command using the command builder from pascli.

RunUserCommandAsRequested Command.Watch

Execute the command requested by the user, it will be passed to IPathWatcher so that it executes it. It is prepared to run the project build and tests as long as there is a respective executable. .

SaveFileContent Utils.IO

Save AContent string in the provided file name.

ShellCommand Utils.Shell

executes a program and returns the output as funciton result and also provide a execution status through AStatus out parameter

TestCommand Command.Test

This command recursively searches for a previously compiled test project from the current folder and runs it. At the end of the execution, an xml file with the same name as the test project is expected to be read. From this reading, a result is generated with the objective of highlighting the tests that failed, formatting the name of the source code file with a line and column in a format that vscode is able to understand and providing the developer with a link for quick navigation through the code.

If a memory leak trace file named heap.trc is found, the command also outputs information with details about the possible memory leaks in a format that vscode can provide easy navigation through the code.

WatchCommand Command.Watch

This command aims to monitor for changes in the current directory. Changes considered are new files, changes to existing files, and file deletions.

The ignored folders are the ones that start with ".", the ones named "lib", "modules", "backup". Ignored files start with ".", with no extension, .exe, .dll and .trc.

Once the change condition is satisfied, the requested commands are executed so that their output is generated in the console.


Generated by PasDoc 0.16.0.