If I use #Region in my code, it would also be very helpful if the sub dropdown used the same structure.
For example, the following code:
Would result in a sub dropdown like this:
(Perhaps with a bit of bolding or other styling of the region names, the code editor here didn't allow that.)
It would probably make sense to make this optional, so perhaps adding a Follow code structure in sub dropdown option in the IDE, in the Tools > IDE Options menu.
For example, the following code:
B4X:
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
#Region Interweb communication
Sub connect
Log("Code goes here")
End Sub
Sub transfer
Log("Code goes here")
End Sub
#End Region
#Region Encoding things
Sub encode(this As String) As String
Return "encoded"
End Sub
Sub decode(that As String) As String
Return "decoded"
End Sub
#End Region
Sub logSomething
Log("Something")
End Sub
Would result in a sub dropdown like this:
B4X:
Process_Globals
Globals
Activity_Create
Activity_Resume
Activity_Pause
Interweb communication
connect
transfer
Encoding things
encode
decode
logSomething
(Perhaps with a bit of bolding or other styling of the region names, the code editor here didn't allow that.)
It would probably make sense to make this optional, so perhaps adding a Follow code structure in sub dropdown option in the IDE, in the Tools > IDE Options menu.