Editing with snippets

In the Snippets view, you can catalog and organize reusable programming objects, such as HTML tagging, JavaScript, and JSP code, along with files and custom JSP tags. The view can be extended based on additional objects that you define and include.

About this task

The Snippets view has the following features:
  • Drag-and-drop to various source editing pages: You can drag items from the view into the active editor and the text is dropped into the document at the cursor location.
  • Double-click support: You can double-click an item and have it inserted at the current cursor position in the active editor.
  • User-defined drawers and items: You can define, edit, and remove items from view drawers.
  • Plug-in-defined drawers and items: Plug-in developers can contribute a default list of items to their own drawers.
  • Variables in insertions: By default, items are edited using a dialog and, when inserted, you are prompted for values for each of the variables.
  • Customization: You can select which drawers and items are shown in the Snippets view.
  • Custom insertion: Plug-in developers can customize the behavior of items so that when they are dropped during a drag-and-drop action, both the text that is inserted and the insertion location are strictly defined.

Procedure

  1. Open the Snippets view. Click Window > Show View > Other > General > Snippets > OK.
  2. Edit your reusable programming objects. In the Snippets view, you can add, edit, or delete snippet items or drawers.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: tsrcedt026.html