Page 5 of 6

Re: A complete code browser for PureBasic [Windows]

Posted: Mon Dec 16, 2024 1:38 pm
by Zapman
Hi Denis! I'm very glad you're interested in PBBrowser.
The fact that you work in a particular way with PureBasic interests me because it can allow me to make PBBrowser even more flexible.
But, at the moment, I'm having trouble understanding exactly how you do it. Here are some comments and questions to try to clarify things:
  • Comment: PBBrowser can list files to examine from a project, but it does not absolutely need to. If you open the main '.pb' file of your project (instead of opening the '.pbp'), PBBrowser will examine all the "IncludedFile" mentions in order to establish the list of files that the program includes as a whole.
  • Suggestion: You could try opening your project from the .pbp file, then, if that doesn't work (but I really don't see why it wouldn't work) from the main .pb file.
  • Comment: In theory, from the moment your program is open in the IDE, PBBrowser can work on it, whatever adjustments you may have made to your working environment.
  • Comment: Once PBBrowser has been compiled and/or installed on your machine, then installed in the IDE tools, you no longer even need to wonder how it lists a project's files. Click on a word in your code in the IDE, then press CTRL + Q. If a project that includes this file is open int the IDE, PBBrowser will use it to list the files. If this is not the case, it will manage with 'IncludedFile' mentions.
  • Question: You write: "it saves all project's prefs files in a special folder". But I don't understand what you are recording in your prefs, in 'C:\Users\ldsou\AppData\Roaming\PureBasic\ASM_Generator', for example. Are these preferences for PureBasic? Are these preferences for your particular tool? What do you exactly mean by "each project has its own ‘PB environment’"?
  • Suggestion: You write: "If I install code browser in the standard way, it won't work" but it seems you haven't try. Please try and describe the encountered problem, if any.
I can't wait to learn more! Thank you for your interest.
It is very possible that I did not fully understand the nature of the problem you are considering. In any case, if there really is one, I'm sure I can find a solution. Using inline commands to control PBBrowser, for example.

Re: A complete code browser for PureBasic [Windows]

Posted: Mon Dec 16, 2024 7:32 pm
by Little_man
Files that are read with the command "XIncludeFile" but have the characters "(" and ")" in the file name are seen as empty or not present !!...

Example:
XincludeFile "Includes\Parts_Split_Array().pbi"

Little_man

Re: A complete code browser for PureBasic [Windows]

Posted: Tue Dec 17, 2024 2:28 pm
by Denis
  • Comment: PBBrowser can list files to examine from a project, but it does not absolutely need to. If you open the main '.pb' file of your project (instead of opening the '.pbp'), PBBrowser will examine all the "IncludedFile" mentions in order to establish the list of files that the program includes as a whole.
Ok,
I only work with my tool (it opens PB either in x86 or x64 with the selected project), I also sometimes have Includefiles that are not necessarily in the main file.
Ok,
Je ne travaille qu'avec mon outil (il ouvre PB soit en x86 soit en x64 avec le projet sélectionné), j'ai aussi parfois des Includefile qui ne sont pas forcément dans le fichier principal.
  • Suggestion: You could try opening your project from the .pbp file, then, if that doesn't work (but I really don't see why it wouldn't work) from the main .pb file.
It's true, I've just read your messages and tried to understand your tool, but I haven't tried it out. I'm going to install it as a tool and see how it goes.
C'est vrai, j'ai simplement lu tes messages et essayé de comprendre ton outil mais sans faire d'essai. Je vais l'installer en outil et voir comment ça se passe.

  • Comment: In theory, from the moment your program is open in the IDE, PBBrowser can work on it, whatever adjustments you may have made to your working environment.
Ok
  • Comment: Once PBBrowser has been compiled and/or installed on your machine, then installed in the IDE tools, you no longer even need to wonder how it lists a project's files. Click on a word in your code in the IDE, then press CTRL + Q. If a project that includes this file is open int the IDE, PBBrowser will use it to list the files. If this is not the case, it will manage with 'IncludedFile' mentions.
Ok
  • Question: You write: "it saves all project's prefs files in a special folder". But I don't understand what you are recording in your prefs, in 'C:\Users\ldsou\AppData\Roaming\PureBasic\ASM_Generator', for example. Are these preferences for PureBasic? Are these preferences for your particular tool? What do you exactly mean by "each project has its own ‘PB environment’"?
I'm going to take 2 examples of projects that my tool loads.
My tool is in fact a project launcher, i.e. I select a project, I select the x86 or x64 mode and I launch it with a button.


Je vais prendre 2 exemples de projet que mon outils charge.
Mon outil est en fait un lanceur de projet, c'est à dire que je sélectionne un projet, je sélectionne le mode x86 ou x64 et je lance avec un bouton.

Launcher/Lanceur
Image

my working projects/Mes projets de travail
Image

how I launch the PureBasic editor/Comment je lance l'éditeur PureBasic
From French doc Commutateurs de la ligne de commande

/P <fichier Préférences> charge (et enregistre) la configuration à partir du fichier spécifié.
/T <fichier Modèle> charge (et enregistre) les modèles de code à partir du fichier spécifié.
/A <fichier outils> charge (et enregistre) la configuration des outils externes à partir du fichier spécifié.

Image

Prefs file path definition/Définition du chemin des fichier prefs
Image

Each of the 3 prefs files is only used for the project in question.
For the Microsoft__Macros project:
The folder used by the ide for this project is (folder with the project name)
C:\Users\ldsou\AppData\Roaming\PureBasic\Microsoft__Macros
The prefs files also use the project name

