New feature: IDE comment links

Erel

B4X founder
Staff member
Licensed User
Longtime User
qHTNrUJnPQ.gif


Currently there are two types of ide:// links:
run - Runs an external program (as demonstrated above). There are several options that control the IDE behavior.
goto - jumps to a sub or a line.
Example:
B4X:
Public Sub Initialize 'See ide://goto?Module=StatusView&Sub=SetTopText for more information.

B4XPages template will include this comment:
B4X:
'Ctrl + click to export as zip the B4X project: ide://run?file=%B4X%\Zipper.jar&Args=Project.zip
It is similar to File - Export as zip for B4XPages where there are actually three projects.

It will also include this one, which solves a problem that most developers are less familiar with:
B4X:
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
This is relevant when you add files to the shared files folder. Currently you need to run the project, let it fail and now click on the Sync button to add the files to the IDE.
 

sorex

Expert
Licensed User
Longtime User
It's almost like telepathy.

I was going to request something like this :)

For me the reason for the request was playing around with B4Xlibs.

Now I need to use this method

save my file(s) in the library project
open the B4Xlib in total commander's left pane
copy the updated .bas file(s) from right pane into the zip in the left pane.
switch right pane to additional libs folder tab (ctrl-tab)
exit zip in left tab and copy to right pane

if I want it updated in B4i I need an additional copy.

it would be ideal if I could use such line to call a batch/vbscript file or a shortcut (alt-0 ?) for the first ide:// link in a class then I only need to refresh the libs to do the testing
and a switch to total commander ain't even needed anymore.

I will write the script for it as it will save me some time and keypresses already. (edit: just a 2 liner batch file was enough to zip it to both B4A & B4i additional libs folders)

It was either something like this or an additional B4Xlibs path mainly for B4i. But that would've been not so ideal I guess.
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
See ide://goto?Module=StatusView&Sub=SetTopText for more information.
Can I pre-empt code manipulation in the IDE that could be perhaps "live". For example, I want to Lowercase code from line 10 to 15? Then I write a script to find the lines and convert the code in lowercase and then the IDE reflects such changes. #WishfulThinking.
 

AnandGupta

Expert
Licensed User
Longtime User
Not possible for now. You cannot tell the IDE to reload the file.
Ahh.. I was think of it 'if it can be done'

You see, I make changes in my current .b4a file from another project by using Beyond Compare (3rd party text compare). I have noted that after I save in BC, the ide takes time and then shows the 'added/changed' lines as yellow marked. Saving the file changes it to green. Ok here.

Problem is I have to wait for the ide to make the 'yellow' lines else all changes are lost.

Anyway to make ide reload/refresh the active file .b4a or .bas will be very very helpful for me.

Regards,

Anand
 

Alexander Stolte

Expert
Licensed User
Longtime User
Note that the IDE checks for file changes whenever the IDE becomes focused. Click on a different app and then back in the IDE to force it to update.
Is that new? In the past I always had problems when I opened the same module in another IDE, that I suddenly got the old version from the other IDE in my active IDE, because the other IDE did not update itself yet.
 
Top