5.1. User Interface Introduction¶
Code Composer Studio (CCS) Theia is based on the Theia IDE open source software framework. Theia IDE is very similar to Visual Studio (VS) Code. Hence understanding some of the basic concepts from VS Code will lead to a better understanding of Code Composer Studio Theia. Some of the more commonly referenced concepts are described below. Code Composer Studio Theia adopts a typical IDE layout of project/file explorer on the left and an editor on the right. This layout maxmizes space provided to core features of an IDE. CCS Theia contains these major areas:
- Editor: The main area to edit your files.
- Activity Bar: Contains different views that allow you accomplish different tasks, e.g. Explorer to work with projects or Debug when debugging projects.
- Status Bar: Information about opened files
- Side Bar: Contains different views like Explorer or various debug views based on selected Activity.
- Panels: Panels are usually displayed below editor area and display build status, debugger output, debug views and terminal. These views can be moved to the right or repositioned to other sections of main window depending on user preference.
Please refer to the VS Code documentation for the User Interface for more details on the user interface. Please note that while the environments are very similar, not all the settings available in VS Code are available with CCS Theia (and vice versa).
5.2. Activity Bars¶
The left Activity Bar contains five views:
- Explorer: Browse, open and manage files and folders in your project. More information about the Explorer can be found here.
- Search: Search the files in your active workspace.
- Run and Debug: Run your program in debugger mode and view threads, the call stack, variables, watched expressions and breakpoints. More information about the debugger can be found here.
- Source Control: View your repository changes, including changes, staged changes and merge changes. Here, you can stage, unstage and commit your files. The source control icon indicates how many changes you currently have in your repository.
- Extensions: Install extensions to add tools to support your development workflow.
At the bottom of the left Activity Bar, there is a Settings icon, where you can access general settings, keyboard shortcuts and change color and file icon themes.
The right Activity Bar contains an Outline to symbols within your file for easy navigation. As you open new views, they will be added to your Activity Bars. Right-clicking a view icon will give you the option to close it and others, pin the view to the Activity Bar or collapse the opened view. The views can be dragged between the Activity Bars and the Panel.
5.3. Extensions¶
You can search for and install extensions from the Extensions icon on the Activity Bar. For example, you can search for the popular TODO Highlight extension.
This extension will help you keep track of the things in your file that you want to do and fix by highlighting text like 'TODO:'' and 'TOFIX:'.
Extensions can easily be uninstalled by going to the Extensions icon, searching the extension or finding it in the Installed tab, and clicking uninstall. There are many extensions available for a wide range of functionalities. You can browse the available extensions at https://open-vsx.org/.
5.4. Status Bar¶
Information about your files is visible in the Status Bar. You can interact with the information to change settings, to view errors and warnings, to view notifications and to toggle the Panel. From the Status Bar, you can change the end of line sequence, encoding, indentation, and language mode settings. Clicking the line number will allow you to navigate to a specific line. Many of the settings accessible from the Status Bar will appear at the top of the Editor.
If you are using the source control management system, you can view your branch and interact with the Status Bar to do things such as create a branch or publish your changes.
5.5. Command Palette¶
CCS Theia provides a rich menu system, however, it also provides a searchable command listing that allows you to use keyboard to execute commands. Simply press CTRL+Shift+P to open Command Palette and then start typing to narrow down list of commands.
Please refer to the VS Code documentation for the Command Palette for more details on the Command Palette.
5.6. Editor¶
There are many features available to make your development process easier and more efficient:
- Multiple Cursors: In the Selection Menu, add multiple cursors to easily make edits simultaneously. This can also be done by holding the alt key and clicking with your mouse.
- IntelliSense: Suggestions for code completion are given as you type. Additionally, you can view information about your variables, functions and more by highlighting and hovering your cursor over them.
- Code Actions: In some cases, there may be a yellow lightbulb on the left side of your current line. Click the lightbulb for quick code actions.
- Code Collapse/Expansion: Click the arrows next to the line number to collapse or expand your code.
- Viewing Multiple Occurences: Selecting text will highlight all other occurences in your file.
The CCS Theia editor is based of the VS Code editor and share a lot of similarities. Please refer to the VS Code documentation for Basic Editing and Editor layout/features of the User Interface section for more details. Please note that while the editor functionality between the two environments are very similar, there are some differences.
5.8. Customizing the Environment¶
The Eclipse Theia framework that is leveraged by Code Composer Studio allows for extensive personalization. The majority of these settings are located under File → Preferences.
5.8.1. Code Composer Studio Settings¶
Code Composer Studio Settings contains settings for preferences specific to CCS specific components of CCS Theia.
Under the General properties, there are three additional properties types:
- Compilers: Displays a list of Discovered compilers. The Refresh button can be used to re-search for new compilers in the Compiler discovery-path list.
- Products: Displays a list of Discovered products (such as SDKs). The Refresh button can be used to re-search for new compilers in the Product discovery-path list.
- Variables: Displays user-defined and system build variables available for all projects associated with the workspace.
5.8.2. General Settings¶
General Settings contains setting for more generic Theia IDE preferences. View an extensive list of user and workspace settings. There is a section for commonly used settings, such as:
- turning on or off Auto Save
- changing your font size or family
- choosing tab size
- controlling how the editor renders whitespace characters
- editing cursor style
- selecting multi cursor modifier
- turning on or off space insertion with tab button
- controlling how lines should wrap
- links to settings for excluding files and file associations to languages
You can also search for specific settings in the Search Settings box.
General Settings in CCS Theia work the same way as they do with VS Code. Please refer to the VS Code documentation for User and Workspace Settings for more details. Please note that not all the settings available in VS Code are available with CCS Theia (and vice versa).
5.8.2.1. Settings Tabs¶
Depending on your environment, you may see either 2 or 3 tabs in General Settings.
The User tab is used to change settings globally which apply to all instances of CCS Theia.
The Workspace tab refers to the top level Workspace that is currently open. It controls the settings for the current environment. Looking at the Explorer panel on the left, it can refer to a folder (WORKSPACE_CCSTHEIA in the first image below) or a workspace file (MY_WORKSPACE (WORKSPACE) in the second image below).
The Folder tab will appear when you have a workspace file which points to one or more folders. Over here, you can change settings for each folder in the workspace.
5.8.2.2. Settings Precedence¶
Settings can be updated at multiple levels. The precedence is defined in the following list, with later scopes overriding earlier scopes:
- User Settings - These settings are applied globally to all instances of CCS Theia.
- Workspace Settings - These settings are applied to the current workspace.
- Workspace Folder Settings - These settings are applied to a specific folder in a workspace.
5.8.2.3. User Settings¶
Settings changed in the User tab are applied globally to all instances of this CCS Theia installation. These settings stay on your machine locally and are not shared as part of your project. Most of the general settings should be changed in User Settings, and only environment-specific and shared settings should be changed in Workspace Settings.
5.8.2.4. Workspace Settings¶
Workspace Settings are specific to a single environment. This can either be a workspace file (*.theia-workspace
file), or a project folder acting as a workspace. Workspace Settings will override User Settings.
The settings updated under Workspace will show as modified in: Workspace under User.
5.8.2.5. Workspace Folder Settings¶
If you open a workspace with one or more root folders, you can also change settings specific to each folder. Workspace Folder Settings will override Workspace Settings.
5.8.3. Keyboard Shortcuts¶
Keyboard shortcuts are associated with many actions in Code Composer Studio. It is possible to change these key combinations and to assign new shortcuts to actions that do not currently have an assignment.
Selecting File → Preferences → Keyboard Shortcuts will open the Keyboard Shortcuts view. Here you will see a list of all commands and any key assignments that have been made. The list of commands is quite long. You can make use of the filter box above the list to filter the list of commands displayed.
Once you have located the command you are interested in, simply select it to edit key assignment.
5.8.4. Colors, Fonts and Icons¶
Under File → Preferences or with the settings button in the bottom left corner, you can choose the color theme of the environment (Light or Dark) and the icon theme (File Icons (Theia), Seti (Visual Studio Code) or None).
Individual colors and fonts for various views and panels can be changed in the General Settings view under File → Preferences → General Settings... or from the Settings button in the bottom left corner.
5.8.5. Toolbar¶
A Toolbar can be added to the top of your screen through View → Toggle Toolbar.
The Toolbar has buttons for some of the more commonly used actions in the IDE. The buttons can be dragged and dropped to different positions on the Toolbar. Additional commands can be added to the Toolbar by selecting the context menu in the Toolbar and selecting Add Command to Toolbar.