Editing applications

Application editing includes file editing and dependency management.

Overview

Editors for an application are accessed by clicking on the application entry from the list in the My Applications tab. For example, by clicking on myapp1 in the following application list:

Screen capture of an application list on the My Applications tab.

then the associated application editor is opened, as shown in the following screen capture:

Screen capture of the application editor.

Editing files

The basic features of file editing include:

Screen capture of the editor titlebar.
Auto-save
Changes are saved automatically. An asterisk by the file name in the editor title bar means recent changes have not yet been saved.
Checkpoint/restore
You can checkpoint a file to mark that version as one you might like to return to later (restore).
Undo/redo
Editing changes are recorded in a stack for undo/redo purposes.

Create a new file

Clicking the New File link brings up a menu of file types that can be created. Selecting a file type brings up the corresponding dialog for creating the file.

Screen capture of the New File popup menu.

Conventions link the file types to runtime operations (e.g. resource handlers go in /app/resources; flow files are *.flow).

Open an existing file

Click on a file name in the Recent Files or All Files list to open that file for editing.

Keyboard shortcut Hit alt+<n> to open the n-th recent file (e.g. alt+1 for recent file number one).

Note that only interesting files are shown in the All Files list, which helps to remove clutter from your editing experience. The hidden-file filter is configurable.

If needed, all files are accessible from the Explorer tab.

Copy, delete, rename files

Tools for copy (Icon for the copy tool.) and delete (Icon for the copy tool.) appear when the file name has focus in either the Recent Files or All Files list.

Screen capture of the controls available when the focus is on a file name.

Rename is supported by double-clicking the file name. Hit Enter to commit the change; hit the Escape key to cancel.

Screen capture of file rename.

Filter and search

You can narrow the list of files shown in the All Files list with a filter and/or search string.

Filter string
Shows only files that contain the filter string in the path or file name.
Search string
Performs a content search; only files that contain the search string are shown. Use +i: prefix for case-insensitive searches; +s: for case-sensitive searches.

Examples:

Filter/search string Description
.groovy Show all .groovy files.
/app/resources Show all files in the /app/resources folder.
.groovy+i:getPerson Show all .groovy files that contain the string getPerson (case insensitive).

Build log

To keep the application running with the latest source, App Builder automatically runs resolve and compile commands whenever there's a change in config/ivy.xml or any file in the java/ folder. Log output is stored in a build log, which is rendered below the edit pane. Check the build log for errors.

For example, following is a screen capture of the editor with a .java file containing an unresolved reference to the zput method. The compile error is shown in the (expanded) build log.

Screen capture of the file editor with build log showing compile errors in a .java file.

Managing application dependencies

The Dependencies tab provides a visual editor for the application's dependencies. If you prefer a source editor, then edit config/ivy.xml from the File Editor tab.

Click the Update Dependencies button to update your application to the latest versions of dependencies in the local repository. This is identical to the CLI zero update command.

Screen capture of the dependencies editor.

Using the Explorer

The Explorer tab provides a tree view of all the files within the application. File and directory operations are accessible as buttons across the top, including an Upload File button for uploading files into the application from your local machine.

Screen capture of the Explorer tab.

By checking the Show Dependencies checkbox, files from the application's dependencies are also shown (see Virtual Directories in the Developer's Guide).

For example, dependencies are shown in the following screen capture. Note the additional files under the public/ folder. The module of origin for each file is shown in parenthesis after the file name.

Screen capture of the Explorer tab with dependencies.

Version 1.1.26825