Buffers and windowsAda-ASSURED is a multi-buffer, multi-window editor. Files are read into buffers and displayed in windows. You are already displaying a given buffer in multiple windows. You can, of course, create as many windows and buffers as you wish.
Command new (menu: File/New X: Shift+F2 NT: Ctrl+N) creates a new buffer. Buffers of syntactic category compilation contain Ada code whereas buffers of syntactic category TEXT consist of uninterpreted text.
Invoke command new. Enter xyz in the
field labelled
``Buffer Name''. Select syntactic category TEXT.
Make sure that Yes is selected for the New Window option.
Then click on OK.
To illustrate that the text is not interpreted as Ada code,
enter:
Roses are red, Violets are blue,
Of course TEXT buffers can also be used to enter Ada code.
Delete the poem and enter:
with text_io; use text_io; procedure demo is begin goto a; end;
The Ada syntax checker, formatter, and style enforcer are all available, on demand, in TEXT buffers.
Invoke command parse-buffer
(menu: Text/Parse Buffer
X: Alt+^P
NT:Ctrl+Shift+P) to check for syntax errors.
Consult the message in the status pane and
correct any typos.
Invoke command format
(menu: Text/Format) to format the file and check for style violations.
The MESSAGES view is also supported for TEXT buffers, albeit that the output is not kept up to date as the buffer is edited, but is produced only on demand.
Use command
change-view
(menu: View/Change View
key: F3)
to get a new window for buffer xyz in the MESSAGES
view.
Make sure that Yes is selected for the New Window option.
Invoke command format
(menu: Text/Format) in the BASEVIEW of buffer xyz
to update the MESSAGES view.
The syntactic mode of a buffer can be changed using command coerce-buffer (X menu: View/Buffers/Coerce Buffer NT menu: Window/Coerce Buffer). Thus, you can use Ada-ASSURED with full Ada language sensitivity at one moment, and with no language sensitivity the next.
Use command coerce-buffer
to change buffer xyz to syntactic mode
compilation. Confirm that the buffer now has
full language sensitivity.
Use command coerce-buffer
to change buffer xyz back to syntactic mode
TEXT.
|
Buffers are removed by the command delete-buffer (menu: View/Buffers/Delete Buffer key ^Xk), and windows are removed by the command delete-window (menu: View/Windows/Delete Window key: ^Xd).
Delete all other windows except the original *untitled*
window. Since delete-window deletes the window from which
the command was invoked, be sure to carefully select the window you
wish to delete. To avoid mistakes, you can invoke it from the
menu of the window you wish to delete.
|
|
Windows are removed by the command close-window (menu: Window/Close Window key: Ctrl+D). A buffer is removed by removing all windows associated with it.
Remove all other windows except the original *untitled*
window. Since close-window removes the window from which
the command was invoked, be sure to carefully select the window you
wish to remove. To avoid mistakes, you can instead invoke
Close from the window
menu of the window you wish to delete.
|