Editor

Overview

The editor enables text and program files to be created, modified, and saved for each project.

It is also compatible with (optional) web browser text editing functions (e.g. Cut, Copy, and Paste), and includes special features for writing and editing programs, particularly those based on HTML, CSS, and JavaScript.

This document introduces the reader to web-based editing with a set of common editing operations. Then, the components of the editor are explained in detail.

Appendices list editor operations and keyboard shortcuts (on Windows and Mac).

Information about projects may be found in Appception IDE Projects.

Note: files may also be edited with a desktop editor, and drag-and-drop used to copy them from the desktop into an Appception IDE folder.

Common Editing Operations

The examples below use the Navigation Toolbar ('Navbar') menu items and the Navigation tree ('Navtree') project file tree (shown in the Editor components diagram).

Examples:

Create a New File

To create a new file, select a folder in the Project navigation tree ('Navtree'), then select File->New->File from the Navigation toolbar ('Navbar').

For more options, see New.

Open (or Edit) a File

To edit a file, select the file in the Project navigation tree ('Navtree'), then select File->Open from the Navigation toolbar ('Navbar').

Next, click the position in the file (Edit area) that you wish to edit; a flashing cursor will appear at that position. To add text, just start typing. To remove text, use the delete key.

For more options, see Open.

Save

To save a file, select File->Save from the Navbar.

For more options, see Save.

Save As

To save a file using a different file name, select File->Save As from the Navbar

For more options, see Save As.

Save All

To save all currently open files names, select File->Save All from the Navbar.

Delete

To delete a file, select the file in the Navtree. Then, select File->Delete from the Navbar.

For more options, see Delete.

Rename

To rename a file, select the file in the Navtree. Then, select File->Rename from the Navbar

For more options, see Rename.

Upload

To upload a file from a local machine, select a destination folder in the Navtree. Then, select File->Upload from the Navbar.

When the Upload dialog box is displayed, Browse to the location of the file on the local machine. If the file is a compressed archive (.zip file), the Uncompress archive checkbox may be selected to indicate that the file should be uncompressed withing the destination folder after it is uploaded; f the checkbox is not selected, then the file is uploaded and left as-is (compressed).

For more options, see Upload.

Download

To download a folder or file, select the folder or file in the Navtree. Then, select File->Download from the Navbar.

The browser displays a message box to ask which action to take for the downloaded item (e.g. Open with an application, or Save to a local file). If a folder was selected, it is automatically compressed into a .zip file before the Download operation.

For more options, see Download.

 

Editor Components

Appception IDE Edit Screen Layout

The editor uses the following components:

  1. Navigation toolbar ('Navbar') - File and Edit menus
  2. Project navigation tree ('Navtree') - list of all projects, folders, and files
  3. Editor toolbar - edit-related tool icons
  4. Edit file tabs - file names being edited
  5. Edit area - contents of currently selected file (i.e. edit file tab)
  6. Browser toolbar [not shown] - File and Edit menus

The Editor menus (and associated mouse and keyboard shortcuts) control editing-related functions. These include File operations and Edit operations. File operations are related to projects, folders, and files as a whole. Edit operations are related to file content. These operations are explained below.

Appendix A contains a list of editor operations, and the menus that may be used for each operation. Appendix B lists keyboard shortcuts.

Note: some web browsers (or versions) display a browser edit menu (not shown). Browser edit menus may contain operations such as Cut, Copy, and Paste. If present, these menu items may normally be used in place of equivalent menu items from the Navigation toolbar ('Navbar').

1. Navigation toolbar ('Navbar')

Editor navigation toolbar

The Navbar includes two edit-related menu lists: File and Edit. The File menu list items operate on files as a whole, whereas the Edit menu list items operate on file contents.

For convenience, several of the File and Edit items may also be accessed from web browser menus or the Project navigation tree ('Navtree') menu items. Several items also have keyboard shortcuts.

File menu:

Editor File menu

