Code navigation

Post DPack feature requests here.

Moderator: Sergey

Code navigation

Postby Rune » August 3rd, 2005, 9:06 am

Hi There

A feature that could make code navigation much nicer could be treeview class browsing, like the old delphi addin (I forgot the name ctrl-w).

I am navigating through files with many classes and a lot of lines - so it could be cool to have the functionality that the class and member combos give, but in a treeview and with keyboard shortcuts.

A nice product!

cheers
Rune
Rune
Junior Member
 
Posts: 6
Joined: August 3rd, 2005, 8:56 am

Postby Sergey » August 3rd, 2005, 10:09 am

Is Visual Studio's View|Object Browser what you're looking for?

Thanks for the compliments. :D
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Rune » August 4th, 2005, 3:42 am

Visual studio's object browser is good when you use 'Go to definition', but it is not quick to navigate current file or project.
What I was thinking about was just grouping dpack's current code browser in a tree a bit similar to the class view but not grouped by namespace. The namespace ordering makes it difficult to navigate if it is nested.
So instead off having the types in the combobox, it could be nodes in a treeview - and the functions etc. could be grouped in the treeview that is easier to navigate.

The delphi thing was called codewarp, there is a screenshot here:
http://www.delphipages.com/result.cfm?ID=988

:)
Rune
Junior Member
 
Posts: 6
Joined: August 3rd, 2005, 8:56 am

Postby Sergey » August 5th, 2005, 10:21 am

Been thinking about it. I just don't see how that will be significantly different from a built-in Object Browser. To me. when you get to deal with a tree view it becomes counter productive to 'quick' as you'd need to use mouse to expand nodes. I was btw never a big fan of old Delphi's Explorer either.

On the implementation side I think something like that would need to be toolwindow. Keeping track of code changes and updating the code model on the fly is not a trivial task. AFAIK, there is no way to tap into VS code model change notifications.

I'm not being difficult, trust me. :) I use DPack daily and know what I want out of it and how I want it to work for me.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Sergey » August 7th, 2005, 12:28 am

Rune,

Still thinking about it... :)

For me finding a class often works in the following patter:
- class name is such and such so it must be in such and such file
- bring up a File Browser and get to that file
- method I'm looking for is such and such
- bring up Code Browser and get to the method

You know, a feature, combination of File Browser, Code Browser and VS's Object Browser is what I'd personally prefer. My only concern is and has always been that trying to get to the whole solution code model will be taxing on performance.

Another issue will be how to present multiple files and their types and members. :?: I.e. tree vs., cache members or not, etc.

I could try to put together a prototype if you or anybody else is interested.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Rune » August 8th, 2005, 7:42 am

Hi Sergey

I also use dpack daily - mainly the bookmark feature that I can't live without :)

When I look for a class or method it is often in the project or file that I have open, but the files have maybe 3000 or 5000 lines with many classes in them maybe 20-40.
If a "go to definition" doesn't work I use the classbrowser bar and then select method etc. or do a search.

The combination aproach sounds cool - and I would offcourse like to test it :)
But the idea I thought off was more simple - like the current dpack metod browser in non flatten mode but with methods in a treeview and with keyboard navigation like: press 'k' to select first class (or item in current treebranch) with k then arrows to open that branch and so on.
Rune
Junior Member
 
Posts: 6
Joined: August 3rd, 2005, 8:56 am

Postby Rune » August 8th, 2005, 8:40 am

Keypresses I imagine to get to a method in a class in a file:

alt-c to display classbrowser
move a bit down with arrows or first letter to select class
right-arrow to expand
Move a bit down with arrows or letter
enter to select

It could also be a way to select in the current listview so you can display methods etc from only one class - maybe ctrl-enter, alt-enter or so to view methods, properties.

I too never used the delphi object browser - it was not really organised in a usefull manner.

Does it make sense? :)

cheers
Rune
Junior Member
 
Posts: 6
Joined: August 3rd, 2005, 8:56 am

Postby Sergey » August 8th, 2005, 11:13 am

Rune,

But the idea I thought off was more simple - like the current dpack metod browser in non flatten mode but with methods in a treeview


I've actually had requests to change Code Browser to work on the whole solution as oppose to current file/project. My two concerns are performance and usability. The last one would be handled by grouping items in the tree view like structure. Performance may be an issue though.

