File | Edit | View | Templates | Windows | Compiler | Run | Help
The templates menu is used to insert pre-typed blocks of code into the CSD window at the current cursor location. These templates allow the user to quickly build skeletal programs in which details are inserted at place holders to form a completed program. By using the tear-off option (the dashed line at the top of the template menu) the template menu itself becomes a free-standing window, allowing easy multiple use of the tempaltes. The default menu contains the major Java constructs.
Additionally, a user may add custom templates to the templates menu by placing menu files in the directory .grasp/templates. The format for these menu files is as follows:
!menu_name
#block_name1
<_
insert your custome block here (any text)
_>
#block_name2
<_
insert your custome block here (any text)
_>
#block_name3
<_
insert your custome block here (any text)
_>
The control strings ! # <_ _> must be left aligned. Lines of text that do not begin with ! or # and are not between <_ and _> will be ignored by GRASP.
Template file names with the extension .java will be used exclusively for the Java CSD window. (Template files with .c and .ada95 extensions will be used exclusively in the C and Ada 95 CSD windows, respectively.) The default template files are located in $GRASP_HOME/templates.