Wish IDE: Make sub dropdown follow the code structure

Sandman

Expert
Licensed User
Longtime User
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:

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.
 

Sandman

Expert
Licensed User
Longtime User
I tried that a while ago, but it didn't really stick for me. But sure, I can give it another shot. I still like my suggestion though. ;-)

(But I should note that I don't think you would count my project as large:
B4X:
wc -l *.bas | tail -n 1
2667 total

That includes empty lines and comments, etc, so it's actually less.)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…