26.5.2 Menu Items, Toolbars and Status Bar

Code Builder provides three ways to perform an operation. You can do it by selecting the command from the Menu bar or by clicking the button on Toolbar. Also, you can use Hotkeys to quickly perform an action.

Menu bar in Code Builder

All basic operations in Code Builder can be executed by clicking items on the Menu bar; there are 8 menus that will be illustrated in the following section.

Note: The Debug menu is hidden when there is no file in Text Editor.

The File Menu

This menu contains the commands relating to manipulating files such as creating a new file or saving an existing file as well as commands used to print the file. Furthermore, the file that is recently opened can be quickly accessed from this menu.

New... Open the New File dialog to create a source, header, LabTalk script, or text file.
Open... Open the Open dialog to import an existing file.
Open LabTalk Samples... Open the Open dialog to import a LabTalk Script file.
Open Origin Samples... Open the Open dialog to import a C Source file.
Close Close the current active file.
Save Save the active file in Text Editor.
Add to Workspace Add the active file to the workspace. When there is no file in the Text Editor, this option is unavailable (grayed out).
Save As... Open the Save As dialog, prompting you to set a path and a file name for the active file in Text Editor.
Save All Save all files in the Text Editor.
New Workspace Create a new workspace.
Open Workspace... Open the Open OriginC Workspace dialog to select a workspace file.
Save Workspace Save the current workspace.
Save Workspace As... Open the Save As dialog, prompting you to set a path and a file name for the current workspace.
Print... Open the Print dialog to print the active file in the Text Editor.
Print Preview Activate the print preview mode for the active file in the Text Editor. Press Esc to return to edit mode.
Page Setup... Open the Page Setup dialog to set the layout of the active file for printing.
Exit Exit Code builder.

The Edit Menu

All commands used to edit or locate the text in Text Editor are in this menu.

Undo Undo an action.
Redo Redo or repeat an action.
Cut Cut the selected text.
Copy Copy the selected text.
Paste Paste the text you copied to where the cursor locates.
Delete Delete the text selected or letter after the cursor.
Select All Select the entire text in the current file.
Search... Open the Find dialog to locate the demanded text in the current file.
Find in Files... Open the Find in Files dialog to locate the demanded text in other specified files in the specified folder.
Replace Find the demanded text and replace it with a specified text.
Go to Matching Brace Find the matching brace and move the cursor before it.
Toggle Bookmark Add/clear a bookmark for the line where the cursor locates.
Go To... Open the Go To dialog, prompting you to enter line number.
Auto-Completion Open a drop list of options to pick from when typing.
Folding Fold or expand all code. It’s disabled by default and can be enabled in the Options dialog.
Comment Add symbol “//” before the line where the cursor locates.
Uncomment Delete symbol “//” before the line where the cursor locates if there has one.

The View Menu

This menu is assisted to customize the layout of the working environment in Code Builder. The first 9 commands are used to open or hide the corresponding windows. The last command is to show or hide the Status Bar in Code Builder. The others are illustrated as follow:

Show Tabs and Spaces To show/hide the indicators of tab and space in the Text Editor, which tab is represented as symbol “→” and space as symbol “∙”.
View Line Numbers To show/hide the line numbers in the vertical bar (gray space) on the left side of the Text Editor window.
Enable Syntax Coloring Display the syntax in the specific color which is set in the Options dialog when this option is checked.

The Build Menu

The menu is used to compile or build the file. It is only available for an Origin C file (i.e. a file that can be compiled).

Rebuild All Recompile all files in the workspace and perform linking.
Build Compile all modified files and perform linking.
Stop Compile Stop compiling.
Compile Current File Compile the current file in the Text Editor. This option is not available when no file is open in the Text Editor.

The Debug Menu

All commands needed during debugging are in this menu.

Go Execute code up to the next breakpoint.
Stop Debugging Exit the debugging mode.
Break Break execution and enter debug at the current line.
Execute Current Section Execute the current section of a script file. This item is only available for the file with suffix .ogs.
Execute Selected Lines Execute the selected lines of a script file. This item is only available for the file with suffix .ogs.
Toggle Breakpoint Add a breakpoint for the line where the cursor resides.
Clear All Breakpoints Delete all breakpoints.
Enable Breakpoints Enable or disable all breakpoints.
Step Into Execute one line at a time. This command will executes the function call statement and pauses at the first line of the called function.
Step Over Execute one line at a time. This command will execute the function call statement and pause after the function returns.
Step Out Step out of the function when execution is paused inside a function.
Run to Cursor Run the program until it reaches the location where the cursor is set.