I was thinking last night about ASP.NET 2.0 and complications that it brings to the table. To improve VS 2005 ASP.NET solution loading times, MS no longer pre-loads code model for individual files. This means that if my new feature were to interrogate each file's code model, it'd have to load each file first. On large solutions it could take a real long time. For web solutions I may have to provide a some sort of progress dialog with Cancel button.

I'm also investigating to see if I could cache the solution files code model first time and only refresh changed files on consequent requests.

and with keyboard navigation like: press 'k' to select first class (or item in current treebranch) with k then arrows to open that branch and so on.


I personally, would still like to combine treeview with a search box to enter filter criteria.

When I look for a class or method it is often in the project or file that I have open, but the files have maybe 3000 or 5000 lines with many classes in them maybe 20-40.


I think I see where you're coming from... :) It's not an issue most of the time because teams tend to adopt Java-based approach and keep only one class per file, no matter how small class is. It makes Code Browser whole a lot more useful. And that's why there was a need for the File Browser feature. You may wanna think about restructuring your code base.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Sergey » August 9th, 2005, 10:05 am

Rune,

You know, after taking a closer look at VS's Class View, it looks remarkably similar to what you were describing. The only thing is missing in Class View is a filter edit box, similar to one found in DPack's Code Browser.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Rune » August 22nd, 2005, 4:19 am

Yes it is much similar to the classview.
The problems with the classview is that - in my opinion - that it displays too much. Well it is good that it displays all for the current solution - and the group by type is good - but difficult to overview when having a deep namespace nesting.
There is even a shortcut. It would however be nice if it could be customized to work well as stand alone (go away when something is selected) and be divided in file and solution mode so navigation in current file was quick. And shorten the namespace path.
Rune
Junior Member
 
Posts: 6
Joined: August 3rd, 2005, 8:56 am

Postby Sergey » August 22nd, 2005, 10:26 pm

Agree on Class View. I don't want to fiddle with tool window activation. Just like you, I'd like to get to it and then have it go away w/o much effort.

I've been working on a relatively large solution lately and I'm starting to see where something like a hybrid of Code Browser and File Browser would come in handy. I've put together a simple Photoshop prototype:

Image

It was painful enough to work with MS Paint for an hour. :) So, it's not a finished version by any means. I think some sort of toolbar with persistable filtering options would be nice too.

As you can see, solution types will be grouped into four main categories: classes, interfaces, structs and enums. You will be able to browse within each category, down to a member. I'd think pressing enter or any node would close dialog and take you to the source declaration.

Additionally, search filter would allow you to get to a type relatively quickly. That filter will not apply to the tree view. Search results will be shown at the bottom of the dialog (may have to re-order that :?: ).

The toolbar I've mentioned earlier will probably have an ability to filter out any one of those 4 categories. Perhaps there could be another filter for member types :?:.

That's all I could think of... Your (and anyone else's) input would be very much welcome.
Last edited by Sergey on October 17th, 2005, 8:19 pm, edited 1 time in total.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby Rune » August 23rd, 2005, 7:49 am

I feel for you having to work with MS Paint - nice work :)

The combination approach is alot like what I am looking for.
The overview you made looks nice and simple - not clogged with too much namespace nesting. With sorting and keyboard navigation in the tree it could be very good.
I´ll think about it and see if something comes up that could be usefull to add.
/Rune
Rune
Junior Member
 
Posts: 6
Joined: August 3rd, 2005, 8:56 am

Postby Sergey » November 7th, 2005, 1:28 am

Rune,

New beta is out with this feature we've discussed few months back. The new feature is called Solution Browser (yeah, everything is a browser :)). Check it out. I'd appreciate your (or anyone else's) feedback. Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Postby scottschulthess » May 5th, 2009, 4:37 pm

I really like the Solution Browser, but it would be great if the field results could include "Namespace" because I have similarily named classes seperated by namespace
scottschulthess
Starting Member
 
Posts: 1
Joined: May 5th, 2009, 4:31 pm

Postby Sergey » May 5th, 2009, 5:22 pm

Hi Scott,

So, if you had 2 classes calles SomeClass then you'd rather see full class names like this

MyNamespace1.MyNamespace2.SomeClass
MyNamespace1.MyNamespace2.MyNamespace3.SomeClass

instead? I can look into adding that feature but those full names could get really long. And if I do, it'll be turned off by default.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA


Return to DPack Wish List

Who is online

Users browsing this forum: No registered users and 1 guest

cron