A complete code browser for PureBasic [Windows]

Working on new editor enhancements?
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: A complete code browser for PureBasic [Windows]

Post by AZJIO »

Zapman wrote: Mon Dec 09, 2024 2:40 am I chose a much more simplistic method which works well: I send a command line to PureBasic:
But we need to solve this problem.
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: A complete code browser for PureBasic [Windows]

Post by Zapman »

AZJIO wrote: Mon Dec 09, 2024 3:12 am
Zapman wrote: Mon Dec 09, 2024 2:40 am I chose a much more simplistic method which works well: I send a command line to PureBasic:
But we need to solve this problem.
I have not such problem. Isn't it a Linux problem? I'm a bit puzzled, because I don't understand what you mean by "When I click on the file, the program starts and the file opens. When I click the next file, nothing happens."
When you click on the file from where?
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: A complete code browser for PureBasic [Windows]

Post by AZJIO »

Zapman wrote: Mon Dec 09, 2024 3:28 am Isn't it a Linux problem?
Yes
Zapman wrote: Mon Dec 09, 2024 3:28 am When you click on the file from where?
When the file is pressed in the file manager, it is opened using the file associations of the files. For Windows, this is used through the registry. Linux depends on DE, but this also works through the file associations. When you execute the code:

Code: Select all

RunProgram(Chr(34) + PureBasicProgAddr$ + Chr(34), FParam$, FPath$)
This works through the transmission of IDE parameters. But if this does not work through the Association engine, then this will not work through the transmission of the parameters. Thus, for Linux at the moment there is a problem that it will not work to go to the specified line due to the fact that the transmission of the parameters in the IDE does not work.
I want to record the video so that it is clear. Perhaps my words are not perceived seriously. Perhaps this does not work only for me, that is, in Cinnamon. But if the old IDE version works, then I think that this is the problem of IDE, not Cinnamon or my Linux. If this problem is not eliminated, then the movement into the line above the specified method on Linux will not work.

Video (IDE error demo)
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: A complete code browser for PureBasic [Windows]

Post by Zapman »

AZJIO wrote: Mon Dec 09, 2024 3:58 amVideo (IDE error demo)
Your combination of explanations and video is clear. Maybe you could further clarify the explanatory text a little. Then, you should submit this bug report to Fantaisie Software via the usual route, if you haven't already done so.
User avatar
le_magn
Enthusiast
Enthusiast
Posts: 277
Joined: Wed Aug 24, 2005 12:11 pm
Location: Italia

Re: A complete code browser for PureBasic [Windows]

Post by le_magn »

Hi ZapMan, i tested the latest version with the new feature(search in all project files) and it work very well!!! Thank you for this awesome tool
Image
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: A complete code browser for PureBasic [Windows]

Post by Zapman »

le_magn wrote: Mon Dec 09, 2024 3:58 pm Hi ZapMan, i tested the latest version with the new feature(search in all project files) and it work very well!!! Thank you for this awesome tool
Thanks a lot! Your suggestions were full of common sense. They help make PBBrowser even more practical.
I hope you get more. :D
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: A complete code browser for PureBasic [Windows]

Post by AZJIO »

It is not possible to force it to work in linux
Since I managed to use GTK2, I decided to try your idea with opening a file with the "/L nLine" parameter, but I again got a problem, it tries to open three files, actually the source and "/L" and "nLine".

Code: Select all

If Asc(idepath)
	MessageRequester("", "idepath = " + idepath + #LF$ + #LF$ +
	                     "source = " + source + #LF$ + #LF$ +
	                     "nLine = " + nLine + #LF$ + #LF$ +
	                     "cmd = " + Chr(34) + source + Chr(34) + " /L" + nLine)
	RunProgram(idepath, Chr(34) + source + Chr(34) + " /L " + nLine, "")
Else
	JumpToLine(nLine)
EndIf
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: A complete code browser for PureBasic [Windows]

Post by Zapman »

AZJIO wrote: Mon Dec 09, 2024 11:56 pmIt is not possible to force it to work in linux. Since I managed to use GTK2, I decided to try your idea with opening a file with the "/L nLine" parameter, but I again got a problem, it tries to open three files, actually the source and "/L" and "nLine".
Since the IDE sources are available online, if you find the courage to do that, maybe you can look at the part that runs the command lines to see what's wrong. It's probably the same problem that's blocking the two ways you tried.
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: A complete code browser for PureBasic [Windows]

