Add-ins extend General Interface functionality. They are most often used when developers need additional functionality that spans multiple projects, but that isn't common enough to be included in all projects.
These are the main types of add-ins:
- System Add-ins provide common functionality that might not be required by all projects, but that is common enough to ship with the core General Interface framework. Charting, for example, is a system add-in that provides charting capabilities only to the projects that implement it.
- Custom User Add-ins are created by developers to provide enhanced functionality that can span multiple projects, but that isn't common enough to be included in all projects.
This tutorial demonstrates how to create a custom add-in, focusing on creating custom classes and configuration files.
Steps for Creating Custom Add-ins
In this tutorial you'll follow these basic steps to create a custom add-in:
- Create a General Interface project for developing your add-in, then create the JavaScript classes that define the new GUI components.
- Create the prototypes for the new GUI components.
- Create files for custom properties, events and XSL parameters.
- Create a catalog.xml file for custom properties, events, and XSL parameters files. The catalog.xml file describes the location of custom properties, events, and XSL parameters files.
- Create a JavaScript file, using the General Interface API, that loads catalog.xml.
- Deploy the custom add-in by copying the project to your user add-ins directory, modifying the add-in's config.xml file, then enabling the new add-in, testing it, and making it available for general use.
About Add-in Files and Folders
The add-in you'll create in this tutorial includes these files and folders.
| Folder |
File |
Description |
| |
config.xml |
Add-in configuration file (at the top level of the myAddin directory) |
| js/my |
package.js |
JavaScript file that declares the package and loads the catalog file |
| js/my/example/ |
Container.js |
Container class |
| Widget.js |
Widget class |
| properties |
catalog.xml |
Describes the location of the properties files for Container and Widget |
| Container.xml |
Properties file for the Container prototype that appears in the Properties Editor palette after deployment |
| Widget.xml |
Properties file for the Widget prototype that appears in the Properties Editor palette after deployment |
| prototypes |
Container.xml |
Container prototype that appears in the Component Libraries palette after deployment |
| Widget.xml |
Widget prototype that appears in the Component Libraries palette after deployment |
|
|