For often-used routines, it's easy enough to put them in a global/shared module and use them in different projects.
But for all the code that needs to be in an Activity, like code in view events, it's a pain in the butt to reuse code - currently I need to:
1) Remember what project I have the desired code in
2) Launch B4x and load that project
3) Search for what activity has the code I want
4) Copy the code
5) Switch to the desired project
6) Paste the code
It would be VERY helpful if there was a new tab on the right-side explorer (where you have the "Libraries, File Manager, Modules, etc." and have it called "Snippets" and it would contain:
1) A list of all the snipplets of code I previously saved.
2) A search box so as I type characters, it will filter the list to just matching entries
Then, to add code to the snipplet library, I just need to highlight code in a code window, right click and select "Add Snipplet..". And it would pop-up a dialog in which I could specify the name for the snipplet that will then appear in the above listing tab.
Then I just need to double-click on the desired snipplet in the listing and the snipplet code would be placed in my clipboard, ready to be pasted in a code window.
Since this will add yet another tab to the bottom row of tabs, you could simply add a second row of tabs to eliminate the congestion.
B4x's purpose is to be a RAD tool - and being able to quickly insert snipplets of often used code would help reach that goal.