Post by AZJIO »

Zapman wrote: Tue Dec 10, 2024 10:19 am maybe you can look at the part that runs the command lines to see what's wrong
I found a problem. Linux is used differently, the parameter "-l" or "-line". I checked and it works.
Zapman wrote: Tue Dec 10, 2024 10:19 am Since the IDE sources are available online, if you find the courage to do that,
It’s hard for me to study them. I can only hope for luck when trying to fix something. By the way, I had to re -compile with the use of GTK2 with additions from here (Multicolored), so that everything that I like worked in the kit.

Another point: RTF does not work in Linux, so you have to use Scintilla
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: A complete code browser for PureBasic [Windows]

Post by Zapman »

The Beta 0.25 version of PBBrowser has now a 'Preferences' panel:
Image

Among the possible settings, the "Color themes" field allows you to choose a 'Dark Mode' type interface. You can modify the existing theme's colors or create new themes if you want.

Here is an example of the main window with the 'Matrix' theme:
Image

The colors inside the 'Elements', 'Details' and 'FoundIn...' panel (see the grey background on the picture above) are still taken from the PureBasic preferences. So, Whatever you choose for the interface colors, it will only change the buttons and background of the main PBBrowser window, but not the colors used to present the code. If you want to change them, change your PureBasic preferences.

Happy Christmas, AZJIO :D
User avatar
le_magn
Enthusiast
Enthusiast
Posts: 277
Joined: Wed Aug 24, 2005 12:11 pm
Location: Italia

Re: A complete code browser for PureBasic [Windows]

Post by le_magn »

Thank you ZAPMAN for this addition and happy christmas ...
Image
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: A complete code browser for PureBasic [Windows]

Post by Zapman »

le_magn wrote: Sun Dec 15, 2024 7:13 pm Thank you ZAPMAN for this addition and happy christmas ...
Happy Christmas to you too :!:, to all the brave testers who have already given me feedback on PBBrowser (I'm waiting for more!!) and to all the members of the forum.
User avatar
le_magn
Enthusiast
Enthusiast
Posts: 277
Joined: Wed Aug 24, 2005 12:11 pm
Location: Italia

Re: A complete code browser for PureBasic [Windows]

Post by le_magn »

Hi Zapman, would it be possible in a future version to add selected text search in addition to procedures, variable names etc.? For example this is the result with Azijo tool:
Image

PBBrowser only search if text is contained in procedure name or variable name etc, same search produce 2 result(2 procedure contain in name the selected text)...
And if possible add option to enable/disable this type of search
Image
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: A complete code browser for PureBasic [Windows]

Post by Zapman »

le_magn wrote: Sun Dec 15, 2024 7:58 pm Hi Zapman, would it be possible in a future version to add selected text search in addition to procedures, variable names etc.? For example this is the result with Azijo tool(...)
:wink: Look at the TODO list, at the beginning of the PBBrowser.pb file. I too find Azijo’s tool super cool! This is a perfectly complementary approach to that of PBBrowser for searching the code. I've already thought about it and I can see how to integrate a RegEx search of this type into the PBBrowser interface.
I am very excited about this prospect and I therefore answer "yes", it is possible and it will be done.
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: A complete code browser for PureBasic [Windows]

Post by Denis »

Salut Zapman,
so, I haven't yet installed code browser but I think your tool is really great.

I don't know if it will work because the way I work with PB is a bit off the beaten track.

I've been using a personal tool for several years (the code is really badly written...). I only work with PB projects and my tool displays all the projects I've added to it.

When I open a project with my tool, it saves all project's prefs files in a special folder, i.e. for my AsmGenerator project, the following folder is:
C:\Users\ldsou\AppData\Roaming\PureBasic\ASM_Generator
For this projets, saved files are :
ASM_Generator.prefs, ASM_Generator_Templates.prefs, ASM_Generator_Tools.prefs
This means that each project has its own ‘PB environment’.
I'm happy with this, but it leads to another problem, but I'll deal with it.

All PB project files are stored in the same folder :
G:\PureBasic\Projects
If I install code browser in the standard way, it won't work, so I have to install it ‘by hand’ for each project, which is quite a lot of work because I have a few projects (about thirty).

Would you have an idea?
A+
Denis
Post Reply