Editing Applications
Application editing includes file editing and dependency management.
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:
then the associated application editor is opened, as shown:
Editing files
The basic features of file editing include:
- 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.
Conventions link the file types to run-time 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 (
) and delete (
) appear when the file name has focus in either the "Recent
Files" or "All Files" list.
Rename is supported by double-clicking the file name. Hit "enter" to commit the change; hit "esc" to cancel.
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. Keep an eye on this build log
for errors.
For example, following is a screenshot 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.
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.
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.
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 screenshot.
Note the additional files under the public/ folder. The
module of origin for each file is shown in parenthesis after the file
name.