Note: some File menu entries may be unavailable (grey), depending upon the current editor state.

New

To create a new file, either:

Open

To open a file, either:

Save

To save a file, either:

Save As

To save a file using a different file name, either:

and then enter the file name.

Save All

To save all currently open files names, select File->Save All from the Navbar.

Delete

To delete a file, select the file in the Navtree. Then, either:

Rename

To rename a file, select the file in the Navtree. Then, either:

Properties

To display file properties, select the file in the Navtree. Then, either:

Upload

To upload a file from a local machine, select a destination folder in the Navtree. Then, either:

When the Upload dialog box is displayed, Browse to the location of the file on the local machine. If the file is a compressed archive (.zip file), the Uncompress archive checkbox may be selected to indicate that the file should be uncompressed withing the destination folder after it is uploaded; f the checkbox is not selected, then the file is uploaded and left as-is (compressed).

Download

To download a folder or file, select the folder or file in the Navtree. Then, either:

The browser displays a message box to ask which action to take for the downloaded item (e.g. Open with an application, or Save to a local file). If a folder was selected, it is automatically compressed into a .zip file before the Download operation.

Import

To import a project:

Export

To export a project:

Depending upon your web browser settings, you may be prompted for the location to save the exported project, or it may be saved automatically.


Edit menu:

Editor Edit menu

Note: some Edit menu entries may be unavailable (grey), depending upon the current editor state.

Undo

To undo the last edit operation, use Edit->Undo or type 'Ctrl-Z' (on Mac, type '⌘-Z'). Undo operations may be repeated.