The Tools Menu

This menu contains some useful tools in Code Builder:

Quick Open Files Open the Quick Open Files dialog, which allows you opening one or several files in the Text Editor quickly.
Find Symbols Open the Find Symbols dialog to open one or several symbols in the current workspace quickly.
External Tools... Open the External Tools dialog, prompting you to define or modify a tool. When an external tool is added, it will appear on the Tools menu.
Customize... Open the Customize dialog to customize the toolbars.
Options... Open the Options dialog to set editor options.
Reset Options Reset all options to their default values.

Toolbars in Code Builder

Code Builder provides an easier and quicker way, clicking the button on the toolbar, to perform the frequently used operation. There are four default toolbars in Code Builder: Debug, Edit, Search, and Standard. Most buttons in the toolbars directly correspond to menu bar items. However, some buttons directly specify parameters normally set in a dialog when performing specific actions, and some buttons perform a combination of basic actions. An screen tip displaying the function of the button will show up when the Mouse icon is hovering over the button.

As usual, Code Builder allows you to rearrange the layout by dragging the toolbar to where you prefer. And it also provides a tool to customize your own toolbar.
See the Customize dialog.

The Debug Toolbar

All buttons placed in this toolbar are used to debug Origin C programs and LabTalk scripts.

Code Builder Debug.png

The following table lists the menu icons and their associated actions.

Button Menu Item/Action Button Menu Item/Action
Button Toggle Breakpoint 90.png
Debug: Toggle Breakpoints
Button Clear All Breakpoints 90.png
Debug: Clear All Breakpoints
Button Execute Current Section 02.png
Debug: Execute Current Section
Button Execute Selected Lines 02.png
Debug: Execute Selected Lines
Button Enable Breakpoints 90.png
Debug: Enable Breakpoints
Button Go 90.png
Debug: Go
Button Stop Debugging 90.png
Debug: Stop Debugging
Button Step Into 90.png
Debug: Step Into
Button Step Over 90.png
Debug: Step Over
Button Step Out 90.png
Debug: Step Out
Button Run To Cursor 90.png
Debug: Run To Cursor

The Edit Toolbar

All buttons placed on this toolbar are used to edit or locate text in the Text Editor.

Code Builder Edit.png

The following table lists the menu icons and their associated actions.

Button Menu Item/Action Button Menu Item/Action
Button Comment.png
Edit: Comment
Button Uncomment.png
Edit: Uncomment
Button Find 90.png
Edit: Search...
Button Replace 90.png
Edit: Replace...
Button Repeat 90.png
Repeat the last used search.
Button Options 90.png
Tools: Options...
Button Reset Options 90.png
Tools: Reset Options
Button Undo 90.png
Edit: Undo
Button Redo 90.png
Edit: Redo
Button Match Brace.png
Edit: Go to Matching Brace
Button Toggle Bookmark 90.png
Edit: Toggle Bookmark
Button Clear Bookmarks 90.png
Clear all bookmarks.
Button Next Bookmark 90.png
Go to next bookmark
Button Previous Bookmark 90.png
Go to previous bookmark
Button Find Previous 90.png
Find the previous same word as the cursor places on.
Button Find Next 90.png
Find the next same word as the cursor places on.

The Navigate Toolbar

The buttons placed on this toolbar are used to navigate back and forward among files in Code Builder.

Code Builder Navigate.png

The following table lists the menu icons and their associated actions.

Button Menu Item/Action Button Menu Item/Action
Button Navigate Back.png
Navigate Back in Code Builder
Button Navigate Forward.png
Navigate Forward in Code Builder

The Search Toolbar

The buttons placed on this toolbar are used to perform the search actions.

Code Builder Search.png
Button Menu Item/Action Button Menu Item/Action
Button Find In Files 90.png
Edit: Find in Files
Button Find String 90.png
Find the specified string.

The Standard Toolbar

Buttons used to perform standard operations relating to manipulating files or paragraphs are placed in the standard toolbar by default.

Code Builder Standard.png

