Using the IDE

The IDE offers support for editing both .ftl and .xswt files to help create wizard pages and templates.

Editing XSWT Files

Double-clicking on an XSWT file will open it in the XSWT editor. The editor provides basic syntax highlighting. An extremely useful feature of the IDE is the XSWT Preview, where you can preview the form being edited (it updates when you save the file). The Preview should open automatically when you open the XSWT file; if it does not (or you close it), you can access it via the Window|Show View… menu item.

Some (custom) widgets may not appear in the Preview; this is because the Preview does not load jar files from the projects.

Figure 1.3. Editing an XSWT file

pictures/xswt-editor.png

Editing Template Files

The FreeMarker Editor opens when you double-click files with the *.ftl or *.fti extension. The FreeMarker Editor offers basic syntax highlighting, validation (error markers appear during editing if the template is not syntactically correct), and basic content assist. Content assist can help you with directives (<#...> syntax) and built-in operations (like ?number, ?size, ?default, etc). The content assist popup appears automatically when you type <# (actually a closing > is also needed for the editor to recognize the tag), and when you hit ? within a directive or an interpolation (${...}).