Inserting code snippets into EGL and JSP files

To insert an EGL code snippet into your code, follow these steps:

  1. Open the file to which you want to add a snippet.
  2. Open the Snippets view.
    1. Click Window > Show View > Other.
    2. Expand General and click Snippets.
    3. Click OK.
  3. In the Snippets view, expand the EGL drawer. This drawer contains the available EGL code snippets.
  4. 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.
  5. 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.

Feedback