Edit the
file.
Inside the
<Functions></Functions> element, add
the following XML code:
<Function
name="MyExtensionFunctions.MyFunction"
where name = <some grouping id, typically your Java
classname>.<function name>
type="string"
where type = <any XSD schema data type for the return value of
the function>
id="Fun.MyExtensionFunctions.MyFunction.1"
where id = Fun.<grouping id function name>.<instance of
this function>
Note: Use the instance value to distinguish overloaded functions.
isInToolPalette="true"
where isInToolPalette = true if the function appears in the Tool
Palette and Expression editor context menu.
toolPalettePageID="Custom Functions"
where toolPalettePageID is the name for the tool palette page (or
category).
This creates a new page if the page does not already exist. Each
new name creates a new page.
toolPaletteLabel="My Function"
where toolPaletteLabel is a label for the function icon in the
Tool Palette or Expression Editor context menu.
toolPaletteType="Custom.Fun.MyExtensionFunctions.MyFunction.1"
where toolPaletteType is <Tool Palette group
ID>.Fun.<grouping ID>.<function name>.<instance of this
function>.
toolPaletteDescription="This is the MyFunction custom function that does x, y, and z."
where toolPaletteDescription is a label for ToolTip (hover) help.
toolPaletteIconPath="icons/temp48.gif">
where toolPaletteIconPath = the name of any icon that is in the
<install
directory>\sybase_workspace\integration\eclipse\plugins\com.sybase.stf.editors.rule_<version
number>\icons path.
<Extension
library="com.mycompany.custom"
where library if the package containing your custom Java class.
prefix="myco"/>
where prefix is a namespace prefix used to distinguish this class
of functions.
Do not use
syexts, which is reserved for Sybase-delivered
extensions.
<Argument
name="str1"
where name is an arbitrary name associated with the function's
argument.
<Function
name="MyExtensionFunctions.MyFunction"
where name is a grouping ID, such as your Java classname and
function name.
type="string"
where type is any XSD schema data type for the argument type.
minOccurs="1"
maxOccurs="1"/>
Repeat the <Argument> element for each argument required by
the function.
</Function>