The following table lists the menu icons and their associated actions.

Button Menu Item/Action Button Menu Item/Action
Button New 90.png
File: New...
Button Open 90.png
File: Open...
Button Save 90.png
File: Save
Button Save As 90.png
File: Save As...
Button Print 90.png
File: Print...
Button Cut 90.png
Edit: Cut
Button Copy 90.png
Edit: Copy
Button Paste 90.png
Edit: Paste
Button Compile 90.png
Build: Compile Current File
Button Build 90.png
Build: Build
Button Stop Build 90.png
Build: Stop Compile
Button Rebuild All 90.png
Build: Rebuild all

Hotkeys in Code Builder

In Code Builder, you can use a combination of keystrokes to quickly perform an action. If a command has a hotkey, you can find it by simply hovering the mouse cursor over the menu icon. Here’s a list of Code Builder Hotkeys:

Menu/Action Hot Key Menu/Action Hot Key
Build: Build SHIFT + F8 Build: Compile Current File CTRL + F8
Build: Rebuild All ALT + F8 Build: Stop Compile CTRL + PAUSE
Debug: Break ESC Debug: Clear All Breakpoints CTRL + B
Debug: Go F5 Debug: Run to Cursor CTRL + F10
Debug: Step Into F8 Debug: Step Out SHIFT + F7
Debug: Step Over F10 Debug: Stop Debugging ALT + F5
Debug: Toggle Breakpoints F9 Edit: Auto-Completion CTRL + L
Edit: Comment CTRL + / Edit: Copy CTRL + C
Edit: Cut CTRL + X Edit: Delete DELETE
Edit: Find in Files... CTRL + SHIFT + F Edit: Go to Matching Brace CTRL + ]
Edit: Go to... CTRL + G Edit: Paste CTRL + V
Edit: Redo CTRL + Y Edit: Replace... CTRL + H
Edit: Search... CTRL + F Edit: Select All CTRL + A
Edit: Toggle Bookmark CTRL + F2 Edit: Uncomment CTRL + SHIFT + /
Edit: Undo CTRL + Z File: Add to Workspace CTRL + W
File: New... CTRL + N File: Open... CTRL + O
File: Print... CTRL + P File: Save CTRL + S
Tools: Find Symbols SHIFT + ALT + S Tools: Quick Open Files SHIFT + ALT + O
View: Bookmarks ALT + 8 View: Breakpoints ALT + 5
View: Call Stack ALT + 7 View: Find Results ALT + 6
View: LabTalk Console ALT + 1 View: Local Variables ALT + 4
View: Output ALT + 2 View: Watch ALT + 3
View: Workspace ALT + 0 Toggle file Read-only attribute CTRL + R
Open containing folder CTRL + SHIFT + O Open property dialog ALT + ENTER
Copy file path CTRL + SHIFT + C Navigate among scope ALT + UP / ALT + Down
Highlighted the selected
words in entire file.
CTRL + F3 Close the current window CTRL + F4
Duplicate the selected lines CTRL + D Locate to the current execution point when debug ALT + Num*
Go to the next book mark (work with Ctrl + F2) F2 Go to the next highlighted word (work with Ctrl + F3) F3
Navigate back in Code Builder ALT + Left Arrow Navigate forward in Code Builder ALT + Right Arrow
Switch between .h and .c file with same file name CTRL + ALT + O Go to definition of global function, member function or variables (selected) in the head file from corresponding source file. F11
Right click in text editor and choose Insert Snippet SHIFT + ALT + X

The Status Bar

The narrow horizontal box at the bottom of Code Builder is called the Status bar, which can be shown or hidden by clicking View: Status Bar on the Menu bar. It contains information about your file such as where you are in Text Editor, the details will be discussed as follow.

Key Status

The right end of the Status bar indicates the status of the special keys, if the icon is shown in gray, it means the corresponding key is inactive, while shown in black means active. The icons are corresponding to CAPS LOCK, NUM LOCK, SCRL LOCK, and INSERT LOCK on your keyboard.

Code Builder 13.png

Cursor Status

The letters and numbers before the key status indicate at which line, column, and selection the cursor is located.

Code Builder 14.png

Command indication

When the Mouse is hovering on a button or command, a description of the button/command will appear on the left end of the Status bar.

Code Builder 17.png