当前位置:网站首页>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 arrow
Inheritance relationshipGreen dashed arrow
Interface 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 language brush questions ~leetcode and simple questions of niuke.com
- The markdown file obtains the pictures of the network and stores them locally and modifies the URL
- CString的GetBuffer和ReleaseBuffer使用说明
- Visual upper system design and development (Halcon WinForm) -2 Global variable design
- Analysis of development mode process based on SVN branch
- 秒杀系统2-Redis解决分布式Session问题
- The state does not change after the assignment of El switch
- Srs4.0+obs studio+vlc3 (environment construction and basic use demonstration)
- 《微服务设计》读书笔记(上)
- 大csv拆分和合并
猜你喜欢
Detailed pointer advanced 1
Halcon与Winform学习第一节
Can‘t connect to MySQL server on ‘localhost‘
Jvm-02-class loading subsystem
Leasing cases of the implementation of the new regulations on the rental of jointly owned houses in Beijing
VS2017通过IP调试驱动(双机调试)
Seckill system 2 redis solves the problem of distributed session
需要知道的字符串函数
Redis lock Optimization Practice issued by gaobingfa
Vs2017 is driven by IP debugging (dual machine debugging)
随机推荐
Redis single thread problem forced sorting layman literacy
百度智能云助力石嘴山市升级“互联网+养老服务”智慧康养新模式
[combinatorics] combinatorial identities (recursive combinatorial identities | sum of variable terms | simple combinatorial identities and | sum of variable terms | staggered sums of combinatorial ide
Visual upper system design and development (Halcon WinForm) -2 Global variable design
Problems of CString in multithreading
Unityshader - materialcapture material capture effect (Emerald axe)
整形和浮点型是如何在内存中的存储
从 flask 服务端代码自动生成客户端代码 -- flask-native-stubs 库介绍
软件逆向破解入门系列(1)—xdbg32/64的常见配置及功能窗口
Relationship between truncated random distribution and original distribution
Jvm-08-garbage collector
视觉上位系统设计开发(halcon-winform)-2.全局变量设计
Kubernetes 进阶训练营 Pod基础
Jvm-06-execution engine
Puppet自动化运维排错案例
在MapReduce中利用MultipleOutputs输出多个文件
C language brush questions ~leetcode and simple questions of niuke.com
Unity功能——Unity离线文档下载及使用
秒杀系统2-Redis解决分布式Session问题
Digital image processing -- popular understanding of corrosion and expansion