CodeAtlas For Sublime Text

时间:2023-02-09 13:24:46

CodeAtlas is a plugin of SublimeText, which allows one to explore the call graph conveniently. The plugin uses the code analysis tool Understand (https://scitools.com) to perform symbol/reference query task.


Following (but not limited) languagues are supported: Python,C/C++,Java. 

Interface

CodeAtlas For Sublime Text

Features

1.Find callers/callees of a function.
All key shortcuts below can be used in both Sublime Text and the visualization window.
Press Alt+G to show the function/variable/class under the cursor in CodeAtlas.
Press Alt+V to show callees of current function.
Press Alt+C to show callers of current function.
CodeAtlas For Sublime Text

Each function is represented as a green disc in the atlas. Size of the disc indicates lines of the function. The fan shape on the left of the disc indicates number of callers, and the one on the right indicates number of callees. In the figure below, there are much more callers of the function "isinstance" then that of "selectOneItem". The fan shape can warn you not to show too much callers/callees, which will totally change the figure.
The numbers on the gray lines indicate call order.
CodeAtlas For Sublime Text

2. Find Members of a class.
Press Alt+M the find members of a class.
CodeAtlas For Sublime Text
Each member variable is represented as a pink disc in the atlas.
CodeAtlas For Sublime Text
Each class is represented as a blue disc. Also, Size of the disc indicates lines of the class.
CodeAtlas For Sublime Text

3. Find references of a variable/function. 
Press Alt+U the find all references.
CodeAtlas For Sublime Text

4. Explore call graph.
Press Alt + ↑/↓/←/→ to explore through the graph.
You can select a nearby node(function/class/variable) or edge(function call/variable definition/function definitio) by pressing Alt + ↑/↓/←/→. The most likely node/edge will be selected and Sublime Editor will jump to corresponding code.

CodeAtlas For Sublime Text
5. Delete an unused function/class/variable
Press Alt+Delete to delete current selected function/class/variable.
CodeAtlas For Sublime Text

6. Find all call paths between two nodes.
In the visualization window, using mouse middle button to drag function A to B, then all call paths from function A to B will be shown.
CodeAtlas For Sublime Text
7. Use mouse to select/drag/zoom in the visualization window directly.
CodeAtlas For Sublime Text


Setup

1. Install Understand (home page https://scitools.com)
2. Install Sublime Text (home page http://www.sublimetext.com/)
3. In Sublime Text, press Preferences->Browse Packages go to package folder.
CodeAtlas For Sublime Text
4. Unzip and place the plugin in the package folder.
CodeAtlas For Sublime Text
5. Replace Packages/CodeAtlas/CodeViewPy/understand.pyd with the one in the Understand folder(usually in SciTools/bin/pc-win32/python/understand.pyd)
CodeAtlas For Sublime Text

6. Open Understand and create a database for your project.
CodeAtlas For Sublime Text
CodeAtlas For Sublime Text

7. After finish the new project wizard, a database file will be generated.
CodeAtlas For Sublime Text

8. Close Understand and restart Sublime Text, then press "Start Atlas" in the context menu. Then the visualization window will be shown.
CodeAtlas For Sublime Text

9. Press Open DB in the visualization window, then find the *.udb file generated before.
CodeAtlas For Sublime Text

10. Now you can use the key shortcuts above to explore the code!

CodeAtlas For Sublime Text的更多相关文章

  1. Sublime Text 3中文乱码解决方法以及安装包管理器方法

    一般出现乱码是因为文本采用了GBK编码格式,Sublime Text默认不支持GBK编码. 安装包管理器 简单安装 使用Ctrl+`快捷键或者通过View->Show Console菜单打开命令 ...

  2. 在Sublime Text 3上安装代码格式化插件CodeFormatter

    1.了解CodeFormatter插件 在Sublime Text 3中编写代码,为了能让我们的代码格式变得漂亮整洁,需要一个能自动格式代码的插件.这里发现CodeFormatter插件不错,它能支持 ...

  3. sublime text 3 + python配置,完整搭建及常用插件安装

    四年的时间,一直使用EmEditor编辑器进行Python开发,之前是做面向过程,只需要将一个单独的py文件维护好即可,用着也挺顺手,但是最近在做面向对象的开发,不同的py文件中相互关联较多,感觉单纯 ...

  4. 前端工程师手中的Sublime Text

    原文地址:http://css-tricks.com/sublime-text-front-end-developers/ 我的Blog:http://cabbit.me/sublime-text-f ...

  5. Sublime Text 全程指引 by Lucida

    作者:Lucida 微博:@peng_gong 豆瓣:@figure9 博客园:@figure9 原文链接:http://zh.lucida.me/blog/sublime-text-complete ...

  6. 自定义Sublime Text的图标

    sublime text很赞,windows上最接近mac逼格的轻量编辑器,对于我这样比较喜欢格调的人来说,简直不二之选啊. 美中不足的是,看久了觉得它的图标似乎不是很上心.现在都流行扁平化了而它还停 ...

  7. 如何优雅地使用Sublime Text

    Sublime Text:一款具有代码高亮.语法提示.自动完成且反应快速的编辑器软件,不仅具有华丽的界面,还支持插件扩展机制,用她来写代码,绝对是一种享受.相比于难于上手的Vim,浮肿沉重的Eclip ...

  8. 为 Sublime Text 3059 配置 PHP 编译环境

    关于  Sublime Text 3059 的安装及汉化 请参看 http://www.xiumu.org/note/sublime-text-3.shtml 为 sublime Text 配置 PH ...

  9. 杂谈:用 Sublime Text 2 写 ActionScript3

    Sublime Text这是程序员最喜爱的编辑器,说说在win7下使用Sublime Text来编写as文件以及编译与运行swf. 准备工作 1.Sublime Text 2 2.Java 的JDK( ...

随机推荐

  1. 【Java EE 学习 79 下】【动态SQL】【mybatis和spring的整合】

    一.动态SQL 什么是动态SQL,就是在不同的条件下,sql语句不相同的意思,曾经在“酒店会员管理系统”中写过大量的多条件查询,那是在SSH的环境中,所以只能在代码中进行判断,以下是其中一个多条件查询 ...

  2. Matlab

    Q:workspace没有显示变量的值 A:这是因为子程序里的变量是局部变量,他们的作用域就是子函数内部,会在流程控制回到主调函数前被系统自动释放掉,所以,一旦子程序运行完,你是不可能再查看子程序里的 ...

  3. js 变量提升和函数提升原理

    关于js的变量,开始的时候我们都会被告知,变量声明应该在引用该变量之前.关于为什么要这样做呢,开始的时候本着会用就行的目的,也没去深究.不过后来经常会发现一些让人很费解的..姑且称为现象吧.先看一段代 ...

  4. xampp的Apache无法启动解决方法

    XAMPP Apache 无法启动原因1(缺少VC运行库): 这个就是我遇到的问题原因,下载安装的XAMPP版本是xampp-win32-1.7.7-VC9,而现有的Windows XP系统又没有安装 ...

  5. bsearch的溢出问题

    在java中为了避免 low+high溢出,可以用无符号右移:正数高位补0,负数高位补1 int mid = (low + high) >>> 1; 如果是在c++中,那么需要先转换 ...

  6. SQL 比较时间大小

    比较字符串类型的时间大小 数据库中的时间是varchar类型的,MySql使用CURDATE()来获取当前日期,SqlServer通过GETDATE()来获取当前日期 1. 直接使用字符串来比较 注意 ...

  7. db2日期和时间常用汇总

    1.db2可以通过SYSIBM.SYSDUMMY1.SYSIBM.DUAL获取寄存器中的值,也可以通过VALUES关键字获取寄存器中的值. SELECT 'HELLO DB2' FROM SYSIBM ...

  8. linux防火墙之 ufw

    Usage: ufw COMMAND Commands: enable enables the firewall 开启ufw防火墙 disable disables the firewall 禁用防火 ...

  9. linux之硬盘管理fdisk

    1.首先我们用虚拟机模拟服务器加入一块新的硬盘,硬盘容量入下图5GB硬盘. 2.首先我们要对它进行分区,我们从上面知道需要分区格式化的是第二块硬盘. 3.输入n回车是新建分区,p是主分区(只能建立4个 ...

  10. locust的安装与使用

    Contents Locust这一款开源性能测试工具.然而,当前在网络上针对Locust的教程极少,不管是中文还是英文,基本都是介绍安装方法和简单的测试案例演示,但对于较复杂测试场景的案例演示却基本没 ...