Bug? Two issues with the IDE

Informatix

Expert
Licensed User
Longtime User
I use B4J since a few months almost every day and I really like it. It lacks an USB library, but what bothers me much are these two issues (still there with 5.82):

- when I add a member to a class, I have to close the IDE and reopen it to see the new member in the Intellisense list for code completion. Waiting a few minutes or recompiling does not help.

- the behavior of the "autoformat when pasting" feature is sometimes irritating. For example:
pasteandtype.png

Try to cut the selected part as above, paste it elsewhere on the line and start typing. You're not where you expect because the cursor was moved at the end of the line when the line was formatted.
Another example where I commented out some lines:
commented.png

If I paste lines after these ones, I get:
afterpaste.png

I don't understand why the lines before and after the pasted lines are formatted.

There's also a minor issue with the case fixing of else or if. "else" should become "Else", "if" should become "If". But very often, that does not happen.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
when I add a member to a class, I have to close the IDE and reopen it to see the new member in the Intellisense list for code completion. Waiting a few minutes or recompiling does not help.
This should not be the case (and it doesn't happen here). Try to press Enter to add a new line in Class_Globals when it happens. Does it solve it?

The selection management during auto formatting will be improved in the next update (you can test it when B4A beta is released).
Note that you can disable auto formatting while pasting.

You can click on Alt + F to auto format the complete sub. Auto formatting works better when the sub is indented as the IDE expects it to be.
 

Informatix

Expert
Licensed User
Longtime User
Try to press Enter to add a new line in Class_Globals when it happens. Does it solve it?
Yes, the new line solves the issue. Thanks for the tip.

You can click on Alt + F to auto format the complete sub. Auto formatting works better when the sub is indented as the IDE expects it to be.
When you use the button or the menu to comment out a selected block of code, the comment mark (') is inserted at the beginning of the lines, so when you paste something just after a commented block, the last commented line is always shifted. If I use Alt+F, it's the complete block that is shifted.
Example:
comment.png
 
Top