CodeAtlas For Sublime Text

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

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.

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.

2. Find Members of a class.

Press Alt+M the find members of a class.

Each member variable is represented as a pink disc in the atlas.

Each class is represented as a blue disc. Also, Size of the disc indicates lines of the class.

3. Find references of a variable/function.

Press Alt+U the find all references.

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.

5. Delete an unused function/class/variable

Press Alt+Delete to delete current selected function/class/variable.

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.

7. Use mouse to select/drag/zoom in the visualization window directly.

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.

4. Unzip and place the plugin in the package folder.

5. Replace Packages/CodeAtlas/CodeViewPy/understand.pyd with the one in the Understand folder(usually in SciTools/bin/pc-win32/python/understand.pyd)

6. Open Understand and create a database for your project.

7. After finish the new project wizard, a database file will be generated.

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

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

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

来自为知笔记(Wiz)

时间: 2024-10-13 03:10:36

CodeAtlas For Sublime Text的相关文章

Sublime Text 常用的16 个 Sublime Text 快捷键

在我做了一次包含一些现场编码的演示后,一些观众问我是如何操作这么快.当然这里没有唯一的答案,答案是一堆简单的快捷键和大量的实践的组合.为了回应那些询问,我觉得有必要看看我每天想都不用想且使用的快捷键. 这里有一个15 16 个快捷键的精选列表(1个自定义快捷键),以gif动画展示,我每天使用.享受吧! (译者注:原文所列快捷键均为OS X环境,为了方便Windows和Linux环境童鞋的学习,译者将备注Windows和Linux下对应的快捷键) 选择 选择一个选中项的下一个匹配项 选择一个选中项

Sublime Text 3,有了Anaconda就会如虎添翼

作为Python开发环境的Sublime Text 3,有了Anaconda就会如虎添翼.Anaconda是目前最流行也是最有威力的Python代码提示插件. 操作步骤 1.打开package control菜单,输入install或者直接点击install package命令菜单 2.在新窗口输入Anaconda并点击第一个备选项进行安装.安装完成后会显示messages文档 3.由于插件本身无法知道Python安装的路径,所以需要手动设置Python主程序的位置.(刚安装完插件估计就会提示我

Sublime Text 3插件安装方法

一:安装Sublime Text 3插件的方法 安装package control组件,然后直接在线安装: 1.按Ctrl+`调出console(注:安装有QQ输入法的这个快捷键会有冲突的.输入法属性设置-输入法管理-取消热键切换至QQ拼音) 2.粘贴下面代码究竟部命令行并回车: import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); ur

sublime text插件

使用Package Control组件安装 也可以安装package control组件,然后直接在线安装: 按Ctrl+`调出console(注:安装有QQ输入法的这个快捷键会有冲突的,输入法属性设置-输入法管理-取消热键切换至QQ拼音) 粘贴以下代码到底部命令行并回车: 1 import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); url

Sublime Text 编辑器安装 Package Control

1.打开 sublime text  ,按 " Ctrl + `"( " ` ",就是"Tab"上面的那个,或者"1"左边那个键): 2.打开网站 https://packagecontrol.io/installation#st3复制红线部分代码,粘贴到上面提到的" Ctrl + `"的命令框内,并按"Enter"键,等几十秒(依网络状况而定),会提示安装完成: 3.确认安装成功 快捷

打造自己的Sublime Text 3 编辑器

Sublime Text 3据说是windows下的编辑神器,有很多vim的功能,字体颜色超丰富,灰常不错(装X专用*_*). 1,sublime安装 官网http://www.sublimetext.com/3下载 2,package control安装 打开地址https://packagecontrol.io/installation 在Sublime Text 3,菜单 View -> Show Console,会在底部出现一个命令输入框,然后将刚打开页面上面的Sublime Text

Sublime Text 2 配置手册

Preferences.sublime-settings文件: // While you can edit this file, it’s best to put your changes in // “User/Preferences.sublime-settings”, which overrides the settings in here. // // Settings may also be placed in file type specific options files, for

Sublime Text 全程指南

安装(Installation) Sublime Text 官方网站 提供了Sublime Text各系统各版本的下载,目前Sublime Text的最新版本是 Sublime Text 3 .这里以Windows版本的Sublime Text安装为例. 注意在安装时勾选 Add to explorer context menu ,这样在右键单击文件时就可以直接使用Sublime Text打开. 添加Sublime Text到环境变量 使用 Win + R 运行 sysdm.cpl 打开"系统属

sublime text 3 如何支持 javascript 代码提示方法一二

需要安装 SublimeCodeIntel 插件. 安装方法: 1.前示条件是 sublime text 3 已安装 package controll.(插件管理器) 安装 package control 方法: 按 Ctrl + ~ 调出控制台 复制粘贴如下代码,并回车: import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp)