By default, Streams Studio includes code templates for
composite operator, main composite operator, operator invocation,
and Use directive. You can customize these default
code templates for your SPL application.
Procedure
- From the menu, click Window > Preferences.
- In the Preferences window, expand and click Templates to display the Templates window.
- Click Edit to modify the default
templates.
- Click Export to export the templates
to an XML file.
- In the XML file, for each code template, add the id attribute. The following example shows how to add id="templateID1" to
a code template in an XML file:
<template id="templateID1" autoinsert="true"
context= "com.ibm.streams.studio.spleditor.SPL.CompositeDef" deleted="false"
description="General composite definition" enabled="true"
name="Composite Definition">${modifier} composite ${name} (output ${outputs};
input ${inputs}) {
param ${formals};
type ${types};
graph ${inovkeOperators};
config ${configs}; }
</template>
- Copy the edited code templates to the Streams
Studio install location/plugins/com.ibm.streams.studio.spleditor.templates/templates/templates.xml file.
- Restart Eclipse.