Share My Creation [Tools] Code Sort v1.0

This is my first attempt at B4J Apps.

I wanted to write a tool to help me with organizing/sorting functions for my b4a apps.

It can help you:
1. Sort Subroutines in lexicographical order (when you have too many subs which are in your code in no order)
2. Or order of your choice ( keeping related routines closer to each other so that it is easier to go back and forth)
3. Or arrange Regions ( organizing code for easier access)

CodeSort.png


How to use:
1. Load any b4j/b4a/b4i/bas file
2. Click on a Region having subroutines in it
3. Either sort manually using switch on extreme bottom left by drag and drop or
4. Sort a selected Region or All regions in ascending order. (no descending sort as of now)
5. Apply to save order changes else you lose them as you switch to another Block
6. Once the order is as per your liking (verify in code preview) - Click Save

Original files are not touched at all - if no file name is given an "_sorted" file with original name is created.

This is tested on some of my own code. Do report bugs if any.

link to download: CodeSort v1.0
 
Last edited:

kimstudio

Active Member
Licensed User
Longtime User
Hi mohsyn, could you explain more why do we need this code sort? I'd like to have some tools but I don't know what is the problem and how this tool can solve it. Tkx.
 

epiCode

Active Member
Licensed User
Hi mohsyn, could you explain more why do we need this code sort? I'd like to have some tools but I don't know what is the problem and how this tool can solve it. Tkx.
It can help you:
1. Sort Subroutines in lexicographical order (when you have too many subs which are in your code in no order)
2. Or order of your choice ( keeping related routines closer to each other so that it is easier to go back and forth)
3. Or arrange Regions ( organizing code for easier access)
 
Top