当前位置:网站首页>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/
边栏推荐
猜你喜欢
![[cloud native training camp] module 7 kubernetes control plane component: scheduler and controller](/img/a4/2156b61fbf50db65fdf59c8f5538f8.png)
[cloud native training camp] module 7 kubernetes control plane component: scheduler and controller

Redis主从、哨兵、集群模式介绍

Second kill system 3 - list of items and item details

qt使用QZxing生成二维码

Chapter 04_ Logical architecture

UnityShader——MaterialCapture材质捕捉效果 (翡翠斧头)

The markdown file obtains the pictures of the network and stores them locally and modifies the URL

Matplotlib drawing label cannot display Chinese problems

Jvm-06-execution engine

Detailed explanation of string function and string function with unlimited length
随机推荐
软件安装信息、系统服务在注册表中的位置
Redis cache penetration, cache breakdown, cache avalanche solution
socket.io搭建分布式Web推送服务器
需要知道的字符串函数
Jvm-09 byte code introduction
[cloud native training camp] module VIII kubernetes life cycle management and service discovery
Halcon与Winform学习第二节
Visual host system design and development (Halcon WinForm)
Baidu AI Cloud helps Shizuishan upgrade the smart health care model of "Internet + elderly care services"
整形和浮点型是如何在内存中的存储
Solve the problem that pushgateway data will be overwritten by multiple push
The markdown file obtains the pictures of the network and stores them locally and modifies the URL
How to use annotations such as @notnull to verify and handle global exceptions
秒杀系统1-登录功能
视觉上位系统设计开发(halcon-winform)-1.流程节点设计
CString中使用百分号
XWiki Installation Tips
Driver and application communication
String functions that you need to know
阿特拉斯atlas扭矩枪 USB通讯教程基于MTCOM