Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

CodeMap

Murtaza Aliakbar edited this page · 30 revisions

Semantic aware source code visualizer

Introduction

codemap is a semantic aware source code visualizer. It's a X11 program that helps visualize, navigate, and search a large codebase. It can also be connected to an editor such as Emacs so that when you click somewhere in the codemap window it opens the appropriate file at the appropriate line in Emacs.

As you zoom in the codebase, codemap displays more information, a little bit like Google Earth: you first see only the files and directories, and then the important classes and functions, and then the important statements. By leveraging results from static and dynamic analysis codemap can "understand" the source code it is displaying and highlight the important parts. This helps understand quickly code you have never seen before. Also like Google Earth codemap provides layers that helps seeing the codebase through different angles.

See https://github.com/facebook/pfff/blob/master/main_codemap.ml

Motivations

Source code visualization.

Synopsis

The synopsis is:

$ codemap [-screen_size <int>] [-with_layers <dir>] [-with_info <db>] <dir>

Make sure you have generated the graph_code.marshall is generated before hand. You can build that using the codegraph command. Please visit the CodeGraph wiki for more.

Screenshots

Features

Code visualization

Code search

Code navigation

Layers

Other features

See Features#Visualization.

More Screenshots

See Examples and Examples2 for screenshots of the tool applied to lots of different open source projects.

Internals

See Visualizer manual.

FAQ

How to reduce the size of specific files in the treemap?

You can try to put big files in a 'big/' subdirectory. The "big" directory name is hardcoded in pfff code to be part of the "Data" category which is then artificially reduced on the treemap.

You can also create a skip_list.txt file at the toplevel. See https://github.com/facebook/pfff/blob/master/h_program-lang/skip_code.ml and as an example see pfff own skip file: https://github.com/facebook/pfff/blob/master/skip_list.txt

Related work

http://fcgp.sourceforge.net/shots.html

Future work

See Roadmap#Visualizer

Something went wrong with that request. Please try again.