当前位置:首页 > 服务端 > CodeAtlas For Sublime Text

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

CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记

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 _ JavaClub全栈架构师技术笔记

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 _ JavaClub全栈架构师技术笔记

2. Find Members of a class.
Press Alt+M the find members of a class.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记
Each member variable is represented as a pink disc in the atlas.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记
Each class is represented as a blue disc. Also,  Size of the disc indicates lines of the class.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记

3. Find references of a variable/function. 
Press Alt+U the find all references.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记

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 _ JavaClub全栈架构师技术笔记
5. Delete an unused function/class/variable
Press Alt+Delete to delete current selected  function/class/variable.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记

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 _ JavaClub全栈架构师技术笔记
7. Use mouse to select/drag/zoom in the visualization window directly.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记


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 _ JavaClub全栈架构师技术笔记
4. Unzip and place the plugin in the package folder.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记
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 _ JavaClub全栈架构师技术笔记

6. Open Understand and create a database for your project.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记

7. After finish the new project wizard, a database file will be generated.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记

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 _ JavaClub全栈架构师技术笔记

9. Press Open DB in the visualization window, then find the *.udb file generated before.
CodeAtlas For Sublime Text _ JavaClub全栈架构师技术笔记

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





作者:dydx
来源链接:https://www.cnblogs.com/dydx/p/5393802.html

版权声明:
1、Java侠(https://www.javaxia.com)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。

2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。





本文链接:https://www.javaxia.com/server/124742.html

标签: unused variable
分享给朋友:

“CodeAtlas For Sublime Text” 的相关文章

学习go语言国内最全资料链接2022年05月23日 21:27:32
python中对切片的理解2022年05月23日 21:57:45
信息系统合同管理2022年05月24日 22:14:31
信息系统项目管理师 案例12022年05月24日 23:38:07
飞算soflu软件机器人2022年05月25日 22:23:09
python常用时间处理方法2022年06月02日 20:15:25
大三学习进度372022年06月14日 16:30:03
Python安装Windows的pip包2022年06月14日 18:11:03