当前位置:网站首页>Intelij idea efficient skills (III)
Intelij idea efficient skills (III)
2022-07-03 15:33:00 【crysw】
why
When learning the source code of the mainstream framework , It is often necessary to shuttle back and forth between the calls of classes or methods of various source codes , This requires a very easy to use IDE Tools to assist . InteliJ-IDEA The tool provides powerful source code tracking and inheritance chain display functions . Here is a record of what I used in my study idea To the diagram function .
View inheritance relationships
In the tab of the class you want to view , Click on the right , choice Diagrams, Among them is show Diagrams and show Diagrams Popup, Only the former is newly created in the tab , The latter is displayed in the form of floating windows ; You can also see that shortcut key operations are provided . (Ctrl+Alt+Shit+U, Ctrl+Alt+U)
You can also navigate the directory tree on the left , Right click the class you want to view , Same choice Diagrams, The effect is the same .
Then you get the inheritance graph as shown in the figure below .
The meaning of the arrow in the above figure :
Blue Solid arrowInheritance relationshipGreen dashed arrowInterface implementation relationship
Optimize the inheritance chain
Remove unnecessary classes
The resulting inheritance diagram , Some are not what I want to know , Like the one above IClientConfigAware, I just want to pay attention to IRule Those inheritance relationships , What do I do ?
Simple , Delete . Click to select the class you want to delete , Then use the delete Key will do . The cleaned relationship graph is as follows :
Show class details
How to check the inherited methods ? Right click on the page , choice show categories, Expand the properties in the class as needed 、 Method 、 Construction method, etc . Of course , The second method can also directly use the toolbar above .
Expand the relationship graph of methods and attributes :
If you want to continue fine-grained filtering methods and properties in your classes , For example, I want to see it protected Attribute or method of permission and above scope . The right choice Change Visibility Level Or use the toolbar , Adjust as needed .
In the dependency graph with complex inheritance relationship , The overall diagram overview may be small , Hold down Alt key , A magnifying glass appears .
Add other classes to the diagram
When we also need to check whether there is inheritance relationship between other classes and the current class , We can choose to add it to the current inheritance graph . Right click on the page and select Add Class to Diagram Or shortcut key ( Space bar Space), Then enter the class you want to join .


View specific code
If you want to check the specific source code of a class , Select a class and right-click , choice Jump to Source Or press the shortcut key F4.
After entering a class , If you want to see other methods of this class quickly , There are two ways .
Method 1 : utilize IDEA Provided structure function . ( Left sidebar or Alt+1) Adjust out .
Method 2 : Ctrl+F12, Select the method or property you want to view . You can also enter filters .
Personal blog
Welcome to my personal blog : https://www.crystalblog.xyz/
Alternate address : https://wang-qz.gitee.io/crystal-blog/
边栏推荐
- C语言刷题~Leetcode与牛客网简单题
- Automatic generation of client code from flask server code -- Introduction to flask native stubs Library
- Backtracking method to solve batch job scheduling problem
- 如何使用 @NotNull等注解校验 并全局异常处理
- Summary of concurrent full knowledge points
- Jvm-02-class loading subsystem
- redis单线程问题强制梳理门外汉扫盲
- 视觉上位系统设计开发(halcon-winform)-1.流程节点设计
- Unity function - unity offline document download and use
- [probably the most complete in Chinese] pushgateway entry notes
猜你喜欢

Chapter 04_ Logical architecture

qt使用QZxing生成二维码

WinDbg analysis dump file
![MySQL reports an error: [error] mysqld: file '/ mysql-bin. 010228‘ not found (Errcode: 2 “No such file or directory“)](/img/cd/2e4f5884d034ff704809f476bda288.png)
MySQL reports an error: [error] mysqld: file '/ mysql-bin. 010228‘ not found (Errcode: 2 “No such file or directory“)

Construction of operation and maintenance system

Jvm-06-execution engine

CString的GetBuffer和ReleaseBuffer使用说明

Matplotlib drawing label cannot display Chinese problems

Srs4.0+obs studio+vlc3 (environment construction and basic use demonstration)

Solve the problem that pushgateway data will be overwritten by multiple push
随机推荐
Popular understanding of random forest
SQL server installation location cannot be changed
详解指针进阶2
Atlas atlas torque gun USB communication tutorial based on mtcom
MySQL reports an error: [error] mysqld: file '/ mysql-bin. 010228‘ not found (Errcode: 2 “No such file or directory“)
redis单线程问题强制梳理门外汉扫盲
Secsha system 1- login function
Basic SQL tutorial
Detailed pointer advanced 2
开启 Chrome 和 Edge 浏览器多线程下载
Popular understanding of ovo and ovr
视觉上位系统设计开发(halcon-winform)-2.全局变量设计
Wechat payment -jsapi: code implementation (payment asynchronous callback, Chinese parameter solution)
Detailed comments on MapReduce instance code on the official website
Calibre LVL
Kubernetes - yaml file interpretation
Visual upper system design and development (Halcon WinForm) -6 Nodes and grids
视觉上位系统设计开发(halcon-winform)
Apache ant extension tutorial
How to use annotations such as @notnull to verify and handle global exceptions