EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only

Code expansion

By Jiyong Huang posted Wed April 01, 2020 09:20 PM

  

What’s code expansion?

Code expansion is a tool of EGL source code editor. It can be used for selecting EGL code during function extraction. For example, you want to select EGL code for function extraction; or copy/cut EGL code – you can use the tool for code selection then copy/cut the code

Code expansion is a tool for EGL source code editor. It can be used to select EGL code during function extraction. For example, you can use the code expansion tool to select EGL code and then copy or cut the selected EGL code.

How to use it?

There are 4 kinds of code expansion as listed below:

  • Enclosing element: Select the element that encloses the current selection.
  • Next element: Select the next sibling element of the current selection. If no next sibling   element is found, then the parent element will be selected.
  • Previous element: Select the previous sibling element of the current selection. If no previous sibling element is found, then the parent element will be selected.
  • Restore last selection: Restore to the latest selection.

They can be triggered by either short-cut keys or context menu:

  • Short-cut key:
  • Enclosing: Alt + Shift + Up
  • Next: Alt + Shift + Right
  • Previous: Alt + Shift + Left
  • Restore: Alt + Shift + Down
  • Context menu right click the editor, select  Expand Selection To Corresponding code selection action

image

 

 

 

 

 

Below is a sample that uses ‘Next element’ code expansion function:

  1. With the current selection, user is going to use Next elementimage
  2. Press “Alt + Shift + Right”, and the next element is selected.image
  3. Press “Alt + Shift + Right” to select next element. In below case, no next sibling element is available, so the parent   element is selected (in this case is the whole if statement). Now if user press Alt + Shift + Down, then the code selection will be restored.image
  4. With the whole if statement is selected, press “Alt + Shift + Right” toselect next element. Again, in this case, no next sibling element is available, so parent   element is selected (in this case is the whole if statement).image
0 comments
1 view

Permalink