MaxIDE code completion
BlitzMax Forums/BlitzMax Programming/MaxIDE code completion
| ||
alright, I ve spend two days trying to understand Mark's code for the IDE and implementing a rough version of code autocompletion... and guess what??? it works :) since I ve worked all day, I'm feeling lazy so rather than telling where to add this and that, i m going to put the whole IDE code, just copy/paste over the former one and compile... oh by the way, I havn't tested it thouroughly... for instance, I ve only compiled it in debug mode, tried it a bit and it worked.. Also I havn't tested it yet on my Mac, and I won't be able to test it on Linux but there's no reason for it not to work as I'm not using any system oriented code, only Blitz functions, and with this, rather simple ones... HOW IT WORKS (or is supposed to work :) ): type something like: "a = load" and then hit the TAB key... a popup menu should appear right next your mouse pointer (yeah I know it would be better if the menu could appear next the word to be completed but unfortunately I can't get the x,y coordinate of the cursor in the text area... only the cursorpos, cursorline which represent the line and car number in the text) here is the code: http://kamashin2.free.fr/maxide.tar <-- not up to date so don t use it or if you have some problem with the .tar, you can try right-clicking and savingAs the bmx directly: http://kamashin2.free.fr/maxide.bmx <§§ use this one... it s kept up to date :) Mac compiled version: http://kamashin2.free.fr/macmaxide.rar PC compiled version very soon (read the rest of the posts to have some precisions about how it works and all :) ) |
| ||
As I already said, the code is rough for now... only the blitz command avalaible in the doc generated with the tools will be recognize... when the code is bug-free enough, I ll try to populate the autocompletion menu a bit more with user defined functions/types and if I can Global and Local (if I can, cause globals and locals might be tricky to get... functions and types should be easy as the menu filling functions is completely seperated from the rest of the process, I ll just have to add a few thing is all :) ) |
| ||
kool keep up the good work, now all we need is a split code pane... btw that anoying orange mutant space hopper in your sig makes my cursor flash real quick... |
| ||
btw that anoying orange mutant space hopper in your sig makes my cursor flash real quick... does it??? it's a simple animated gif though... I'll definately continue to develop the auto completion' cause I can't live without it :) |
| ||
does it??? it's a simple animated gif though... YES, hint hint.... ;p |
| ||
I blocked that image ages ago. |
| ||
Can you put an exe in download, for those they have not got MaxGui ? |
| ||
Hi, I just modified it so the popupmenu is under the text, i will try and add a listbox instead of a popupmenu tomorrow. MaxIDE Btw very nice work. |
| ||
KamaShin: Please choose a less annoying sig |
| ||
his sig isn't so bad. Just get some ADD medicine and it won't bother you. BTW: Thanks for the awesome auto-completion! |
| ||
I had a look at the code to see if I could add in user-defined functions, but I couldn't see where to put it in amongst all the weirdo string ops. |
| ||
Sarge: wow, I HAVE to see how you manage that... I lost a bunch of hours trying to figure that out :), gonna have to try it ASAP :)) damn that's cool if it works on every platform :) why replacing the popup menu by a listbox though??? I thought a popupmenu would be cool because the fact that if the position of the cursor is too close to the bottom of the screen the menu will place itself so that it fully fit in the screen... dont know what it would do if the menu is bigger than the screen though... Warpy: lol, yeah it's a bit messy but quite optimised in term of exuction speed I think :), don't worry I ll be adding user defined types and functions to the auto completion :) Progi1984: yeah, didn't think about it :) I ll create an exe tomorrow at work (have a Mac at home and a PC at work :) ) and I ll create the Mac version tomorrow evening... as for linux, someone will have to do it for us cause I can't :) so some people found my sig offensive?? it wasn't meant to be... didn' t have any religious meaning in any way, twas just a word-game/joke... but maybe I'll change it someday... don t have the time right now anyway, thanks for the replies all, tell me if there are bugs, Sarge and I will try to sort things out (yeah Sarge, you'll be in charge of debugging your part of the code... cheeeese) :) |
| ||
Please see this thread. http://www.blitzbasic.com/Community/posts.php?topic=53067 I don't understand the insistence on separate threads, when there's already a tweaked MaxIDE thread in which skid is partaking... |
| ||
Just compiled a Mac version with the autocompletion... however there is still a bug in macOS: the WindowPopupMenu function that's supposed to popup a menu at the mouse x/y position pops it up at the 0,0 coordinates on my Mac... don't know if it will do the same to others... since it's Mark's problem to solve this kind of bug, I'll probably just for this function to be fixed :) Here is the Mac link: http://kamashin2.free.fr/macmaxide.rar Also I had to make a slight change to Sarge's code so that the source still compiles on Mac and linux cause man you used an extern win32 function without putting some ?Win32 ? around it... didn't compile on Mac and probably won't on Linux... so now I made it so that the autocompletion works right under the text on PC, and pops up near the mouse on Mac and Linux... I ll have to figure an equivalent for Mac to this extern function of his... and ask someone to do the same for linux... I updated the .bmx link so use it... DO NOT USE THE .tar... it's not updated... Alos, I'll put an exe version tomorrow :) http://kamashin2.free.fr/maxide.bmx |
| ||
Mark Tiffany: hum well, didn't see this thread in the first place... I just ran to create a new one here... don't really know how to "move" now... |
| ||
Just post in the other thread with 'these are my autocomplete changes' (altho I would save it until you've reached a final, complete-ish state) and leave this one for dead =] |
| ||
Finally... I manage to upload an exe on an ftp... damn... don't know why but they didn't want me to... anyway, here it is: http://membres.lycos.fr/kamashin/winmaxide.zip Alos, I ve updated slightly the source so that parts dealing with autocompletion can be easily found: just look for AUTOCOMPLETION in the source :) http://kamashin2.free.fr/maxide.bmx |
| ||
I've updated the autocompletion so that it now accepts user defined types and functions... still if you declare an object of type MyType, the autocompletion doesn't work for the functions and procedures that are inside this type so you can't declare mt:MyType and then type mt. and hit TAB hoping every field and functions and methods to popup... they wont... however create your type and some "global" functions and try using the autocompletion and this will work... I don't know if I m going to try implementing the "inside types" autocompletion or the golbals/locals... don't know yet... by the way, both the source and the windows exe have been updated... will make the Mac version as soon as I'm home :) source: http://kamashin2.free.fr/maxide.bmx win exe: http://membres.lycos.fr/kamashin/winmaxide.zip if you want to update your exe, you only have to replace the "CreateAutocompleteMenu" function with the new one... no other changes OK I M DUMB... I UPDATED THE .EXE BUT FORGOT THE .BMX... and since it s at work I ll have to wait till monday for updating it... DAMN |
| ||
@Kamashin : it is impossible to download the file when it is in lycos ! |
| ||
You need to copy the url and paste it into the address bar yourself to make it work. |
| ||
@Progi1984: just like Warpy said, copy the url and past it in your browser... it should work... I can t host the file anywhere else for now, sorry :) so please bear with me :) |