Templates for configuring program function
Every program definition must inherit from the ProgDef class
Template for program definitions.
Program definitions should inherit from this class
and should define settings in the config dictionary
(see already written definitions for example implementation).
If a program definition needs special handling, you may
override the set() method.
Save the file and run pre/post-save hooks.
Return an array of rule objects that contain key.
Generate and print a diff of the change in config file.
Returns the config rule tree.
Can be overridden if necessary
Return the path to use for configuration.
This method must be overridden.
Check if filebuffer exists. If not, one is created.
Get file path from Settings.
If not found there, get from default path.
Returns the name of the program. Class name by default.
Return rule_objs scope portion of initial_buffer.
Define rules for configuration.
This method must set the self.config variable, which must
be of type common.ConfigElement. Usage is defined under the
Common and Example sections.
Check if the program is installed on the target system.
Returns a boolean.
Save the old contents to a backup file
Return a tuple for the start and end of the scope.
Returns a tuple the start and end positions of the scope
within the initial_buffer: (startpos, endpos).
Exclude rule format: (depth, startpos, endpos).
If you absolutely have to override __init__
then you must at least include pre_init in __init__.
Save the file.
Set value to key.
Can be overridden if there are specific needs.