Summary: this page describes how to view an object's source code

Introduction

It is possible to view object source code direct in CAST Imaging. Source code is available in objects/links after a drill down from Level 5:

Click to expand

To view the source code of objects/links in CAST Imaging, a one-time configuration process is required first - see Configure the source code viewer.

Viewing source code

Objects

Right click the object after a drill down from Level 5 and choose Show source code:

Link

Drill down from Level 5 and either:

  • double click the link
  • or right click the link and select Show source code:

Source code can also be accessed using the keyboard shortcut ALT+S.

Source code will be auto scrolled to highlighted object/link:

Code is collapsed by default and limited to 200 lines, click to expand in groups of 200 lines, then 100, 20 and any remaining under 10:

Where an object is represented in multiple files, all files will be shown:

In  ≥ 2.18, you may select a portion of source code and get explanation with ChatGPT. When you select a portion of a source code the OpenAI icon is displayed. 

You can also toggle colours using the gear icon:

Viewing source code using a pop-up window

In  2.15, you may view the source code in a pop-up window using the pop-out icon.

Clicking on the pop-out icon lets you view the source code in a new pop-up window.

Viewing full content of source code in a single click

In  2.17, you may view the full content of source code using the Show full source code icon.

Clicking on the Show full source code icon lets you to view full content of source code by automatically moving the scroll bar from the start to the end of source code. 

Highlighting all the occurrences of a variable or an object name 

In  2.17, you may highlight all the occurrences of a variable or an object (by selecting the variable/object name) in the entire source code file. Highlighting is also supported in the new window source code opened through Open in New Window .