Preferences - Contributed Extensions / Tools

Select the Goto the ProvideX Builder preference page ProvideX > Contributed Extensions / Tools preference page.

ProvideX Contributed Extensions / Tools Preferences

Standard Options

The ProvideX plug-in includes a feature that allows developers to write their own tools or extensions that can be used to extend the features of the Plug-in.

Directory for User Keyword Categories and Observers
This option is used to specify the directory outside of the Eclipse install where the user files are located. These files include:
Enable external observers
This option tells the ProvideX plug-in to load all observers for the registered extensions and contributed tools.

All extensions and some contributed tools will listen for specific events from the Workbench and will execute only when these events occur. Many extensions add logic to the standard ProvideX build process and can be invoked before, after or before and after the standard build process. During the ProvideX Event Manager startup, an option will be added to this preference page for each registered extension or contributed tool.

Built-in Observers

The ProvideX plug-in includes several standard extensions and contributed tools.

Built-in ProvideX Contributed Extensions / Tools Preferences
Sage 100 - Style Check
This option is for a contributed tool that will also appear on the ProvideX | Contributed Tools menu and can be accessed from there. This tool has also registered itself as a builder extension. The option on this page is used to enable that part of the contributed tool - this option will NOT affect the operation of the tool from the contributed tools menu option.

This contributed tool is included with the 'Sage 100 Plug-in' and provides a rules-based source code style check.

Convert ProvideX keyed files to/from XML
This option is for a contributed tool that will also appear on the ProvideX | Contributed Tools menu and can be accessed from there. It has also registered itself as a builder extension and this option is used to enable that part of the contributed tool - this option will NOT affect the operation of the tool from the contributed tools menu option.

This contributed tool will convert ProvideX keyed files to/from XML.

Substitute modification year of source file for 'Copyright-year' tag
This is an extension that will replace the text '%(Copyright-year)%' within the first 1000 characters of the source file with the current year.

Set modification time stamp of output file to be the same as source file
This is an extension that has registered itself as a post-process builder extension that will change the modification time stamp of the output file to match the time stamp of the source file.

Simple rules-based Style Check
This option is for a contributed tool that will also appear on the ProvideX | Contributed Tools menu and can be accessed from there. This tool has also registered itself as a builder extension. The option on this page is used to enable that part of the contributed tool - this option will NOT affect the operation of the tool from the contributed tools menu option.

This contributed tool provides a simple rules-based source code style check.

Automatic keyword conversion in build process
This an extension that has registered itself as both a pre-process and post-process builder extension. It will perform keyword case conversion of the source file and once the build has completed, will save the modified source file.

Strip trailing whitespace (during build)
This an extension that has registered itself as both a pre-process and post-process builder extension. It will strip trailing whitespace from all lines of the source file and once the build has completed, will save the modified source file.

Register User-Defined Observers

A developer can write an extension (or contributed tool) following the steps described later in this documentation and place the programs into a directory on each workstation. This directory must also contain a file with the name 'classes.txt' to identify the programs to be registered with the plug-in.

# this file contains the names of my user-defined Observer classes
eventName=del_dupe_remarks
eventName=showtext
# must have a line after last observer definition

As this example shows, the format of each line is:
eventName=<NameOfClass>

where <NameOfClass> is replaced by the name of the class definition to be loaded.

Manage User-Defined Observers

Once the ProvideX Event Manager has been started, the observers that have registered themselves as pre/post process observers will appear on this preference page. The order of the observers on this preference page is not predictable.

User Defined ProvideX Contributed Extensions / Tools Preferences
Remove lines with duplicate line numbers
This extension has registered itself as a pre-process event listener for the build process.

It will scan the source file before it is passed to the builder looking for lines with duplicate line numbers and will create a new temporary to pass to the builder with the duplicate lines removed. The source code can be reviewed to see how easily this can be accomplished.

Show message in Console
This extension has registered itself as a pre-process and post-process event listener.

This is a very simple extension; the source code can be reviewed to see how easily this can be accomplished. When this extension is enabled, a message will be sent to the console during the pre-process and post-process for every event.

ShowText: A pre-process for FULL_BUILD/FULL_BUILD_START
ShowText: A post-process for FULL_BUILD/FULL_BUILD_START

Builder running

Compile Program: \DemoApp\src\prog\client.mnt.pvt
ShowText: A pre-process for INCREMENTAL_BUILD/BUILDONE
... Output File: ../compiled/prog/client.mnt
Build process: OK
ShowText: A post-process for INCREMENTAL_BUILD/BUILDONE

Build done
ShowText: A pre-process for FULL_BUILD/FULL_BUILD_END
ShowText: A post-process for FULL_BUILD/FULL_BUILD_END
Build time: 874
ShowText: A pre-process for PREFERENCE_CHANGE/_extObserver_masStyleCheck changed
ShowText: A post-process for PREFERENCE_CHANGE/_extObserver_masStyleCheck changed
ShowText: A pre-process for PREFERENCE_PAGE_BUTTON/performOk
ShowText: A post-process for PREFERENCE_PAGE_BUTTON/performOk