CodeAtlas For Sublime Text

來源:互聯網
上載者:User

標籤:

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/variablePress 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)

CodeAtlas For Sublime Text

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.