To insert an EGL code snippet into your code, follow these steps:
- Open the file to which you want to add a snippet.
- Open the Snippets view.
- Click .
- Expand General and click Snippets.
- Click OK.
- In the Snippets view, expand the EGL drawer.
This drawer contains the available EGL code snippets.
- Use one of these methods to insert a snippet into the file:
- Double-click a snippet to insert that snippet at the current cursor
position. You may see a window describing the variables in the snippet.
If so, enter values for these variables and then click Insert.
- Click and drag a snippet into the source code. This method works
only when putting a snippet on a JSP file.
If you selected a snippet that contains variables, you will
be prompted to enter the variables.Note: If the cursor turns into
a circle with a strike through it, indicating that the snippet can
not be inserted at that point, you may be trying to insert the snippet
into the wrong place. Check the snippet's details to find out where
it should be inserted in the code.
- Change the predefined names of functions, variables, and data
parts in the snippet as appropriate to your code. Most snippets include
comments that explain what names need to be changed.