Bird's eye code view / mini map button

Started by Arthur, April 27, 2009, 06:11:42 PM

Previous topic - Next topic

Arthur

I have an idea to add bird's eye code view with quick jumps which is kind of a mini-map for a document.

This is because the Zoom Out needs to be clicked perhaps 10 times to get something like that, I am thinking a quick jump to this mode is essential. And I like it to appear in a separate window.

Also it would be nice to be able to navigate within this window, say to be able to go to a specific function or node [if this is XML].

What would be your thoughts?

scottbilas

If you haven't installed RockScroll in your Visual Studio, you should take a look!

http://www.hanselman.com/blog/IntroducingRockScroll.aspx

Something like RockScroll would be wonderful on HE! I find it very useful in VS.

alex

Hi,

to Scott:
I have checked the post and comments. Saying the truth, I do not think that this is more then toy. Example shown, is two page screen. If you would have 10K lines, you would see nothing, and any way need to scroll (overwise you would see 1 pixel column). From my point of view, Overview Bar used in HE, has more sence. Ok, it does not show you bird view but you can see todos on it (or generally any style from document, as you would maintain this in settings), search matches, errors etc... And can also navigate with one click.
I would try to evaluate RockScroll to check maybe I missed something...

to Arthur:
You can get such bird view much more easy, if you would keep Ctrl pressed and use Mouse Wheel. Or with help of Scale menu in status bar.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

scottbilas

Alex: why don't you try installing RockScroll into your Visual Studio? Even if you don't think it makes sense to implement for HippoEDIT, you might find it to be a very useful tool for your VS work. For me it works very well on large files. Give it a try. :)

alex

#4
Done ;) I have installed it before, but have not check because need to restart VS.
I have attached screenshot of my RockScroll for 4200 lines file.
So... What I can get from this type of info scroller (I think I have seen such term for this)? I even could not see current poistion clear.
Can you share yours for large file ;)

Features I have found:
- overview of document
- it shows, not a current line but current view window range
- it shows changed/saved lines, left from view(because of different color, have not noticed this from beginning)
- it shows bookmarks, right from view (because of different color, have not noticed this from beginning)
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

scottbilas

Ok, I will admit 4200 is a very large file that may not work as well with RockScroll. In our codebase we have a coding standard limit of ~1000 lines. But we still do have some files that get very large (particularly generated files), and I still find it useful.

It has a few kinds of markers that are great. As you mentioned, there are markers for bookmarks and changed lines, but any info bar can do this. It also does the same with breakpoints (red dot on the right side). All of these are line-oriented, so you don't need the document overview that RockScroll provides for that.

But what RockScroll adds over other info-bars, specifically with its graphical view is that it highlights words in the picture. Try double-clicking on any word in your file. All of those get highlighted in the info-bar. You have a visual map of everywhere that this is used in the file. This is useful even on very large files.

When I'm about to do a refactoring operation I can get a quick idea of how much work I need to do on a particular file by double-clicking one of the symbols involved. Or I can get a quick look at how many things in the file are dependent on a particular symbol by seeing how many places it is used. Not as comprehensive or accurate as a real reference check, but great for rough checks. Very useful for me.

Another thing I find useful is the picture of the code itself. Even on a large file I can easily see things based on the shape of the code. In your screen shot I can see a very dense part at the top - I'm guessing that this is a mapping of some kind, possibly using a lot of MFC macros. Maybe for reflection or message mapping.

So - in files that I am very familiar with, sometimes I know better how to navigate based on the shape of the code than by doing a find or using Alt-M and picking a name. I just remember "oh yeah, here is where the state machine is" or "right, this is the set of all the Lua bindings" and I can just do a single click on RockScroll to go there.

And lastly, for our project anyway, it's good to see a file that is very long. RockScroll encourages us to break those classes down into smaller pieces when it starts to get hard to see detail in the view due to the number of lines involved.

I'm not suggesting that we need this all in HippoEDIT! Just wanting to evangelize a tool that I think is very good in general, and not simply a toy. :)

alex

Hello Scott,

ok, toy was not a good word :) Also taking into account all comments from another Scott blog :)
I have also found there description from Rocky of what is possible.
So, let say this was my personal opinion :) I was comparing the tool to something already exist in eclipse or resharper. The only difference I see is visual representation of text, and this I do not like too much..

But ok. Let see what can be taken from this into HE.

What is already possible to see in HE Overview Bar:
- Bookmarks
- Changed and Saved Lines
- Selection
- Current line
- Errors
- Embedded syntax blocks
- Breakpoints (HE support them, but only in embedded mode)
- Search results (Mark all)
- Incremental search results
- Smart Highlight (Ctrl+Click, more intelligent version of double click in RockScroll)
- Todos (generally any possible text type found in text)

So, what is missing is.. Yes, real code "structure" representation. I can keep it in mind, and maybe would implement as alternative background for outlining bar (ok, than it shoul be wider), but already see performance problems - you need to draw complete document. For large ones it can be critical, scale problem, what to do with veeery long lines etc...
Let see what other think, maybe if would be high demand on this I would think harder  ;D

Best regards,
Alex.

HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

scottbilas

I didn't know about ctrl-click. You're right it's definitely more intelligent. I wasn't aware of many of these features. It seems you have thought of everything. :) I'll keep exploring.

dv

#8
Hehe, I also didn't know about Ctrl+Click  :)
Oh, I love this feature!

Regarding RockScroll..
Tried it and I found a document map is very small. But this is a very nice tool and think it would be useful to have something similar in HippoEdit.