Chacun des 3 fichiers prefs est uniquement utilisé pour le projet concerné.
Pour le projet Microsoft__Macros :
Le dossier utilisé par l'ide pour ce projet est (dossier reprenant le nom du projet)
C:\Users\ldsou\AppData\Roaming\PureBasic\Microsoft__Macros
Les fichiers prefs reprennent également le nom du projet

Image


Pour le projet Module__SubClass :
Le dossier utilisé par l'ide pour ce projet est (dossier reprenant le nom du projet)
C:\Users\ldsou\AppData\Roaming\PureBasic\Module__SubClass
Les fichiers prefs reprennent également le nom du projet

Image


Each project uses its own prefs file, its own Template.prefs file and its own tools.prefs file.
Chaque projet utilise son propre fichier prefs, son propre fichier Template.prefs et son propre fichier tools.prefs


  • Suggestion: You write: "If I install code browser in the standard way, it won't work" but it seems you haven't try. Please try and describe the encountered problem, if any.
Yes, you're right.
When I've got a bit of time I'll have a look, but I think I'll have to modify my tool to modify the prefs files for all the projects as well as my basic prefs files which I use when I create a new project.

Oui, tu as raison.
Lorsque j'aurais un peu de temps je vais regarder, mais je pense devoir modifier mon outil pour modifier les fichiers prefs de tous les projets ainsi que mes fichiers prefs de base qui me servent lorsque je crée un nouveau projet.

Re: A complete code browser for PureBasic [Windows]

Posted: Tue Dec 17, 2024 9:55 pm
by Zapman
Little_man wrote: Mon Dec 16, 2024 7:32 pm Files that are read with the command "XIncludeFile" but have the characters "(" and ")" in the file name are seen as empty or not present !!...

Example:
XincludeFile "Includes\Parts_Split_Array().pbi"

Little_man
Your right and I'm sorry for that, Little_man. I didn't imagine that someone would use parentheses in filename. But why not? A fixed code will be online tomorrow.
Thank you vey much for your interrest, test and return.

Re: A complete code browser for PureBasic [Windows]

Posted: Tue Dec 17, 2024 9:58 pm
by Zapman
@denis : I think that I understand well the case. Its very interresting. I post you a message tomorrow.

Re: A complete code browser for PureBasic [Windows]

Posted: Wed Dec 18, 2024 2:46 am
by Zapman
Beta 0.26 is live. It fixes the bug reported by Little_man and offers more robust parsing of "IncludedFile" mentions.

Re: A complete code browser for PureBasic [Windows]

Posted: Thu Dec 19, 2024 1:02 am
by le_magn
Hi Zapman, the latest version have font problem in my pc:
Image
I tried to change fonts in preferences but nothing change

Re: A complete code browser for PureBasic [Windows]

Posted: Thu Dec 19, 2024 10:33 am
by Zapman
le_magn wrote: Thu Dec 19, 2024 1:02 am Hi Zapman, the latest version have font problem in my pc:
Hi, le_magn,

I have the impression that the code of the characters that are displayed incorrectly is read in ascii instead of being read in UTF8. Michael Vogel reports the same problem to me on his machine. It is very strange that this happens on some machines and not others.

Thank you very much for your feedback. I'm working on it today.

Re: A complete code browser for PureBasic [Windows]

Posted: Thu Dec 19, 2024 11:04 am
by Little_man
Same problem with fonts on my Windows system !!...
It is also possible to center information windows (choose your language) on the main window

Little_man

Re: A complete code browser for PureBasic [Windows]

Posted: Thu Dec 19, 2024 12:32 pm
by Zapman
In several places in the code, I was registering some special characters by simply putting them in quotes: "➭". I didn't think I would have any problems with this, since my code is encoded in UTF8 in the IDE. However, at some point, these characters got corrupted. I suspect a bug from the project management of the IDE.

So I revised all the code to replace this type of notation with "Chr(XXX") and I think it's good now.
I did some tests on one of my old machines that runs XP. Before the fixes, there was a problem with the same characters as you. Afterwards, everything seems OK.

Beta 0.27 is online with these fixes. I hope it's really fixed.

Re: A complete code browser for PureBasic [Windows]

Posted: Thu Dec 19, 2024 12:35 pm
by Zapman
Little_man wrote: Thu Dec 19, 2024 11:04 amIt is also possible to center information windows (choose your language) on the main window
It should be centered on the screen, as all message windows. Isn't right as this?

Re: A complete code browser for PureBasic [Windows]

Posted: Sat Dec 21, 2024 10:47 am
by Zapman
Little_man wrote: Thu Dec 19, 2024 11:04 amIt is also possible to center information windows (choose your language) on the main window
It's done with Beta 0.28. All secondary windows are now horizontally centered relative to the main window. Except for this evolution, this version is essentially a 'technical' update (you don't absolutely have to download it). All special characters are now designated by a constant name instead of Chr(xxx), following a suggestion of Michael Vogel.

Re: A complete code browser for PureBasic [Windows]

Posted: Sat Dec 21, 2024 11:13 am
by Little_man
Version "Beta 0.28".
Thanks for centering secondary windows.

Little_man

Re: A complete code browser for PureBasic [Windows]

Posted: Sat Mar 22, 2025 1:07 pm
by Zapman
The code and executable have been updated to version 1.0.
  • Small bugs have been fixed.
  • PBBrowser now benefits from improvements to the SetGadgetColorEx, SetMenuItemEx, ZapmanColorRequester, and ZapmanFontRequester libraries. 'Dark mode' is fully operational in all interface elements including menus.
  • A new tool allows you to completely remove comments from the code being reviewed.
The next version will integrate a 'RegEx' search to complete the actual manner of searching variables, constantes, procedures and so on.

Re: A complete code browser for PureBasic [Windows]

Posted: Sat Mar 22, 2025 6:54 pm
by le_magn
Thank you very much for this update:)