Code templates are small document fragments that can be inserted quickly at the editing
position and can be reused in other editing sessions. Oxygen comes with a large set of
ready-to use templates for XSL, XQuery and XML Schema. You can even share your code templates
with your colleagues using the template export and import functions.
To obtain the template list, you use:
- The shortcut key for content completion on request:
(Ctrl+Space) on Windows and Linux,
(Cmd+Space) on Mac OS X. It displays the code templates
in the same content completion window
with elements from the schema of the document.
- The shortcut key for code templates on request:
(Ctrl+Shift+Space) on Windows and Linux,
(Cmd+Shift+Space) on Mac OS X. It displays only the code
templates in the popup window.
The Code Templates preferences panel is opened from menu . It contains a list with all available code templates (both built-in and custom
created ones) and a code preview area. You can disable any code template by unchecking its
corresponding option box.
The Code Templates Preferences Panel
- New - Defines a new code template. You can define a code template
for a specific type of editor or for all editor types.
- Edit - Edits the selected code template.
- Duplicate - Duplicates the code template that is selected in the
list.
- Delete - Deletes the code template that is selected in the list.
This action is disabled for the built-in code templates.
- Import - Imports a file with code templates that was created by the
Export action.
- Export - Exports a file with code templates.