Snippets basics



xJSFL ships with a front end interface panel called xJSFL Snippets, which allows you to display JSFL scripts on your hard drive in an easy-to-navigate panel.

The panel is accessible from the menu Window > Other Panels > xJSFL Snippets.

The panel has several features of note:

  • You can load alternate Snippet sets by clicking the folder icon in the top-right  corner
  • You can filter the list of Snippets by typing in the filter box at the top
  • Each Snippet can display an individual icon and tooltip by adding a JavaDoc comment to the head of the file
  • Right-clicking on a file or folder gives you the following commands:

The Create Command command creates a shortcut to the Snippet in the Commands menu, allowing you to bind keyboard shortcuts to Snippets in CS4 and higher.

Snippets vs Commands

Snippets are essentially no different from Commands, so you can put any JSFL code you like in a Snippet.

The main difference between the Commands menu and the Snippets panel is that the Snippets panel allows a much more interactive experience with running and managing your JSFL scripts:

  • You can have multiple Snippets sets
  • You can nest Snippets in sub-folders as many levels deep as you like
  • You can quickly browse to a Snippet folder or file location on your hard drive
  • You can quickly run a file by double-clicking it
  • You can quickly edit a file by CTRL+clicking it

The xJSFL framework also provides an incredibly easy-to-use XUL class to create XUL interface panels on the fly, which makes creating interactive JSFL scripts easier than ever before.

Next steps

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>