xsharp.eu • Navigation through the project
Page 1 of 1

Navigation through the project

Posted: Sat Nov 14, 2020 9:35 pm
by Serggio
Something has to be done with it. Couldn't imagine I would ever write it, but I seem to miss the simple VO-like Repository explorer in VS2019. I just cannot navigate through my projects fast enough, do not have that fast overview of all the functions in a module which I had in VO.
The Visual Studio's solution explorer doesn't show any entities inside PRG files. They are leaf nodes. While in C# I may go deeper to each entity and even to a field of a class. Implementing this in X# would make things much-much better!
For now there is no fast way to overview contents of a PRG-file. That upper combobox with the list of entities is inconvenient: it is small, there is no hotkey for it, arrow-buttons do not work there, etc.

Maybe there is a way to write an extension for Visual Studio to implement something like VO's Repository Explorer? How challenging this may be? The X# team has experience with VS-integration to estimate labor costs. Maybe someone, including myself, will contribute.

Sorry for complaints,
Serggio :)

Navigation through the project

Posted: Sat Nov 14, 2020 11:16 pm
by robert
Serggio,

The information that you need is stored in a SQLite database with the name "X#Model.xsdb" that you can find in the (hidden) .vs folder under the folder for the solution.

The database has a projects table, files table, types table , members table etc. It is very normalized. There are also views.
See https://github.com/X-Sharp/XSharpPublic ... tabase.prg for existing code and the structure of the tables, views etc. This table also has the source code for the first line of each entity and the XML comments (if any)
Why don't you write a stand alone tool using Windows.Forms to browse this database.
You can use the existing methods in the XDatabase class in the XSharpCodeModel to retrieve most of the information.
And if you need new methods, you can of course also download the source for XSharpCodeModel and add the methods that you need.
If you have that working then we can incorporate that as a window inside VS and add an event handler to open the entity in the editor when you click on it (each entity has file, line and column info)

Robert

Navigation through the project

Posted: Sun Nov 15, 2020 3:40 pm
by ic2
Hello Serggio,
Serggio wrote:Something has to be done with it. Couldn't imagine I would ever write it, but I seem to miss the simple VO-like Repository explorer in VS2019. I just cannot navigate through my projects fast enough, do not have that fast overview of all the functions in a module which I had in VO.
I totally agree with you. If .Net languages/Visual studio had an entity based editing and a quick option to sort on the last changed entities , like VO, I would probably have been on X# for all or most of my code instead of a few small stand alone things. But apart from users of VO, and if I am right, of VB 6, nobody knows about this vastly superior system so everyone using VS think that this is the best available :(
Serggio wrote: The Visual Studio's solution explorer doesn't show any entities inside PRG files. They are leaf nodes. While in C# I may go deeper to each entity and even to a field of a class. Implementing this in X# would make things much-much better!
I must miss something here because I see now difference with a .cs file and a .prg in VS. You can see all methods in the currently opened file in the listbox right from and above your code, in the same more or less random order as they are stored in the .prg/.cs file (it's virtually impossible to place entities in a logical order anyway: what is logical?). Interesting enough, there's a settings icon with options Sort Alphabetically and Sort on Recently Opened First (and Last). This is always greyed out (reason why I dislike greyed out options as more than once you do not know why or how you could change it).

Dick