Note that several types of operations cannot be undone (e.g. Indent').

Redo

To redo an operation that was undone, use Edit->Redo or type 'Ctrl-Y' (on Mac, type '⌘-Y'). Redo operations may be repeated.

Cut

To cut a region of text from a file, select the text to be cut by pressing and holding down the mouse-left button at the beginning of the region of text, then move the mouse to end of the region text, then release the button. The region will be highlighted. Next, do one of the following:

The region of text will be removed.

To replace a region of text that was cut, use Paste.

Copy

To copy a region of text in a file, select the text to be copied by pressing and holding down the mouse-left button at the beginning of the region of text, then move the mouse to end of the region text, then release the button. The region will be highlighted. Next, do one of the following:

The region of text will be internally copied.

To insert this copy into a file, use Paste.

Paste

To paste a region of text from a previous cut or copy operation, click the position in the file where the text should be pasted, then do one of the following:

The region of text will be inserted.

Indent

To indent an entire file, use Edit->Indent.

Note that the Indent operation cannot be undone.

Find

To find text within a file, select Edit->Find. A dialog box will be displayed. Enter the text to find and click 'Find'.

If the 'Match case' checkbox is not selected, the find operation will ignore case.

The editor will higlight all occurrences of the matching text within the file. The currently matched text string will also be highlighted, but in a different color. To proceed to the next matching occurrence of the text string, press the ENTER key. If the currently matched text string is the last occurrence of that text string in the file, the find operation will wrap to the beginning of the file.

Find/Replace

To find and replace text within a file, select Edit->Find. In the dialog box, enter the text to find and the new text to replace it. Select, either 'Replace' (to replace a single occurrence of the matching text) or 'Replace All' (to replace all occurrences of the matching text).

The editor with highlight all occurences of the matching text within the file. The currently matched text string will also be highlighted, but in a different color. To replace the currently matched text string and proceed to the next matching occurrence, press the ENTER key. To skip the currently matched text string but proceed to the next matching occurrence, press the SPACE key. To end the operation, click the left mouse button.

2. Project navigation tree ('Navtree')

Project navigation tree

The Project navigation tree ('Navtree') lists all projects, and the folders and files which they contain. The Navtree may be used to create and manage folders and files through a context menu displayed when a project, folder, or file is selected and the right mouse button is clicked:

Project navigation tree context menu

Most browsers will allow single files to be copied from the desktop to a destination folder in the project navigation tree by selecting the file on the desktop (or from a desktop folder Window), then using drag-and-drop to place it onto a folder. Note that this only reliably works for single files (not multiple files), and not for desktop folders.

The Navtree is described in detail in the Projects tutorial.

3. Editor toolbar

Appception IDE Editor Toolbar

The Editor tool displays a set of edit-related icons, including:

Find

Find performs exactly as Navbar Edit->Find

Goto line

To set the current file position to a specified line number, press the 'Goto line' (right arrow) icon, and enter a valid line number, then press 'Go'. The cursor will be moved to the indicated line.

Undo

Undo performs exactly as Navbar Edit->Undo.

Redo

Redo performs exactly as Navbar Edit->Redo.

Indent

Indent performs exactly as Navbar Edit->Indent.

Font size

To set the font size used to edit files, choose a size from the 'Font size' menu.

Font family

To set the font family used to edit files, choose a font family from the 'Font family' menu.

Save

Save performs exactly as Navbar Edit->Save.

4. Edit file tabs

Edit file tabs

The Edit file tabs display the name of each file currently being edited. Clicking on a tab makes the file active. Editing operations only apply to active files.

An asterisk ('*') appears next to the file name if the file has been modified since the last time it was saved.

If is clicked, the file will be closed and deleted from the editor. If the file has been modified, a dialog is displayed allowing the user to choose whether to 'Save' the file, 'Discard' the file changes, or 'Cancel' the operation.

5. Edit area

Edit area

The Edit area displays the content of the currently active file (file being edited).

The edit cursor may be set by clicking the mouse within the Edit area; the cursor will be displayed as a flashing vertical line.

Text may be entered at the cursor location by typing, or text may be removed by using the DELETE key.

The Edit area also has a browser context menu. Although the items in this menu may depend on the browser, they normally include Cut, Copy, and Paste operations.

6. Browser toolbar

Some web browsers (or versions) display a toolbar that contains an Edit menu. This toolbar menu, if present, may contain editing-related items (e.g. Cut, Copy, Paste, Find).

These items, and their keyboard shortcuts, are generally similar (or identical to) Navbar Edit menu items. For example, Cut operations may be identical, while Find operations may display different UI dialogs. The exact menu items and behaviour depend on the web browser.

 

Other Editor Features

The Appception IDE makes use of the CodeMirror file editor for editing file content.

CodeMirror includes content-related functions for writing program files, such as:

Visit CodeMirror to learn more about these and related editing features.

 

 

Appendix A: Editor Operations

Editing-related operations are organized into File and Edit operations:

The editor menu items, keyboard shortcuts, and related UI objects are listed below for each set of operations.

File operations

New (folder)

Navbar File->New->Folder
Navtree Select folder (left-click mouse on folder name)
Right-click mouse and choose New->Folder
Edit toolbar --
Edit tabs --
Edit area --

New (file)

Browser --
Navbar File->New->File
Navtree Select file (left-click mouse on file name)
Right-click mouse and choose New->File
Edit toolbar --
Edit tabs --
Edit area --

Open

Navbar File->Open
Navtree Select file (left-click mouse on file name)
Right-click mouse and choose Edit
or
Double-click file name
Edit toolbar --
Edit tabs --
Edit area --

Save

Navbar File->Save (or Ctrl-S on Windows; ⌘S on Mac)
Navtree --
Edit toolbar click
Edit tabs Select file tab and press Ctrl-S on Windows (⌘S on Mac)
Edit area --

Save As

Navbar File->Save As (or press Ctrl-Shift-S on Windows; Shift-⌘S on Mac)
Navtree --
Edit toolbar --
Edit tabs Select file tab and press Ctrl-Shift-S on Windows (Shift-⌘S on Mac)
Edit area --

Save All

Navbar File->Save All
Navtree --
Edit toolbar --
Edit tabs --
Edit area --

Delete

Navbar File->Delete
Navtree Select file (left-click mouse on file name)
Right-click mouse and choose Delete
Edit toolbar --
Edit tabs --
Edit area --

Rename

Navbar File->Rename
Navtree Select file (left-click mouse on file name)
Right-click mouse and choose Rename
enter new filename and press ENTER
Edit toolbar --
Edit tabs --
Edit area --

Cut

Navbar --
Navtree Select file (left-click mouse on file name)
Right-click mouse and choose Cut
Edit toolbar --
Edit tabs --
Edit area --

Copy

Navbar --
Navtree Select file (left-click mouse on file name)
Right-click mouse and choose Copy
Edit toolbar --
Edit tabs --
Edit area --

Paste

Navbar --
Navtree Select destination folder (left-click mouse on folder name)
Right-click mouse and choose Paste
Edit toolbar --
Edit tabs --
Edit area --

Upload

Navbar File->Upload
Navtree Select a folder (left-click mouse on folder name)
Right-click mouse and choose Upload
or
drag-and-drop a file from the desktop to a folder
Edit toolbar --
Edit tabs --
Edit area --

Note: compressed .zip files may be uploaded as-is, or decompressed after upload.

Download

Navbar File->Download
Navtree Select a folder or file (left-click mouse on folder or file name)
Right-click mouse and choose Download
Edit toolbar --
Edit tabs --
Edit area --

Note: folders will be compressed and downloaded as .zip files.

Import

Navbar File->Import
Navtree --
Edit toolbar --
Edit tabs --
Edit area --

Note: Import works only at the project level.

Export

Navbar File->Export
Navtree --
Edit toolbar --
Edit tabs --
Edit area --

Note: Export works only at the project level.

 

Edit operations

Undo

Navbar File->Undo
Navtree --
Edit toolbar
Edit tabs --
Edit area --

Redo

Navbar File->Redo
Navtree --
Edit toolbar
Edit tabs --
Edit area --

Cut

Navbar Hold mouse left-button down (in Edit area)
Move mouse to cover text region
Select Edit->Cut (or press Ctrl-X on Windows; ⌘-X on Mac)
Navtree --
Edit toolbar --
Edit tabs --
Edit area Hold mouse left-button down
Move mouse to cover text region
Right-click mouse and choose Cut

Copy

Navbar Hold mouse left-button down (in Edit area)
Move mouse to cover text region
Select Edit->Copy (or press Ctrl-C on Windows; ⌘-C on Mac)
Navtree --
Edit toolbar --
Edit tabs --
Edit area Hold mouse left-button down
move mouse to cover text region
Right-click mouse and choose Copy (or press Ctrl-C on Windows; ⌘-C on Mac)

Paste

Navbar Left-click mouse at position to insert text
Select Edit->Paste (or press Ctrl-V on Windows; ⌘-V on Mac)
Navtree --
Edit toolbar --
Edit tabs --
Edit area Left-click mouse at position to insert text
Right-click mouse and choose Paste (or press Ctrl-V on Windows; ⌘-V on Mac)

Indent

Navbar Edit->Indent
Navtree --
Edit toolbar
Edit tabs --
Edit area --

Find

Navbar Edit->Find (or press Ctrl-F on Windows; ⌘-F on Mac)
Navtree --
Edit toolbar
Edit tabs --
Edit area Left-click mouse at position to start Find
Press Ctrl-F on Windows; ⌘-F on Mac

 

 

Appendix B: Keyboard Shortcuts

Shortcut keys
Windows Mac Operation
Ctrl-C ⌘C Copy (text region)
Ctrl-F ⌘F Find text (Replace text)
Ctrl-S ⌘S Save File
Ctrl-Shift-S Shift-⌘S Save File As
Ctrl-V ⌘V Paste (text region)
Ctrl-X ⌘X Cut (text region)
Ctrl-Y ⌘Y Redo
Ctrl-Z ⌘Z Undo