Navigation through the project

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Serggio
Posts: 46
Joined: Sun May 14, 2017 5:03 pm
Location: Ukraine

Navigation through the project

Post 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 :)
Last edited by Eric Selje on Sat Nov 14, 2020 9:44 pm, edited 1 time in total.
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Navigation through the project

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Navigation through the project

Post 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
Post Reply