## 3 Materials and Methods
### Interactive Textual-to-Visual Code Conversion  
PWCT2 comes with a feature called interactive Textual-to-Visual code conversion, as demonstrated in Figure 14. The first section of the image illustrates the user writing Ring code, showcasing the textual input of programming constructs. In this section, the code creates an object from the point class, sets the object's attributes, and defines the point class using the Ring programming language. In the second section, this Ring code is automatically converted into a visual representation using Ring2 PWCT. The visual interface displays the code elements as graphical components, arranged in a logical flow that mirrors the structure of the original Ring code. This conversion allows users to interact with and manipulate the program visually, making it easier to understand, modify, and debug without delving into textual syntax. The transition from text to visual representation bridges the gap between textual programming and visual programming, enhancing the user's experience and productivity.  
To start using this feature, it is sufficient for the keyboard Focus to be active at the Steps Tree at any step. Once the user starts typing, the components browser will be activated, where PWCT2 expects that the user is searching for a visual component to use. If the visual component does not exist, PWCT2 expects that the user will type Ring source code and highlight this code. If the user presses ENTER, PWCT2 will then use Ring2 PWCT to generate the visual representation. The generated steps will be inserted into the selected location in the Steps Tree, enabling us to use this feature at any location in our program.  
This feature can be used to mix textual programming (for writability) and visual programming (for readability) in the same project [75; 76]. Additionally, the code could be generated using large language models (LLMs) such as Copilot [77] as demonstrated in Table 5. Furthermore, this feature enables us to import current projects written in Ring so that we can continue developing them using PWCT2.  
Figure 13: Using the PWCT2 Form Designer.  
In this step, we switch to PWCT2, select the parent step in the Steps Tree Editor, and finally paste the generated source code. The parent step is called \"Methods\", which exists in the Point class. Once we paste the textual source code, PWCT will display the pasted code in a popup rectangle to indicate that this is a textual-to-visual code conversion operation (not a search operation by the visual component name).  
Pressing ENTER will start the conversion process.  
After the textual-to-visual code conversion process using Ring2 PWCT, we will see the generated steps in the Steps Tree. We can continue development using the visual programming features provided by PWCT2, such as the Steps Tree Editor and Time Machine.  
The implementation of Ring2 PWCT involves some of the same phases as compiling, such as scanning and parsing [78,79]. Instead of low-level code generation, we generate a visual source file. Alternatively, it can update the current file if Ring2 PWCT is used to insert steps into the existing visual source file instead of creating a new one. Ring2 PWCT is generally considered a form of translation, specifically source-to-source translation, because it converts source code from one high-level language to another (in this case, from Ring code to PWCT visual code) [80]. Ring2 PWCT is designed to pass errors when possible. For  
\begin{table}
\begin{tabular}{p{34.1 pt} p{34.1 pt}} \hline \hline  
example, using the Ring code (for x = 1 to 10 if x = 3? \"Three\") as input can be converted to visual code (similar to the first section in Figure 8), even if keywords such as EndFor and EndIf are missing.