Custom Column Formats
 

This section describes how you can extend the plugin with your own column formats.


Step 1: Create the Format

The format class must implement one of the interfaces com.kiwisoft.utils.format.TextFormat or com.kiwisoft.utils.format.BooleanFormat. You can also use the class com.kiwisoft.utils.format.DefaultObjectFormat as your base class.

The format class does the actual formatting and parsing for a set of objects.

The method getName() should return a unique name for the format because the formats are identified by this name.


Step 2: Create a Format Provider

A format provider is needed if the format class doesn't contain a default constructor or if you have more than one format. If you have only one format class and the class contains a default constructor you can skip this step.

The format provider class must implement the interface com.kiwisoft.utils.format.FormatProvider. The class must contain a default constructor.

The format provider returns an array of different formats.


Step 3: Register the Format

If the plugin should find your formats you must add the format provider class or the format class to the file <IDEA-PLUGINS-PATH>\ks-sql\formats.properties.


Example